1.0.0-delta.30 • Published 3 years ago

@vapory/web3-vap-contract v1.0.0-delta.30

Weekly downloads
104
License
LGPL-3.0
Repository
github
Last release
3 years ago

web3-vap-contract

This is a sub package of web3.js

This is the contract package to be used in the web3-vap package. Please read the documentation for more.

Installation

Node.js

npm install web3-vap-contract

In the Browser

Build running the following in the web3.js repository:

npm run-script build-all

Then include dist/web3-vap-contract.js in your html file. This will expose the Web3VapContract object on the window object.

Usage

// in node.js
var Web3VapContract = require('@vapory/web3-vap-contract');

// set provider for all later instances to use
Web3VapContract.setProvider('ws://localhost:8546');

var contract = new Web3VapContract(jsonInterface, address);
contract.methods.somFunc().send({from: ....})
.on('receipt', function(){
    ...
});