0.1.1 • Published 1 year ago

orao-sui-vrf v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

VRF for SUI JS SDK

Library to interact with orao-vrf smart contract on Aptos network.

Provides interface to request for a verifiable randomness (Ed25519 Signature) on the Aptos network.

Randomness request

const oraoVrf = new OraoVrf(NODE_URL);

const { tx_digest, seed } = await oraoVrf.request(signer);
console.log("Your transaction hash is", tx_digest);

const randomness = await oraoVrf.waitFulfilled(seed);
console.log("Your randomness is", randomness)