solana/web3.js
Michael Vines 552f2f137a Update README.md 2020-06-14 21:57:04 -07:00
..
examples
flow-typed Add Connection class 2020-06-14 21:57:04 -07:00
src Mock Connection tests 2020-06-14 21:57:04 -07:00
test Add a couple of negative tests 2020-06-14 21:57:04 -07:00
.babelrc
.esdoc.json
.eslintignore Mock Connection tests 2020-06-14 21:57:04 -07:00
.eslintrc.js
.flowconfig
.gitignore
.npmignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md Update README.md 2020-06-14 21:57:04 -07:00
commitlint.config.js
jest.json
package-lock.json
package.json Add test:live script 2020-06-14 21:57:04 -07:00
release-process.md
rollup.config.js

README.md

Build status codecov esdoc npm

Solana JavaScript API

This is the Solana Javascript API built on the Solana JSON RPC API

Latest API Documentation

Installation

Yarn

$ yarn add @solana/web3.js

npm

$ npm install --save @solana/web3.js

Browser bundle

<script src="https://github.com/solana-labs/solana-web3.js/releases/download/v0.0.4/solanaWeb3.min.js"></script>

Usage

Javascript

const solanaWeb3 = require('@solana/web3.js');
console.log(solanaWeb3);

ES6

import solanaWeb3 from '@solana/web3.js';
console.log(solanaWeb3);

Browser bundle

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

Examples

See the examples/ directory for small snippets

A more complete web-based wallet example can be found at https://github.com/solana-labs/example-webwallet

Releases

Releases are available on Github and npmjs.com

Each Github release features a tarball containing API documentation and a minified version of the module suitable for direct use in a browser environment (<script> tag)