API de TzScan para alphanet?
1 respuesta
- votos
-
- 2019-02-06
Después deinspeccionar lainterfaz alphanet de TzScan,pudeextraer la siguiente solicitud 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
Por supuesto,tambiénpuedeprobar
/v3/operation
,yfuncionará,incluso con su hash de operación,intente lo siguiente: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
Noestoy seguro de hacia dónde apunta
api6.tzscan.io
,peroapi.alphanet.tzscan.io
parecefuncionar con alphanet. Alternativamente,puedeejecutar TzScan localmente con sunodo Alphanet,sino quieretenerel controltotal.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.-
Gracias,probé https://api.alphanet.tzscan.io/v3/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf yfuncionó.Thanks, I've tried https://api.alphanet.tzscan.io/v3/operation/ooTC8mMZ7dG1ReCXLPiTAN3qEUB7uNFuh9R8KZXEFbZZiZcypBf and it worked!
- 1
- 2019-02-06
- Ezy
¿La API de TzScan admite operaciones de alphanet?
Porejemplo,esta consultaen la redprincipal funciona.Sinembargo,esta consultapara alphanet notiene ningún resultadoen el oqNFZPoPh1 aunqueel oqZ7DM3nofunciona.código> es válidoen alphanet .