Tzscan API para Alphanet?
1 responda
- votos
-
- 2019-02-06
Depois deinspecionar ofrontend alfanet do Tzscan,eupudeextrair a seguinte solicitação de 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
Claro que vocêpodetentar
/v3/operation
também,e funcionará,mesmo com o seu hash OP,tente o seguinte: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
Nãotenho certeza de onde
api6.tzscan.io
está apontando,masapi.alphanet.tzscan.io
parecefuncionar com o Alphanet. Alternativamente,vocêpodeexecutar o TZSCAN localmente com o seunó AlphaLanet,se vocênão quisertotalmenteno controle.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.-
Obrigado,eutentei https://api.alphanet.tzscan.io/v3/operation/ootc8mmz7dg1recxlpitan3qeuub7unfuh9r8kzxfbzzizcypbfe funcionou!Thanks, I've tried https://api.alphanet.tzscan.io/v3/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf and it worked!
- 1
- 2019-02-06
- Ezy
o API TZScan Suporte API Operações?
Porexemplo, Esta consultano Mainnet funciona.Masesta consultaparaAlphanetnãofuncionamesmo que oophash
ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf
é válidoem AlphaNet .