AINumbers.co Token2022 API

The token2022 API from AINumbers.co — 2 operation(s) for token2022.

Operations 2

POST /v1/tools/reconcile_token2022_transfer_fee Token-2022 Transfer-Fee Payment Reconciler #
POST /v1/tools/reconcile_token2022_withheld Token-2022 Withheld-Fee Reconciler #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ainumbers-co:ainumbers-co-token2022-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ainumbers-co-token2022-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AINumbers.co Fintech Intelligence Suite Token2022 API
  version: 1.0.0
  description: '**1255 fintech intelligence tools** covering ISO 20022, A2A payments, CFPB §1033, EU AI Act, DORA, MiCA, AML/KYC, BaaS, DLT/tokenization, ESG/climate finance, agentic payments (AP2, ACP, x402, Visa TAP, Mastercard Agent Pay), PQC migration, sanctions screening, and OpenChainGraph v0.4 computation chains.


    ## Transport


    > **The live transport is MCP JSON-RPC 2.0 at `https://mcp.ainumbers.co/mcp` — not REST.**

    >

    > This OpenAPI file is a **descriptive data-room artifact** — a machine-readable index of all tools and their input/output schemas. The REST paths (`POST /v1/tools/{name}`) described here are a projection; they become functional only if the optional REST shim (Area 2 Path B) is deployed.

    >

    > To call tools today, connect via the official MCP client SDKs. TypeScript: `@modelcontextprotocol/sdk`. Python: `mcp`.


    ## Architecture


    All tools run **entirely client-side** (browser JavaScript). Zero PII. Zero server calls after page load. Deterministic, reproducible outputs. Licensed CC BY 4.0.


    OpenChainGraph v0.4 compute-binding nodes additionally run **server-side on the MCP Worker** and emit verifiable artifacts with `execution_hash` (WebCrypto SHA-256 over RFC 8785 canonical JSON).'
  contact:
    name: Post Oak Labs
    url: https://postoaklabs.com
    email: tim@postoaklabs.com
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://ainumbers.co
  description: Static browser-based tool host (DreamHost). Tools run client-side — no REST gateway is active on this origin. See x-mcp for the live MCP endpoint.
