toip.tools

interface · Browser and Node

Statement

The public half of a proof. The verifier rebuilds it from its own data and requires an exact match.

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

Declaration

TypeScriptinterface
interface Statement {
  /** 1 to 4 groups. The proof says the member is in one of them, not which. */
  groups: { groupId: Field; root: Field }[];
  schemaId: Field;
  /** Days since 1970-01-01 UTC. The leaf's validUntilDay must be at least this. */
  today: number;
  /** The leaf's registeredDay must be at most this. */
  registeredBy: number;
  /** Up to 4, one per attribute slot. Missing slots are "any". */
  predicates: Predicate[];
  scope: Field;
  /** How many nullifiers one member may make in this scope: 1 to 65536. */
  limit: number;
  /** What the proof is bound to (tipline's "message"). */
  signal: Field;
}

Properties

groupsrequired
{ groupId: Field; root: Field; }[]

1 to 4 groups. The proof says the member is in one of them, not which.

schemaIdrequired
bigint
todayrequired
number

Days since 1970-01-01 UTC. The leaf's validUntilDay must be at least this.

registeredByrequired
number

The leaf's registeredDay must be at most this.

predicatesrequired
Predicate[]

Up to 4, one per attribute slot. Missing slots are "any".

scoperequired
bigint
limitrequired
number

How many nullifiers one member may make in this scope: 1 to 65536.

signalrequired
bigint

What the proof is bound to (tipline's "message").