solana-program-library/stake-pool/js
Athar Mohammad 2198ee068b
Extends withdraw functionality in stake pool (#3445)
* extends withdraw to merge if stake account is provided

* check if account is stake account and delegated to same validator

* fixing tests and defining withdraw accounts for delegated stake reciever

* implementation improvements in cli

* fix js tests

* added test for uninitialized stake account
2022-08-22 23:36:13 +02:00
..
src Extends withdraw functionality in stake pool (#3445) 2022-08-22 23:36:13 +02:00
test Extends withdraw functionality in stake pool (#3445) 2022-08-22 23:36:13 +02:00
.eslintignore stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
.eslintrc.js stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
.gitignore stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
.prettierrc.js stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
README.md Add stake-pool browser build commands and documentation (#2804) 2022-01-28 19:15:51 +01:00
package-lock.json stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
package.json CI: Add `--max-warnings 0` to eslint to abort on errors (#3254) 2022-06-16 09:39:55 -04:00
rollup.config.js stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00
tsconfig.json stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05:00

README.md

TypeScript bindings for stake-pool program

For use with both node.js and in-browser.

Installation

npm install

Build and run

In the js folder:

npm run build

The build is available at dist/index.js (or dist.browser/index.iife.js in the browser).

Browser bundle

<!-- Development (un-minified) -->
<script src="https://unpkg.com/@solana/spl-stake-pool@latest/dist.browser/index.iife.js"></script>

<!-- Production (minified) -->
<script src="https://unpkg.com/@solana/spl-stake-pool@latest/dist.browser/index.iife.min.js"></script>

Test

npm test

Usage

JavaScript

const solanaStakePool = require('@solana/spl-stake-pool');
console.log(solanaStakePool);

ES6

import * as solanaStakePool from '@solana/spl-stake-pool';
console.log(solanaStakePool);

Browser bundle

// `solanaStakePool` is provided in the global namespace by the script bundle.
console.log(solanaStakePool);