Skip to content

Commit e35d0ae

Browse files
Merge pull request #8529 from BitGo/WCI-181
docs(express): consildate account v2
2 parents 8fca91b + 28f550c commit e35d0ae

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

modules/express/src/typedRoutes/api/v2/consolidateAccount.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { BitgoExpressError } from '../../schemas/error';
66
* Path parameters for consolidate account endpoint
77
*/
88
export const ConsolidateAccountParams = {
9-
/** Coin identifier (e.g., 'algo', 'sol', 'xtz') */
9+
/** A cryptocurrency or token ticker symbol */
1010
coin: t.string,
11-
/** Wallet ID */
11+
/** The wallet ID */
1212
id: t.string,
1313
} as const;
1414

@@ -19,10 +19,10 @@ export const ConsolidateAccountParams = {
1919
* - WalletSignTransactionOptions (iWallet.ts lines 265-289)
2020
*/
2121
export const ConsolidateAccountRequestBody = {
22-
/** On-chain receive addresses to consolidate from (BuildConsolidationTransactionOptions) */
22+
/** Optional: restrict the consolidation to the specified receive addresses. If not provided, will consolidate the funds from all receive addresses up to 500 addresses */
2323
consolidateAddresses: optional(t.array(t.string)),
2424

25-
/** Wallet passphrase to decrypt the user key */
25+
/** Passphrase to decrypt the user key on the wallet. Required if External Signer is not used to sign the transactions */
2626
walletPassphrase: optional(t.string),
2727
/** Extended private key (alternative to walletPassphrase) */
2828
xprv: optional(t.string),
@@ -149,7 +149,7 @@ export const ConsolidateAccountRequestBody = {
149149
isTss: optional(t.boolean),
150150
/** Custodian transaction ID */
151151
custodianTransactionId: optional(t.string),
152-
/** API version ('lite' or 'full') */
152+
/** The Trasaction Request API version to use for MPC EdDSA Hot Wallets. Defaults based on the wallet type and asset curve */
153153
apiVersion: optional(t.union([t.literal('lite'), t.literal('full')])),
154154
/** If false, sweep all funds including minimums */
155155
keepAlive: optional(t.boolean),
@@ -216,7 +216,7 @@ export const ConsolidateAccountRequestBody = {
216216
/** If true, marks as test transaction */
217217
isTestTransaction: optional(t.boolean),
218218

219-
/** Private key for signing (from WalletSignBaseOptions) */
219+
/** The un-encrypted user private key in string form. If the key is a JSON object it must be stringified. Required if `walletPassphrase` is not available or encrypted private key is not stored by BitGo */
220220
prv: optional(t.string),
221221
/** Array of public keys */
222222
pubs: optional(t.array(t.string)),
@@ -251,18 +251,10 @@ export const ConsolidateAccountResponse = t.type({
251251
export const ConsolidateAccountErrorResponse = t.intersection([ConsolidateAccountResponse, BitgoExpressError]);
252252

253253
/**
254-
* Consolidate Account Balances
255-
*
256-
* This endpoint consolidates account balances by moving funds from receive addresses
257-
* to the root wallet address. This is useful for account-based coins where balances
258-
* are spread across multiple addresses and need to be consolidated for spending.
259-
*
260-
* Supported coins: Algorand (algo), Solana (sol), Tezos (xtz), Tron (trx), Stellar (xlm), etc.
261-
*
262-
* The API may return partial success (status 202) if some consolidations succeed but others fail.
254+
* 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.
263255
*
264256
* @operationId express.v2.wallet.consolidateaccount
265-
* @tag express
257+
* @tag Express
266258
*/
267259
export const PostConsolidateAccount = httpRoute({
268260
path: '/api/v2/{coin}/wallet/{id}/consolidateAccount',

0 commit comments

Comments
 (0)