Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ elements = { version = "0.25", features = ["serde"] }
hex = { version = "0.4", features = ["serde"] }
hmac = "0.12"
iroh = "1"
libc = "0.2"
postcard = { version = "1", default-features = false, features = ["alloc"] }
rand = "0.8"
redb = "4"
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls", "charset"] }
rustix = { version = "1", features = ["process"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,18 @@ one canonical signed PSET before returning it. Exact retries replay that
durable winner without re-signing; concurrently in-flight valid signature
encodings may both sign, but every caller returns the same stored winner. Its
`FirmQuote` is still an internal, unauthenticated artifact, not yet a provider-
signed network quote. The first custom provider-wallet slice adds a versioned
encrypted keystore, in-memory BIP32/SLIP-77 key derivation, fresh confidential
tree-less P2TR destinations, output recovery, exact durable-job signing, and a
provider-side non-last blinding coordinator. It deliberately has no arbitrary
signing API, and Elements Core remains only the intended chain, mempool, policy,
and relay authority. Filesystem/passphrase operations, an authoritative
inventory scanner, daemon and live-regtest integration, backup-recovery tooling,
signed network quote. The custom provider wallet now adds a versioned encrypted
keystore, in-memory BIP32/SLIP-77 key derivation, fresh confidential tree-less
P2TR destinations, output recovery, exact durable-job signing, and a
provider-side non-last blinding coordinator. Its identity-bound `wallet.redb`
catalog durably records each random locator before returning a destination,
publishes new and restored wallets through a same-directory staging file in a
trusted path hierarchy on a lock-supporting local Unix filesystem, and exports
an authenticated logical wallet-only snapshot. The naked cryptographic wallet
deliberately cannot issue production destinations or sign arbitrary data.
Elements Core remains only the intended chain, mempool, policy, and relay
authority. Protected passphrase delivery, an authoritative inventory scanner,
daemon and live-regtest integration, coordinated provider-state recovery,
market-data pricing, the authenticated remote protocol, relay reconciliation,
and HSM support remain future work. [ADR 0008](docs/adr/0008-rfq-service-owned-wallet.md)
records that boundary.
Expand Down
6 changes: 6 additions & 0 deletions crates/deadcat-rfq-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ deadcat-rfq-provider.workspace = true
elements.workspace = true
hmac.workspace = true
rand.workspace = true
redb.workspace = true
sha2.workspace = true
subtle.workspace = true
tempfile.workspace = true
thiserror.workspace = true
zeroize.workspace = true

[target.'cfg(unix)'.dependencies]
libc.workspace = true
rustix.workspace = true
2 changes: 1 addition & 1 deletion crates/deadcat-rfq-wallet/src/keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl EncryptedKeystore {
Self::seal_entropy_with_rng(identity, passphrase, kdf, &entropy, rng)
}

fn seal_entropy_with_rng<R: RngCore + CryptoRng>(
pub(crate) fn seal_entropy_with_rng<R: RngCore + CryptoRng>(
identity: ProviderIdentity,
passphrase: &[u8],
kdf: KdfParams,
Expand Down
17 changes: 11 additions & 6 deletions crates/deadcat-rfq-wallet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! Narrow, purpose-built hot-wallet capabilities for an RFQ provider.
//!
//! This crate owns no chain index. It provides a versioned encrypted keystore
//! envelope, fresh confidential tree-less P2TR destinations,
//! confidential-output recovery, and exact durable-job signing. The envelope
//! bytes can be copied and reopened, but a production daemon must still supply
//! atomic filesystem persistence, protected passphrase delivery,
//! authoritative chain scanning, and tested backup transport and verification.
//! This crate owns no chain index. It provides a versioned encrypted keystore,
//! an identity-bound durable locator catalog, fresh confidential tree-less
//! P2TR destinations, confidential-output recovery, and exact durable-job
//! signing. A production daemon must still supply protected passphrase
//! delivery, authoritative chain scanning, coordinated service backup, and
//! host-level memory hardening.
//!
//! Secret buffers owned here are erased on drop where their underlying type
//! permits it. This is defense in depth, not a claim that Rust temporaries,
Expand All @@ -16,7 +16,12 @@
#![forbid(unsafe_code)]

mod keystore;
mod persistent;
mod wallet;

pub use keystore::{DEFAULT_KDF_PARAMS, EncryptedKeystore, KdfParams, KeystoreError, UnlockedSeed};
pub use persistent::{
MAX_WALLET_CATALOG_ENTRIES, PersistentRfqWallet, PersistentWalletError, WalletBackup,
WalletCatalogSnapshot,
};
pub use wallet::{RfqWallet, RfqWalletError};
Loading
Loading