Meter Docs
Search…
API Documentation Guidelines
The Meter API documentation focuses on the use of the meterify library, which is a modified version of web3. The content is a combination of the web3 documentation, and content specific to meterify and the Meter blockchain.
All API documentation should be written to reflect meterify. So where existing content that has been ported web3 is mentioned, this should be replaced to the greatest extent possible with meterify. Some code snippets provide a good example of these kinds of changes.
web3
1
import Web3 from 'web3';
2
3
// "Web3.givenProvider" will be set in a Ethereum supported browser.
4
const web3 = new Web3(Web3.givenProvider || 'ws://some.local-or-remote.node:8546', net, options);
5
6
web3.version
Copied!
meterify
1
const meter = require("meterify").meterify;
2
const Web3 = require("web3");
3
const meterify = meter(new Web3(), "http://test.meter.io:8669");
4
5
meterify.version
Copied!
Another example, where web3 content might read:
1
For `web3.eth.subscribe` see the [`subscribe`](web3.eth.subscribe.html) reference documentation.
Copied!
Modify it to read:
1
For `meterify.eth.subscribe` see the [`subscribe`](meterify.eth.subscribe.html) reference documentation.
Copied!
Copy link