Javascript SDK of WoopChain protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
dependabot[bot] a81045946a
Bump node-fetch from 2.6.0 to 2.6.1 in /packages/harmony-transaction
4 years ago
docs update readme 5 years ago
e2e fix broken e2e test 4 years ago
examples v0.1.55 4 years ago
packages Bump node-fetch from 2.6.0 to 2.6.1 in /packages/harmony-transaction 4 years ago
scripts feat(test):add more test and remove unused function 5 years ago
typings fix(keystore):compatible with node 12 5 years ago
.babelrc [WIP] add dependencies 6 years ago
.env v0.1.46 5 years ago
.env.example fix(contract): fix getContractAddress 5 years ago
.eslintignore [feat] update a lot 6 years ago
.gitignore package-lock.json should not be ignored by gitignore 4 years ago
.prettierignore [WIP] add dependencies 6 years ago
.prettierrc feat(Provider): added a Provider to get Http and WS Provider easier 5 years ago
.travis.yml update travis yml to install lerna as dev dependency 5 years ago
.yarnrc fix(publisher):update .yarnrc to prevent npm registry problem 5 years ago
LICENSE [feat] update LICENSE 6 years ago
README.md Update README.md 4 years ago
RELEASE.md Improve README with clear examples throughout packages 4 years ago
gulpfile.js adding sendTrasaction for staking and refactoring common code between Transaction and StakingTransaction to TransactionBase for code reuse 5 years ago
lerna.json v0.1.55 4 years ago
package-lock.json udpate package lock json files by running npm install 4 years ago
package.json Finished revamped the package: harmony-core 5 years ago
tsconfig.base.json added harmony-network and new bundler 6 years ago
tsconfig.e2e.json wip(e2e): add e2e tests 5 years ago
tsconfig.json beautify index page and simplify the navigation bar, add annotation to each page for next comments work 5 years ago
tsconfig.test.json chore(transaction):rename base.ts to transactionBase.ts, and fix build script 5 years ago
tslint.json [WIP] add dependencies 6 years ago

README.md

Harmony JavaScript API

npm version Build Status

This is the Harmony javascript library which provides an easier way to interact with Harmony's blockchain.

This libraries contains a few packages.

  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

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. .env file defines configuration, edit if you have custom settings

  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