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 SubscriptionAPIInterface extends Interface { getFunction(nameOrSignature: "MAX_CONSUMERS" | "acceptSubscriptionOwnerTransfer" | "addConsumer" | "cancelSubscription" | "createSubscription" | "fundSubscriptionWithNative" | "getActiveSubscriptionIds" | "getSubscription" | "pendingRequestExists" | "removeConsumer" | "requestSubscriptionOwnerTransfer" | "s_config" | "s_currentSubNonce" | "s_totalNativeBalance" | "s_withdrawableDirectFundingFeeNative" | "s_withdrawableSubscriptionFeeNative"): FunctionFragment; getEvent(nameOrSignatureOrTopic: "SubscriptionCanceled" | "SubscriptionConsumerAdded" | "SubscriptionConsumerRemoved" | "SubscriptionCreated" | "SubscriptionFundedWithNative" | "SubscriptionOwnerTransferRequested" | "SubscriptionOwnerTransferred"): EventFragment; encodeFunctionData(functionFragment: "MAX_CONSUMERS", values?: undefined): string; encodeFunctionData(functionFragment: "acceptSubscriptionOwnerTransfer", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "addConsumer", values: [BigNumberish, AddressLike]): string; encodeFunctionData(functionFragment: "cancelSubscription", values: [BigNumberish, AddressLike]): string; encodeFunctionData(functionFragment: "createSubscription", values?: undefined): string; encodeFunctionData(functionFragment: "fundSubscriptionWithNative", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "getActiveSubscriptionIds", values: [BigNumberish, BigNumberish]): string; encodeFunctionData(functionFragment: "getSubscription", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "pendingRequestExists", values: [BigNumberish]): string; encodeFunctionData(functionFragment: "removeConsumer", values: [BigNumberish, AddressLike]): string; encodeFunctionData(functionFragment: "requestSubscriptionOwnerTransfer", values: [BigNumberish, AddressLike]): string; encodeFunctionData(functionFragment: "s_config", values?: undefined): string; encodeFunctionData(functionFragment: "s_currentSubNonce", values?: undefined): string; encodeFunctionData(functionFragment: "s_totalNativeBalance", values?: undefined): string; encodeFunctionData(functionFragment: "s_withdrawableDirectFundingFeeNative", values?: undefined): string; encodeFunctionData(functionFragment: "s_withdrawableSubscriptionFeeNative", values?: undefined): string; decodeFunctionResult(functionFragment: "MAX_CONSUMERS", data: BytesLike): Result; decodeFunctionResult(functionFragment: "acceptSubscriptionOwnerTransfer", data: BytesLike): Result; decodeFunctionResult(functionFragment: "addConsumer", data: BytesLike): Result; decodeFunctionResult(functionFragment: "cancelSubscription", data: BytesLike): Result; decodeFunctionResult(functionFragment: "createSubscription", data: BytesLike): Result; decodeFunctionResult(functionFragment: "fundSubscriptionWithNative", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getActiveSubscriptionIds", data: BytesLike): Result; decodeFunctionResult(functionFragment: "getSubscription", data: BytesLike): Result; decodeFunctionResult(functionFragment: "pendingRequestExists", data: BytesLike): Result; decodeFunctionResult(functionFragment: "removeConsumer", data: BytesLike): Result; decodeFunctionResult(functionFragment: "requestSubscriptionOwnerTransfer", data: BytesLike): Result; decodeFunctionResult(functionFragment: "s_config", data: BytesLike): Result; decodeFunctionResult(functionFragment: "s_currentSubNonce", data: BytesLike): Result; decodeFunctionResult(functionFragment: "s_totalNativeBalance", data: BytesLike): Result; decodeFunctionResult(functionFragment: "s_withdrawableDirectFundingFeeNative", data: BytesLike): Result; decodeFunctionResult(functionFragment: "s_withdrawableSubscriptionFeeNative", data: BytesLike): Result; } export declare namespace SubscriptionCanceledEvent { type InputTuple = [ subId: BigNumberish, to: AddressLike, amountNative: BigNumberish ]; type OutputTuple = [subId: bigint, to: string, amountNative: bigint]; interface OutputObject { subId: bigint; to: string; amountNative: bigint; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionConsumerAddedEvent { type InputTuple = [subId: BigNumberish, consumer: AddressLike]; type OutputTuple = [subId: bigint, consumer: string]; interface OutputObject { subId: bigint; consumer: string; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionConsumerRemovedEvent { type InputTuple = [subId: BigNumberish, consumer: AddressLike]; type OutputTuple = [subId: bigint, consumer: string]; interface OutputObject { subId: bigint; consumer: string; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionCreatedEvent { type InputTuple = [subId: BigNumberish, owner: AddressLike]; type OutputTuple = [subId: bigint, owner: string]; interface OutputObject { subId: bigint; owner: string; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionFundedWithNativeEvent { type InputTuple = [ subId: BigNumberish, oldNativeBalance: BigNumberish, newNativeBalance: BigNumberish ]; type OutputTuple = [ subId: bigint, oldNativeBalance: bigint, newNativeBalance: bigint ]; interface OutputObject { subId: bigint; oldNativeBalance: bigint; newNativeBalance: bigint; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionOwnerTransferRequestedEvent { type InputTuple = [ subId: BigNumberish, from: AddressLike, to: AddressLike ]; type OutputTuple = [subId: bigint, from: string, to: string]; interface OutputObject { subId: bigint; from: string; to: string; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export declare namespace SubscriptionOwnerTransferredEvent { type InputTuple = [ subId: BigNumberish, from: AddressLike, to: AddressLike ]; type OutputTuple = [subId: bigint, from: string, to: string]; interface OutputObject { subId: bigint; from: string; to: string; } type Event = TypedContractEvent; type Filter = TypedDeferredTopicFilter; type Log = TypedEventLog; type LogDescription = TypedLogDescription; } export interface SubscriptionAPI extends BaseContract { connect(runner?: ContractRunner | null): SubscriptionAPI; waitForDeployment(): Promise; interface: SubscriptionAPIInterface; queryFilter(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; queryFilter(filter: TypedDeferredTopicFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>>; on(event: TCEvent, listener: TypedListener): Promise; on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; once(event: TCEvent, listener: TypedListener): Promise; once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise; listeners(event: TCEvent): Promise>>; listeners(eventName?: string): Promise>; removeAllListeners(event?: TCEvent): Promise; MAX_CONSUMERS: TypedContractMethod<[], [bigint], "view">; acceptSubscriptionOwnerTransfer: TypedContractMethod<[ subId: BigNumberish ], [ void ], "nonpayable">; addConsumer: TypedContractMethod<[ subId: BigNumberish, consumer: AddressLike ], [ void ], "nonpayable">; cancelSubscription: TypedContractMethod<[ subId: BigNumberish, to: AddressLike ], [ void ], "nonpayable">; createSubscription: TypedContractMethod<[], [bigint], "nonpayable">; fundSubscriptionWithNative: TypedContractMethod<[ subId: BigNumberish ], [ void ], "payable">; getActiveSubscriptionIds: TypedContractMethod<[ startIndex: BigNumberish, maxCount: BigNumberish ], [ bigint[] ], "view">; getSubscription: TypedContractMethod<[ subId: BigNumberish ], [ [ bigint, bigint, string, string[] ] & { nativeBalance: bigint; reqCount: bigint; subOwner: string; consumers: string[]; } ], "view">; pendingRequestExists: TypedContractMethod<[ subId: BigNumberish ], [ boolean ], "view">; removeConsumer: TypedContractMethod<[ subId: BigNumberish, consumer: AddressLike ], [ void ], "nonpayable">; requestSubscriptionOwnerTransfer: TypedContractMethod<[ subId: BigNumberish, newOwner: AddressLike ], [ void ], "nonpayable">; s_config: TypedContractMethod<[ ], [ [ bigint, bigint, bigint, bigint, bigint, bigint, bigint ] & { maxGasLimit: bigint; gasAfterPaymentCalculation: bigint; fulfillmentFlatFeeNativePPM: bigint; weiPerUnitGas: bigint; blsPairingCheckOverhead: bigint; nativePremiumPercentage: bigint; gasForCallExactCheck: bigint; } ], "view">; s_currentSubNonce: TypedContractMethod<[], [bigint], "view">; s_totalNativeBalance: TypedContractMethod<[], [bigint], "view">; s_withdrawableDirectFundingFeeNative: TypedContractMethod<[ ], [ bigint ], "view">; s_withdrawableSubscriptionFeeNative: TypedContractMethod<[ ], [ bigint ], "view">; getFunction(key: string | FunctionFragment): T; getFunction(nameOrSignature: "MAX_CONSUMERS"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "acceptSubscriptionOwnerTransfer"): TypedContractMethod<[subId: BigNumberish], [void], "nonpayable">; getFunction(nameOrSignature: "addConsumer"): TypedContractMethod<[ subId: BigNumberish, consumer: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "cancelSubscription"): TypedContractMethod<[ subId: BigNumberish, to: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "createSubscription"): TypedContractMethod<[], [bigint], "nonpayable">; getFunction(nameOrSignature: "fundSubscriptionWithNative"): TypedContractMethod<[subId: BigNumberish], [void], "payable">; getFunction(nameOrSignature: "getActiveSubscriptionIds"): TypedContractMethod<[ startIndex: BigNumberish, maxCount: BigNumberish ], [ bigint[] ], "view">; getFunction(nameOrSignature: "getSubscription"): TypedContractMethod<[ subId: BigNumberish ], [ [ bigint, bigint, string, string[] ] & { nativeBalance: bigint; reqCount: bigint; subOwner: string; consumers: string[]; } ], "view">; getFunction(nameOrSignature: "pendingRequestExists"): TypedContractMethod<[subId: BigNumberish], [boolean], "view">; getFunction(nameOrSignature: "removeConsumer"): TypedContractMethod<[ subId: BigNumberish, consumer: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "requestSubscriptionOwnerTransfer"): TypedContractMethod<[ subId: BigNumberish, newOwner: AddressLike ], [ void ], "nonpayable">; getFunction(nameOrSignature: "s_config"): TypedContractMethod<[ ], [ [ bigint, bigint, bigint, bigint, bigint, bigint, bigint ] & { maxGasLimit: bigint; gasAfterPaymentCalculation: bigint; fulfillmentFlatFeeNativePPM: bigint; weiPerUnitGas: bigint; blsPairingCheckOverhead: bigint; nativePremiumPercentage: bigint; gasForCallExactCheck: bigint; } ], "view">; getFunction(nameOrSignature: "s_currentSubNonce"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "s_totalNativeBalance"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "s_withdrawableDirectFundingFeeNative"): TypedContractMethod<[], [bigint], "view">; getFunction(nameOrSignature: "s_withdrawableSubscriptionFeeNative"): TypedContractMethod<[], [bigint], "view">; getEvent(key: "SubscriptionCanceled"): TypedContractEvent; getEvent(key: "SubscriptionConsumerAdded"): TypedContractEvent; getEvent(key: "SubscriptionConsumerRemoved"): TypedContractEvent; getEvent(key: "SubscriptionCreated"): TypedContractEvent; getEvent(key: "SubscriptionFundedWithNative"): TypedContractEvent; getEvent(key: "SubscriptionOwnerTransferRequested"): TypedContractEvent; getEvent(key: "SubscriptionOwnerTransferred"): TypedContractEvent; filters: { "SubscriptionCanceled(uint256,address,uint256)": TypedContractEvent; SubscriptionCanceled: TypedContractEvent; "SubscriptionConsumerAdded(uint256,address)": TypedContractEvent; SubscriptionConsumerAdded: TypedContractEvent; "SubscriptionConsumerRemoved(uint256,address)": TypedContractEvent; SubscriptionConsumerRemoved: TypedContractEvent; "SubscriptionCreated(uint256,address)": TypedContractEvent; SubscriptionCreated: TypedContractEvent; "SubscriptionFundedWithNative(uint256,uint256,uint256)": TypedContractEvent; SubscriptionFundedWithNative: TypedContractEvent; "SubscriptionOwnerTransferRequested(uint256,address,address)": TypedContractEvent; SubscriptionOwnerTransferRequested: TypedContractEvent; "SubscriptionOwnerTransferred(uint256,address,address)": TypedContractEvent; SubscriptionOwnerTransferred: TypedContractEvent; }; }