chain_getBlock RPC Method - AssetHub
參數
雜湊
字串
載入中...
退貨
結果
物件
載入中...
區塊
物件
載入中...
頁首
物件
載入中...
parentHash
字串
載入中...
數字
字串
載入中...
stateRoot
字串
載入中...
extrinsicsRoot
字串
載入中...
digest
物件
載入中...
日誌
陣列
載入中...
extrinsics
陣列
載入中...
justifications
陣列
載入中...
請求
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.追加("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",13標題: myHeaders,14正文: 原始,15重定向: 「追蹤」16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.接著((回應) => 回應.文字())20.接著((結果) => 控制台.log(結果))21.catch((error) => console.error(error));22
1const myHeaders = new Headers();2myHeaders.追加("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",13標題: myHeaders,14正文: 原始,15重定向: 「追蹤」16};1718fetch("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub", requestOptions)19.接著((回應) => 回應.文字())20.接著((結果) => 控制台.log(結果))21.catch((error) => console.error(error));22
1匯入 請求2匯入 json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56有效載荷 = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "chain_getBlock",10"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]11})1213標題 = {14「Content-Type」: 'application/json'15}1617回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)18列印(回應.text)19
1匯入 請求2匯入 json34url = "https://docs-demo.dot-mainnet.quiknode.pro/asset-hub"56有效載荷 = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "chain_getBlock",10"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]11})1213標題 = {14「Content-Type」: 'application/json'15}1617回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)18列印(回應.text)19
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "chain_getBlock",16"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]17})1819回應 = https.請求(請求)20puts 回應。read_body21
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.dot-mainnet.quiknode.pro/asset-hub")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "chain_getBlock",16"params": ["0xeb737eab71ea40b5cfcb79f4bdeb07c4fa8f16dee2dec7f351e34d1e7d4284bd"]17})1819回應 = https.請求(請求)20puts 回應。read_body21