feat(escrow_wip): MCP escrow_open_unsigned tool + Cargo feature

Adds the first MCP tool surface for the escrow validator: takes
party_a/b/recipient pkh hex + open_deadline + lock_period + optional
initial_contributor + initial_lovelace, calls
build_unsigned_escrow_open, returns CBOR-hex of the unsigned tx.

Tool description prefixed with "WIP — UNAUDITED:" per the handoff
discipline. Body includes a wip_warning field reminding callers this
is preprod-only.

Also propagates the escrow_wip feature from aldabra-mcp to
aldabra-dao so building the MCP binary with --features escrow_wip
correctly enables the dao crate's escrow surface.

Cleaned up unused-import warnings (ESCROW_SPEND_EX_UNITS pulled to
test-only scope in agree/settle/veto/refund_timeout — the impl bodies
take ex_units explicitly via args, only tests reference the constant).
35/35 escrow builder tests still pass; aldabra-mcp builds clean with
--features escrow_wip.

The remaining 4 unsigned-write tools (deposit/agree/veto/settle/
refund_timeout) follow the same pattern: pull wallet utxos, optionally
discover the escrow UTxO from chain at script_address, decode datum,
call the corresponding builder, return CBOR-hex JSON.
This commit is contained in:
Sulkta 2026-05-09 12:49:46 -07:00
parent 0feb0800dd
commit 54a90a5f8d
6 changed files with 158 additions and 6 deletions

View file

@ -17,6 +17,13 @@ authors.workspace = true
name = "aldabra"
path = "src/main.rs"
[features]
default = []
# Enable the escrow_wip feature surface (Aiken V3 escrow validator + 6 builders
# + MCP tools). Mirrors aldabra-dao's escrow_wip — propagates the feature so
# the MCP binary actually exposes escrow_* tools. WIP / UNAUDITED — preprod only.
escrow_wip = ["aldabra-dao/escrow_wip"]
[dependencies]
aldabra-core = { path = "../aldabra-core" }
aldabra-chain = { path = "../aldabra-chain" }