Coder Social home page Coder Social logo

sdk's Introduction

Harmony JavaScript SDK

npm version Build Status

This is the Harmony Javascript SDK which provides an easier way to interact with Harmony blockchain.

Please read the documentation for full API doc.

The SDK includes following packages with package-level documentation and examples inside each package.

  1. @harmony-js/core
  2. @harmony-js/account
  3. @harmony-js/crypto
  4. @harmony-js/network
  5. @harmony-js/utils
  6. @harmony-js/transaction
  7. @harmony-js/contract
  8. @harmony-js/staking

Examples

Installation

This library works on both nodejs and browser. Please use it according to your use case.

Enviorment requirement

  • Nodejs: 10.0+
  • Browser: Latest Chrome and Firefox

Install from npm/yarn

Note: we added a @next tag to npm package, please use the following command to install with npm/yarn

# npm
npm install @harmony-js/core@next 

# yarn
yarn add @harmony-js/core@next

# tslib is required, we'd better install it as well
npm install tslib
yarn add tslib

Building from source files

Install lerna and typescript globally

yarn global add lerna && yarn global add typescript

Bootstrap and build

yarn bootstrap

Bundle

Build umd and esm version javascript for each sub-packages, which can be accessed by import or require

yarn dist

All files are exported in packages/dist folder, use **.esm.js or **.umd.js format

Running Tests

Unit tests

yarn test:src

e2e tests

  1. Remove the 'cross-fetch': 'jest-fetch-mock' line from scripts/jest/jest.e2e.config.js
  2. Run harmony node locally, follow the instructions: https://github.com/harmony-one/harmony
  3. Wait for 1-2 mins, and run this:
yarn build && yarn test:e2e

sdk's People

Contributors

artemkolodko avatar coolcottontail avatar daywednes avatar denniswon avatar dependabot[bot] avatar ethlocker avatar gupadhyaya avatar hirokryptor avatar isaacadams avatar kraikov avatar mattlockyer avatar neeboo avatar peekpi avatar polymorpher avatar renewwen avatar vinyl704 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.