HomePhabricator

[avalanche-lib-wasm] Introduce a new library for managing stakes, proofs and…

Description

[avalanche-lib-wasm] Introduce a new library for managing stakes, proofs and delegations

Summary:
This Rust library also provide bindings for WASM so it can be used in web projects.
This lib is small enough and has very limited dependencies. The implementation can be compared with the C++ and Python reference implementations. Most of the test vectors are shared with these implementations too.

The choice of Rust makes it easy to encapsulate the signature and verification processes that use the ecash-libsecp256k1, so the cryptography is secure. The remaining part being mostly serialization/deserialization, Rust is a good fit for the job.

A typescript library and a Rust CLI tool are coming in follow-up diffs.

Test Plan:

cargo build
cargo test
./build-wasm.sh

Reviewers: #bitcoin_abc, bytesofman, PiRK

Reviewed By: #bitcoin_abc, bytesofman, PiRK

Subscribers: PiRK, bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D18602

Details

Provenance
FabienAuthored on Sep 10 2025, 21:03
FabienPushed on Sep 12 2025, 21:24
Reviewer
Restricted Project
Differential Revision
D18602: [avalanche-lib-wasm] Introduce a new library for managing stakes, proofs and delegations
Parents
rABC45c54f8c34d8: [Cashtab] Use standard wallet address preview function
Branches
Unknown
Tags
Unknown