toip.tools

interface · Browser and Node

AcceptPolicy

What a verifier accepts. Groups are in statement slot order.

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

Declaration

TypeScriptinterface
interface AcceptPolicy {
  /** 1 to 4 groups, each with the issuer DID pinned out of band. */
  groups: { group: string; issuer: string }[];
  /** Pinned verification-key hashes. */
  vkHashes: string[];
  /** How many epochs after a root stops being the newest it is still accepted. */
  maxEpochAge: number;
  /** The smallest anonymity set: the sum of the groups' sizes at the roots used. */
  minSize: number;
  schemaId?: Field;
  predicates?: Predicate[];
  /** registeredBy must be today minus this. Default 0. */
  minRegisteredDays?: number;
  /** Nullifiers per member in the scope. Default 1. */
  limit?: number;
  /** Roots fixed in advance (a poll's), hex, per slot. If set, only these are accepted. */
  pinnedRoots?: string[];
  /** How many days `today` may lag the verifier's clock. Default 1. */
  maxDayLag?: number;
}

Properties

groupsrequired
{ group: string; issuer: string; }[]

1 to 4 groups, each with the issuer DID pinned out of band.

vkHashesrequired
string[]

Pinned verification-key hashes.

maxEpochAgerequired
number

How many epochs after a root stops being the newest it is still accepted.

minSizerequired
number

The smallest anonymity set: the sum of the groups' sizes at the roots used.

schemaIdoptional
bigint | undefined
predicatesoptional
Predicate[] | undefined
minRegisteredDaysoptional
number | undefined

registeredBy must be today minus this. Default 0.

limitoptional
number | undefined

Nullifiers per member in the scope. Default 1.

pinnedRootsoptional
string[] | undefined

Roots fixed in advance (a poll's), hex, per slot. If set, only these are accepted.

maxDayLagoptional
number | undefined

How many days today may lag the verifier's clock. Default 1.