4b908b3993 | ||
---|---|---|
examples | ||
src | ||
.eslintrc.json | ||
.gitignore | ||
README.md | ||
package.json | ||
run-publish.sh | ||
tsconfig.json | ||
yarn.lock |
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);