js-rln/src/index.ts

13 lines
522 B
TypeScript
Raw Normal View History

2022-09-23 16:32:38 +10:00
import type { MembershipKey, RateLimitProof, RLNInstance } 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
export { RLNInstance, MembershipKey, RateLimitProof };