Custody Starter Architecture: Set Up Standby Wallet (MPC)
Create an MPC standby wallet as intermediate buffer. See the Guide.
-
Generate a self-custody MPC wallet using BitGo Express or the SDK. This creates the wallet and keys in one step. The standby wallet is a self-custody wallet that serves as an intermediate buffer between your custody wallet (cold storage) and your deposit/withdraw wallet (daily operations).
This response contains critical key material. Save the backup keychain in a secure place. Save the wallet ID and backup keychain from the response. You need the wallet ID to configure whitelist policies.
// 1. Create Standby Wallet
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export COIN="<ASSET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>"
export LABEL="<YOUR_DESIRED_WALLET_NAME>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate?includeKeychains=true \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"enterprise": "'"$ENTERPRISE_ID"'",
"passphrase": "'"$WALLET_PASSPHRASE"'",
"label": "'"$LABEL"'",
"type": "hot",
"multisigType": "tss",
"walletVersion": 5
}'
// 1. Create Standby Wallet
const { BitGo } = require('bitgo');
const accessToken = '<YOUR_ACCESS_TOKEN>';
const bitgo = new BitGo({
accessToken: accessToken,
env: 'prod',
});
async function createStandbyWallet() {
const newWallet = await bitgo.coin('<ASSET_ID>').wallets().generateWallet({
label: 'Standby Wallet - Hot',
passphrase: '<YOUR_WALLET_PASSPHRASE>',
enterprise: '<YOUR_ENTERPRISE_ID>',
multisigType: 'tss',
type: 'hot',
walletVersion: 5
});
console.log('Standby Wallet Created:');
console.log('Wallet ID:', newWallet.wallet.id());
console.log('Receive Address:', newWallet.wallet.receiveAddress());
// IMPORTANT: Save the backup keychain securely
console.log('Backup Keychain (SAVE SECURELY):', newWallet.backupKeychain);
}
createStandbyWallet();
Response
// 1. Create Standby Wallet Response
{
"wallet": {
"id": "665e33f768f9b4b1cc2ca87a6b87cdfb",
"users": [
{
"user": "660d7c9fa6fbf0d00b415146cf70405a",
"permissions": ["admin", "spend", "view"]
}
],
"coin": "eth",
"label": "Standby Wallet - Hot",
"m": 2,
"n": 3,
"keys": [
"665e33f6fcf87cac817eb3b2ed964042",
"665e33f6e7331ba062e62c48c6ccaf98",
"665e33f6fcf87cac817eb3b01c6b4c36"
],
"enterprise": "66325011d4b1ff58feae3b311d669aae",
"approvalsRequired": 1,
"isCold": false,
"type": "hot",
"multisigType": "tss",
"receiveAddress": {
"address": "0x1a52b70e708f4aec9d92260aa035b3c71e51df84"
}
},
"userKeychain": {
"id": "665e33f6fcf87cac817eb3b2ed964042",
"source": "user",
"type": "tss",
"encryptedPrv": "{...}"
},
"backupKeychain": {
"id": "665e33f6e7331ba062e62c48c6ccaf98",
"source": "backup",
"type": "tss",
"encryptedPrv": "{...}"
},
"bitgoKeychain": {
"id": "665e33f6fcf87cac817eb3b01c6b4c36",
"source": "bitgo",
"type": "tss",
"isBitGo": true
}
}