Skip to content
The 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

ItemKindNotes
SurfnetstructRunning Surfnet instance — RPC/WS endpoints, payer, cheatcodes
SurfnetBuilderstructFluent builder used by Surfnet::builder()
Cheatcodes<'_>structBorrowed cheatcode helper returned by Surfnet::cheatcodes()
SurfnetErrorenumAll error variants the SDK returns
SurfnetResult<T>type aliasResult<T, SurfnetError>
Keypairre-exportsolana_keypair::Keypair
Pubkeyre-exportsolana_pubkey::Pubkey
Signerre-exportsolana_signer::Signer
RpcClientre-exportsolana_rpc_client::rpc_client::RpcClient
BlockProductionModere-exportsurfpool_types::BlockProductionMode
SimnetCommandre-exportsurfpool_types::SimnetCommand
SimnetEventre-exportsurfpool_types::SimnetEvent
SvmFeatureConfigre-exportsurfpool_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

Every setter returns 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

Implement this for custom JSON-RPC cheatcodes not yet wrapped by a typed builder.

​Builders

All builders live in surfpool_sdk::cheatcodes::builders.

​SetAccount

​SetTokenAccount

​ResetAccount

​StreamAccount

​DeployProgram

​SurfnetError

VariantCause
PortAllocationCould not bind to a free port for RPC or WebSocket.
StartupThe runtime failed to initialize.
RuntimeThe runtime thread panicked or exited unexpectedly.
CheatcodeA cheatcode JSON-RPC call returned an error.
AbortedThe runtime was shut down or cancelled during startup.
The crate implements std::error::Error and Display on SurfnetError, so it works with ? and anyhow out of the box.