@orao-network/solana-vrf
TypeScript icon, indicating that this package has built-in type declarations

0.2.7-O • Public • Published

VRF v2 JS SDK

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

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

Usage examples

CPI example tests are based on this SDK.

Randomness request

const provider = AnchorProvider.env();
const vrf = new Orao(provider);

// Request using a random seed.
const [seed, tx] = await vrf.request().rpc();
console.log("Your transaction is " + tx);

// Await fulfilled randomness (default commitment is "finalized"):
const randomness = await vrf.waitFulfilled(seed);
console.log("Your randomness is " + randomness.fulfilled());

Readme

Keywords

none

Package Sidebar

Install

npm i @orao-network/solana-vrf

Weekly Downloads

0

Version

0.2.7-O

License

ISC

Unpacked Size

405 kB

Total Files

11

Last publish

Collaborators

  • oraodevs