Tempo subscription key-authorization wire codec and verifier.
The RLP layout and primitive signature envelopes match ox/tempo's
KeyAuthorization; subscription scope checks follow the normative Tempo
subscription draft.
Summary
Functions
Deserialize and cryptographically verify a signed primitive key authorization.
Decode the object returned by wallet_authorizeAccessKey.
Map a shared subscription period to Tempo's fixed elapsed seconds.
Serialize a key authorization as canonical RLP hex.
Return the decoded RLP field inserted into a Tempo transaction.
Verify that a signed authorization is exactly scoped to a subscription request.
Build the normative wallet_authorizeAccessKey parameter object.
Types
@type key_type() :: :secp256k1 | :p256 | :web_authn
@type t() :: %MPP.Methods.Tempo.KeyAuthorization{ chain_id: non_neg_integer(), expiry: pos_integer(), field: list(), key_id: String.t(), key_type: key_type(), limits: [map()], scopes: [map()], signature: binary(), source: String.t() }
Functions
Deserialize and cryptographically verify a signed primitive key authorization.
Decode the object returned by wallet_authorizeAccessKey.
@spec period_seconds(MPP.Intents.Subscription.t()) :: {:ok, pos_integer()} | {:error, String.t()}
Map a shared subscription period to Tempo's fixed elapsed seconds.
Serialize a key authorization as canonical RLP hex.
Return the decoded RLP field inserted into a Tempo transaction.
@spec verify(t(), MPP.Intents.Subscription.t(), keyword()) :: :ok | {:error, String.t()}
Verify that a signed authorization is exactly scoped to a subscription request.
@spec wallet_params( MPP.Intents.Subscription.t(), keyword() ) :: {:ok, map()} | {:error, String.t()}
Build the normative wallet_authorizeAccessKey parameter object.