/transaction/material - Polkadot
Example code for the /transaction/material REST method. Complete guide on how to use /transaction/material REST in GetBlock Web3 documentation.
This endpoint returns the data needed to construct and sign a transaction offline: the genesis hash, chain name, spec and transaction versions, and metadata.
Endpoint
GET /transaction/materialQuery Parameters
noMeta
boolean
No
Omit the metadata field from the response
metadataVersion
integer
No
Metadata version to include
Request
curl --location 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/transaction/material'const response = await fetch('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/transaction/material');
const data = await response.json();
console.log(data);import requests
response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/transaction/material')
print(response.json())Response
{
"at": {
"hash": "0x255bc00927df8d33d561792635cbc6bde480a0a505eef5ff28630ece3fc15b32",
"height": "6754362"
},
"genesisHash": "0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3",
"chainName": "Polkadot",
"specName": "polkadot",
"specVersion": "1002000",
"txVersion": "26",
"metadata": "0x6d657461..."
}Response Fields
genesisHash
string
Genesis block hash
chainName
string
Chain name
specVersion
string
Runtime spec version
txVersion
string
Transaction format version
metadata
string
SCALE-encoded metadata, hex-encoded
Use Cases
Offline Signing: Gather signing material for cold wallets
Transaction Construction: Build extrinsics with correct versions
Custody Systems: Prepare transactions for secure signing
SDK Integration: Feed signing material to a client
Last updated
Was this helpful?