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

Transaction

Build, sign, submit and track a raw transaction, plus fee estimation. The blob/sign/submit split lets a caller keep key custody.

Estimate the transaction fee

post
Authorizations
X-API-KeystringRequired

AWS API Gateway key, required only on the api-sandbox and api-v2 servers. It is checked by the gateway, before the request reaches this service, so it does not substitute for the bearer token - those two headers are read by different layers. Omit it when port-forwarding to a pod.

AuthorizationstringRequired

OAuth2 bearer token from the shared BaaS auth server.

Every endpoint in this subset requires one. Note the security filter runs BEFORE routing, so an unauthenticated request to a path that does not exist also answers 401, not 404 - a 404 is only visible to an authenticated caller.

Body

Request for POST /tx/estimate-fee.

from matters: gas depends on the sender's state (whether a storage slot is already set, whether the account exists), so estimating without it can give a materially different number than the real transaction will use.

fromstring · min: 1Required
tostring · min: 1Required
valueintegerOptional
datastringOptional
Responses
200

OK

*/*

Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.

successbooleanOptional
errorCodestringOptional
messagestringOptional
post/tx/estimate-fee
POST /z2/tx/estimate-fee HTTP/1.1
Host: api-sandbox.zetrix.com
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "from": "text",
  "to": "text",
  "value": 1,
  "data": "text"
}
200

OK

{
  "success": true,
  "errorCode": "text",
  "message": "text",
  "data": {
    "gasLimit": 1,
    "gasPrice": 1,
    "fee": "text"
  }
}

Build a signable transaction blob

post
Authorizations
X-API-KeystringRequired

AWS API Gateway key, required only on the api-sandbox and api-v2 servers. It is checked by the gateway, before the request reaches this service, so it does not substitute for the bearer token - those two headers are read by different layers. Omit it when port-forwarding to a pod.

AuthorizationstringRequired

OAuth2 bearer token from the shared BaaS auth server.

Every endpoint in this subset requires one. Note the security filter runs BEFORE routing, so an unauthenticated request to a path that does not exist also answers 401, not 404 - a 404 is only visible to an authenticated caller.

Body

Request for POST /tx/generate-blob.

The three override fields exist so a caller can pin a transaction exactly (replacing a stuck nonce, for instance). Left null, each is resolved from the node: nonce from eth_getTransactionCount(pending), gasPrice from eth_gasPrice, gasLimit from eth_estimateGas.

fromstring · min: 1Required
tostring · min: 1Required

Recipient. Required here — contract deployment (no recipient) is BT-2584.

valueintegerOptional

Native value in wei. Defaults to zero.

datastringOptional

Hex-encoded call data. Null or empty for a plain transfer.

nonceintegerOptional
gasPriceintegerOptional
gasLimitintegerOptional
maxFeePerGasintegerOptional

EIP-1559 ceiling, in wei. Supplying it builds a type-2 transaction instead of a legacy one; leave it null and nothing changes.

You are charged baseFeePerGas + maxPriorityFeePerGas and refunded the rest, so a generous ceiling does not cost more - it only has to be high enough that the transaction stays includable if the base fee rises.

Mutually exclusive with gasPrice: naming both a legacy bid and a 1559 ceiling is contradictory, and guessing which one the caller meant is worse than refusing.

maxPriorityFeePerGasintegerOptional

EIP-1559 validator tip, in wei. Only meaningful with maxFeePerGas; defaults to 0.

Responses
200

OK

*/*

Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.

successbooleanOptional
errorCodestringOptional
messagestringOptional
post/tx/generate-blob
POST /z2/tx/generate-blob HTTP/1.1
Host: api-sandbox.zetrix.com
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "from": "text",
  "to": "text",
  "value": 1,
  "data": "text",
  "nonce": 1,
  "gasPrice": 1,
  "gasLimit": 1,
  "maxFeePerGas": 1,
  "maxPriorityFeePerGas": 1
}
200

OK

{
  "success": true,
  "errorCode": "text",
  "message": "text",
  "data": {
    "blob": "text",
    "nonce": 1,
    "gasPrice": 1,
    "gasLimit": 1,
    "chainId": 1,
    "maxFeePerGas": 1,
    "maxPriorityFeePerGas": 1
  }
}

