token2022
solana
transfer-fee
payment-reconciliation
fee-withholding
kora
x402
svm
bigint
mcp:reconcile_token2022_transfer_fee

Token-2022 Transfer-Fee Payment Reconciler

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

post/v1/tools/reconcile_token2022_transfer_fee

Request

  • Base URL: https://ainumbers.co
  • URL: https://ainumbers.co/v1/tools/reconcile_token2022_transfer_fee
  • Auth: none declared

Request body

amountstring required

The TransferChecked amount, i.e. pre-fee, in base units. Decimal string in u64 range.

execution_epochstring required

The Clock epoch in which the transfer executes. Decimal string in u64 range.

instruction'TransferChecked' | 'TransferCheckedWithFee' required

The checked transfer instruction. Unchecked transfers are refused: they fail with MintRequiredForTransfer on a mint carrying the fee extension.

declared_feestring

TransferCheckedWithFee only: the fee the instruction states. A mismatch is recorded as FeeMismatch.

credited_amountstring required

What the payment verifier credited, in base units. Decimal string in u64 range.

verifier_epochstring

Optional: the epoch the verifier used for its fee. A different schedule pick than the execution epoch emits EPOCH_SCHEDULE_DIVERGENCE.

required_amountstring

Optional: the payee's required amount, for the informational x402 consumer view (gross-accept static path vs net-accept balance-delta path).

Response

Successful tool execution result

consumer_viewobject nullable required
credited_amountstring
credited_minus_netstring nullable required
declared_feestring nullable
detailstring
epoch_racestring nullable required
errorstring
execution_epochstring
feestring nullable required
fee_mismatchstring nullable
min_pre_fee_for_netstring nullable required
netstring nullable required
notestring
reconciliation'MATCH' | 'OVER_CREDITED' | 'null' nullable required
schedule'newer' | 'older' | 'null' nullable required
verifier_epochstring nullable
withheld_addedstring nullable required

Changes

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