Skip to content

Commit a398801

Browse files
authored
Merge pull request #8477 from BitGo/WCI-51-wallet-recover-token-v2
docs(express): wallet recover token v2
2 parents 271ebd6 + 90dd63a commit a398801

1 file changed

Lines changed: 9 additions & 24 deletions

File tree

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

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { Recipient } from './coinSignTx';
77
* Path parameters for recovering tokens from a wallet
88
*/
99
export const RecoverTokenParams = {
10-
/** Coin ticker / chain identifier */
10+
/** A cryptocurrency or token ticker symbol. */
1111
coin: t.string,
12-
/** The ID of the wallet */
12+
/** The wallet ID. */
1313
id: t.string,
1414
} as const;
1515

@@ -19,15 +19,15 @@ export const RecoverTokenParams = {
1919
* Note: When broadcast=false (default), either walletPassphrase or prv must be provided for signing.
2020
*/
2121
export const RecoverTokenBody = {
22-
/** The contract address of the unsupported token to recover (REQUIRED) */
22+
/** Contract address of the unsupported token */
2323
tokenContractAddress: t.string,
24-
/** The destination address where recovered tokens should be sent (REQUIRED) */
24+
/** Destination address recovered tokens should be sent to */
2525
recipient: t.string,
26-
/** Whether to automatically broadcast the half-signed transaction to BitGo for cosigning and broadcasting */
26+
/** Whether to send to BitGo for cosigning and broadcast the transaction. If false, a half-siged transaction will be returned. */
2727
broadcast: optional(t.boolean),
28-
/** The wallet passphrase used to decrypt the user key */
28+
/** Wallet passphrase */
2929
walletPassphrase: optional(t.string),
30-
/** The extended private key (alternative to walletPassphrase) */
30+
/** User private key */
3131
prv: optional(t.string),
3232
} as const;
3333

@@ -58,25 +58,10 @@ export const RecoverTokenResponse = t.type({
5858
});
5959

6060
/**
61-
* Recover unsupported tokens from a BitGo multisig wallet
61+
* Recover an unsupported Ethereum token from a BitGo multisig wallet
6262
*
63-
* This endpoint builds a half-signed transaction to recover unsupported tokens from an ETH wallet.
64-
* The transaction can be manually submitted to BitGo for cosigning, or automatically broadcast
65-
* by setting the 'broadcast' parameter to true.
66-
*
67-
* Requirements:
68-
* - tokenContractAddress (REQUIRED): The ERC-20 token contract address
69-
* - recipient (REQUIRED): The destination address for recovered tokens
70-
* - walletPassphrase or prv (REQUIRED when broadcast=false): For signing the transaction
71-
*
72-
* Behavior:
73-
* - When broadcast=false (default): Returns a half-signed transaction for manual submission
74-
* - When broadcast=true: Automatically sends the transaction to BitGo for cosigning and broadcasting
75-
*
76-
* Note: This endpoint is only supported for ETH family wallets.
77-
*
78-
* @tag express
7963
* @operationId express.v2.wallet.recovertoken
64+
* @tag Express
8065
*/
8166
export const PostWalletRecoverToken = httpRoute({
8267
path: '/api/v2/{coin}/wallet/{id}/recovertoken',

0 commit comments

Comments
 (0)