Skip to main content

Crate surfpool_sdk

Crate surfpool_sdk 

Source
Expand description

§Surfpool SDK

Embed a full Surfpool instance directly in your Rust integration tests. No external process needed — just spin up a Surfnet, point your RPC client at it, and test against a real Solana-compatible runtime.

use surfpool_sdk::Surfnet;

#[tokio::test]
async fn my_test() {
    let surfnet = Surfnet::start().await.unwrap();

    let rpc = surfnet.rpc_client();
    let balance = rpc.get_balance(&surfnet.payer().pubkey()).unwrap();
    assert!(balance > 0);
}

Re-exports§

pub use cheatcodes::Cheatcodes;

Modules§

cheatcodes

Structs§

Keypair
A vanilla Ed25519 key pair
Pubkey
The address of a Solana account.
RpcClient
A client of a remote Solana node.
Surfnet
A running Surfpool instance with RPC/WS endpoints on dynamic ports.
SurfnetBuilder
Builder for configuring a Surfnet instance before starting it.

Enums§

BlockProductionMode
SimnetCommand
SimnetEvent
SurfnetError

Traits§

Signer
The Signer trait declares operations that all digital signature providers must support. It is the primary interface by which signers are specified in Transaction signing interfaces

Type Aliases§

SurfnetResult