oz-policy-builder
CLI

record

Fetch a transaction by hash or simulate an envelope, emit a typed Recording.

oz-policy-cli record <--hash <HASH> | --envelope-xdr <ENVELOPE_XDR>> [OPTIONS]

Writes the resulting Recording JSON document to stdout. The schema is oz-policy-builder/recording/v1.

Flags

FlagTypeDefaultDescription
--hashString (hex)On-chain transaction hash, 64-character hex. Fetched via getTransaction.
--envelope-xdrString (base64)Base64-encoded TransactionEnvelope XDR. Sent to simulateTransaction. Not submitted on chain.
--rpcStringhttps://soroban-testnet.stellar.orgSoroban RPC endpoint.
--networkStringTest SDF Network ; September 2015Stellar network passphrase.
--instruction-leewayu64simulateTransaction resource budget leeway. Only consulted on the --envelope-xdr path. No-op for the current stable RPC client API; preserved for forward compatibility.

--hash and --envelope-xdr are mutually exclusive; exactly one is required.

Behavior

  • A 30-second timeout is applied to every RPC await.
  • The recorder verifies that the RPC's reported network passphrase matches --network. Mismatch is a hard error.
  • All ScVal values are decoded into the typed ArgValue enum. i128 is serialized as a JSON string for precision.

Example

oz-policy-cli record \
  --hash 5a0ccffed7aa586fe5f2763f1f85869c349a1ddff6edb21e4d76bf087a42db4e \
  > recording.json

Errors

Exit codeVariant
10E_RECORDER_HASH_NOT_FOUND (hash not in retention)
11E_RECORDER_SIM_FAILED (simulateTransaction failure)
12E_RECORDER_XDR_DECODE_FAILED (envelope or meta XDR parse failure)

On this page