Javascript library for the protocol.2.0 smart contracts
yarn add lendroid-2-js
// or
npm install --save lendroid-2-js
for the specific versions check on Releases
import { Lendroid } from 'lendroid-2-js'
const options = {
provider: window.web3.currentProvider,
[coming]: comingEvents,
}
const LendroidJS = new Lendroid(options)
// properties
const { ...properties } = LendroidJS
// methods
const methods = {
[method]: LendroidJS['methodName'],
...methods,
}-
First clone repository and install dependencies (
npm install)
Protocol Command HTTPS git clone https://github.com/lendroidproject/lendroid-js.gitSSH git clone [email protected]:lendroidproject/lendroid-js.git
-
On UI, update
package.jsonto use custom library as follow and install dependencies (npm install)"dependencies": { ... "lendroid-2-js": "../lendroid-2-js", ... } -
To update library, go to
lendroid-2-jsand runtsc -
Copy
distfolder to<path-to-ui>/node_modules/lendroid-2-js/