Skip to main content
When the deposit token supports permit, you can replace the approval + deposit sequence with a signature and a single depositWithPermit call.

Helper Sequence

  • prepareDepositPermitSignature returns { domain, types, message, primaryType } for typed-data signing.
  • prepareDepositWithPermitTxData returns { abi, address, functionName: 'depositWithPermit', args, chainId }.
  • Supply the raw hex signature; the helper parses (v, r, s) internally.

React with Privy

React with wagmi

React with viem

Both helpers throw APIError with an endpoint field when the vault, token, or chain is unsupported—surface that metadata so users can fall back to the Approve & Deposit flow.***