This package has been deprecated

Author message:

Rename

@aneopsy/linniajs
TypeScript icon, indicating that this package has built-in type declarations

1.3.14 • Public • Published

build status dependency status [npm downloads] code style: prettier

LinniaJS

Library for interacting with Linnia smart contracts

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

What things you need to install the software and how to install them

npm i @aneopsy/linniajs

Running the tests

A step by step series of examples that tell you have to get a development env running

Say what the step will be

npm run test

Or you can run an example:

npm run example

End with an example of getting some data out of the system or using it for a little demo

Running the lint tests

You can run the automated lint tests:

npm run pretest

Basic usage

Explain what these tests test and why

const Web3 = require("web3");
const LinniaJS = require("@aneopsy/linniajs");

const Linnia = new LinniaJS(new Web3.providers.HttpProvider(
  "https://rinkeby.infura.io"
));

// Get if is provider
Linnia.LinniaRolesContract.isProvider("0x1EA9034E15e3bec0467cEADC7dbC64A8ACf726A3")
  .call()
  .then(result => {
    if (result) {
      console.log("is provider");
    } else {
      console.log("is not provider");
    }
  });

Class & Methods

LinniaJs

Objects

  • LinniaRolesContract
  • LinniaPermissionsContract
  • LinniaRecordsContract

Methods

  • getWeb3()

LinniaRolesContract

Methods

Internal
  • getAddress()
  • getInstance()
  • getWeb3()
Call
  • isPatient(userAddress)
  • isProvider(userAddress)
  • provenance(userAddress)
Send
  • registerPatient()
  • registerProvider(userAddress)
  • removeProvider(userAddress)

LinniaPermissionsContract

Internal

  • getAddress()
  • getInstance()
  • getWeb3()
Call
  • isPatient(userAddress)
  • isProvider(userAddress)
  • provenance(userAddress)
Send
  • registerPatient()
  • registerProvider(userAddress)
  • removeProvider(userAddress)

LinniaRecordsContract

Internal

  • getAddress()
  • getInstance()
  • getWeb3()
Call
  • isPatient(userAddress)
  • isProvider(userAddress)
  • provenance(userAddress)
Send
  • registerPatient()
  • registerProvider(userAddress)
  • removeProvider(userAddress)

Deployment

Authors

  • Paul THEIS - Initial work - AneoPsy

License

This project is licensed under the MIT License.

Acknowledgments

  • Hat tip to anyone who's code was used
  • Inspiration
  • etc

Readme

Keywords

Package Sidebar

Install

npm i @aneopsy/linniajs

Weekly Downloads

1

Version

1.3.14

License

MIT

Unpacked Size

1.15 MB

Total Files

24

Last publish

Collaborators

  • aneopsy