Transaction
Build, sign, submit and track a raw transaction, plus fee estimation. The blob/sign/submit split lets a caller keep key custody.
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.
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.
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.
OK
Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.
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"
}OK
{
"success": true,
"errorCode": "text",
"message": "text",
"data": {
"gasLimit": 1,
"gasPrice": 1,
"fee": "text"
}
}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.
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.
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.
Recipient. Required here — contract deployment (no recipient) is BT-2584.
Native value in wei. Defaults to zero.
Hex-encoded call data. Null or empty for a plain transfer.
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.
EIP-1559 validator tip, in wei. Only meaningful with maxFeePerGas; defaults to 0.
OK
Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.
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
}OK
{
"success": true,
"errorCode": "text",
"message": "text",
"data": {
"blob": "text",
"nonce": 1,
"gasPrice": 1,
"gasLimit": 1,
"chainId": 1,
"maxFeePerGas": 1,
"maxPriorityFeePerGas": 1
}
}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.
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.
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.
Unsigned transaction as RLP hex, from /tx/generate-blob.
OK
Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.
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"
}OK
{
"success": true,
"errorCode": "text",
"message": "text",
"data": {
"signedBlob": "text",
"transactionHash": "text",
"chainId": 1
}
}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.
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.
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.
OK
Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.
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: */*
OK
{
"success": true,
"errorCode": "text",
"message": "text",
"data": {
"transactionHash": "text",
"status": "SUCCESS",
"blockNumber": 1,
"gasUsed": 1,
"from": "text",
"to": "text",
"contractAddress": "text",
"revertReason": "text"
}
}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.
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.
Request for POST /tx/submit: a signed transaction as RLP hex.
OK
Standard BaaS response envelope. Mirrors the shape used across the microservices so callers get a consistent contract on L2 as on L1.
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"
}OK
{
"success": true,
"errorCode": "text",
"message": "text",
"data": {
"transactionHash": "text"
}
}Last updated