Veil SDK
A portable execution language for intent-based Solana transactions. Veil SDK sits between a wallet and a node — it builds and serializes intents. It is not a wallet and not a node.
Installation
[]
= "0.1"
Quick Start
use ;
// 1. Build an intent in one line
let intent = transfer_sol;
// 2. Validate before signing
intent.validate?;
// 3. Sign with any wallet implementing the Signer trait
let signed = intent.sign?;
// 4. Submit to the Interveil node
let client = new;
let response = client.submit?;
println!;
API Overview
| Type | Purpose |
|---|---|
Intent |
Encodes a transaction (version, chain, nonce, payload) |
IntentPayload::TransferSol |
Transfer lamports to a Solana address |
Signer trait |
Wallet abstraction — implement public_key() and sign() |
SignedIntent |
Intent + signature, serializable to JSON |
Client |
HTTP client for submitting to an Interveil node |
SubmitResponse |
Node response with tx_hash and status |
Chain::Solana |
Chain identifier |
VeilError |
Unified error type (Serialization, Signing, Http, InvalidIntent) |
Serialization
Intent::to_bytes()uses bincode for deterministic binary serializationSignedIntent::to_json()produces{"intent": "<base64>", "pubkey": "<hex>", "signature": "<hex>"}- Signing flow:
intent → to_bytes() → blake3 hash → ed25519 sign
Development
# Build
# Run all tests
# Lint
# Format