Expand description
RFC 9381 compliant VRF verification library for NEAR smart contracts
This library implements ECVRF-RISTRETTO255-SHA512-ELL2 as specified in RFC 9381, containing only the essential components needed to verify VRF proofs.
Client (browser wasm-worker) responsibilities:
- Generate VRF keypairs using vrf-wasm
- Create VRF outputs and proofs using vrf-wasm
- Send VRF output, proof, and public key to contract
Contract responsibilities:
- Verify VRF proof matches the claimed output using RFC 9381 standards
- Use minimal cryptographic operations compatible with NEAR WASM
Re-exports§
pub use types::VrfOutput;pub use types::VrfPublicKey;pub use types::VrfProof;pub use types::VerificationError;
Modules§
Functions§
- verify_
vrf - VRF verification function for NEAR contracts (Vec input for compatibility) Returns the VRF output on successful verification
- verify_
vrf_ bool - Boolean verification for simpler contract usage
- verify_
vrf_ fixed - VRF verification function for NEAR contracts (with fixed-length arrays) Returns the VRF output on successful verification