diff --git a/src/masterBitgoExpress/routers/accelerateRoute.ts b/src/masterBitgoExpress/routers/accelerateRoute.ts index b188aff..7c77689 100644 --- a/src/masterBitgoExpress/routers/accelerateRoute.ts +++ b/src/masterBitgoExpress/routers/accelerateRoute.ts @@ -76,10 +76,12 @@ const AccelerateResponse: HttpResponse = { }; /** - * Accelerate transaction (advanced) + * Advanced Wallets - Accelerate Transaction * * Send a new transaction to accelerate the targeted unconfirmed transaction either by using Child-Pays-For-Parent (CPFP) or Replace-By-Fee (RBF). * + * Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction. + * * Use this endpoint only with advanced wallets. For other wallet types, use [Accelerate Transaction](https://developers.bitgo.com/reference/expresswalletacceleratetx). * * @tag Advanced Wallets diff --git a/src/masterBitgoExpress/routers/awmExpressHealth.ts b/src/masterBitgoExpress/routers/awmExpressHealth.ts index d2d0e00..04d83e5 100644 --- a/src/masterBitgoExpress/routers/awmExpressHealth.ts +++ b/src/masterBitgoExpress/routers/awmExpressHealth.ts @@ -6,7 +6,7 @@ import { MasterExpressConfig } from '../../shared/types'; import logger from '../../shared/logger'; import { responseHandler } from '../../shared/middleware'; import { AdvancedWalletManagerClient } from '../clients/advancedWalletManagerClient'; -import { PingResponseType, VersionResponseType } from '../../types/health'; +import { PingResponseType } from '../../types/health'; import { customDecodeErrorFormatter } from '../../shared/errorFormatters'; // Response type for /ping/advancedWalletManager endpoint @@ -21,16 +21,8 @@ const PingAwmResponse: HttpResponse = { }), }; -const VersionAwmResponse: HttpResponse = { - 200: VersionResponseType, - 500: t.type({ - error: t.string, - details: t.string, - }), -}; - /** - * Ping (MBE-to-AWM) + * Advanced Wallets - Ping Advanced Wallet Manager * * Test your connection between the Advanced Wallet Manager (AWM) and the Master Bitgo Express (MBE) servers. * @@ -45,29 +37,10 @@ const PingAwmRoute = httpRoute({ description: 'Ping the advanced wallet manager server', }); -/** - * Check Version (MBE-to-AWM) - * - * Use the Master Bitgo Express (MBE) server to check your version of the Advanced Wallet Manager (AWM) server. Calling this endpoint instructs the MBE server to call [Check AWM Version](https://developers.bitgo.com/reference/v1healthversionawm). - * - * @tag Advanced Wallets - * @operationId advancedwallet.mbe.awm.version - */ -const VersionAwmRoute = httpRoute({ - method: 'GET', - path: '/version/advancedWalletManager', - request: httpRequest({}), - response: VersionAwmResponse, - description: 'Get the version of the advanced wallet manager server', -}); - export const AdvancedWalletManagerHealthSpec = apiSpec({ 'advancedwallet.mbe.awm.ping': { post: PingAwmRoute, }, - 'advancedwallet.mbe.awm.version': { - get: VersionAwmRoute, - }, }); // Create router with handlers @@ -107,25 +80,5 @@ export function createAdvancedWalletManagerHealthRouter( }), ]); - router.get('advancedwallet.mbe.awm.version', [ - responseHandler(async () => { - try { - // Use the client's getVersion method instead of direct HTTP request - const versionResponse = await awmClient.getVersion(); - - return Response.ok({ - version: versionResponse.version, - name: versionResponse.name, - }); - } catch (error) { - logger.error('Failed to get version from advanced wallet manager:', { error }); - return Response.internalError({ - error: 'Failed to get version from advanced wallet manager', - details: error instanceof Error ? error.message : String(error), - }); - } - }), - ]); - return router; } diff --git a/src/masterBitgoExpress/routers/consolidateRoute.ts b/src/masterBitgoExpress/routers/consolidateRoute.ts index e77d3f8..90682b3 100644 --- a/src/masterBitgoExpress/routers/consolidateRoute.ts +++ b/src/masterBitgoExpress/routers/consolidateRoute.ts @@ -35,10 +35,12 @@ export const ConsolidateResponse: HttpResponse = { }; /** - * Consolidate account (advanced) + * Advanced Wallets - Consolidate Account * * Build, sign, and send a consolidation transaction, all in one call. For account-based assets, consolidating the balances in the receive addresses to the base address maximizes the spendable balance of a wallet. * + * Retrieves the private key from KMS using the provided public key or common keychain, then signs and broadcasts the transaction. + * * Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate account (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateaccount). * * @tag Advanced Wallets diff --git a/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts b/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts index f2fcfc6..5bd8d3a 100644 --- a/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts +++ b/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts @@ -74,10 +74,12 @@ export const ConsolidateUnspentsResponse: HttpResponse = { }; /** - * Consolidate unspents (advanced) + * Advanced Wallets - Consolidate Unspents * * Builds, signs, and sends a transaction to consolidate unspents all in 1 call. Consolidating unspents is only for UTXO-based assets. * + * Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction. + * * Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate unspents (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateunspents). * * @tag Advanced Wallets diff --git a/src/masterBitgoExpress/routers/generateWalletRoute.ts b/src/masterBitgoExpress/routers/generateWalletRoute.ts index 6708337..161b4f6 100644 --- a/src/masterBitgoExpress/routers/generateWalletRoute.ts +++ b/src/masterBitgoExpress/routers/generateWalletRoute.ts @@ -332,12 +332,12 @@ const GenerateWalletRequest = { }; /** - * Generate wallet (advanced) + * Advanced Wallets - Generate Wallet * * Create a new advanced wallet. Calling this endpoint does the following: - * 1. Creates the user keychain in the advanced wallet manager and encrypts it with the respective key management service (KMS). - * 2. Creates the backup keychain in the advanced wallet manager and encrypts it with the respective KMS. - * 3. Uploads the public user and backup keys to BitGo. + * 1. Generates user keychain in isolated AWM, then sends to KMS (encrypts private key, stores public key mapping). + * 2. Generates backup keychain in isolated AWM, then sends to KMS (encrypts private key, stores public key mapping). + * 3. Uploads the user and backup public keys to BitGo. * 4. Creates the BitGo key on the BitGo service. * 5. Creates the wallet on BitGo with the 3 keys. * diff --git a/src/masterBitgoExpress/routers/healthCheck.ts b/src/masterBitgoExpress/routers/healthCheck.ts index 3857dff..0dc78e2 100644 --- a/src/masterBitgoExpress/routers/healthCheck.ts +++ b/src/masterBitgoExpress/routers/healthCheck.ts @@ -16,7 +16,7 @@ const VersionResponse: HttpResponse = { }; /** - * Ping (MBE) + * Advanced Wallets - Ping * * Test your connection to the Master Bitgo Express (MBE) server. * @@ -32,7 +32,7 @@ const PingRoute = httpRoute({ }); /** - * Check Version (MBE) + * Advanced Wallets - Check Version * * Check your version of the Master Bitgo Express (MBE) server. * diff --git a/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts b/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts index 13eeee0..c807774 100644 --- a/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts +++ b/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts @@ -113,11 +113,15 @@ const RecoveryConsolidationsWalletResponse: HttpResponse = { }; /** - * Consolidate and recover assets (advanced) + * Advanced Wallets - Consolidate and Recover Assets * * Recover assets from an advanced wallet with a balance in multiple receive addresses. Build, sign, and send a consolidation and recovery, all in one call. Sign using your user and backup keys. Works for both multisignature and MPC recoveries. * - * To recover assets from an advanced wallet with a balance only in the base address, use [Recover assets (advanced)](https://developers.bitgo.com/reference/advancedwalletrecovery). + * Retrieves the private keys from KMS using the provided public keys or common keychain, then signs and returns the broadcastable transaction hex. + * + * Note: This endpoint only works when AWM and MBE are running in recovery mode. + * + * To recover assets from an advanced wallet with a balance only in the base address, use [Advanced Wallets - Recover Assets](https://developers.bitgo.com/reference/advancedwalletrecovery). * * Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/). * diff --git a/src/masterBitgoExpress/routers/recoveryRoute.ts b/src/masterBitgoExpress/routers/recoveryRoute.ts index 5fa82a2..a73037e 100644 --- a/src/masterBitgoExpress/routers/recoveryRoute.ts +++ b/src/masterBitgoExpress/routers/recoveryRoute.ts @@ -285,11 +285,15 @@ const RecoveryWalletRequest = { }; /** - * Recover assets (advanced) + * Advanced Wallets - Recover Assets * * Recover assets from an advanced wallet with a balance only in the base address. Works for both multisignature and MPC recoveries. * - * To recover assets from an advanced wallet with balances in multiple receive addresses, use [Consolidate and recover assets (advanced)](https://developers.bitgo.com/reference/advancedwalletconsolidaterecovery). + * Retrieves the private keys from KMS using the provided public keys or common keychain, then signs and returns the broadcastable transaction hex. + * + * Note: This endpoint only works when AWM and MBE are running in recovery mode. + * + * To recover assets from an advanced wallet with balances in multiple receive addresses, use [Advanced Wallets - Consolidate and Recover Assets](https://developers.bitgo.com/reference/advancedwalletconsolidaterecovery). * * Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/). * diff --git a/src/masterBitgoExpress/routers/sendManyRoute.ts b/src/masterBitgoExpress/routers/sendManyRoute.ts index 31acfe4..77bda70 100644 --- a/src/masterBitgoExpress/routers/sendManyRoute.ts +++ b/src/masterBitgoExpress/routers/sendManyRoute.ts @@ -208,11 +208,13 @@ export const SendManyResponse: HttpResponse = { }; /** - * Send to many (advanced) + * Advanced Wallets - Send to Many * * Send coins or tokens to one or more recipients. You can use this endpoint to schedule outgoing transactions in bulk, lowering your aggregate amount of blockchain fees. * - * Works with both multisignature and MPC wallets. Also supports external-signer mode. + * Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction. + * + * Works with both multisignature and MPC wallets. * * Works with most BitGo-supported assets, but currently unavailable for: ALGO, ARBETH, AVAXC, CELO, CELO:CUSD, CSPR, DOT, EOS, HTETH:BGERCH, NEAR, OPETH, STX, TON, TRX, TRX:USDC, XLM, XRP, XTZ * diff --git a/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts b/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts index 4a5c2e2..5ef9e26 100644 --- a/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts +++ b/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts @@ -19,10 +19,12 @@ export const SignMpcResponse: HttpResponse = { }; /** - * Sign and send MPC transaction (advanced) + * Advanced Wallets - Sign and Send MPC Transaction * * Sign and send a MPC transaction. * + * Retrieves the private key from KMS using the provided common keychain, then signs and broadcasts the transaction. + * * Use this endpoint only with advanced wallets. For other wallet types, use [Sign MPC transaction](https://developers.bitgo.com/reference/expresswalletsigntxtss). * * @tag Advanced Wallets