diff --git a/package.json b/package.json index 09d3a43..8b957f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@blindpay/cli", "type": "module", - "version": "0.6.0", + "version": "0.7.0", "description": "Blindpay CLI - manage receivers, bank accounts, payouts, payins, and more from the terminal", "license": "MIT", "author": "Blindpay (https://blindpay.com/)", diff --git a/src/commands/resources.ts b/src/commands/resources.ts index b3da819..2326963 100644 --- a/src/commands/resources.ts +++ b/src/commands/resources.ts @@ -515,16 +515,18 @@ export async function createQuote(options: { network?: string token?: string amount?: string + refundWalletAddress?: string json: boolean }) { try { const ctx = resolveContext() - const body = { + const body: Record = { bank_account_id: options.bankAccountId, network: options.network || 'base', token: options.token || 'USDC', request_amount: parseAmount(options.amount, 1000, options.json), } + if (options.refundWalletAddress !== undefined) body.refund_wallet_address = options.refundWalletAddress const quote = await apiPost<{ id: string, sender_amount: number, receiver_amount: number, token?: string, currency?: string }>(ctx, `${instancePath(ctx)}/quotes`, body) const token = quote.token ?? 'USDC' const currency = (quote as any).currency ?? 'USD' diff --git a/src/commands/schema.ts b/src/commands/schema.ts index 866be91..8cd4608 100644 --- a/src/commands/schema.ts +++ b/src/commands/schema.ts @@ -96,6 +96,7 @@ const schemas: ResourceSchema[] = [ { name: 'network', type: 'string', required: false, description: 'Blockchain network', default: 'base' }, { name: 'token', type: 'string', required: false, description: 'Stablecoin token', default: 'USDC', enum: ['USDC', 'USDT', 'USDB'] }, { name: 'amount', type: 'number', required: false, description: 'Amount in cents', default: '1000' }, + { name: 'refund_wallet_address', type: 'string', required: false, description: 'Refund Wallet Address (added by api-sync)' }, ], }, }, diff --git a/src/index.ts b/src/index.ts index b2f3381..ff82b0f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -358,6 +358,7 @@ quotes .option('--network ', 'Blockchain network', 'base') .option('--token ', 'Token (USDC, USDT, USDB)', 'USDC') .option('--amount ', 'Amount in cents', '1000') + .option('--refund-wallet-address ', 'Refund Wallet Address (added by api-sync)') .option('--json', 'Output as JSON', false) .action(opts => createQuote(opts))