js-rln/src/create.ts
Sasha bafbe01e52
feat: simplify API of bootstrapping, connection to MetaMask (#92)
* add MetaMask abstraction, add default start to RLN Instance, expose RLN Contract

* remove console timer

* improve text

* rename to createRLN

* update README, fix tests

* use Provider type

* use provider as it is
2024-01-24 21:23:52 +01:00

10 lines
366 B
TypeScript

import type { RLNInstance } from "./rln.js";
export async function createRLN(): 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.
const rlnModule = await import("./rln.js");
return rlnModule.create();
}