Docs/API/extractPayment

extractPayment

functionAudit & helpers

Pull the amount + recipients out of a governed transfer’s normalised params.

signature
extractPayment(method: string, normalised: any): PaymentIntent | null

Returns null for non-governed tools. Otherwise sums the positive credits (ignoring the sender debit) into `{ amount, currency, recipients }`.

Parameters

NameTypeDescription
methodreqstringThe tool name (must be a GOVERNED_TRANSFER_TOOL).
normalisedreqanyThe kit’s normalised params (`{ hbarTransfers: [...] }`).

Returns

PaymentIntent | null

`{ amount, currency, recipients }` or null.

VERIFIABLE SPEND-CONTROL   ·   ENFORCED ON-CHAIN   ·   AGENTS CAN PAY — NOW THEY CAN’T OVERSPEND   ·   CURB × HEDERA   ·   VERIFIABLE SPEND-CONTROL   ·   ENFORCED ON-CHAIN   ·   AGENTS CAN PAY — NOW THEY CAN’T OVERSPEND   ·   CURB × HEDERA   ·