aldabra/crates/aldabra-dao/src
Sulkta 69f93339fd feat(dao): dao_discover_scripts MCP tool + Koios discovery client
New `aldabra-dao::discovery` module:
- `DiscoveryClient` trait + `KoiosDiscoveryClient` impl
- `discover_scripts(cfg, client, deployers)` — auto-finds:
  - governor_validator_ref + stake_validator_ref via deployer ref-script search
  - stake_st_policy from any existing stake UTxO (gov-token + non-gov-token asset)
  - stake_st_policy_ref via deployer search
- `apply_discovery(cfg, report)` — merges into DaoConfig (never overwrites)
- `script_hash_from_addr(bech32)` — extract 28-byte script hash from a script address

New MCP tool:
- `dao_discover_scripts { dao?, extra_deployers? }` — runs the audit logic
  against any registered DAO + persists the discovered fields back to the
  DaoConfig. Returns JSON with what was found + a gaps list for things
  v1 can't auto-discover (proposal_addr, proposal_st_policy).

Plus 4 unit tests with stub Koios responses validating the full pipeline:
script-hash extraction, StakeST discovery from stake UTxO assets,
validator ref-utxo matching at deployer, apply_discovery merge semantics.

WalletInner now caches `koios_base` so the discovery client can be
constructed on demand without re-passing the URL through args.
2026-05-05 20:14:13 -07:00
..
agora chore(dao): drop unused as_constr import after EnumIsData fix 2026-05-05 19:50:34 -07:00
builder feat(dao-mcp): wire dao_proposal_create_unsigned + drop unused imports 2026-05-05 19:50:17 -07:00
config.rs feat(dao-config): Phase 4 prerequisite fields + ScriptRefs 2026-05-05 15:42:59 -07:00
discovery.rs feat(dao): dao_discover_scripts MCP tool + Koios discovery client 2026-05-05 20:14:13 -07:00
error.rs feat(dao): scaffold aldabra-dao crate (Phase 1 reads) 2026-05-05 13:40:12 -07:00
lib.rs feat(dao): dao_discover_scripts MCP tool + Koios discovery client 2026-05-05 20:14:13 -07:00
reader.rs feat(dao): scaffold aldabra-dao crate (Phase 1 reads) 2026-05-05 13:40:12 -07:00