EIP-712 proof credentials for zero-amount Tempo charge flows.
Wallet-bound MPP domain version 3: the signed account field binds the
proof to a specific payer so it cannot be replayed against another wallet for
the same challenge. Matches refs/mppx/src/tempo/internal/proof.ts.
Summary
Functions
Compute the EIP-712 signing digest (32-byte binary) for a proof credential.
Recover the authorized access-key signer when direct wallet verification fails.
Build the EIP-712 typed-data map for a Tempo proof credential.
Verify a proof signature recovers to expected_account.
Types
@type params() :: %{ account: String.t(), chain_id: non_neg_integer(), challenge_id: String.t(), realm: String.t() }
Functions
@spec hash(params()) :: <<_::256>>
Compute the EIP-712 signing digest (32-byte binary) for a proof credential.
@spec recover_authorized_proof_signer(params(), String.t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}
Recover the authorized access-key signer when direct wallet verification fails.
Matches recoverAuthorizedProofSigner in refs/mppx/src/tempo/server/Charge.ts.
Returns {:ok, access_key_address} or {:error, reason}.
@spec typed_data(params()) :: Cartouche.Typed.t()
Build the EIP-712 typed-data map for a Tempo proof credential.
Verify a proof signature recovers to expected_account.
Returns :ok or {:error, reason}.