Skip to content

Verifiable Random Function (VRF) library that interfaces with StarkNet VRF Oracle.

License

Notifications You must be signed in to change notification settings

StarkLinkVRF/vrf-client-starknet-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vrf-rs

vrf-client-starknet-rs is a fork of vrf-rs, an open source implementation of Verifiable Random Functions (VRFs). This particular fork supports the verification function implemented in VRF StarkNet. In the future this project will interact with StarkNet to make random number calculations and proofs.

The VRF spec is described in VRF-draft-05. We use a modified SECP256K1_SHA256_TAI with keccak rather than sha256 since sha256 is not available in cairo with such large inputs.

The library can be built using cargo and the examples can be executed with:

Running

Create two files, wallet-address.txt and wallet-secret.txt in the root directory. List your addresses and secrets in a list. Multiple wallets allow better throughput of the vrf.

cargo build
NETWORK=<choose network> VRF_SECRET=<your vrf secret key> ORACLE_ADDRESS=<address of the deployed oracle contract> cargo run --example client

Until this project has the capabilities to interect with StarkNet itself it can be viewed as a script that take inputs from the blockchain and spits out a result to be put manually back onto the blockchain.

License

vrf-client-starknet-rs is published under the [MIT license][license].

About

Verifiable Random Function (VRF) library that interfaces with StarkNet VRF Oracle.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages