Wallet Auth

Create on-chain verification

Verify 1-10 on-chain conditions: token balances, NFT ownership, EAS attestations, Farcaster identity, arbitrary boolean view calls (evm_view_call), the dimensionless ratio rules (ratio_to_amount, ratio_to_supply), account code (account_code: is the wallet a plain key, an EIP-7702-delegated key, or a contract, optionally delegated to a named address), and agent standing (erc8004_agent, erc7710_delegation). Returns ECDSA-signed booleans, never raw balances or code. 1 credit standard, 2 with proof="merkle". EAS: use a compliance template or raw schemaId. Agent conditions, generally available on any API key: erc8004_agent (is this wallet a registered ERC-8004 agent — owner of or bound to agentId N in the Identity Registry on Base) and erc7710_delegation (is this signed ERC-7710 delegation from principal P to this agent wallet currently valid, and what limits does it declare). Both are Base (8453) only and cost 1 credit. erc8004_agent does not support Merkle proofs. erc7710_delegation does: proof="merkle" returns an EIP-1186 storage proof of the revocation slot (subject "delegation_revocation", 2 credits), on DelegationManagers whose storage layout has been verified on-chain — currently the v1.3.0 manager on Base. Both are also reachable with no API key at all via x402 pay-per-call: call with no credential headers, take the 402 quote, pay the quoted amount in USDC on Base, Polygon, Arbitrum, Arc, or Solana, and retry with the PAYMENT-SIGNATURE header — $0.05 at the standard per-call rate. Account code, generally available on any API key and on x402: account_code (what code sits at the wallet address itself at the anchored block: expect "none", "eip7702" or "contract", and with "eip7702" an optional delegate the designator must point at). Any EVM chain, 1 credit, answered as met only; the code and the delegation target are never returned. A trust profile reports the same two facts (contract code present, EIP-7702 delegation present) per chain in its account dimension without naming a target; this condition is where a caller asks about a named one. Attestations containing an erc7710_delegation condition expire in 5 minutes (not the standard 30) — revocation is one transaction away, so the verdict window stays tight. On a delegation, met is the verdict; declaredLimits is a separate signed decode of the caveat terms the caller submitted, each entry carrying the raw terms hex so the decode can be checked independently. Send declaredLimits: "omit" to leave that decode out of a forwarded attestation. Authentication: this endpoint accepts EITHER the X-API-Key header OR the Authorization: Wallet header (SIWE envelope from a wallet that holds the Insumer Access pass).

post/v1/attest

Request

  • Base URL: https://api.insumermodel.com
  • URL: https://api.insumermodel.com/v1/attest
  • Auth: one of:
    • API key in header X-API-Key
    • API key in header Authorization

Query parameters

proof'merkle'

Query-string alternative to the body proof field: ?proof=merkle enables proof mode on this endpoint too (body or query, either works; the body field takes precedence when both are present). This endpoint only; POST /v1/trust and POST /v1/trust/batch read proof from the body alone.

Request body

walletstring

EVM wallet address (0x...)

solanaWalletstring

Solana wallet address (base58, 32-44 chars). Required if any condition uses chainId "solana".

xrplWalletstring

XRPL wallet address (classic r-address). The base58 checksum is verified; an address that fails it returns 400 rather than a signed not-met result.

bitcoinWalletstring

Bitcoin address (P2PKH, P2SH, bech32, or Taproot). Required if any condition uses chainId "bitcoin".

tronWalletstring

Tron address (T-prefix, base58, 34 chars). Required if any condition uses chainId "tron". Tron supports TRC-20 (e.g. USDT) and native TRX via contractAddress "native".

stellarWalletstring

Stellar address (G-prefix StrKey, 56 chars; the checksum is verified). Required if any condition uses chainId "stellar". Stellar checks measure classic-account balances (trustlines + native XLM); Soroban contract-held balances are out of scope. Trustline conditions require both contractAddress (G-issuer) and assetCode.

suiWalletstring

Sui address (0x + 64 hex chars, 32-byte). Required if any condition uses chainId "sui". Coin type goes in contractAddress (e.g., "0x2::sui::SUI" for native, or "<package>::<module>::<TYPE>" for any other coin). Response envelope surfaces checkpointSequence as the temporal anchor.

proof'merkle'

