---
title: "Node Gate API v2"
description: "Minter Node Gate API v2 reference and interactive playground (41 RPC methods): Protobuf3-JSON string typing, GET /v2/estimate_tx_commission/{tx}, and POST /v2/send_transaction."
track: "api"
lang: "en"
protocol: "Minter v3.3.0"
consensus: "Tendermint v0.34.19 + IAVL v0.17.3"
canonical_url: "https://docs.minter.network/api/node-gate-v2"
raw_markdown_url: "https://docs.minter.network/api/node-gate-v2.md"
---

# Node Gate API v2

> Minter Node Gate API v2 reference and interactive playground (41 RPC methods): Protobuf3-JSON string typing, GET /v2/estimate_tx_commission/{tx}, and POST /v2/send_transaction.

`node-grpc-gateway` exposes all `41` RPC methods of `Minter Go Node v3.3.0` over HTTP/JSON (`:28843/v2`) and gRPC (`:28842`). Every operation, parameter, and response schema is defined in [`/openapi/minter-gate-node-v2.yaml`](https://docs.minter.network/openapi/minter-gate-node-v2.yaml) and listed in the reference below. The Playground runs only public read methods. Use your own Minter node for full Node API access.

## Protobuf3-JSON typing and core endpoints

Under `protobuf-json` rules, `uint64` fields and `uint256 pip` amounts serialize as decimal strings:

- `code`, `height`, `latest_block_height`, `transaction_count`, `keep_last_states`, and nested `coin.id` arrive as strings (`tx.code === "0"`, `nextNonce = BigInt(addr.transaction_count) + 1n`). Calling `Number.isInteger(tx.code)` on raw Gate JSON evaluates to `false`.
- Array query parameters repeat the key name: `?addresses=Mx...&addresses=Mx...`, `?ids=1&ids=2`, `?fields=transactions&fields=missed`.
- Dry-run fee estimation uses `GET /v2/estimate_tx_commission/{tx}`, where `{tx}` is a `0x`-prefixed signed RLP hex string (the node does not expose `POST /v2/estimate_tx_commission`). The response returns the exact fee in `gasCoin` (`pip`), accounting for `Payload` / `ServiceData` length and `USDTE / BIP` pool conversion (see [paying fees in non-BIP coins](https://docs.minter.network/protocol/execution-and-fees#gas-coin)).
- `POST /v2/send_transaction` (`{"tx": "0x..."}`, alongside `GET /v2/send_transaction/{tx}`) is the sole mutating endpoint on the node.

> **[info] Finality:** `POST /v2/send_transaction` validates mempool admission (`CheckTx`) only; finality occurs after block commit (`DeliverTx`) with `code === "0"`.

A `code: "0"` response from `POST /v2/send_transaction` confirms mempool `CheckTx` admission only. Poll `GET /v2/transaction/{hash}` (or call `gate.waitForTransaction(txHash)`) to verify inclusion in a committed block with `code === "0"`. If `DeliverTx` fails (`code !== "0"`), the node deducts `FailedTx` without incrementing the sender's `Nonce`.

## Node Gate API v2 playground

Spec: https://docs.minter.network/openapi/minter-gate-node-v2.yaml

## Reading `nonce`, estimating fees, and broadcasting

#### TypeScript

```typescript
import {
  MinterGateClient,
  buildSendTx,
  formatPip,
  parsePip,
  signTx,
} from "@minter-network/tx-core";
import type { MinterWallet } from "@minter-network/tx-core";

// Supply these inputs from your application.
declare const senderWallet: MinterWallet;

const gate = new MinterGateClient(
  process.env.MINTER_GATE_URL ?? "https://gate.minter.network/v2",
);

// 1. Next valid nonce = BigInt(transaction_count) + 1n
const nonce = await gate.getNextNonce(senderWallet.address);

// 2. Build and sign Send (0x01) in USDTE (coinId: 1993, paying gas in coinId 1993)
const unsigned = buildSendTx(
  {
    coinId: 1993,
    to: "Mx6fac4d18c912343bf86fa7049364dd4e424ab9c0",
    valuePip: parsePip("10"),
  },
  {
    nonce,
    chainId: 1,
    gasPrice: 1,
    gasCoin: 1993,
    payload: "invoice:2026-9001",
  },
);

const signed = signTx(unsigned, senderWallet.privateKey);

// 3. Dry-run commission quote via GET /v2/estimate_tx_commission/{tx}
const quote = await gate.estimateTxCommission(signed.signedRawTxHex);
console.log("Estimated fee (USDTE):", formatPip(BigInt(quote.commission)));

// 4. Broadcast to mempool (CheckTx) and wait for block execution (DeliverTx)
const mempool = await gate.sendTransaction(signed.signedRawTxHex);
if (mempool.code !== "0") {
  throw new Error(`CheckTx rejected (${mempool.code}): ${mempool.log}`);
}

const committed = await gate.waitForTransaction(signed.txHash);
if (committed.code !== "0") {
  throw new Error(`DeliverTx failed (${committed.code}); Nonce was not incremented`);
}
console.log("Committed in block:", committed.height, "hash:", committed.hash);
```

#### cURL

For extended methods, set `MINTER_NODE_V2_URL` to the base `/v2` URL of your own node.

```bash
# 1. Read account balances and transaction_count
curl -sS "https://gate.minter.network/v2/address/Mx9858effd232b4033e47d90003d41ec34ecaeda94" | jq .

# 2. Compute order-aware best route for 100 BIP -> USDTE
curl -sS "${MINTER_NODE_V2_URL:?Set the base /v2 URL of your own node}/best_trade/0/1993/input/100000000000000000000" | jq .

# 3. Estimate commission for the tx-0x01-send test vector (chainId 1)
curl -sS "https://gate.minter.network/v2/estimate_tx_commission/0xf87f0101018001a0df80946fac4d18c912343bf86fa7049364dd4e424ab9c088ad78ebc5ac6200008f696e766f6963653a323032362d31318001b845f8431ba04acb879e7e90f8475c553a23e4c2f11c7ba71ff8a36cc4ae15dc1a74f2fdc511a04da0b3d26cde48103cde55dd74e9d867e539cbbb8516f74cb3dd085b4dc951de" | jq .
```
