import { z } from 'zod'; import { AxiosInstance } from 'axios'; export interface CryptoWithdrawal { amount: string; currency: string; id: string; } export interface PaymentMethodWithdrawal extends CryptoWithdrawal { payout_at: string; } export interface CryptoWithdrawalRequest { add_network_fee_to_total?: boolean; amount: string; crypto_address: string; currency: string; destination_tag?: string; no_destination_tag?: boolean; } export interface CoinbaseAccountWithdrawalRequest { amount: string; coinbase_account_id: string; currency: string; } export interface PaymentMethodWithdrawalRequest { amount: string; currency: string; payment_method_id: string; } export interface WithdrawalFeeEstimate { fee: string; } export declare const PaymentMethodLimitSchema: z.ZodObject<{ period_in_days: z.ZodNumber; remaining: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; total: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; }, "strip", z.ZodTypeAny, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }>; export type PaymentMethodLimit = z.infer; export declare const PaymentMethodSchema: z.ZodObject<{ allow_buy: z.ZodBoolean; allow_deposit: z.ZodBoolean; allow_sell: z.ZodBoolean; allow_withdraw: z.ZodBoolean; created_at: z.ZodUnion<[z.ZodNullable, z.ZodUndefined]>; currency: z.ZodUnion<[z.ZodNullable, z.ZodUndefined]>; fiat_account: z.ZodOptional>; id: z.ZodString; limits: z.ZodUnion<[z.ZodObject<{ buy: z.ZodOptional; total: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; }, "strip", z.ZodTypeAny, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }>, "many">>; deposit: z.ZodOptional; total: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; }, "strip", z.ZodTypeAny, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }>, "many">>; instant_buy: z.ZodOptional; total: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; }, "strip", z.ZodTypeAny, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }>, "many">>; sell: z.ZodOptional; total: z.ZodObject<{ amount: z.ZodString; currency: z.ZodString; }, "strip", z.ZodTypeAny, { currency: string; amount: string; }, { currency: string; amount: string; }>; }, "strip", z.ZodTypeAny, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }, { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }>, "many">>; }, "strip", z.ZodTypeAny, { buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; sell?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; deposit?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; instant_buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; }, { buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; sell?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; deposit?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; instant_buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; }>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>; name: z.ZodString; primary_buy: z.ZodBoolean; primary_sell: z.ZodBoolean; resource: z.ZodUnion<[z.ZodNullable, z.ZodUndefined]>; resource_path: z.ZodUnion<[z.ZodNullable, z.ZodUndefined]>; type: z.ZodString; updated_at: z.ZodUnion<[z.ZodNullable, z.ZodUndefined]>; }, "strip", z.ZodTypeAny, { name: string; type: string; id: string; allow_buy: boolean; allow_deposit: boolean; allow_sell: boolean; allow_withdraw: boolean; limits: { buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; sell?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; deposit?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; instant_buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; } | {}; primary_buy: boolean; primary_sell: boolean; currency?: string | null | undefined; created_at?: string | null | undefined; resource?: string | null | undefined; fiat_account?: { id: string; resource: string; } | undefined; resource_path?: string | null | undefined; updated_at?: string | null | undefined; }, { name: string; type: string; id: string; allow_buy: boolean; allow_deposit: boolean; allow_sell: boolean; allow_withdraw: boolean; limits: { buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; sell?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; deposit?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; instant_buy?: { total: { currency: string; amount: string; }; period_in_days: number; remaining: { currency: string; amount: string; }; }[] | undefined; } | {}; primary_buy: boolean; primary_sell: boolean; currency?: string | null | undefined; created_at?: string | null | undefined; resource?: string | null | undefined; fiat_account?: { id: string; resource: string; } | undefined; resource_path?: string | null | undefined; updated_at?: string | null | undefined; }>; export type PaymentMethod = z.infer; export declare class WithdrawAPI { private readonly apiClient; static readonly URL: { LIST_PAYMENT_METHODS: string; WITHDRAWALS: { COINBASE_ACCOUNT: string; CRYPTO: string; FEE_ESTIMATE: string; PAYMENT_METHOD: string; }; }; constructor(apiClient: AxiosInstance); /** * Withdraws funds to a crypto address. * * @param amount - The amount to withdraw * @param currency - The type of currency * @param cryptoAddress - A crypto address of the recipient * @param destinationTag - A destination tag for currencies that support one * @param addNetworkFeeToTotal - A boolean flag to add the network fee on top of the amount. * If this is blank, it will default to deducting the network fee from the amount. * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcrypto */ withdrawToCryptoAddress(amount: string, currency: string, cryptoAddress: string, destinationTag?: string, addNetworkFeeToTotal?: boolean): Promise; /** * Withdraw funds to a Coinbase account. You can move funds between your Coinbase accounts and your Coinbase Pro * trading accounts within your daily limits. * * @param amount - The amount to withdraw * @param currency - The type of currency * @param coinbaseAccountId - ID of the Coinbase or Coinbase Pro account * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount */ withdrawToCoinbaseAccount(amount: string, currency: string, coinbaseAccountId: string): Promise; /** * Withdraw funds to a payment method. * * @param amount - The amount to withdraw * @param currency - The type of currency * @param paymentMethodId - ID of the payment method * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod */ withdrawToPaymentMethod(amount: string, currency: string, paymentMethodId: string): Promise; /** * Get the network fee estimate when sending to the given address. * * @param currency - The type of currency * @param cryptoAddress - A crypto address of the recipient * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getwithdrawfeeestimate */ getFeeEstimate(currency: string, cryptoAddress: string): Promise; /** * Get a list of your payment methods. * * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getpaymentmethods */ getPaymentMethods(): Promise; }