2.0.5 • Published 2 years ago

lgcyweb v2.0.5

Weekly downloads
11
License
ISC
Repository
-
Last release
2 years ago

What is LgcyWeb?

LgcyWeb aims to deliver a unified, seamless development experience influenced by Ethereum's Web3 implementation.

Compatibility

  • Version built for Node.js v6 and above

You can access either version specifically from the dist folder.

LgcyWeb is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue.

Installation

Node.js

npm install lgcyweb

Browser

First, don't use the release section of this repo, it has not updated in a long time.

Then easiest way to use LgcyWeb in a browser is to install it as above and copy the dist file to your working folder. For example:

cp node_modules/lgcyweb/dist/LgcyWeb.js ./js/lgcyweb.js

so that you can call it in your HTML page as

<script src="./js/lgcyweb.js"><script>

Creating an Instance

First off, in your javascript file, define LgcyWeb:

const LgcyWeb = require('lgcyweb')

FullHost defines fullNode and solidityNode while the eventServer is specified, and the privateKey is passed separately.

const lgcyWeb = new LgcyWeb({
    fullNode: 'http://<ip>:<portnumber>',
    solidityNode: 'http://<ip>:<portnumber>'
    eventServer: 'http://<ip>:<portnumber>',
    privateKey: '...'
  }
)

Contributions

In order to contribute you can

  • fork this repo and clone it locally
  • install the dependencies — npm i
  • do your changes to the code
  • build the LgcyWeb dist files — npm run build