surfpool-sdk crate exposes a small surface centered on the Surfnet
struct. This page lists every public item; for narrative usage, see the guides
starting with Overview.
Crate Root Exports
| Item | Kind | Notes |
|---|---|---|
Surfnet | struct | Running Surfnet instance — RPC/WS endpoints, payer, cheatcodes |
SurfnetBuilder | struct | Fluent builder used by Surfnet::builder() |
Cheatcodes<'_> | struct | Borrowed cheatcode helper returned by Surfnet::cheatcodes() |
SurfnetError | enum | All error variants the SDK returns |
SurfnetResult<T> | type alias | Result<T, SurfnetError> |
Keypair | re-export | solana_keypair::Keypair |
Pubkey | re-export | solana_pubkey::Pubkey |
Signer | re-export | solana_signer::Signer |
RpcClient | re-export | solana_rpc_client::rpc_client::RpcClient |
BlockProductionMode | re-export | surfpool_types::BlockProductionMode |
SimnetCommand | re-export | surfpool_types::SimnetCommand |
SimnetEvent | re-export | surfpool_types::SimnetEvent |
SvmFeatureConfig | re-export | surfpool_types::SvmFeatureConfig |
Surfnet
Constructors
Accessors
Lifecycle
stop blocks for up to five seconds waiting for the runtime to release its
ports. Failure during Drop is silent; failure during an explicit stop
returns a SurfnetError::Runtime.
SurfnetBuilder
Self, so calls can be chained. The terminal call is
start().await.
Cheatcodes
SOL Funding
Token Funding
Account Mutation
Time Travel
Program Deployment
CheatcodeBuilder Trait
Builders
All builders live insurfpool_sdk::cheatcodes::builders.
SetAccount
SetTokenAccount
ResetAccount
StreamAccount
DeployProgram
SurfnetError
| Variant | Cause |
|---|---|
PortAllocation | Could not bind to a free port for RPC or WebSocket. |
Startup | The runtime failed to initialize. |
Runtime | The runtime thread panicked or exited unexpectedly. |
Cheatcode | A cheatcode JSON-RPC call returned an error. |
Aborted | The runtime was shut down or cancelled during startup. |
std::error::Error and Display on SurfnetError, so it
works with ? and anyhow out of the box.