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

0.1.7 • Public • Published

VRF for Aptos JS SDK

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

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

Randomness request

const oraoVrf = new OraoVrfClient(NODE_URL);
const seed = new Uint8Array(randomBytes(32));
const alice = new AptosAccount();

const txnHash = await oraoVrf.waitFulfilled(alice, seed);
await oraoVrf.aptosClient.waitForTransaction(txnHash);
console.log("Your transaction hash is", txnHash);

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

Example app

An example frontend app that uses ORAO VRF is available in the examples section. The library interacts with Pontem wallet through a React frontend. Alternatively you can check out our ]frontend demo using testnet](https://developdemo.orao.network/) and Pontem wallet.

Install

DownloadsWeekly Downloads

8

Version

0.1.7

License

ISC

Unpacked Size

9.47 kB

Total Files

8

Last publish

Collaborators

  • oraodevs