Skip to main content

Crate aspens

Crate aspens 

Source
Expand description

Aspens crosschain trading SDK.

This crate provides the core building blocks for interacting with the Aspens Market Stack: a chain-agnostic Wallet abstraction, a ChainClient RPC dispatcher (EVM via Alloy, Solana via solana-client), the AspensClient gRPC entry point, and the signing helpers in evm, solana, and orders that produce the exact bytes the arborter validates.

§Feature flags

  • evm (default) — stateless EVM signing helpers in evm and the EIP-712 bindings under evm. Pulls Alloy primitives only.
  • solana (default) — stateless Solana helpers in solana (PDA derivations, instruction builders, borsh payload encoder). Pulls solana-sdk, bs58, ed25519-dalek, and borsh.
  • client (default) — full gRPC + RPC runtime: AspensClient, the commands modules, chain_client, the executor abstraction, and Solana RPC submission. Pulls tonic, prost, tokio, solana-client, and the proto-generated bindings.

Lean signing consumers (browser, embedded, etc.) can build with --no-default-features --features evm,solana to skip all of tonic / prost / tokio / solana-client.

Re-exports§

pub use chain_client::ChainClient;client
pub use client::AspensClient;client
pub use client::AspensClientBuilder;client
pub use client::JwtToken;client
pub use executor::AsyncExecutor;client
pub use executor::BlockingExecutor;client
pub use executor::DirectExecutor;client
pub use wallet::load_admin_wallet;
pub use wallet::load_trader_wallet;
pub use wallet::CurveType;
pub use wallet::Wallet;
pub use wallet::chain_curve;client
pub use wallet::load_trader_wallet_for_chain;client
pub use wallet::load_trader_wallet_for_network;client

Modules§

attestationclient
Generated protobuf bindings for the attestation service.
chain_clientclient
Chain-aware RPC client that dispatches between Alloy (EVM) and solana-client (Solana) based on the chain’s architecture field.
clientclient
gRPC client and builder for the Aspens Market Stack.
commandsclient
gRPC command implementations (config, trading, admin, auth). gRPC command implementations.
decimals
Decimal-string ↔ base-units conversion shared by all amount-parsing call sites (CLI, REPL, library). Decimal-string ↔ base-units conversion shared by the order, deposit, and withdraw paths.
evmevm
EVM client-side helpers for the Midrib V2 cross-chain order flow.
executorclient
Async/sync execution strategies used by binaries to drive the client. Synchronous adapters for driving async work from blocking entry points. The CLI uses DirectExecutor (re-uses the ambient tokio runtime); the REPL owns its own runtime via BlockingExecutor.
healthclient
gRPC health-check helpers used to probe stack readiness.
orders
Chain-agnostic order primitives.
protoclient
Generated protobuf bindings for the arborter config and auth services.
solanasolana
Solana on-chain program (Midrib) client-side helpers.
wallet
Curve-agnostic wallet abstraction for signing.