Backend indexer for Riften Labs BCH DeFi contracts (Cauldron, Moria). Mirror of gitlab.com/riftenlabs/riftenlabs-indexer (AGPL-3.0). Author: Riften Labs.
Find a file
Hossein Zoda c1952142de ido: categories in display/UI byte order, drop hardcoded PLP limits
libriften moved encodeVmTokenCategory/decodeVmTokenCategory (which reverse
the 32 category bytes, display<->VM) into the ido announcement and ORB
IdoParams serialize/deserialize layer. Net wire effects the indexer sees:
- preinit announcement delphiCategory[44..76] and xTokenCategory[126..158]
  are now VM/little-endian (were display order);
- the IdoParams commitment stays VM on-wire, but the derived on-chain
  postlaunch orbPoolParamsCategory push flips display->VM (decode now
  returns display, the unchanged bake re-wraps it in encodeVmTokenCategory).

Keep the three categories (delphiCategory, xTokenCategory,
orbPoolParamsCategory) in display/UI byte order in-memory and over RPC:
reverse at every parse site (announcement + IdoParams NFT commitment) and
restore the .rev() on the output#0 delphi-NFT to_blob() compare. The
build_*_bytecode helpers keep reversing display->VM when baking, so the
output#7 P2SH32 rebuild matches the new on-chain layout.

Also drop the now-unused hardcoded MAX_PLP_SHARE / MAX_PLP_ANNUAL_DISCOUNT
/ MIN_PLP_ANNUAL_DISCOUNT statics and dead checks; the min-PLP limits are
NFT-pinned (minPlpShare / minPlpAfterDiscount) and the discount/max-discount
checks now just guard against negatives.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 21:44:18 +00:00
.vscode Convert hash columns from TEXT to BLOB storage 2026-01-22 08:30:17 +01:00
contrib Delphi v2 support 2026-05-04 15:03:40 +02:00
internal Expose authchain head + optional local IPFS gateway for BCMR downloads 2026-06-24 11:07:31 +00:00
linters Fix potential API hangs from write lock contention 2026-02-02 21:01:50 +01:00
src ido: categories in display/UI byte order, drop hardcoded PLP limits 2026-07-14 21:44:18 +00:00
.gitignore Add Chipnet support 2026-01-09 13:46:58 +01:00
.gitlab-ci.yml ci: Use lockfile as cache key 2026-02-02 11:52:09 +01:00
build.rs missing build file 2024-10-25 15:28:40 +02:00
Cargo.lock ido: replace num-bigint with malachite 2026-06-22 10:41:39 +00:00
Cargo.toml ido: replace num-bigint with malachite 2026-06-22 10:41:39 +00:00
LICENSE use AGPL 2024-02-05 16:32:27 +01:00
README.md README: contributors license 2024-03-14 10:54:44 +01:00

Riftenlabs Indexer

RiftenLabs indexer is for indexing DeFi contracts by Riften Labs. It allows for querying historical on-chain data on Bitcoin Cash.

Contributing

All contributors are required to sign a Contributor License Agreement (CLA) before their contributions can be merged into the project.

Contributions are generally welcome. If you intend to make larger changes please discuss them in an issue before MRing them to avoid duplicate work and architectural mismatches.

Installing Rust

Rust can be installed using your package manager of choice or rustup.rs. The former way is considered more secure since it typically doesn't involve trust in the CA system. But you should be aware that the version of Rust shipped by your distribution might be out of date.

Building

The library can be built and tested using cargo:

git clone https://gitlab.com/riftenlabs/riftenlabs-indexer.git
cd riftenlabs-indexer
cargo build

You can run tests with:

cargo test