@waku/rln
Version:
RLN (Rate Limiting Nullifier) implementation for Waku
31 lines (30 loc) • 798 B
TypeScript
import type { IdentityCredential } from "../identity.js";
export type MembershipHash = string;
export type Sha256Hash = string;
export type Keccak256Hash = string;
export type Password = string | Uint8Array;
export type KeystoreMembershipInfo = {
chainId: string;
address: string;
treeIndex: number;
rateLimit: number;
};
export type KeystoreEntity = {
identity: IdentityCredential;
membership: KeystoreMembershipInfo;
};
export type DecryptedCredentials = KeystoreEntity;
export type EncryptedCredentials = {
/**
* Valid JSON string that contains Keystore
*/
keystore: string;
/**
* ID of credentials from provided Keystore to use
*/
id: string;
/**
* Password to decrypt credentials provided
*/
password: Password;
};