Go to file
microwavedcola1 4b908b3993
Update README.md
2022-01-10 10:15:38 +01:00
examples First commit 2022-01-09 07:59:08 +01:00
src set known devnet address 2022-01-09 08:03:12 +01:00
.eslintrc.json First commit 2022-01-09 07:59:08 +01:00
.gitignore fix packaging instructions 2022-01-09 09:14:51 +01:00
README.md Update README.md 2022-01-10 10:15:38 +01:00
package.json published to npm, cleaned up publish script 2022-01-10 07:18:33 +01:00
run-publish.sh published to npm, cleaned up publish script 2022-01-10 07:18:33 +01:00
tsconfig.json fix packaging instructions 2022-01-09 09:14:51 +01:00
yarn.lock First commit 2022-01-09 07:59:08 +01:00

README.md

deprecated, contents merged with https://github.com/blockworks-foundation/voter-stake-registry

voter-stake-registry-client

typsecript client for https://github.com/blockworks-foundation/voter-stake-registry

development

node version v16.13.1

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