import { TransactionObjectArgument } from "@mysten/sui/transactions"; import { BcsEnum, BcsStruct, BcsTuple, BcsType } from "@mysten/sui/bcs"; import { ClientWithCoreApi, SuiClientTypes } from "@mysten/sui/client"; //#region src/contracts/utils/index.d.ts type GetOptions = {}> = SuiClientTypes.GetObjectOptions & { client: ClientWithCoreApi; }; type GetManyOptions = {}> = SuiClientTypes.GetObjectsOptions & { client: ClientWithCoreApi; }; /** A type argument: a type tag string, or a BCS type whose name is a Move type. */ type TypeArgument = string | BcsType; interface TypeTagOptions { package?: string; typeArguments?: readonly TypeArgument[]; } /** * `typeArguments` is required when the type's name contains unfilled * `phantom X` parameters (at any depth). Everything else — argument arity, * position contents, and tag validity — is validated at runtime. */ type TypeTagParams = Name extends `${string}phantom ${string}` ? [options: TypeTagOptions & { typeArguments: readonly TypeArgument[]; }] : [options?: TypeTagOptions]; type ResolveTypeTagOptions = { client: ClientWithCoreApi; } & (Name extends `${string}phantom ${string}` ? TypeTagOptions & { typeArguments: readonly TypeArgument[]; } : TypeTagOptions); declare class MoveStruct>, const Name extends string = string> extends BcsStruct { /** * Build the type tag for this struct. * * `typeArguments` is the full positional list, in Move declaration order, and * is required when the struct has unfilled phantom parameters. The result may * contain MVR names: those are valid in transaction `typeArguments`, but for * queries or comparisons against on-chain data use `resolveTypeTag` instead. */ typeTag(...args: TypeTagParams): string; /** * Build the type tag for this struct, then resolve any MVR names through the * client (using its configured overrides and the MVR API) and return the * normalized, address-only form suitable for queries and comparisons against * on-chain data. */ resolveTypeTag(options: ResolveTypeTagOptions): Promise; get = {}>({ objectId, ...options }: GetOptions): Promise & { json: BcsStruct['$inferType']; }>; getMany = {}>({ client, ...options }: GetManyOptions): Promise & { json: BcsStruct['$inferType']; }>>; } //#endregion export { MoveStruct }; //# sourceMappingURL=index.d.mts.map