Skip to content

Function: decodePayloadTransfer() ​

ts
function decodePayloadTransfer(preparedTransaction): DecodedTransfer | null;

Defined in: packages/x402-core/src/verify/canton-exact.ts:418

The transfer a payload's preparedTransaction authorizes: base64 of one gzip member, gunzipped and decoded. null when it is malformed or over either bound, which is as undecodable as a bad protobuf. Its sender is the payment's payer (spec Rule 8), since the payload names none. Takes untrusted input, so a value that is not a string is null too, not a throw.

Parameters ​

preparedTransaction ​

string

Returns ​

DecodedTransfer | null