js-rln/src/index.ts

15 lines
608 B
TypeScript
Raw Normal View History

2022-09-28 12:54:04 +10:00
import { RLNDecoder, RLNEncoder } from "./codec.js";
2022-09-27 22:47:55 +10:00
import type { Proof, RLNInstance } from "./rln.js";
import { MembershipKey } from "./rln.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
2022-09-27 23:31:09 +10:00
export { RLNInstance, MembershipKey, Proof, RLNEncoder, RLNDecoder };