This is an official Node.js module from Universa to facilitate access to the Java library using Universa's UMI protocol.
- Node 8+
- JVM v1.8* must be installed to run the UMI tool. Java runtimes for different OSes could be downloaded from https://www.java.com/en/download/.
This library is distributed on npm. In order to add it as a dependency, run the following command:
$ npm i --save universa
const { PrivateKey, Contract } = require('universa');
async function main () {
const privateKey = await PrivateKey.create(2048);
const contract = await Contract.create(privateKey);
await contract.seal();
console.log(`Contract is ok: ${await contract.check()}`);
console.log(`Contract id: ${await (await contract.getId()).toString()}`)
}
main();
- Clone the repo
$ git clone https://gitlab.com/universa/universa.git && cd universa
- Install the dependencies
$ npm install
- Run the tests:
$ npm test
- Universa Java API: https://kb.universablockchain.com/general_java_api/5
- Universa UMI server: https://kb.universablockchain.com/umi_protocol/98
- Universa Ruby gem: https://github.com/sergeych/universa
- Universa Python package: https://github.com/vkovrigin/universa
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details.