UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

71 lines (70 loc) 2.82 kB
import { z } from "zod"; import { ActionProvider } from "../actionProvider"; import { Network } from "../../network"; import { EvmWalletProvider } from "../../wallet-providers"; import { YelayClaimSchema, YelayDepositSchema, YelayRedeemSchema, YelayBalanceSchema } from "./schemas"; /** * YelayActionProvider provides actions for yelay operations. * * @description * This provider is designed to work with EvmWalletProvider for blockchain interactions. * It supports all evm networks. */ export declare class YelayActionProvider extends ActionProvider<EvmWalletProvider> { /** * Constructor for the YelayActionProvider. */ constructor(); /** * Gets the details of the Yelay vaults with their last week APY. * * @param wallet - The wallet instance to get chainId * @returns A formatted string containing the list of vaults with their APY. */ getVaults(wallet: EvmWalletProvider): Promise<string>; /** * Deposits assets into a Yelay Vault * * @param wallet - The wallet instance to execute the transaction * @param args - The input arguments for the action * @returns A success message with transaction details or an error message */ deposit(wallet: EvmWalletProvider, args: z.infer<typeof YelayDepositSchema>): Promise<string>; /** * Redeems assets from a Yelay Vault * * @param wallet - The wallet instance to execute the transaction * @param args - The input arguments for the action * @returns A success message with transaction details or an error message */ redeem(wallet: EvmWalletProvider, args: z.infer<typeof YelayRedeemSchema>): Promise<string>; /** * Claims yield from Yelay * * @param wallet - The wallet instance to execute the transaction * @param args - The input arguments for the action * @returns A success message with transaction details or an error message */ claim(wallet: EvmWalletProvider, args: z.infer<typeof YelayClaimSchema>): Promise<string>; /** * Gets user balance from Yelay * * @param wallet - The wallet instance to execute the transaction * @param args - The input arguments for the action * @returns A success message with user postion, generated and claimedyield */ getBalance(wallet: EvmWalletProvider, args: z.infer<typeof YelayBalanceSchema>): Promise<string>; /** * Checks if this provider supports the given network. * * @param network - The network to check support for * @returns True if the network is supported */ supportsNetwork(network: Network): boolean; } /** * Creates a new YelayActionProvider instance * * @returns A new YelayActionProvider instance */ export declare const yelayActionProvider: () => YelayActionProvider;