1.2.1 • Published 3 years ago

@dhealthdapps/bridge-sdk v1.2.1

Weekly downloads
-
License
LGPL-3.0-only
Repository
github
Last release
3 years ago

dHealth Bridge SDK

npm-badge dl-badge License

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:

ClassDescription
BridgeClass that accepts a root extended public key in the constructor and derives child accounts for Ethereum.
AmountClass that wraps amounts for safe usage and arithmetic operations.
´SafeNumber| Class for using big integer numbers using Javascript (bignumber.js`).
CatapultAddressClass that generates catapult addresses from public keys.
EthereumAddressClass that generates ethereum addresses from public keys.
MultisigSetupTransactionHelper class that creates multi-signature setup transactions.
HttpClientClass that implements a HTTP client for the bridge cloud functions.
ExpectedSwapDTOInterface that defines the structure of incomplete swaps.
SwapDTOInterface 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