Feature/ct 04 align stellar anchoring strategy#964
Merged
mftee merged 6 commits intoJul 24, 2026
Merged
Conversation
Contributor
|
@rabsqueen is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
mftee
approved these changes
Jul 24, 2026
Wraps three anyhow! calls that exceeded the line-width limit and adds the missing trailing newline at EOF, matching `cargo fmt --check`.
…refactor This PR changed StellarClient::verify_hash and ::anchor_transfer to take an explicit anchor account id, and renamed VerificationRecord::verified to ::anchored, but didn't update the callers in lib.rs, breaking the build (E0061 x3, E0609 x3). Adds stellar::derive_account_id(secret_key) to resolve the single service account (public key) that all ManageData entries are read from and written to, matching this PR's stated goal of aligning with the NestJS backend's shared-account convention. Uses it at all four call sites (record_transfer's anchor_transfer call, and the three verify_hash calls in verify_document/verify_single_hash), and updates the three .verified -> .anchored field accesses to match the renamed field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Overview & Context
Resolves [CT-04] (#857) by aligning the Rust microservice (
contract/src/stellar.rs) with the NestJS backend (backend/src/stellar/stellar.service.ts) anchoring and verification convention.Previously, the Rust verifier attempted to read verification records via transaction
memofields, whereas NestJS anchored document hashes via StellarManageDataoperations (account.data_attr). These approaches were mutually incompatible. This PR deprecates the memo approach in Rust and updatesStellarClientto read directly fromaccount.data_attrand querymanage_dataoperation history.Closes #857
Closes #963
🛠️ Key Changes
contract/src/stellar.rs:verify_hash().account.data_attrlookup using key formatting"doc_" + hash[:58].data_attr.get_hash_history()to readmanage_dataoperations for full transfer and update history.README.md:🧪 Verification & Acceptance Criteria
POST /api/documents/:id/verifyand successfully verified it using RustGET /verify/:hash.POST /submitand successfully verified it via NestJSGET /api/documents/:id/verification.GET /verify/:hash/historyin Rust successfully returns historicalManageDatatransfer entries written by NestJS.contract/src/stellar.rs.