stake key + reward address (4.5):
- StakeKey::stake_address(network) — bech32 (`stake1...` mainnet,
`stake_test1...` testnet) via pallas_addresses::StakeAddress::new
(added to the fork in the same commit since the upstream tuple
struct had no public constructor).
- StakeKey::xprv() — crate-internal accessor for signing.
- WalletInner now holds the stake_key alongside the payment_key.
- mcp tool wallet.stake.address surfaces the bech32.
stake delegation (4.6):
- new aldabra-core::stake module:
- parse_pool_id(bech32) → Hash<28>
- build_signed_stake_delegation(payment, stake, network, utxos,
change_addr, pool_bech32, register_first, params) → signed cbor.
- if register_first: prepends a StakeRegistration cert (consumes
a 2 ADA deposit from inputs). otherwise just delegates.
- signs with both payment_key (body witness) and stake_key (cert
witness). reuses sign::add_witness for both — same body-hash
ed25519 signing path regardless of CIP-1852 chain index.
- mcp tool wallet.stake.delegate: pool_id, register_first (defaults
true). signs + submits.
3.6 close-out — wallet.mint.unsigned mcp tool:
- exposes the existing build_unsigned_mint with caller-supplied
PolicySpec (json), so multi-sig / treasury flows can build through
this wallet without it auto-signing. round-trip with
wallet.sign_partial chain → wallet.submit_signed_tx.
depends on Sulkta-Coop/pallas@feat-aux-data which gained two more
patches in the same branch:
- StakeAddress::new public constructor.
- StagingTransaction::add_certificate / clear_certificates +
Conway::build_conway_raw decode-and-plumb for certs (filling in the
`certificates: None, // TODO` upstream).
mcp tools: 12 → 15 (wallet.stake.address, wallet.stake.delegate,
wallet.mint.unsigned).
79 → 84 unit tests. new coverage: stake address bech32 round-trip,
pool_id bech32 parse + reject-wrong-hrp, delegation tx with + without
registration (asserts cert count, witness count, cert variants).
fork tests grew: certificates_plumb_through_to_tx_body and
no_certificates_means_none.
42 lines
1.4 KiB
TOML
42 lines
1.4 KiB
TOML
# aldabra-core — pure crypto + types. No I/O, no network. Deterministic
|
|
# given the same mnemonic + derivation path.
|
|
#
|
|
# This crate is intentionally narrow:
|
|
# - Mnemonic → root key
|
|
# - Root key → payment / stake key (CIP-1852 derivation)
|
|
# - Address construction (mainnet, testnet)
|
|
# - Transaction signing (given an unsigned TX builder output from
|
|
# aldabra-chain or pallas-txbuilder)
|
|
#
|
|
# It deliberately does NOT:
|
|
# - 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 = "aldabra-core"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license-file.workspace = true
|
|
repository.workspace = true
|
|
authors.workspace = true
|
|
|
|
[dependencies]
|
|
pallas-primitives = { workspace = true }
|
|
pallas-codec = { workspace = true }
|
|
pallas-crypto = { workspace = true }
|
|
pallas-addresses = { workspace = true }
|
|
pallas-txbuilder = { workspace = true }
|
|
pallas-wallet = { workspace = true }
|
|
pallas-traverse = { workspace = true }
|
|
bip39 = { workspace = true }
|
|
bech32 = "0.9"
|
|
ed25519-bip32 = { workspace = true }
|
|
cryptoxide = { workspace = true }
|
|
zeroize = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|