Skip to main content

πŸ”— New Block Endpoints & Deprecations in ChainGate 0.21

Β· 2 min read

ChainGate v0.21 introduces new dedicated block endpoints for EVM and UTXO networks. These are more powerful, standardized, and ready for modern applications.

✨ What’s new​

1. New blockByHeight and blockByHash endpoints​

Network typeBy heightBy hash
EVM/evm/{currency}/blockByHeight?blockHeight=…/evm/{currency}/blockByHash?blockHash=…
UTXO/utxo/{currency}/blockByHeight?blockHeight=…/utxo/{currency}/blockByHash?blockHash=…

All these endpoints return a consistent JSON:

{
"hash": "0x… or 0000…",
"parentHash": "0x… or 0000…",
"height": 12345678,
"timestamp": 1609459200,
"sizeBytes": 123456,
"nonce": 1234
"difficulty": 1234567890,
"txs": ["txid1", "txid2", "…"]
}

2. Deprecated endpoints​

Several older endpoints are now deprecated and will be removed in a future release. This includes:

DeprecatedUse instead
/getBlockHeightUse blockByHeight
/blockTransactionsUse blockBy*
Root-level /bitcoin, /ethereum, etc.Use /utxo/{currency} or /evm/{currency} for all supported blockchains

⚠️ Legacy routes will be removed soon β€” please migrate as early as possible.

3. Bug Fixes​

  • πŸ› Fixed an issue where some transactions showed negative fees due to malformed raw data.
  • πŸ› Fixed cases where addresses appeared as null or false in edge-case transactions (especially in UTXO networks).
  • 🧹 Minor improvements to block serialization and transaction parsing to ensure consistency across networks.

πŸ›  Upgrade checklist​

  1. Replace all block fetch logic to use the new /evm/ or /utxo/ routes.
  2. Remove any usage of /getBlockHeight, /blockTransactions, or root-level currency routes like /bitcoin, /ethereum, etc.
  3. Test and deploy your updates.