tags:
- name: token2022
paths:
  /v1/tools/reconcile_token2022_transfer_fee:
    post:
      operationId: reconcile_token2022_transfer_fee
      summary: Token-2022 Transfer-Fee Payment Reconciler
      description: 'Recomputes the transfer fee a Token-2022 mint with the transfer-fee extension withholds and the net amount the recipient receives, given the fee schedule, the TransferChecked amount, the execution epoch and the amount a payment verifier credited, then reconciles the credited amount against that net: MATCH, OVER_CREDITED (the Kora GHSA-725g defect class, a verifier crediting the pre-fee amount) or UNDER_CREDITED, with credited_minus_net reported. All amounts are decimal strings computed in BigInt (128-bit intermediates, no floats). The output also records a declared-fee FeeMismatch for TransferCheckedWithFee, an epoch-schedule divergence when the verifier used a different schedule than the execution epoch, and an informational consumer view showing where the x402 SVM gross-amount path and the balance-delta net path disagree.


        **Tool URL:** https://ainumbers.co/chaingraph/art-715-token2022-transfer-fee-reconciler.html

        **AP2/Policy Mandate export:** yes'
      tags:
      - token2022
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - older_transfer_fee
              - newer_transfer_fee
              - amount
              - execution_epoch
              - instruction
              - credited_amount
              properties:
                older_transfer_fee:
                  type: object
                  description: 'Schedule used before the switch epoch: { epoch, maximum_fee, transfer_fee_basis_points }, all decimal strings (u64; basis points u16).'
                  properties:
                    epoch:
                      type: string
                    maximum_fee:
                      type: string
                    transfer_fee_basis_points:
                      type: string
                newer_transfer_fee:
                  type: object
                  description: 'Schedule used from its epoch on: { epoch, maximum_fee, transfer_fee_basis_points }, all decimal strings. Applies when execution_epoch >= this epoch.'
                  properties:
                    epoch:
                      type: string
                    maximum_fee:
                      type: string
                    transfer_fee_basis_points:
                      type: string
                amount:
                  type: string
                  description: The TransferChecked amount, i.e. pre-fee, in base units. Decimal string in u64 range.
                execution_epoch:
                  type: string
                  description: The Clock epoch in which the transfer executes. Decimal string in u64 range.
                instruction:
                  type: string
                  enum:
                  - TransferChecked
                  - TransferCheckedWithFee
                  description: 'The checked transfer instruction. Unchecked transfers are refused: they fail with MintRequiredForTransfer on a mint carrying the fee extension.'
                declared_fee:
                  type: string
                  description: 'TransferCheckedWithFee only: the fee the instruction states. A mismatch is recorded as FeeMismatch.'
                credited_amount:
                  type: string
                  description: What the payment verifier credited, in base units. Decimal string in u64 range.
                verifier_epoch:
                  type: string
                  description: 'Optional: the epoch the verifier used for its fee. A different schedule pick than the execution epoch emits EPOCH_SCHEDULE_DIVERGENCE.'
                required_amount:
                  type: string
                  description: 'Optional: the payee''s required amount, for the informational x402 consumer view (gross-accept static path vs net-accept balance-delta path).'
      responses:
        '200':
          description: Successful tool execution result
          content:
            application/json:
              schema:
                type: object
                properties:
                  consumer_view:
                    type:
                    - 'null'
                    - object
                  credited_amount:
                    type: string
                  credited_minus_net:
                    type:
                    - string
                    - 'null'
                  declared_fee:
                    type:
                    - 'null'
                    - string
                  detail:
                    type: string
                  domain_errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        text:
                          type: string
                      required:
                      - code
                      - text
                      additionalProperties: false
                  epoch_race:
                    type:
                    - 'null'
                    - string
                  error:
                    type: string
                  execution_epoch:
                    type: string
                  fee:
                    type:
                    - string
                    - 'null'
                  fee_mismatch:
                    type:
                    - 'null'
                    - string
                  min_pre_fee_for_net:
                    type:
                    - string
                    - 'null'
                  net:
                    type:
                    - string
                    - 'null'
                  note:
                    type: string
                  reconciliation:
                    type:
                    - string
                    - 'null'
                    enum:
                    - MATCH
                    - OVER_CREDITED
                    - null
                  schedule:
                    type:
                    - string
                    - 'null'
                    enum:
                    - newer
                    - older
                    - null
                  verifier_epoch:
                    type:
                    - 'null'
                    - string
                  withheld_added:
                    type:
                    - string
                    - 'null'
                required:
                - consumer_view
                - credited_minus_net
                - epoch_race
                - fee
                - min_pre_fee_for_net
                - net
                - reconciliation
                - schedule
                - withheld_added
                additionalProperties: false
                x-derived-from: fixture
      x-mcp-tool-name: reconcile_token2022_transfer_fee
      x-tool-url: https://ainumbers.co/chaingraph/art-715-token2022-transfer-fee-reconciler.html
      x-source: manifest
      x-ap2-export: true
  /v1/tools/reconcile_token2022_withheld:
    post:
      operationId: reconcile_token2022_withheld
      summary: Token-2022 Withheld-Fee Reconciler
      description: 'Token-2022 withheld-fee reconciliation across token accounts. Paste the mint''s declared TransferFeeConfig fields (accumulated withheld_amount and withdraw_withheld_authority), a list of token accounts each carrying its withheld amount, the caller''s declared total, and optionally a harvest or withdraw destination. The node recomputes the per-account withheld sum over mint-matching accounts, reconciles it against the declared total with the signed difference, projects the mint''s post-harvest accumulation under the program''s checked_add semantics (Overflow past u64 reported as a fact, never wrapped), flags wrong-mint accounts and duplicate addresses, and checks fee-receiver placement: the declared destination''s mint against the declared mint, and the declared withdraw authority against the config''s. Values only, facts only, nothing on-chain is read.


        **Tool URL:** https://ainumbers.co/chaingraph/art-778-token2022-withheld-fee-reconciler.html

        **AP2/Policy Mandate export:** yes'
      tags:
      - token2022
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - mint
              - transfer_fee_config
              - accounts
              - declared_total
              properties:
                mint:
                  type: string
                  description: The declared mint address, pasted. Every account's mint is compared to this by string equality.
                transfer_fee_config:
                  type: object
                  description: 'The mint''s TransferFeeConfig fields: withdraw_withheld_authority (string or null) and withheld_amount (u64 decimal string), the accumulated pot.'
                  properties:
                    withdraw_withheld_authority:
                      type:
                      - string
                      - 'null'
                    withheld_amount:
                      type: string
                  required:
                  - withdraw_withheld_authority
                  - withheld_amount
                accounts:
                  type: array
                  description: Token accounts, each { address, mint, withheld_amount } with withheld_amount a u64 decimal string. Empty array is valid (sum 0).
                  items:
                    type: object
                    properties:
                      address:
                        type: string
                      mint:
                        type: string
                      withheld_amount:
                        type: string
                    required:
                    - address
                    - mint
                    - withheld_amount
                declared_total:
                  type: string
                  description: The caller's declared sum of withheld fees, decimal string (u64), reconciled against the recomputed sum.
                destination:
                  type: object
                  description: Optional destination { address, mint, withdraw_authority }, compared with the declared mint and the config's withdraw authority.
                  properties:
                    address:
                      type: string
                    mint:
                      type: string
                    withdraw_authority:
                      type: string
                  required:
                  - address
                  - mint
                  - withdraw_authority
      responses:
        '200':
          description: Successful tool execution result
          content:
            application/json:
              schema:
                type: object
                properties:
                  mint:
                    type:
                    - string
                    - 'null'
                  account_count:
                    type:
                    - string
                    - 'null'
                  harvestable_account_count:
                    type:
                    - string
                    - 'null'
                  wrong_mint_account_count:
                    type:
                    - string
                    - 'null'
                  duplicate_address_count:
                    type:
                    - string
                    - 'null'
                  mint_withheld_accumulated:
                    type:
                    - string
                    - 'null'
                  recomputed_account_sum:
                    type:
                    - string
                    - 'null'
                  declared_total:
                    type:
                    - string
                    - 'null'
                  reconciliation:
                    type:
                    - string
                    - 'null'
                    description: MATCH | DECLARED_ABOVE_RECOMPUTED | DECLARED_BELOW_RECOMPUTED
                  declared_minus_recomputed:
                    type:
                    - string
                    - 'null'
                    description: 'Signed decimal string: 0, +N or -N.'
                  sum_over_all_declared_entries:
                    type:
                    - string
                    - 'null'
                  sum_exceeds_u64:
                    type:
                    - boolean
                    - 'null'
                  post_harvest_mint_withheld:
                    type:
                    - string
                    - 'null'
                  post_harvest_would_overflow_u64:
                    type:
                    - boolean
                    - 'null'
                  wrong_mint_accounts:
                    type:
                    - array
                    - 'null'
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                        declared_mint:
                          type: string
                        account_mint:
                          type: string
                  duplicate_addresses:
                    type:
                    - array
                    - 'null'
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                        declared_count:
                          type: integer
                  fee_receiver_placement:
                    type:
                    - object
                    - 'null'
                    properties:
                      declared_destination_address:
                        type: string
                      declared_destination_mint:
                        type: string
                      declared_mint:
                        type: string
                      destination_mint_matches_declared_mint:
                        type: boolean
                      declared_withdraw_authority:
                        type: string
                      config_withdraw_withheld_authority:
                        type:
                        - string
                        - 'null'
                      declared_withdraw_authority_matches_config:
                        type: boolean
                      authority_basis:
                        type: string
                  error:
                    type: string
                  detail:
                    type: string
                  domain_errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        text:
                          type: string
                      required:
                      - code
                      - text
                      additionalProperties: false
                  note:
                    type: string
      x-mcp-tool-name: reconcile_token2022_withheld
      x-tool-url: https://ainumbers.co/chaingraph/art-778-token2022-withheld-fee-reconciler.html
      x-source: manifest
      x-ap2-export: true
x-mcp:
  transport: MCP JSON-RPC 2.0 (streamable HTTP)
  endpoint: https://mcp.ainumbers.co/mcp
  protocol_version: '2025-11-25'
  authentication: none
  registry: co.ainumbers/tools (official MCP registry)
  note: Connect any MCP-compatible client (Claude, ChatGPT, custom agent) directly to this endpoint. The REST paths in this file are descriptive only — they do not exist on the live server unless the REST shim is deployed.