π 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 type | By height | By 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:
Deprecated | Use instead |
---|---|
/getBlockHeight | Use blockByHeight |
/blockTransactions | Use 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
orfalse
in edge-case transactions (especially in UTXO networks). - π§Ή Minor improvements to block serialization and transaction parsing to ensure consistency across networks.
π Upgrade checklistβ
- Replace all block fetch logic to use the new
/evm/
or/utxo/
routes. - Remove any usage of
/getBlockHeight
,/blockTransactions
, or root-level currency routes like/bitcoin
,/ethereum
, etc. - Test and deploy your updates.