Function parseEncodedStruct

  • Convert an encoded struct to a MoveStructId.

    Parameters

    • structObj: {
          account_address: string;
          module_name: string;
          struct_name: string;
      }

      The struct with account_address, module_name, and struct_name properties

      • account_address: string
      • module_name: string
      • struct_name: string

    Returns `${string}::${string}::${string}`

    The MoveStructId

    Example

    const structObj = {
    account_address: "0x1",
    module_name: "0x6170746f735f636f696e",
    struct_name: "0x4170746f73436f696e",
    };
    // structId is "0x1::aptos_coin::AptosCoin"
    const structId = parseEncodedStruct(structObj);