Skip to content

Commit 6579878

Browse files
committed
docs: update JS docs for dev portal
Ticket: WP-7175
1 parent 746cfa4 commit 6579878

File tree

10 files changed

+35
-64
lines changed

10 files changed

+35
-64
lines changed

src/masterBitgoExpress/routers/accelerateRoute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ const AccelerateResponse: HttpResponse = {
7676
};
7777

7878
/**
79-
* Accelerate transaction (advanced)
79+
* Advanced Wallets - Accelerate Transaction
8080
*
8181
* Send a new transaction to accelerate the targeted unconfirmed transaction either by using Child-Pays-For-Parent (CPFP) or Replace-By-Fee (RBF).
8282
*
83+
* Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction.
84+
*
8385
* Use this endpoint only with advanced wallets. For other wallet types, use [Accelerate Transaction](https://developers.bitgo.com/reference/expresswalletacceleratetx).
8486
*
8587
* @tag Advanced Wallets

src/masterBitgoExpress/routers/awmExpressHealth.ts

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,8 @@ const PingAwmResponse: HttpResponse = {
2121
}),
2222
};
2323

24-
const VersionAwmResponse: HttpResponse = {
25-
200: VersionResponseType,
26-
500: t.type({
27-
error: t.string,
28-
details: t.string,
29-
}),
30-
};
31-
3224
/**
33-
* Ping (MBE-to-AWM)
25+
* Advanced Wallets - Ping Advanced Wallet Manager
3426
*
3527
* Test your connection between the Advanced Wallet Manager (AWM) and the Master Bitgo Express (MBE) servers.
3628
*
@@ -45,29 +37,10 @@ const PingAwmRoute = httpRoute({
4537
description: 'Ping the advanced wallet manager server',
4638
});
4739

48-
/**
49-
* Check Version (MBE-to-AWM)
50-
*
51-
* 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).
52-
*
53-
* @tag Advanced Wallets
54-
* @operationId advancedwallet.mbe.awm.version
55-
*/
56-
const VersionAwmRoute = httpRoute({
57-
method: 'GET',
58-
path: '/version/advancedWalletManager',
59-
request: httpRequest({}),
60-
response: VersionAwmResponse,
61-
description: 'Get the version of the advanced wallet manager server',
62-
});
63-
6440
export const AdvancedWalletManagerHealthSpec = apiSpec({
6541
'advancedwallet.mbe.awm.ping': {
6642
post: PingAwmRoute,
6743
},
68-
'advancedwallet.mbe.awm.version': {
69-
get: VersionAwmRoute,
70-
},
7144
});
7245

7346
// Create router with handlers
@@ -107,25 +80,5 @@ export function createAdvancedWalletManagerHealthRouter(
10780
}),
10881
]);
10982

110-
router.get('advancedwallet.mbe.awm.version', [
111-
responseHandler(async () => {
112-
try {
113-
// Use the client's getVersion method instead of direct HTTP request
114-
const versionResponse = await awmClient.getVersion();
115-
116-
return Response.ok({
117-
version: versionResponse.version,
118-
name: versionResponse.name,
119-
});
120-
} catch (error) {
121-
logger.error('Failed to get version from advanced wallet manager:', { error });
122-
return Response.internalError({
123-
error: 'Failed to get version from advanced wallet manager',
124-
details: error instanceof Error ? error.message : String(error),
125-
});
126-
}
127-
}),
128-
]);
129-
13083
return router;
13184
}

src/masterBitgoExpress/routers/consolidateRoute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ export const ConsolidateResponse: HttpResponse = {
3535
};
3636

