Get wallet balance action.

Implements

Constructors

Properties

Constructors

Properties

argsSchema: ZodObject<
    { assetId: ZodString },
    "strip",
    ZodTypeAny,
    { assetId: string },
    { assetId: string },
> = GetBalanceInput

Schema for validating action arguments

description: string = GET_BALANCE_PROMPT

A description of what the action does

func: (wallet: Wallet, args: { assetId: string }) => Promise<string> = getBalance

The function to execute for this action

Type declaration

    • (wallet: Wallet, args: { assetId: string }): Promise<string>
    • Gets balance for all addresses in the wallet for a given asset.

      Parameters

      • wallet: Wallet

        The wallet to get the balance for.

      • args: { assetId: string }

        The input arguments for the action.

      Returns Promise<string>

      A message containing the balance information.

name: string = "get_balance"

The name of the action