Skip to content
RadNiPublic

About

Merkle Patricia Trie (MPT) circuits written in Noir

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPT Noir

License: MIT Noir-Tests

This software is unaudited and should not be used in production. Use at your own risk.


MPT Noir includes tools to prove Ethereum Merkle Patricia Trie (MPT) proofs.


Installation

In your Nargo.toml file, add the following dependency:

[dependencies]
mpt = { tag = "v0.2.0", git = "https://github.com/radni/mpt-noir" }

Simple Usage

The mpt-noirjs package is made to facilitate witness generation for mpt-noir circuits. To generate inputs for address "MY_ADDRESS" against the latest block you can use the following:

const provider = new ethers.JsonRpcProvider("RPC_URL")
const address = "MY_ADDRESS"
const output = await provider.send("eth_getProof", [address, [], "latest"])
const mpt_proof = getNodesFromProof(output.accountProof, address)

The mpt_proof contains all the data necessary to generate proof using the mpt-noir circuits. To see an elaborated example you can checkout Balance Proof application.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Merkle Patricia Trie (MPT) circuits written in Noir

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages