@aptos-labs/ts-sdk - v7.1.0
    Preparing search index...

    Function fetchModuleAbiWithStructs

    • Fetches a module ABI along with all struct ABIs it references. This optimization minimizes nested network calls when encoding struct/enum arguments.

      Strategy:

      • Fetches the main module ABI
      • Parses all type references in struct fields and function parameters
      • Fetches ABIs for all referenced struct modules in parallel
      • Caches the complete bundle together

      Parameters

      • moduleAddress: string

        The address of the module from which to fetch the ABI.

      • moduleName: string

        The name of the module containing the ABI.

      • aptosConfig: AptosConfig

        The configuration settings for Aptos.

      Returns Promise<ModuleAbiBundle>

      ModuleAbiBundle containing the module and all referenced struct modules