diff --git a/modules/express/src/typedRoutes/api/v2/shareWallet.ts b/modules/express/src/typedRoutes/api/v2/shareWallet.ts index 9211330bf7..eee1f9b329 100644 --- a/modules/express/src/typedRoutes/api/v2/shareWallet.ts +++ b/modules/express/src/typedRoutes/api/v2/shareWallet.ts @@ -7,9 +7,9 @@ import { ShareState, ShareWalletKeychain } from '../../schemas/wallet'; * Path parameters for sharing a wallet */ export const ShareWalletParams = { - /** Coin ticker / chain identifier */ + /** A cryptocurrency or token ticker symbol. */ coin: t.string, - /** Wallet ID */ + /** The wallet ID. */ id: t.string, } as const; @@ -17,19 +17,28 @@ export const ShareWalletParams = { * Request body for sharing a wallet */ export const ShareWalletBody = { - /** Recipient email address */ + /** Email address of the user being invited. */ email: t.string, - /** Permissions string, e.g., "view,spend" */ + /** + * Comma-separated list of privileges for a wallet. Includes: + * - `admin` - Can manage wallet policies and users and approve or reject pending approvals. + * - `freeze` - Can freeze a wallet, disabling all withdrawals. + * - `spend` - Can initiate withdrawals and generate new receive addresses. + * - `trade` - Can initiate trades from a Go Account (`trading` wallet type). + * - `view` - Can view balances and transactions. + * + * Permissions don't overlap. Required parameter if 'reshare' is false. + */ permissions: t.string, - /** Wallet passphrase used to derive shared key when needed */ + /** Wallet passphrase of the user sharing the wallet. */ walletPassphrase: optional(t.string), - /** Optional message to include with the share */ + /** User readable message to display to the share recipient. */ message: optional(t.string), - /** If true, allows sharing without a keychain */ + /** Flag for reinviting a user to the wallet. This is required if the invitee has already been invited to the wallet, but has changed their password and needs a new invite. */ reshare: optional(t.boolean), - /** If true, skips sharing the wallet keychain with the recipient */ + /** If true, skips using a shared key (for when the wallet is shared without spend permission). */ skipKeychain: optional(t.boolean), - /** If true, suppresses email notification to the recipient */ + /** Flag for disabling invite notification email. */ disableEmail: optional(t.boolean), } as const; @@ -73,10 +82,10 @@ export const ShareWalletResponse = { } as const; /** - * Share this wallet with another BitGo user. + * Share wallet with an existing BitGo user * * @operationId express.v2.wallet.share - * @tag express + * @tag Express */ export const PostShareWallet = httpRoute({ path: '/api/v2/{coin}/wallet/{id}/share',