Overview
The Action Codes Protocol defines how short-lived, self-contained codes can represent cryptographically verifiable intent for blockchain actions. It provides:- A deterministic code derivation model
- A secure, encrypted payload format
- A pluggable adapter layer for chain-specific logic
- Stateless generation, stateful resolution
- Fully off-chain generation and submission flows
Code Derivation
Action Codes are derived based on the following parameters:Field | Description |
---|---|
pubkey | The userโs wallet public key |
timestamp | Millisecond timestamp rounded into 2-minute windows |
prefix | Optional string for code namespacing [WIP] |
signature | Signature over a message derived from the above fields |
Validation Rules
To be valid, a code must:- Match a hash derived from its inputs (deterministic match)
- Be within the ยฑ1 slot grace window (around 2 minutes)
- Have a valid signature for the message, verified using the pubkey
- Not be expired (default TTL = 2 minutes)