Expand description
§starkzap-rs
A Rust SDK for seamless Starknet wallet integration — the faithful Rust mirror
of the starkzap TypeScript SDK.
Built for the Starknet community.
§Quick start
use starkzap_rs::{
StarkZap, StarkZapConfig, OnboardConfig,
signer::StarkSigner,
tokens::sepolia,
Amount,
wallet::Recipient,
};
#[tokio::main]
async fn main() -> starkzap_rs::error::Result<()> {
let sdk = StarkZap::new(StarkZapConfig::sepolia());
let signer = StarkSigner::new(
&std::env::var("PRIVATE_KEY").unwrap(),
&std::env::var("ACCOUNT_ADDRESS").unwrap(),
)?;
let wallet = sdk.onboard(OnboardConfig::Signer(signer)).await?;
let strk = sepolia::strk();
let balance = wallet.balance_of(&strk).await?;
println!("Balance: {}", balance);
Ok(())
}§Features
| Feature | Description |
|---|---|
| (default) | Core SDK: StarkSigner, tokens, transfers, staking |
privy | Privy server-side signer |
cartridge | Cartridge session-key signer |
full | All optional signers |
wasm | WebAssembly target support |
§Targets
- Server / CLI (tokio) — always available, no feature flags needed
- WASM / browser — compile with
--features wasm --target wasm32-unknown-unknown
Re-exports§
pub use account::AccountPreset;pub use amount::Amount;pub use error::Result;pub use error::StarkzapError;pub use network::Network;pub use sdk::OnboardConfig;pub use sdk::StarkZap;pub use sdk::StarkZapConfig;pub use tx::Tx;pub use tx::TxStatus;pub use wallet::DeployMode;pub use wallet::DeployPolicy;pub use wallet::EnsureReadyOptions;pub use wallet::ExecuteOptions;pub use wallet::PreflightOptions;pub use wallet::PreflightResult;pub use wallet::ProgressEvent;pub use wallet::ProgressStep;pub use wallet::Recipient;pub use wallet::Wallet;
Modules§
- account
- Account presets and deployment helpers.
- amount
- Decimal-aware token amount type.
- error
- network
- Network configuration — Mainnet, Sepolia, and Devnet.
- paymaster
- Paymaster integration.
- sdk
- Top-level SDK entry point — mirrors
new StarkZap(config)from the TS SDK. - signer
- Signer backends.
- staking
- Starknet native staking integration.
- tokens
- ERC-20 token definitions and network presets.
- tx
- Transaction handle returned by all mutating wallet operations.
- wallet
- Core wallet interface — the primary surface of the SDK.