import { BytearrayWrapper } from '../bytearray-wrapper'; export declare class GadgetVector extends BytearrayWrapper { static generate(label: Uint8Array): GadgetVector; } export declare class ThresholdPublicKey extends BytearrayWrapper { } /** * A share of a BBS+ signature created by 1 signer. Multiple such signatures will be aggregated to form 1 BBS+ signature */ export declare class ThresholdBbsPlusSignatureShare extends BytearrayWrapper { } /** * A share of a BBS signature created by 1 signer. Multiple such signatures will be aggregated to form 1 BBS signature */ export declare class ThresholdBbsSignatureShare extends BytearrayWrapper { } /** * Output of the base OT phase. */ export declare class BaseOTOutput extends BytearrayWrapper { } export declare class Commitments extends BytearrayWrapper { } export declare class CommitmentsForZeroSharing extends BytearrayWrapper { } export declare class Shares extends BytearrayWrapper { } export declare class ZeroShares extends BytearrayWrapper { } export declare class Message1 extends BytearrayWrapper { } export declare class Message2 extends BytearrayWrapper { } /** * Common functionality of the BBS+ and BBS threshold signer */ export declare abstract class ThresholdSigner { readonly id: number; readonly others: Set; readonly threshold: number; readonly sigBatchSize: number; readonly protocolId: Uint8Array; comms?: Commitments; commsForZero?: Map; recvCommFrom?: Set; recvSharesFrom?: Set; msg1s?: Map; msg2s?: Map; private round1State?; protected round1Output?: Uint8Array; private round2State?; protected round2Output?: Uint8Array; /** * * @param id - id of this participant * @param others - ids of all other participant * @param threshold - the threshold for this signature * @param sigBatchSize - the number of signatures that will be produced with on the completion of this protocol. * @param protocolId - unique id */ constructor(id: number, others: Set, threshold: number, sigBatchSize: number, protocolId: Uint8Array); /** * Returns the commitments to be sent to other signers */ startRound1(): [Commitments, Map]; processReceivedCommitments(senderId: number, comms: Commitments, commsZeroShare: CommitmentsForZeroSharing): void; /** * Returns shares to be sent to the signer with id `signerId` * @param signerId */ getSharesForOtherSigner(signerId: number): [Shares, ZeroShares]; /** * Returns an array of shares, 1 to be sent to each of the signer in `signerIds` * @param signerIds */ getSharesForOtherSigners(signerIds: number[]): [Shares, ZeroShares][]; processReceivedShares(senderId: number, shares: Shares, zeroShares: ZeroShares): void; startRound2(baseOTOut: BaseOTOutput, gadgetVector: GadgetVector): Map; processReceivedMsg1(senderId: number, msg: Message1, gadgetVector: GadgetVector): Message2; processReceivedMsg2(senderId: number, msg: Message2, gadgetVector: GadgetVector): void; finishRound2(): void; protected finishR1(secretKey: Uint8Array): void; hasStarted(): boolean; hasFinishedRound1(): boolean; hasStartedRound2(): boolean; hasFinishedRound2(): boolean; ensureRound1Started(): void; ensureRound1Finished(): void; ensureRound2Started(): void; ensureRound2Finished(): void; hasReceivedCommitmentsFromAll(): boolean; hasReceivedSharesFromAll(): boolean; protected abstract startRound1Func(): (sigBatchSize: number, participantId: number, others: Set, protocolId: Uint8Array) => [Uint8Array, Uint8Array, Map]; protected abstract processCommFunc(): (phase1: Uint8Array, senderId: number, commitments: Uint8Array, commitmentsZeroShare: Uint8Array) => Uint8Array; protected abstract getSharesForOtherFunc(): (phase1: Uint8Array, otherId: number) => [Uint8Array, Uint8Array]; protected abstract getSharesForOthersFunc(): (phase1: Uint8Array, otherIds: number[]) => [Uint8Array, Uint8Array][]; protected abstract processSharesFunc(): (phase1: Uint8Array, senderId: number, shares: Uint8Array, zeroShares: Uint8Array) => Uint8Array; protected abstract finishRound1Func(): (phase1: Uint8Array, secretKey: Uint8Array) => Uint8Array; protected abstract startRound2Func(): (participantId: number, others: Set, phase1Output: Uint8Array, baseOTOutput: Uint8Array, gadgetVector: Uint8Array) => [Uint8Array, Map]; protected abstract recvMsg1Func(): (phase2: Uint8Array, senderId: number, message: Uint8Array, gadgetVector: Uint8Array) => [Uint8Array, Uint8Array]; protected abstract recvMsg2Func(): (phase2: Uint8Array, senderId: number, message: Uint8Array, gadgetVector: Uint8Array) => Uint8Array; protected abstract finishRound2Func(): (phase2: Uint8Array) => Uint8Array; } //# sourceMappingURL=common.d.ts.map