JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q79512F
  • License MIT

Typescript suit for mpt-noir

Package Exports

  • mpt-noirjs
  • mpt-noirjs/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mpt-noirjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

License: MIT Node.js Package


MPT NoirJS Witness generator for mpt-noir circuits.

Installation

npm i mpt-noirjs

Simple Usage

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.