universa-umi
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.6 • Public • Published

Universa

This is an official Node.js module from Universa to facilitate access to the Java library using Universa's UMI protocol.

Get started

Prerequisites

Installing

This library is distributed on npm. In order to add it as a dependency, run the following command:

$ npm i --save universa-umi

Usage

const { PrivateKey, Contract } = require('universa-umi');

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();

Running the tests

  • Clone the repo
    $ git clone https://gitlab.com/universa/universa.git && cd universa
  • Install the dependencies
    $ npm install
  • Run the tests:
    $ npm test

Acknowledgments

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Built with

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Dependencies (4)

Dev Dependencies (17)

Package Sidebar

Install

npm i universa-umi

Weekly Downloads

1

Version

1.0.0-beta.6

License

MIT

Unpacked Size

23 MB

Total Files

128

Last publish

Collaborators

  • tsabolov