Meter Docs
Learn
  • Welcome to Meter!
  • 中文版文档
  • Overview of Meter
    • Introduction to Meter
    • Hybrid PoV Consensus Mechanism
    • MTR - The Metastable Coin
    • MTRG - Meter Governance Coin
    • On-Chain Auctions
    • The Meter Reserve
    • Meter's Ethereum Emulation Mode
  • Wallet Setup
    • Interacting with Meter Mainnet Using MetaMask
    • Interacting with Meter Mainnet Using Ledger
    • Adding Custom Tokens to MetaMask
    • Getting MTR for Gas
    • Revoking Contract Spend Limits
    • Specifying gas (GWEI) for transactions
    • Speeding Up/ Canceling Transactions
  • Meter Passport V2.0
    • Meter Passport Architecture
    • Salient Features
    • Bridge Fee
    • Programming Meter Passport
    • Tutorials for Using Meter Passport
    • MTRG Crosschain Info
    • Onboarding Passport for Your Project
    • Technical Guideline for Meter Passport
    • Security Audit for Meter Passport V2.0
  • Staking and Validation
    • Staking MTRG
      • How to Stake MTRG
        • Choosing Candidates
        • Factors affecting Staking Rewards
      • How to Stake Incremental MTRG
      • How to Undelegate MTRG
      • How to Unbound MTRG
      • Frequently Asked Questions
    • Running a Full Node on Meter Mainnet
    • Configure the Full Node to Validator Node
    • Meter Incentive Programs to promote decentralization
  • Mining
    • Meter Mining Guide
  • NFT Collections
    • Meter Community NFTs
  • Developer Documentation
    • Meter Developer Incentives
      • Meter Developer Grant Program
      • Meter TVL Incentive Program
      • Meter Gas Monetization Program
      • Meter Co-marketing Program
      • Meter DAPP Referral Program
    • Introduction to Developer Documentation
    • Developing with Remix, Ethers.js and Web3.js
    • Index Data with SubQuery
    • Meter Native TX RESTful APIs
    • Meterify API Documentation
      • meterify.eth
      • meterify.eth.Contract
      • meterify.eth.accounts
      • meterify.utils
      • meterify.module.options
      • Callbacks Promises Events
      • json interface
    • Meterify DApp Tutorials
    • Meterify Code Examples
    • Contributing to Meter and Our Documentation
      • Documentation Guidelines
        • API Documentation Guidelines
        • Tutorial Creation Guidelines
        • Code Example Guidelines
        • Article Writing Guidelines
Powered by GitBook
On this page
  • RESTful API (Ignore if you use Ethereum RPC toolchains)
  • API Documentation
  • Guides and Tutorials
  • Other Resources

Was this helpful?

  1. Developer Documentation

Meter Native TX RESTful APIs

RESTful API (Ignore if you prefer Ethereum RPC toolchains) This is the native interface (the tx format is slightly different from Ethereum tx and supports enhanced features like parallel transactions

PreviousIndex Data with SubQueryNextMeterify API Documentation

Last updated 2 years ago

Was this helpful?

RESTful API (Ignore if you use Ethereum RPC toolchains)

This is the native interface (the tx format is slightly different from Ethereum tx and supports enhanced features like parallel sending and etc.) for Meter and is directly supported by Meter node on port 8669. There is an additional mainnet endpoint at

You are able to access all of our functionality and create Meter native transactions through this interface. We have implemented an Ethereum web3 compatible interface library called meterify.

In order to install Meterify run the following commands:

npm install meterify

Using the code below you can create a web3 instance. You are then able to use the Ethereum web3 interfaces to interact with the Meter mainnet.

const meterify = require(“meterify”).meterify;
const Web3 = require(“web3");
const web3 = meterify(new Web3(), “https://mainnet.meter.io”);

API Documentation

The focuses on the use of the meterify library to develop DApps for the Meter blockchain through the native RESTful API interface. The RESTful API uses the native Meter TX format instead of the Ethereum TX format and is not compatible with existing Ethers.js, Web3.js, or web3j libraries. Therefore meterifywas created to bridge the gap. Similarly, there is a library that is similar to web3j library for integrating with Java clients.

meterify is a node.js package. It provides interfaces almost the same as the well-known web3.jslibrary and much of its relevant open-source documentation have been merged with information more specific to Meter. Using meterify generates native Meter transactions and is more direct than using web3.js through the RESTful interface.

The meterify.js library uses the http restful API. You could either use your own node or interact with a full node on the Meter mainnet/testnet.

Restful API endpoints:

Local: http://node_ip:8669

Mainnet: https://mainnet.meter.io

Testnet: https://testnet.meter.io

To get started with the meterify.js library, we first need to install it using the following command:

npm install meterify

Once done, the simplest setup to start using the library and its methods is the following:

const meterify = require("meterify").meterify;
const Web3 = require("web3");
const web3 = meterify(new Web3(), "RPC_URL");

Guides and Tutorials

Other Resources

Several guides and tutorials have been written to explain how to work with the Meter blockchain through meterify. They cover development topics, such as .

https://mainnet.meter.io
API documentation
Meter-SDK4j
how to build DApps and work with smart contracts
Request test tokens
Read the whitepaper
Meterify web3 GitHub repository
Java library for Native TX Meter-SDK4j