Crates.io | starknet-types-rpc |
lib.rs | starknet-types-rpc |
version | 0.7.1 |
source | src |
created_at | 2024-10-28 09:42:37.484353 |
updated_at | 2024-10-28 09:42:37.484353 |
description | Starknet RPC types. |
homepage | https://github.com/starknet-io/types-rs |
repository | https://github.com/starknet-io/types-rs |
max_upload_size | |
id | 1425414 |
size | 583,460 |
# starknet-types-rpc
`starknet-types-rpc` is a crate dealing with Starknet types used in RPC communication, serde, and transport. This crate is part of an initiative to standardize the representation of the `Felt` type in Rust, reducing code complexity and improving performance across the Starknet Rust ecosystem.
## Usage
Include `starknet-types-rpc` in your library by adding the following to your `Cargo.toml`:
```toml
[dependencies]
starknet-types-rpc = { version = "0.0.2", git = "https://github.com/starknet-io/types-rs" }
The crate is built in two steps:
The specification is hosted on Starknet's repository (link).
Bindings are generated using openrpc-gen
.
After having built openrpc-gen
, you can use the following command to generate the final generated
Rust files:
make all
NOTE: Currently the starknet_trace_api_openrpc
file requires a modification for starknet_simulateTransactions
(nested schema
in the result, see previous version for infos)
Note that this first step is normally already done for you upon cloning the repository.
Once this is done, you can build the crate with:
cargo build --release
Clone the repository and navigate to the starknet-types-rpc directory. Then run:
cargo test
Contributions are welcome! Please read our contributing guidelines for more information.
This repository is licensed under the MIT License, see LICENSE for more information.