Api
比特幣現金測試網版本的洞察 API
我想知道是否有人知道比特幣現金的 Insight API 的測試網版本?
對於主網,有這些:
- <https://bch-insight.bitpay.com/api/>
- <https://bch-bitcore2.trezor.io/api/>
但我找不到一個用於測試網的。
非常感謝。
通過試錯程序,我找到了這個:-)
API 的前綴是<https://test-bch-insight.bitpay.com/api>
Bitpay 對 Insight/Bitcore 進行了大規模重構,因此 BTC 和 BCH 都執行在同一個後端。新的網址是:
- 區塊瀏覽器:https ://insight.bitcore.io/#/BCH/mainnet/home
- 介面:https ://api.bitcore.io/api/BCH/mainnet
- API 文件:https ://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/docs/api-documentation.md
- 根據需要交換
mainnet/testnet
和BTC/BCH
蛞蝓範例:獲取我從最近一個區塊中抓取的某個隨機地址的 UTXO:
$ curl -s https://api.bitcore.io/api/BCH/mainnet/address/qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe/?unspent=true | jq [ { "_id": "5cae0b7912025b0a3983bf75", "chain": "BCH", "network": "mainnet", "coinbase": false, "mintIndex": 2, "spentTxid": "", "mintTxid": "81d1e58956eb5ba269ad3ac6394382825bd9d9b4d3a22eca03133eef19446b72", "mintHeight": 577661, "spentHeight": -2, "address": "qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe", "script": "76a9149e5fc9b14aeece73b074578bcefb3f682a043b2b88ac", "value": 7000000, "confirmations": -1 }, { "_id": "5cae0f6212025b0a3988a698", "chain": "BCH", "network": "mainnet", "coinbase": false, "mintIndex": 0, "spentTxid": "", "mintTxid": "b8b72fa7defb89824f9c31d6294e3764c4675ac085668604113f4b6394d8cdde", "mintHeight": 577664, "spentHeight": -2, "address": "qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe", "script": "76a9149e5fc9b14aeece73b074578bcefb3f682a043b2b88ac", "value": 1111, "confirmations": -1 } ]