new aldabra-core::mint module:
- PolicySpec enum: SingleSig, SingleSigTimelock, NofK
- SingleSig{pkh}: ScriptPubkey native script
- SingleSigTimelock{pkh, slot}: ScriptAll[ScriptPubkey, InvalidHereafter(slot)]
- NofK{n, [pkhs]}: ScriptNOfK
- PolicySpec::single_sig(payment) + single_sig_timelock(payment, slot)
convenience constructors that derive the pkh from a PaymentKey.
- policy_id() = pallas_traverse::ComputeHash<28>::compute_hash, which
is blake2b-224 of (0x00 || cbor) — the canonical native-script hash.
- to_cbor() for callers that want the script bytes raw.
build_signed_mint / build_unsigned_mint:
- two-pass fee like the send path, plus a few extras specific to mint:
staging.mint_asset(policy, name, qty), .script(Native, cbor),
.disclosed_signer(payment_pkh) — the disclosed_signer surfaces the
required signature in the tx body so the chain knows which witness
to verify against the script.
- positive qty mints (asset goes into dest output), negative qty burns
(asset comes out of input holdings, change preserves leftover).
- token-bearing change must hold ≥ min_utxo lovelace — same guard as
the send path.
mcp tools:
- wallet.policy.create — args: invalid_after_slot? — returns
{policy_id_hex, script_cbor_hex, type}.
- wallet.mint — args: dest_address, dest_lovelace (≥ 1 ADA),
asset_name_hex, quantity (i64), invalid_after_slot? — auto-generates
a single-sig policy bound to the wallet's payment key, builds, signs,
submits.
8 → 10 mcp tools. 48 → 56 unit tests.
3.2 (CIP-25 metadata) is BLOCKED on pallas-txbuilder 0.32/0.35 — both
hardcode `auxiliary_data: None` in the conway builder. options for next
session: (a) post-build CBOR injection, (b) assemble tx via
pallas-primitives directly, (c) wait for upstream. flagged in the
spec doc.
3.3 (CIP-68) depends on 3.2. 3.6 (MAP 2-of-2) needs the multi-key
signing flow on the build side; PolicySpec::NofK variant is ready but
build_signed_mint only sign with one key today.
93 lines
3.4 KiB
TOML
93 lines
3.4 KiB
TOML
# Cargo workspace root for aldabra.
|
|
#
|
|
# Three crates:
|
|
# 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
|
|
# foo = { workspace = true }
|
|
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/aldabra-core",
|
|
"crates/aldabra-chain",
|
|
"crates/aldabra-mcp",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.0.1"
|
|
edition = "2021"
|
|
license-file = "LICENSE"
|
|
repository = "http://192.168.0.5:3001/Sulkta-Coop/aldabra"
|
|
authors = ["Cobb <cobb@sulkta.com>", "Kayos <kayos@sulkta.com>"]
|
|
|
|
[workspace.dependencies]
|
|
# Async runtime — almost everything we do is I/O bound (chain queries, MCP stdio)
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# Cardano stack — pallas is the rust-native primitives library by txpipe.
|
|
# We pull individual crates rather than the meta-crate so we control feature flags.
|
|
pallas-primitives = "0.32"
|
|
pallas-codec = "0.32"
|
|
pallas-crypto = "0.32"
|
|
pallas-addresses = "0.32"
|
|
pallas-txbuilder = "0.32"
|
|
pallas-wallet = "0.32"
|
|
pallas-traverse = "0.32"
|
|
pallas-network = "0.32"
|
|
|
|
# Mnemonic + key derivation.
|
|
# bip39 — 24-word wordlist parsing + BIP-39 entropy extraction.
|
|
# ed25519-bip32 — Cardano's variant of BIP-32-Ed25519 HD derivation
|
|
# (XPrv + DerivationScheme::V2 hard/soft children).
|
|
# pallas-crypto only ships raw ed25519, not HD derivation.
|
|
# cryptoxide — PBKDF2-HMAC-SHA512 for Icarus master-key generation
|
|
# (CIP-3). Already pulled in transitively by
|
|
# ed25519-bip32; declared here so we can use pbkdf2 + Sha512
|
|
# directly in aldabra-core.
|
|
bip39 = "2"
|
|
ed25519-bip32 = "0.4"
|
|
cryptoxide = "0.4"
|
|
|
|
# At-rest encryption for the mnemonic + derived keys on disk. age is
|
|
# what the cauldron Fernet pattern would have been if we'd had it back
|
|
# then — modern, audited, FOSS, and the secret never has to round-trip
|
|
# through a daemon password prompt.
|
|
age = "0.10"
|
|
|
|
# Memory hygiene — wipe key material from RAM when keys go out of scope.
|
|
zeroize = { version = "1", features = ["derive"] }
|
|
|
|
# Errors — anyhow at the boundaries (binary), thiserror for crate-internal types
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
|
|
# Serde for everything JSON
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# HTTP client for Koios + future Ogmios HTTP endpoints
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
|
|
|
|
# MCP SDK for Rust. Note: the official Rust SDK has been moving fast
|
|
# (modelcontextprotocol/rust-sdk on github). Pin a version once we
|
|
# verify the API shape we actually use.
|
|
rmcp = { version = "0.1", features = ["server", "transport-io"] }
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Config file parsing — TOML at $ALDABRA_DATA/config.toml.
|
|
toml = "0.9"
|
|
|
|
# Hidden-input passphrase prompts for the mnemonic bootstrap CLI.
|
|
# rpassword is the standard "tty echo off" prompt crate.
|
|
rpassword = "7"
|