Compare commits

..

No commits in common. "dbd676819a02841a75fbb895fe180b46c7c9436f" and "e4397b9ae9c7804d13a6da96a6fa96080cd7620e" have entirely different histories.

3 changed files with 5 additions and 34 deletions

View File

@ -5,27 +5,5 @@ typsecript client for https://github.com/blockworks-foundation/voter-stake-regis
# 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);
```
<img width="708" alt="image" src="https://user-images.githubusercontent.com/89031858/148725266-29459e80-623e-45c4-952d-5d9d1f0f15bc.png">
## TODO:
publish npm package under @blockworks-foundation

View File

@ -1,6 +1,6 @@
{
"name": "@blockworks-foundation/voter-stake-registry-client",
"version": "0.1.1",
"version": "0.1.0",
"description": "Client for Voter-stake-registry which is a voter weight addin for Solana's spl-governance program.",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@ -9,6 +9,8 @@
"build": "tsc",
"postinstall": "tsc",
"clean": "rm -rf dist",
"prepare": "yarn clean && yarn build",
"publish": "yarn prepare && cp package.json dist/ && yarn publish dist",
"type-check": "tsc --pretty --noEmit",
"format": "prettier --check .",
"lint": "eslint . --ext ts --ext tsx --ext js --quiet"
@ -29,9 +31,6 @@
"typedoc": "^0.22.5",
"typescript": "^4.1.3"
},
"publishConfig": {
"access": "public"
},
"prettier": {
"singleQuote": true,
"trailingComma": "all"

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
yarn clean && yarn build && cp package.json ./dist/ && yarn publish dist