amaru-treasury-tx¶
CLI for building unsigned Conway transactions against the Amaru
treasury contracts, creating detached vault-backed witnesses, and
assembling/submitting signed transactions on top of the
cardano-node-clients TxBuild DSL.
Haskell port of the bash recipes in
pragma-org/amaru-treasury/journal/2026/.
Quick links¶
- Quickstart — wizard-to-
tx-buildpipes, pre-signing report review, and vault-backed witness creation. - Architecture overview — modules and data flow.
- Trust model — what the wizard verifies, what the operator must assert.
- Swap recipe — building an existing swap intent with
tx-build. - Disburse — resolving owned-scope ADA or USDM disbursements with
disburse-wizard, contingency ADA disburses from contingency withcontingency-disburse-wizard, or building an existing disburse intent withtx-build. - Withdraw — resolving treasury rewards with
withdraw-wizardor building an existing withdraw intent. - Local devnet smoke — opt-in live
cardano-node-clientsdevnet node check. - ChainContext
- Freeze workflow — pinning a
ChainContextfor offline parity tests. - Parity report
- Release automation
- Spec / plan / tasks
- Source
Capabilities¶
| Command | Purpose |
|---|---|
swap-wizard |
Verify upstream metadata.json against the chain, resolve UTxOs + tip, emit a unified swap intent.json (typed step trace via WizardEvent). |
swap-cancel |
Verify an explicitly supplied pending SundaeSwap order and build unsigned cancellation CBOR that returns the order value to the selected treasury. |
withdraw-wizard |
Verify upstream metadata.json against the chain, resolve the treasury reward account + reward balance, emit a unified withdraw intent.json, or exit cleanly when rewards are zero. |
disburse-wizard |
Verify upstream metadata.json against the chain, resolve wallet and treasury UTxOs, emit a unified ADA or USDM disburse intent.json. USDM is the default unit. |
contingency-disburse-wizard |
Verify contingency and destination-scope registry state, move ADA from contingency to an owned treasury scope, and emit a unified disburse intent.json. |
tx-build |
Turn a unified intent.json into unsigned Conway CBOR; re-evaluates every redeemer against a live ChainContext (typed step trace via BuildEvent) and can write a deterministic pre-signing report with --report PATH. |
vault create |
Import one pasted or streamed Cardano payment signing key (cardano-cli .skey JSON or addr_xsk) into an encrypted age witness vault. |
witness |
Create one detached Conway vkey witness from an encrypted age vault identity. |
attach-witness |
Merge detached vkey witness CBOR hex into an unsigned Conway transaction. |
submit |
Submit signed Conway CBOR hex through a local node socket. |
tx-build reads the action discriminator and the network from
the intent itself (single source of truth) and dispatches to the
matching builder.
| Intent action | Release status |
|---|---|
swap |
Built from wizard output or an existing intent. Pinned by a bash/cardano-cli golden. |
disburse |
ADA and USDM disburse intents build through tx-build. ADA remains pinned by a bash/cardano-cli golden; USDM has structural builder and resolver regression coverage. |
withdraw |
Built from wizard output or an existing intent. Pinned by a synthetic frozen-context golden until issue #17 records a live preprod oracle. |
reorganize |
Parsed, but build fails closed until #46 ships. |
Out of scope¶
- Implicit signing during
tx-build. - Vault custody policy, recipient rotation, and key ceremony design.
- Registry / scopes NFT minting.
- Reference-script publishing.
- The Sundae
Fundredeemer (Amaru disables it).