Files
grin-lws/Cargo.toml
T
jwinterm d9edee0743 Phase 1: view-only rangeproof rewind (recognize outputs from rewind_hash)
Replace the rewind_output stub with a real, view-only implementation:
- src/rewind.rs: derive the v3 rewind nonce (keyed BLAKE2b over the
  commitment) and rewind the Bulletproof via upstream grin_secp256k1zkp,
  then parse the 20-byte proof message into the authoritative key_id +
  value. Faithful minimal port of grin-ext's cross-validated crypto; no
  private key is ever involved. v3-only (legacy needs the master secret,
  same limit as grin-wallet's view-only scan); paths are advisory.
- src/grin.rs: wire rewind_output with hostile-input-safe hex decoding.
- Cargo.toml: depend on upstream grin_secp256k1zkp + blake2 (not the
  vendored fork — the server target needs no wasm patch).
- Golden-vector tests generated by grin's OWN reference ProofBuilder
  (depth-3 Grim + depth-4 Smirk [0,0,n,0]); proves byte-compatibility
  with the published secp crate. Passed an adversarial money-safety
  review (no false-positive/negative, panic-safe).
2026-07-09 12:25:16 -04:00

59 lines
2.1 KiB
TOML

[package]
name = "grin-lws"
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
description = "Grin light-wallet-server: register a view credential, scan the chain in the background, store recognized outputs in a DB, and serve balance/outputs/broadcast/height."
license = "MIT"
repository = "https://github.com/Such-Software/grin-lws"
readme = "README.md"
keywords = ["grin", "light-wallet-server", "lws", "mimblewimble", "wallet"]
categories = ["cryptography::cryptocurrencies"]
# crates.io publish is gated until the rangeproof-rewind crypto lands (scaffold).
publish = false
[[bin]]
name = "grin-lws"
path = "src/main.rs"
[dependencies]
# HTTP server + client.
tokio = { version = "1.35", features = ["full"] }
axum = { version = "0.7", features = ["macros"] }
reqwest = { version = "0.11", features = ["json", "rustls-tls", "stream"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
futures = "0.3"
hex = "0.4"
dotenvy = "0.15"
thiserror = "1.0"
# Persistence. This is a REAL light-wallet-server: it maintains a per-account
# output store and a reorg-safe chain cursor, so it NEEDS a database. Postgres is
# the default for scale; SQLite works for single-operator deployments (enable the
# `sqlite` feature and point DATABASE_URL at a file). Runtime queries only (no
# compile-time `query!` macros) so the crate builds without a live DB.
sqlx = { version = "0.7", default-features = false, features = [
"runtime-tokio-rustls",
"any",
"postgres",
"sqlite",
"macros",
"migrate",
"chrono",
] }
chrono = { version = "0.4", features = ["serde"] }
# View-only Grin rangeproof rewind — recognize a wallet's outputs from its
# `rewind_hash` alone (no spend key). `grin_secp256k1zkp` is Grin's OWN published
# crate (their fork of libsecp256k1-zkp) providing the C bulletproof rewind — we
# depend on it, we do not republish it. `blake2` computes the v3 rewind nonce.
# See src/rewind.rs. (C-FFI: the build host needs a C compiler.)
grin_secp256k1zkp = "0.7.15"
blake2 = "0.10"
[dev-dependencies]
tokio-test = "0.4"