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 sendTransaction → waitForTransactionReceipt model:
- Call
sendDepositto send, confirm, and register the deposit. - Read
result.registration.id. - Call
waitForDepositCreditwhen your UI needs to wait until the funds are investable.
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 withlogDeposit 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.