Appearance
@swapped/connect-sdk / react / UseCoinbaseWithdrawalResult
Type Alias: UseCoinbaseWithdrawalResult
UseCoinbaseWithdrawalResult =
object
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:18
Result of useCoinbaseWithdrawal.
Properties
cancelWithdrawal
cancelWithdrawal: () =>
void
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:46
Cancel the in-progress withdrawal flow and reset local state.
Returns
void
clear2faInvalid
clear2faInvalid: () =>
void
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:48
Clear is2faInvalid (e.g. when the user edits the code).
Returns
void
confirmWithdrawal
confirmWithdrawal: (
code) =>Promise<CoinbaseWithdrawalState>
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:44
Submit a 2FA code when requires2fa is true.
Parameters
code
string
Returns
Promise<CoinbaseWithdrawalState>
error
error:
Error|null
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:30
Last start / confirm error, or null.
is2faInvalid
is2faInvalid:
boolean
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:32
true when the last confirm returned requires2fa again (wrong code).
isConfirming
isConfirming:
boolean
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:28
Whether confirmWithdrawal is in progress.
isStartingWithdrawal
isStartingWithdrawal:
boolean
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:26
Whether startWithdrawal is in progress.
requires2fa
requires2fa:
boolean
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:24
Whether the flow is waiting for a 2FA code.
result
result:
CoinbaseWithdrawal|null
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:22
Completed / in-progress withdrawal payload, or null when none.
startWithdrawal
startWithdrawal: (
overrides?,options?) =>Promise<CoinbaseWithdrawalState>
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:39
Start a withdrawal using the current CoinbaseProvider selection. Pass a partial request to override individual fields. When the SDK auto-adjusts an above-max amount, the amount input is synced before StartCoinbaseWithdrawalOptions.onAmountAdjusted runs.
Parameters
overrides?
Partial<StartCoinbaseWithdrawalRequest>
options?
StartCoinbaseWithdrawalOptions
Returns
Promise<CoinbaseWithdrawalState>
status
status:
CoinbaseWithdrawalState["status"]
Defined in: src/react/coinbase/hooks/useCoinbaseWithdrawal/useCoinbaseWithdrawal.ts:20
Current withdrawal flow status (idle, pending, requires2fa, etc.).