From edc976e5d945d5e5534b54b3ee269598dc4f3dab Mon Sep 17 00:00:00 2001 From: Sulkta Date: Mon, 4 May 2026 10:11:23 -0700 Subject: [PATCH] =?UTF-8?q?rename:=20aldabra=20=E2=86=92=20aldabra=20(per?= =?UTF-8?q?=20Sulkta=202026-05-04)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aldabra giant tortoise (Aldabrachelys gigantea) — endemic to the Aldabra atoll, up to 250 kg, 150-year lifespan. Long-lived, defended, slow but unstoppable. Better metaphor for the wallet than 'aldabra' which was on-the-tin descriptive. All renames in one pass: - repo: Sulkta-Coop/aldabra → Sulkta-Coop/aldabra (via gitea API) - workspace dir: aldabra → aldabra - crate dirs: wallet-{core,chain,mcp} → aldabra-{core,chain,mcp} - crate names + path imports in Cargo.toml workspace + each crate - binary name: aldabra → aldabra - README, ROADMAP, docs/architecture: all references swept --- Cargo.toml | 17 +++++++++++------ README.md | 12 ++++++------ .../{wallet-chain => aldabra-chain}/Cargo.toml | 4 ++-- .../{wallet-chain => aldabra-chain}/src/lib.rs | 0 crates/{wallet-core => aldabra-core}/Cargo.toml | 10 +++++----- crates/{wallet-core => aldabra-core}/src/lib.rs | 0 crates/{wallet-mcp => aldabra-mcp}/Cargo.toml | 8 ++++---- crates/{wallet-mcp => aldabra-mcp}/src/main.rs | 12 ++++++------ docs/architecture.md | 10 +++++----- 9 files changed, 39 insertions(+), 34 deletions(-) rename crates/{wallet-chain => aldabra-chain}/Cargo.toml (87%) rename crates/{wallet-chain => aldabra-chain}/src/lib.rs (100%) rename crates/{wallet-core => aldabra-core}/Cargo.toml (79%) rename crates/{wallet-core => aldabra-core}/src/lib.rs (100%) rename crates/{wallet-mcp => aldabra-mcp}/Cargo.toml (77%) rename crates/{wallet-mcp => aldabra-mcp}/src/main.rs (85%) diff --git a/Cargo.toml b/Cargo.toml index 5ec0f36..5d024e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,14 @@ # Cargo workspace root for aldabra. # # Three crates: -# wallet-core — key derivation, signing, types, mnemonic handling -# wallet-chain — pluggable chain backends (Koios, Ogmios). Trait-first. -# wallet-mcp — binary; the MCP server, glues core+chain together. +# aldabra-core — key derivation, signing, types, mnemonic handling +# aldabra-chain — pluggable chain backends (Koios, Ogmios). Trait-first. +# aldabra-mcp — binary; the MCP server, glues core+chain together. +# +# Named for the Aldabra giant tortoise (Aldabrachelys gigantea) — endemic +# to the Aldabra atoll in the Seychelles, up to 250 kg, 150-year lifespan. +# Long-lived, defended, slow but unstoppable. Fitting metaphor for a +# wallet that holds your money. # # Workspace deps are pinned here so all three crates use the same versions. # Add a dep here, then reference it in each crate's Cargo.toml as @@ -11,9 +16,9 @@ [workspace] resolver = "2" members = [ - "crates/wallet-core", - "crates/wallet-chain", - "crates/wallet-mcp", + "crates/aldabra-core", + "crates/aldabra-chain", + "crates/aldabra-mcp", ] [workspace.package] diff --git a/README.md b/README.md index 02fce06..b5535e3 100644 --- a/README.md +++ b/README.md @@ -25,20 +25,20 @@ Three crates in a Cargo workspace: | Crate | Responsibility | |---|---| -| `wallet-core` | Pure crypto + types. Mnemonic → root key (CIP-3), root → payment + stake key (CIP-1852), address construction, signing. **No I/O, no network.** This is the security boundary. | -| `wallet-chain` | Pluggable backends for chain queries. `ChainBackend` trait, with Koios as the phase-1 implementation. Ogmios + submission paths in phase 2. | -| `wallet-mcp` | Binary. MCP server speaking stdio. Glues core + chain together, exposes tools to the LLM client. | +| `aldabra-core` | Pure crypto + types. Mnemonic → root key (CIP-3), root → payment + stake key (CIP-1852), address construction, signing. **No I/O, no network.** This is the security boundary. | +| `aldabra-chain` | Pluggable backends for chain queries. `ChainBackend` trait, with Koios as the phase-1 implementation. Ogmios + submission paths in phase 2. | +| `aldabra-mcp` | Binary. MCP server speaking stdio. Glues core + chain together, exposes tools to the LLM client. | ``` ┌─────────────────────────────┐ -LLM client │ wallet-mcp (bin) │ stdio +LLM client │ aldabra-mcp (bin) │ stdio ─────────► │ tool handlers, lifecycle │ ────► └──────────┬──────────────────┘ │ ┌────────┴────────┐ ▼ ▼ ┌──────────────┐ ┌──────────────┐ - │ wallet-core │ │ wallet-chain │ + │ aldabra-core │ │ aldabra-chain │ │ keys, sign │ │ Koios/Ogmios │ └──────────────┘ └──────────────┘ ``` @@ -84,7 +84,7 @@ ci-runner build aldabra # "aldabra": { # "command": "/path/to/aldabra", # "env": { -# "ALDABRA_DATA": "/path/to/wallet-data-dir" +# "ALDABRA_DATA": "/mnt/cache/appdata/aldabra" # } # } ``` diff --git a/crates/wallet-chain/Cargo.toml b/crates/aldabra-chain/Cargo.toml similarity index 87% rename from crates/wallet-chain/Cargo.toml rename to crates/aldabra-chain/Cargo.toml index 1f29241..cc1e50d 100644 --- a/crates/wallet-chain/Cargo.toml +++ b/crates/aldabra-chain/Cargo.toml @@ -1,4 +1,4 @@ -# wallet-chain — pluggable backends for chain queries. +# aldabra-chain — pluggable backends for chain queries. # # A `ChainBackend` trait abstracts over Koios (HTTPS), Ogmios (WS/HTTP), # or any future option. Phase 1 ships with a Koios implementation since @@ -7,7 +7,7 @@ # Submission paths land in phase 2. Read-only queries first. [package] -name = "wallet-chain" +name = "aldabra-chain" version.workspace = true edition.workspace = true license-file.workspace = true diff --git a/crates/wallet-chain/src/lib.rs b/crates/aldabra-chain/src/lib.rs similarity index 100% rename from crates/wallet-chain/src/lib.rs rename to crates/aldabra-chain/src/lib.rs diff --git a/crates/wallet-core/Cargo.toml b/crates/aldabra-core/Cargo.toml similarity index 79% rename from crates/wallet-core/Cargo.toml rename to crates/aldabra-core/Cargo.toml index 420a014..cf13388 100644 --- a/crates/wallet-core/Cargo.toml +++ b/crates/aldabra-core/Cargo.toml @@ -1,4 +1,4 @@ -# wallet-core — pure crypto + types. No I/O, no network. Deterministic +# aldabra-core — pure crypto + types. No I/O, no network. Deterministic # given the same mnemonic + derivation path. # # This crate is intentionally narrow: @@ -6,18 +6,18 @@ # - Root key → payment / stake key (CIP-1852 derivation) # - Address construction (mainnet, testnet) # - Transaction signing (given an unsigned TX builder output from -# wallet-chain or pallas-txbuilder) +# aldabra-chain or pallas-txbuilder) # # It deliberately does NOT: -# - Do any chain queries (that's wallet-chain's job) -# - Talk to MCP (that's wallet-mcp's job) +# - Do any chain queries (that's aldabra-chain's job) +# - Talk to MCP (that's aldabra-mcp's job) # - Touch files (the daemon owns disk I/O; we get keys handed in) # # Rationale: this is the most security-sensitive crate. Keeping it # narrow + I/O-free makes it auditable. [package] -name = "wallet-core" +name = "aldabra-core" version.workspace = true edition.workspace = true license-file.workspace = true diff --git a/crates/wallet-core/src/lib.rs b/crates/aldabra-core/src/lib.rs similarity index 100% rename from crates/wallet-core/src/lib.rs rename to crates/aldabra-core/src/lib.rs diff --git a/crates/wallet-mcp/Cargo.toml b/crates/aldabra-mcp/Cargo.toml similarity index 77% rename from crates/wallet-mcp/Cargo.toml rename to crates/aldabra-mcp/Cargo.toml index 61b3faf..74035f3 100644 --- a/crates/wallet-mcp/Cargo.toml +++ b/crates/aldabra-mcp/Cargo.toml @@ -1,4 +1,4 @@ -# wallet-mcp — the binary. MCP server speaking stdio that exposes +# aldabra-mcp — the binary. MCP server speaking stdio that exposes # the wallet's tools to an LLM. Spawned as a subprocess from any MCP # client (e.g. Claude Code). # @@ -6,7 +6,7 @@ # between core + chain crates. [package] -name = "wallet-mcp" +name = "aldabra-mcp" version.workspace = true edition.workspace = true license-file.workspace = true @@ -18,8 +18,8 @@ name = "aldabra" path = "src/main.rs" [dependencies] -wallet-core = { path = "../wallet-core" } -wallet-chain = { path = "../wallet-chain" } +aldabra-core = { path = "../aldabra-core" } +aldabra-chain = { path = "../aldabra-chain" } tokio = { workspace = true } anyhow = { workspace = true } diff --git a/crates/wallet-mcp/src/main.rs b/crates/aldabra-mcp/src/main.rs similarity index 85% rename from crates/wallet-mcp/src/main.rs rename to crates/aldabra-mcp/src/main.rs index 018963e..d6e966e 100644 --- a/crates/wallet-mcp/src/main.rs +++ b/crates/aldabra-mcp/src/main.rs @@ -6,7 +6,7 @@ //! ## Phase 1 tools //! //! - `wallet.address` — return the derived base address (placeholder -//! until wallet-core's CIP-1852 derivation lands) +//! until aldabra-core's CIP-1852 derivation lands) //! - `wallet.balance` — query balance via the configured chain backend //! //! ## Phase 2-4 tools (TODO) @@ -47,9 +47,9 @@ async fn main() -> Result<()> { // For now: a smoke-test print so the binary actually does something // when invoked manually (not through MCP). tracing::info!( - target_address = %wallet_core::derive_base_address( + target_address = %aldabra_core::derive_base_address( &dummy_root_key()?, - wallet_core::Network::Mainnet, + aldabra_core::Network::Mainnet, 0, 0, )?, @@ -62,13 +62,13 @@ async fn main() -> Result<()> { /// Phase 1 only — produces a zero-bytes RootKey so the placeholder /// address derivation runs. Will be deleted once real mnemonic loading /// lands. -fn dummy_root_key() -> Result { +fn dummy_root_key() -> Result { // Need a way to construct one from this crate without exposing // private fields. Phase 1: temporary public constructor on - // wallet-core, gated behind a #[cfg(test)] or feature flag and + // aldabra-core, gated behind a #[cfg(test)] or feature flag and // removed before phase 2. // // For tonight: this fn is a TODO marker — the smoke test won't - // actually run until we finish wallet-core::Mnemonic::into_root_key. + // actually run until we finish aldabra-core::Mnemonic::into_root_key. anyhow::bail!("phase 1 scaffold: real mnemonic loading not yet implemented") } diff --git a/docs/architecture.md b/docs/architecture.md index aacd3f5..fc297e3 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -7,15 +7,15 @@ Deeper design notes than the README. Read this before extending. The three-crate split exists to keep the security-sensitive code auditable in isolation. -- `wallet-core` — **no I/O.** Given a mnemonic + a derivation path, +- `aldabra-core` — **no I/O.** Given a mnemonic + a derivation path, produces keys + addresses + signatures. Deterministic, no dependencies on tokio, reqwest, MCP, or anything that could introduce side channels. Easy to audit because it's narrow. -- `wallet-chain` — **all the I/O lives here.** Trait-first so the MCP +- `aldabra-chain` — **all the I/O lives here.** Trait-first so the MCP layer never knows whether it's talking to Koios, Ogmios, or a future backend. Future contributors swap implementations without touching the security-sensitive crate. -- `wallet-mcp` — **the binary glue.** Owns process lifecycle, config +- `aldabra-mcp` — **the binary glue.** Owns process lifecycle, config loading, MCP transport, tool registration, error mapping. The thinnest layer. @@ -36,7 +36,7 @@ roughly in order: `--dry-run` flag for any state-changing tool. 2. **Daemon process compromise.** If the wallet binary is exploited (e.g. via a malformed Koios response triggering memory corruption), - the keys are at risk. Mitigations: keep `wallet-core` narrow + the keys are at risk. Mitigations: keep `aldabra-core` narrow (smaller attack surface), zeroize on drop, future: drop privileges + seccomp the daemon. 3. **Disk read.** The encrypted mnemonic on disk could be exfiltrated. @@ -56,7 +56,7 @@ roughly in order: First run: user pastes mnemonic at interactive prompt ↓ - wallet-mcp asks for an encryption passphrase + aldabra-mcp asks for an encryption passphrase ↓ age-encrypt the mnemonic phrase ↓