@dhealthdapps/bridge-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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:

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

Readme

Keywords

none

Package Sidebar

Install

npm i @dhealthdapps/bridge-sdk

Weekly Downloads

1

Version

1.2.1

License

LGPL-3.0-only

Unpacked Size

204 kB

Total Files

94

Last publish

Collaborators

  • dhealthbot
  • evias.be