Skip to main content
brickken tx exposes the raw API V2 transaction flow. Use it when you want full control over the payload, need to call a specific backend method directly, or want to inspect the unsigned transaction before broadcasting.
SubcommandPurpose
brickken tx preparePrepare a raw transaction payload (optionally --execute)
brickken tx signSign a prepared transaction locally
brickken tx sendSend signed transaction payloads
brickken tx statusLook up a broadcast transaction by hash

tx prepare

Prepare a raw transaction for any method. With --execute, the CLI prepares with /prepare-transactions, signs locally with the configured private key, and sends to /send-transactions — paying both steps through x402.
FlagTypeRequiredDescription
--method <method>stringYesBrickken transaction method
--chain <chain>stringNoChain identifier
--signer-address <address>stringNoSigner wallet address
-f, --file <path>stringNoJSON/YAML input file (merged with CLI flags)
--executeflagNoPrepare, sign, and send in one step
Supported agentic token methods include agentCreateToken, agentMintToken, agentBurnToken, agentTransferToken, agentTransferFromToken, agentApproveToken (and the agentApprove alias, normalized to agentApproveToken). Agent identity and reputation methods (agentRegister, agentSetURI, agentSetMetadata, agentSetWallet, agentGiveFeedback, agentRevokeFeedback, agentAppendFeedbackResponse) and other API V2 methods are also accepted. See Agentic Methods with x402 for each method’s fields. One-shot execution from a file:
brickken tx prepare \
  --method agentCreateToken \
  --file token.json \
  --execute \
  --json
Prepare-only (inspect before signing):
brickken tx prepare \
  --method agentRegister \
  --file agent-register.json \
  --json | tee prepared.json
Prefer --file for nested JSON, long text, or values assembled by shell scripts. A file avoids the quoting pitfalls of inline JSON. The file’s keys use the backend field names (e.g. chainId, signerAddress, metadataValue).
Example metadata file:
{
  "chainId": "11155111",
  "signerAddress": "0xYourWallet",
  "agentUuid": "00000000-0000-0000-0000-000000000000",
  "metadataKey": "capabilities",
  "metadataValue": "{\"tasks\":[\"research\",\"summarization\"]}",
  "metadataEncoding": "json"
}

tx sign

Sign a prepared transaction locally with the configured private key.
FlagTypeRequiredDescription
-f, --file <path>stringNoFile containing the prepared transaction
brickken tx sign --file prepared.json --json | tee signed.json

tx send

Send signed transactions. --tx-id and --signed-tx are repeatable for batched sends.
FlagTypeRequiredDescription
--tx-id <value>stringYes¹Prepared transaction ID (repeatable)
--signed-tx <value>stringYes¹Signed transaction hex (repeatable)
-f, --file <path>stringNoFile containing txId / signedTransactions
¹ Supply via flags or a --file.
brickken tx send \
  --tx-id "$(jq -r '.prepared.txId' prepared.json)" \
  --signed-tx "$(jq -r '.signedTransaction' signed.json)" \
  --json
x402 send batches must contain only x402-eligible prepared transactions, and all transactions in a batch must be on the same chain.

tx status

Look up a broadcast transaction by its on-chain hash. Either --hash or --tx-hash is required.
FlagTypeRequiredDescription
--hash <hash>stringYes¹Actual blockchain transaction hash
--tx-hash <hash>stringYes¹Alias for --hash
¹ Provide one of the two.
brickken tx status --hash 0xBlockchainTxHash --json
This maps to GET /get-transaction-status.

Manual three-step flow

When you want full control over each step:
brickken tx prepare --method agentRegister --file agent-register.json --json
brickken tx sign --file prepared.json --json
brickken tx send --tx-id 0xPreparedTxId --signed-tx 0xSignedRawTx --json