voter-stake-registry-client/README.md

34 lines
1005 B
Markdown
Raw Permalink Normal View History

2022-01-10 01:15:38 -08:00
# deprecated, contents merged with https://github.com/blockworks-foundation/voter-stake-registry
2022-01-09 00:17:32 -08:00
# voter-stake-registry-client
typsecript client for https://github.com/blockworks-foundation/voter-stake-registry
2022-01-09 00:18:06 -08:00
# development
node version v16.13.1
2022-01-09 22:21:03 -08:00
# 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);
```
2022-01-09 22:21:20 -08:00
<img width="708" alt="image" src="https://user-images.githubusercontent.com/89031858/148725266-29459e80-623e-45c4-952d-5d9d1f0f15bc.png">