TheDocumentation Index
Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
Use this file to discover all available pages before exploring further.
solData criterion provides advanced validation of Solana transaction instruction data using Interface Definition Language (IDL) specifications. It decodes and validates instruction parameters against specific rules before signing, and applies to API key authentication wallets only.
For general policy setup, see the Policy Engine Overview. For common Solana policy patterns, see Solana Policies.
How solData works
AsolData criterion specifies which Solana programs to validate via the idls field, then defines instruction-level validation rules via the conditions field.
The idls field accepts either:
- Known program shortcuts —
"SystemProgram","TokenProgram","AssociatedTokenProgram" - Custom IDL objects for any other program
IDL specifications
Anchor IDL format
IDL specifications must follow Anchor’s IDL format v0.30+. To convert older formats:Supported argument types
Primitive types supported:bool, string, pubkey, u8–u256, i8–i256, f32, f64.
Complex types (user-defined types, arrays, vectors, optionals) are not currently supported. Reach out on CDP Discord if you need them.
Instruction discriminators
Discriminators are unique byte sequences that identify instructions within a program:| Program Type | Format | Size | Example |
|---|---|---|---|
| SystemProgram | 4-byte little-endian u32 | 4 bytes | Transfer = [2,0,0,0] |
| SPL Token | 1-byte enum index | 1 byte | Transfer = 3 |
| Associated Token | Borsh-encoded enum | 1 byte | Create = 0 |
| Anchor Programs | SHA256 of "global:instruction_name" | 8 bytes | — |
IDL configuration
Known program shortcuts
Use predefined names for common programs instead of providing full IDL objects:"SystemProgram"— Native Solana system program"TokenProgram"— SPL Token program"AssociatedTokenProgram"— Associated Token Account program
Custom IDL objects
For custom programs, provide IDL objects with:- address — The program’s public key
- instructions — Array of instruction definitions, each with
name,discriminator, andargs
Conditions
Evaluation logic
- Multiple conditions in a
solDatacriterion are evaluated with OR logic — any matching condition passes - Parameters within a condition are evaluated with AND logic — all must match
Condition structure
Each condition includes:- instruction — Name matching an instruction in one of the provided IDLs
- params (optional) — Array of parameter validations, each with
name,operator(==,<=,>=,<,>,!=,in,not in), andvalueorvalues
Examples
Using known program shortcuts
Using custom IDL objects
Building Anchor-formatted instructions for the above examples
Building Anchor-formatted instructions for the above examples
Ecosystem program examples
ThesolData criterion works with any Solana program. Common use cases by category:
| Category | Programs |
|---|---|
| DeFi / Trading | Jupiter (slippage limits), Raydium (liquidity constraints) |
| Staking | Jito (validator selection), Marinade (deposit/withdrawal limits) |
| NFTs | Metaplex (mint parameters), Magic Eden (bid validation) |
Key considerations
- Always use Anchor IDL format v0.30+
- Discriminator bytes must exactly match the program’s instruction identifiers
- Convert older IDL formats with
anchor idl convertbefore use