Expand description
Runtime cryptography helpers built on Solana syscalls and precompiles.
Structs§
- Processed
Instruction - Processed
Instruction Account - Native account-meta ABI used by caller-buffer sibling introspection. Account metadata returned by the sibling-instruction syscall.
- Processed
Instruction Data - Processed
Instruction View - Processed sibling with runtime address and borrowed scratch prefixes.
Constants§
- ALT_
BN128_ FIELD_ SIZE - ALT_
BN128_ G1_ ADDITION_ INPUT_ SIZE - ALT_
BN128_ G1_ ADD_ BE - ALT_
BN128_ G1_ ADD_ LE - ALT_
BN128_ G1_ COMPRESS_ BE - ALT_
BN128_ G1_ COMPRESS_ LE - ALT_
BN128_ G1_ DECOMPRESS_ BE - ALT_
BN128_ G1_ DECOMPRESS_ LE - ALT_
BN128_ G1_ MULTIPLICATION_ INPUT_ SIZE - ALT_
BN128_ G1_ MUL_ BE - ALT_
BN128_ G1_ MUL_ LE - ALT_
BN128_ G1_ POINT_ SIZE - ALT_
BN128_ G1_ SUB_ BE - ALT_
BN128_ G1_ SUB_ LE - ALT_
BN128_ G2_ ADDITION_ INPUT_ SIZE - ALT_
BN128_ G2_ ADD_ BE - ALT_
BN128_ G2_ ADD_ LE - ALT_
BN128_ G2_ COMPRESS_ BE - ALT_
BN128_ G2_ COMPRESS_ LE - ALT_
BN128_ G2_ DECOMPRESS_ BE - ALT_
BN128_ G2_ DECOMPRESS_ LE - ALT_
BN128_ G2_ MULTIPLICATION_ INPUT_ SIZE - ALT_
BN128_ G2_ MUL_ BE - ALT_
BN128_ G2_ MUL_ LE - ALT_
BN128_ G2_ POINT_ SIZE - ALT_
BN128_ G2_ SUB_ BE - ALT_
BN128_ G2_ SUB_ LE - ALT_
BN128_ LE_ FLAG - ALT_
BN128_ PAIRING_ BE - ALT_
BN128_ PAIRING_ ELEMENT_ SIZE - ALT_
BN128_ PAIRING_ LE - CURV
E25519_ EDWARDS - CURV
E25519_ RISTRETTO - CURVE_
GROUP_ ADD - CURVE_
GROUP_ MUL - CURVE_
GROUP_ SUB - ED25519_
PROGRAM_ ID - MAX_
HASH_ SEGMENTS - MAX_
INSTRUCTION_ ACCOUNTS_ BYTES - MAX_
INSTRUCTION_ DATA_ LEN - MAX_
POSEIDON_ INPUTS - POSEIDON_
BIG_ ENDIAN - POSEIDON_
BN254_ X5 - POSEIDON_
INPUT_ LEN - POSEIDON_
LITTLE_ ENDIAN - SECP256
K1_ PROGRAM_ ID - SECP256
R1_ PROGRAM_ ID - Secp256r1 (P-256) signature-verification precompile (SIMD-0075). This is the precompile passkey / WebAuthn flows verify against.
Functions§
- blake3
- blake3_
single - curve25519_
edwards_ validate_ point - curve_
validate_ point - get_
processed_ instruction - Read up to 1,232 bytes and 64 account metas.
Nonemeans missing or too large. Useget_processed_instruction_intoto distinguish these cases. - get_
processed_ instruction_ data - Read bounded instruction data from a sibling with up to 64 account metas.
The entire data must fit
MAX_DATA; this never returns truncated data. Account scratch is still required by the syscall even when the caller only wants data. Useget_processed_instruction_intoto select both capacities. - get_
processed_ instruction_ into - Read a sibling into caller-provided buffers, preserving exact runtime sizes.
See
hopper_native::introspect::get_processed_instruction_intofor scope, capacity errors and host behavior. Account records use native address values; convert an individual address withAddress::from(record.address.clone()). - get_
stack_ height - is_cpi
- is_
top_ level - keccak256
- keccak256_
single - recover_
ethereum_ address - require_
ed25519_ instruction - Checks only the sibling’s program ID. The caller must validate the signature count, offsets, referenced instruction bytes and expected key/message.
- require_
ed25519_ instruction_ data - Bounded variant of
require_ed25519_instruction, with the same payload checks required of the caller. - require_
secp256k1_ instruction - Checks only the sibling’s program ID, not signature payload or authorization.
- require_
secp256r1_ instruction - Require that a sibling instruction targeted the Secp256r1 (P-256) precompile. Checks only the program ID. The caller validates signature count, offsets, expected key/message, and any WebAuthn challenge and relying-party policy.
- require_
secp256r1_ instruction_ data - Variant of
require_secp256r1_instructionreturning the bounded instruction-data form for callers that parse the precompile payload. - require_
top_ level - secp256k1_
recover - sha256
- sha256_
single