Tools
The Aspens SDK is a Rust workspace published on crates.io as
aspens and source-distributed at
github.com/aspensprotocol/sdk.
It ships four pieces:
| Component | Purpose |
|---|---|
aspens (lib) | Rust library — gRPC client, trading commands, EVM + Solana signing helpers |
aspens-cli | Scripted command-line trading |
aspens-repl | Interactive REPL with command history |
aspens-admin | Stack configuration: chains, tokens, markets, contracts |
Library
cargo add aspensDefault features pull the full client runtime (gRPC, RPC submission,
tokio). For browser / embedded / offline-signing consumers that only
need to build and sign order payloads, drop the client feature:
aspens = { version = "0.4", default-features = false, features = ["evm", "solana"] }Feature flags (all default-on):
| Feature | Adds |
|---|---|
evm | aspens::evm — MidribV3 sol! bindings, EIP-712 hasher, EIP-191 signer |
solana | aspens::solana — PDA derivations, instruction builders, borsh payload encoder |
client | AspensClient, commands::*, chain_client, executor, RPC submission |
Always available regardless of features:
aspens::orders::derive_order_id— the canonical SHA-256 derivation the arborter validates against. Use this on the client and pass the result throughOrderAuthorization.order_id.aspens::orders::parse_destination_token_bytes32— the shared cross-chain-token decoder (parity-pinned against the arborter).aspens::wallet::{Wallet, CurveType, load_trader_wallet*}— the curve-agnostic wallet abstraction (Wallet::Evm/Wallet::Solana).
Binaries
All three binaries take --stack <URL> (or read ASPENS_MARKET_STACK_URL
from .env) and --env-file <PATH>.
cargo install --locked --git https://github.com/aspensprotocol/sdk \
aspens-cli aspens-repl aspens-adminaspens-cli and aspens-repl read TRADER_PRIVKEY (EVM, hex) and
TRADER_PRIVKEY_SOLANA (Solana keypair, base58 — only required when
trading on Solana chains).
aspens-admin reads ADMIN_PRIVKEY for EIP-712 login and ASPENS_JWT
(or --jwt) for authenticated commands.
See the Developer Guide for the command surface and the Operator Guide for the admin workflow.