Sign a transaction blob

post
Authorizations
X-API-KeystringRequired

AWS API Gateway key, required only on the api-sandbox and api-v2 servers. It is checked by the gateway, before the request reaches this service, so it does not substitute for the bearer token - those two headers are read by different layers. Omit it when port-forwarding to a pod.

AuthorizationstringRequired

OAuth2 bearer token from the shared BaaS auth server.

Every endpoint in this subset requires one. Note the security filter runs BEFORE routing, so an unauthenticated request to a path that does not exist also answers 401, not 404 - a 404 is only visible to an authenticated caller.

Body

Request for POST /tx/sign-blob.

Carries a private key. This is why the endpoint is POST rather than GET: a key in a query string ends up in access logs, proxy logs and browser history. The key is used to sign and then discarded — never logged, never persisted. Callers who would rather not send it at all should sign the blob client-side; that is the reason the blob/sign/submit split exists.

blobstring · min: 1Required

Unsigned transaction as RLP hex, from /tx/generate-blob.

privateKeystring · min: 1Required
Responses
200

OK

*/*

Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.

successbooleanOptional
errorCodestringOptional
messagestringOptional
post/tx/sign-blob
POST /z2/tx/sign-blob HTTP/1.1
Host: api-sandbox.zetrix.com
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "blob": "text",
  "privateKey": "text"
}
200

OK

{
  "success": true,
  "errorCode": "text",
  "message": "text",
  "data": {
    "signedBlob": "text",
    "transactionHash": "text",
    "chainId": 1
  }
}

Get transaction status

get

What became of a submitted transaction.

GET with a query parameter, matching L1's GET /tx/status?hash=. Safe as a GET because a transaction hash is public information — unlike a private key, it does no harm in an access log.

A hash the node has not seen returns PENDING, not 404: over JSON-RPC "still in the mempool" and "never existed" are indistinguishable, so reporting not-found would be a guess.

Authorizations
X-API-KeystringRequired

AWS API Gateway key, required only on the api-sandbox and api-v2 servers. It is checked by the gateway, before the request reaches this service, so it does not substitute for the bearer token - those two headers are read by different layers. Omit it when port-forwarding to a pod.

AuthorizationstringRequired

OAuth2 bearer token from the shared BaaS auth server.

Every endpoint in this subset requires one. Note the security filter runs BEFORE routing, so an unauthenticated request to a path that does not exist also answers 401, not 404 - a 404 is only visible to an authenticated caller.

Query parameters
hashstringRequired
Responses
200

OK

*/*

Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.

successbooleanOptional
errorCodestringOptional
messagestringOptional
get/tx/status
GET /z2/tx/status?hash=text HTTP/1.1
Host: api-sandbox.zetrix.com
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "success": true,
  "errorCode": "text",
  "message": "text",
  "data": {
    "transactionHash": "text",
    "status": "SUCCESS",
    "blockNumber": 1,
    "gasUsed": 1,
    "from": "text",
    "to": "text",
    "contractAddress": "text",
    "revertReason": "text"
  }
}

Submit a signed transaction

post
Authorizations
X-API-KeystringRequired

AWS API Gateway key, required only on the api-sandbox and api-v2 servers. It is checked by the gateway, before the request reaches this service, so it does not substitute for the bearer token - those two headers are read by different layers. Omit it when port-forwarding to a pod.

AuthorizationstringRequired

OAuth2 bearer token from the shared BaaS auth server.

Every endpoint in this subset requires one. Note the security filter runs BEFORE routing, so an unauthenticated request to a path that does not exist also answers 401, not 404 - a 404 is only visible to an authenticated caller.

Body

Request for POST /tx/submit: a signed transaction as RLP hex.

signedBlobstring · min: 1Required
Responses
200

OK

*/*

Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.

successbooleanOptional
errorCodestringOptional
messagestringOptional
post/tx/submit
POST /z2/tx/submit HTTP/1.1
Host: api-sandbox.zetrix.com
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "signedBlob": "text"
}
200

OK

{
  "success": true,
  "errorCode": "text",
  "message": "text",
  "data": {
    "transactionHash": "text"
  }
}

Last updated