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. Supported types include SEND_GAS, TRANSFER, CONTRACT_INVOKE, and more.

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
chevron-right
200

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

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post
/ztx/tx/generate-blob
200

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

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
chevron-right
200

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

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post
/ztx/tx/sign-blob
200

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

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
chevron-right
200

Transaction submitted and confirmed. Use hash to query status.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post
/ztx/tx/submit
200

Transaction submitted and confirmed. Use hash to query status.

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
chevron-right
200

Blob parsed. Returns decoded transaction details.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
post
/ztx/tx/parse-blob
200

Blob parsed. Returns decoded transaction details.

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 Codesarrow-up-right.

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
chevron-right
200

Transaction details returned.

*/*
successbooleanOptional
timestampstring · date-timeOptional
traceIdstringOptional
get
/ztx/tx/query
200

Transaction details returned.

Last updated