[package]
name = "totalreclaw-core"
version = "2.5.4"
edition = "2021"
description = "TotalReclaw core — E2EE crypto, reranker, wallet, UserOp, store/search pipelines. Single source of truth for all clients."
license = "MIT"
repository = "https://github.com/p-diogo/totalreclaw"
homepage = "https://totalreclaw.xyz"
readme = "README.md"
keywords = ["e2ee", "memory", "crypto", "erc4337", "ai"]
categories = ["cryptography", "api-bindings"]
# Ensure the canonical extraction + compaction prompts ship with the
# published crate. `src/prompts.rs` embeds these `.md` files via
# `include_str!` at compile time — the Cargo default package rules
# include files under `src/**`, but we spell it out so future
# refactors (e.g. moving prompts outside `src/`) can't accidentally
# drop them from the tarball. The plugin consumer wire (plugin 3.3.0)
# depends on this.
include = [
    "src/**/*.rs",
    "src/prompts/*.md",
    "Cargo.toml",
    "pyproject.toml",
    "README.md",
]

[features]
default = ["managed"]
managed = ["dep:alloy-primitives", "dep:alloy-sol-types"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:serde-wasm-bindgen", "getrandom/js", "uuid/js"]
python = ["dep:pyo3"]
# maturin enables this on top of `python` when building the cdylib.
# Keeping it separate lets `cargo test --features python` link cleanly.
python-extension = ["python", "pyo3/extension-module"]

[lib]
crate-type = ["lib", "cdylib"]

[dependencies]
# Crypto
chacha20poly1305 = "0.10"
hkdf = "0.12"
hmac = "0.12"
sha2 = "0.10"
rand = "0.8"

# BIP-39
bip39 = "2"
pbkdf2 = { version = "0.12", features = ["hmac"] }

# Ethereum / wallet derivation (BIP-44 + Keccak256)
coins-bip32 = "0.12"
k256 = { version = "0.13", features = ["ecdsa"] }
tiny-keccak = { version = "2", features = ["keccak"] }

# Encoding
base64 = "0.22"
hex = "0.4"

# Unicode
unicode-normalization = "0.1"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# Import HTML parsing (Gemini Takeout legacy export)
regex = "1"

# Timestamps + UUIDs
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v7"] }

# Error handling
thiserror = "2"

# ERC-4337 ABI encoding (feature-gated: managed service only)
alloy-primitives = { version = "1", optional = true }
alloy-sol-types = { version = "1", optional = true }

# CSPRNG
getrandom = { version = "0.2", optional = true }

# WASM bindings (feature-gated)
wasm-bindgen = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }

# Python bindings (feature-gated)
pyo3 = { version = "0.25", optional = true }
