@nordic-energy/nordicenergy-sdk
v1.0.0
Published
skd, protocol
Downloads
1
Readme
Nordic Energy JavaScript SDK
This is the Nordic Energy Javascript SDK which provides an easier way to interact with Nordic Energy blockchain.
Please read the documentation for full API doc.
The SDK includes following packages with package-level documentation and examples inside each package.
- @nordicenergy-js/core
- @nordicenergy-js/account
- @nordicenergy-js/crypto
- @nordicenergy-js/network
- @nordicenergy-js/utils
- @nordicenergy-js/transaction
- @nordicenergy-js/contract
- @nordicenergy-js/staking
Examples
- A Token Faucet Demo DApp
- Cross-chain Apps [the link contains code, demo, and more information]
- DeFi Apps
- DevPost Hackathon Apps
- Eth<>Nordic Energy Bridge Components: frontend, backend, smart contracts, test scripts
- Eth<>nordicenergy bridge SDKs: main sdk, bridge UI widget
Under construction
- BitFinance Dex: interface, cli, sdk, deployment, misc, lib, periphery, core, testing, utils
- Bridge: inspired from near's rainbow bridge
- Chainlink Testnet Integration Demo
- NFT Store DApp
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 @nordicenergy-js/core@next
# yarn
yarn add @nordicenergy-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 settingsRun nordicenergy node locally, follow the instructions: https://github.com/nordicenergy/nordicenergy-sdk
Wait for 1-2 mins, and run this:
yarn build && yarn test:e2e