js-rln/src/index.ts

26 lines
767 B
TypeScript
Raw Normal View History

2022-09-28 12:54:04 +10:00
import { RLNDecoder, RLNEncoder } from "./codec.js";
import { GOERLI_CONTRACT, RLN_ABI } from "./constants.js";
import { Proof, RLNInstance } from "./rln.js";
2022-09-27 22:47:55 +10:00
import { MembershipKey } from "./rln.js";
import { RLNContract } from "./rln_contract.js";
2022-09-06 16:40:19 -04:00
// reexport the create function, dynamically imported from rln.ts
export async function create(): Promise<RLNInstance> {
// A dependency graph that contains any wasm must all be imported
// asynchronously. This file does the single async import, so
// that no one else needs to worry about it again.
2022-09-23 16:32:38 +10:00
const rlnModule = await import("./rln.js");
2022-09-06 16:40:19 -04:00
return await rlnModule.create();
2022-09-06 12:06:19 -04:00
}
2022-09-23 16:32:38 +10:00
export {
RLNInstance,
MembershipKey,
Proof,
RLNEncoder,
RLNDecoder,
RLNContract,
RLN_ABI,
GOERLI_CONTRACT,
};