MPP.Methods.USDC.EVM (mpp v0.19.0)

Copy Markdown View Source

Direct USDC charge on EVM, EIP-3009 transferWithAuthorization only.

Settlement reuses MPP.Methods.EVM.Authorization. The nonce is the USDC challenge binding from draft-usdc-charge-00, not the generic EVM challengeHash. The server submits the authorization and pays gas.

Summary

Functions

Advertise chainId, decimals 6, and the authorization credential.

EIP-3009 payload type accepted by this profile.

Profile name evm.

Require an RPC URL, a known chain id, and a settlement key.

Verify an EIP-3009 USDC authorization and return the USDC receipt.

Functions

challenge_details(charge)

@spec challenge_details(MPP.Intents.Charge.t()) :: map()

Advertise chainId, decimals 6, and the authorization credential.

credential_type()

@spec credential_type() :: String.t()

EIP-3009 payload type accepted by this profile.

name()

@spec name() :: String.t()

Profile name evm.

validate_config!(config)

@spec validate_config!(map()) :: :ok

Require an RPC URL, a known chain id, and a settlement key.

verify(payload, charge)

@spec verify(map(), MPP.Intents.Charge.t()) ::
  {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}

Verify an EIP-3009 USDC authorization and return the USDC receipt.