mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-01-14 03:23:12 +00:00
* implement rln contract abstraction, add basic tests, add usefull constants * remove test command * resolve simple comments * move to getter for members, add init method * fix naming * remove default signature message * use direct path to js file * try different karma config * try generic import * update test * address comments: rename const file, return prev regexp * remove test * bring back test file * fix mock approach * use any for type casting * use another approach for typecasting * update mocks * update mocked event * use correct value for mock * fix spy definition * add BigInt to MembershipKey * fix joining * use slice * remove accidentally commited junk * fix typo, use DataView for conversion, use BigInt directly Co-authored-by: weboko <anon@mail.com>
26 lines
767 B
TypeScript
26 lines
767 B
TypeScript
import { RLNDecoder, RLNEncoder } from "./codec.js";
|
|
import { GOERLI_CONTRACT, RLN_ABI } from "./constants.js";
|
|
import { Proof, RLNInstance } from "./rln.js";
|
|
import { MembershipKey } from "./rln.js";
|
|
import { RLNContract } from "./rln_contract.js";
|
|
|
|
// 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.
|
|
const rlnModule = await import("./rln.js");
|
|
return await rlnModule.create();
|
|
}
|
|
|
|
export {
|
|
RLNInstance,
|
|
MembershipKey,
|
|
Proof,
|
|
RLNEncoder,
|
|
RLNDecoder,
|
|
RLNContract,
|
|
RLN_ABI,
|
|
GOERLI_CONTRACT,
|
|
};
|