Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
microwavedcola1 | 4b908b3993 | |
microwavedcola1 | dbd676819a | |
microwavedcola1 | 44562050a4 | |
microwavedcola1 | 363660c00a | |
microwavedcola1 | d06091807b | |
microwavedcola1 | ba9b204bf5 | |
microwavedcola1 | e4397b9ae9 | |
microwavedcola1 | f85577fca2 | |
microwavedcola1 | d647c7545e | |
microwavedcola1 | 163884259a | |
microwavedcola1 | 3db82df7b5 |
|
@ -1,4 +1,6 @@
|
|||
lib
|
||||
dist
|
||||
node_modules
|
||||
|
||||
yarn-error.log
|
||||
|
||||
.idea
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
# 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);
|
||||
```
|
||||
|
||||
<img width="708" alt="image" src="https://user-images.githubusercontent.com/89031858/148725266-29459e80-623e-45c4-952d-5d9d1f0f15bc.png">
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"name": "@microwavedcola/voter-stake-registry-client",
|
||||
"version": "0.1.3",
|
||||
"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",
|
||||
"repository": "https://github.com/blockworks-foundation/voter-stake-registry-client",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"postinstall": "tsc",
|
||||
"clean": "rm -rf lib",
|
||||
"prepare": "yarn clean && yarn build",
|
||||
"type-check": "tsc --pretty --noEmit",
|
||||
"format": "prettier --check .",
|
||||
"lint": "eslint . --ext ts --ext tsx --ext js --quiet"
|
||||
},
|
||||
"author": {
|
||||
"name": "Blockworks Foundation",
|
||||
"email": "hello@blockworks.foundation",
|
||||
"url": "https://blockworks.foundation"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/recommended": "^1.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.14.2",
|
||||
"@typescript-eslint/parser": "^4.14.2",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-config-prettier": "^7.2.0",
|
||||
"prettier": "^2.0.5",
|
||||
"ts-node": "^9.1.1",
|
||||
"typedoc": "^0.22.5",
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
},
|
||||
"dependencies": {
|
||||
"@project-serum/anchor": "^0.18.0",
|
||||
"@project-serum/serum": "^0.13.61"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microwavedcola/voter-stake-registry-client",
|
||||
"version": "0.1.2",
|
||||
"name": "@blockworks-foundation/voter-stake-registry-client",
|
||||
"version": "0.1.1",
|
||||
"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",
|
||||
|
@ -8,8 +8,7 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"postinstall": "tsc",
|
||||
"clean": "rm -rf lib",
|
||||
"prepare": "yarn clean && yarn build",
|
||||
"clean": "rm -rf dist",
|
||||
"type-check": "tsc --pretty --noEmit",
|
||||
"format": "prettier --check .",
|
||||
"lint": "eslint . --ext ts --ext tsx --ext js --quiet"
|
||||
|
@ -30,6 +29,9 @@
|
|||
"typedoc": "^0.22.5",
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
yarn clean && yarn build && cp package.json ./dist/ && yarn publish dist
|
||||
|
|
@ -2,17 +2,18 @@
|
|||
"extends": "@tsconfig/recommended/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"outDir": "./lib",
|
||||
"target": "es6",
|
||||
"lib": ["es2019"],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "dist",
|
||||
"declarationMap": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["es2019"],
|
||||
"noImplicitAny": false,
|
||||
"outDir": "dist",
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true
|
||||
"target": "es6"
|
||||
},
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": ["./src/**/*.test.js", "node_modules", "**/node_modules"]
|
||||
|
|
Loading…
Reference in New Issue