@coti-io/coti-contracts-examples
Version:
Example smart contracts demonstrating the use of COTI's GC technology, including integrations with MPC, private ERC20, and ERC721 contracts.
556 lines (511 loc) • 16.1 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 type ItUint64Struct = { ciphertext: BigNumberish; signature: BytesLike };
export type ItUint64StructOutput = [ciphertext: bigint, signature: string] & {
ciphertext: bigint;
signature: string;
};
export interface PrivateIdentityRegistryInterface extends Interface {
getFunction(
nameOrSignature:
| "acceptOwnership"
| "addDid"
| "addRegistrar"
| "getIdentifier"
| "getRegistrar"
| "grantAccess"
| "owner"
| "pendingOwner"
| "registrars"
| "removeDid"
| "removeRegistrar"
| "renounceOwnership"
| "revokeAccess"
| "setIdentifier"
| "transferOwnership"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "Identifier"
| "NewDid"
| "NewRegistrar"
| "OwnershipTransferStarted"
| "OwnershipTransferred"
| "RemoveDid"
| "RemoveRegistrar"
): EventFragment;
encodeFunctionData(
functionFragment: "acceptOwnership",
values?: undefined
): string;
encodeFunctionData(functionFragment: "addDid", values: [AddressLike]): string;
encodeFunctionData(
functionFragment: "addRegistrar",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getIdentifier",
values: [AddressLike, string]
): string;
encodeFunctionData(
functionFragment: "getRegistrar",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "grantAccess",
values: [AddressLike, string[]]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "pendingOwner",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "registrars",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "removeDid",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "removeRegistrar",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "renounceOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "revokeAccess",
values: [AddressLike, string[]]
): string;
encodeFunctionData(
functionFragment: "setIdentifier",
values: [AddressLike, string, ItUint64Struct]
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [AddressLike]
): string;
decodeFunctionResult(
functionFragment: "acceptOwnership",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "addDid", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "addRegistrar",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getIdentifier",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getRegistrar",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "grantAccess",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "pendingOwner",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "registrars", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "removeDid", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "removeRegistrar",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "renounceOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "revokeAccess",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setIdentifier",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
}
export namespace IdentifierEvent {
export type InputTuple = [identifier: BigNumberish];
export type OutputTuple = [identifier: bigint];
export interface OutputObject {
identifier: 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 NewDidEvent {
export type InputTuple = [wallet: AddressLike];
export type OutputTuple = [wallet: string];
export interface OutputObject {
wallet: 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 NewRegistrarEvent {
export type InputTuple = [wallet: AddressLike, registrarId: BigNumberish];
export type OutputTuple = [wallet: string, registrarId: bigint];
export interface OutputObject {
wallet: string;
registrarId: 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 OwnershipTransferStartedEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
export interface OutputObject {
previousOwner: string;
newOwner: 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 OwnershipTransferredEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
export interface OutputObject {
previousOwner: string;
newOwner: 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 RemoveDidEvent {
export type InputTuple = [wallet: AddressLike];
export type OutputTuple = [wallet: string];
export interface OutputObject {
wallet: 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 RemoveRegistrarEvent {
export type InputTuple = [wallet: AddressLike];
export type OutputTuple = [wallet: string];
export interface OutputObject {
wallet: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export interface PrivateIdentityRegistry extends BaseContract {
connect(runner?: ContractRunner | null): PrivateIdentityRegistry;
waitForDeployment(): Promise<this>;
interface: PrivateIdentityRegistryInterface;
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>;
acceptOwnership: TypedContractMethod<[], [void], "nonpayable">;
addDid: TypedContractMethod<[wallet: AddressLike], [void], "nonpayable">;
addRegistrar: TypedContractMethod<
[wallet: AddressLike, registrarId: BigNumberish],
[void],
"nonpayable"
>;
getIdentifier: TypedContractMethod<
[wallet: AddressLike, identifier: string],
[void],
"nonpayable"
>;
getRegistrar: TypedContractMethod<[wallet: AddressLike], [bigint], "view">;
grantAccess: TypedContractMethod<
[allowed: AddressLike, identifiers: string[]],
[void],
"nonpayable"
>;
owner: TypedContractMethod<[], [string], "view">;
pendingOwner: TypedContractMethod<[], [string], "view">;
registrars: TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
removeDid: TypedContractMethod<[wallet: AddressLike], [void], "nonpayable">;
removeRegistrar: TypedContractMethod<
[wallet: AddressLike],
[void],
"nonpayable"
>;
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
revokeAccess: TypedContractMethod<
[allowed: AddressLike, identifiers: string[]],
[void],
"nonpayable"
>;
setIdentifier: TypedContractMethod<
[wallet: AddressLike, identifier: string, itValue: ItUint64Struct],
[void],
"nonpayable"
>;
transferOwnership: TypedContractMethod<
[newOwner: AddressLike],
[void],
"nonpayable"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "acceptOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "addDid"
): TypedContractMethod<[wallet: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "addRegistrar"
): TypedContractMethod<
[wallet: AddressLike, registrarId: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "getIdentifier"
): TypedContractMethod<
[wallet: AddressLike, identifier: string],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "getRegistrar"
): TypedContractMethod<[wallet: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "grantAccess"
): TypedContractMethod<
[allowed: AddressLike, identifiers: string[]],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "owner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "pendingOwner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "registrars"
): TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "removeDid"
): TypedContractMethod<[wallet: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "removeRegistrar"
): TypedContractMethod<[wallet: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "renounceOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "revokeAccess"
): TypedContractMethod<
[allowed: AddressLike, identifiers: string[]],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "setIdentifier"
): TypedContractMethod<
[wallet: AddressLike, identifier: string, itValue: ItUint64Struct],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "transferOwnership"
): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getEvent(
key: "Identifier"
): TypedContractEvent<
IdentifierEvent.InputTuple,
IdentifierEvent.OutputTuple,
IdentifierEvent.OutputObject
>;
getEvent(
key: "NewDid"
): TypedContractEvent<
NewDidEvent.InputTuple,
NewDidEvent.OutputTuple,
NewDidEvent.OutputObject
>;
getEvent(
key: "NewRegistrar"
): TypedContractEvent<
NewRegistrarEvent.InputTuple,
NewRegistrarEvent.OutputTuple,
NewRegistrarEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferStarted"
): TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferred"
): TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
getEvent(
key: "RemoveDid"
): TypedContractEvent<
RemoveDidEvent.InputTuple,
RemoveDidEvent.OutputTuple,
RemoveDidEvent.OutputObject
>;
getEvent(
key: "RemoveRegistrar"
): TypedContractEvent<
RemoveRegistrarEvent.InputTuple,
RemoveRegistrarEvent.OutputTuple,
RemoveRegistrarEvent.OutputObject
>;
filters: {
"Identifier(uint256)": TypedContractEvent<
IdentifierEvent.InputTuple,
IdentifierEvent.OutputTuple,
IdentifierEvent.OutputObject
>;
Identifier: TypedContractEvent<
IdentifierEvent.InputTuple,
IdentifierEvent.OutputTuple,
IdentifierEvent.OutputObject
>;
"NewDid(address)": TypedContractEvent<
NewDidEvent.InputTuple,
NewDidEvent.OutputTuple,
NewDidEvent.OutputObject
>;
NewDid: TypedContractEvent<
NewDidEvent.InputTuple,
NewDidEvent.OutputTuple,
NewDidEvent.OutputObject
>;
"NewRegistrar(address,uint256)": TypedContractEvent<
NewRegistrarEvent.InputTuple,
NewRegistrarEvent.OutputTuple,
NewRegistrarEvent.OutputObject
>;
NewRegistrar: TypedContractEvent<
NewRegistrarEvent.InputTuple,
NewRegistrarEvent.OutputTuple,
NewRegistrarEvent.OutputObject
>;
"OwnershipTransferStarted(address,address)": TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
OwnershipTransferStarted: TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
"OwnershipTransferred(address,address)": TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
OwnershipTransferred: TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
OwnershipTransferredEvent.OutputObject
>;
"RemoveDid(address)": TypedContractEvent<
RemoveDidEvent.InputTuple,
RemoveDidEvent.OutputTuple,
RemoveDidEvent.OutputObject
>;
RemoveDid: TypedContractEvent<
RemoveDidEvent.InputTuple,
RemoveDidEvent.OutputTuple,
RemoveDidEvent.OutputObject
>;
"RemoveRegistrar(address)": TypedContractEvent<
RemoveRegistrarEvent.InputTuple,
RemoveRegistrarEvent.OutputTuple,
RemoveRegistrarEvent.OutputObject
>;
RemoveRegistrar: TypedContractEvent<
RemoveRegistrarEvent.InputTuple,
RemoveRegistrarEvent.OutputTuple,
RemoveRegistrarEvent.OutputObject
>;
};
}