supersub
Version:
Supersub JS Sdk
19 lines (18 loc) • 1.13 kB
TypeScript
import { Address, UserOperationCallData, BatchUserOperationCallData } from "@alchemy/aa-core";
import { AlchemySmartAccountClient } from "@alchemy/aa-alchemy";
import { ethers, Networkish, AlchemyProvider } from "ethers";
import { SubscriptionPlugin, SubscriptionTokenBridge } from "./typechain-types";
declare class PluginClient {
chain: Networkish;
pluginAddress: Address;
pluginContract: SubscriptionPlugin;
bridgeContract: SubscriptionTokenBridge;
smartAccountClient: AlchemySmartAccountClient;
constructor(chain: Networkish, pluginAddr: Address, pluginAbi: ethers.Interface | ethers.InterfaceAbi, bridgeAddr: Address, bridgeAbi: ethers.Interface | ethers.InterfaceAbi, client: AlchemySmartAccountClient, provider: AlchemyProvider);
getInstalledPluginsForSmartAccount(): Promise<readonly `0x${string}`[]>;
isPluginInstalled(): Promise<boolean>;
installPlugin(): Promise<void>;
execute(param: string | UserOperationCallData | BatchUserOperationCallData): Promise<`0x${string}`>;
subscribe(planId: number, endTime: number): Promise<`0x${string}`>;
}
export default PluginClient;