Checkout the project and copy example configuration files
git clone https://github.com/apay-io/stellar-anchor cd stellar-anchor npm i cp .env.example .env cp assets.json.example assets.json
Run bootstrap to generate test Stellar accounts, setup trustlines, etc
node bootstrap
It takes some time, generates 3 stellar accounts for each asset in assets.json (if not already populated), funds them and adds required trustlines
- stellar.issuer
- distributor
- channels
Also saves secrets into .env file as STELLAR_SECRET_G...PUBLIC...KEY=S...SECRET...KEY
Now your assets.json should look like this
[
{
"code": "TBTC",
"driver": {
"code": "tbtc",
"env": "test",
"accessToken": "BITGO_TEST_ACCESS_TOKEN",
"walletId": "BITGO_TBTC_WALLET_ID",
"walletPassphrase": "BITGO_TBTC_WALLET_PASS"
},
"totalSupply": "1000",
"stellar": {
"issuer": "GCUADJ7KND6LK6ZZHS42DA3FMYR7EWVHDNKZN4NTO2MMINOEVXDAPWVI",
"name": "",
"desc": "",
"image": "",
"status": "live"
},
"distributor": "GA5BN6MQCOOU2MFKFSIPI2ZU7VJOHVOZVWBM33WQPBN63DCWUEY3HHTT",
"channels": [
"GAUATMQIQVTBONSEAMJXCMCIVJAUD527V5FJQ23JAATFXIAB4B4I2JZ6"
],
"deposit": {
"eta": 1200,
"min": 0.0001,
"fee_create": 0.0001,
"fee_fixed": 0.0,
"fee_percent": 0.0
},
"horizonUrl": "https://horizon-testnet.stellar.org",
"networkPassphrase": "Test SDF Network ; September 2015",
"withdrawal": {
"eta": 1200,
"min": 0.0001,
"fee_fixed": 0.0001,
"fee_percent": 0.001
},
"withdrawalBatching": 60000
}
]And .env like this
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/postgres BITGO_TEST_ACCESS_TOKEN= BITGO_TBTC_WALLET_ID= BITGO_TBTC_WALLET_PASS= NOTIFICATION_SECRET=secret STELLAR_SECRET_GCUADJ7KND6LK6ZZHS42DA3FMYR7EWVHDNKZN4NTO2MMINOEVXDAPWVI=SB2PLO7T7V5LFHOFHEDQXTD6BMKMGAFWFFIGTQKWQ25NLYVBHZEKFE3V STELLAR_SECRET_GA5BN6MQCOOU2MFKFSIPI2ZU7VJOHVOZVWBM33WQPBN63DCWUEY3HHTT=SAH4DKM6PYKZKD25XBQOXVYCZCXJ7FZROWZSBGUTYUGK663R54ZLS6SQ STELLAR_SECRET_GAUATMQIQVTBONSEAMJXCMCIVJAUD527V5FJQ23JAATFXIAB4B4I2JZ6=SB7A3KY5YSLWUNSY4RAO3CSZEZUXSIRTSNVT7KM6JYQ3RCNCLRBLSMPG
Go to test.bitgo.com and create an account (2FA code is always 000000)
Create new Bitcoin wallet,
put wallet passphrase into BITGO_TBTC_WALLET_PASS field in .env
Go into that wallet -> settings
put wallet ID into BITGO_TBTC_WALLET_ID field in .env
Scroll down on the same page "Add webhook". Put URL of your test setup, where last part "secret" should be the same as NOTIFICATION_SECRET parameter in .env
If you don't have public URL yet for your test setup - you can skip this part and trigger webhooks manually using postman or something.

In the top right corner go into "User settings" -> "Developer options" -> "Add access token"

Save this access token into BITGO_TEST_ACCESS_TOKEN field in .env