@skalenetwork/fair-manager-types
Version:
TypeScript typings for SKALE Fair Manager smart contracts
583 lines (535 loc) • 16.6 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../common";
export declare namespace IDkg {
export type Fp2PointStruct = { a: BigNumberish; b: BigNumberish };
export type Fp2PointStructOutput = [a: bigint, b: bigint] & {
a: bigint;
b: bigint;
};
export type G2PointStruct = {
x: IDkg.Fp2PointStruct;
y: IDkg.Fp2PointStruct;
};
export type G2PointStructOutput = [
x: IDkg.Fp2PointStructOutput,
y: IDkg.Fp2PointStructOutput
] & { x: IDkg.Fp2PointStructOutput; y: IDkg.Fp2PointStructOutput };
export type KeyShareStruct = {
publicKey: [BytesLike, BytesLike];
share: BytesLike;
};
export type KeyShareStructOutput = [
publicKey: [string, string],
share: string
] & { publicKey: [string, string]; share: string };
export type RoundStruct = {
id: BigNumberish;
status: BigNumberish;
nodes: BigNumberish[];
publicKey: IDkg.G2PointStruct;
startingBlockNumber: BigNumberish;
numberOfBroadcasted: BigNumberish;
hashedData: BytesLike[];
numberOfCompleted: BigNumberish;
completed: boolean[];
};
export type RoundStructOutput = [
id: bigint,
status: bigint,
nodes: bigint[],
publicKey: IDkg.G2PointStructOutput,
startingBlockNumber: bigint,
numberOfBroadcasted: bigint,
hashedData: string[],
numberOfCompleted: bigint,
completed: boolean[]
] & {
id: bigint;
status: bigint;
nodes: bigint[];
publicKey: IDkg.G2PointStructOutput;
startingBlockNumber: bigint;
numberOfBroadcasted: bigint;
hashedData: string[];
numberOfCompleted: bigint;
completed: boolean[];
};
}
export interface DKGInterface extends Interface {
getFunction(
nameOrSignature:
| "alright"
| "authority"
| "broadcast"
| "committee"
| "generate"
| "getParticipants"
| "getPublicKey"
| "getRound"
| "initialize"
| "isConsumingScheduledOp"
| "isNodeBroadcasted"
| "lastDkgId"
| "nodes"
| "setAuthority"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "AllDataReceived"
| "AuthorityUpdated"
| "BroadcastAndKeyShare"
| "DkgRoundCreated"
| "Initialized"
| "SuccessfulDkg"
): EventFragment;
encodeFunctionData(
functionFragment: "alright",
values: [BigNumberish]
): string;
encodeFunctionData(functionFragment: "authority", values?: undefined): string;
encodeFunctionData(
functionFragment: "broadcast",
values: [BigNumberish, IDkg.G2PointStruct[], IDkg.KeyShareStruct[]]
): string;
encodeFunctionData(functionFragment: "committee", values?: undefined): string;
encodeFunctionData(
functionFragment: "generate",
values: [BigNumberish[]]
): string;
encodeFunctionData(
functionFragment: "getParticipants",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getPublicKey",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getRound",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "initialize",
values: [AddressLike, AddressLike, AddressLike]
): string;
encodeFunctionData(
functionFragment: "isConsumingScheduledOp",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "isNodeBroadcasted",
values: [BigNumberish, BigNumberish]
): string;
encodeFunctionData(functionFragment: "lastDkgId", values?: undefined): string;
encodeFunctionData(functionFragment: "nodes", values?: undefined): string;
encodeFunctionData(
functionFragment: "setAuthority",
values: [AddressLike]
): string;
decodeFunctionResult(functionFragment: "alright", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "authority", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "broadcast", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "committee", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "generate", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "getParticipants",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getPublicKey",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "getRound", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "isConsumingScheduledOp",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isNodeBroadcasted",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "lastDkgId", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "nodes", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "setAuthority",
data: BytesLike
): Result;
}
export namespace AllDataReceivedEvent {
export type InputTuple = [dkg: BigNumberish, node: BigNumberish];
export type OutputTuple = [dkg: bigint, node: bigint];
export interface OutputObject {
dkg: bigint;
node: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace AuthorityUpdatedEvent {
export type InputTuple = [authority: AddressLike];
export type OutputTuple = [authority: string];
export interface OutputObject {
authority: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace BroadcastAndKeyShareEvent {
export type InputTuple = [
dkg: BigNumberish,
node: BigNumberish,
verificationVector: IDkg.G2PointStruct[],
secretKeyContribution: IDkg.KeyShareStruct[]
];
export type OutputTuple = [
dkg: bigint,
node: bigint,
verificationVector: IDkg.G2PointStructOutput[],
secretKeyContribution: IDkg.KeyShareStructOutput[]
];
export interface OutputObject {
dkg: bigint;
node: bigint;
verificationVector: IDkg.G2PointStructOutput[];
secretKeyContribution: IDkg.KeyShareStructOutput[];
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace DkgRoundCreatedEvent {
export type InputTuple = [
dkgId: BigNumberish,
participants: BigNumberish[],
startingBlockNumber: BigNumberish
];
export type OutputTuple = [
dkgId: bigint,
participants: bigint[],
startingBlockNumber: bigint
];
export interface OutputObject {
dkgId: bigint;
participants: bigint[];
startingBlockNumber: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace InitializedEvent {
export type InputTuple = [version: BigNumberish];
export type OutputTuple = [version: bigint];
export interface OutputObject {
version: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace SuccessfulDkgEvent {
export type InputTuple = [dkg: BigNumberish];
export type OutputTuple = [dkg: bigint];
export interface OutputObject {
dkg: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface DKG extends BaseContract {
connect(runner?: ContractRunner | null): DKG;
waitForDeployment(): Promise<this>;
interface: DKGInterface;
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;
listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;
alright: TypedContractMethod<[dkg: BigNumberish], [void], "nonpayable">;
authority: TypedContractMethod<[], [string], "view">;
broadcast: TypedContractMethod<
[
dkg: BigNumberish,
verificationVector: IDkg.G2PointStruct[],
secretKeyContribution: IDkg.KeyShareStruct[]
],
[void],
"nonpayable"
>;
committee: TypedContractMethod<[], [string], "view">;
generate: TypedContractMethod<
[participants: BigNumberish[]],
[bigint],
"nonpayable"
>;
getParticipants: TypedContractMethod<[dkg: BigNumberish], [bigint[]], "view">;
getPublicKey: TypedContractMethod<
[dkg: BigNumberish],
[IDkg.G2PointStructOutput],
"view"
>;
getRound: TypedContractMethod<
[dkg: BigNumberish],
[IDkg.RoundStructOutput],
"view"
>;
initialize: TypedContractMethod<
[
initialAuthority: AddressLike,
committeeAddress: AddressLike,
nodesAddress: AddressLike
],
[void],
"nonpayable"
>;
isConsumingScheduledOp: TypedContractMethod<[], [string], "view">;
isNodeBroadcasted: TypedContractMethod<
[dkg: BigNumberish, node: BigNumberish],
[boolean],
"view"
>;
lastDkgId: TypedContractMethod<[], [bigint], "view">;
nodes: TypedContractMethod<[], [string], "view">;
setAuthority: TypedContractMethod<
[newAuthority: AddressLike],
[void],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "alright"
): TypedContractMethod<[dkg: BigNumberish], [void], "nonpayable">;
getFunction(
nameOrSignature: "authority"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "broadcast"
): TypedContractMethod<
[
dkg: BigNumberish,
verificationVector: IDkg.G2PointStruct[],
secretKeyContribution: IDkg.KeyShareStruct[]
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "committee"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "generate"
): TypedContractMethod<
[participants: BigNumberish[]],
[bigint],
"nonpayable"
>;
getFunction(
nameOrSignature: "getParticipants"
): TypedContractMethod<[dkg: BigNumberish], [bigint[]], "view">;
getFunction(
nameOrSignature: "getPublicKey"
): TypedContractMethod<
[dkg: BigNumberish],
[IDkg.G2PointStructOutput],
"view"
>;
getFunction(
nameOrSignature: "getRound"
): TypedContractMethod<[dkg: BigNumberish], [IDkg.RoundStructOutput], "view">;
getFunction(
nameOrSignature: "initialize"
): TypedContractMethod<
[
initialAuthority: AddressLike,
committeeAddress: AddressLike,
nodesAddress: AddressLike
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "isConsumingScheduledOp"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "isNodeBroadcasted"
): TypedContractMethod<
[dkg: BigNumberish, node: BigNumberish],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "lastDkgId"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "nodes"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "setAuthority"
): TypedContractMethod<[newAuthority: AddressLike], [void], "nonpayable">;
getEvent(
key: "AllDataReceived"
): TypedContractEvent<
AllDataReceivedEvent.InputTuple,
AllDataReceivedEvent.OutputTuple,
AllDataReceivedEvent.OutputObject
>;
getEvent(
key: "AuthorityUpdated"
): TypedContractEvent<
AuthorityUpdatedEvent.InputTuple,
AuthorityUpdatedEvent.OutputTuple,
AuthorityUpdatedEvent.OutputObject
>;
getEvent(
key: "BroadcastAndKeyShare"
): TypedContractEvent<
BroadcastAndKeyShareEvent.InputTuple,
BroadcastAndKeyShareEvent.OutputTuple,
BroadcastAndKeyShareEvent.OutputObject
>;
getEvent(
key: "DkgRoundCreated"
): TypedContractEvent<
DkgRoundCreatedEvent.InputTuple,
DkgRoundCreatedEvent.OutputTuple,
DkgRoundCreatedEvent.OutputObject
>;
getEvent(
key: "Initialized"
): TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
getEvent(
key: "SuccessfulDkg"
): TypedContractEvent<
SuccessfulDkgEvent.InputTuple,
SuccessfulDkgEvent.OutputTuple,
SuccessfulDkgEvent.OutputObject
>;
filters: {
"AllDataReceived(uint256,uint256)": TypedContractEvent<
AllDataReceivedEvent.InputTuple,
AllDataReceivedEvent.OutputTuple,
AllDataReceivedEvent.OutputObject
>;
AllDataReceived: TypedContractEvent<
AllDataReceivedEvent.InputTuple,
AllDataReceivedEvent.OutputTuple,
AllDataReceivedEvent.OutputObject
>;
"AuthorityUpdated(address)": TypedContractEvent<
AuthorityUpdatedEvent.InputTuple,
AuthorityUpdatedEvent.OutputTuple,
AuthorityUpdatedEvent.OutputObject
>;
AuthorityUpdated: TypedContractEvent<
AuthorityUpdatedEvent.InputTuple,
AuthorityUpdatedEvent.OutputTuple,
AuthorityUpdatedEvent.OutputObject
>;
"BroadcastAndKeyShare(uint256,uint256,tuple[],tuple[])": TypedContractEvent<
BroadcastAndKeyShareEvent.InputTuple,
BroadcastAndKeyShareEvent.OutputTuple,
BroadcastAndKeyShareEvent.OutputObject
>;
BroadcastAndKeyShare: TypedContractEvent<
BroadcastAndKeyShareEvent.InputTuple,
BroadcastAndKeyShareEvent.OutputTuple,
BroadcastAndKeyShareEvent.OutputObject
>;
"DkgRoundCreated(uint256,uint256[],uint256)": TypedContractEvent<
DkgRoundCreatedEvent.InputTuple,
DkgRoundCreatedEvent.OutputTuple,
DkgRoundCreatedEvent.OutputObject
>;
DkgRoundCreated: TypedContractEvent<
DkgRoundCreatedEvent.InputTuple,
DkgRoundCreatedEvent.OutputTuple,
DkgRoundCreatedEvent.OutputObject
>;
"Initialized(uint64)": TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
Initialized: TypedContractEvent<
InitializedEvent.InputTuple,
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
"SuccessfulDkg(uint256)": TypedContractEvent<
SuccessfulDkgEvent.InputTuple,
SuccessfulDkgEvent.OutputTuple,
SuccessfulDkgEvent.OutputObject
>;
SuccessfulDkg: TypedContractEvent<
SuccessfulDkgEvent.InputTuple,
SuccessfulDkgEvent.OutputTuple,
SuccessfulDkgEvent.OutputObject
>;
};
}