@mysten/sui 2.13.4 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/index.d.mts +20 -20
- package/dist/client/core-resolver.mjs +3 -5
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/types.d.mts +12 -3
- package/dist/client/types.d.mts.map +1 -1
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/jsonRpc/types/generated.d.mts +1 -1
- package/dist/transactions/Transaction.d.mts +9 -9
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/utils/sui-types.d.mts.map +1 -1
- package/dist/utils/sui-types.mjs +1 -0
- package/dist/utils/sui-types.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/bcs.d.mts.map +1 -1
- package/package.json +1 -1
- package/src/client/core-resolver.ts +10 -21
- package/src/client/types.ts +12 -3
- package/src/graphql/core.ts +1 -1
- package/src/grpc/core.ts +1 -1
- package/src/jsonRpc/core.ts +1 -1
- package/src/jsonRpc/types/generated.ts +1 -1
- package/src/utils/sui-types.ts +6 -0
- package/src/version.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BatchGetObjectsRequest, BatchGetObjectsResponse, BatchGetTransactionsRequest, BatchGetTransactionsResponse, GetCheckpointRequest, GetCheckpointResponse, GetEpochRequest, GetEpochResponse, GetObjectRequest, GetObjectResponse, GetServiceInfoRequest, GetServiceInfoResponse, GetTransactionRequest, GetTransactionResponse } from "./ledger_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime1 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc1 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts
|
|
@@ -45,9 +45,9 @@ interface ILedgerServiceClient {
|
|
|
45
45
|
declare class LedgerServiceClient implements ILedgerServiceClient, ServiceInfo {
|
|
46
46
|
private readonly _transport;
|
|
47
47
|
typeName: string;
|
|
48
|
-
methods:
|
|
48
|
+
methods: _protobuf_ts_runtime_rpc1.MethodInfo<any, any>[];
|
|
49
49
|
options: {
|
|
50
|
-
[extensionName: string]:
|
|
50
|
+
[extensionName: string]: _protobuf_ts_runtime1.JsonValue;
|
|
51
51
|
};
|
|
52
52
|
constructor(_transport: RpcTransport);
|
|
53
53
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetDatatypeRequest, GetDatatypeResponse, GetFunctionRequest, GetFunctionResponse, GetPackageRequest, GetPackageResponse, ListPackageVersionsRequest, ListPackageVersionsResponse } from "./move_package_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime2 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc2 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts
|
|
@@ -31,9 +31,9 @@ interface IMovePackageServiceClient {
|
|
|
31
31
|
declare class MovePackageServiceClient implements IMovePackageServiceClient, ServiceInfo {
|
|
32
32
|
private readonly _transport;
|
|
33
33
|
typeName: string;
|
|
34
|
-
methods:
|
|
34
|
+
methods: _protobuf_ts_runtime_rpc2.MethodInfo<any, any>[];
|
|
35
35
|
options: {
|
|
36
|
-
[extensionName: string]:
|
|
36
|
+
[extensionName: string]: _protobuf_ts_runtime2.JsonValue;
|
|
37
37
|
};
|
|
38
38
|
constructor(_transport: RpcTransport);
|
|
39
39
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VerifySignatureRequest, VerifySignatureResponse } from "./signature_verification_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime3 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc3 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts
|
|
@@ -21,9 +21,9 @@ interface ISignatureVerificationServiceClient {
|
|
|
21
21
|
declare class SignatureVerificationServiceClient implements ISignatureVerificationServiceClient, ServiceInfo {
|
|
22
22
|
private readonly _transport;
|
|
23
23
|
typeName: string;
|
|
24
|
-
methods:
|
|
24
|
+
methods: _protobuf_ts_runtime_rpc3.MethodInfo<any, any>[];
|
|
25
25
|
options: {
|
|
26
|
-
[extensionName: string]:
|
|
26
|
+
[extensionName: string]: _protobuf_ts_runtime3.JsonValue;
|
|
27
27
|
};
|
|
28
28
|
constructor(_transport: RpcTransport);
|
|
29
29
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExecuteTransactionRequest, ExecuteTransactionResponse, SimulateTransactionRequest, SimulateTransactionResponse } from "./transaction_execution_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime0 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc0 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts
|
|
@@ -23,9 +23,9 @@ interface ITransactionExecutionServiceClient {
|
|
|
23
23
|
declare class TransactionExecutionServiceClient implements ITransactionExecutionServiceClient, ServiceInfo {
|
|
24
24
|
private readonly _transport;
|
|
25
25
|
typeName: string;
|
|
26
|
-
methods:
|
|
26
|
+
methods: _protobuf_ts_runtime_rpc0.MethodInfo<any, any>[];
|
|
27
27
|
options: {
|
|
28
|
-
[extensionName: string]:
|
|
28
|
+
[extensionName: string]: _protobuf_ts_runtime0.JsonValue;
|
|
29
29
|
};
|
|
30
30
|
constructor(_transport: RpcTransport);
|
|
31
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.mjs","names":["#jsonRpcClient","bcs"],"sources":["../../src/jsonRpc/core.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromBase64, type InferBcsInput } from '@mysten/bcs';\n\nimport { bcs, TypeTagSerializer } from '../bcs/index.js';\nimport type {\n\tDevInspectResults,\n\tDryRunTransactionBlockResponse,\n\tExecutionStatus as JsonRpcExecutionStatus,\n\tObjectOwner,\n\tSuiMoveAbilitySet,\n\tSuiMoveAbort,\n\tSuiMoveNormalizedType,\n\tSuiMoveVisibility,\n\tSuiObjectChange,\n\tSuiObjectData,\n\tSuiObjectDataFilter,\n\tSuiTransactionBlockResponse,\n\tTransactionEffects,\n} from './types/index.js';\nimport { Transaction } from '../transactions/Transaction.js';\nimport { computeGasBudget, coreClientResolveTransactionPlugin } from '../client/core-resolver.js';\nimport { TransactionDataBuilder } from '../transactions/TransactionData.js';\nimport { chunk } from '@mysten/utils';\nimport { normalizeSuiAddress, normalizeStructTag } from '../utils/sui-types.js';\nimport { deriveDynamicFieldID } from '../utils/dynamic-fields.js';\nimport { SUI_FRAMEWORK_ADDRESS, SUI_SYSTEM_ADDRESS } from '../utils/constants.js';\nimport { CoreClient } from '../client/core.js';\nimport type { SuiClientTypes } from '../client/types.js';\nimport { ObjectError } from '../client/errors.js';\nimport {\n\tformatMoveAbortMessage,\n\tparseTransactionBcs,\n\tparseTransactionEffectsBcs,\n} from '../client/index.js';\nimport type { SuiJsonRpcClient } from './client.js';\n\nconst MAX_GAS = 50_000_000_000;\n\nfunction parseJsonRpcExecutionStatus(\n\tstatus: JsonRpcExecutionStatus,\n\tabortError?: SuiMoveAbort | null,\n): SuiClientTypes.ExecutionStatus {\n\tif (status.status === 'success') {\n\t\treturn { success: true, error: null };\n\t}\n\n\tconst rawMessage = status.error ?? 'Unknown';\n\n\tif (abortError) {\n\t\tconst commandMatch = rawMessage.match(/in command (\\d+)/);\n\t\tconst command = commandMatch ? parseInt(commandMatch[1], 10) : undefined;\n\n\t\tconst instructionMatch = rawMessage.match(/instruction:\\s*(\\d+)/);\n\t\tconst instruction = instructionMatch ? parseInt(instructionMatch[1], 10) : undefined;\n\n\t\tconst moduleParts = abortError.module_id?.split('::') ?? [];\n\t\tconst pkg = moduleParts[0] ? normalizeSuiAddress(moduleParts[0]) : undefined;\n\t\tconst module = moduleParts[1];\n\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\t$kind: 'MoveAbort',\n\t\t\t\tmessage: formatMoveAbortMessage({\n\t\t\t\t\tcommand,\n\t\t\t\t\tlocation:\n\t\t\t\t\t\tpkg && module\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tpackage: pkg,\n\t\t\t\t\t\t\t\t\tmodule,\n\t\t\t\t\t\t\t\t\tfunctionName: abortError.function ?? undefined,\n\t\t\t\t\t\t\t\t\tinstruction,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tabortCode: String(abortError.error_code ?? 0),\n\t\t\t\t\tcleverError: abortError.line != null ? { lineNumber: abortError.line } : undefined,\n\t\t\t\t}),\n\t\t\t\tcommand,\n\t\t\t\tMoveAbort: {\n\t\t\t\t\tabortCode: String(abortError.error_code ?? 0),\n\t\t\t\t\tlocation: abortError.module_id\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tpackage: normalizeSuiAddress(abortError.module_id.split('::')[0] ?? ''),\n\t\t\t\t\t\t\t\tmodule: abortError.module_id.split('::')[1] ?? '',\n\t\t\t\t\t\t\t\tfunctionName: abortError.function ?? undefined,\n\t\t\t\t\t\t\t\tinstruction,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\treturn {\n\t\tsuccess: false,\n\t\terror: {\n\t\t\t$kind: 'Unknown',\n\t\t\tmessage: rawMessage,\n\t\t\tUnknown: null,\n\t\t},\n\t};\n}\n\nexport class JSONRpcCoreClient extends CoreClient {\n\t#jsonRpcClient: SuiJsonRpcClient;\n\n\tconstructor({\n\t\tjsonRpcClient,\n\t\tmvr,\n\t}: {\n\t\tjsonRpcClient: SuiJsonRpcClient;\n\t\tmvr?: SuiClientTypes.MvrOptions;\n\t}) {\n\t\tsuper({ network: jsonRpcClient.network, base: jsonRpcClient, mvr });\n\t\tthis.#jsonRpcClient = jsonRpcClient;\n\t}\n\n\tasync getObjects<Include extends SuiClientTypes.ObjectInclude = {}>(\n\t\toptions: SuiClientTypes.GetObjectsOptions<Include>,\n\t) {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: SuiClientTypes.GetObjectsResponse<Include>['objects'] = [];\n\t\tfor (const batch of batches) {\n\t\t\tconst objects = await this.#jsonRpcClient.multiGetObjects({\n\t\t\t\tids: batch,\n\t\t\t\toptions: {\n\t\t\t\t\tshowOwner: true,\n\t\t\t\t\tshowType: true,\n\t\t\t\t\tshowBcs: options.include?.content || options.include?.objectBcs ? true : false,\n\t\t\t\t\tshowPreviousTransaction:\n\t\t\t\t\t\toptions.include?.previousTransaction || options.include?.objectBcs ? true : false,\n\t\t\t\t\tshowStorageRebate: options.include?.objectBcs ?? false,\n\t\t\t\t\tshowContent: options.include?.json ?? false,\n\t\t\t\t\tshowDisplay: options.include?.display ?? false,\n\t\t\t\t},\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\n\t\t\tfor (const [idx, object] of objects.entries()) {\n\t\t\t\tif (object.error) {\n\t\t\t\t\tresults.push(ObjectError.fromResponse(object.error, batch[idx]));\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(parseObject(object.data!, options.include));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync listOwnedObjects<Include extends SuiClientTypes.ObjectInclude = {}>(\n\t\toptions: SuiClientTypes.ListOwnedObjectsOptions<Include>,\n\t) {\n\t\tlet filter: SuiObjectDataFilter | null = null;\n\t\tif (options.type) {\n\t\t\tconst parts = options.type.split('::');\n\t\t\tif (parts.length === 1) {\n\t\t\t\tfilter = { Package: options.type };\n\t\t\t} else if (parts.length === 2) {\n\t\t\t\tfilter = { MoveModule: { package: parts[0], module: parts[1] } };\n\t\t\t} else {\n\t\t\t\tfilter = { StructType: options.type };\n\t\t\t}\n\t\t}\n\n\t\tconst objects = await this.#jsonRpcClient.getOwnedObjects({\n\t\t\towner: options.owner,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t\toptions: {\n\t\t\t\tshowOwner: true,\n\t\t\t\tshowType: true,\n\t\t\t\tshowBcs: options.include?.content || options.include?.objectBcs ? true : false,\n\t\t\t\tshowPreviousTransaction:\n\t\t\t\t\toptions.include?.previousTransaction || options.include?.objectBcs ? true : false,\n\t\t\t\tshowStorageRebate: options.include?.objectBcs ?? false,\n\t\t\t\tshowContent: options.include?.json ?? false,\n\t\t\t\tshowDisplay: options.include?.display ?? false,\n\t\t\t},\n\t\t\tfilter,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: objects.data.map((result) => {\n\t\t\t\tif (result.error) {\n\t\t\t\t\tthrow ObjectError.fromResponse(result.error);\n\t\t\t\t}\n\n\t\t\t\treturn parseObject(result.data!, options.include);\n\t\t\t}),\n\t\t\thasNextPage: objects.hasNextPage,\n\t\t\tcursor: objects.nextCursor ?? null,\n\t\t};\n\t}\n\n\tasync listCoins(options: SuiClientTypes.ListCoinsOptions) {\n\t\tconst coins = await this.#jsonRpcClient.getCoins({\n\t\t\towner: options.owner,\n\t\t\tcoinType: options.coinType,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: coins.data.map(\n\t\t\t\t(coin): SuiClientTypes.Coin => ({\n\t\t\t\t\tobjectId: coin.coinObjectId,\n\t\t\t\t\tversion: coin.version,\n\t\t\t\t\tdigest: coin.digest,\n\t\t\t\t\tbalance: coin.balance,\n\t\t\t\t\ttype: normalizeStructTag(`0x2::coin::Coin<${coin.coinType}>`),\n\t\t\t\t\towner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: options.owner,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\thasNextPage: coins.hasNextPage,\n\t\t\tcursor: coins.nextCursor ?? null,\n\t\t};\n\t}\n\n\tasync getBalance(options: SuiClientTypes.GetBalanceOptions) {\n\t\tconst balance = await this.#jsonRpcClient.getBalance({\n\t\t\towner: options.owner,\n\t\t\tcoinType: options.coinType,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\tconst addressBalance = balance.fundsInAddressBalance ?? '0';\n\t\tconst coinBalance = String(BigInt(balance.totalBalance) - BigInt(addressBalance));\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tcoinType: normalizeStructTag(balance.coinType),\n\t\t\t\tbalance: balance.totalBalance,\n\t\t\t\tcoinBalance,\n\t\t\t\taddressBalance,\n\t\t\t},\n\t\t};\n\t}\n\tasync getCoinMetadata(\n\t\toptions: SuiClientTypes.GetCoinMetadataOptions,\n\t): Promise<SuiClientTypes.GetCoinMetadataResponse> {\n\t\tconst coinType = (await this.mvr.resolveType({ type: options.coinType })).type;\n\n\t\tconst result = await this.#jsonRpcClient.getCoinMetadata({\n\t\t\tcoinType,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\tif (!result) {\n\t\t\treturn { coinMetadata: null };\n\t\t}\n\n\t\treturn {\n\t\t\tcoinMetadata: {\n\t\t\t\tid: result.id ?? null,\n\t\t\t\tdecimals: result.decimals,\n\t\t\t\tname: result.name,\n\t\t\t\tsymbol: result.symbol,\n\t\t\t\tdescription: result.description,\n\t\t\t\ticonUrl: result.iconUrl ?? null,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync listBalances(options: SuiClientTypes.ListBalancesOptions) {\n\t\tconst balances = await this.#jsonRpcClient.getAllBalances({\n\t\t\towner: options.owner,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tbalances: balances.map((balance) => {\n\t\t\t\tconst addressBalance = balance.fundsInAddressBalance ?? '0';\n\t\t\t\tconst coinBalance = String(BigInt(balance.totalBalance) - BigInt(addressBalance));\n\t\t\t\treturn {\n\t\t\t\t\tcoinType: normalizeStructTag(balance.coinType),\n\t\t\t\t\tbalance: balance.totalBalance,\n\t\t\t\t\tcoinBalance,\n\t\t\t\t\taddressBalance,\n\t\t\t\t};\n\t\t\t}),\n\t\t\thasNextPage: false,\n\t\t\tcursor: null,\n\t\t};\n\t}\n\tasync getTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\t\toptions: SuiClientTypes.GetTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.TransactionResult<Include>> {\n\t\tconst transaction = await this.#jsonRpcClient.getTransactionBlock({\n\t\t\tdigest: options.digest,\n\t\t\toptions: {\n\t\t\t\t// showRawInput is always needed to extract signatures from SenderSignedData\n\t\t\t\tshowRawInput: true,\n\t\t\t\t// showEffects is always needed to get status\n\t\t\t\tshowEffects: true,\n\t\t\t\tshowObjectChanges: options.include?.objectTypes ?? false,\n\t\t\t\tshowRawEffects: options.include?.effects ?? false,\n\t\t\t\tshowEvents: options.include?.events ?? false,\n\t\t\t\tshowBalanceChanges: options.include?.balanceChanges ?? false,\n\t\t\t},\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn parseTransaction(transaction, options.include);\n\t}\n\tasync executeTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\t\toptions: SuiClientTypes.ExecuteTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.TransactionResult<Include>> {\n\t\tconst transaction = await this.#jsonRpcClient.executeTransactionBlock({\n\t\t\ttransactionBlock: options.transaction,\n\t\t\tsignature: options.signatures,\n\t\t\toptions: {\n\t\t\t\t// showRawInput is always needed to extract signatures from SenderSignedData\n\t\t\t\tshowRawInput: true,\n\t\t\t\t// showEffects is always needed to get status\n\t\t\t\tshowEffects: true,\n\t\t\t\tshowRawEffects: options.include?.effects ?? false,\n\t\t\t\tshowEvents: options.include?.events ?? false,\n\t\t\t\tshowObjectChanges: options.include?.objectTypes ?? false,\n\t\t\t\tshowBalanceChanges: options.include?.balanceChanges ?? false,\n\t\t\t},\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn parseTransaction(transaction, options.include);\n\t}\n\tasync simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(\n\t\toptions: SuiClientTypes.SimulateTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {\n\t\tif (!(options.transaction instanceof Uint8Array)) {\n\t\t\tawait options.transaction.build({ client: this, onlyTransactionKind: true });\n\t\t}\n\n\t\tconst tx = Transaction.from(options.transaction);\n\n\t\tconst data =\n\t\t\toptions.transaction instanceof Uint8Array\n\t\t\t\t? null\n\t\t\t\t: TransactionDataBuilder.restore(options.transaction.getData());\n\n\t\tconst transactionBytes = data\n\t\t\t? data.build({\n\t\t\t\t\toverrides: {\n\t\t\t\t\t\tgasData: {\n\t\t\t\t\t\t\tbudget: data.gasData.budget ?? String(MAX_GAS),\n\t\t\t\t\t\t\tprice: data.gasData.price ?? String(await this.#jsonRpcClient.getReferenceGasPrice()),\n\t\t\t\t\t\t\tpayment: data.gasData.payment ?? [],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t: (options.transaction as Uint8Array);\n\n\t\tconst sender = tx.getData().sender ?? normalizeSuiAddress('0x0');\n\t\tconst checksDisabled = options.checksEnabled === false;\n\n\t\tlet dryRunResult: DryRunTransactionBlockResponse | null = null;\n\t\ttry {\n\t\t\tdryRunResult = await this.#jsonRpcClient.dryRunTransactionBlock({\n\t\t\t\ttransactionBlock: transactionBytes,\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tif (!checksDisabled) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\n\t\tlet devInspectResult: DevInspectResults | null = null;\n\t\tif (options.include?.commandResults || checksDisabled) {\n\t\t\ttry {\n\t\t\t\tdevInspectResult = await this.#jsonRpcClient.devInspectTransactionBlock({\n\t\t\t\t\tsender,\n\t\t\t\t\ttransactionBlock: tx,\n\t\t\t\t\tsignal: options.signal,\n\t\t\t\t});\n\t\t\t} catch {}\n\t\t}\n\n\t\tconst dryRunFailed = !dryRunResult || dryRunResult.effects.status.status !== 'success';\n\t\tconst effectsSource =\n\t\t\tchecksDisabled && dryRunFailed && devInspectResult\n\t\t\t\t? devInspectResult\n\t\t\t\t: (dryRunResult ?? devInspectResult);\n\t\tif (!effectsSource) {\n\t\t\tthrow new Error('simulateTransaction failed: no results from dryRun or devInspect');\n\t\t}\n\n\t\tconst { effects, objectTypes } = parseTransactionEffectsJson({\n\t\t\teffects: effectsSource.effects,\n\t\t\tobjectChanges: (!dryRunFailed ? dryRunResult?.objectChanges : null) ?? [],\n\t\t});\n\n\t\tlet parsedTransaction: SuiClientTypes.TransactionData | undefined;\n\t\tif (options.include?.transaction) {\n\t\t\tparsedTransaction = parseTransactionBcs(transactionBytes);\n\t\t\tif (data && !dryRunFailed && effects.gasUsed) {\n\t\t\t\tif (!data.gasData.budget) {\n\t\t\t\t\tparsedTransaction.gasData.budget = computeGasBudget(effects.gasUsed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst transactionData: SuiClientTypes.Transaction<Include> = {\n\t\t\tdigest: TransactionDataBuilder.getDigestFromBytes(transactionBytes),\n\t\t\tepoch: null,\n\t\t\tstatus: effects.status,\n\t\t\teffects: (options.include?.effects\n\t\t\t\t? effects\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['effects'],\n\t\t\tobjectTypes: (options.include?.objectTypes\n\t\t\t\t? objectTypes\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['objectTypes'],\n\t\t\tsignatures: [],\n\t\t\ttransaction: (parsedTransaction ??\n\t\t\t\tundefined) as SuiClientTypes.Transaction<Include>['transaction'],\n\t\t\tbcs: (options.include?.bcs\n\t\t\t\t? transactionBytes\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['bcs'],\n\t\t\tbalanceChanges: (options.include?.balanceChanges && dryRunResult && !dryRunFailed\n\t\t\t\t? dryRunResult.balanceChanges.map((change) => ({\n\t\t\t\t\t\tcoinType: normalizeStructTag(change.coinType),\n\t\t\t\t\t\taddress: parseOwnerAddress(change.owner)!,\n\t\t\t\t\t\tamount: change.amount,\n\t\t\t\t\t}))\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['balanceChanges'],\n\t\t\tevents: (options.include?.events\n\t\t\t\t? (effectsSource.events?.map((event) => ({\n\t\t\t\t\t\tpackageId: event.packageId,\n\t\t\t\t\t\tmodule: event.transactionModule,\n\t\t\t\t\t\tsender: event.sender,\n\t\t\t\t\t\teventType: event.type,\n\t\t\t\t\t\tbcs: 'bcs' in event ? fromBase64(event.bcs) : new Uint8Array(),\n\t\t\t\t\t\tjson: (event.parsedJson as Record<string, unknown>) ?? null,\n\t\t\t\t\t})) ?? [])\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['events'],\n\t\t};\n\n\t\tlet commandResults: SuiClientTypes.CommandResult[] | undefined;\n\t\tif (options.include?.commandResults && devInspectResult?.results) {\n\t\t\tcommandResults = devInspectResult.results.map((result) => ({\n\t\t\t\treturnValues: (result.returnValues ?? []).map(([bytes]) => ({\n\t\t\t\t\tbcs: new Uint8Array(bytes),\n\t\t\t\t})),\n\t\t\t\tmutatedReferences: (result.mutableReferenceOutputs ?? []).map(([, bytes]) => ({\n\t\t\t\t\tbcs: new Uint8Array(bytes),\n\t\t\t\t})),\n\t\t\t}));\n\t\t}\n\n\t\treturn effects.status.success\n\t\t\t? {\n\t\t\t\t\t$kind: 'Transaction',\n\t\t\t\t\tTransaction: transactionData,\n\t\t\t\t\tcommandResults:\n\t\t\t\t\t\tcommandResults as SuiClientTypes.SimulateTransactionResult<Include>['commandResults'],\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\t$kind: 'FailedTransaction',\n\t\t\t\t\tFailedTransaction: transactionData,\n\t\t\t\t\tcommandResults:\n\t\t\t\t\t\tcommandResults as SuiClientTypes.SimulateTransactionResult<Include>['commandResults'],\n\t\t\t\t};\n\t}\n\tasync getReferenceGasPrice(options?: SuiClientTypes.GetReferenceGasPriceOptions) {\n\t\tconst referenceGasPrice = await this.#jsonRpcClient.getReferenceGasPrice({\n\t\t\tsignal: options?.signal,\n\t\t});\n\n\t\treturn {\n\t\t\treferenceGasPrice: String(referenceGasPrice),\n\t\t};\n\t}\n\n\tasync getProtocolConfig(\n\t\toptions?: SuiClientTypes.GetProtocolConfigOptions,\n\t): Promise<SuiClientTypes.GetProtocolConfigResponse> {\n\t\tconst result = await this.#jsonRpcClient.getProtocolConfig({ signal: options?.signal });\n\n\t\tconst attributes: Record<string, string | null> = {};\n\t\tfor (const [key, value] of Object.entries(result.attributes)) {\n\t\t\tif (value === null) {\n\t\t\t\tattributes[key] = null;\n\t\t\t} else if ('u16' in value) {\n\t\t\t\tattributes[key] = value.u16;\n\t\t\t} else if ('u32' in value) {\n\t\t\t\tattributes[key] = value.u32;\n\t\t\t} else if ('u64' in value) {\n\t\t\t\tattributes[key] = value.u64;\n\t\t\t} else if ('f64' in value) {\n\t\t\t\tattributes[key] = value.f64;\n\t\t\t} else if ('bool' in value) {\n\t\t\t\tattributes[key] = value.bool;\n\t\t\t} else {\n\t\t\t\tconst entries = Object.entries(value);\n\t\t\t\tattributes[key] = entries.length === 1 ? String(entries[0][1]) : JSON.stringify(value);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tprotocolConfig: {\n\t\t\t\tprotocolVersion: result.protocolVersion,\n\t\t\t\tfeatureFlags: { ...result.featureFlags },\n\t\t\t\tattributes,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getCurrentSystemState(\n\t\toptions?: SuiClientTypes.GetCurrentSystemStateOptions,\n\t): Promise<SuiClientTypes.GetCurrentSystemStateResponse> {\n\t\tconst systemState = await this.#jsonRpcClient.getLatestSuiSystemState({\n\t\t\tsignal: options?.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tsystemState: {\n\t\t\t\tsystemStateVersion: systemState.systemStateVersion,\n\t\t\t\tepoch: systemState.epoch,\n\t\t\t\tprotocolVersion: systemState.protocolVersion,\n\t\t\t\treferenceGasPrice: systemState.referenceGasPrice?.toString() ?? (null as never),\n\t\t\t\tepochStartTimestampMs: systemState.epochStartTimestampMs,\n\t\t\t\tsafeMode: systemState.safeMode,\n\t\t\t\tsafeModeStorageRewards: systemState.safeModeStorageRewards,\n\t\t\t\tsafeModeComputationRewards: systemState.safeModeComputationRewards,\n\t\t\t\tsafeModeStorageRebates: systemState.safeModeStorageRebates,\n\t\t\t\tsafeModeNonRefundableStorageFee: systemState.safeModeNonRefundableStorageFee,\n\t\t\t\tparameters: {\n\t\t\t\t\tepochDurationMs: systemState.epochDurationMs,\n\t\t\t\t\tstakeSubsidyStartEpoch: systemState.stakeSubsidyStartEpoch,\n\t\t\t\t\tmaxValidatorCount: systemState.maxValidatorCount,\n\t\t\t\t\tminValidatorJoiningStake: systemState.minValidatorJoiningStake,\n\t\t\t\t\tvalidatorLowStakeThreshold: systemState.validatorLowStakeThreshold,\n\t\t\t\t\tvalidatorLowStakeGracePeriod: systemState.validatorLowStakeGracePeriod,\n\t\t\t\t},\n\t\t\t\tstorageFund: {\n\t\t\t\t\ttotalObjectStorageRebates: systemState.storageFundTotalObjectStorageRebates,\n\t\t\t\t\tnonRefundableBalance: systemState.storageFundNonRefundableBalance,\n\t\t\t\t},\n\t\t\t\tstakeSubsidy: {\n\t\t\t\t\tbalance: systemState.stakeSubsidyBalance,\n\t\t\t\t\tdistributionCounter: systemState.stakeSubsidyDistributionCounter,\n\t\t\t\t\tcurrentDistributionAmount: systemState.stakeSubsidyCurrentDistributionAmount,\n\t\t\t\t\tstakeSubsidyPeriodLength: systemState.stakeSubsidyPeriodLength,\n\t\t\t\t\tstakeSubsidyDecreaseRate: systemState.stakeSubsidyDecreaseRate,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tasync listDynamicFields(options: SuiClientTypes.ListDynamicFieldsOptions) {\n\t\tconst dynamicFields = await this.#jsonRpcClient.getDynamicFields({\n\t\t\tparentId: options.parentId,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: dynamicFields.data.map((dynamicField): SuiClientTypes.DynamicFieldEntry => {\n\t\t\t\tconst isDynamicObject = dynamicField.type === 'DynamicObject';\n\t\t\t\tconst fullType = isDynamicObject\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${dynamicField.name.type}>, 0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${dynamicField.name.type}, ${dynamicField.objectType}>`;\n\n\t\t\t\tconst bcsBytes = fromBase64(dynamicField.bcsName);\n\t\t\t\tconst derivedNameType = isDynamicObject\n\t\t\t\t\t? `0x2::dynamic_object_field::Wrapper<${dynamicField.name.type}>`\n\t\t\t\t\t: dynamicField.name.type;\n\t\t\t\treturn {\n\t\t\t\t\t$kind: isDynamicObject ? 'DynamicObject' : 'DynamicField',\n\t\t\t\t\tfieldId: deriveDynamicFieldID(options.parentId, derivedNameType, bcsBytes),\n\t\t\t\t\ttype: normalizeStructTag(fullType),\n\t\t\t\t\tname: {\n\t\t\t\t\t\ttype: dynamicField.name.type,\n\t\t\t\t\t\tbcs: bcsBytes,\n\t\t\t\t\t},\n\t\t\t\t\tvalueType: dynamicField.objectType,\n\t\t\t\t\tchildId: isDynamicObject ? dynamicField.objectId : undefined,\n\t\t\t\t} as SuiClientTypes.DynamicFieldEntry;\n\t\t\t}),\n\t\t\thasNextPage: dynamicFields.hasNextPage,\n\t\t\tcursor: dynamicFields.nextCursor,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(options: SuiClientTypes.VerifyZkLoginSignatureOptions) {\n\t\tconst result = await this.#jsonRpcClient.verifyZkLoginSignature({\n\t\t\tbytes: options.bytes,\n\t\t\tsignature: options.signature,\n\t\t\tintentScope: options.intentScope,\n\t\t\tauthor: options.address,\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: result.success,\n\t\t\terrors: result.errors,\n\t\t};\n\t}\n\n\tasync defaultNameServiceName(\n\t\toptions: SuiClientTypes.DefaultNameServiceNameOptions,\n\t): Promise<SuiClientTypes.DefaultNameServiceNameResponse> {\n\t\tconst name = (await this.#jsonRpcClient.resolveNameServiceNames(options)).data[0] ?? null;\n\t\treturn {\n\t\t\tdata: {\n\t\t\t\tname,\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin() {\n\t\treturn coreClientResolveTransactionPlugin;\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst resolvedPackageId = (await this.mvr.resolvePackage({ package: options.packageId }))\n\t\t\t.package;\n\t\tconst result = await this.#jsonRpcClient.getNormalizedMoveFunction({\n\t\t\tpackage: resolvedPackageId,\n\t\t\tmodule: options.moduleName,\n\t\t\tfunction: options.name,\n\t\t});\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: normalizeSuiAddress(resolvedPackageId),\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: options.name,\n\t\t\t\tvisibility: parseVisibility(result.visibility),\n\t\t\t\tisEntry: result.isEntry,\n\t\t\t\ttypeParameters: result.typeParameters.map((abilities) => ({\n\t\t\t\t\tisPhantom: false,\n\t\t\t\t\tconstraints: parseAbilities(abilities),\n\t\t\t\t})),\n\t\t\t\tparameters: result.parameters.map((param) => parseNormalizedSuiMoveType(param)),\n\t\t\t\treturns: result.return.map((ret) => parseNormalizedSuiMoveType(ret)),\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getChainIdentifier(\n\t\t_options?: SuiClientTypes.GetChainIdentifierOptions,\n\t): Promise<SuiClientTypes.GetChainIdentifierResponse> {\n\t\treturn this.cache.read(['chainIdentifier'], async () => {\n\t\t\tconst checkpoint = await this.#jsonRpcClient.getCheckpoint({ id: '0' });\n\t\t\treturn {\n\t\t\t\tchainIdentifier: checkpoint.digest,\n\t\t\t};\n\t\t});\n\t}\n}\n\nfunction serializeObjectToBcs(object: SuiObjectData): Uint8Array | undefined {\n\tif (object.bcs?.dataType !== 'moveObject') {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\t// Normalize the type string to ensure consistent address formatting (0x2 vs 0x00...02)\n\t\tconst typeStr = normalizeStructTag(object.bcs.type);\n\t\tlet moveObjectType: InferBcsInput<typeof bcs.MoveObjectType>;\n\n\t\t// Normalize constants for comparison\n\t\tconst normalizedSuiFramework = normalizeSuiAddress(SUI_FRAMEWORK_ADDRESS);\n\t\tconst gasCoinType = normalizeStructTag(\n\t\t\t`${SUI_FRAMEWORK_ADDRESS}::coin::Coin<${SUI_FRAMEWORK_ADDRESS}::sui::SUI>`,\n\t\t);\n\t\tconst stakedSuiType = normalizeStructTag(`${SUI_SYSTEM_ADDRESS}::staking_pool::StakedSui`);\n\t\tconst coinPrefix = `${normalizedSuiFramework}::coin::Coin<`;\n\n\t\tif (typeStr === gasCoinType) {\n\t\t\tmoveObjectType = { GasCoin: null };\n\t\t} else if (typeStr === stakedSuiType) {\n\t\t\tmoveObjectType = { StakedSui: null };\n\t\t} else if (typeStr.startsWith(coinPrefix)) {\n\t\t\tconst innerTypeMatch = typeStr.match(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t`${normalizedSuiFramework.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}::coin::Coin<(.+)>$`,\n\t\t\t\t),\n\t\t\t);\n\t\t\tif (innerTypeMatch) {\n\t\t\t\tconst innerTypeTag = TypeTagSerializer.parseFromStr(innerTypeMatch[1], true);\n\t\t\t\tmoveObjectType = { Coin: innerTypeTag };\n\t\t\t} else {\n\t\t\t\tthrow new Error('Failed to parse Coin type');\n\t\t\t}\n\t\t} else {\n\t\t\tconst typeTag = TypeTagSerializer.parseFromStr(typeStr, true);\n\t\t\tif (typeof typeTag !== 'object' || !('struct' in typeTag)) {\n\t\t\t\tthrow new Error('Expected struct type tag');\n\t\t\t}\n\t\t\tmoveObjectType = { Other: typeTag.struct };\n\t\t}\n\n\t\tconst contents = fromBase64(object.bcs.bcsBytes);\n\t\tconst owner = convertOwnerToBcs(object.owner!);\n\n\t\treturn bcs.Object.serialize({\n\t\t\tdata: {\n\t\t\t\tMove: {\n\t\t\t\t\ttype: moveObjectType,\n\t\t\t\t\thasPublicTransfer: object.bcs.hasPublicTransfer,\n\t\t\t\t\tversion: object.bcs.version,\n\t\t\t\t\tcontents,\n\t\t\t\t},\n\t\t\t},\n\t\t\towner,\n\t\t\tpreviousTransaction: object.previousTransaction!,\n\t\t\tstorageRebate: object.storageRebate!,\n\t\t}).toBytes();\n\t} catch {\n\t\t// If serialization fails, return undefined\n\t\treturn undefined;\n\t}\n}\n\nfunction parseObject<Include extends SuiClientTypes.ObjectInclude = {}>(\n\tobject: SuiObjectData,\n\tinclude?: Include,\n): SuiClientTypes.Object<Include> {\n\tconst bcsContent =\n\t\tobject.bcs?.dataType === 'moveObject' ? fromBase64(object.bcs.bcsBytes) : undefined;\n\n\tconst objectBcs = include?.objectBcs ? serializeObjectToBcs(object) : undefined;\n\n\t// Package objects have type \"package\" which is not a struct tag, so don't normalize it\n\tconst type =\n\t\tobject.type && object.type.includes('::')\n\t\t\t? normalizeStructTag(object.type)\n\t\t\t: (object.type ?? '');\n\n\tconst jsonContent =\n\t\tinclude?.json && object.content?.dataType === 'moveObject'\n\t\t\t? (object.content.fields as Record<string, unknown>)\n\t\t\t: include?.json\n\t\t\t\t? null\n\t\t\t\t: undefined;\n\n\tconst displayData = include?.display\n\t\t? object.display?.data != null\n\t\t\t? { output: object.display.data as Record<string, string>, errors: null }\n\t\t\t: null\n\t\t: undefined;\n\n\treturn {\n\t\tobjectId: object.objectId,\n\t\tversion: object.version,\n\t\tdigest: object.digest,\n\t\ttype,\n\t\tcontent: (include?.content\n\t\t\t? bcsContent\n\t\t\t: undefined) as SuiClientTypes.Object<Include>['content'],\n\t\towner: parseOwner(object.owner!),\n\t\tpreviousTransaction: (include?.previousTransaction\n\t\t\t? (object.previousTransaction ?? undefined)\n\t\t\t: undefined) as SuiClientTypes.Object<Include>['previousTransaction'],\n\t\tobjectBcs: objectBcs as SuiClientTypes.Object<Include>['objectBcs'],\n\t\tjson: jsonContent as SuiClientTypes.Object<Include>['json'],\n\t\tdisplay: displayData as SuiClientTypes.Object<Include>['display'],\n\t};\n}\n\nfunction parseOwner(owner: ObjectOwner): SuiClientTypes.ObjectOwner {\n\tif (owner === 'Immutable') {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\n\tif ('ConsensusAddressOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\tConsensusAddressOwner: {\n\t\t\t\towner: owner.ConsensusAddressOwner.owner,\n\t\t\t\tstartVersion: owner.ConsensusAddressOwner.start_version,\n\t\t\t},\n\t\t};\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'AddressOwner',\n\t\t\tAddressOwner: owner.AddressOwner,\n\t\t};\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.ObjectOwner,\n\t\t};\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.Shared.initial_shared_version,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction convertOwnerToBcs(owner: ObjectOwner) {\n\tif (owner === 'Immutable') {\n\t\treturn { Immutable: null };\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn { AddressOwner: owner.AddressOwner };\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn { ObjectOwner: owner.ObjectOwner };\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn {\n\t\t\tShared: { initialSharedVersion: owner.Shared.initial_shared_version },\n\t\t};\n\t}\n\n\tif (typeof owner === 'object' && owner !== null && 'ConsensusAddressOwner' in owner) {\n\t\treturn {\n\t\t\tConsensusAddressOwner: {\n\t\t\t\tstartVersion: owner.ConsensusAddressOwner.start_version,\n\t\t\t\towner: owner.ConsensusAddressOwner.owner,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction parseOwnerAddress(owner: ObjectOwner): string | null {\n\tif (owner === 'Immutable') {\n\t\treturn null;\n\t}\n\n\tif ('ConsensusAddressOwner' in owner) {\n\t\treturn owner.ConsensusAddressOwner.owner;\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn owner.AddressOwner;\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn owner.ObjectOwner;\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn null;\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction parseTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\ttransaction: SuiTransactionBlockResponse,\n\tinclude?: Include,\n): SuiClientTypes.TransactionResult<Include> {\n\tconst objectTypes: Record<string, string> = {};\n\n\tif (include?.objectTypes) {\n\t\ttransaction.objectChanges?.forEach((change) => {\n\t\t\tif (change.type !== 'published') {\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t}\n\t\t});\n\t}\n\n\tlet transactionData: SuiClientTypes.TransactionData | undefined;\n\tlet signatures: string[] = [];\n\tlet bcsBytes: Uint8Array | undefined;\n\n\tif (transaction.rawTransaction) {\n\t\tconst parsedTx = bcs.SenderSignedData.parse(fromBase64(transaction.rawTransaction))[0];\n\t\tsignatures = parsedTx.txSignatures;\n\n\t\tif (include?.transaction || include?.bcs) {\n\t\t\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\n\t\t\tif (include?.bcs) {\n\t\t\t\tbcsBytes = bytes;\n\t\t\t}\n\n\t\t\tif (include?.transaction) {\n\t\t\t\tconst data = TransactionDataBuilder.restore({\n\t\t\t\t\tversion: 2,\n\t\t\t\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\t\t\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\t\t\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\t\t\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\t\t\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t\t\t\t});\n\t\t\t\ttransactionData = { ...data };\n\t\t\t}\n\t\t}\n\t}\n\n\t// Get status from JSON-RPC response\n\tconst status: SuiClientTypes.ExecutionStatus = transaction.effects?.status\n\t\t? parseJsonRpcExecutionStatus(transaction.effects.status, transaction.effects.abortError)\n\t\t: {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\t$kind: 'Unknown',\n\t\t\t\t\tmessage: 'Unknown',\n\t\t\t\t\tUnknown: null,\n\t\t\t\t},\n\t\t\t};\n\n\tconst effectsBytes = transaction.rawEffects ? new Uint8Array(transaction.rawEffects) : null;\n\n\tconst result: SuiClientTypes.Transaction<Include> = {\n\t\tdigest: transaction.digest,\n\t\tepoch: transaction.effects?.executedEpoch ?? null,\n\t\tstatus,\n\t\teffects: (include?.effects && effectsBytes\n\t\t\t? parseTransactionEffectsBcs(effectsBytes)\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['effects'],\n\t\tobjectTypes: (include?.objectTypes\n\t\t\t? objectTypes\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['objectTypes'],\n\t\ttransaction: transactionData as SuiClientTypes.Transaction<Include>['transaction'],\n\t\tbcs: bcsBytes as SuiClientTypes.Transaction<Include>['bcs'],\n\t\tsignatures,\n\t\tbalanceChanges: (include?.balanceChanges\n\t\t\t? (transaction.balanceChanges?.map((change) => ({\n\t\t\t\t\tcoinType: normalizeStructTag(change.coinType),\n\t\t\t\t\taddress: parseOwnerAddress(change.owner)!,\n\t\t\t\t\tamount: change.amount,\n\t\t\t\t})) ?? [])\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['balanceChanges'],\n\t\tevents: (include?.events\n\t\t\t? (transaction.events?.map((event) => ({\n\t\t\t\t\tpackageId: event.packageId,\n\t\t\t\t\tmodule: event.transactionModule,\n\t\t\t\t\tsender: event.sender,\n\t\t\t\t\teventType: event.type,\n\t\t\t\t\tbcs: 'bcs' in event ? fromBase64(event.bcs) : new Uint8Array(),\n\t\t\t\t\tjson: (event.parsedJson as Record<string, unknown>) ?? null,\n\t\t\t\t})) ?? [])\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['events'],\n\t};\n\n\treturn status.success\n\t\t? {\n\t\t\t\t$kind: 'Transaction',\n\t\t\t\tTransaction: result,\n\t\t\t}\n\t\t: {\n\t\t\t\t$kind: 'FailedTransaction',\n\t\t\t\tFailedTransaction: result,\n\t\t\t};\n}\n\nfunction parseTransactionEffectsJson({\n\tbytes,\n\teffects,\n\tobjectChanges,\n}: {\n\tbytes?: Uint8Array;\n\teffects: TransactionEffects;\n\tobjectChanges: SuiObjectChange[] | null;\n}): {\n\teffects: SuiClientTypes.TransactionEffects;\n\tobjectTypes: Record<string, string>;\n} {\n\tconst changedObjects: SuiClientTypes.ChangedObject[] = [];\n\tconst unchangedConsensusObjects: SuiClientTypes.UnchangedConsensusObject[] = [];\n\tconst objectTypes: Record<string, string> = {};\n\n\tobjectChanges?.forEach((change) => {\n\t\tswitch (change.type) {\n\t\t\tcase 'published':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.packageId,\n\t\t\t\t\tinputState: 'DoesNotExist',\n\t\t\t\t\tinputVersion: null,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'PackageWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: null,\n\t\t\t\t\tidOperation: 'Created',\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'transferred':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: change.digest,\n\t\t\t\t\tinputOwner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.recipient),\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'mutated':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.previousVersion,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: parseOwner(change.owner),\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.owner),\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'deleted':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: effects.deleted?.find((d) => d.objectId === change.objectId)?.digest ?? null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'DoesNotExist',\n\t\t\t\t\toutputVersion: null,\n\t\t\t\t\toutputDigest: null,\n\t\t\t\t\toutputOwner: null,\n\t\t\t\t\tidOperation: 'Deleted',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'wrapped':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest:\n\t\t\t\t\t\teffects.wrapped?.find((w) => w.objectId === change.objectId)?.digest ?? null,\n\t\t\t\t\toutputOwner: {\n\t\t\t\t\t\t$kind: 'ObjectOwner' as const,\n\t\t\t\t\t\tObjectOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'created':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'DoesNotExist',\n\t\t\t\t\tinputVersion: null,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.owner),\n\t\t\t\t\tidOperation: 'Created',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\treturn {\n\t\tobjectTypes,\n\t\teffects: {\n\t\t\tbcs: bytes ?? null,\n\t\t\tversion: 2,\n\t\t\tstatus: parseJsonRpcExecutionStatus(effects.status, effects.abortError),\n\t\t\tgasUsed: effects.gasUsed,\n\t\t\ttransactionDigest: effects.transactionDigest,\n\t\t\tgasObject: {\n\t\t\t\tobjectId: effects.gasObject?.reference.objectId,\n\t\t\t\tinputState: 'Exists',\n\t\t\t\tinputVersion: null,\n\t\t\t\tinputDigest: null,\n\t\t\t\tinputOwner: null,\n\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\toutputVersion: effects.gasObject.reference.version,\n\t\t\t\toutputDigest: effects.gasObject.reference.digest,\n\t\t\t\toutputOwner: parseOwner(effects.gasObject.owner),\n\t\t\t\tidOperation: 'None',\n\t\t\t},\n\t\t\teventsDigest: effects.eventsDigest ?? null,\n\t\t\tdependencies: effects.dependencies ?? [],\n\t\t\tlamportVersion: effects.gasObject.reference.version,\n\t\t\tchangedObjects,\n\t\t\tunchangedConsensusObjects,\n\t\t\tauxiliaryDataDigest: null,\n\t\t},\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(type: SuiMoveNormalizedType): SuiClientTypes.OpenSignature {\n\tif (typeof type !== 'string') {\n\t\tif ('Reference' in type) {\n\t\t\treturn {\n\t\t\t\treference: 'immutable',\n\t\t\t\tbody: parseNormalizedSuiMoveTypeBody(type.Reference),\n\t\t\t};\n\t\t}\n\n\t\tif ('MutableReference' in type) {\n\t\t\treturn {\n\t\t\t\treference: 'mutable',\n\t\t\t\tbody: parseNormalizedSuiMoveTypeBody(type.MutableReference),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn {\n\t\treference: null,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: SuiMoveNormalizedType,\n): SuiClientTypes.OpenSignatureBody {\n\tswitch (type) {\n\t\tcase 'Address':\n\t\t\treturn { $kind: 'address' };\n\t\tcase 'Bool':\n\t\t\treturn { $kind: 'bool' };\n\t\tcase 'U8':\n\t\t\treturn { $kind: 'u8' };\n\t\tcase 'U16':\n\t\t\treturn { $kind: 'u16' };\n\t\tcase 'U32':\n\t\t\treturn { $kind: 'u32' };\n\t\tcase 'U64':\n\t\t\treturn { $kind: 'u64' };\n\t\tcase 'U128':\n\t\t\treturn { $kind: 'u128' };\n\t\tcase 'U256':\n\t\t\treturn { $kind: 'u256' };\n\t}\n\n\tif (typeof type === 'string') {\n\t\tthrow new Error(`Unknown type: ${type}`);\n\t}\n\n\tif ('Vector' in type) {\n\t\treturn {\n\t\t\t$kind: 'vector',\n\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.Vector),\n\t\t};\n\t}\n\n\tif ('Struct' in type) {\n\t\treturn {\n\t\t\t$kind: 'datatype',\n\t\t\tdatatype: {\n\t\t\t\ttypeName: `${normalizeSuiAddress(type.Struct.address)}::${type.Struct.module}::${type.Struct.name}`,\n\t\t\t\ttypeParameters: type.Struct.typeArguments.map((t) => parseNormalizedSuiMoveTypeBody(t)),\n\t\t\t},\n\t\t};\n\t}\n\n\tif ('TypeParameter' in type) {\n\t\treturn {\n\t\t\t$kind: 'typeParameter',\n\t\t\tindex: type.TypeParameter,\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown type: ${JSON.stringify(type)}`);\n}\n\nfunction parseAbilities(abilitySet: SuiMoveAbilitySet): SuiClientTypes.Ability[] {\n\treturn abilitySet.abilities.map((ability) => {\n\t\tswitch (ability) {\n\t\t\tcase 'Copy':\n\t\t\t\treturn 'copy';\n\t\t\tcase 'Drop':\n\t\t\t\treturn 'drop';\n\t\t\tcase 'Store':\n\t\t\t\treturn 'store';\n\t\t\tcase 'Key':\n\t\t\t\treturn 'key';\n\t\t\tdefault:\n\t\t\t\treturn 'unknown';\n\t\t}\n\t});\n}\n\nfunction parseVisibility(visibility: SuiMoveVisibility): SuiClientTypes.Visibility {\n\tswitch (visibility) {\n\t\tcase 'Public':\n\t\t\treturn 'public';\n\t\tcase 'Private':\n\t\t\treturn 'private';\n\t\tcase 'Friend':\n\t\t\treturn 'friend';\n\t\tdefault:\n\t\t\treturn 'unknown';\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,MAAM,UAAU;AAEhB,SAAS,4BACR,QACA,YACiC;AACjC,KAAI,OAAO,WAAW,UACrB,QAAO;EAAE,SAAS;EAAM,OAAO;EAAM;CAGtC,MAAM,aAAa,OAAO,SAAS;AAEnC,KAAI,YAAY;EACf,MAAM,eAAe,WAAW,MAAM,mBAAmB;EACzD,MAAM,UAAU,eAAe,SAAS,aAAa,IAAI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QAAQ,CAAC,IAAI,KAAK,OAAO,OAAO,IAAI,KAAK,OAAO;GAC7F,gBAAgB,KAAK,OAAO,cAAc,KAAK,MAAM,+BAA+B,EAAE,CAAC;GACvF;EACD;AAGF,KAAI,mBAAmB,KACtB,QAAO;EACN,OAAO;EACP,OAAO,KAAK;EACZ;AAGF,OAAM,IAAI,MAAM,iBAAiB,KAAK,UAAU,KAAK,GAAG;;AAGzD,SAAS,eAAe,YAAyD;AAChF,QAAO,WAAW,UAAU,KAAK,YAAY;AAC5C,UAAQ,SAAR;GACC,KAAK,OACJ,QAAO;GACR,KAAK,OACJ,QAAO;GACR,KAAK,QACJ,QAAO;GACR,KAAK,MACJ,QAAO;GACR,QACC,QAAO;;GAER;;AAGH,SAAS,gBAAgB,YAA0D;AAClF,SAAQ,YAAR;EACC,KAAK,SACJ,QAAO;EACR,KAAK,UACJ,QAAO;EACR,KAAK,SACJ,QAAO;EACR,QACC,QAAO"}
|
|
1
|
+
{"version":3,"file":"core.mjs","names":["#jsonRpcClient","bcs"],"sources":["../../src/jsonRpc/core.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromBase64, type InferBcsInput } from '@mysten/bcs';\n\nimport { bcs, TypeTagSerializer } from '../bcs/index.js';\nimport type {\n\tDevInspectResults,\n\tDryRunTransactionBlockResponse,\n\tExecutionStatus as JsonRpcExecutionStatus,\n\tObjectOwner,\n\tSuiMoveAbilitySet,\n\tSuiMoveAbort,\n\tSuiMoveNormalizedType,\n\tSuiMoveVisibility,\n\tSuiObjectChange,\n\tSuiObjectData,\n\tSuiObjectDataFilter,\n\tSuiTransactionBlockResponse,\n\tTransactionEffects,\n} from './types/index.js';\nimport { Transaction } from '../transactions/Transaction.js';\nimport { computeGasBudget, coreClientResolveTransactionPlugin } from '../client/core-resolver.js';\nimport { TransactionDataBuilder } from '../transactions/TransactionData.js';\nimport { chunk } from '@mysten/utils';\nimport { normalizeSuiAddress, normalizeStructTag } from '../utils/sui-types.js';\nimport { deriveDynamicFieldID } from '../utils/dynamic-fields.js';\nimport { SUI_FRAMEWORK_ADDRESS, SUI_SYSTEM_ADDRESS } from '../utils/constants.js';\nimport { CoreClient } from '../client/core.js';\nimport type { SuiClientTypes } from '../client/types.js';\nimport { ObjectError } from '../client/errors.js';\nimport {\n\tformatMoveAbortMessage,\n\tparseTransactionBcs,\n\tparseTransactionEffectsBcs,\n} from '../client/index.js';\nimport type { SuiJsonRpcClient } from './client.js';\n\nconst MAX_GAS = 50_000_000_000;\n\nfunction parseJsonRpcExecutionStatus(\n\tstatus: JsonRpcExecutionStatus,\n\tabortError?: SuiMoveAbort | null,\n): SuiClientTypes.ExecutionStatus {\n\tif (status.status === 'success') {\n\t\treturn { success: true, error: null };\n\t}\n\n\tconst rawMessage = status.error ?? 'Unknown';\n\n\tif (abortError) {\n\t\tconst commandMatch = rawMessage.match(/in command (\\d+)/);\n\t\tconst command = commandMatch ? parseInt(commandMatch[1], 10) : undefined;\n\n\t\tconst instructionMatch = rawMessage.match(/instruction:\\s*(\\d+)/);\n\t\tconst instruction = instructionMatch ? parseInt(instructionMatch[1], 10) : undefined;\n\n\t\tconst moduleParts = abortError.module_id?.split('::') ?? [];\n\t\tconst pkg = moduleParts[0] ? normalizeSuiAddress(moduleParts[0]) : undefined;\n\t\tconst module = moduleParts[1];\n\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\t$kind: 'MoveAbort',\n\t\t\t\tmessage: formatMoveAbortMessage({\n\t\t\t\t\tcommand,\n\t\t\t\t\tlocation:\n\t\t\t\t\t\tpkg && module\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tpackage: pkg,\n\t\t\t\t\t\t\t\t\tmodule,\n\t\t\t\t\t\t\t\t\tfunctionName: abortError.function ?? undefined,\n\t\t\t\t\t\t\t\t\tinstruction,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tabortCode: String(abortError.error_code ?? 0),\n\t\t\t\t\tcleverError: abortError.line != null ? { lineNumber: abortError.line } : undefined,\n\t\t\t\t}),\n\t\t\t\tcommand,\n\t\t\t\tMoveAbort: {\n\t\t\t\t\tabortCode: String(abortError.error_code ?? 0),\n\t\t\t\t\tlocation: abortError.module_id\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tpackage: normalizeSuiAddress(abortError.module_id.split('::')[0] ?? ''),\n\t\t\t\t\t\t\t\tmodule: abortError.module_id.split('::')[1] ?? '',\n\t\t\t\t\t\t\t\tfunctionName: abortError.function ?? undefined,\n\t\t\t\t\t\t\t\tinstruction,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\treturn {\n\t\tsuccess: false,\n\t\terror: {\n\t\t\t$kind: 'Unknown',\n\t\t\tmessage: rawMessage,\n\t\t\tUnknown: null,\n\t\t},\n\t};\n}\n\nexport class JSONRpcCoreClient extends CoreClient {\n\t#jsonRpcClient: SuiJsonRpcClient;\n\n\tconstructor({\n\t\tjsonRpcClient,\n\t\tmvr,\n\t}: {\n\t\tjsonRpcClient: SuiJsonRpcClient;\n\t\tmvr?: SuiClientTypes.MvrOptions;\n\t}) {\n\t\tsuper({ network: jsonRpcClient.network, base: jsonRpcClient, mvr });\n\t\tthis.#jsonRpcClient = jsonRpcClient;\n\t}\n\n\tasync getObjects<Include extends SuiClientTypes.ObjectInclude = {}>(\n\t\toptions: SuiClientTypes.GetObjectsOptions<Include>,\n\t) {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: SuiClientTypes.GetObjectsResponse<Include>['objects'] = [];\n\t\tfor (const batch of batches) {\n\t\t\tconst objects = await this.#jsonRpcClient.multiGetObjects({\n\t\t\t\tids: batch,\n\t\t\t\toptions: {\n\t\t\t\t\tshowOwner: true,\n\t\t\t\t\tshowType: true,\n\t\t\t\t\tshowBcs: options.include?.content || options.include?.objectBcs ? true : false,\n\t\t\t\t\tshowPreviousTransaction:\n\t\t\t\t\t\toptions.include?.previousTransaction || options.include?.objectBcs ? true : false,\n\t\t\t\t\tshowStorageRebate: options.include?.objectBcs ?? false,\n\t\t\t\t\tshowContent: options.include?.json ?? false,\n\t\t\t\t\tshowDisplay: options.include?.display ?? false,\n\t\t\t\t},\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\n\t\t\tfor (const [idx, object] of objects.entries()) {\n\t\t\t\tif (object.error) {\n\t\t\t\t\tresults.push(ObjectError.fromResponse(object.error, batch[idx]));\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(parseObject(object.data!, options.include));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync listOwnedObjects<Include extends SuiClientTypes.ObjectInclude = {}>(\n\t\toptions: SuiClientTypes.ListOwnedObjectsOptions<Include>,\n\t) {\n\t\tlet filter: SuiObjectDataFilter | null = null;\n\t\tif (options.type) {\n\t\t\tconst parts = options.type.split('::');\n\t\t\tif (parts.length === 1) {\n\t\t\t\tfilter = { Package: options.type };\n\t\t\t} else if (parts.length === 2) {\n\t\t\t\tfilter = { MoveModule: { package: parts[0], module: parts[1] } };\n\t\t\t} else {\n\t\t\t\tfilter = { StructType: options.type };\n\t\t\t}\n\t\t}\n\n\t\tconst objects = await this.#jsonRpcClient.getOwnedObjects({\n\t\t\towner: options.owner,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t\toptions: {\n\t\t\t\tshowOwner: true,\n\t\t\t\tshowType: true,\n\t\t\t\tshowBcs: options.include?.content || options.include?.objectBcs ? true : false,\n\t\t\t\tshowPreviousTransaction:\n\t\t\t\t\toptions.include?.previousTransaction || options.include?.objectBcs ? true : false,\n\t\t\t\tshowStorageRebate: options.include?.objectBcs ?? false,\n\t\t\t\tshowContent: options.include?.json ?? false,\n\t\t\t\tshowDisplay: options.include?.display ?? false,\n\t\t\t},\n\t\t\tfilter,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: objects.data.map((result) => {\n\t\t\t\tif (result.error) {\n\t\t\t\t\tthrow ObjectError.fromResponse(result.error);\n\t\t\t\t}\n\n\t\t\t\treturn parseObject(result.data!, options.include);\n\t\t\t}),\n\t\t\thasNextPage: objects.hasNextPage,\n\t\t\tcursor: objects.nextCursor ?? null,\n\t\t};\n\t}\n\n\tasync listCoins(options: SuiClientTypes.ListCoinsOptions) {\n\t\tconst coins = await this.#jsonRpcClient.getCoins({\n\t\t\towner: options.owner,\n\t\t\tcoinType: options.coinType,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: coins.data.map(\n\t\t\t\t(coin): SuiClientTypes.Coin => ({\n\t\t\t\t\tobjectId: coin.coinObjectId,\n\t\t\t\t\tversion: coin.version,\n\t\t\t\t\tdigest: coin.digest,\n\t\t\t\t\tbalance: coin.balance,\n\t\t\t\t\ttype: normalizeStructTag(`0x2::coin::Coin<${coin.coinType}>`),\n\t\t\t\t\towner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: options.owner,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\thasNextPage: coins.hasNextPage,\n\t\t\tcursor: coins.nextCursor ?? null,\n\t\t};\n\t}\n\n\tasync getBalance(options: SuiClientTypes.GetBalanceOptions) {\n\t\tconst balance = await this.#jsonRpcClient.getBalance({\n\t\t\towner: options.owner,\n\t\t\tcoinType: options.coinType,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\tconst addressBalance = balance.fundsInAddressBalance ?? '0';\n\t\tconst coinBalance = String(BigInt(balance.totalBalance) - BigInt(addressBalance));\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tcoinType: normalizeStructTag(balance.coinType),\n\t\t\t\tbalance: balance.totalBalance,\n\t\t\t\tcoinBalance,\n\t\t\t\taddressBalance,\n\t\t\t},\n\t\t};\n\t}\n\tasync getCoinMetadata(\n\t\toptions: SuiClientTypes.GetCoinMetadataOptions,\n\t): Promise<SuiClientTypes.GetCoinMetadataResponse> {\n\t\tconst coinType = (await this.mvr.resolveType({ type: options.coinType })).type;\n\n\t\tconst result = await this.#jsonRpcClient.getCoinMetadata({\n\t\t\tcoinType,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\tif (!result) {\n\t\t\treturn { coinMetadata: null };\n\t\t}\n\n\t\treturn {\n\t\t\tcoinMetadata: {\n\t\t\t\tid: result.id ?? null,\n\t\t\t\tdecimals: result.decimals,\n\t\t\t\tname: result.name,\n\t\t\t\tsymbol: result.symbol,\n\t\t\t\tdescription: result.description,\n\t\t\t\ticonUrl: result.iconUrl ?? null,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync listBalances(options: SuiClientTypes.ListBalancesOptions) {\n\t\tconst balances = await this.#jsonRpcClient.getAllBalances({\n\t\t\towner: options.owner,\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tbalances: balances.map((balance) => {\n\t\t\t\tconst addressBalance = balance.fundsInAddressBalance ?? '0';\n\t\t\t\tconst coinBalance = String(BigInt(balance.totalBalance) - BigInt(addressBalance));\n\t\t\t\treturn {\n\t\t\t\t\tcoinType: normalizeStructTag(balance.coinType),\n\t\t\t\t\tbalance: balance.totalBalance,\n\t\t\t\t\tcoinBalance,\n\t\t\t\t\taddressBalance,\n\t\t\t\t};\n\t\t\t}),\n\t\t\thasNextPage: false,\n\t\t\tcursor: null,\n\t\t};\n\t}\n\tasync getTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\t\toptions: SuiClientTypes.GetTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.TransactionResult<Include>> {\n\t\tconst transaction = await this.#jsonRpcClient.getTransactionBlock({\n\t\t\tdigest: options.digest,\n\t\t\toptions: {\n\t\t\t\t// showRawInput is always needed to extract signatures from SenderSignedData\n\t\t\t\tshowRawInput: true,\n\t\t\t\t// showEffects is always needed to get status\n\t\t\t\tshowEffects: true,\n\t\t\t\tshowObjectChanges: options.include?.objectTypes ?? false,\n\t\t\t\tshowRawEffects: options.include?.effects ?? false,\n\t\t\t\tshowEvents: options.include?.events ?? false,\n\t\t\t\tshowBalanceChanges: options.include?.balanceChanges ?? false,\n\t\t\t},\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn parseTransaction(transaction, options.include);\n\t}\n\tasync executeTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\t\toptions: SuiClientTypes.ExecuteTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.TransactionResult<Include>> {\n\t\tconst transaction = await this.#jsonRpcClient.executeTransactionBlock({\n\t\t\ttransactionBlock: options.transaction,\n\t\t\tsignature: options.signatures,\n\t\t\toptions: {\n\t\t\t\t// showRawInput is always needed to extract signatures from SenderSignedData\n\t\t\t\tshowRawInput: true,\n\t\t\t\t// showEffects is always needed to get status\n\t\t\t\tshowEffects: true,\n\t\t\t\tshowRawEffects: options.include?.effects ?? false,\n\t\t\t\tshowEvents: options.include?.events ?? false,\n\t\t\t\tshowObjectChanges: options.include?.objectTypes ?? false,\n\t\t\t\tshowBalanceChanges: options.include?.balanceChanges ?? false,\n\t\t\t},\n\t\t\tsignal: options.signal,\n\t\t});\n\n\t\treturn parseTransaction(transaction, options.include);\n\t}\n\tasync simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(\n\t\toptions: SuiClientTypes.SimulateTransactionOptions<Include>,\n\t): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {\n\t\tif (!(options.transaction instanceof Uint8Array)) {\n\t\t\tawait options.transaction.build({ client: this, onlyTransactionKind: true });\n\t\t}\n\n\t\tconst tx = Transaction.from(options.transaction);\n\n\t\tconst data =\n\t\t\toptions.transaction instanceof Uint8Array\n\t\t\t\t? null\n\t\t\t\t: TransactionDataBuilder.restore(options.transaction.getData());\n\n\t\tconst transactionBytes = data\n\t\t\t? data.build({\n\t\t\t\t\toverrides: {\n\t\t\t\t\t\tgasData: {\n\t\t\t\t\t\t\tbudget: data.gasData.budget ?? String(MAX_GAS),\n\t\t\t\t\t\t\tprice: data.gasData.price ?? String(await this.#jsonRpcClient.getReferenceGasPrice()),\n\t\t\t\t\t\t\tpayment: data.gasData.payment ?? [],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t: (options.transaction as Uint8Array);\n\n\t\tconst sender = tx.getData().sender ?? normalizeSuiAddress('0x0');\n\t\tconst checksDisabled = options.checksEnabled === false;\n\n\t\tlet dryRunResult: DryRunTransactionBlockResponse | null = null;\n\t\ttry {\n\t\t\tdryRunResult = await this.#jsonRpcClient.dryRunTransactionBlock({\n\t\t\t\ttransactionBlock: transactionBytes,\n\t\t\t\tsignal: options.signal,\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tif (!checksDisabled) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\n\t\tlet devInspectResult: DevInspectResults | null = null;\n\t\tif (options.include?.commandResults || checksDisabled) {\n\t\t\ttry {\n\t\t\t\tdevInspectResult = await this.#jsonRpcClient.devInspectTransactionBlock({\n\t\t\t\t\tsender,\n\t\t\t\t\ttransactionBlock: tx,\n\t\t\t\t\tsignal: options.signal,\n\t\t\t\t});\n\t\t\t} catch {}\n\t\t}\n\n\t\tconst dryRunFailed = !dryRunResult || dryRunResult.effects.status.status !== 'success';\n\t\tconst effectsSource =\n\t\t\tchecksDisabled && dryRunFailed && devInspectResult\n\t\t\t\t? devInspectResult\n\t\t\t\t: (dryRunResult ?? devInspectResult);\n\t\tif (!effectsSource) {\n\t\t\tthrow new Error('simulateTransaction failed: no results from dryRun or devInspect');\n\t\t}\n\n\t\tconst { effects, objectTypes } = parseTransactionEffectsJson({\n\t\t\teffects: effectsSource.effects,\n\t\t\tobjectChanges: (!dryRunFailed ? dryRunResult?.objectChanges : null) ?? [],\n\t\t});\n\n\t\tlet parsedTransaction: SuiClientTypes.TransactionData | undefined;\n\t\tif (options.include?.transaction) {\n\t\t\tparsedTransaction = parseTransactionBcs(transactionBytes);\n\t\t\tif (data && !dryRunFailed && effects.gasUsed) {\n\t\t\t\tif (!data.gasData.budget) {\n\t\t\t\t\tparsedTransaction.gasData.budget = computeGasBudget(effects.gasUsed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst transactionData: SuiClientTypes.Transaction<Include> = {\n\t\t\tdigest: TransactionDataBuilder.getDigestFromBytes(transactionBytes),\n\t\t\tepoch: null,\n\t\t\tstatus: effects.status,\n\t\t\teffects: (options.include?.effects\n\t\t\t\t? effects\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['effects'],\n\t\t\tobjectTypes: (options.include?.objectTypes\n\t\t\t\t? objectTypes\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['objectTypes'],\n\t\t\tsignatures: [],\n\t\t\ttransaction: (parsedTransaction ??\n\t\t\t\tundefined) as SuiClientTypes.Transaction<Include>['transaction'],\n\t\t\tbcs: (options.include?.bcs\n\t\t\t\t? transactionBytes\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['bcs'],\n\t\t\tbalanceChanges: (options.include?.balanceChanges && dryRunResult && !dryRunFailed\n\t\t\t\t? dryRunResult.balanceChanges.map((change) => ({\n\t\t\t\t\t\tcoinType: normalizeStructTag(change.coinType),\n\t\t\t\t\t\taddress: parseOwnerAddress(change.owner)!,\n\t\t\t\t\t\tamount: change.amount,\n\t\t\t\t\t}))\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['balanceChanges'],\n\t\t\tevents: (options.include?.events\n\t\t\t\t? (effectsSource.events?.map((event) => ({\n\t\t\t\t\t\tpackageId: event.packageId,\n\t\t\t\t\t\tmodule: event.transactionModule,\n\t\t\t\t\t\tsender: event.sender,\n\t\t\t\t\t\teventType: event.type,\n\t\t\t\t\t\tbcs: 'bcs' in event ? fromBase64(event.bcs) : new Uint8Array(),\n\t\t\t\t\t\tjson: (event.parsedJson as Record<string, unknown>) ?? null,\n\t\t\t\t\t})) ?? [])\n\t\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['events'],\n\t\t};\n\n\t\tlet commandResults: SuiClientTypes.CommandResult[] | undefined;\n\t\tif (options.include?.commandResults && devInspectResult?.results) {\n\t\t\tcommandResults = devInspectResult.results.map((result) => ({\n\t\t\t\treturnValues: (result.returnValues ?? []).map(([bytes]) => ({\n\t\t\t\t\tbcs: new Uint8Array(bytes),\n\t\t\t\t})),\n\t\t\t\tmutatedReferences: (result.mutableReferenceOutputs ?? []).map(([, bytes]) => ({\n\t\t\t\t\tbcs: new Uint8Array(bytes),\n\t\t\t\t})),\n\t\t\t}));\n\t\t}\n\n\t\treturn effects.status.success\n\t\t\t? {\n\t\t\t\t\t$kind: 'Transaction',\n\t\t\t\t\tTransaction: transactionData,\n\t\t\t\t\tcommandResults:\n\t\t\t\t\t\tcommandResults as SuiClientTypes.SimulateTransactionResult<Include>['commandResults'],\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\t$kind: 'FailedTransaction',\n\t\t\t\t\tFailedTransaction: transactionData,\n\t\t\t\t\tcommandResults:\n\t\t\t\t\t\tcommandResults as SuiClientTypes.SimulateTransactionResult<Include>['commandResults'],\n\t\t\t\t};\n\t}\n\tasync getReferenceGasPrice(options?: SuiClientTypes.GetReferenceGasPriceOptions) {\n\t\tconst referenceGasPrice = await this.#jsonRpcClient.getReferenceGasPrice({\n\t\t\tsignal: options?.signal,\n\t\t});\n\n\t\treturn {\n\t\t\treferenceGasPrice: String(referenceGasPrice),\n\t\t};\n\t}\n\n\tasync getProtocolConfig(\n\t\toptions?: SuiClientTypes.GetProtocolConfigOptions,\n\t): Promise<SuiClientTypes.GetProtocolConfigResponse> {\n\t\tconst result = await this.#jsonRpcClient.getProtocolConfig({ signal: options?.signal });\n\n\t\tconst attributes: Record<string, string | null> = {};\n\t\tfor (const [key, value] of Object.entries(result.attributes)) {\n\t\t\tif (value === null) {\n\t\t\t\tattributes[key] = null;\n\t\t\t} else if ('u16' in value) {\n\t\t\t\tattributes[key] = value.u16;\n\t\t\t} else if ('u32' in value) {\n\t\t\t\tattributes[key] = value.u32;\n\t\t\t} else if ('u64' in value) {\n\t\t\t\tattributes[key] = value.u64;\n\t\t\t} else if ('f64' in value) {\n\t\t\t\tattributes[key] = value.f64;\n\t\t\t} else if ('bool' in value) {\n\t\t\t\tattributes[key] = value.bool;\n\t\t\t} else {\n\t\t\t\tconst entries = Object.entries(value);\n\t\t\t\tattributes[key] = entries.length === 1 ? String(entries[0][1]) : JSON.stringify(value);\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tprotocolConfig: {\n\t\t\t\tprotocolVersion: result.protocolVersion,\n\t\t\t\tfeatureFlags: { ...result.featureFlags },\n\t\t\t\tattributes,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getCurrentSystemState(\n\t\toptions?: SuiClientTypes.GetCurrentSystemStateOptions,\n\t): Promise<SuiClientTypes.GetCurrentSystemStateResponse> {\n\t\tconst systemState = await this.#jsonRpcClient.getLatestSuiSystemState({\n\t\t\tsignal: options?.signal,\n\t\t});\n\n\t\treturn {\n\t\t\tsystemState: {\n\t\t\t\tsystemStateVersion: systemState.systemStateVersion,\n\t\t\t\tepoch: systemState.epoch,\n\t\t\t\tprotocolVersion: systemState.protocolVersion,\n\t\t\t\treferenceGasPrice: systemState.referenceGasPrice?.toString() ?? (null as never),\n\t\t\t\tepochStartTimestampMs: systemState.epochStartTimestampMs,\n\t\t\t\tsafeMode: systemState.safeMode,\n\t\t\t\tsafeModeStorageRewards: systemState.safeModeStorageRewards,\n\t\t\t\tsafeModeComputationRewards: systemState.safeModeComputationRewards,\n\t\t\t\tsafeModeStorageRebates: systemState.safeModeStorageRebates,\n\t\t\t\tsafeModeNonRefundableStorageFee: systemState.safeModeNonRefundableStorageFee,\n\t\t\t\tparameters: {\n\t\t\t\t\tepochDurationMs: systemState.epochDurationMs,\n\t\t\t\t\tstakeSubsidyStartEpoch: systemState.stakeSubsidyStartEpoch,\n\t\t\t\t\tmaxValidatorCount: systemState.maxValidatorCount,\n\t\t\t\t\tminValidatorJoiningStake: systemState.minValidatorJoiningStake,\n\t\t\t\t\tvalidatorLowStakeThreshold: systemState.validatorLowStakeThreshold,\n\t\t\t\t\tvalidatorLowStakeGracePeriod: systemState.validatorLowStakeGracePeriod,\n\t\t\t\t},\n\t\t\t\tstorageFund: {\n\t\t\t\t\ttotalObjectStorageRebates: systemState.storageFundTotalObjectStorageRebates,\n\t\t\t\t\tnonRefundableBalance: systemState.storageFundNonRefundableBalance,\n\t\t\t\t},\n\t\t\t\tstakeSubsidy: {\n\t\t\t\t\tbalance: systemState.stakeSubsidyBalance,\n\t\t\t\t\tdistributionCounter: systemState.stakeSubsidyDistributionCounter,\n\t\t\t\t\tcurrentDistributionAmount: systemState.stakeSubsidyCurrentDistributionAmount,\n\t\t\t\t\tstakeSubsidyPeriodLength: systemState.stakeSubsidyPeriodLength,\n\t\t\t\t\tstakeSubsidyDecreaseRate: systemState.stakeSubsidyDecreaseRate,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tasync listDynamicFields(options: SuiClientTypes.ListDynamicFieldsOptions) {\n\t\tconst dynamicFields = await this.#jsonRpcClient.getDynamicFields({\n\t\t\tparentId: options.parentId,\n\t\t\tlimit: options.limit,\n\t\t\tcursor: options.cursor,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: dynamicFields.data.map((dynamicField): SuiClientTypes.DynamicFieldEntry => {\n\t\t\t\tconst isDynamicObject = dynamicField.type === 'DynamicObject';\n\t\t\t\tconst fullType = isDynamicObject\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${dynamicField.name.type}>, 0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${dynamicField.name.type}, ${dynamicField.objectType}>`;\n\n\t\t\t\tconst bcsBytes = fromBase64(dynamicField.bcsName);\n\t\t\t\tconst derivedNameType = isDynamicObject\n\t\t\t\t\t? `0x2::dynamic_object_field::Wrapper<${dynamicField.name.type}>`\n\t\t\t\t\t: dynamicField.name.type;\n\t\t\t\treturn {\n\t\t\t\t\t$kind: isDynamicObject ? 'DynamicObject' : 'DynamicField',\n\t\t\t\t\tfieldId: deriveDynamicFieldID(options.parentId, derivedNameType, bcsBytes),\n\t\t\t\t\ttype: normalizeStructTag(fullType),\n\t\t\t\t\tname: {\n\t\t\t\t\t\ttype: dynamicField.name.type,\n\t\t\t\t\t\tbcs: bcsBytes,\n\t\t\t\t\t},\n\t\t\t\t\tvalueType: dynamicField.objectType,\n\t\t\t\t\tchildId: isDynamicObject ? dynamicField.objectId : undefined,\n\t\t\t\t} as SuiClientTypes.DynamicFieldEntry;\n\t\t\t}),\n\t\t\thasNextPage: dynamicFields.hasNextPage,\n\t\t\tcursor: dynamicFields.nextCursor,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(options: SuiClientTypes.VerifyZkLoginSignatureOptions) {\n\t\tconst result = await this.#jsonRpcClient.verifyZkLoginSignature({\n\t\t\tbytes: options.bytes,\n\t\t\tsignature: options.signature,\n\t\t\tintentScope: options.intentScope,\n\t\t\tauthor: options.address,\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: result.success,\n\t\t\terrors: result.errors,\n\t\t};\n\t}\n\n\tasync defaultNameServiceName(\n\t\toptions: SuiClientTypes.DefaultNameServiceNameOptions,\n\t): Promise<SuiClientTypes.DefaultNameServiceNameResponse> {\n\t\tconst name = (await this.#jsonRpcClient.resolveNameServiceNames(options)).data[0] ?? null;\n\t\treturn {\n\t\t\tdata: {\n\t\t\t\tname,\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin() {\n\t\treturn coreClientResolveTransactionPlugin;\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst resolvedPackageId = (await this.mvr.resolvePackage({ package: options.packageId }))\n\t\t\t.package;\n\t\tconst result = await this.#jsonRpcClient.getNormalizedMoveFunction({\n\t\t\tpackage: resolvedPackageId,\n\t\t\tmodule: options.moduleName,\n\t\t\tfunction: options.name,\n\t\t});\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: normalizeSuiAddress(resolvedPackageId),\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: options.name,\n\t\t\t\tvisibility: parseVisibility(result.visibility),\n\t\t\t\tisEntry: result.isEntry,\n\t\t\t\ttypeParameters: result.typeParameters.map((abilities) => ({\n\t\t\t\t\tisPhantom: false,\n\t\t\t\t\tconstraints: parseAbilities(abilities),\n\t\t\t\t})),\n\t\t\t\tparameters: result.parameters.map((param) => parseNormalizedSuiMoveType(param)),\n\t\t\t\treturns: result.return.map((ret) => parseNormalizedSuiMoveType(ret)),\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getChainIdentifier(\n\t\t_options?: SuiClientTypes.GetChainIdentifierOptions,\n\t): Promise<SuiClientTypes.GetChainIdentifierResponse> {\n\t\treturn this.cache.read(['chainIdentifier'], async () => {\n\t\t\tconst checkpoint = await this.#jsonRpcClient.getCheckpoint({ id: '0' });\n\t\t\treturn {\n\t\t\t\tchainIdentifier: checkpoint.digest,\n\t\t\t};\n\t\t});\n\t}\n}\n\nfunction serializeObjectToBcs(object: SuiObjectData): Uint8Array | undefined {\n\tif (object.bcs?.dataType !== 'moveObject') {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\t// Normalize the type string to ensure consistent address formatting (0x2 vs 0x00...02)\n\t\tconst typeStr = normalizeStructTag(object.bcs.type);\n\t\tlet moveObjectType: InferBcsInput<typeof bcs.MoveObjectType>;\n\n\t\t// Normalize constants for comparison\n\t\tconst normalizedSuiFramework = normalizeSuiAddress(SUI_FRAMEWORK_ADDRESS);\n\t\tconst gasCoinType = normalizeStructTag(\n\t\t\t`${SUI_FRAMEWORK_ADDRESS}::coin::Coin<${SUI_FRAMEWORK_ADDRESS}::sui::SUI>`,\n\t\t);\n\t\tconst stakedSuiType = normalizeStructTag(`${SUI_SYSTEM_ADDRESS}::staking_pool::StakedSui`);\n\t\tconst coinPrefix = `${normalizedSuiFramework}::coin::Coin<`;\n\n\t\tif (typeStr === gasCoinType) {\n\t\t\tmoveObjectType = { GasCoin: null };\n\t\t} else if (typeStr === stakedSuiType) {\n\t\t\tmoveObjectType = { StakedSui: null };\n\t\t} else if (typeStr.startsWith(coinPrefix)) {\n\t\t\tconst innerTypeMatch = typeStr.match(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t`${normalizedSuiFramework.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}::coin::Coin<(.+)>$`,\n\t\t\t\t),\n\t\t\t);\n\t\t\tif (innerTypeMatch) {\n\t\t\t\tconst innerTypeTag = TypeTagSerializer.parseFromStr(innerTypeMatch[1], true);\n\t\t\t\tmoveObjectType = { Coin: innerTypeTag };\n\t\t\t} else {\n\t\t\t\tthrow new Error('Failed to parse Coin type');\n\t\t\t}\n\t\t} else {\n\t\t\tconst typeTag = TypeTagSerializer.parseFromStr(typeStr, true);\n\t\t\tif (typeof typeTag !== 'object' || !('struct' in typeTag)) {\n\t\t\t\tthrow new Error('Expected struct type tag');\n\t\t\t}\n\t\t\tmoveObjectType = { Other: typeTag.struct };\n\t\t}\n\n\t\tconst contents = fromBase64(object.bcs.bcsBytes);\n\t\tconst owner = convertOwnerToBcs(object.owner!);\n\n\t\treturn bcs.Object.serialize({\n\t\t\tdata: {\n\t\t\t\tMove: {\n\t\t\t\t\ttype: moveObjectType,\n\t\t\t\t\thasPublicTransfer: object.bcs.hasPublicTransfer,\n\t\t\t\t\tversion: object.bcs.version,\n\t\t\t\t\tcontents,\n\t\t\t\t},\n\t\t\t},\n\t\t\towner,\n\t\t\tpreviousTransaction: object.previousTransaction!,\n\t\t\tstorageRebate: object.storageRebate!,\n\t\t}).toBytes();\n\t} catch {\n\t\t// If serialization fails, return undefined\n\t\treturn undefined;\n\t}\n}\n\nfunction parseObject<Include extends SuiClientTypes.ObjectInclude = {}>(\n\tobject: SuiObjectData,\n\tinclude?: Include,\n): SuiClientTypes.Object<Include> {\n\tconst bcsContent =\n\t\tobject.bcs?.dataType === 'moveObject' ? fromBase64(object.bcs.bcsBytes) : undefined;\n\n\tconst objectBcs = include?.objectBcs ? serializeObjectToBcs(object) : undefined;\n\n\t// Package objects have type \"package\" which is not a struct tag, so don't normalize it\n\tconst type =\n\t\tobject.type && object.type.includes('::')\n\t\t\t? normalizeStructTag(object.type)\n\t\t\t: (object.type ?? '');\n\n\tconst jsonContent =\n\t\tinclude?.json && object.content?.dataType === 'moveObject'\n\t\t\t? (object.content.fields as Record<string, unknown>)\n\t\t\t: include?.json\n\t\t\t\t? null\n\t\t\t\t: undefined;\n\n\tconst displayData = include?.display\n\t\t? object.display?.data != null\n\t\t\t? { output: object.display.data as Record<string, unknown>, errors: null }\n\t\t\t: null\n\t\t: undefined;\n\n\treturn {\n\t\tobjectId: object.objectId,\n\t\tversion: object.version,\n\t\tdigest: object.digest,\n\t\ttype,\n\t\tcontent: (include?.content\n\t\t\t? bcsContent\n\t\t\t: undefined) as SuiClientTypes.Object<Include>['content'],\n\t\towner: parseOwner(object.owner!),\n\t\tpreviousTransaction: (include?.previousTransaction\n\t\t\t? (object.previousTransaction ?? undefined)\n\t\t\t: undefined) as SuiClientTypes.Object<Include>['previousTransaction'],\n\t\tobjectBcs: objectBcs as SuiClientTypes.Object<Include>['objectBcs'],\n\t\tjson: jsonContent as SuiClientTypes.Object<Include>['json'],\n\t\tdisplay: displayData as SuiClientTypes.Object<Include>['display'],\n\t};\n}\n\nfunction parseOwner(owner: ObjectOwner): SuiClientTypes.ObjectOwner {\n\tif (owner === 'Immutable') {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\n\tif ('ConsensusAddressOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\tConsensusAddressOwner: {\n\t\t\t\towner: owner.ConsensusAddressOwner.owner,\n\t\t\t\tstartVersion: owner.ConsensusAddressOwner.start_version,\n\t\t\t},\n\t\t};\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'AddressOwner',\n\t\t\tAddressOwner: owner.AddressOwner,\n\t\t};\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.ObjectOwner,\n\t\t};\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.Shared.initial_shared_version,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction convertOwnerToBcs(owner: ObjectOwner) {\n\tif (owner === 'Immutable') {\n\t\treturn { Immutable: null };\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn { AddressOwner: owner.AddressOwner };\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn { ObjectOwner: owner.ObjectOwner };\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn {\n\t\t\tShared: { initialSharedVersion: owner.Shared.initial_shared_version },\n\t\t};\n\t}\n\n\tif (typeof owner === 'object' && owner !== null && 'ConsensusAddressOwner' in owner) {\n\t\treturn {\n\t\t\tConsensusAddressOwner: {\n\t\t\t\tstartVersion: owner.ConsensusAddressOwner.start_version,\n\t\t\t\towner: owner.ConsensusAddressOwner.owner,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction parseOwnerAddress(owner: ObjectOwner): string | null {\n\tif (owner === 'Immutable') {\n\t\treturn null;\n\t}\n\n\tif ('ConsensusAddressOwner' in owner) {\n\t\treturn owner.ConsensusAddressOwner.owner;\n\t}\n\n\tif ('AddressOwner' in owner) {\n\t\treturn owner.AddressOwner;\n\t}\n\n\tif ('ObjectOwner' in owner) {\n\t\treturn owner.ObjectOwner;\n\t}\n\n\tif ('Shared' in owner) {\n\t\treturn null;\n\t}\n\n\tthrow new Error(`Unknown owner type: ${JSON.stringify(owner)}`);\n}\n\nfunction parseTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(\n\ttransaction: SuiTransactionBlockResponse,\n\tinclude?: Include,\n): SuiClientTypes.TransactionResult<Include> {\n\tconst objectTypes: Record<string, string> = {};\n\n\tif (include?.objectTypes) {\n\t\ttransaction.objectChanges?.forEach((change) => {\n\t\t\tif (change.type !== 'published') {\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t}\n\t\t});\n\t}\n\n\tlet transactionData: SuiClientTypes.TransactionData | undefined;\n\tlet signatures: string[] = [];\n\tlet bcsBytes: Uint8Array | undefined;\n\n\tif (transaction.rawTransaction) {\n\t\tconst parsedTx = bcs.SenderSignedData.parse(fromBase64(transaction.rawTransaction))[0];\n\t\tsignatures = parsedTx.txSignatures;\n\n\t\tif (include?.transaction || include?.bcs) {\n\t\t\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\n\t\t\tif (include?.bcs) {\n\t\t\t\tbcsBytes = bytes;\n\t\t\t}\n\n\t\t\tif (include?.transaction) {\n\t\t\t\tconst data = TransactionDataBuilder.restore({\n\t\t\t\t\tversion: 2,\n\t\t\t\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\t\t\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\t\t\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\t\t\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\t\t\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t\t\t\t});\n\t\t\t\ttransactionData = { ...data };\n\t\t\t}\n\t\t}\n\t}\n\n\t// Get status from JSON-RPC response\n\tconst status: SuiClientTypes.ExecutionStatus = transaction.effects?.status\n\t\t? parseJsonRpcExecutionStatus(transaction.effects.status, transaction.effects.abortError)\n\t\t: {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\t$kind: 'Unknown',\n\t\t\t\t\tmessage: 'Unknown',\n\t\t\t\t\tUnknown: null,\n\t\t\t\t},\n\t\t\t};\n\n\tconst effectsBytes = transaction.rawEffects ? new Uint8Array(transaction.rawEffects) : null;\n\n\tconst result: SuiClientTypes.Transaction<Include> = {\n\t\tdigest: transaction.digest,\n\t\tepoch: transaction.effects?.executedEpoch ?? null,\n\t\tstatus,\n\t\teffects: (include?.effects && effectsBytes\n\t\t\t? parseTransactionEffectsBcs(effectsBytes)\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['effects'],\n\t\tobjectTypes: (include?.objectTypes\n\t\t\t? objectTypes\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['objectTypes'],\n\t\ttransaction: transactionData as SuiClientTypes.Transaction<Include>['transaction'],\n\t\tbcs: bcsBytes as SuiClientTypes.Transaction<Include>['bcs'],\n\t\tsignatures,\n\t\tbalanceChanges: (include?.balanceChanges\n\t\t\t? (transaction.balanceChanges?.map((change) => ({\n\t\t\t\t\tcoinType: normalizeStructTag(change.coinType),\n\t\t\t\t\taddress: parseOwnerAddress(change.owner)!,\n\t\t\t\t\tamount: change.amount,\n\t\t\t\t})) ?? [])\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['balanceChanges'],\n\t\tevents: (include?.events\n\t\t\t? (transaction.events?.map((event) => ({\n\t\t\t\t\tpackageId: event.packageId,\n\t\t\t\t\tmodule: event.transactionModule,\n\t\t\t\t\tsender: event.sender,\n\t\t\t\t\teventType: event.type,\n\t\t\t\t\tbcs: 'bcs' in event ? fromBase64(event.bcs) : new Uint8Array(),\n\t\t\t\t\tjson: (event.parsedJson as Record<string, unknown>) ?? null,\n\t\t\t\t})) ?? [])\n\t\t\t: undefined) as SuiClientTypes.Transaction<Include>['events'],\n\t};\n\n\treturn status.success\n\t\t? {\n\t\t\t\t$kind: 'Transaction',\n\t\t\t\tTransaction: result,\n\t\t\t}\n\t\t: {\n\t\t\t\t$kind: 'FailedTransaction',\n\t\t\t\tFailedTransaction: result,\n\t\t\t};\n}\n\nfunction parseTransactionEffectsJson({\n\tbytes,\n\teffects,\n\tobjectChanges,\n}: {\n\tbytes?: Uint8Array;\n\teffects: TransactionEffects;\n\tobjectChanges: SuiObjectChange[] | null;\n}): {\n\teffects: SuiClientTypes.TransactionEffects;\n\tobjectTypes: Record<string, string>;\n} {\n\tconst changedObjects: SuiClientTypes.ChangedObject[] = [];\n\tconst unchangedConsensusObjects: SuiClientTypes.UnchangedConsensusObject[] = [];\n\tconst objectTypes: Record<string, string> = {};\n\n\tobjectChanges?.forEach((change) => {\n\t\tswitch (change.type) {\n\t\t\tcase 'published':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.packageId,\n\t\t\t\t\tinputState: 'DoesNotExist',\n\t\t\t\t\tinputVersion: null,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'PackageWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: null,\n\t\t\t\t\tidOperation: 'Created',\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase 'transferred':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: change.digest,\n\t\t\t\t\tinputOwner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.recipient),\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'mutated':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.previousVersion,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: parseOwner(change.owner),\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.owner),\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'deleted':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: effects.deleted?.find((d) => d.objectId === change.objectId)?.digest ?? null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'DoesNotExist',\n\t\t\t\t\toutputVersion: null,\n\t\t\t\t\toutputDigest: null,\n\t\t\t\t\toutputOwner: null,\n\t\t\t\t\tidOperation: 'Deleted',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'wrapped':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'Exists',\n\t\t\t\t\tinputVersion: change.version,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: {\n\t\t\t\t\t\t$kind: 'AddressOwner' as const,\n\t\t\t\t\t\tAddressOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest:\n\t\t\t\t\t\teffects.wrapped?.find((w) => w.objectId === change.objectId)?.digest ?? null,\n\t\t\t\t\toutputOwner: {\n\t\t\t\t\t\t$kind: 'ObjectOwner' as const,\n\t\t\t\t\t\tObjectOwner: change.sender,\n\t\t\t\t\t},\n\t\t\t\t\tidOperation: 'None',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t\tcase 'created':\n\t\t\t\tchangedObjects.push({\n\t\t\t\t\tobjectId: change.objectId,\n\t\t\t\t\tinputState: 'DoesNotExist',\n\t\t\t\t\tinputVersion: null,\n\t\t\t\t\tinputDigest: null,\n\t\t\t\t\tinputOwner: null,\n\t\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\t\toutputVersion: change.version,\n\t\t\t\t\toutputDigest: change.digest,\n\t\t\t\t\toutputOwner: parseOwner(change.owner),\n\t\t\t\t\tidOperation: 'Created',\n\t\t\t\t});\n\t\t\t\tobjectTypes[change.objectId] = normalizeStructTag(change.objectType);\n\t\t\t\tbreak;\n\t\t}\n\t});\n\n\treturn {\n\t\tobjectTypes,\n\t\teffects: {\n\t\t\tbcs: bytes ?? null,\n\t\t\tversion: 2,\n\t\t\tstatus: parseJsonRpcExecutionStatus(effects.status, effects.abortError),\n\t\t\tgasUsed: effects.gasUsed,\n\t\t\ttransactionDigest: effects.transactionDigest,\n\t\t\tgasObject: {\n\t\t\t\tobjectId: effects.gasObject?.reference.objectId,\n\t\t\t\tinputState: 'Exists',\n\t\t\t\tinputVersion: null,\n\t\t\t\tinputDigest: null,\n\t\t\t\tinputOwner: null,\n\t\t\t\toutputState: 'ObjectWrite',\n\t\t\t\toutputVersion: effects.gasObject.reference.version,\n\t\t\t\toutputDigest: effects.gasObject.reference.digest,\n\t\t\t\toutputOwner: parseOwner(effects.gasObject.owner),\n\t\t\t\tidOperation: 'None',\n\t\t\t},\n\t\t\teventsDigest: effects.eventsDigest ?? null,\n\t\t\tdependencies: effects.dependencies ?? [],\n\t\t\tlamportVersion: effects.gasObject.reference.version,\n\t\t\tchangedObjects,\n\t\t\tunchangedConsensusObjects,\n\t\t\tauxiliaryDataDigest: null,\n\t\t},\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(type: SuiMoveNormalizedType): SuiClientTypes.OpenSignature {\n\tif (typeof type !== 'string') {\n\t\tif ('Reference' in type) {\n\t\t\treturn {\n\t\t\t\treference: 'immutable',\n\t\t\t\tbody: parseNormalizedSuiMoveTypeBody(type.Reference),\n\t\t\t};\n\t\t}\n\n\t\tif ('MutableReference' in type) {\n\t\t\treturn {\n\t\t\t\treference: 'mutable',\n\t\t\t\tbody: parseNormalizedSuiMoveTypeBody(type.MutableReference),\n\t\t\t};\n\t\t}\n\t}\n\n\treturn {\n\t\treference: null,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: SuiMoveNormalizedType,\n): SuiClientTypes.OpenSignatureBody {\n\tswitch (type) {\n\t\tcase 'Address':\n\t\t\treturn { $kind: 'address' };\n\t\tcase 'Bool':\n\t\t\treturn { $kind: 'bool' };\n\t\tcase 'U8':\n\t\t\treturn { $kind: 'u8' };\n\t\tcase 'U16':\n\t\t\treturn { $kind: 'u16' };\n\t\tcase 'U32':\n\t\t\treturn { $kind: 'u32' };\n\t\tcase 'U64':\n\t\t\treturn { $kind: 'u64' };\n\t\tcase 'U128':\n\t\t\treturn { $kind: 'u128' };\n\t\tcase 'U256':\n\t\t\treturn { $kind: 'u256' };\n\t}\n\n\tif (typeof type === 'string') {\n\t\tthrow new Error(`Unknown type: ${type}`);\n\t}\n\n\tif ('Vector' in type) {\n\t\treturn {\n\t\t\t$kind: 'vector',\n\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.Vector),\n\t\t};\n\t}\n\n\tif ('Struct' in type) {\n\t\treturn {\n\t\t\t$kind: 'datatype',\n\t\t\tdatatype: {\n\t\t\t\ttypeName: `${normalizeSuiAddress(type.Struct.address)}::${type.Struct.module}::${type.Struct.name}`,\n\t\t\t\ttypeParameters: type.Struct.typeArguments.map((t) => parseNormalizedSuiMoveTypeBody(t)),\n\t\t\t},\n\t\t};\n\t}\n\n\tif ('TypeParameter' in type) {\n\t\treturn {\n\t\t\t$kind: 'typeParameter',\n\t\t\tindex: type.TypeParameter,\n\t\t};\n\t}\n\n\tthrow new Error(`Unknown type: ${JSON.stringify(type)}`);\n}\n\nfunction parseAbilities(abilitySet: SuiMoveAbilitySet): SuiClientTypes.Ability[] {\n\treturn abilitySet.abilities.map((ability) => {\n\t\tswitch (ability) {\n\t\t\tcase 'Copy':\n\t\t\t\treturn 'copy';\n\t\t\tcase 'Drop':\n\t\t\t\treturn 'drop';\n\t\t\tcase 'Store':\n\t\t\t\treturn 'store';\n\t\t\tcase 'Key':\n\t\t\t\treturn 'key';\n\t\t\tdefault:\n\t\t\t\treturn 'unknown';\n\t\t}\n\t});\n}\n\nfunction parseVisibility(visibility: SuiMoveVisibility): SuiClientTypes.Visibility {\n\tswitch (visibility) {\n\t\tcase 'Public':\n\t\t\treturn 'public';\n\t\tcase 'Private':\n\t\t\treturn 'private';\n\t\tcase 'Friend':\n\t\t\treturn 'friend';\n\t\tdefault:\n\t\t\treturn 'unknown';\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,MAAM,UAAU;AAEhB,SAAS,4BACR,QACA,YACiC;AACjC,KAAI,OAAO,WAAW,UACrB,QAAO;EAAE,SAAS;EAAM,OAAO;EAAM;CAGtC,MAAM,aAAa,OAAO,SAAS;AAEnC,KAAI,YAAY;EACf,MAAM,eAAe,WAAW,MAAM,mBAAmB;EACzD,MAAM,UAAU,eAAe,SAAS,aAAa,IAAI,GAAG,GAAG;EAE/D,MAAM,mBAAmB,WAAW,MAAM,uBAAuB;EAC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C7F,gBAAgB,KAAK,OAAO,cAAc,KAAK,MAAM,+BAA+B,EAAE,CAAC;GACvF;EACD;AAGF,KAAI,mBAAmB,KACtB,QAAO;EACN,OAAO;EACP,OAAO,KAAK;EACZ;AAGF,OAAM,IAAI,MAAM,iBAAiB,KAAK,UAAU,KAAK,GAAG;;AAGzD,SAAS,eAAe,YAAyD;AAChF,QAAO,WAAW,UAAU,KAAK,YAAY;AAC5C,UAAQ,SAAR;GACC,KAAK,OACJ,QAAO;GACR,KAAK,OACJ,QAAO;GACR,KAAK,QACJ,QAAO;GACR,KAAK,MACJ,QAAO;GACR,QACC,QAAO;;GAER;;AAGH,SAAS,gBAAgB,YAA0D;AAClF,SAAQ,YAAR;EACC,KAAK,SACJ,QAAO;EACR,KAAK,UACJ,QAAO;EACR,KAAK,SACJ,QAAO;EACR,QACC,QAAO"}
|
|
@@ -8,7 +8,7 @@ import { createPure } from "./pure.mjs";
|
|
|
8
8
|
import { SignatureWithBytes, Signer } from "../cryptography/keypair.mjs";
|
|
9
9
|
import "../cryptography/index.mjs";
|
|
10
10
|
import { ClientWithCoreApi } from "../client/core.mjs";
|
|
11
|
-
import * as
|
|
11
|
+
import * as _mysten_bcs810 from "@mysten/bcs";
|
|
12
12
|
import { SerializedBcs } from "@mysten/bcs";
|
|
13
13
|
import { InferInput } from "valibot";
|
|
14
14
|
|
|
@@ -77,7 +77,7 @@ declare class Transaction {
|
|
|
77
77
|
getData(): {
|
|
78
78
|
version: 2;
|
|
79
79
|
sender?: string | null | undefined;
|
|
80
|
-
expiration?:
|
|
80
|
+
expiration?: _mysten_bcs810.EnumOutputShapeWithKeys<{
|
|
81
81
|
None: true;
|
|
82
82
|
Epoch: string | number;
|
|
83
83
|
ValidDuring: {
|
|
@@ -88,7 +88,7 @@ declare class Transaction {
|
|
|
88
88
|
chain: string;
|
|
89
89
|
nonce: number;
|
|
90
90
|
};
|
|
91
|
-
}, "
|
|
91
|
+
}, "None" | "Epoch" | "ValidDuring"> | null | undefined;
|
|
92
92
|
gasData: {
|
|
93
93
|
budget: string | number | null;
|
|
94
94
|
price: string | number | null;
|
|
@@ -99,8 +99,8 @@ declare class Transaction {
|
|
|
99
99
|
digest: string;
|
|
100
100
|
}[] | null;
|
|
101
101
|
};
|
|
102
|
-
inputs:
|
|
103
|
-
Object:
|
|
102
|
+
inputs: _mysten_bcs810.EnumOutputShapeWithKeys<{
|
|
103
|
+
Object: _mysten_bcs810.EnumOutputShapeWithKeys<{
|
|
104
104
|
ImmOrOwnedObject: {
|
|
105
105
|
objectId: string;
|
|
106
106
|
version: string | number;
|
|
@@ -116,7 +116,7 @@ declare class Transaction {
|
|
|
116
116
|
version: string | number;
|
|
117
117
|
digest: string;
|
|
118
118
|
};
|
|
119
|
-
}, "
|
|
119
|
+
}, "ImmOrOwnedObject" | "SharedObject" | "Receiving">;
|
|
120
120
|
Pure: {
|
|
121
121
|
bytes: string;
|
|
122
122
|
};
|
|
@@ -139,13 +139,13 @@ declare class Transaction {
|
|
|
139
139
|
Balance: string;
|
|
140
140
|
$kind: "Balance";
|
|
141
141
|
};
|
|
142
|
-
withdrawFrom:
|
|
142
|
+
withdrawFrom: _mysten_bcs810.EnumOutputShapeWithKeys<{
|
|
143
143
|
Sender: true;
|
|
144
144
|
Sponsor: true;
|
|
145
145
|
}, "Sender" | "Sponsor">;
|
|
146
146
|
};
|
|
147
|
-
}, "
|
|
148
|
-
commands:
|
|
147
|
+
}, "Pure" | "Object" | "FundsWithdrawal" | "UnresolvedPure" | "UnresolvedObject">[];
|
|
148
|
+
commands: _mysten_bcs810.EnumOutputShapeWithKeys<{
|
|
149
149
|
MoveCall: {
|
|
150
150
|
package: string;
|
|
151
151
|
module: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.d.mts","names":[],"sources":["../../src/transactions/Transaction.ts"],"mappings":";;;;;;;;;;;;;;;KAyCY,yBAAA,GACT,OAAA,CAAQ,UAAA,QAAkB,cAAA;EAAmB,KAAA;EAAgB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,MAAA;IAAQ;EAAA;IAAU,MAAA;IAAkC,IAAA;EAAA;IAChE,KAAA;IACA,KAAA;IACA,IAAA;EAAA;;;;;EAuBD,SAAA,CAAA;EAIM,MAAA,CAAO,OAAA,GAAS,2BAAA,GAAmC,OAAA;;EAmBnD,IAAA,CAAK,OAAA,EAAS,WAAA,GAAc,OAAA,CAAQ,kBAAA;;;;;;;;;;EAe1C,0BAAA,CAA2B,OAAA;IAAW,gBAAA;EAAA;;;;;;;;;;;;EA2BtC,eAAA,CAAA;EArbI;EAscE,KAAA,CAAM,OAAA,GAAS,uBAAA,GAA+B,OAAA,CAAQ,UAAA,CAAW,WAAA;;EASjE,SAAA,CACL,OAAA;IACC,MAAA,GAAS,iBAAA;EAAA,IAER,OAAA;EAsJG,uBAAA,CAAwB,OAAA,EAAS,2BAAA,GAA2B,OAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui-types.d.mts","names":[],"sources":["../../src/utils/sui-types.ts"],"mappings":";;iBAUgB,wBAAA,CAAyB,KAAA,WAAgB,KAAA;AAAA,cAe5C,kBAAA;AAAA,iBACG,iBAAA,CAAkB,KAAA,WAAgB,KAAA;AAAA,iBAIlC,kBAAA,CAAmB,KAAA;AAAA,iBAoDnB,gBAAA,CAAiB,IAAA;AAAA,KASrB,SAAA;EACX,OAAA;EACA,MAAA;EACA,IAAA;EACA,UAAA,YAAsB,SAAA;AAAA;AAAA,iBAwBP,cAAA,CAAe,IAAA,WAAe,SAAA;AAAA,iBAoC9B,kBAAA,CAAmB,IAAA,WAAe,SAAA;;AA7HlD;;;;;AAoDA;;;;;
|
|
1
|
+
{"version":3,"file":"sui-types.d.mts","names":[],"sources":["../../src/utils/sui-types.ts"],"mappings":";;iBAUgB,wBAAA,CAAyB,KAAA,WAAgB,KAAA;AAAA,cAe5C,kBAAA;AAAA,iBACG,iBAAA,CAAkB,KAAA,WAAgB,KAAA;AAAA,iBAIlC,kBAAA,CAAmB,KAAA;AAAA,iBAoDnB,gBAAA,CAAiB,IAAA;AAAA,KASrB,SAAA;EACX,OAAA;EACA,MAAA;EACA,IAAA;EACA,UAAA,YAAsB,SAAA;AAAA;AAAA,iBAwBP,cAAA,CAAe,IAAA,WAAe,SAAA;AAAA,iBAoC9B,kBAAA,CAAmB,IAAA,WAAe,SAAA;;AA7HlD;;;;;AAoDA;;;;;iBA0GgB,mBAAA,CAAoB,KAAA,UAAe,UAAA;AAAA,iBAQnC,oBAAA,CAAqB,KAAA,UAAe,UAAA"}
|
package/dist/utils/sui-types.mjs
CHANGED
|
@@ -86,6 +86,7 @@ function parseStructTag(type) {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
function normalizeStructTag(type) {
|
|
89
|
+
if (typeof type === "string" && type.startsWith("vector<")) throw new Error("normalizeStructTag does not support vector types. Use normalizeTypeTag instead.");
|
|
89
90
|
const { address, module, name, typeParams } = typeof type === "string" ? parseStructTag(type) : type;
|
|
90
91
|
return `${address}::${module}::${name}${typeParams?.length > 0 ? `<${typeParams.map((typeParam) => typeof typeParam === "string" ? typeParam : normalizeStructTag(typeParam)).join(",")}>` : ""}`;
|
|
91
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui-types.mjs","names":[],"sources":["../../src/utils/sui-types.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromBase58, splitGenericParameters } from '@mysten/bcs';\n\nimport { isValidNamedPackage } from './move-registry.js';\n\nconst TX_DIGEST_LENGTH = 32;\n\n/** Returns whether the tx digest is valid based on the serialization format */\nexport function isValidTransactionDigest(value: string): value is string {\n\ttry {\n\t\tconst buffer = fromBase58(value);\n\t\treturn buffer.length === TX_DIGEST_LENGTH;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n// TODO - can we automatically sync this with rust length definition?\n// Source of truth is\n// https://github.com/MystenLabs/sui/blob/acb2b97ae21f47600e05b0d28127d88d0725561d/crates/sui-types/src/base_types.rs#L67\n// which uses the Move account address length\n// https://github.com/move-language/move/blob/67ec40dc50c66c34fd73512fcc412f3b68d67235/language/move-core/types/src/account_address.rs#L23 .\n\nexport const SUI_ADDRESS_LENGTH = 32;\nexport function isValidSuiAddress(value: string): value is string {\n\treturn isHex(value) && getHexByteLength(value) === SUI_ADDRESS_LENGTH;\n}\n\nexport function isValidSuiObjectId(value: string): boolean {\n\treturn isValidSuiAddress(value);\n}\n\nconst MOVE_IDENTIFIER_REGEX = /^[a-zA-Z][a-zA-Z0-9_]*$/;\n\nexport function isValidMoveIdentifier(name: string): boolean {\n\treturn MOVE_IDENTIFIER_REGEX.test(name);\n}\n\nconst PRIMITIVE_TYPE_TAGS = [\n\t'bool',\n\t'u8',\n\t'u16',\n\t'u32',\n\t'u64',\n\t'u128',\n\t'u256',\n\t'address',\n\t'signer',\n];\n\nconst VECTOR_TYPE_REGEX = /^vector<(.+)>$/;\n\nfunction isValidTypeTag(type: string): boolean {\n\tif (PRIMITIVE_TYPE_TAGS.includes(type)) return true;\n\n\tconst vectorMatch = type.match(VECTOR_TYPE_REGEX);\n\tif (vectorMatch) return isValidTypeTag(vectorMatch[1]);\n\n\tif (type.includes('::')) return isValidStructTag(type);\n\n\treturn false;\n}\n\nfunction isValidParsedStructTag(tag: StructTag): boolean {\n\tif (!isValidSuiAddress(tag.address) && !isValidNamedPackage(tag.address)) {\n\t\treturn false;\n\t}\n\n\tif (!isValidMoveIdentifier(tag.module) || !isValidMoveIdentifier(tag.name)) {\n\t\treturn false;\n\t}\n\n\treturn tag.typeParams.every((param) => {\n\t\tif (typeof param === 'string') {\n\t\t\treturn isValidTypeTag(param);\n\t\t}\n\t\treturn isValidParsedStructTag(param);\n\t});\n}\n\nexport function isValidStructTag(type: string): boolean {\n\ttry {\n\t\tconst tag = parseStructTag(type);\n\t\treturn isValidParsedStructTag(tag);\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport type StructTag = {\n\taddress: string;\n\tmodule: string;\n\tname: string;\n\ttypeParams: (string | StructTag)[];\n};\n\nfunction parseTypeTag(type: string): string | StructTag {\n\tif (type.startsWith('vector<')) {\n\t\tif (!type.endsWith('>')) {\n\t\t\tthrow new Error(`Invalid type tag: ${type}`);\n\t\t}\n\t\tconst inner = type.slice(7, -1);\n\t\tif (!inner) {\n\t\t\tthrow new Error(`Invalid type tag: ${type}`);\n\t\t}\n\t\tconst parsed = parseTypeTag(inner);\n\t\tif (typeof parsed === 'string') {\n\t\t\treturn `vector<${parsed}>`;\n\t\t}\n\t\treturn `vector<${normalizeStructTag(parsed)}>`;\n\t}\n\n\tif (!type.includes('::')) return type;\n\n\treturn parseStructTag(type);\n}\n\nexport function parseStructTag(type: string): StructTag {\n\tconst parts = type.split('::');\n\n\tif (parts.length < 3) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst [address, module] = parts;\n\n\tif (!address || !module) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst isMvrPackage = isValidNamedPackage(address);\n\n\tconst rest = type.slice(address.length + module.length + 4);\n\tconst name = rest.includes('<') ? rest.slice(0, rest.indexOf('<')) : rest;\n\n\tif (!name || (rest.includes('<') && !rest.endsWith('>'))) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst typeParams = rest.includes('<')\n\t\t? splitGenericParameters(rest.slice(rest.indexOf('<') + 1, rest.lastIndexOf('>'))).map(\n\t\t\t\t(typeParam) => parseTypeTag(typeParam.trim()),\n\t\t\t)\n\t\t: [];\n\n\treturn {\n\t\taddress: isMvrPackage ? address : normalizeSuiAddress(address),\n\t\tmodule,\n\t\tname,\n\t\ttypeParams,\n\t};\n}\n\nexport function normalizeStructTag(type: string | StructTag): string {\n\tconst { address, module, name, typeParams } =\n\t\ttypeof type === 'string' ? parseStructTag(type) : type;\n\n\tconst formattedTypeParams =\n\t\ttypeParams?.length > 0\n\t\t\t? `<${typeParams\n\t\t\t\t\t.map((typeParam) =>\n\t\t\t\t\t\ttypeof typeParam === 'string' ? typeParam : normalizeStructTag(typeParam),\n\t\t\t\t\t)\n\t\t\t\t\t.join(',')}>`\n\t\t\t: '';\n\n\treturn `${address}::${module}::${name}${formattedTypeParams}`;\n}\n\n/**\n * Perform the following operations:\n * 1. Make the address lower case\n * 2. Prepend `0x` if the string does not start with `0x`.\n * 3. Add more zeros if the length of the address(excluding `0x`) is less than `SUI_ADDRESS_LENGTH`\n *\n * WARNING: if the address value itself starts with `0x`, e.g., `0x0x`, the default behavior\n * is to treat the first `0x` not as part of the address. The default behavior can be overridden by\n * setting `forceAdd0x` to true\n *\n */\nexport function normalizeSuiAddress(value: string, forceAdd0x: boolean = false): string {\n\tlet address = value.toLowerCase();\n\tif (!forceAdd0x && address.startsWith('0x')) {\n\t\taddress = address.slice(2);\n\t}\n\treturn `0x${address.padStart(SUI_ADDRESS_LENGTH * 2, '0')}`;\n}\n\nexport function normalizeSuiObjectId(value: string, forceAdd0x: boolean = false): string {\n\treturn normalizeSuiAddress(value, forceAdd0x);\n}\n\nfunction isHex(value: string): boolean {\n\treturn /^(0x|0X)?[a-fA-F0-9]+$/.test(value) && value.length % 2 === 0;\n}\n\nfunction getHexByteLength(value: string): number {\n\treturn /^(0x|0X)/.test(value) ? (value.length - 2) / 2 : value.length / 2;\n}\n"],"mappings":";;;;AAOA,MAAM,mBAAmB;;AAGzB,SAAgB,yBAAyB,OAAgC;AACxE,KAAI;AAEH,SADe,WAAW,MAAM,CAClB,WAAW;SAClB;AACP,SAAO;;;AAUT,MAAa,qBAAqB;AAClC,SAAgB,kBAAkB,OAAgC;AACjE,QAAO,MAAM,MAAM,IAAI,iBAAiB,MAAM,KAAK;;AAGpD,SAAgB,mBAAmB,OAAwB;AAC1D,QAAO,kBAAkB,MAAM;;AAGhC,MAAM,wBAAwB;AAE9B,SAAgB,sBAAsB,MAAuB;AAC5D,QAAO,sBAAsB,KAAK,KAAK;;AAGxC,MAAM,sBAAsB;CAC3B;CACA;CACA;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I,MAAM,uBAAuB,OAAO;CAG/C,MAAM,CAAC,SAAS,UAAU;AAE1B,KAAI,CAAC,WAAW,CAAC,OAChB,OAAM,IAAI,MAAM,uBAAuB,OAAO;CAG/C,MAAM,eAAe,oBAAoB,QAAQ;CAEjD,MAAM,OAAO,KAAK,MAAM,QAAQ,SAAS,OAAO,SAAS,EAAE;CAC3D,MAAM,OAAO,KAAK,SAAS,IAAI,GAAG,KAAK,MAAM,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG;AAErE,KAAI,CAAC,QAAS,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CACtD,OAAM,IAAI,MAAM,uBAAuB,OAAO;CAG/C,MAAM,aAAa,KAAK,SAAS,IAAI,GAClC,uBAAuB,KAAK,MAAM,KAAK,QAAQ,IAAI,GAAG,GAAG,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAChF,cAAc,aAAa,UAAU,MAAM,CAAC,CAC7C,GACA,EAAE;AAEL,QAAO;EACN,SAAS,eAAe,UAAU,oBAAoB,QAAQ;EAC9D;EACA;EACA;EACA;;AAGF,SAAgB,mBAAmB,MAAkC;
|
|
1
|
+
{"version":3,"file":"sui-types.mjs","names":[],"sources":["../../src/utils/sui-types.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { fromBase58, splitGenericParameters } from '@mysten/bcs';\n\nimport { isValidNamedPackage } from './move-registry.js';\n\nconst TX_DIGEST_LENGTH = 32;\n\n/** Returns whether the tx digest is valid based on the serialization format */\nexport function isValidTransactionDigest(value: string): value is string {\n\ttry {\n\t\tconst buffer = fromBase58(value);\n\t\treturn buffer.length === TX_DIGEST_LENGTH;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n// TODO - can we automatically sync this with rust length definition?\n// Source of truth is\n// https://github.com/MystenLabs/sui/blob/acb2b97ae21f47600e05b0d28127d88d0725561d/crates/sui-types/src/base_types.rs#L67\n// which uses the Move account address length\n// https://github.com/move-language/move/blob/67ec40dc50c66c34fd73512fcc412f3b68d67235/language/move-core/types/src/account_address.rs#L23 .\n\nexport const SUI_ADDRESS_LENGTH = 32;\nexport function isValidSuiAddress(value: string): value is string {\n\treturn isHex(value) && getHexByteLength(value) === SUI_ADDRESS_LENGTH;\n}\n\nexport function isValidSuiObjectId(value: string): boolean {\n\treturn isValidSuiAddress(value);\n}\n\nconst MOVE_IDENTIFIER_REGEX = /^[a-zA-Z][a-zA-Z0-9_]*$/;\n\nexport function isValidMoveIdentifier(name: string): boolean {\n\treturn MOVE_IDENTIFIER_REGEX.test(name);\n}\n\nconst PRIMITIVE_TYPE_TAGS = [\n\t'bool',\n\t'u8',\n\t'u16',\n\t'u32',\n\t'u64',\n\t'u128',\n\t'u256',\n\t'address',\n\t'signer',\n];\n\nconst VECTOR_TYPE_REGEX = /^vector<(.+)>$/;\n\nfunction isValidTypeTag(type: string): boolean {\n\tif (PRIMITIVE_TYPE_TAGS.includes(type)) return true;\n\n\tconst vectorMatch = type.match(VECTOR_TYPE_REGEX);\n\tif (vectorMatch) return isValidTypeTag(vectorMatch[1]);\n\n\tif (type.includes('::')) return isValidStructTag(type);\n\n\treturn false;\n}\n\nfunction isValidParsedStructTag(tag: StructTag): boolean {\n\tif (!isValidSuiAddress(tag.address) && !isValidNamedPackage(tag.address)) {\n\t\treturn false;\n\t}\n\n\tif (!isValidMoveIdentifier(tag.module) || !isValidMoveIdentifier(tag.name)) {\n\t\treturn false;\n\t}\n\n\treturn tag.typeParams.every((param) => {\n\t\tif (typeof param === 'string') {\n\t\t\treturn isValidTypeTag(param);\n\t\t}\n\t\treturn isValidParsedStructTag(param);\n\t});\n}\n\nexport function isValidStructTag(type: string): boolean {\n\ttry {\n\t\tconst tag = parseStructTag(type);\n\t\treturn isValidParsedStructTag(tag);\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport type StructTag = {\n\taddress: string;\n\tmodule: string;\n\tname: string;\n\ttypeParams: (string | StructTag)[];\n};\n\nfunction parseTypeTag(type: string): string | StructTag {\n\tif (type.startsWith('vector<')) {\n\t\tif (!type.endsWith('>')) {\n\t\t\tthrow new Error(`Invalid type tag: ${type}`);\n\t\t}\n\t\tconst inner = type.slice(7, -1);\n\t\tif (!inner) {\n\t\t\tthrow new Error(`Invalid type tag: ${type}`);\n\t\t}\n\t\tconst parsed = parseTypeTag(inner);\n\t\tif (typeof parsed === 'string') {\n\t\t\treturn `vector<${parsed}>`;\n\t\t}\n\t\treturn `vector<${normalizeStructTag(parsed)}>`;\n\t}\n\n\tif (!type.includes('::')) return type;\n\n\treturn parseStructTag(type);\n}\n\nexport function parseStructTag(type: string): StructTag {\n\tconst parts = type.split('::');\n\n\tif (parts.length < 3) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst [address, module] = parts;\n\n\tif (!address || !module) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst isMvrPackage = isValidNamedPackage(address);\n\n\tconst rest = type.slice(address.length + module.length + 4);\n\tconst name = rest.includes('<') ? rest.slice(0, rest.indexOf('<')) : rest;\n\n\tif (!name || (rest.includes('<') && !rest.endsWith('>'))) {\n\t\tthrow new Error(`Invalid struct tag: ${type}`);\n\t}\n\n\tconst typeParams = rest.includes('<')\n\t\t? splitGenericParameters(rest.slice(rest.indexOf('<') + 1, rest.lastIndexOf('>'))).map(\n\t\t\t\t(typeParam) => parseTypeTag(typeParam.trim()),\n\t\t\t)\n\t\t: [];\n\n\treturn {\n\t\taddress: isMvrPackage ? address : normalizeSuiAddress(address),\n\t\tmodule,\n\t\tname,\n\t\ttypeParams,\n\t};\n}\n\nexport function normalizeStructTag(type: string | StructTag): string {\n\tif (typeof type === 'string' && type.startsWith('vector<')) {\n\t\tthrow new Error(\n\t\t\t'normalizeStructTag does not support vector types. Use normalizeTypeTag instead.',\n\t\t);\n\t}\n\n\tconst { address, module, name, typeParams } =\n\t\ttypeof type === 'string' ? parseStructTag(type) : type;\n\n\tconst formattedTypeParams =\n\t\ttypeParams?.length > 0\n\t\t\t? `<${typeParams\n\t\t\t\t\t.map((typeParam) =>\n\t\t\t\t\t\ttypeof typeParam === 'string' ? typeParam : normalizeStructTag(typeParam),\n\t\t\t\t\t)\n\t\t\t\t\t.join(',')}>`\n\t\t\t: '';\n\n\treturn `${address}::${module}::${name}${formattedTypeParams}`;\n}\n\n/**\n * Perform the following operations:\n * 1. Make the address lower case\n * 2. Prepend `0x` if the string does not start with `0x`.\n * 3. Add more zeros if the length of the address(excluding `0x`) is less than `SUI_ADDRESS_LENGTH`\n *\n * WARNING: if the address value itself starts with `0x`, e.g., `0x0x`, the default behavior\n * is to treat the first `0x` not as part of the address. The default behavior can be overridden by\n * setting `forceAdd0x` to true\n *\n */\nexport function normalizeSuiAddress(value: string, forceAdd0x: boolean = false): string {\n\tlet address = value.toLowerCase();\n\tif (!forceAdd0x && address.startsWith('0x')) {\n\t\taddress = address.slice(2);\n\t}\n\treturn `0x${address.padStart(SUI_ADDRESS_LENGTH * 2, '0')}`;\n}\n\nexport function normalizeSuiObjectId(value: string, forceAdd0x: boolean = false): string {\n\treturn normalizeSuiAddress(value, forceAdd0x);\n}\n\nfunction isHex(value: string): boolean {\n\treturn /^(0x|0X)?[a-fA-F0-9]+$/.test(value) && value.length % 2 === 0;\n}\n\nfunction getHexByteLength(value: string): number {\n\treturn /^(0x|0X)/.test(value) ? (value.length - 2) / 2 : value.length / 2;\n}\n"],"mappings":";;;;AAOA,MAAM,mBAAmB;;AAGzB,SAAgB,yBAAyB,OAAgC;AACxE,KAAI;AAEH,SADe,WAAW,MAAM,CAClB,WAAW;SAClB;AACP,SAAO;;;AAUT,MAAa,qBAAqB;AAClC,SAAgB,kBAAkB,OAAgC;AACjE,QAAO,MAAM,MAAM,IAAI,iBAAiB,MAAM,KAAK;;AAGpD,SAAgB,mBAAmB,OAAwB;AAC1D,QAAO,kBAAkB,MAAM;;AAGhC,MAAM,wBAAwB;AAE9B,SAAgB,sBAAsB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WAAW,KAAK,CAC1C,WAAU,QAAQ,MAAM,EAAE;AAE3B,QAAO,KAAK,QAAQ,SAAS,qBAAqB,GAAG,IAAI;;AAG1D,SAAgB,qBAAqB,OAAe,aAAsB,OAAe;AACxF,QAAO,oBAAoB,OAAO,WAAW;;AAG9C,SAAS,MAAM,OAAwB;AACtC,QAAO,yBAAyB,KAAK,MAAM,IAAI,MAAM,SAAS,MAAM;;AAGrE,SAAS,iBAAiB,OAAuB;AAChD,QAAO,WAAW,KAAK,MAAM,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS"}
|
package/dist/version.mjs
CHANGED
package/dist/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '2.
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// This file is generated by genversion.mjs. Do not edit it directly.\n\nexport const PACKAGE_VERSION = '2.14.1';\nexport const TARGETED_RPC_VERSION = '1.70.0';\n"],"mappings":";AAKA,MAAa,kBAAkB;AAC/B,MAAa,uBAAuB"}
|
package/dist/zklogin/bcs.d.mts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _mysten_bcs817 from "@mysten/bcs";
|
|
2
2
|
import { InferBcsInput } from "@mysten/bcs";
|
|
3
3
|
|
|
4
4
|
//#region src/zklogin/bcs.d.ts
|
|
5
|
-
declare const zkLoginSignature:
|
|
6
|
-
inputs:
|
|
7
|
-
proofPoints:
|
|
8
|
-
a:
|
|
5
|
+
declare const zkLoginSignature: _mysten_bcs817.BcsStruct<{
|
|
6
|
+
inputs: _mysten_bcs817.BcsStruct<{
|
|
7
|
+
proofPoints: _mysten_bcs817.BcsStruct<{
|
|
8
|
+
a: _mysten_bcs817.BcsType<string[], Iterable<string> & {
|
|
9
9
|
length: number;
|
|
10
10
|
}, string>;
|
|
11
|
-
b:
|
|
11
|
+
b: _mysten_bcs817.BcsType<string[][], Iterable<Iterable<string> & {
|
|
12
12
|
length: number;
|
|
13
13
|
}> & {
|
|
14
14
|
length: number;
|
|
15
15
|
}, string>;
|
|
16
|
-
c:
|
|
16
|
+
c: _mysten_bcs817.BcsType<string[], Iterable<string> & {
|
|
17
17
|
length: number;
|
|
18
18
|
}, string>;
|
|
19
19
|
}, string>;
|
|
20
|
-
issBase64Details:
|
|
21
|
-
value:
|
|
22
|
-
indexMod4:
|
|
20
|
+
issBase64Details: _mysten_bcs817.BcsStruct<{
|
|
21
|
+
value: _mysten_bcs817.BcsType<string, string, "string">;
|
|
22
|
+
indexMod4: _mysten_bcs817.BcsType<number, number, "u8">;
|
|
23
23
|
}, string>;
|
|
24
|
-
headerBase64:
|
|
25
|
-
addressSeed:
|
|
24
|
+
headerBase64: _mysten_bcs817.BcsType<string, string, "string">;
|
|
25
|
+
addressSeed: _mysten_bcs817.BcsType<string, string, "string">;
|
|
26
26
|
}, string>;
|
|
27
|
-
maxEpoch:
|
|
28
|
-
userSignature:
|
|
27
|
+
maxEpoch: _mysten_bcs817.BcsType<string, string | number | bigint, "u64">;
|
|
28
|
+
userSignature: _mysten_bcs817.BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
|
|
29
29
|
}, string>;
|
|
30
30
|
type ZkLoginSignature = InferBcsInput<typeof zkLoginSignature>;
|
|
31
31
|
type ZkLoginSignatureInputs = ZkLoginSignature['inputs'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcs.d.mts","names":[],"sources":["../../src/zklogin/bcs.ts"],"mappings":";;;;cAMa,gBAAA,
|
|
1
|
+
{"version":3,"file":"bcs.d.mts","names":[],"sources":["../../src/zklogin/bcs.ts"],"mappings":";;;;cAMa,gBAAA,iBAAgB,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAkBjB,gBAAA,GAAmB,aAAA,QAAqB,gBAAA;AAAA,KACxC,sBAAA,GAAyB,gBAAA"}
|
package/package.json
CHANGED