aldabra/crates
Kayos 39b56223f9 feat(dao): proposal_cosign builder + dao_proposal_cosign_unsigned tool
Phase 4b. Cosign extends a Draft proposal's cosigners list — the
multi-stake bridge for clearing to_voting threshold when a single
stake doesn't have enough TRP. Validator (PCosign branch in
Proposal/Scripts.hs:433) requires:

- Status == Draft
- Exactly one stake input (ptryFromSingleton)
- New cosigner = stake.owner (delegatees rejected)
- Cosigner inserted into list via pinsertUniqueBy (sorted, no dupes)
- len(cosigners) ≤ max_cosigners (DaoConfig.max_cosigners)
- stake.staked_amount ≥ thresholds.cosign

Stake-side (ppermitVote PCosign branch): owner signs (not delegatee),
single stake input, new lock = ProposalLock { proposal_id, Cosigned }
prepended via paddNewLock = pcons.

Insertion order mirrors Plutarch's pfromOrdBy-derived Credential Ord:
variant index first (PubKey=0 < Script=1), then 28-byte hash lex.
`insert_unique_sorted` test-covered for low/mid/high positions + the
PubKey-before-Script invariant.

Also extract pull_wallet_utxos free function in tools.rs — shared
between the (future) refactor of create/vote and immediately by
cosign. Inline duplication in create/vote left as a future cleanup.

11 unit tests on the builder. Tool args: dao? + proposal_id +
fee_lovelace.
2026-05-06 06:51:53 -07:00
..
aldabra-chain v0.2: 8 chain_* read-only Koios passthrough MCP tools 2026-05-05 07:01:32 -07:00
aldabra-core AUDIT4-3 fix: optional inline datum on wallet_send 2026-05-05 06:58:15 -07:00
aldabra-dao feat(dao): proposal_cosign builder + dao_proposal_cosign_unsigned tool 2026-05-06 06:51:53 -07:00
aldabra-mcp feat(dao): proposal_cosign builder + dao_proposal_cosign_unsigned tool 2026-05-06 06:51:53 -07:00