Skip to content
Open
18 changes: 16 additions & 2 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,22 @@ export type MoveStructId = `${string}::${string}::${string}`;
*/
export type MoveFunctionId = MoveStructId;

// TODO: Add support for looking up ABI to add proper typing
export type MoveStructType = {};
/**
* Represents a Move struct type with proper ABI support.
* This type allows for dynamic lookup of struct fields and their types from the ABI.
*/
export type MoveStructType = {
/** The fully qualified name of the struct in format address::module::name */
type: MoveStructId;
/** The fields of the struct as defined in the ABI */
fields: {
[key: string]: MoveType;
};
/** Optional generic type parameters */
genericTypeParams?: Array<MoveFunctionGenericTypeParam>;
/** The abilities of the struct as defined in the ABI */
abilities?: Array<MoveAbility>;
};

/**
* A union type that encompasses various data types used in Move, including primitive types, address types, object types, and
Expand Down
Loading