2.0.0 • Published 11 months ago
@schain/web3.js v2.0.0
Schain JavaScript SDK (v1.x)
Use this to interact with accounts and programs on the Schain network through the Schain JSON RPC API
Installation
For use in Node.js or a web application
$ npm install --save @schain/web3.js@1For use in a browser, without a build system
<!-- Development (un-minified) -->
<script src="https://unpkg.com/@schain/web3.js@latest/lib/index.iife.js"></script>
<!-- Production (minified) -->
<script src="https://unpkg.com/@schain/web3.js@latest/lib/index.iife.min.js"></script>Compatibility
This library requires a JavaScript runtime that supports BigInt and the exponentiation operator. Both are supported in the following runtimes:
- Browsers, by release date:
- Chrome: May 2018
- Firefox: July 2019
- Safari: September 2020
- Mobile Safari: September 2020
- Edge: January 2020
- Opera: June 2018
- Samsung Internet: April 2019
- Runtimes, by version:
- Deno: >=1.0
- Node: >=10.4.0
- React Native:
- >=0.7.0 using the Hermes engine (integration guide):
Development environment setup
Testing
Unit tests
To run the full suite of unit tests, execute the following in the root:
$ npm testIntegration tests
Integration tests require a validator client running on your machine.
To install a test validator:
$ npm run test:live-with-test-validator:setupTo start the test validator and run all of the integration tests in live mode:
$ cd packages/library-legacy
$ npm run test:live-with-test-validator