Create Advanced Wallets
Overview
Wallet creation uses the Advanced Wallet Manager (AWM), Master BitGo Express (MBE), and a key management service (KMS) to generate the user, backup, and BitGo keys all in one step. You call the MBE, which initiates the following:
- AWM generates the user keychain.
- AWM sends the user keychain to the KMS.
- KMS encrypts the private user key and stores user public key.
- AWM generates the backup keychain.
- AWM sends the backup keychain to the KMS.
- KMS encrypts the private backup key and stores public backup key.
- AWM sends the public user and backup keys to the MBE.
- MBE uploads the public user and backup keys to BitGo.
- BitGo creates the BitGo key on the BitGo service.
- BitGo creates the advanced wallet on BitGo with the three keys.
Prerequisites
Create Advanced Wallet
Endpoint: Advanced Wallets - Generate Wallet
export IP_OR_HOSTNAME="<YOUR_SERVER_IP_OR_HOSTNAME>"
export COIN="<ASSET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ENTERPRISE="<YOUR_ENTERPRISE_ID>"
export LABEL="<YOUR_WALLET_NAME>"
curl -X POST \
http://$IP_OR_HOSTNAME/api/v1/$COIN/advancedwallet/generate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"enterprise": "'"$ENTERPRISE"'",
"label": "'"$LABEL"'",
"multisigType": "onchain" # Pass 'onchain' for mulstignature or 'tss' for MPC
}'Step Result
Note: This response contains critical key material. The
commonKeychainvalue (for MPC wallets) is required for signing transactions and should be stored securely.
{
"wallet": {
"id": "6553e933288be490293ae748efafeaaf",
"users": [
{
"user": "62ab90e06dfda30007974f0a52a12995",
"permissions": ["admin", "spend", "view"]
}
],
"coin": "tbtc",
"label": "My Advanced Wallet",
"m": 2,
"n": 3,
"keys": [
"6553e933288be490293ae748user0001",
"6553e933288be490293ae748back0001",
"6553e933288be490293ae748bitg0001"
],
"keySignatures": {},
"enterprise": "62c5ae8174ac860007aff138a2d74df7",
"organization": "62c5ae8174ac860007aff138a2d74df7",
"bitgoOrg": "BitGo Inc",
"tags": ["6553e933288be490293ae748efafeaaf"],
"disableTransactionNotifications": false,
"freeze": {},
"deleted": false,
"approvalsRequired": 1,
"isCold": true,
"coinSpecific": {},
"admin": {},
"allowBackupKeySigning": false,
"clientFlags": [],
"recoverable": false,
"startDate": "2023-11-14T21:36:35.712Z",
"hasLargeNumberOfAddresses": false,
"config": {},
"balanceString": "0",
"confirmedBalanceString": "0",
"spendableBalanceString": "0",
"receiveAddress": {
"id": "6553e933288be490293ae748efaf0001",
"address": "tb1q5xtred89revxp789r6dmvyf74vgecczp2ch2hvhlj8anjkcepqtspu7j7d",
"chain": 20,
"index": 0,
"coin": "tbtc",
"wallet": "6553e933288be490293ae748efafeaaf",
"coinSpecific": {}
},
"multisigType": "onchain",
"type": "advanced"
},
"userKeychain": {
"id": "6553e933288be490293ae748user0001",
"source": "user",
"type": "independent",
"pub": "xpub661MyMwAqRbcGMVhmc7wqQRYMtcX9LAvSj1pjB213y5TsrkV2uuzJjWnjBrT1FUeNWGPjaVm5p7o6jdNcQJrV1cy3a1R8NQ9m7LuYKA8RpH"
},
"backupKeychain": {
"id": "6553e933288be490293ae748back0001",
"source": "backup",
"type": "independent",
"pub": "xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB"
},
"bitgoKeychain": {
"id": "6553e933288be490293ae748bitg0001",
"source": "bitgo",
"type": "independent",
"isBitGo": true,
"isTrust": false,
"pub": "xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6LBpB85b3D2yc8sfvZU521AAwdZafEz7mnzBBsz4wKY5fTtTQBm",
"hsmType": "institutional"
},
"responseType": "GenerateWalletResponse"
}{
"wallet": {
"id": "669569464cec3c82c9b524faf0d42087",
"users": [
{
"user": "6672175d79369c8ad556deaca06abeea",
"permissions": ["admin", "spend", "view"]
}
],
"coin": "tsol",
"label": "My MPC Advanced Wallet",
"m": 2,
"n": 3,
"keys": [
"669569464cec3c82c9b524faf0d4user1",
"669569464cec3c82c9b524faf0d4back1",
"669569464cec3c82c9b524faf0d4bitg1"
],
"keySignatures": {},
"enterprise": "6672220dd9e61ce3d62e9e2d710cbd6f",
"organization": "66722210d9e61ce3d62e9e997100b40a",
"bitgoOrg": "BitGo Trust",
"tags": ["669569464cec3c82c9b524faf0d42087"],
"disableTransactionNotifications": false,
"freeze": {},
"deleted": false,
"approvalsRequired": 1,
"isCold": true,
"coinSpecific": {},
"admin": {},
"allowBackupKeySigning": false,
"clientFlags": [],
"recoverable": false,
"startDate": "2024-07-15T17:31:50.621Z",
"hasLargeNumberOfAddresses": false,
"config": {},
"balanceString": "0",
"confirmedBalanceString": "0",
"spendableBalanceString": "0",
"receiveAddress": {
"id": "669569464cec3c82c9b524faf0d40001",
"address": "ESda41265eU4typ7Q7MFnBuaYUvV3rYsJyrGQzqo6YZn",
"chain": 0,
"index": 0,
"coin": "tsol",
"wallet": "669569464cec3c82c9b524faf0d42087",
"coinSpecific": {}
},
"multisigType": "tss",
"type": "advanced"
},
"userKeychain": {
"id": "669569464cec3c82c9b524faf0d4user1",
"source": "user",
"type": "tss",
"commonKeychain": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2"
},
"backupKeychain": {
"id": "669569464cec3c82c9b524faf0d4back1",
"source": "backup",
"type": "tss",
"commonKeychain": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2"
},
"bitgoKeychain": {
"id": "669569464cec3c82c9b524faf0d4bitg1",
"source": "bitgo",
"type": "tss",
"isBitGo": true,
"isTrust": false,
"hsmType": "institutional",
"commonKeychain": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2",
"verifiedVssProof": true,
"keyShares": [
{
"from": "bitgo",
"to": "user",
"publicShare": "02a1b2c3d4e5f6g7h8i9j0",
"privateShare": "encrypted_private_share_data",
"vssProof": "vss_proof_data",
"gpgKey": "bitgo_gpg_key"
},
{
"from": "bitgo",
"to": "backup",
"publicShare": "03b1c2d3e4f5g6h7i8j9k0",
"privateShare": "encrypted_private_share_data",
"vssProof": "vss_proof_data",
"gpgKey": "bitgo_gpg_key"
}
],
"walletHSMGPGPublicKeySigs": "hsm_signature_data"
},
"responseType": "GenerateWalletResponse"
}Note: Some networks, such as Ethereum, don't immediately return a new multisignature address, since creating a new address requires a blockchain transaction. The blockchain must confirm this transaction before you can use the address. The parameter
pendingChainInitializationidentifies if an address is awaiting confirmation.You can save the wallet ID in the response, then wait for the blockchain to confirm the address before using it.
Next
See Also
Updated about 18 hours ago