Rename ido.id -> ido.internal_id in the schema and IdoDBRecord, and
expose the preinit_txid hex as the public "id" in all RPC responses.
Public API shape:
- IdoRpcRecord.id: i64 -> String (hex of preinit_txid). preinit_txid
field is preserved unchanged.
- IdoEntryRpcRecord.ido_id: i64 -> String (hex of parent preinit_txid).
- IdoTxChainRpcRecord.ido_id: i64 -> String (hex of parent preinit_txid).
- IdoTxChainRpcRecord gains ido_internal_id: i64 (debug endpoint only).
- Routes /<id>/entries and /<id>/txchain accept the preinit_txid hex
as the path id; returns 404 IDO_NOT_FOUND on miss.
Internals:
- New lookup_internal_id_by_preinit_txid helper.
- list_ido_entries / list_ido_txchain take preinit_txid_hex as input
so the caller (which already parsed it from the path) avoids the
extra "preinit_txid by internal_id" lookup.
- Child table FK columns (ido_entry.ido_id, ido_txchain.ido_id) keep
their names; only the parent PK and field accesses were renamed.
Notes:
- Breaking API change for /ido/* endpoints. Clients reading "id" or
"ido_id" as integers must switch to strings.
- ido.db has no migration framework: drop the file and re-index on
deploy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .vscode | ||
| contrib | ||
| internal | ||
| linters | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
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