Motivation
To standardize how action codes translate into executable instructions and how metadata (title, description, parameters) flows through the protocol. This ensures consistent behavior across different implementations while allowing flexibility in how relayers and services handle code resolution.Specification
Intent Resolution Flow
The general flow for resolving action codes involves:- Code Validation: Code is validated using signature verification AIP-2
- Metadata Processing: Optional metadata is processed according to the ActionCode structure
- Intent Resolution: Code is resolved to its associated intent based on the protocol specification
Metadata Flow
Metadata flows through the system as follows:- Description: Detailed description of the action
- Params: Additional parameters for the action (e.g., amount, recipient)
Protocol Scope
This AIP defines only the protocol-level concepts and data structures. Implementation details such as:- Relayer servers and APIs
- Database storage and caching
- Transaction attachment mechanisms
- Infrastructure and deployment
- Completion callbacks and webhooks
Notes
- Action codes expire exactly at their 2-minute boundary
- Metadata is not validated by the protocol but can be used by applications
- Future versions may standardize specific intent types and metadata schemas
- The protocol focuses on core specification, not implementation details
Appendix A: ActionCodeStatus Lifecycle
Status Definitions
Status | Meaning | Who Sets It | When / Condition |
---|---|---|---|
pending | Code has been generated and submitted, awaiting intent or transaction | SDK / client / relayer | After code is signed and sent to the relayer (or self-hosted) |
resolved | Code has a transaction attached (but not yet signed or broadcast) | Relayer | After calling /attach or assigning transaction field |
finalized | The transaction has been signed and confirmed on chain | Wallet or relayer | After TX is broadcast and confirmed. Attach txSignature |
expired | The codeβs expiresAt timestamp is in the past | π Computed dynamically | Date.now() > expiresAt (not stored permanently) |
error | An error occurred (invalid input, failed tx, wrong pubkey, etc) | Relayer / SDK | Validation failure, relayer rejection, or internal logic fault |
Valid Transitions
error
status can occur at any stage if validation or logic fails.
Implementation Notes
expired
is always derived from theexpiresAt
field β not manually setfinalized
usually comes from a wallet callback or relayer monitor- Future versions may include optional
finalizedAt: number
for analytics - All implementations must respect these status transitions for protocol compatibility