For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

Generate transaction blob

post

Generates a serialized transaction blob for a standard transaction where the user pays gas fees.

Flow:

  1. Call this endpoint with txInitiator (the address paying gas) and operations

  2. Receive blob and hash

  3. Sign using /tx/sign-blob or your own Ed25519 signer

  4. Submit via /tx/submit

Operations: The operations array defines what the transaction does. The type field is a numeric string:

  • 1 = Create Account

  • 2 = Built-in points transfer

  • 3 = Call contract

  • 4 = Create contract

  • 5 = Set up account metadata

  • 6 = Set account privilege

  • 7 = Upgrade contract content

  • 8 = Upgrade contract owner

Note: For gas-free transactions, use /tx/paymaster/generate-blob instead.

Authorizations
AuthorizationstringRequired

Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>

Header parameters
X-API-KeystringRequired

API key for authentication. Include in all requests.

Example: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
Body

Request to generate a transaction blob where the user pays gas fees.

txInitiatorstringRequired

Zetrix address of the account initiating and paying gas for the transaction.

Example: ZTX3PGkYe55MJdKLMEQDShy5tR1as7kYJFZbU
chainCodestringOptional

Chain code identifier. Defaults to "0".

Default: 0Example: 0
Responses
200

Transaction blob generated successfully. Sign the blob and submit via /tx/submit.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post/ztx/tx/generate-blob
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"
    }
  ]
}
200

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"
}

Sign transaction blob

post

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.

Authorizations
AuthorizationstringRequired

Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>

Header parameters
X-API-KeystringRequired

API key for authentication. Include in all requests.

Example: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
Body

Request body for server-side blob signing.

blobstringOptional

Hex-encoded transaction blob to sign.

Example: 0A255A5458334A64656A33434B7443724253547851747456666E6456...
hashstring · min: 64 · max: 64Optional

64-character transaction hash associated with the blob.

Example: e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2
privateKeysstring[] · min: 1Optional

List of Ed25519 private keys (each exactly 56 characters). One SignerEntity is returned per key.

Example: ["privBsRTkj1234567890abcdefghijklmnopqrstuvwxyz12345678"]
Responses
200

Blob signed. Use the returned listSigner in /tx/submit or /contract/submit.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post/ztx/tx/sign-blob
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"
  ]
}
200

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"
}

Submit transaction

post

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:

  • blob from /tx/generate-blob

  • listSigner from /tx/sign-blob or your own signer

After submission: Use the returned hash to track via /tx/query.

Note: For gas-free submission, use /tx/paymaster/submit instead.

Authorizations
AuthorizationstringRequired

Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>

Header parameters
X-API-KeystringRequired

API key for authentication. Include in all requests.

Example: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
Body

Request body for submitting a signed transaction.

blobstringRequired

Hex-encoded transaction blob from /tx/generate-blob. Must not be modified.

Example: 0A255A5458334A64656A33434B7443724253547851747456666E6456...
Responses
200

Transaction submitted and confirmed. Use hash to query status.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post/ztx/tx/submit
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..."
    }
  ]
}
200

Transaction submitted and confirmed. Use hash to query status.

{
  "success": true,
  "object": {
    "hash": "e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2"
  },
  "messages": [],
  "timestamp": "2026-01-01T10:00:02Z",
  "traceId": "trace-003"
}

Parse transaction blob

post

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.

Authorizations
AuthorizationstringRequired

Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>

Header parameters
X-API-KeystringRequired

API key for authentication. Include in all requests.

Example: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
Body

Request to parse a transaction blob.

blobstringRequired

Hex-encoded transaction blob to decode.

Example: 0A255A5458334A64656A33434B7443724253547851747456666E6456...
Responses
200

Blob parsed. Returns decoded transaction details.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post/ztx/tx/parse-blob
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..."
}
200

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"
}

Query transaction by hash

get

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.

Authorizations
AuthorizationstringRequired

Bearer access token. Include in all requests as: Authorization: Bearer <your_access_token>

Query parameters
hashstring · min: 64 · max: 64Required

The 64-character transaction hash to look up.

Example: e3ea722dfaf33ca7a970348f55be0ba51abedfbd15e840ffb63fd9d7202b7eb2
Header parameters
X-API-KeystringRequired

API key for authentication. Include in all requests.

Example: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
Responses
200

Transaction details returned.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
get/ztx/tx/query
GET /ztx/tx/query?hash=text HTTP/1.1
Host: api-sandbox.zetrix.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-API-Key: text
Accept: */*
200

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