Document REST proof response shape#258
Closed
Lucas-FManager wants to merge 1 commit into
Closed
Conversation
weilixiong
approved these changes
May 25, 2026
MolhamHamwi
approved these changes
May 25, 2026
Contributor
MolhamHamwi
left a comment
There was a problem hiding this comment.
No blockers found on current head 1533f5f.
Evidence checked:
- Inspected
docs/api-examples.mdand confirmed the new REST proof example documents the direct/api/v1/proofs/<proof_hash>payload, not the MCPresult.content[0].textenvelope. - Compared the documented fields against the public proof route behavior in
app/main.py(api_get_proof) and the ledger proof serialization shape (ProofRecord.to_public_dict()). - Inspected
tests/test_docs_public_urls.pyand verified it covers the route string, direct REST wording, core proof fields, submission URL, and verifier metadata. - Ran
pytest tests/test_docs_public_urls.py -q(14 passed),ruff check docs/api-examples.md tests/test_docs_public_urls.py,ruff format --check --preview docs/api-examples.md tests/test_docs_public_urls.py, andgit diff --check origin/main...HEAD.
No secrets, wallet/private-key material, payout credentials, private deployment values, private vulnerability details, or MRWK price claims were reviewed or disclosed.
|
No blockers from my review. Evidence checked:
This should help API users avoid mixing up |
Owner
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.
Bounty #229
What changed:
GET /api/v1/proofs/<proof_hash>response shape indocs/api-examples.md.get_proofJSON-RPCresult.content[0].textenvelope.Evidence:
GET https://api.mrwk.ltclab.site/api/v1/proofs/530f141494aef2af05e3a9a97ef4ec39e026ac721b47914c4dcb404eb3bb256akind,ledger_sequence,ledger_hash,submission_url,to_account, andverifier_resultdirectly at the top level.app/main.py::api_proof(), which loadsproof.public_json, addsledger_hash/ledger_sequence, and returns the object directly.Verification:
uv run --python 3.12 --extra dev python -m pytest tests/test_docs_public_urls.py::test_api_examples_document_rest_proof_response_shape -q-> 1 passeduv run --python 3.12 --extra dev python -m pytest tests/test_docs_public_urls.py -q-> 14 passeduv run --python 3.12 --extra dev python scripts/docs_smoke.py-> docs smoke okuv run --python 3.12 --extra dev ruff check docs/api-examples.md tests/test_docs_public_urls.py-> all checks passeduv run --python 3.12 --extra dev ruff format --check --preview docs/api-examples.md tests/test_docs_public_urls.py-> 2 files already formatteduv run --python 3.12 --extra dev python -m pytest -q-> 206 passed, 2 warningsgit diff --check-> cleanNo private keys, wallet secrets, real signatures, payout credentials, deployment values, private vulnerability details, or MRWK price claims are included.