TzScan API是否适用于alphanet?
1 个回答
- 投票数
-
- 2019-02-06
在检查了TzScan的alphanet前端之后,我已经能够提取以下curl请求:
curl 'https://api.alphanet.tzscan.io/v1/operation/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Pragma: no-cache' -H 'Origin: https://alphanet.tzscan.io' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://alphanet.tzscan.io/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
当然,您也可以尝试
/v3/operation
,即使使用操作符哈希,它也可以工作,请尝试以下操作:curl 'https://api.alphanet.tzscan.io/v1/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf' -H 'Pragma: no-cache' -H 'Origin: https://alphanet.tzscan.io' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://alphanet.tzscan.io/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
我不确定
api6.tzscan.io
指向的位置,但是api.alphanet.tzscan.io
似乎可以与alphanet一起使用.另外,如果您无法完全控制,则可以使用Alphanet节点在本地运行TzScan.After inspecting TzScan's alphanet frontend, i've been able to extract the following curl request:
curl 'https://api.alphanet.tzscan.io/v1/operation/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Pragma: no-cache' -H 'Origin: https://alphanet.tzscan.io' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://alphanet.tzscan.io/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
Of course you can try
/v3/operation
as well, and it will work, even with your op hash, try the following:curl 'https://api.alphanet.tzscan.io/v1/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf' -H 'Pragma: no-cache' -H 'Origin: https://alphanet.tzscan.io' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://alphanet.tzscan.io/ooZXgbKsbHDwMof1mfRxgWXDsjGVZ4FMbwoJdVDyB3nzEAJVsBh' -H 'Connection: keep-alive' -H 'Cache-Control: no-cache' --compressed
I'm not sure where
api6.tzscan.io
is pointing at, butapi.alphanet.tzscan.io
seems to work with alphanet. Alternatively you can run TzScan locally with your Alphanet node, if you wan't to fully in control.-
谢谢,我已经尝试过https://api.alphanet.tzscan.io/v3/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf,它可以正常工作!Thanks, I've tried https://api.alphanet.tzscan.io/v3/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf and it worked!
- 1
- 2019-02-06
- Ezy
TzScan API 是否支持alphanet操作?
例如,主网可以正常工作.但是此对alphanet的查询即使ophash
ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf
在alphanet中有效.