For use with both node.js and in-browser.
npm install
In the js
folder:
npm run build
The build is available at dist/index.js
(or dist.browser/index.iife.js
in the browser).
<!-- 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>
npm test
const solanaStakePool = require('@solana/spl-stake-pool');
console.log(solanaStakePool);
import * as solanaStakePool from '@solana/spl-stake-pool';
console.log(solanaStakePool);
// `solanaStakePool` is provided in the global namespace by the script bundle.
console.log(solanaStakePool);