3737
/**
38-
* Consolidate account (advanced)
38+
* Advanced Wallets - Consolidate Account
3939
*
4040
* 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.
4141
*
42+
* Retrieves the private key from KMS using the provided public key or common keychain, then signs and broadcasts the transaction.
43+
*
4244
* Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate account (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateaccount).
4345
*
4446
* @tag Advanced Wallets

src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ export const ConsolidateUnspentsResponse: HttpResponse = {
7474
};
7575

7676
/**
77-
* Consolidate unspents (advanced)
77+
* Advanced Wallets - Consolidate Unspents
7878
*
7979
* Builds, signs, and sends a transaction to consolidate unspents all in 1 call. Consolidating unspents is only for UTXO-based assets.
8080
*
81+
* Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction.
82+
*
8183
* Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate unspents (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateunspents).
8284
*
8385
* @tag Advanced Wallets

src/masterBitgoExpress/routers/generateWalletRoute.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ const GenerateWalletRequest = {
332332
};
333333

334334
/**
335-
* Generate wallet (advanced)
335+
* Advanced Wallets - Generate Wallet
336336
*
337337
* Create a new advanced wallet. Calling this endpoint does the following:
338-
* 1. Creates the user keychain in the advanced wallet manager and encrypts it with the respective key management service (KMS).
339-
* 2. Creates the backup keychain in the advanced wallet manager and encrypts it with the respective KMS.
340-
* 3. Uploads the public user and backup keys to BitGo.
338+
* 1. Generates user keychain in isolated AWM, then sends to KMS (encrypts private key, stores public key mapping).
339+
* 2. Generates backup keychain in isolated AWM, then sends to KMS (encrypts private key, stores public key mapping).
340+
* 3. Uploads the user and backup public keys to BitGo.
341341
* 4. Creates the BitGo key on the BitGo service.
342342
* 5. Creates the wallet on BitGo with the 3 keys.
343343
*

src/masterBitgoExpress/routers/healthCheck.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const VersionResponse: HttpResponse = {
1616
};
1717

1818
/**
19-
* Ping (MBE)
19+
* Advanced Wallets - Ping
2020
*
2121
* Test your connection to the Master Bitgo Express (MBE) server.
2222
*
@@ -32,7 +32,7 @@ const PingRoute = httpRoute({
3232
});
3333

3434
/**
35-
* Check Version (MBE)
35+
* Advanced Wallets - Check Version
3636
*
3737
* Check your version of the Master Bitgo Express (MBE) server.
3838
*

src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,15 @@ const RecoveryConsolidationsWalletResponse: HttpResponse = {
113113
};
114114

115115
/**
116-
* Consolidate and recover assets (advanced)
116+
* Advanced Wallets - Consolidate and Recover Assets
117117
*
118118
* 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.
119119
*
120-
* 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).
120+
* Retrieves the private keys from KMS using the provided public keys or common keychain, then signs and returns the broadcastable transaction hex.
121+
*
122+
* Note: This endpoint only works when AWM and MBE are running in recovery mode.
123+
*
124+
* 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).
121125
*
122126
* Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/).
123127
*

src/masterBitgoExpress/routers/recoveryRoute.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,15 @@ const RecoveryWalletRequest = {
285285
};
286286

287287
/**
288-
* Recover assets (advanced)
288+
* Advanced Wallets - Recover Assets
289289
*
290290
* Recover assets from an advanced wallet with a balance only in the base address. Works for both multisignature and MPC recoveries.
291291
*
292-
* 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).
292+
* Retrieves the private keys from KMS using the provided public keys or common keychain, then signs and returns the broadcastable transaction hex.
293+
*
294+
* Note: This endpoint only works when AWM and MBE are running in recovery mode.
295+
*
296+
* 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).
293297
*
294298
* Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/).
295299
*

src/masterBitgoExpress/routers/sendManyRoute.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,13 @@ export const SendManyResponse: HttpResponse = {
208208
};
209209

210210
/**
211-
* Send to many (advanced)
211+
* Advanced Wallets - Send to Many
212212
*
213213
* 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.
214214
*
215-
* Works with both multisignature and MPC wallets. Also supports external-signer mode.
215+
* Retrieves the private key from KMS using the provided public key, then signs and broadcasts the transaction.
216+
*
217+
* Works with both multisignature and MPC wallets.
216218
*
217219
* 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
218220
*

src/masterBitgoExpress/routers/signAndSendMpcRoute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ export const SignMpcResponse: HttpResponse = {
1919
};
2020

2121
/**
22-
* Sign and send MPC transaction (advanced)
22+
* Advanced Wallets - Sign and Send MPC Transaction
2323
*
2424
* Sign and send a MPC transaction.
2525
*
26+
* Retrieves the private key from KMS using the provided common keychain, then signs and broadcasts the transaction.
27+
*
2628
* Use this endpoint only with advanced wallets. For other wallet types, use [Sign MPC transaction](https://developers.bitgo.com/reference/expresswalletsigntxtss).
2729
*
2830
* @tag Advanced Wallets

0 commit comments

Comments
 (0)