feat(dao): wire 8 dao_* MCP tools (Phase 1)
Tools added to WalletService:
DAO management (filesystem-only, no chain calls):
- dao_register — save a DaoConfig under \$ALDABRA_DATA/daos/<name>.json
- dao_list — show all registered DAO names + active marker
- dao_use — set active DAO; subsequent dao_* calls without
explicit `dao` arg target this one
- dao_remove — delete config; clears active if it was the active one
- dao_show — render full DaoConfig JSON for audit
DAO live-state reads (Koios-backed, decoded into typed Rust):
- dao_governor_state — singleton governor UTxO + thresholds + timing
+ nextProposalId + per-stake proposal cap
- dao_stake_list — all stakes for the DAO (filtered to gov-token
policy so the shared MLabs stakes addr doesn't
leak other DAOs into output). Renders pkh,
amount, locks, delegation per stake.
- dao_my_stake — filters dao_stake_list to just THIS wallet's
stake (matches wallet pkh against StakeDatum.owner).
Empty array if not staked yet.
Plumbing:
- WalletService::new gains data_dir param (for DaoStore root)
- WalletInner gains dao_store + dao_reader fields
- wallet_pkh() helper extracts the wallet's payment-credential hash from
bech32 for owner-match in dao_my_stake
- get_info() instructions advertise the new dao_* surface
- aldabra-mcp/Cargo.toml: aldabra-dao path dep + hex + pallas-addresses
This commit is contained in:
parent
0f5676dda7
commit
173abb9322
3 changed files with 344 additions and 2 deletions
|
|
@ -134,6 +134,7 @@ async fn run() -> Result<()> {
|
|||
payment_key,
|
||||
stake_key,
|
||||
cfg.max_send_lovelace,
|
||||
cfg.data_dir.clone(),
|
||||
);
|
||||
let server = service
|
||||
.serve(stdio())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue