toip.tools

function · Browser and Node

acceptMembership

Decides whether a membership proof is acceptable: the circuit is pinned, the groups are the policy's, each root is in its issuer's verified log, fresh, and the set big enough, the scope and signal are what the verifier computed itself, the statement matches the policy, and the proof verifies.

@toip-tools/anon-membershipView source
TypeScriptImport
import { acceptMembership } from "@toip-tools/anon-membership";

Declaration

TypeScriptSignature
acceptMembership(proof: unknown, ctx: {
    policy: AcceptPolicy;
    logs: Record<string, GroupRoot[]>;
    verifier: MembershipVerifier;
    scope: Field;
    signal: Field;
    clock: Clock;
}): Promise<Acceptance>;

Parameters

proofrequired
unknown
ctxrequired
{ policy: AcceptPolicy; logs: Record<string, GroupRoot[]>; verifier: MembershipVerifier; scope: Field; signal: Field; clock: Clock; }

Returns

Promise<Acceptance>