diff --git a/src/advancedWalletManager/routers/healthCheck.ts b/src/advancedWalletManager/routers/healthCheck.ts index 9c56bba..b060626 100644 --- a/src/advancedWalletManager/routers/healthCheck.ts +++ b/src/advancedWalletManager/routers/healthCheck.ts @@ -15,7 +15,13 @@ const VersionResponse: HttpResponse = { 200: VersionResponseType, }; -// API Specification +/** + * Ping Check + * + * @tag Advanced Wallets + * @operationId v1.health.ping + * @private + */ export const HealthCheckApiSpec = apiSpec({ 'v1.health.ping': { post: httpRoute({ @@ -26,6 +32,13 @@ export const HealthCheckApiSpec = apiSpec({ description: 'Health check endpoint that returns server status', }), }, + /** + * Version Check + * + * @tag Advanced Wallets + * @operationId v1.health.version + * @private + */ 'v1.health.version': { get: httpRoute({ method: 'GET', diff --git a/src/masterBitgoExpress/routers/accelerateRoute.ts b/src/masterBitgoExpress/routers/accelerateRoute.ts index 1d494aa..6761d7d 100644 --- a/src/masterBitgoExpress/routers/accelerateRoute.ts +++ b/src/masterBitgoExpress/routers/accelerateRoute.ts @@ -2,13 +2,6 @@ import { httpRequest, HttpResponse, httpRoute, optional } from '@api-ts/io-ts-ht import * as t from 'io-ts'; import { ErrorResponses } from '../../shared/errors'; -/** - * Request type for the transaction acceleration endpoint. - * Used to accelerate unconfirmed transactions on UTXO-based blockchains using CPFP or RBF. - * - * @endpoint POST /api/v1/{coin}/advancedwallet/{walletId}/accelerate - * @description Speeds up unconfirmed transactions by creating a child transaction (CPFP) or replacing the original transaction (RBF) - */ export const AccelerateRequest = { /** * Public key used for signing the acceleration transaction. @@ -59,12 +52,6 @@ export const AccelerateRequest = { feeMultiplier: optional(t.number), }; -/** - * Response type for the transaction acceleration endpoint. - * - * @endpoint POST /api/v1/{coin}/advancedwallet/{walletId}/accelerate - * @description Sign an acceleration transaction and send to BitGo to sign and broadcast - */ const AccelerateResponse: HttpResponse = { /** * Successful acceleration response. @@ -89,8 +76,14 @@ const AccelerateResponse: HttpResponse = { }; /** - * Accelerate unconfirmed transactions on UTXO-based blockchains. - * Supports Child-Pays-For-Parent (CPFP) and Replace-By-Fee (RBF) acceleration methods. + * Accelerate transaction (advanced) + * + * Send a new transaction to accelerate the targeted unconfirmed transaction either by using Child-Pays-For-Parent (CPFP) or Replace-By-Fee (RBF). + * + * Use this endpoint only with advanced wallets. For other wallet types, use [Accelerate Transaction](https://developers.bitgo.com/reference/expresswalletacceleratetx). + * + * @tag Advanced Wallets + * @operationId advancedwalletacceleratetx */ export const AccelerateRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/awmExpressHealth.ts b/src/masterBitgoExpress/routers/awmExpressHealth.ts index e2c1677..aac3198 100644 --- a/src/masterBitgoExpress/routers/awmExpressHealth.ts +++ b/src/masterBitgoExpress/routers/awmExpressHealth.ts @@ -29,7 +29,13 @@ const VersionAwmResponse: HttpResponse = { }), }; -// API Specification +/** + * Ping Check + * + * @tag Advanced Wallets + * @operationId v1.advancedwalletmanager.ping + * @private + */ export const AdvancedWalletManagerHealthSpec = apiSpec({ 'v1.advancedwalletmanager.ping': { post: httpRoute({ @@ -40,6 +46,13 @@ export const AdvancedWalletManagerHealthSpec = apiSpec({ description: 'Ping the advanced wallet manager server', }), }, + /** + * Version Check + * + * @tag Advanced Wallets + * @operationId v1.advancedwalletmanager.version + * @private + */ 'v1.advancedwalletmanager.version': { get: httpRoute({ method: 'GET', diff --git a/src/masterBitgoExpress/routers/consolidateRoute.ts b/src/masterBitgoExpress/routers/consolidateRoute.ts index 57a1873..8204309 100644 --- a/src/masterBitgoExpress/routers/consolidateRoute.ts +++ b/src/masterBitgoExpress/routers/consolidateRoute.ts @@ -35,8 +35,14 @@ export const ConsolidateResponse: HttpResponse = { }; /** - * Build, sign, and send a consolidation transaction for an account-based asset all in 1 call. - * For account-based assets, consolidating the balances in the receive addresses to the base address maximizes the spendable balance of a wallet. + * Consolidate account (advanced) + * + * 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. + * + * Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate account (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateaccount). + * + * @tag Advanced Wallets + * @operationId advancedwalletconsolidate */ export const ConsolidateRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts b/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts index 1a2b801..b749bad 100644 --- a/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts +++ b/src/masterBitgoExpress/routers/consolidateUnspentsRoute.ts @@ -74,8 +74,14 @@ export const ConsolidateUnspentsResponse: HttpResponse = { }; /** - * Build and send a transaction to consolidate unspents in a wallet. - * Consolidating unspents is only for UTXO-based assets. + * Consolidate unspents (advanced) + * + * Builds, signs, and sends a transaction to consolidate unspents all in 1 call. Consolidating unspents is only for UTXO-based assets. + * + * Use this endpoint only with advanced wallets. For other wallet types, use [Consolidate unspents (simple)](https://developers.bitgo.com/reference/expresswalletconsolidateunspents). + * + * @tag Advanced Wallets + * @operationId advancedwalletconsolidateunspents */ export const ConsolidateUnspentsRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/generateWalletRoute.ts b/src/masterBitgoExpress/routers/generateWalletRoute.ts index 9c0b032..1a9e1c2 100644 --- a/src/masterBitgoExpress/routers/generateWalletRoute.ts +++ b/src/masterBitgoExpress/routers/generateWalletRoute.ts @@ -332,13 +332,17 @@ const GenerateWalletRequest = { }; /** - * Generates a new advanced wallet. - * The wallet creation process involves several steps that happen automatically: - * 1. User Keychain Creation: Creates the user keychain in the advanced wallet manager and encrypts it with the respective KMS. - * 2. Backup Keychain Creation: Creates the backup keychain in the advanced wallet manager and encrypts it with the respective KMS. - * 3. Keychain Upload: Uploads the user/backup public keys to BitGo. - * 4. BitGo Key Creation: Creates the BitGo key on the BitGo service. - * 5. Wallet Creation: Creates the wallet on BitGo with the 3 keys. + * Generate wallet (advanced) + * + * 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. + * 4. Creates the BitGo key on the BitGo service. + * 5. Creates the wallet on BitGo with the 3 keys. + * + * @tag Advanced Wallets + * @operationId advancedwalletgenerate */ export const WalletGenerateRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/healthCheck.ts b/src/masterBitgoExpress/routers/healthCheck.ts index e146187..83d64af 100644 --- a/src/masterBitgoExpress/routers/healthCheck.ts +++ b/src/masterBitgoExpress/routers/healthCheck.ts @@ -15,7 +15,13 @@ const VersionResponse: HttpResponse = { 200: VersionResponseType, }; -// API Specification +/** + * Ping Check + * + * @tag Advanced Wallets + * @operationId v1.health.ping + * @private + */ export const HealthCheckApiSpec = apiSpec({ 'v1.health.ping': { post: httpRoute({ @@ -26,6 +32,13 @@ export const HealthCheckApiSpec = apiSpec({ description: 'Health check endpoint that returns server status', }), }, + /** + * Version Check + * + * @tag Advanced Wallets + * @operationId v1.health.version + * @private + */ 'v1.health.version': { get: httpRoute({ method: 'GET', diff --git a/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts b/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts index 751358e..0b23289 100644 --- a/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts +++ b/src/masterBitgoExpress/routers/recoveryConsolidationsRoute.ts @@ -6,7 +6,6 @@ import { ErrorResponses } from '../../shared/errors'; * Request type for wallet recovery consolidations endpoint. * Used to consolidate and recover funds from multiple addresses in a wallet, via signing with user and backup keys. * - * @endpoint POST /api/v1/{coin}/advancedwallet/recoveryconsolidations * @description Consolidates and recovers funds from multiple addresses in a wallet */ const RecoveryConsolidationsWalletRequest = { @@ -101,7 +100,6 @@ const RecoveryConsolidationsWalletRequest = { /** * Response type for the wallet recovery consolidations endpoint * - * @endpoint POST /api/v1/{coin}/advancedwallet/recoveryconsolidations * @description Returns the signed consolidation transactions */ const RecoveryConsolidationsWalletResponse: HttpResponse = { @@ -115,8 +113,16 @@ const RecoveryConsolidationsWalletResponse: HttpResponse = { }; /** - * Consolidate funds from multiple addresses in a wallet and sign with user & backup keys in a recovery situation. - * Used for both standard multisig wallets and TSS wallets to consolidate funds from various addresses. + * Consolidate and recover assets (advanced) + * + * 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). + * + * Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/). + * + * @tag Advanced Wallets + * @operationId advancedwalletconsolidaterecovery */ export const RecoveryConsolidationsRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/recoveryRoute.ts b/src/masterBitgoExpress/routers/recoveryRoute.ts index 89558f3..88b3cb3 100644 --- a/src/masterBitgoExpress/routers/recoveryRoute.ts +++ b/src/masterBitgoExpress/routers/recoveryRoute.ts @@ -189,10 +189,7 @@ export type CoinSpecificParamsUnion = | EcdsaCosmosLikeRecoverySpecificParams; /** - * Response type for the wallet recovery endpoint. - * - * @endpoint POST /api/v1/{coin}/advancedwallet/recovery - * @description Returns the signed recovery transaction that can be broadcast to the network + * Response type for the wallet recovery endpoint. Returns the signed recovery transaction that can be broadcast to the network */ const RecoveryWalletResponse: HttpResponse = { /** @@ -212,10 +209,7 @@ const RecoveryWalletResponse: HttpResponse = { /** * Request type for the wallet recovery endpoint. - * Used to recover funds from both standard multisig and TSS wallets. - * - * @endpoint POST /api/v1/{coin}/advancedwallet/recovery - * @description Recover funds from a wallet by building a transaction with user and backup keys + * Used to recover funds from both standard multisig and TSS wallets. Recover funds from an advanced wallet by building a transaction with user and backup keys. */ const RecoveryWalletRequest = { /** @@ -291,8 +285,16 @@ const RecoveryWalletRequest = { }; /** - * Recover funds from an existing wallet using user and backup keys. - * This endpoint allows for both standard multisig and TSS wallet recovery. + * Recover assets (advanced) + * + * 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). + * + * Use this endpoint only with advanced wallets. For other wallet types, use the [Wallet Recovery Wizard](https://developers.bitgo.com/docs/wallets-recover#/). + * + * @tag Advanced Wallets + * @operationId advancedwalletrecovery */ export const RecoveryRoute = httpRoute({ method: 'POST', diff --git a/src/masterBitgoExpress/routers/sendManyRoute.ts b/src/masterBitgoExpress/routers/sendManyRoute.ts index 27b5105..d6bd640 100644 --- a/src/masterBitgoExpress/routers/sendManyRoute.ts +++ b/src/masterBitgoExpress/routers/sendManyRoute.ts @@ -207,6 +207,20 @@ export const SendManyResponse: HttpResponse = { ...ErrorResponses, }; +/** + * Send to many (advanced) + * + * 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. + * + * 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 + * + * Use this endpoint only with advanced wallets. For other wallet types, use [Send to many](https://developers.bitgo.com/reference/expresswalletsendmany). + * + * @tag Advanced Wallets + * @operationId advancedwalletsendmany + */ export const SendManyRoute = httpRoute({ method: 'POST', path: '/api/v1/{coin}/advancedwallet/{walletId}/sendMany', diff --git a/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts b/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts index 1c7eb4f..227c49e 100644 --- a/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts +++ b/src/masterBitgoExpress/routers/signAndSendMpcRoute.ts @@ -19,8 +19,14 @@ export const SignMpcResponse: HttpResponse = { }; /** - * Sign a TxRequest and Broadcast it (MPC wallets only) - * This is usually needed after resolving a pending approval for a MPC wallet + * Sign and send MPC transaction (advanced) + * + * Sign and send a MPC 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 + * @operationId advancedwalletsigntxtss */ export const SignAndSendMpcRoute = httpRoute({ method: 'POST',