Interface: DecodedTransfer
Defined in: packages/x402-core/src/verify/prepared-tx.ts:37
The transfer a prepared transaction authorizes, decoded out of the opaque preparedTransaction blob. Checked against the requirements by the verifier.
Properties
amount
amount: string;Defined in: packages/x402-core/src/verify/prepared-tx.ts:43
On-ledger Decimal. Equals requirements.amount once converted from atomic units.
consequences?
consequences?: readonly object[];Defined in: packages/x402-core/src/verify/prepared-tx.ts:135
Every OTHER exercise in the transaction — the consequences the transfer's own choice produced, in the order the tree lists them.
What a transfer does is not said by its arguments alone. The same signed TransferFactory_Transfer either delivers to the receiver in one step or creates a pending instruction the payer can later withdraw, and which of those happened is visible only here. A caller reading this decides; the decoder names no choice, so a registry's own delivery choice needs no change down here.
Excludes the root transfer itself, and anything under a rollback — a rolled-back consequence happened to nobody.
Absent when the transfer produced none, as the other optional members are. A reader treats absent and empty alike: either way nothing was delivered that this can see.
creates?
creates?: readonly object[];Defined in: packages/x402-core/src/verify/prepared-tx.ts:195
Every CREATE the transaction makes, in the order the tree lists them.
The consequences say which choices ran; these say what they left behind. The money a transfer moves lands in creates — on Canton Coin, one Amulet for the merchant and one for the payer's change — so a reader that sees only exercises never sees the payment itself.
They matter because a contract the SENDER signs carries the sender's authority into whatever choices it offers. The reference implementation reports measuring this: a create signed by the sender alone, bolted onto the captured Canton Coin and USDCx payments, passed every other check.
Excludes anything under a rollback, as consequences does.
executeBeforeMicros?
executeBeforeMicros?: bigint;Defined in: packages/x402-core/src/verify/prepared-tx.ts:52
executeBefore as Daml Time — microseconds since the epoch. The transfer is unexecutable after it, so Rule 10 refuses one that is not still ahead of now by a margin. Microseconds, not milliseconds, and bigint because the value is a 64-bit integer the wire carries exactly.
exercisedContract?
exercisedContract?: object;Defined in: packages/x402-core/src/verify/prepared-tx.ts:83
The contract the transfer's exercise targets, resolved against the transaction's own input_contracts — the evidence the real-factory proof is decided on.
Present only when the exercised contract id names exactly ONE input contract that agrees with the exercise about what it is. Absent means the transaction carries no usable proof of what it exercised, which the verifier refuses; it is not the same as the blob being undecodable, so the two stay distinguishable.
Everything here is covered by the signing hash. eventBlob is NOT, so it is deliberately absent: a decision read off it would be a decision nobody signed.
argument?
argument?: readonly object[];The disclosure's own record, scalar leaves only, in declaration order with whatever labels it carried — read exactly as a consequence's target.argument is. A reader names the fields it wants, through recordField.
Optional for the same reason as templateId; the decoder always sets it.
contractId
contractId: string;Kept though nothing here reads it: it is the handle a caller holding a registry needs to check the contract against one, which is the part of this proof that cannot be done from the blob alone.
interfaceId?
interfaceId?: object;The interface the exercised choice was inherited from, absent when the choice is the template's own. A Token Standard transfer is exercised through TransferFactory, so this is what says which kind of transfer this is, independently of whose registry implements it.
interfaceId.entityName
entityName: string;interfaceId.moduleName
moduleName: string;interfaceId.packageId
packageId: string;signatories
signatories: readonly string[];templateId?
templateId?: object;The contract's own template, from its disclosure. The exercise names the same one — resolving requires the two to agree — but this is what the contract IS, which a rule about whose factory it is reads.
Optional so that adding it changed no caller that builds this type; the decoder always sets it.
templateId.entityName
entityName: string;templateId.moduleName
moduleName: string;templateId.packageId
packageId: string;inputs?
inputs?: readonly object[];Defined in: packages/x402-core/src/verify/prepared-tx.ts:212
The holdings the transfer says it spends (inputHoldingCids), in the order it declares them.
contract is the input contract the id names, present only when exactly one names it, as for an exercise's target. Its argument is the disclosure's whole record, nested records included, with each leaf kept at its Daml type so a reader can hold a field to the type it is declared at.
Absent when the transfer declares none, and when the field is not a list of contract ids: either way it names nothing it spends.
instrumentId
instrumentId: object;Defined in: packages/x402-core/src/verify/prepared-tx.ts:45
Instrument moved — must equal requirements.extra.instrumentId.
admin
admin: string;id
id: string;memo?
memo?: string;Defined in: packages/x402-core/src/verify/prepared-tx.ts:54
meta.values["x402.memo"], when the payer committed one (Rule 12).
receiver
receiver: string;Defined in: packages/x402-core/src/verify/prepared-tx.ts:41
Receiving party — must equal requirements.payTo.
sender
sender: string;Defined in: packages/x402-core/src/verify/prepared-tx.ts:39
Paying party: the payment's payer (spec Rule 8), since the payload names none.
synchronizerId?
synchronizerId?: string;Defined in: packages/x402-core/src/verify/prepared-tx.ts:67
Metadata.synchronizer_id — the domain this transaction is prepared for, read from the signed block, so the payer committed to it rather than a relay choosing it.
EITHER form may appear. Canton signs the LOGICAL id a merchant quotes on the releases LocalNet runs; newer ones sign the PHYSICAL id, which is that plus ::<protocol-version>-<serial>. Both parts are the synchronizer's own — the protocol version is fixed when it is initialised, the serial steps on a logical upgrade — not anything a participant picks. isSameSynchronizer takes either.