export interface StatementBuilder { addRange(attribute: AttributeType, lower: ValueType, upper: ValueType): this; addMembership(attribute: AttributeType, set: ValueType[]): this; addNonMembership(attribute: AttributeType, set: ValueType[]): this; revealAttribute(attribute: AttributeType): this; getStatement(): GenericAtomicStatement[]; } export const MIN_DATE = '18000101'; export const MAX_DATE = '99990101'; export const EU_MEMBERS = [ 'AT', 'BE', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'HR', ]; export enum StatementTypes { RevealAttribute = 'RevealAttribute', AttributeInSet = 'AttributeInSet', AttributeNotInSet = 'AttributeNotInSet', AttributeInRange = 'AttributeInRange', } type LaxStringEnum = `${E}`; export type GenericRevealStatement = { type: LaxStringEnum; attributeTag: TagType; }; export type GenericMembershipStatement = { type: LaxStringEnum; attributeTag: TagType; set: ValueType[]; }; export type GenericNonMembershipStatement = { type: LaxStringEnum; attributeTag: TagType; set: ValueType[]; }; export type GenericRangeStatement = { type: LaxStringEnum; attributeTag: TagType; lower: ValueType; upper: ValueType; }; export type GenericAtomicStatement = | GenericRevealStatement | GenericMembershipStatement | GenericNonMembershipStatement | GenericRangeStatement; export type RevealProof = { type: StatementTypes.RevealAttribute; proof: string; attribute: ValueType; }; // Type for proofs that do not have additional fields export type GenericAtomicProof = { type: Exclude; proof: string; }; export type AtomicProof = RevealProof | GenericAtomicProof;