@sismo-core/commitment-mapper-tester-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

Logo

Commitment Mapper tester

Made by Sismo

Installation

yarn add @sismo-core/commitment-mapper-tester-js

Usage

import { CommitmentMapperTester, OWNERSHIP_SIGNATURE_MESSAGE, buildPoseidon } from "@sismo-core/commitment-mapper-tester-js"; 

const commitmentMapperTester = await CommitmentMapperTester.generate();
const poseidon = await buildPoseidon();

const address = ; //ETHAddress
const signature = ; //ETHSig(OWNERSHIP_SIGNATURE_MESSAGE)
const secret = BigNumber.from(1);
const commitment = poseidon([secret]);

const commitmentReceipt = await commitmentMapperTester.commit(
    address,
    signature,
    commitment
);

License

Distributed under the MIT License.

Contribute

Please, feel free to open issues, PRs or simply provide feedback!

Contact

Prefer Discord or Twitter


bottom

Package Sidebar

Install

npm i @sismo-core/commitment-mapper-tester-js

Weekly Downloads

8

Version

1.0.11

License

MIT

Unpacked Size

78.8 kB

Total Files

29

Last publish

Collaborators

  • yum0e
  • gab1n
  • leosayous21
  • dhadrien