Compare commits

...

11 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
microwavedcola1 d06091807b published to npm, cleaned up publish script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-10 07:18:33 +01:00
microwavedcola1 ba9b204bf5 publish script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-10 07:13:43 +01:00
microwavedcola1 e4397b9ae9 reset version
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-09 09:25:14 +01:00
microwavedcola1 f85577fca2
Update README.md 2022-01-09 09:18:06 +01:00
microwavedcola1 d647c7545e
Create README.md 2022-01-09 09:17:32 +01:00
microwavedcola1 163884259a remove dist
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-09 09:16:24 +01:00
microwavedcola1 3db82df7b5 fix packaging instructions
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-09 09:14:51 +01:00
6 changed files with 53 additions and 51 deletions

4
.gitignore vendored
View File

@ -1,4 +1,6 @@
lib
dist
node_modules
yarn-error.log
.idea

33
README.md Normal file
View File

@ -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">

42
dist/package.json vendored
View File

@ -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"
}

View File

@ -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"

6
run-publish.sh Executable file
View File

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

View File

@ -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"]