Crypto-as-a-Service: Create Go Account - Step by Step

Generate Go Accounts using granular step-by-step process. See the Guide.

  1. Create the public and private keys for your user's Go Account. This generates a BIP32 master key pair that will be used to secure the wallet.

    API Reference

  2. Use your BitGo login password to encrypt the private key (prv) that you created in the prior step. This ensures secure storage of your private key.

    API Reference

  3. Upload to BitGo the public key (xpub) you created in Step 1 and the encrypted private key (encryptedPrv) you created in Step 2. You receive a key ID that you must pass in the next step.

    API Reference

  4. Create a Go Account wallet for your user's child enterprise using the keychain ID from the previous step. Go Accounts are trading type wallets with a 1-of-1 multisig configuration.

    API Reference

  5. Create a new receive address for your Go Account for a specific asset. You must specify the off-chain asset ID (e.g., ofctsol for off-chain test Solana) in the onToken parameter.

    API Reference

// 1. Create Keys
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export SERVICE_USER_TOKEN="<SERVICE_USER_ACCESS_TOKEN>"

curl -X POST \
  "http://$BITGO_EXPRESS_HOST/api/v2/ofc/keychain/local" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SERVICE_USER_TOKEN"
// 2. Encrypt Keys
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export SERVICE_USER_TOKEN="<SERVICE_USER_ACCESS_TOKEN>"
export INPUT="<PRV_KEY>"
export PASSWORD="<YOU_BITGO_LOPGIN_PASSWORD>"

curl -X POST \
  "http://$BITGO_EXPRESS_HOST/api/v2/encrypt" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SERVICE_USER_TOKEN" \
  -d '{
    "input": "'"$INPUT"'",
    "password": "'"$PASSWORD"'"
}'
// 3. Upload Keys
export SERVICE_USER_TOKEN="<SERVICE_USER_ACCESS_TOKEN>"

curl -X POST \
  "https://app.bitgo-test.com/api/v2/ofc/key" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SERVICE_USER_TOKEN" \
  -d '{
    "encryptedPrv": "{\"iv\":\"aHbrsJVbtqlW3+8XWiy8hg==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"LxyG+VtiNVc=\",\"ct\":\"kMGJQNpRXWEq8E12vgFkLe6/1pg9pqZCZnxuXPHosQjx9jhYWe4XBCNF684m3ncwZ69qlqP5QmK8kObSoTkZP7SF2gaQugyJl+4/hgVj3Bx5QDGyiMwE/8owaJpR5CtRVkNXvXIciKL4UJ8isE9mRDfObku7VQQ=\"}",
    "source": "user",
    "originalPasscodeEncryptionCode": "anim",
    "pub": "xpub661MyMwAqRbcFiU9xs5UzYPhgSnx4s55pSeB5FKgLAXG8xn8kdZCfbZ5fLSf8NpntDLjGcQW4oR1xiNMc21bLHbvBzPdsVy75JkRxEqtT6E"
}'

// 4. Create Go Account
export SERVICE_USER_TOKEN="<SERVICE_USER_ACCESS_TOKEN>"
export LABEL="<YOUR_WALLET_NAME>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export KEYS="<KEY_ID>"

curl -X POST \
  "https://app.bitgo-test.com/api/v2/ofc/wallet/add" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SERVICE_USER_TOKEN" \
  -d '{
    "label": "'"$LABEL"'",
    "enterprise": "'"$ENTERPRISE_ID"'",
    "type": "trading",
    "m": 1,
    "n": 1,
    "keys": ["'"$KEYS"'"]
}'
// 5. Create Receive Address
export WALLET_ID="<YOUR_WALLET_ID>"
export SERVICE_USER_TOKEN="<SERVICE_USER_ACCESS_TOKEN>"
export ON_TOKEN="<OFF-CHAIN_ASSET_ID>"

curl -X POST \
  "https://app.bitgo-test.com/api/v2/ofc/wallet/$WALLET_ID/address" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SERVICE_USER_TOKEN" \
  -d '{
    "onToken": "'"$ON_TOKEN"'", # For example, `ofctsol` for off-chain test Solana
  }'
