solana-program-library/stake-pool/js
Jon Cinque 79d2c606b8
CI: Add `--max-warnings 0` to eslint to abort on errors (#3254)
* CI: Add `--max-warnings 0` to eslint to abort on errors

* Fix lint issue
2022-06-16 09:39:55 -04:00
..
src stake-pool: Handle force destaked accounts (#3152) 2022-05-19 19:08:50 +02:00
test stake-pool: add bindings to js (#2806) 2022-02-22 22:41:18 -05: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);