EIP-3009 transferWithAuthorization credential for Circle USDC/EURC.
The client signs an off-chain EIP-712 TransferWithAuthorization message.
The server submits it to the token contract and pays gas. The EIP-3009
nonce is the Payment-auth challengeHash:
keccak256(challenge.id <> challenge.realm)matching draft-evm-charge-00.md § Authorization Payload and
refs/mppx/src/evm/Types.ts challengeHash. Circle FiatTokenV2 enforces
nonce uniqueness on-chain (authorizationState).
Summary
Functions
Compute the EIP-3009 nonce: keccak256(challenge.id <> challenge.realm).
Return true when this charge can advertise and settle type=authorization.
Parse and validate a type=authorization credential payload.
Validate, recover, and settle an EIP-3009 authorization; return the tx hash.
Validate optional "authorization" method_config (name + version).
Types
@type parsed() :: %{ from: String.t(), to: String.t(), value: String.t(), valid_after: non_neg_integer(), valid_before: non_neg_integer(), nonce: String.t(), signature: String.t() }
Functions
Compute the EIP-3009 nonce: keccak256(challenge.id <> challenge.realm).
@spec offered?(MPP.Intents.Charge.t()) :: boolean()
Return true when this charge can advertise and settle type=authorization.
@spec parse_payload(map()) :: {:ok, parsed()} | {:error, MPP.Errors.t()}
Parse and validate a type=authorization credential payload.
@spec settle(map(), MPP.Intents.Charge.t()) :: {:ok, String.t()} | {:error, MPP.Errors.t()}
Validate, recover, and settle an EIP-3009 authorization; return the tx hash.
@spec validate_config!(term()) :: :ok
Validate optional "authorization" method_config (name + version).