@api3/contracts
Version:
Contracts through which API3 services are delivered
198 lines • 10.8 kB
TypeScript
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 interface HashRegistryInterface extends Interface {
getFunction(nameOrSignature: "getHashValue" | "hashTypeToSignersHash" | "hashes" | "owner" | "registerHash" | "renounceOwnership" | "setHash" | "setSigners" | "signatureDelegationHashType" | "transferOwnership"): FunctionFragment;
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred" | "RegisteredHash" | "SetHash" | "SetSigners"): EventFragment;
encodeFunctionData(functionFragment: "getHashValue", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "hashTypeToSignersHash", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "hashes", values: [BytesLike]): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(functionFragment: "registerHash", values: [BytesLike, BytesLike, BigNumberish, BytesLike[]]): string;
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
encodeFunctionData(functionFragment: "setHash", values: [BytesLike, BytesLike]): string;
encodeFunctionData(functionFragment: "setSigners", values: [BytesLike, AddressLike[]]): string;
encodeFunctionData(functionFragment: "signatureDelegationHashType", values?: undefined): string;
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
decodeFunctionResult(functionFragment: "getHashValue", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hashTypeToSignersHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "hashes", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "registerHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setHash", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "setSigners", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "signatureDelegationHashType", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
}
export declare namespace OwnershipTransferredEvent {
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
type OutputTuple = [previousOwner: string, newOwner: string];
interface OutputObject {
previousOwner: string;
newOwner: string;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace RegisteredHashEvent {
type InputTuple = [
hashType: BytesLike,
hashValue: BytesLike,
hashTimestamp: BigNumberish
];
type OutputTuple = [
hashType: string,
hashValue: string,
hashTimestamp: bigint
];
interface OutputObject {
hashType: string;
hashValue: string;
hashTimestamp: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace SetHashEvent {
type InputTuple = [
hashType: BytesLike,
hashValue: BytesLike,
hashTimestamp: BigNumberish
];
type OutputTuple = [
hashType: string,
hashValue: string,
hashTimestamp: bigint
];
interface OutputObject {
hashType: string;
hashValue: string;
hashTimestamp: bigint;
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export declare namespace SetSignersEvent {
type InputTuple = [hashType: BytesLike, signers: AddressLike[]];
type OutputTuple = [hashType: string, signers: string[]];
interface OutputObject {
hashType: string;
signers: string[];
}
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
type Filter = TypedDeferredTopicFilter<Event>;
type Log = TypedEventLog<Event>;
type LogDescription = TypedLogDescription<Event>;
}
export interface HashRegistry extends BaseContract {
connect(runner?: ContractRunner | null): HashRegistry;
waitForDeployment(): Promise<this>;
interface: HashRegistryInterface;
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>;
getHashValue: TypedContractMethod<[hashType: BytesLike], [string], "view">;
hashTypeToSignersHash: TypedContractMethod<[
arg0: BytesLike
], [
string
], "view">;
hashes: TypedContractMethod<[
arg0: BytesLike
], [
[string, bigint] & {
value: string;
timestamp: bigint;
}
], "view">;
owner: TypedContractMethod<[], [string], "view">;
registerHash: TypedContractMethod<[
hashType: BytesLike,
hashValue: BytesLike,
hashTimestamp: BigNumberish,
signatures: BytesLike[]
], [
void
], "nonpayable">;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
setHash: TypedContractMethod<[
hashType: BytesLike,
hashValue: BytesLike
], [
void
], "nonpayable">;
setSigners: TypedContractMethod<[
hashType: BytesLike,
signers: AddressLike[]
], [
void
], "nonpayable">;
signatureDelegationHashType: TypedContractMethod<[], [string], "view">;
transferOwnership: TypedContractMethod<[
newOwner: AddressLike
], [
void
], "nonpayable">;
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
getFunction(nameOrSignature: "getHashValue"): TypedContractMethod<[hashType: BytesLike], [string], "view">;
getFunction(nameOrSignature: "hashTypeToSignersHash"): TypedContractMethod<[arg0: BytesLike], [string], "view">;
getFunction(nameOrSignature: "hashes"): TypedContractMethod<[
arg0: BytesLike
], [
[string, bigint] & {
value: string;
timestamp: bigint;
}
], "view">;
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "registerHash"): TypedContractMethod<[
hashType: BytesLike,
hashValue: BytesLike,
hashTimestamp: BigNumberish,
signatures: BytesLike[]
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
getFunction(nameOrSignature: "setHash"): TypedContractMethod<[
hashType: BytesLike,
hashValue: BytesLike
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "setSigners"): TypedContractMethod<[
hashType: BytesLike,
signers: AddressLike[]
], [
void
], "nonpayable">;
getFunction(nameOrSignature: "signatureDelegationHashType"): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
getEvent(key: "RegisteredHash"): TypedContractEvent<RegisteredHashEvent.InputTuple, RegisteredHashEvent.OutputTuple, RegisteredHashEvent.OutputObject>;
getEvent(key: "SetHash"): TypedContractEvent<SetHashEvent.InputTuple, SetHashEvent.OutputTuple, SetHashEvent.OutputObject>;
getEvent(key: "SetSigners"): TypedContractEvent<SetSignersEvent.InputTuple, SetSignersEvent.OutputTuple, SetSignersEvent.OutputObject>;
filters: {
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
"RegisteredHash(bytes32,bytes32,uint256)": TypedContractEvent<RegisteredHashEvent.InputTuple, RegisteredHashEvent.OutputTuple, RegisteredHashEvent.OutputObject>;
RegisteredHash: TypedContractEvent<RegisteredHashEvent.InputTuple, RegisteredHashEvent.OutputTuple, RegisteredHashEvent.OutputObject>;
"SetHash(bytes32,bytes32,uint256)": TypedContractEvent<SetHashEvent.InputTuple, SetHashEvent.OutputTuple, SetHashEvent.OutputObject>;
SetHash: TypedContractEvent<SetHashEvent.InputTuple, SetHashEvent.OutputTuple, SetHashEvent.OutputObject>;
"SetSigners(bytes32,address[])": TypedContractEvent<SetSignersEvent.InputTuple, SetSignersEvent.OutputTuple, SetSignersEvent.OutputObject>;
SetSigners: TypedContractEvent<SetSignersEvent.InputTuple, SetSignersEvent.OutputTuple, SetSignersEvent.OutputObject>;
};
}
//# sourceMappingURL=HashRegistry.d.ts.map