From 363660c00af7f6ef3db90b09d8577083772e91eb Mon Sep 17 00:00:00 2001 From: microwavedcola1 <89031858+microwavedcola1@users.noreply.github.com> Date: Mon, 10 Jan 2022 07:21:03 +0100 Subject: [PATCH] Update README.md --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63a90bd..3deaec7 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,32 @@ typsecript client for https://github.com/blockworks-foundation/voter-stake-regis # development node version v16.13.1 -## TODO: -publish npm package under @blockworks-foundation +# installation + +``` + +yarn add @blockworks-foundation/voter-stake-registry-client + +``` + +# usage + +``` +import { Provider, Wallet } from '@project-serum/anchor'; +import { Connection, Keypair } from '@solana/web3.js'; +import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client'; + +async function main() { + const options = Provider.defaultOptions(); + const connection = new Connection('https://api.devnet.solana.com', options); + const wallet = new Wallet(Keypair.generate()); + const provider = new Provider(connection, wallet, options); + const client = await VsrClient.connect(provider, true); + + image + +} + +main(); + +```