Structs§
- Curve
Coefficient - A fixed curve coefficient uint pinned at a VM-owned store pointer.
- Curve
Precompile - Precompile for point operations over the fixed supported curves.
- Hash
Assert Node - A structural view of a hash assertion node owned by
HashPrecompile. - Hash
Precompile - A hash assertion precompile parameterized by its
HashFunction. - K1Base
- Marker type for the secp256k1 base field.
- K1Scalar
- Marker type for the secp256k1 scalar field.
- U256
- Marker for arithmetic modulo
2^256. - Uint
Precompile - Precompile for 256-bit arithmetic over fixed uint domains.
Enums§
- CurveId
- Fixed curves supported by the native curve precompile.
- Curve
Node Ref - Structural view of a curve precompile node.
- Curve
Point - Curve-generic point value.
- Uint
Domain - Fixed uint arithmetic domains supported by the native uint precompile.
- Uint
Node Ref - Structural view of a uint precompile node.
Constants§
- K1_
A_ PTR - VM-owned store pointer for the secp256k1 curve coefficient
A. - K1_
BASE_ BOUND_ PTR - VM-owned store pointer for the secp256k1 base-field bound (
p - 1). - K1_
B_ PTR - VM-owned store pointer for the secp256k1 curve coefficient
B. - K1_
GROUP_ PTR - VM-owned store pointer for the secp256k1 group configuration.
- K1_
SCALAR_ BOUND_ PTR - VM-owned store pointer for the secp256k1 scalar-field bound (
n - 1). - ONE_
LIMBS - The canonical one value in every supported uint domain.
- SECP256
K1_ GENERATOR_ X - Standard secp256k1 generator x-coordinate, little-endian u32 limbs.
- SECP256
K1_ GENERATOR_ Y - Standard secp256k1 generator y-coordinate, little-endian u32 limbs.
- SECP256
K1_ ID - Stable local curve selector for secp256k1.
- TWO_
LIMBS - The canonical two value in every supported uint domain.
- U256_
BOUND_ PTR - VM-owned store pointer for the U256 wrapping-domain bound (
2^256 - 1). - ZERO_
LIMBS - The canonical zero value in every supported uint domain.
Traits§
- Curve
Spec - Spec for one fixed curve.
- Hash
Function - The byte-level hash backing a
HashPrecompile. - Short
Weierstrass Spec - Short-Weierstrass-specific parameters for curves of the form
y^2 = x^3 + A*x + B. - Uint
Spec - Spec for one fixed uint arithmetic domain.
Functions§
- chunks_
to_ bytes_ exact - Unpack exactly
expected_chunksu32-packed-LE chunks back to an_bytes-length byte vector. - curve_
coefficients - Returns all fixed curve coefficients in VM pointer order.
- n_
chunks - Number of 8-felt chunks needed to encode
n_bytesof u32-packed input. - registry
- Returns a
PrecompileRegistrycontaining the precompiles provided by this crate.
Type Aliases§
- Keccak256
Precompile - The Keccak-256 precompile, installed by
registry. - Limbs
- Little-endian 256-bit value represented as eight
u32limbs.