Skip to main content
Start a deposit from the connected EOA to its Zyfai Smart Wallet. This is the recommended deposit API. sendDeposit confirms the ERC-20 transfer and registers its custody-credit lifecycle. It does not wait for the backend handover to finish. That split matches the familiar sendTransactionwaitForTransactionReceipt model:
  1. Call sendDeposit to send, confirm, and register the deposit.
  2. Read result.registration.id.
  3. Call waitForDepositCredit when your UI needs to wait until the funds are investable.
On the first deposit, Zyfai assigns the user’s EOA a pre-deployed Safe with a signed session key. No separate deploy or session-key API is needed.

Signature

Example

sendDeposit may already return credited. Passing that lifecycle ID to waitForDepositCredit is safe; the helper returns immediately when credit is complete.

Lifecycle states

Use getDepositStatus for a one-off UI refresh. Do not show a pending deposit as yield-bearing until it is credited and balanceCredited is true.

Custom and sponsored wallets

For Privy, Biconomy, mobile, or other app-managed wallets, use the external deposit building blocks: prepare the first deposit, build and submit the transfer, confirm it, then register it with logDeposit and await credit.

Compatibility

depositFunds remains available for existing integrations. It is a convenience wrapper around sendDeposit plus a short normal credit wait. New integrations should own the completion UX explicitly with sendDeposit and waitForDepositCredit.