Set to "merkle" to include EIP-1186 Merkle storage proofs in results. Proofs are attempted for token_balance and ratio_to_amount conditions on all 31 EVM chains (a ratio_to_amount proof proves the same ERC-20 balance slot), and returned for erc7710_delegation conditions on DelegationManagers whose storage layout has been verified on-chain (currently the v1.3.0 manager on Base). A delegation proof carries subject: "delegation_revocation" and proves the value of disabledDelegations[delegationHash] against the anchored block's state root — so "not revoked as of block N" becomes checkable rather than taken on the API's word. Where a chain cannot serve a proof, or the token's storage slot cannot be discovered (a zero ERC-20 balance whose slot is not yet known, or a non-standard storage layout), the result carries proof.available: false with a reason instead. In practice 27 of the 31 EVM chains serve proofs today; ZKsync Era (324), Sei (1329), Viction (88) and XDC Network (50) do not. Always unavailable: nft_ownership, eas_attestation, farcaster_id, ratio_to_supply, and erc8004_agent conditions; conditions on Solana, XRPL, Bitcoin, Tron, Stellar, and Sui; and delegations against a manager whose layout has not been verified (an inferred slot would yield a proof of the wrong location that still verifies against the header, which is worse than no proof). Costs 2 credits instead of 1; whenever no proof is delivered the premium is refunded and the request costs 1, whatever the reason: a read that did not complete, a chain or token that cannot carry a proof, or a condition type that has none. A condition with contractAddress "native" carries an ACCOUNT proof (subject "account_balance") instead of a storage proof. An account_code condition carries an account proof too (subject "account_code"): its codeHash field is the proven value, which a verifier compares with the hash the expected state implies (keccak256 of empty code for "none", keccak256 of 0xef0100 followed by the delegate the verifier supplies for "eip7702", anything else for "contract"); an account absent from the state trie may report codeHash as all zeros, which also means no code. Note: in proof mode the account record's fields (balance, nonce, storageHash, codeHash) reach the caller; on a token_balance condition that is the raw on-chain balance (standard mode never returns it).

format'jwt'

Set to "jwt" to include a Wallet Auth by InsumerAPI token (ES256-signed JWT) in the response. The JWT contains the attestation data as standard claims (iss, sub, jti, iat, exp) plus pass, results, conditionHash, blockNumber, and blockTimestamp. sub is the wallet a condition in the request evaluated. A wallet field that no condition reads is ignored and never named. When conditions span chain families, sub names the first evaluated family in the order EVM, Solana, XRPL, Bitcoin, Tron, Stellar, Sui; the other families' wallets are evaluated but not named by sub. format "jwt" needs at least one condition that evaluates a wallet. The exp claim matches the attestation's expiresAt: iat + 1800 (30 minutes), or iat + 300 (5 minutes) when the request contains an erc7710_delegation condition, so a JWT never outlives the attestation it carries. Verifiable by any standard JWT library using the JWKS at https://insumermodel.com/.well-known/jwks.json. No additional cost.

declaredLimits'include' | 'omit'

Controls whether decoded caveat limits ride along with erc7710_delegation results. Default (field absent, or "include"): declaredLimits are returned inside the signed results, and therefore also travel inside the portable JWT when format: "jwt" is used. Set to "omit" and the decoded limits are left out; the result carries declaredLimitsOmitted: true instead. Use "omit" when the attestation will be FORWARDED to third parties and the principal's spending ceiling should not travel with it — a delegation attestation in JWT form is portable, so by default the declared limits reach anyone it is passed to. That is usually what you want (a relying party needs the limits to act), but not always. The caller loses nothing by omitting: it submitted the caveats and already holds them. Critically, met, delegationHash, and conditionHash are byte-identical either way — a forwarded token still commits to exactly which delegation was checked, and a holder can verify a limit shown to them out-of-band without ever learning one from the token. No effect on any other condition type. No additional cost.

Example request

{
  "xrplWallet": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
  "bitcoinWallet": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
  "tronWallet": "TWdcgk9NLsxKr3z3UELq3vCgsx9wU2cFhB",
  "stellarWallet": "GB3ZDBVMNFADCPKRVDSTTPW7QQTWD7EAQQ3DCKG74MEALLWYGMPIP6M2",
  "suiWallet": "0x0000000000000000000000000000000000000000000000000000000000000005",
  "conditions": [
    {
      "expect": "eip7702",
      "delegate": "0x5a7fc11397e9a8ad41bf10bf13f22b0a63f96f6d",
      "currency": "RLUSD",
      "assetCode": "USDC",
      "schemaId": "0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9",
      "agentId": "123",
      "delegationManager": "0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3",
      "delegation": {
        "authority": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "salt": "42"
      }
    }
  ]
}

Response

Verification created

oktrue

Example response

{
  "data": {
    "attestation": {
      "id": "ATST-A7C3E1B2D4F56789",
      "results": [
        {
          "evaluatedCondition": {
            "registry": "0x8004a169fb4a3325136eb29fa0ceb6d2e539a432"
          },
          "conditionHash": "0x3a7f1b2c...",
          "totalSupply": "52448506631611846",
          "fraction": 5.93479e-10,
          "declaredLimits": [
            {
              "enforcer": "0xf100b0819427117ecf76ed94b358b1a5b5c6d2fc",
              "terms": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000000000000000003b9aca00",
              "maxAmount": "1000000000"
            }
          ],
          "blockNumber": "0x12f4a80",
          "blockTimestamp": "2026-02-26T12:34:56.000Z",
          "ledgerIndex": 102575456,
          "ledgerHash": "BB9023D447285923C36E3DF18EF0FC37A5A6A1113527FB5F6FCE3139AAD72388",
          "slot": 338472915,
          "blockHeight": 946083,
          "blockHash": "000000000000000000003c5ff410ed3c66b3cb803c2aac90b5b6600b20ba91e5",
          "proof": {
            "blockNumber": "0x12a05f200"
          }
        }
      ]
    },
    "pqKid": "insumer-attest-pq1"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.