Skip to content

Conversation

@Roee-87
Copy link
Collaborator

@Roee-87 Roee-87 commented Oct 28, 2025

Motivation

Wallets built on the SDK will that will support compliant stablecoins will need to generate a Merkle exclusion proof in order to prove non-inclusion on a freeze list. Given a Merkle tree in the form of a vector of Aleo field elements, the support code in this PR will be able to generate a Merkle path based on a user's address. The address will be converted to a field element. The leaves of the Merkle tree are sorted. Two Merkle paths are generated at the indices where the address would be inserted if that address were part of the Merkle tree.

Test Plan

The test directory includes a test file containing tests for the happy path and fail cases.

@Roee-87 Roee-87 self-assigned this Oct 28, 2025
@Roee-87 Roee-87 added enhancement New feature or request javascript Pull requests that update Javascript code labels Oct 28, 2025
@Roee-87 Roee-87 marked this pull request as ready for review October 28, 2025 05:58
@iamalwaysuncomfortable iamalwaysuncomfortable changed the title [Feature] Support code for Merkle exclusion proofs [Feature] Support for Merkle exclusion proofs Oct 28, 2025
Copy link
Member

@iamalwaysuncomfortable iamalwaysuncomfortable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor formatting nits, but once those are addressed, this is good to go.

@Roee-87 Roee-87 merged commit f923e17 into mainnet Oct 29, 2025
2 of 5 checks passed
@Roee-87 Roee-87 deleted the rr/add-merkle-tree-support branch October 29, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants