supersub
Version:
Supersub JS Sdk
1,556 lines (1,466 loc) • 42.2 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 ManifestExternalCallPermissionStruct = {
externalAddress: AddressLike;
permitAnySelector: boolean;
selectors: BytesLike[];
};
export type ManifestExternalCallPermissionStructOutput = [
externalAddress: string,
permitAnySelector: boolean,
selectors: string[],
] & {
externalAddress: string;
permitAnySelector: boolean;
selectors: string[];
};
export type ManifestFunctionStruct = {
functionType: BigNumberish;
functionId: BigNumberish;
dependencyIndex: BigNumberish;
};
export type ManifestFunctionStructOutput = [
functionType: bigint,
functionId: bigint,
dependencyIndex: bigint,
] & { functionType: bigint; functionId: bigint; dependencyIndex: bigint };
export type ManifestAssociatedFunctionStruct = {
executionSelector: BytesLike;
associatedFunction: ManifestFunctionStruct;
};
export type ManifestAssociatedFunctionStructOutput = [
executionSelector: string,
associatedFunction: ManifestFunctionStructOutput,
] & {
executionSelector: string;
associatedFunction: ManifestFunctionStructOutput;
};
export type ManifestExecutionHookStruct = {
executionSelector: BytesLike;
preExecHook: ManifestFunctionStruct;
postExecHook: ManifestFunctionStruct;
};
export type ManifestExecutionHookStructOutput = [
executionSelector: string,
preExecHook: ManifestFunctionStructOutput,
postExecHook: ManifestFunctionStructOutput,
] & {
executionSelector: string;
preExecHook: ManifestFunctionStructOutput;
postExecHook: ManifestFunctionStructOutput;
};
export type PluginManifestStruct = {
interfaceIds: BytesLike[];
dependencyInterfaceIds: BytesLike[];
executionFunctions: BytesLike[];
permittedExecutionSelectors: BytesLike[];
permitAnyExternalAddress: boolean;
canSpendNativeToken: boolean;
permittedExternalCalls: ManifestExternalCallPermissionStruct[];
userOpValidationFunctions: ManifestAssociatedFunctionStruct[];
runtimeValidationFunctions: ManifestAssociatedFunctionStruct[];
preUserOpValidationHooks: ManifestAssociatedFunctionStruct[];
preRuntimeValidationHooks: ManifestAssociatedFunctionStruct[];
executionHooks: ManifestExecutionHookStruct[];
};
export type PluginManifestStructOutput = [
interfaceIds: string[],
dependencyInterfaceIds: string[],
executionFunctions: string[],
permittedExecutionSelectors: string[],
permitAnyExternalAddress: boolean,
canSpendNativeToken: boolean,
permittedExternalCalls: ManifestExternalCallPermissionStructOutput[],
userOpValidationFunctions: ManifestAssociatedFunctionStructOutput[],
runtimeValidationFunctions: ManifestAssociatedFunctionStructOutput[],
preUserOpValidationHooks: ManifestAssociatedFunctionStructOutput[],
preRuntimeValidationHooks: ManifestAssociatedFunctionStructOutput[],
executionHooks: ManifestExecutionHookStructOutput[],
] & {
interfaceIds: string[];
dependencyInterfaceIds: string[];
executionFunctions: string[];
permittedExecutionSelectors: string[];
permitAnyExternalAddress: boolean;
canSpendNativeToken: boolean;
permittedExternalCalls: ManifestExternalCallPermissionStructOutput[];
userOpValidationFunctions: ManifestAssociatedFunctionStructOutput[];
runtimeValidationFunctions: ManifestAssociatedFunctionStructOutput[];
preUserOpValidationHooks: ManifestAssociatedFunctionStructOutput[];
preRuntimeValidationHooks: ManifestAssociatedFunctionStructOutput[];
executionHooks: ManifestExecutionHookStructOutput[];
};
export type SelectorPermissionStruct = {
functionSelector: BytesLike;
permissionDescription: string;
};
export type SelectorPermissionStructOutput = [
functionSelector: string,
permissionDescription: string,
] & { functionSelector: string; permissionDescription: string };
export type PluginMetadataStruct = {
name: string;
version: string;
author: string;
permissionDescriptors: SelectorPermissionStruct[];
};
export type PluginMetadataStructOutput = [
name: string,
version: string,
author: string,
permissionDescriptors: SelectorPermissionStructOutput[],
] & {
name: string;
version: string;
author: string;
permissionDescriptors: SelectorPermissionStructOutput[];
};
export type UserOperationStruct = {
sender: AddressLike;
nonce: BigNumberish;
initCode: BytesLike;
callData: BytesLike;
callGasLimit: BigNumberish;
verificationGasLimit: BigNumberish;
preVerificationGas: BigNumberish;
maxFeePerGas: BigNumberish;
maxPriorityFeePerGas: BigNumberish;
paymasterAndData: BytesLike;
signature: BytesLike;
};
export type UserOperationStructOutput = [
sender: string,
nonce: bigint,
initCode: string,
callData: string,
callGasLimit: bigint,
verificationGasLimit: bigint,
preVerificationGas: bigint,
maxFeePerGas: bigint,
maxPriorityFeePerGas: bigint,
paymasterAndData: string,
signature: string,
] & {
sender: string;
nonce: bigint;
initCode: string;
callData: string;
callGasLimit: bigint;
verificationGasLimit: bigint;
preVerificationGas: bigint;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
paymasterAndData: string;
signature: string;
};
export declare namespace SubscriptionPlugin {
export type InitPlanParamStruct = {
price: BigNumberish;
chargeInterval: BigNumberish;
};
export type InitPlanParamStructOutput = [
price: bigint,
chargeInterval: bigint,
] & { price: bigint; chargeInterval: bigint };
}
export interface SubscriptionPluginInterface extends Interface {
getFunction(
nameOrSignature:
| "AUTHOR"
| "NAME"
| "VERSION"
| "addChainSelector"
| "admin"
| "ccipChainSelectors"
| "changeSubscriptionEndTime"
| "changeSubscriptionPlan"
| "charge"
| "createPlan"
| "createProduct"
| "createProductWithPlans"
| "createRecurringPayment"
| "currentChainId"
| "getManifestHash"
| "onInstall"
| "onUninstall"
| "pack"
| "planNonce"
| "plans"
| "pluginManifest"
| "pluginMetadata"
| "postExecutionHook"
| "preExecutionHook"
| "preRuntimeValidationHook"
| "preUserOpValidationHook"
| "productNonce"
| "products"
| "runtimeValidationFunction"
| "setTokenBridge"
| "subscribe"
| "subscribedToProduct"
| "subscriptionNonces"
| "supportsInterface"
| "tokenBridge"
| "unSubscribe"
| "updatePlan"
| "updateProduct"
| "userOpValidationFunction"
| "userSubscriptions"
): FunctionFragment;
getEvent(
nameOrSignatureOrTopic:
| "PlanCreated"
| "PlanUpdated"
| "ProductCreated"
| "ProductUpdated"
| "Subscribed"
| "SubscriptionCharged"
| "SubscriptionEndTimeUpdated"
| "SubscriptionPlanChanged"
| "UnSubscribed"
): EventFragment;
encodeFunctionData(functionFragment: "AUTHOR", values?: undefined): string;
encodeFunctionData(functionFragment: "NAME", values?: undefined): string;
encodeFunctionData(functionFragment: "VERSION", values?: undefined): string;
encodeFunctionData(
functionFragment: "addChainSelector",
values: [BigNumberish, BigNumberish]
): string;
encodeFunctionData(functionFragment: "admin", values?: undefined): string;
encodeFunctionData(
functionFragment: "ccipChainSelectors",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "changeSubscriptionEndTime",
values: [BigNumberish, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "changeSubscriptionPlan",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "charge",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "createPlan",
values: [BigNumberish, BigNumberish, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "createProduct",
values: [
BytesLike,
string,
string,
BigNumberish,
AddressLike,
AddressLike,
BigNumberish,
]
): string;
encodeFunctionData(
functionFragment: "createProductWithPlans",
values: [
BytesLike,
string,
string,
BigNumberish,
AddressLike,
AddressLike,
BigNumberish,
SubscriptionPlugin.InitPlanParamStruct[],
]
): string;
encodeFunctionData(
functionFragment: "createRecurringPayment",
values: [
BytesLike,
string,
string,
AddressLike,
AddressLike,
BigNumberish,
BigNumberish,
BigNumberish,
BigNumberish,
]
): string;
encodeFunctionData(
functionFragment: "currentChainId",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getManifestHash",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "onInstall",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "onUninstall",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "pack",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(functionFragment: "planNonce", values?: undefined): string;
encodeFunctionData(functionFragment: "plans", values: [BigNumberish]): string;
encodeFunctionData(
functionFragment: "pluginManifest",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "pluginMetadata",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "postExecutionHook",
values: [BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "preExecutionHook",
values: [BigNumberish, AddressLike, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "preRuntimeValidationHook",
values: [BigNumberish, AddressLike, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "preUserOpValidationHook",
values: [BigNumberish, UserOperationStruct, BytesLike]
): string;
encodeFunctionData(
functionFragment: "productNonce",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "products",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "runtimeValidationFunction",
values: [BigNumberish, AddressLike, BigNumberish, BytesLike]
): string;
encodeFunctionData(
functionFragment: "setTokenBridge",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "subscribe",
values: [BigNumberish, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "subscribedToProduct",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "subscriptionNonces",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "supportsInterface",
values: [BytesLike]
): string;
encodeFunctionData(
functionFragment: "tokenBridge",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "unSubscribe",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "updatePlan",
values: [BigNumberish, boolean]
): string;
encodeFunctionData(
functionFragment: "updateProduct",
values: [BigNumberish, AddressLike, BigNumberish, boolean]
): string;
encodeFunctionData(
functionFragment: "userOpValidationFunction",
values: [BigNumberish, UserOperationStruct, BytesLike]
): string;
encodeFunctionData(
functionFragment: "userSubscriptions",
values: [AddressLike, BigNumberish]
): string;
decodeFunctionResult(functionFragment: "AUTHOR", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "addChainSelector",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "ccipChainSelectors",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "changeSubscriptionEndTime",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "changeSubscriptionPlan",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "charge", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "createPlan", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "createProduct",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "createProductWithPlans",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "createRecurringPayment",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "currentChainId",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getManifestHash",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "onUninstall",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "pack", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "planNonce", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "plans", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "pluginManifest",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "pluginMetadata",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "postExecutionHook",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "preExecutionHook",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "preRuntimeValidationHook",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "preUserOpValidationHook",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "productNonce",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "products", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "runtimeValidationFunction",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setTokenBridge",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "subscribe", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "subscribedToProduct",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "subscriptionNonces",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "supportsInterface",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "tokenBridge",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "unSubscribe",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "updatePlan", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "updateProduct",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "userOpValidationFunction",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "userSubscriptions",
data: BytesLike
): Result;
}
export namespace PlanCreatedEvent {
export type InputTuple = [
productId: BigNumberish,
planId: BigNumberish,
price: BigNumberish,
chargeInterval: BigNumberish,
isActive: boolean,
];
export type OutputTuple = [
productId: bigint,
planId: bigint,
price: bigint,
chargeInterval: bigint,
isActive: boolean,
];
export interface OutputObject {
productId: bigint;
planId: bigint;
price: bigint;
chargeInterval: bigint;
isActive: boolean;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace PlanUpdatedEvent {
export type InputTuple = [planId: BigNumberish, isActive: boolean];
export type OutputTuple = [planId: bigint, isActive: boolean];
export interface OutputObject {
planId: bigint;
isActive: boolean;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace ProductCreatedEvent {
export type InputTuple = [
productId: BigNumberish,
provider: AddressLike,
name: BytesLike,
description: string,
logoUrl: string,
productType: BigNumberish,
chargeToken: AddressLike,
receivingAddress: AddressLike,
destinationChain: BigNumberish,
isActive: boolean,
];
export type OutputTuple = [
productId: bigint,
provider: string,
name: string,
description: string,
logoUrl: string,
productType: bigint,
chargeToken: string,
receivingAddress: string,
destinationChain: bigint,
isActive: boolean,
];
export interface OutputObject {
productId: bigint;
provider: string;
name: string;
description: string;
logoUrl: string;
productType: bigint;
chargeToken: string;
receivingAddress: string;
destinationChain: bigint;
isActive: boolean;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace ProductUpdatedEvent {
export type InputTuple = [
productId: BigNumberish,
receivingAddress: AddressLike,
destinationChain: BigNumberish,
isActive: boolean,
];
export type OutputTuple = [
productId: bigint,
receivingAddress: string,
destinationChain: bigint,
isActive: boolean,
];
export interface OutputObject {
productId: bigint;
receivingAddress: string;
destinationChain: bigint;
isActive: boolean;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export namespace SubscribedEvent {
export type InputTuple = [
subscriber: AddressLike,
provider: AddressLike,
product: BigNumberish,
plan: BigNumberish,
subscriptionId: BigNumberish,
endTime: BigNumberish,
];
export type OutputTuple = [
subscriber: string,
provider: string,
product: bigint,
plan: bigint,
subscriptionId: bigint,
endTime: bigint,
];
export interface OutputObject {
subscriber: string;
provider: string;
product: bigint;
plan: bigint;
subscriptionId: bigint;
endTime: 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 SubscriptionChargedEvent {
export type InputTuple = [
subscriber: AddressLike,
recipient: AddressLike,
subscriptionId: BigNumberish,
planId: BigNumberish,
productId: BigNumberish,
amount: BigNumberish,
timestamp: BigNumberish,
];
export type OutputTuple = [
subscriber: string,
recipient: string,
subscriptionId: bigint,
planId: bigint,
productId: bigint,
amount: bigint,
timestamp: bigint,
];
export interface OutputObject {
subscriber: string;
recipient: string;
subscriptionId: bigint;
planId: bigint;
productId: bigint;
amount: bigint;
timestamp: 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 SubscriptionEndTimeUpdatedEvent {
export type InputTuple = [
subscriber: AddressLike,
id: BigNumberish,
endTime: BigNumberish,
];
export type OutputTuple = [subscriber: string, id: bigint, endTime: bigint];
export interface OutputObject {
subscriber: string;
id: bigint;
endTime: 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 SubscriptionPlanChangedEvent {
export type InputTuple = [
user: AddressLike,
subscriptionId: BigNumberish,
planId: BigNumberish,
];
export type OutputTuple = [
user: string,
subscriptionId: bigint,
planId: bigint,
];
export interface OutputObject {
user: string;
subscriptionId: bigint;
planId: 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 UnSubscribedEvent {
export type InputTuple = [user: AddressLike, subscriptionId: BigNumberish];
export type OutputTuple = [user: string, subscriptionId: bigint];
export interface OutputObject {
user: string;
subscriptionId: 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 SubscriptionPlugin extends BaseContract {
connect(runner?: ContractRunner | null): SubscriptionPlugin;
waitForDeployment(): Promise<this>;
interface: SubscriptionPluginInterface;
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>;
AUTHOR: TypedContractMethod<[], [string], "view">;
NAME: TypedContractMethod<[], [string], "view">;
VERSION: TypedContractMethod<[], [string], "view">;
addChainSelector: TypedContractMethod<
[_chainId: BigNumberish, _selector: BigNumberish],
[void],
"nonpayable"
>;
admin: TypedContractMethod<[], [string], "view">;
ccipChainSelectors: TypedContractMethod<
[arg0: BigNumberish],
[bigint],
"view"
>;
changeSubscriptionEndTime: TypedContractMethod<
[subscriptionId: BigNumberish, endTime: BigNumberish],
[void],
"nonpayable"
>;
changeSubscriptionPlan: TypedContractMethod<[], [void], "view">;
charge: TypedContractMethod<
[subscriber: AddressLike, subscriptionId: BigNumberish],
[void],
"nonpayable"
>;
createPlan: TypedContractMethod<
[
_productId: BigNumberish,
_chargeInterval: BigNumberish,
_price: BigNumberish,
],
[void],
"nonpayable"
>;
createProduct: TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_type: BigNumberish,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
],
[void],
"nonpayable"
>;
createProductWithPlans: TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_type: BigNumberish,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
_plans: SubscriptionPlugin.InitPlanParamStruct[],
],
[void],
"nonpayable"
>;
createRecurringPayment: TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
_chargeInterval: BigNumberish,
_endTime: BigNumberish,
_price: BigNumberish,
],
[void],
"nonpayable"
>;
currentChainId: TypedContractMethod<[], [bigint], "view">;
getManifestHash: TypedContractMethod<[], [string], "view">;
onInstall: TypedContractMethod<[arg0: BytesLike], [void], "view">;
onUninstall: TypedContractMethod<[arg0: BytesLike], [void], "view">;
pack: TypedContractMethod<
[addr: AddressLike, functionId: BigNumberish],
[string],
"view"
>;
planNonce: TypedContractMethod<[], [bigint], "view">;
plans: TypedContractMethod<
[arg0: BigNumberish],
[
[bigint, bigint, string, bigint, bigint, boolean] & {
productId: bigint;
planId: bigint;
provider: string;
price: bigint;
chargeInterval: bigint;
isActive: boolean;
},
],
"view"
>;
pluginManifest: TypedContractMethod<[], [PluginManifestStructOutput], "view">;
pluginMetadata: TypedContractMethod<[], [PluginMetadataStructOutput], "view">;
postExecutionHook: TypedContractMethod<
[functionId: BigNumberish, preExecHookData: BytesLike],
[void],
"nonpayable"
>;
preExecutionHook: TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[string],
"nonpayable"
>;
preRuntimeValidationHook: TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[void],
"nonpayable"
>;
preUserOpValidationHook: TypedContractMethod<
[
functionId: BigNumberish,
userOp: UserOperationStruct,
userOpHash: BytesLike,
],
[bigint],
"nonpayable"
>;
productNonce: TypedContractMethod<[], [bigint], "view">;
products: TypedContractMethod<
[arg0: BigNumberish],
[
[bigint, bigint, string, string, string, bigint, boolean] & {
productId: bigint;
productType: bigint;
provider: string;
chargeToken: string;
receivingAddress: string;
destinationChain: bigint;
isActive: boolean;
},
],
"view"
>;
runtimeValidationFunction: TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[void],
"nonpayable"
>;
setTokenBridge: TypedContractMethod<
[_bridgeAddr: AddressLike],
[void],
"nonpayable"
>;
subscribe: TypedContractMethod<
[planId: BigNumberish, endTime: BigNumberish],
[void],
"nonpayable"
>;
subscribedToProduct: TypedContractMethod<
[arg0: AddressLike, arg1: BigNumberish],
[boolean],
"view"
>;
subscriptionNonces: TypedContractMethod<
[arg0: AddressLike],
[bigint],
"view"
>;
supportsInterface: TypedContractMethod<
[interfaceId: BytesLike],
[boolean],
"view"
>;
tokenBridge: TypedContractMethod<[], [string], "view">;
unSubscribe: TypedContractMethod<
[subscriptionId: BigNumberish],
[void],
"nonpayable"
>;
updatePlan: TypedContractMethod<
[_planId: BigNumberish, _isActive: boolean],
[void],
"nonpayable"
>;
updateProduct: TypedContractMethod<
[
_productId: BigNumberish,
_receivingAddr: AddressLike,
_destChain: BigNumberish,
_isActive: boolean,
],
[void],
"nonpayable"
>;
userOpValidationFunction: TypedContractMethod<
[
functionId: BigNumberish,
userOp: UserOperationStruct,
userOpHash: BytesLike,
],
[bigint],
"nonpayable"
>;
userSubscriptions: TypedContractMethod<
[arg0: AddressLike, arg1: BigNumberish],
[
[bigint, bigint, string, bigint, bigint, bigint, boolean] & {
subscriptionId: bigint;
product: bigint;
provider: string;
plan: bigint;
lastChargeDate: bigint;
endTime: bigint;
isActive: boolean;
},
],
"view"
>;
getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;
getFunction(
nameOrSignature: "AUTHOR"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "NAME"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "VERSION"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "addChainSelector"
): TypedContractMethod<
[_chainId: BigNumberish, _selector: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "admin"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "ccipChainSelectors"
): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
getFunction(
nameOrSignature: "changeSubscriptionEndTime"
): TypedContractMethod<
[subscriptionId: BigNumberish, endTime: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "changeSubscriptionPlan"
): TypedContractMethod<[], [void], "view">;
getFunction(
nameOrSignature: "charge"
): TypedContractMethod<
[subscriber: AddressLike, subscriptionId: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "createPlan"
): TypedContractMethod<
[
_productId: BigNumberish,
_chargeInterval: BigNumberish,
_price: BigNumberish,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "createProduct"
): TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_type: BigNumberish,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "createProductWithPlans"
): TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_type: BigNumberish,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
_plans: SubscriptionPlugin.InitPlanParamStruct[],
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "createRecurringPayment"
): TypedContractMethod<
[
_name: BytesLike,
_description: string,
_logoUrl: string,
_chargeToken: AddressLike,
_receivingAddress: AddressLike,
_destinationChain: BigNumberish,
_chargeInterval: BigNumberish,
_endTime: BigNumberish,
_price: BigNumberish,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "currentChainId"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "getManifestHash"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "onInstall"
): TypedContractMethod<[arg0: BytesLike], [void], "view">;
getFunction(
nameOrSignature: "onUninstall"
): TypedContractMethod<[arg0: BytesLike], [void], "view">;
getFunction(
nameOrSignature: "pack"
): TypedContractMethod<
[addr: AddressLike, functionId: BigNumberish],
[string],
"view"
>;
getFunction(
nameOrSignature: "planNonce"
): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "plans"): TypedContractMethod<
[arg0: BigNumberish],
[
[bigint, bigint, string, bigint, bigint, boolean] & {
productId: bigint;
planId: bigint;
provider: string;
price: bigint;
chargeInterval: bigint;
isActive: boolean;
},
],
"view"
>;
getFunction(
nameOrSignature: "pluginManifest"
): TypedContractMethod<[], [PluginManifestStructOutput], "view">;
getFunction(
nameOrSignature: "pluginMetadata"
): TypedContractMethod<[], [PluginMetadataStructOutput], "view">;
getFunction(
nameOrSignature: "postExecutionHook"
): TypedContractMethod<
[functionId: BigNumberish, preExecHookData: BytesLike],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "preExecutionHook"
): TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[string],
"nonpayable"
>;
getFunction(
nameOrSignature: "preRuntimeValidationHook"
): TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "preUserOpValidationHook"
): TypedContractMethod<
[
functionId: BigNumberish,
userOp: UserOperationStruct,
userOpHash: BytesLike,
],
[bigint],
"nonpayable"
>;
getFunction(
nameOrSignature: "productNonce"
): TypedContractMethod<[], [bigint], "view">;
getFunction(nameOrSignature: "products"): TypedContractMethod<
[arg0: BigNumberish],
[
[bigint, bigint, string, string, string, bigint, boolean] & {
productId: bigint;
productType: bigint;
provider: string;
chargeToken: string;
receivingAddress: string;
destinationChain: bigint;
isActive: boolean;
},
],
"view"
>;
getFunction(
nameOrSignature: "runtimeValidationFunction"
): TypedContractMethod<
[
functionId: BigNumberish,
sender: AddressLike,
value: BigNumberish,
data: BytesLike,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "setTokenBridge"
): TypedContractMethod<[_bridgeAddr: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "subscribe"
): TypedContractMethod<
[planId: BigNumberish, endTime: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "subscribedToProduct"
): TypedContractMethod<
[arg0: AddressLike, arg1: BigNumberish],
[boolean],
"view"
>;
getFunction(
nameOrSignature: "subscriptionNonces"
): TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
getFunction(
nameOrSignature: "supportsInterface"
): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
getFunction(
nameOrSignature: "tokenBridge"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "unSubscribe"
): TypedContractMethod<[subscriptionId: BigNumberish], [void], "nonpayable">;
getFunction(
nameOrSignature: "updatePlan"
): TypedContractMethod<
[_planId: BigNumberish, _isActive: boolean],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "updateProduct"
): TypedContractMethod<
[
_productId: BigNumberish,
_receivingAddr: AddressLike,
_destChain: BigNumberish,
_isActive: boolean,
],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "userOpValidationFunction"
): TypedContractMethod<
[
functionId: BigNumberish,
userOp: UserOperationStruct,
userOpHash: BytesLike,
],
[bigint],
"nonpayable"
>;
getFunction(nameOrSignature: "userSubscriptions"): TypedContractMethod<
[arg0: AddressLike, arg1: BigNumberish],
[
[bigint, bigint, string, bigint, bigint, bigint, boolean] & {
subscriptionId: bigint;
product: bigint;
provider: string;
plan: bigint;
lastChargeDate: bigint;
endTime: bigint;
isActive: boolean;
},
],
"view"
>;
getEvent(
key: "PlanCreated"
): TypedContractEvent<
PlanCreatedEvent.InputTuple,
PlanCreatedEvent.OutputTuple,
PlanCreatedEvent.OutputObject
>;
getEvent(
key: "PlanUpdated"
): TypedContractEvent<
PlanUpdatedEvent.InputTuple,
PlanUpdatedEvent.OutputTuple,
PlanUpdatedEvent.OutputObject
>;
getEvent(
key: "ProductCreated"
): TypedContractEvent<
ProductCreatedEvent.InputTuple,
ProductCreatedEvent.OutputTuple,
ProductCreatedEvent.OutputObject
>;
getEvent(
key: "ProductUpdated"
): TypedContractEvent<
ProductUpdatedEvent.InputTuple,
ProductUpdatedEvent.OutputTuple,
ProductUpdatedEvent.OutputObject
>;
getEvent(
key: "Subscribed"
): TypedContractEvent<
SubscribedEvent.InputTuple,
SubscribedEvent.OutputTuple,
SubscribedEvent.OutputObject
>;
getEvent(
key: "SubscriptionCharged"
): TypedContractEvent<
SubscriptionChargedEvent.InputTuple,
SubscriptionChargedEvent.OutputTuple,
SubscriptionChargedEvent.OutputObject
>;
getEvent(
key: "SubscriptionEndTimeUpdated"
): TypedContractEvent<
SubscriptionEndTimeUpdatedEvent.InputTuple,
SubscriptionEndTimeUpdatedEvent.OutputTuple,
SubscriptionEndTimeUpdatedEvent.OutputObject
>;
getEvent(
key: "SubscriptionPlanChanged"
): TypedContractEvent<
SubscriptionPlanChangedEvent.InputTuple,
SubscriptionPlanChangedEvent.OutputTuple,
SubscriptionPlanChangedEvent.OutputObject
>;
getEvent(
key: "UnSubscribed"
): TypedContractEvent<
UnSubscribedEvent.InputTuple,
UnSubscribedEvent.OutputTuple,
UnSubscribedEvent.OutputObject
>;
filters: {
"PlanCreated(uint256,uint256,uint256,uint256,bool)": TypedContractEvent<
PlanCreatedEvent.InputTuple,
PlanCreatedEvent.OutputTuple,
PlanCreatedEvent.OutputObject
>;
PlanCreated: TypedContractEvent<
PlanCreatedEvent.InputTuple,
PlanCreatedEvent.OutputTuple,
PlanCreatedEvent.OutputObject
>;
"PlanUpdated(uint256,bool)": TypedContractEvent<
PlanUpdatedEvent.InputTuple,
PlanUpdatedEvent.OutputTuple,
PlanUpdatedEvent.OutputObject
>;
PlanUpdated: TypedContractEvent<
PlanUpdatedEvent.InputTuple,
PlanUpdatedEvent.OutputTuple,
PlanUpdatedEvent.OutputObject
>;
"ProductCreated(uint256,address,bytes32,string,string,uint8,address,address,uint256,bool)": TypedContractEvent<
ProductCreatedEvent.InputTuple,
ProductCreatedEvent.OutputTuple,
ProductCreatedEvent.OutputObject
>;
ProductCreated: TypedContractEvent<
ProductCreatedEvent.InputTuple,
ProductCreatedEvent.OutputTuple,
ProductCreatedEvent.OutputObject
>;
"ProductUpdated(uint256,address,uint256,bool)": TypedContractEvent<
ProductUpdatedEvent.InputTuple,
ProductUpdatedEvent.OutputTuple,
ProductUpdatedEvent.OutputObject
>;
ProductUpdated: TypedContractEvent<
ProductUpdatedEvent.InputTuple,
ProductUpdatedEvent.OutputTuple,
ProductUpdatedEvent.OutputObject
>;
"Subscribed(address,address,uint256,uint256,uint256,uint256)": TypedContractEvent<
SubscribedEvent.InputTuple,
SubscribedEvent.OutputTuple,
SubscribedEvent.OutputObject
>;
Subscribed: TypedContractEvent<
SubscribedEvent.InputTuple,
SubscribedEvent.OutputTuple,
SubscribedEvent.OutputObject
>;
"SubscriptionCharged(address,address,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent<
SubscriptionChargedEvent.InputTuple,
SubscriptionChargedEvent.OutputTuple,
SubscriptionChargedEvent.OutputObject
>;
SubscriptionCharged: TypedContractEvent<
SubscriptionChargedEvent.InputTuple,
SubscriptionChargedEvent.OutputTuple,
SubscriptionChargedEvent.OutputObject
>;
"SubscriptionEndTimeUpdated(address,uint256,uint256)": TypedContractEvent<
SubscriptionEndTimeUpdatedEvent.InputTuple,
SubscriptionEndTimeUpdatedEvent.OutputTuple,
SubscriptionEndTimeUpdatedEvent.OutputObject
>;
SubscriptionEndTimeUpdated: TypedContractEvent<
SubscriptionEndTimeUpdatedEvent.InputTuple,
SubscriptionEndTimeUpdatedEvent.OutputTuple,
SubscriptionEndTimeUpdatedEvent.OutputObject
>;
"SubscriptionPlanChanged(address,uint256,uint256)": TypedContractEvent<
SubscriptionPlanChangedEvent.InputTuple,
SubscriptionPlanChangedEvent.OutputTuple,
SubscriptionPlanChangedEvent.OutputObject
>;
SubscriptionPlanChanged: TypedContractEvent<
SubscriptionPlanChangedEvent.InputTuple,
SubscriptionPlanChangedEvent.OutputTuple,
SubscriptionPlanChangedEvent.OutputObject
>;
"UnSubscribed(address,uint256)": TypedContractEvent<
UnSubscribedEvent.InputTuple,
UnSubscribedEvent.OutputTuple,
UnSubscribedEvent.OutputObject
>;
UnSubscribed: TypedContractEvent<
UnSubscribedEvent.InputTuple,
UnSubscribedEvent.OutputTuple,
UnSubscribedEvent.OutputObject
>;
};
}