OpenVASP Client
OpenVASP Typescript Library
Documentation: https://notabene-id.github.io/openvasp-node-client/
Getting OpenVASP Client Library
To install:
$ npm i --save openvasp-client
Usage
Create a VASP Contract
A VASPCode with the corresponding VASP contract (to store the handshake and signing keys) needs to be created to use OpenVASP.
To create a VASPCode and Contract:
; //Create a random VASP Codeconst vaspCode = Tools; //Initialize VASP Factorycont vaspFactory = rpcUrl: processenvNODE_URL // "https://rinkeby.infura.io/", privateKey: processenvPRIVATE_KEY //0x.... vaspIndexAddress: processenvVASP_INDEX_ADDRESS //0x.... //Create VASPconst ret = vaspFactory; /* ret = { vaspAddress: "0x...", // Address of deployed VASP contract handshakeKeys: { //Handshake Keys privateKey: "0x...", publicKey : "0x...", } signingKeys:{ // Signing Keys privateKey: "0x...", publicKey : "0x...", } } */
Tool
; const vaspAddress = "0x36D706A02fE35C64Ba21cF7Ed51695FC8DD00E63";const vaspCode = Tools;
Development
Instal dependencies
$ npm install
Build
$ npm run build
Test
$ npm test
To publish to NPM:
$ pika publish
To publish dosc:
$ npm run docs
Contributing
Contributions are welcome!
Want to file a bug, request a feature or contribute some code?
- Check out the Code of Conduct
- Check that there is no existing issue corresponding to your bug or feature
- Before implementing a new feature, discuss your changes in an issue first!
License
MIT © Notabene