Skip to content

API ReferenceValidationVariable

depositToVaultRules

const depositToVaultRules: ValidationRule<DepositToVaultParams>[];

Validation rules for the depositToVault operation.

  • tokenAmounts: sync address + amount format, async wallet balance per normalized token total
  • toAccount / collateralizableToApprove: optional address format plus the signer/destination compatibility constraint

ERC-20 approval is intentionally NOT checked here. The workflow builder auto-handles approval (adding an approve transaction step as needed), so surfacing an approval error in form validation would block submission for a condition the workflow resolves automatically.

Array fields (tokenAmounts) are validated inline since shared factories expect scalar field names.