@sismo-core/commitment-mapper-tester-js
v1.0.11
Published
Sismo Commitment Mapper Tester
Downloads
57
Readme
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!