Note
This documentation is for a work currently in progress and medjs 1.0 is not yet released.
medjs¶
var Medjs = require('medjs');
var medjs = Medjs.init(['http://localhost:9921']);
The medjs
object has following objects.
- The client object allows you to interact with MediBloc blockchain.
- The cryptography object contains cryptographic functions.
- The local.Account object contains functions to generate MediBloc accounts, which contain encrypted private key and public key and can induce public key from the private key.
- The local.transaction object contains functions to generate transaction.
- The healthData object helps to encode and decode the health data as MHD format.
- The identification contains identification functions.
- The utils object provides utility functions for medjs.
Parameters¶
nodes
- Array
: The array of node URL that will be used for the request.
Hint
The medjs client sends a request to one of the nodes. If the request fails, it automatically retries the request to another node.
Note
You can test the library by running the MediBloc blockchain on a local machine as Testnet or Mainnet are not yet launched. Please refer to go-medibloc to run MediBloc blockchain on a local machine.