Blockchainiz is a platform to access the blockchain. It is dedicated to banks and insurance companies. This package is a node library to interact more easily with the Blockchainiz API.
Installation
Simply use NPM with the following command:
npm install blockchainiz --save
This will download the package and add an entry in your project's package.json file.
Setup
In your project's source code, you need to start by importing the blockchainiz package and specify the options you want to use:
constblockchainiz=require('blockchainiz')({
publicKey:'your public key',
privateKey:'your private key',
useSandbox:true,
});
There are 3 options that you can set. You NEED to specify them in order for the package to work:
Option
Type
Description
publicKey
string
Your Blockchainiz public key
privateKey
string
Your Blockchainiz private key
useSandbox
bool
True to use the sandbox version of the API
Reference REST API
Set the API key set to use
blockchainiz.setKeys(publicKey, privateKey);
Parameter
Type
Description
publicKey
string
The public key
privateKey
string
The private key
Set the version of the API to use
blockchainiz.useSandbox(shouldUseSandbox);
Parameter
Type
Description
shouldUseSandbox
bool
True to use the sandbox. False to use the production version
Format in which to return the result (allowed values: 'hex', 'base64', 'ascii')
The data parameter of the callback contains an array of objects. Each object represents a notary and follows the same format as in the method getNotary.
result will only be present if the function is constant and returns something.
txid will only be present if the function is not constant and so trigger an Ethereum transaction