2.0.0 • Published 11 months ago

@schain/web3.js v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

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@1

For 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:

Development environment setup

Testing

Unit tests

To run the full suite of unit tests, execute the following in the root:

$ npm test

Integration tests

Integration tests require a validator client running on your machine.

To install a test validator:

$ npm run test:live-with-test-validator:setup

To 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