Get your API key at hackathon-apikey.vercel.app.
unlink client (set via createUnlink(), see Quickstart). Lazily registers the account on first call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | ERC-20 token address |
amount | string | Yes | Amount in wei |
deadline | number | No | Permit2 deadline (unix seconds). Defaults to 1 hour from now. |
nonce | string | No | Override Permit2 nonce (auto-managed by default) |
evm | UnlinkEvmProvider | No | Override the EVM provider for this call |
{ txId: string; status: string }
Approvals
Before the first deposit of a given token, the token must be approved for Permit2 on-chain. The SDK provides helpers:Approval methods require an EVM provider with
getErc20Allowance. ensureErc20Approval also requires sendTransaction.