The "View Asset List" feature provides functionality to retrieve and display the list of assets owned by a wallet on the SUI blockchain. This feature is critical for enabling AI Agents to intelligently interact with user wallets, manage assets, and make informed decisions about transactions or workflows. The implementation should be modular, reusable, and easily integrable into any AI Agent.

This document outlines a step-by-step guide to implementing the View Asset List feature in the toolkit.


Purpose of the View Asset List Feature

The View Asset List feature allows:

  1. Asset Management: Retrieve a list of assets (e.g., fungible tokens, NFTs, or other objects) owned by a wallet.
  2. Decision-Making: Enable AI Agents to analyze wallet holdings and execute actions based on asset data.
  3. Support for All Asset Types: Include both fungible tokens (like SUI tokens or custom tokens) and non-fungible tokens (NFTs).
  4. Reusable Toolkit Design: Create a modular utility that can be reused in various workflows.

Key Features

  1. Retrieve All Assets:
  2. Filter by Asset Type:
  3. Detailed Asset Information:
  4. Error Handling:
  5. AI Agent Integration:

Implementation Steps

Step 1: Understand SUI's Asset Management Mechanism

The SUI blockchain provides methods to retrieve wallet holdings: