Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spire.dev/llms.txt

Use this file to discover all available pages before exploring further.

Summary

DA Builder account monitoring uses dab_accountInfo for GasTank balances and eth_getTransactionReceipt or dab_transactionStatus for request tracking.

Account Information

dab_accountInfo returns the current GasTank balance and outstanding charges for an account.
Response fieldMeaning
balanceGasTank balance in wei
outstanding_chargeCharges pending settlement in wei

Authenticated cURL Request

curl -s https://da-builder.mainnet.spire.dev/ \
  -H "Content-Type: application/json" \
  -H "X-Flashbots-Signature: 0xYOUR_ADDRESS:0xYOUR_SIGNATURE" \
  --data '{
    "jsonrpc": "2.0",
    "method": "dab_accountInfo",
    "params": ["0xYOUR_ACCOUNT_ADDRESS"],
    "id": 1
  }'
Example response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "balance": "1000000000000000000",
    "outstanding_charge": "50000000000000000"
  }
}

Authentication Header

The X-Flashbots-Signature header format is:
X-Flashbots-Signature: <address>:<signature>
The signature is an EIP-191 signature of the JSON-RPC request body hash.

TypeScript: Account Info With ethers v6

import { Wallet, getBytes, id } from "ethers";

const rpcUrl = "https://da-builder.mainnet.spire.dev/";

async function accountInfo(privateKey: string, account: string) {
  const wallet = new Wallet(privateKey);
  const body = JSON.stringify({
    jsonrpc: "2.0",
    method: "dab_accountInfo",
    params: [account],
    id: 1
  });

  const signature = await wallet.signMessage(getBytes(id(body)));

  const response = await fetch(rpcUrl, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Flashbots-Signature": `${wallet.address.toLowerCase()}:${signature}`
    },
    body
  });

  const json = await response.json();
  if (json.error) throw new Error(`${json.error.code}: ${json.error.message}`);
  return json.result as { balance: string; outstanding_charge: string };
}
  1. Check GasTank balance before submitting transactions.
  2. Submit through DA Builder and store the transaction hash.
  3. Poll eth_getTransactionReceipt with bounded retries.
  4. Use dab_transactionStatus for richer cost and status data.
  5. Alert when GasTank balance minus outstanding_charge falls below your operating threshold.

Troubleshooting

SymptomLikely causeRecommended action
Account not foundGasTank is not funded or deposit is not indexedDeposit ETH and retry after a couple minutes
Insufficient balance.GasTank cannot cover expected costAdd ETH to GasTank or use direct RPC fallback if the EOA has enough ETH
Receipt returns nullRequest has not landed yetContinue polling with backoff
Transaction not foundTransaction hash is wrong or not yet indexedVerify the transaction hash and retry
Auth failureHeader signature does not match request bodyRecreate the JSON body string and sign that exact body

FAQ

What is the best way to monitor DA Builder in production?

Monitor GasTank balance with dab_accountInfo, store every transaction hash, poll receipts with bounded retries, and keep direct RPC fallback.

Should monitoring code use DA Builder for all Ethereum reads?

No. Use DA Builder for documented monitoring methods. Use a standard Ethereum RPC provider for general Ethereum reads.

Next Steps