본문으로 건너뛰기

Get wallet approvals – Earn API

업데이트됨:
Jul 31, 2026

개요

Current USDC and per-vault share-token allowances toward the Earn contract (the spender), grouped per chain. Each entry carries an approved flag and, when not approved, a ready-to-sign approve(spender, amount) template. A share token is approved when allowance > 0; USDC is approved when allowance >= requiredUsdc. Allowances and amounts are base-unit strings. Per-chain error isolation: a failed RPC marks that chain error: "rpc_error" and never fails the whole response.

Endpoint

GET https://earn-api.quicknode.dev/functions/v1/api/v1/wallets/{addr}/approvals

Authorization

Include the published apikey header. This read request is public and does not require a SIWE signature.

매개변수

매개변수위치유형Required설명
addr경로문자열Wallet address (`0x` + 40 hex).
사슬query문자열아니요CSV of supported chain ids. Defaults to all.
requiredUsdcquery문자열아니요USDC the pending deposit needs, in 6-decimal base units, evaluated against each requested chain's USDC allowance. Default 0 (report-only).
vaultsquery문자열아니요CSV of `chainId:0xaddress` vault keys to report. Each key applies only to its own chain; a requested chain with no listed vaults still returns its USDC entry. A key targeting a chain outside the requested set is a 400. Defaults to every approved vault per chain.

Example request

curl --location 'https://earn-api.quicknode.dev/functions/v1/api/v1/wallets/0x1234567890abcdef1234567890abcdef12345678/approvals' \
--header 'Accept: application/json' \
--header 'apikey: <EARN_PUBLIC_API_KEY>'

답변

분야유형Required설명
주소문자열Lowercased wallet address.
사슬array<object>Approval information grouped by chain.
chains[].chainId정수EVM chain ID for this approval group.
chains[].spenderstring | nullEarn proxy address authorized to spend the tokens, or `null` when the chain lookup fails.
chains[].usdcobject | nullUSDC allowance state for the chain, or `null` when it is unavailable.
chains[].usdc.token문자열USDC contract address on the chain.
chains[].usdc.currentAllowance문자열Current USDC allowance in base units.
chains[].usdc.requiredAllowance문자열USDC allowance required by the request, in base units.
chains[].usdc.approved부울Whether the current USDC allowance meets the required allowance.
chains[].usdc.tx객체아니요Ready-to-sign approval transaction when additional USDC allowance is required.
chains[].usdc.tx.to문자열USDC token contract that receives the approval transaction.
chains[].usdc.tx.data문자열ABI-encoded `approve(spender, amount)` calldata.
chains[].usdc.tx.value문자열Native-token value to send with the transaction, in wei.
chains[].vaultsarray<object>Allowance states for the requested or approved vault share tokens on the chain.
chains[].vaults[].token문자열Vault share-token contract address.
chains[].vaults[].vaultAddress문자열아니요Address of the vault represented by the share token.
chains[].vaults[].currentAllowance문자열Current vault share-token allowance in base units.
chains[].vaults[].requiredAllowance문자열Required vault share-token allowance in base units.
chains[].vaults[].approved부울Whether the vault share token has a non-zero allowance.
chains[].vaults[].tx객체아니요Ready-to-sign approval transaction when the vault share token is not approved.
chains[].vaults[].tx.to문자열Token contract that receives the approval transaction.
chains[].vaults[].tx.data문자열ABI-encoded `approve(spender, amount)` calldata.
chains[].vaults[].tx.value문자열Native-token value to send with the transaction, in wei.
chains[].errorstring | null`rpc_error` when the chain lookup fails; otherwise `null`.

Example response

The complete response includes every requested chain and its vault entries. This excerpt shows the Base USDC approval state and one vault approval returned by the API.

{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"chains": [
{
"chainId": 8453,
"spender": "0x48b415841165304f7EfaA7D5dD5FC65cc7B4bd8e",
"usdc": {
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"currentAllowance": "0",
"requiredAllowance": "0",
"approved": true
},
"vaults": [
{
"token": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"vaultAddress": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"currentAllowance": "0",
"requiredAllowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
"approved": false,
"tx": {
"to": "0xc0c5689e6f4D256E861F65465b691aeEcC0dEb12",
"data": "0x095ea7b300000000000000000000000048b415841165304f7efaa7d5dd5fc65cc7b4bd8effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"value": "0"
}
}
],
"error": null
}
]
}

HTTP responses

상태설명
200Approval state and templates, grouped per chain.
400Invalid wallet address, chain ID, required allowance, or vault key.
429Rate limit exceeded. `Retry-After` (seconds) tells you when to retry. Reads, feedback, and push writes are keyed per IP; create/update/delete are keyed per wallet+IP; deposit/withdraw/claim calldata is keyed per strategy+IP.
500Internal server error.
OpenAPI source

This page is based on operation getWalletApprovals in the Earn OpenAPI 3.1 specification.