| Crates.io | starknet-types-core |
| lib.rs | starknet-types-core |
| version | 0.2.2 |
| created_at | 2023-12-11 16:47:43.018803+00 |
| updated_at | 2025-09-25 11:00:50.587089+00 |
| description | Core types representation for Starknet |
| homepage | https://github.com/starknet-io/types-rs |
| repository | https://github.com/starknet-io/types-rs |
| max_upload_size | |
| id | 1065373 |
| size | 237,464 |
Core types representation for Starknet.
The starknet-types-core crate provides:
Felt (Field Element) type for Cairo and STARK proofs. It was created to reduce the fragmentation in the Starknet Rust ecosystem by providing a standardized representation of the Felt type.Felt type: Simplify your codebase by using our standardized Felt type. Optimized for performance: The Felt type has been optimized for high-performance applications.Felt typeFelt type within the Parity serialization frameworkFelt typeAffinePoint and ProjectivePoint structs, which represent points on the Stark curve for performing elliptic curve operations.Here are some examples of how to use the starknet-types-core types:
let felt = Felt::from(18);
let projective_point = ProjectivePoint::new(Felt::from(0), Felt::from(1), Felt::from(0));
let affine_point = AffinePoint::new(Felt::from(0), Felt::from(1)).unwrap();
Include starknet-types-core in your library by adding the following to your Cargo.toml:
[dependencies]
starknet-types-core = { version = "0.0.3", git = "https://github.com/starknet-io/types-rs", default-features = false, features = [
"alloc",
"serde",
"arbitrary",
"curve",
"hash",
] }
Clone the repository and navigate to the starknet-types-core directory. Then run:
cargo build --release
Clone the repository and navigate to the starknet-types-core 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.