@dhealthdapps/bridge-sdk
v1.2.1
Published
dHealth Bridge SDK: Development Kit for dHealth Unidirectional Bridge (ERC20-DHP:DHP)
Downloads
12
Readme
dHealth Bridge SDK
dHealth Bridge is a distributed bridge for ERC20-DHP Tokens (ethereum DHP) with dHealth Network DHP (native DHP). This software defines a Unidirectional Bridge for ERC20-DHP (Ethereum) to native DHP (dHealth).
This software package contains a Software Development Kit for operations with the dHealth Bridge.
Classes found here
Following classes are defined and exported with this library:
| Class | Description |
| --- | --- |
| Bridge
| Class that accepts a root extended public key in the constructor and derives child accounts for Ethereum. |
| Amount
| Class that wraps amounts for safe usage and arithmetic operations. |
| ´SafeNumber | Class for using big integer numbers using Javascript (
bignumber.js). |
|
CatapultAddress| Class that generates catapult addresses from public keys. |
|
EthereumAddress| Class that generates ethereum addresses from public keys. |
|
MultisigSetupTransaction| Helper class that creates multi-signature setup transactions. |
|
HttpClient| Class that implements a HTTP client for the bridge cloud functions. |
|
ExpectedSwapDTO| Interface that defines the structure of incomplete swaps. |
|
SwapDTO` | Interface that defines the structure of complete swaps. |
Development
Install the software with npm install @dhealthdapps/bridge-sdk
(add -d
to add it to devDependencies).
Unit tests can be run with npm run test
. The bridge SDK unit test intentionally includes unit tests that derive child account. Please, never use the unit tested extended keys in any production environment whatsoever.
License
Copyright 2021-present dHealth Network, All rights reserved.
Licensed under the LGPL v3.0