Compare commits

...

4 Commits

Author SHA1 Message Date
microwavedcola1 4b908b3993
Update README.md 2022-01-10 10:15:38 +01:00
microwavedcola1 dbd676819a
Update README.md 2022-01-10 07:21:43 +01:00
microwavedcola1 44562050a4
Update README.md 2022-01-10 07:21:20 +01:00
microwavedcola1 363660c00a
Update README.md 2022-01-10 07:21:03 +01:00
1 changed files with 26 additions and 2 deletions

View File

@ -1,3 +1,5 @@
# 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
@ -5,5 +7,27 @@ 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);
```
<img width="708" alt="image" src="https://user-images.githubusercontent.com/89031858/148725266-29459e80-623e-45c4-952d-5d9d1f0f15bc.png">