riftenlabs-indexer/Cargo.toml
Dagur Valberg Johannsson 1614b84674 Upgrade bitcoincash to 0.32 and add TokenToken AMM pool indexing
Migrate off the deprecated bitcoincash 0.29 API (Amount/Version types,
FromHex -> FromStr/parse, non-exhaustive Network) across the indexer and
tests.

Add indexing of native token-A <-> token-B (TokenToken) AMM pools:

- tokentoken_pool / tokentoken_pool_history_entry tables in cauldron.db,
  created via an always-run idempotent migration (no DB_VERSION bump, so
  existing databases upgrade in place)
- block-path indexing sharing the cauldron write transaction and reorg
  undo, with creation/swap/withdrawal state tracking and reserve deltas
- mempool indexing: electrum mempool.get filters on the tokentoken
  contract code (spends) and the CONJURE op_return hint (creations);
  first_seen_timestamp reconciles with mtp on confirmation
- RPC endpoints /tokentoken/pool/active (pair lookup, order-insensitive)
  and /tokentoken/tokens

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:18:35 +02:00

53 lines
1.7 KiB
TOML

[package]
name = "riftenlabs-indexer"
version = "0.2.0"
edition = "2021"
authors = ["Whiterun LLC <hello@riftenlabs.com>"]
description = "Riften Labs DeFi contract indexer on Bitcoin Cash"
license = "AGPL-3.0-or-later"
homepage = "https://gitlab.com/riftenlabs/riftenlabs-indexer"
repository = "https://gitlab.com/riftenlabs/riftenlabs-indexer"
keywords = ["bitcoincash", "bitcoin", "cauldron", "defi", "cpmm"]
readme = "README.md"
build = "build.rs"
[dependencies]
anyhow = { version = "1.0.94", features = ["backtrace"] }
bitcoincash = "0.32.1"
bitcoin_hashes = { version = "0.14.100", default-features = false } # Same version as used by bitcoincash
electrum-client-netagnostic = { version = "0.21.2", features = ["use-rustls", "use-websocket"] }
hex = "0.4.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.133"
rocket = { version = "0.5.1", features = ["json"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
rayon = "1.10.0"
riftenlabs-defi = "0.4.0"
rocket_cors = "0.6.0"
log = "0.4"
stderrlog = "0.6.0"
tokio = { version = "1", features = ["full"] }
rust_decimal = { version = "1.36", features = ["maths"] }
rust_decimal_macros = "1.36"
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
rand = "0.8.5"
configure_me = "0.4.0"
futures = "0.3.32"
[build-dependencies]
configure_me_codegen = "0.4.8"
[dependencies.malachite]
version = "0.6.1"
default-features = false
features = [ "naturals_and_integers"]
[package.metadata.configure_me]
spec = "internal/config_specification.toml"
[profile.release]
debug = true
[lints.clippy]
# workaround for generated code in depdencendy configure_me
uninlined_format_args = "allow"