1.3.14 • Published 6 years ago

@aneopsy/linniajs v1.3.14

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
6 years ago

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
1.3.14

6 years ago

1.3.13

6 years ago

1.3.12

6 years ago

1.3.11

6 years ago

1.3.10

6 years ago

1.3.8

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.0

6 years ago

1.0.16

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

0.1.5

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago