@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
57 lines (56 loc) • 2.73 kB
TypeScript
import { z } from "zod";
import { SuperfluidCreateStreamSchema, SuperfluidDeleteStreamSchema } from "./schemas";
import { ActionProvider } from "../actionProvider";
import { Network } from "../../network";
import { EvmWalletProvider } from "../../wallet-providers";
/**
* SuperfluidStreamActionProvider is an action provider for Superfluid interactions.
*/
export declare class SuperfluidStreamActionProvider extends ActionProvider<EvmWalletProvider> {
/**
* Constructor for the SuperfluidStreamActionProvider class.
*/
constructor();
/**
* Creates a stream from the agent wallet to the recipient
*
* @param walletProvider - The wallet provider to start the stream from.
* @param args - The input arguments for the action.
* @returns A JSON string containing the account details or error message
*/
createStream(walletProvider: EvmWalletProvider, args: z.infer<typeof SuperfluidCreateStreamSchema>): Promise<string>;
/**
* Updates a stream from the agent wallet to the recipient
*
* @param walletProvider - The wallet provider to start the stream from.
* @param args - The input arguments for the action.
* @returns A JSON string containing the account details or error message
*/
updateStream(walletProvider: EvmWalletProvider, args: z.infer<typeof SuperfluidCreateStreamSchema>): Promise<string>;
/**
* Deletes a stream from the agent wallet to the recipient
*
* @param walletProvider - The wallet provider to start the stream from.
* @param args - The input arguments for the action.
* @returns A JSON string containing the account details or error message
*/
deleteStream(walletProvider: EvmWalletProvider, args: z.infer<typeof SuperfluidDeleteStreamSchema>): Promise<string>;
/**
* Checks if the Superfluid action provider supports the given network.
*
* @param network - The network to check.
* @returns True if the Superfluid action provider supports the network, false otherwise.
*/
supportsNetwork: (network: Network) => boolean;
/**
* Gets the link to the Superfluid dashboard pertaining to the stream
*
* @param network - The current network
* @param tokenAddress - The ERC20 token address of the underlying stream
* @param senderAddress - The sender of the stream (the agent)
* @param recipientAddress - The recipient of the stream
* @returns The view link to the new stream on Superfluid
*/
getStreamLink: (network: Network, tokenAddress: string, senderAddress: string, recipientAddress: string) => string;
}
export declare const superfluidStreamActionProvider: () => SuperfluidStreamActionProvider;