You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[enhancement]: proveAncestor in the WebAssembly package #26
prove_ancestor (behind externalize ancestry) proves an older ledger from a certified one and archived headers. Browsers and Node can't do this yet, so a wallet holding one fresh proof can't check a ledger from last week.
Scope
Export proveAncestor(bundleJson, headerFiles, ledger) from crates/externalize-wasm. headerFiles is an array of Uint8Arrays, the gzipped ledger-*.xdr.gz contents.
Return report::ancestry ({ verified: true, ledger, via, links }) or { verified: false, error }, the same never-throws contract as verify, and add its TypeScript type next to VerifyReport.
Decode with archive::read_gz_frames. Check that the wasm stays under CI's 1 MB size limit.
Done when
tests/node.cjs proves 64791250 from the fixture bundle and both fixture header files, and rejects with only the newer file.
The .d.ts declares the function with its typed result.
Comment to be assigned before starting. Read CONTRIBUTING.md for the checks this repository runs.
Hi @Externalize-Labs, I would like to work on #26 once assigned! I traced the root cause in crates/externalize-wasm, tests/node.cjs, .d.ts (prove_ancestor, externalize ancestry, proveAncestor(bundleJson, headerFiles, ledger)) and have a clean, isolated fix ready to implement.
Proposed Implementation Plan:
Core Implementation (crates/externalize-wasm, tests/node.cjs, .d.ts): Export proveAncestor(bundleJson, headerFiles, ledger) from crates/externalize-wasm. headerFiles is an array of Uint8Arrays, the gzipped ledger-*.xdr.gz contents.
Edge-Case & Contract Validation: Return report::ancestry ({ verified: true, ledger, via, links }) or { verified: false, error }, the same never-throws contract as verify, and add its TypeScript type next to VerifyReport; Decode with archive::read_gz_frames. Check that the wasm stays under CI's 1 MB size limit.
Verification & Tests: Verify via unit and regression tests covering: tests/node.cjs proves 64791250 from the fixture bundle and both fixture header files, and rejects with only the newer file; The .d.ts declares the function with its typed result.
ETA: Clean, tested pull request ready within 4–6 hours of assignment.
Activity
khoap1220-hue commentedon Oct 26, 2026
Hi @Externalize-Labs, I would like to work on #26 once assigned! I traced the root cause in
crates/externalize-wasm,tests/node.cjs,.d.ts(prove_ancestor,externalize ancestry,proveAncestor(bundleJson, headerFiles, ledger)) and have a clean, isolated fix ready to implement.Proposed Implementation Plan:
crates/externalize-wasm,tests/node.cjs,.d.ts): ExportproveAncestor(bundleJson, headerFiles, ledger)fromcrates/externalize-wasm.headerFilesis an array ofUint8Arrays, the gzippedledger-*.xdr.gzcontents.report::ancestry({ verified: true, ledger, via, links }) or{ verified: false, error }, the same never-throws contract asverify, and add its TypeScript type next toVerifyReport; Decode witharchive::read_gz_frames. Check that the wasm stays under CI's 1 MB size limit.tests/node.cjsproves 64791250 from the fixture bundle and both fixture header files, and rejects with only the newer file; The.d.tsdeclares the function with its typed result.ETA: Clean, tested pull request ready within 4–6 hours of assignment.
feat(wasm): export proveAncestor in the WebAssembly package
samjay8 commentedon Oct 29, 2026
@khoap1220-hue assigned to you, go ahead. Open a PR that says
Closes #26; once CI and the checks pass it will be reviewed and merged.feat(wasm): export proveAncestor in the WebAssembly package (External…
Merge pull request #39 from khoap1220-hue/feat/wasm-prove-ancestor-26-v2