mpt-noirjs
Version:
Typescript suit for mpt-noir
28 lines (18 loc) • 1.05 kB
Markdown
[](https://opensource.org/licenses/MIT)
[](https://github.com/RadNi/mpt-noirjs/actions/workflows/npm-publish.yml)
<hr>
**MPT NoirJS** Witness generator for [mpt-noir](https://github.com/radni/mpt-noir) circuits.
```
npm i mpt-noirjs
```
```javascript
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](https://github.com/RadNi/balance_proof) application.
This project is licensed under the MIT License. See the [LICENSE](https://github.com/radni/mpt-noirjs/blob/main/LICENSE) file for details.