Repository navigation
feat(wasm): export proveAncestor in the WebAssembly package (#26) - #39
Merged
samjay8 merged 1 commit intoOct 29, 2026
Merged
Conversation
samjay8
approved these changes
Oct 29, 2026
Contributor
|
Merged — thanks for your contribution! 🎉 |
This was referenced Oct 29, 2026
Contributor
Author
|
Thanks so much for the fast review and merge! 🙏 Really enjoyed working on externalize-wasm. To help finish the rest of the �ncestry track alongside #23 and #26, I have left implementation plans on #25 (CLI �ncestry --headers directory support — already rebased cleanly on �927da3) and externalize-node#15 (GET /v1/checkpoints/{checkpoint}/ledger for browser proveAncestor) whenever you'd like to assign one. |
This was referenced Oct 29, 2026
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.
Closes #26
Summary
proveAncestor(bundleJson, headerFiles, ledger, trustToml?)fromcrates/externalize-wasm(andprove_ancestor_to_jsonfor native Rust tests) to prove an older ledger from a certified bundle and archivedledger-*.xdr.gzcheckpoints.externalize-core/archiveincrates/externalize-wasmto decode gzipped XDR header frames viaarchive::read_gz_framesand walk the hash chain withexternalize_core::prove_ancestor.report::ancestry({ verified: true, ledger, via, links }) orreport::rejected({ verified: false, error }) following the same never-throws contract asverify, and export theAncestryReportTypeScript interface in the generated.d.ts.Validation
crates/externalize-wasm/tests/verify.rs(proves_ancestor_and_rejects_when_headers_are_missing) proving ledger64791250acrossledger-03dca33f.xdr.gz+ledger-03dca2ff.xdr.gz(links == 109) and verifying rejection when the older checkpoint file is omitted.crates/externalize-wasm/tests/node.cjsto testpkg.proveAncestorend-to-end in Node.js and assertAncestryReportandexport function proveAncestor(...): AncestryReport | Rejection;inexternalize_wasm.d.tswhile keeping the.wasmbinary well under the 1 MiB budget.