Transaction
Full transaction lifecycle operations on the Zetrix blockchain. Covers generating, signing, parsing, submitting, and querying both standard transactions (user pays gas) and paymaster-sponsored transactions (gas-free for users). Typical standard flow: generate blob → sign blob → submit → query.
Generates a serialized transaction blob for a standard transaction where the user pays gas fees.
Flow:
Call this endpoint with
txInitiator(the address paying gas) andoperationsReceive
blobandhashSign using
/tx/sign-blobor your own Ed25519 signerSubmit via
/tx/submit
Operations: The operations array defines what the transaction does. The type field is a numeric string:
1= Create Account2= Built-in points transfer3= Call contract4= Create contract5= Set up account metadata6= Set account privilege7= Upgrade contract content8= Upgrade contract owner
Note: For gas-free transactions, use /tx/paymaster/generate-blob instead.
Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>
API key for authentication. Include in all requests.
ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAURequest to generate a transaction blob where the user pays gas fees.
Zetrix address of the account initiating and paying gas for the transaction.
ZTX3PGkYe55MJdKLMEQDShy5tR1as7kYJFZbUChain code identifier. Defaults to "0".
0Example: 0Transaction blob generated successfully. Sign the blob and submit via /tx/submit.
POST /ztx/tx/generate-blob HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"txInitiator": "ZTX3PGkYe55MJdKLMEQDShy5tR1as7kYJFZbU",
"chainCode": "0",
"operations": [
{
"type": "2",
"toAddress": "ZTX3TkqopBiDmHFMEBr5U7n9HfNqBa7LBhV2Q",
"amount": "1000000"
}
]
}Transaction blob generated successfully. Sign the blob and submit via /tx/submit.
{
"success": true,
"object": {
"blob": "0A255A5458334A64656A33434B7443724253547851747456666E6456...",
"hash": "e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2",
"actualFee": 15000
},
"messages": [],
"timestamp": "2026-01-01T10:00:00Z",
"traceId": "trace-001"
}Signs a transaction blob using one or more private keys. A convenience helper for Ed25519 signing on the server side.
Output: Returns a listSigner array — one entry per key — each containing signBlob (signature) and publicKey. Pass this directly to /tx/submit or /contract/submit.
Security Note: You are transmitting private keys over the network. Ensure HTTPS is used. For higher-security environments, consider client-side signing instead.
Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>
API key for authentication. Include in all requests.
ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAURequest body for server-side blob signing.
Hex-encoded transaction blob to sign.
0A255A5458334A64656A33434B7443724253547851747456666E6456...64-character transaction hash associated with the blob.
e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2List of Ed25519 private keys (each exactly 56 characters). One SignerEntity is returned per key.
["privBsRTkj1234567890abcdefghijklmnopqrstuvwxyz12345678"]Blob signed. Use the returned listSigner in /tx/submit or /contract/submit.
POST /ztx/tx/sign-blob HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 217
{
"blob": "0A255A5458334A64656A33434B7443724253547851747456666E6456...",
"hash": "e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2",
"privateKeys": [
"privBsRTkj1234567890abcdefghijklmnopqrstuvwxyz12345678"
]
}Blob signed. Use the returned listSigner in /tx/submit or /contract/submit.
{
"success": true,
"object": [
{
"signBlob": "b8f4a2c3d1e0f9a8b7c6d5e4f3a2b1c0...",
"publicKey": "b00179b4adb1d3188aa1b98d6977a837..."
}
],
"messages": [],
"timestamp": "2026-01-01T10:00:01Z",
"traceId": "trace-002"
}Submits a signed transaction blob synchronously to the Zetrix blockchain where the user pays gas fees. Blocks until the transaction is confirmed or rejected.
Pre-conditions:
blobfrom/tx/generate-bloblistSignerfrom/tx/sign-blobor your own signer
After submission: Use the returned hash to track via /tx/query.
Note: For gas-free submission, use /tx/paymaster/submit instead.
Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>
API key for authentication. Include in all requests.
ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAURequest body for submitting a signed transaction.
Hex-encoded transaction blob from /tx/generate-blob. Must not be modified.
0A255A5458334A64656A33434B7443724253547851747456666E6456...Transaction submitted and confirmed. Use hash to query status.
POST /ztx/tx/submit HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 186
{
"blob": "0A255A5458334A64656A33434B7443724253547851747456666E6456...",
"listSigner": [
{
"signBlob": "b8f4a2c3d1e0f9a8b7c6d5e4f3a2b1c0...",
"publicKey": "b00179b4adb1d3188aa1b98d6977a837..."
}
]
}Transaction submitted and confirmed. Use hash to query status.
{
"success": true,
"object": {
"hash": "e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2"
},
"messages": [],
"timestamp": "2026-01-01T10:00:02Z",
"traceId": "trace-003"
}Decodes a hex-encoded transaction blob and returns its human-readable contents: source address, operations, nonce, gas parameters, and chain ID.
Use Cases:
Verify what operations are encoded before signing
Debug or audit transaction contents
Display transaction details to users for confirmation
Note: Read-only — does not interact with the blockchain.
Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>
API key for authentication. Include in all requests.
ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAURequest to parse a transaction blob.
Hex-encoded transaction blob to decode.
0A255A5458334A64656A33434B7443724253547851747456666E6456...Blob parsed. Returns decoded transaction details.
POST /ztx/tx/parse-blob HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 70
{
"blob": "0A255A5458334A64656A33434B7443724253547851747456666E6456..."
}Blob parsed. Returns decoded transaction details.
{
"success": true,
"object": {
"sourceAddress": "ZTX3PGkYe55MJdKLMEQDShy5tR1as7kYJFZbU",
"feeLimit": 50000,
"gasPrice": 1000,
"nonce": 42,
"chainId": 1,
"operations": [
{
"type": "2",
"sendGas": {
"destAddress": "ZTX3TkqopBiDmHFMEBr5U7n9HfNqBa7LBhV2Q",
"amount": 1000000
}
}
]
},
"messages": [],
"timestamp": "2026-01-01T10:00:00Z",
"traceId": "trace-004"
}Retrieves the status and full details of a submitted transaction using its transaction hash.
For txStatus lifecycle codes and errorCode definitions, refer to the Zetrix WebSocket Error Codes.
Note: For paymaster transactions, allow a few seconds after submission before querying as processing is asynchronous.
Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>
The 64-character transaction hash to look up.
e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2API key for authentication. Include in all requests.
ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAUTransaction details returned.
GET /ztx/tx/query?hash=text HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Accept: */*
Transaction details returned.
{
"object": {
"txStatus": "0",
"txContent": {
"actualFee": "4090",
"closeTime": 1778040148964508,
"contractTxHashes": null,
"errorCode": 0,
"errorDesc": "",
"hash": "cf669ed4bf659635b44090d7c4abe3eded43f21f16f19f7214a3ec4624b26833",
"ledgerSeq": 3861063,
"signatures": [
{
"signData": "894f05e243e3c6458d422da208ecbe6be863335854c47edffcab1456be7c9eb696fe871d06a7311aad058d134aad62632e89fcc4c7bf326e970825c07415b302",
"publicKey": "b00148d7a3e15b4b21b28dfd315a6b4dbdb8bf068cef7f2fc2bb73cd173911d8f9cf93d6ec17"
},
{
"signData": "20ffa0a2e42413cf40a828b5ac1df1c32836fac4ae9ceb359c0ffc540eb682640d6f5110445870abb90ed8aa909ef6f5c9b7c0d1d840d5eda6f5cdad0ecbe307",
"publicKey": "b001f2da4b0f94b7e4086850e4b83a144912eeb4af71c9c81d3e6617610b5b084dcb0f129a76"
}
],
"transaction": {
"sourceAddress": "ZTX3PUg6GzYWQKUKJLSnwzztyxFwAhvuYVEmG",
"feeLimit": 1000000,
"gasPrice": 10,
"nonce": 1581,
"metadata": null,
"operations": [
{
"type": 7,
"sourceAddress": null,
"metadata": null,
"createAccount": null,
"issueAsset": null,
"sendAsset": null,
"sendGas": {
"destAddress": "ZTX3GpYLUSFjdwJwjggScktuuDQCkUgo1tCKn",
"amount": 1000000,
"input": null
},
"setMetadata": null,
"setPrivilege": null,
"upgradeContract": null,
"log": null
}
],
"chainId": null
},
"trigger": null,
"txSize": 409
}
},
"messages": [],
"success": true,
"timestamp": "2026-05-06 12:11:52",
"traceId": "4b6a01c5-8d09-4d71-80ff-0198ee112baf"
}Last updated