Skip to content

API ReferenceVaults, collateral, and riskType Alias

WithdrawFromVaultParams

type WithdrawFromVaultParams = object;

Properties

collateralContractAddress?

optional collateralContractAddress?: Address;

Explicit compatible vault; defaults to the profile’s current vault.


toAccount?

optional toAccount?: Address;

Wallet address that receives the tokens (net of the withdrawal fee). Defaults to the transaction sender. Explicit undefined is equivalent to omission.


tokenAddress

tokenAddress: Address;

Collateral token to withdraw. Only the account’s available balance for this token can be withdrawn; reserved collateral stays locked until its LOC releases it.


withdrawalAmount?

optional withdrawalAmount?: bigint;

Amount to debit from the account’s available balance, in the token’s smallest unit; must not exceed CollateralBalance.available, and the vault deducts its withdrawal fee (getVaultWithdrawalFeeBasisPoints) before transferring, so the recipient receives less than this. Omit to withdraw the full available balance; an explicit 0n reverts on-chain. Explicit undefined is equivalent to omission.