Logo

starknet-rs

Complete StarkNet library in Rust

linting-badge

Note that starknet-rs is still experimental. Breaking changes will be made before the first stable release. Use at your own risk.

Adding starknet-rs to your project

This crate hasn't been published to crates.io yet, so you'll need to add the following to your Cargo.toml to use it:

toml [dependencies] starknet = { git = "https://github.com/xJonathanLEI/starknet-rs" }

Features

Example

Using SequencerGatewayProvider to get the latest block from the alpha-goerli testnet:

```rust use starknet::providers::{Provider, SequencerGatewayProvider};

[tokio::main]

async fn main() { let provider = SequencerGatewayProvider::starknetalphagoerli(); let latestblock = provider.getblock(None).await; println!("{:#?}", latest_block); } ```

License

Licensed under either of

at your option.