chain_getBlock RPC Method - AssetHub
Parâmetros
hash
cadeia de caracteres
Carregando...
Devoluções
resultado
objeto
Carregando...
block
objeto
Carregando...
header
objeto
Carregando...
parentHash
cadeia de caracteres
Carregando...
número
cadeia de caracteres
Carregando...
stateRoot
cadeia de caracteres
Carregando...
extrinsicsRoot
cadeia de caracteres
Carregando...
digest
objeto
Carregando...
registos
matriz
Carregando...
extrinsics
matriz
Carregando...
justifications
matriz
Carregando...
Pedido
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"jsonrpc":"2.0","id":1,"method":"chain_getBlock","params":["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]}'
1curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/asset-hub' \2--header 'Content-Type: application/json' \3--data '{"jsonrpc":"2.0","id":1,"method":"chain_getBlock","params":["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]}'
1const myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "chain_getBlock",8"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]9});1011const requestOptions = {12method: "POST",13cabeçalhos: myHeaders,14body: raw,15redirecionar: "seguir"16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.então((resposta) => resposta.texto())20.então((resultado) => console.log(resultado))21.catch((error) => console.error(error));22
1const myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "chain_getBlock",8"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]9});1011const requestOptions = {12method: "POST",13cabeçalhos: myHeaders,14body: raw,15redirecionar: "seguir"16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.então((resposta) => resposta.texto())20.então((resultado) => console.log(resultado))21.catch((error) => console.error(error));22
1importar pedidos2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56carga útil = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "chain_getBlock",10"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]11})1213cabeçalhos = {14'Content-Type': 'application/json'15}1617resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)18imprimir(resposta.texto)19
1importar pedidos2import json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56carga útil = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "chain_getBlock",10"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]11})1213cabeçalhos = {14'Content-Type': 'application/json'15}1617resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)18imprimir(resposta.texto)19
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "chain_getBlock",16"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]17})1819resposta = https.pedido(pedido)20insere a resposta.read_body21
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "chain_getBlock",16"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]17})1819resposta = https.pedido(pedido)20insere a resposta.read_body21
Ainda não tem uma conta?
Crieendpoint seuendpoint Quicknode endpoint segundos e comece a desenvolver
Comece gratuitamente