Response
// 1. Create Keys Response
{
  "pub": "xpub661MyMwAqRbcEq5qQLciVPfCyCvx9KstKVp71TxujjY9Kbapv6o2YjtRAV1tfYgQZxBaN6FfFfE3CD21ZRSsd4WkqkFWSZDTiDqf49qtkh7",
  "prv": "xprv9s21ZrQH143K2M1NJK5i8FiURB6TjsA2xGtWD5ZJBQ1ASoFgNZUmzwZwKC9WnyRaN2f4uAdHPdMmLbw2SsUKa6J2bWUEWihbMKcrhJSZueH"
}

// 2. Encrypt Keys Response
{
  "encrypted": "{\"iv\":\"aHbrsJVbtqlW3+8XWiy8hg==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"LxyG+VtiNVc=\",\"ct\":\"kMGJQNpRXWEq8E12vgFkLe6/1pg9pqZCZnxuXPHosQjx9jhYWe4XBCNF684m3ncwZ69qlqP5QmK8kObSoTkZP7SF2gaQugyJl+4/hgVj3Bx5QDGyiMwE/8owaJpR5CtRVkNXvXIciKL4UJ8isE9mRDfObku7VQQ=\"}"
}

// 3. Upload Keys Response
{
  "id": "63ee42c723f584000746d0057a2fb075",
  "pub": "xpub661MyMwAqRbcFiU9xs5UzYPhgSnx4s55pSeB5FKgLAXG8xn8kdZCfbZ5fLSf8NpntDLjGcQW4oR1xiNMc21bLHbvBzPdsVy75JkRxEqtT6E",
  "ethAddress": "0x098a57ddc2ce053bd73dd4d6f7f71004be082b4f",
  "source": "user",
  "type": "independent",
  "encryptedPrv": "{\"iv\":\"aHbrsJVbtqlW3+8XWiy8hg==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"LxyG+VtiNVc=\",\"ct\":\"kMGJQNpRXWEq8E12vgFkLe6/1pg9pqZCZnxuXPHosQjx9jhYWe4XBCNF684m3ncwZ69qlqP5QmK8kObSoTkZP7SF2gaQugyJl+4/hgVj3Bx5QDGyiMwE/8owaJpR5CtRVkNXvXIciKL4UJ8isE9mRDfObku7VQQ=\"}"
}

// 4. Create Go Account Response
{
    "id": "62e18ee98b38310008a830927220dfdc",
    "users": [
        {
            "user": "62ab90e06dfda30007974f0a52a12995",
            "permissions": [
                "admin",
                "view",
                "spend"
            ]
        }
    ],
    "coin": "ofc",
    "label": "My Go Account",
    "m": 1,
    "n": 1,
    "keys": ["63ee42c723f584000746d0057a2fb075"],
    "keySignatures": {},
    "enterprise": "60e6229d19d3c400068bde7da6d41b6f",
    "tags": [
        "62e18ee98b38310008a830927220dfdc",
        "62c5ae8174ac860007aff138a2d74df7"
    ],
    "disableTransactionNotifications": false,
    "freeze": {},
    "deleted": false,
    "approvalsRequired": 1,
    "isCold": false,
    "coinSpecific": {},
    "admin": {},
    "clientFlags": [],
    "walletFlags": [],
    "allowBackupKeySigning": false,
    "recoverable": false,
    "startDate": "2025-04-02T19:15:53.000Z",
    "type": "trading",
    "buildDefaults": {},
    "customChangeKeySignatures": {},
    "hasLargeNumberOfAddresses": false,
    "multisigType": "onchain",
    "config": {},
    "balance": 0,
    "confirmedBalance": 0,
    "spendableBalance": 0,
    "balanceString": "0",
    "confirmedBalanceString": "0",
    "spendableBalanceString": "0",
    "pendingApprovals": []
}

// 5. Create Receive Address Response
{
  "id": "67ec59c0929b08484faecc752f542d8c",
  "address": "HNohgG7TsPkqBhWxxmbE1dRzuNrxSfFfdxuwxYwmMTxm",
  "chain": 0,
  "index": 397,
  "coin": "ofc",
  "token": "ofctsol",
  "wallet": "62c5b1de8a0c5200071c9a603bdbadc5"
}