import { AccumulatorSecretKey } from './params-and-keys'; import { VBWitnessUpdateInfo, WitnessUpdateInfo } from './witness-update-info'; export declare abstract class AccumulatorWitness { value: Uint8Array | object; constructor(value: Uint8Array | object); abstract updatePostAdd(addition: Uint8Array, element: Uint8Array, accumulatorValueBeforeAddition: V): void; abstract updatePostRemove(removal: Uint8Array, element: Uint8Array, accumulatorValueAfterRemoval: V): void; abstract updateUsingPublicInfoPostBatchUpdate(element: Uint8Array, additions: Uint8Array[], removals: Uint8Array[], publicInfo: WitnessUpdateInfo): void; abstract updateUsingPublicInfoPostMultipleBatchUpdates(element: Uint8Array, additions: Uint8Array[][], removals: Uint8Array[][], publicInfo: WitnessUpdateInfo[]): void; } export declare class VBMembershipWitness extends AccumulatorWitness { value: Uint8Array; /** * Update a membership witness after an element is added to the accumulator * @param addition - new addition to the accumulator * @param member - whose witness is being updated * @param accumulatorValueBeforeAddition - accumulator value before the addition was done. */ updatePostAdd(addition: Uint8Array, member: Uint8Array, accumulatorValueBeforeAddition: Uint8Array): void; /** * Update a membership witness after an element is removed from the accumulator. * @param removal - removal from the accumulator * @param member - whose witness is being updated * @param accumulatorValueAfterRemoval - accumulator value after the removal was done. */ updatePostRemove(removal: Uint8Array, member: Uint8Array, accumulatorValueAfterRemoval: Uint8Array): void; /** * Compute an update to the membership witness after adding and removing batches of elements from the accumulator. * @param member - the member whose witness is to be updated * @param additions - array of additions * @param removals - array of removals * @param publicInfo - witness update info published by the accumulator manager */ updateUsingPublicInfoPostBatchUpdate(member: Uint8Array, additions: Uint8Array[], removals: Uint8Array[], publicInfo: VBWitnessUpdateInfo): void; /** * Compute an update to the membership witness after adding and removing several batches of elements from the accumulator. * For each batch of updates, additions, removals and witness update info are provided. * @param member - the member whose witness is to be updated * @param additions - array of arrays of additions * @param removals - array of arrays of removals * @param publicInfo - array of witness update info */ updateUsingPublicInfoPostMultipleBatchUpdates(member: Uint8Array, additions: Uint8Array[][], removals: Uint8Array[][], publicInfo: VBWitnessUpdateInfo[]): void; /** * Compute an update to several membership witnesses after adding and removing batches of elements from the accumulator. * @param witnesses - membership witnesses to update * @param members - members corresponding to the witnesses * @param additions * @param removals * @param accumulatorValueBeforeUpdates - accumulator value before the updates * @param secretKey */ static updateMultiplePostBatchUpdates(witnesses: VBMembershipWitness[], members: Uint8Array[], additions: Uint8Array[], removals: Uint8Array[], accumulatorValueBeforeUpdates: Uint8Array, secretKey: AccumulatorSecretKey): VBMembershipWitness[]; toJSON(): string; static fromJSON(json: string): VBMembershipWitness; } export declare class VBNonMembershipWitness extends AccumulatorWitness { value: { d: Uint8Array; C: Uint8Array; }; /** * Update a non-membership witness after an element is added to the accumulator * @param addition - new addition to the accumulator * @param nonMember - whose witness is being updated * @param accumulatorValueBeforeAddition - accumulator value before the addition was done. */ updatePostAdd(addition: Uint8Array, nonMember: Uint8Array, accumulatorValueBeforeAddition: Uint8Array): void; /** * Update a non-membership witness after an element is removed from the accumulator. * @param removal - removal from the accumulator * @param nonMember - whose witness is being updated * @param accumulatorValueAfterRemoval - accumulator value after the removal was done. */ updatePostRemove(removal: Uint8Array, nonMember: Uint8Array, accumulatorValueAfterRemoval: Uint8Array): void; /** * Compute an update to the non-membership witness after adding and removing batches of elements from the accumulator. * @param nonMember - the non-member whose witness is to be updated * @param additions - array of additions * @param removals - array of removals * @param publicInfo - witness update info published by the accumulator manager */ updateUsingPublicInfoPostBatchUpdate(nonMember: Uint8Array, additions: Uint8Array[], removals: Uint8Array[], publicInfo: VBWitnessUpdateInfo): void; /** * Compute an update to the non-membership witness after adding and removing several batches of elements from the accumulator. * For each batch of updates, additions, removals and witness update info are provided. * @param nonMember - the non-member whose witness is to be updated * @param additions - array of arrays of additions * @param removals - array of arrays of removals * @param publicInfo - array of witness update info */ updateUsingPublicInfoPostMultipleBatchUpdates(nonMember: Uint8Array, additions: Uint8Array[][], removals: Uint8Array[][], publicInfo: VBWitnessUpdateInfo[]): void; /** * Compute an update to several non-membership witnesses after adding and removing batches of elements from the accumulator. * @param witnesses - non-membership witnesses to update * @param nonMembers - nonMembers corresponding to the witnesses * @param additions * @param removals * @param accumulatorValueBeforeUpdates - accumulator value before the updates * @param secretKey */ static updateMultiplePostBatchUpdates(witnesses: VBNonMembershipWitness[], nonMembers: Uint8Array[], additions: Uint8Array[], removals: Uint8Array[], accumulatorValueBeforeUpdates: Uint8Array, secretKey: AccumulatorSecretKey): VBNonMembershipWitness[]; toJSON(): string; static fromJSON(json: string): VBNonMembershipWitness; } //# sourceMappingURL=accumulatorWitness.d.ts.map