4.1.0 • Published 2 years ago

hrcryptoweb v4.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

What is HrcryptoWeb?

Hrcrypto Web - Developer Document

HrcryptoWeb aims to deliver a unified, seamless development experience influenced by Ethereum's Web3 implementation. We have taken the core ideas and expanded upon it to unlock the functionality of HRCRYPTO's unique feature set along with offering new tools for integrating DApps in the browser, Node.js and IoT devices.

Compatibility

  • Version built for Node.js v6 and above
  • Version built for browsers with more than 0.25% market share

You can access either version specifically from the dist folder.

HrcryptoWeb is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue.

You can also ship HrcryptoWeb in a Chrome extension.

Installation

Node.js

npm install hrcryptoweb

or

yarn add hrcryptoweb

Browser

First, don't use the release section of this repo, it has not updated in a long time.

Then easiest way to use HrcryptoWeb in a browser is to install it as above and copy the dist file to your working folder. For example:

cp node_modules/hrcryptoweb/dist/HrcryptoWeb.js ./js/hrcryptoweb.js

so that you can call it in your HTML page as

<script src="./js/hrcryptoweb.js"><script>

Creating an Instance

First off, in your javascript file, define HrcryptoWeb:

If you are using different servers for anything, you can do

const hrcryptoWeb = new HrcryptoWeb({
    fullNode: 'https://some-node.tld',
    solidityNode: 'https://some-other-node.tld',
    eventServer: 'https://some-event-server.tld',
    privateKey: 'your private key'
  }
)

Contributions

In order to contribute you can

  • fork this repo and clone it locally
  • install the dependencies — npm i
  • do your changes to the code
  • build the HrcryptoWeb dist files — npm run build
  • run the tests — npm test:node

Licence

HrcryptoWeb is distributed under a MIT licence.