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.
Raptor
44d58f1ba1
|
4 years ago | |
---|---|---|
docs | 5 years ago | |
e2e | 5 years ago | |
examples | 4 years ago | |
packages | 4 years ago | |
scripts | 5 years ago | |
typings | 5 years ago | |
.babelrc | 6 years ago | |
.env | 5 years ago | |
.env.example | 5 years ago | |
.eslintignore | 6 years ago | |
.gitignore | 6 years ago | |
.prettierignore | 6 years ago | |
.prettierrc | 5 years ago | |
.travis.yml | 5 years ago | |
.yarnrc | 5 years ago | |
LICENSE | 6 years ago | |
README.md | 4 years ago | |
RELEASE.md | 4 years ago | |
gulpfile.js | 5 years ago | |
lerna.json | 4 years ago | |
package.json | 5 years ago | |
tsconfig.base.json | 6 years ago | |
tsconfig.e2e.json | 5 years ago | |
tsconfig.json | 5 years ago | |
tsconfig.test.json | 5 years ago | |
tslint.json | 6 years ago |
README.md
Harmony JavaScript API
This is the Harmony javascript library which provides an easier way to interact with Harmony's blockchain.
This libraries contains a few packages.
- @harmony-js/core
- @harmony-js/account
- @harmony-js/crypto
- @harmony-js/network
- @harmony-js/utils
- @harmony-js/transaction
- @harmony-js/contract
- @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
-
.env
file defines configuration, edit if you have custom settings -
Run harmony node locally, follow the instructions: https://github.com/harmony-one/harmony
-
Wait for 1-2 mins, and run this:
yarn build && yarn test:e2e