@mysten/sui 2.26.1 → 2.26.2

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/bcs/bcs.d.mts +6 -6
  3. package/dist/bcs/index.d.mts +36 -36
  4. package/dist/bcs/pure.d.mts.map +1 -1
  5. package/dist/bcs/pure.mjs.map +1 -1
  6. package/dist/client/types.d.mts.map +1 -1
  7. package/dist/cryptography/signature-scheme.d.mts.map +1 -1
  8. package/dist/cryptography/signature-scheme.mjs.map +1 -1
  9. package/dist/cryptography/signature.d.mts +8 -8
  10. package/dist/graphql/client.d.mts.map +1 -1
  11. package/dist/graphql/client.mjs.map +1 -1
  12. package/dist/graphql/core.d.mts.map +1 -1
  13. package/dist/graphql/core.mjs.map +1 -1
  14. package/dist/grpc/client.d.mts.map +1 -1
  15. package/dist/grpc/client.mjs.map +1 -1
  16. package/dist/grpc/core.d.mts.map +1 -1
  17. package/dist/grpc/core.mjs.map +1 -1
  18. package/dist/grpc/proto/sui/forking/v1alpha/forking_service.client.d.mts +4 -4
  19. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  20. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  21. package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
  22. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
  23. package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
  24. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +4 -4
  25. package/dist/jsonRpc/core.d.mts.map +1 -1
  26. package/dist/jsonRpc/core.mjs.map +1 -1
  27. package/dist/transactions/Transaction.d.mts +9 -9
  28. package/dist/transactions/Transaction.d.mts.map +1 -1
  29. package/dist/transactions/Transaction.mjs.map +1 -1
  30. package/dist/transactions/executor/parallel.d.mts.map +1 -1
  31. package/dist/transactions/executor/parallel.mjs.map +1 -1
  32. package/dist/transactions/executor/serial.d.mts.map +1 -1
  33. package/dist/transactions/executor/serial.mjs.map +1 -1
  34. package/dist/version.mjs +1 -1
  35. package/dist/version.mjs.map +1 -1
  36. package/dist/zklogin/bcs.d.mts +14 -14
  37. package/docs/clients/grpc.md +1 -1
  38. package/docs/clients/index.md +1 -1
  39. package/docs/cryptography/index.md +1 -1
  40. package/docs/cryptography/keypairs.md +1 -1
  41. package/docs/cryptography/signers/index.md +1 -1
  42. package/docs/cryptography/signers/webcrypto.md +1 -1
  43. package/docs/llms-index.md +11 -11
  44. package/docs/migrations/0.38.md +1 -1
  45. package/docs/migrations/sui-2.0/dapp-kit.md +2 -3
  46. package/docs/migrations/sui-2.0/kiosk.md +1 -1
  47. package/docs/migrations/sui-2.0/sui.md +1 -1
  48. package/docs/transactions/signing-and-execution.md +14 -25
  49. package/docs/utils/derived_objects.md +1 -1
  50. package/docs/utils/index.md +1 -1
  51. package/package.json +25 -25
  52. package/src/bcs/pure.ts +1 -10
  53. package/src/bcs/types.ts +1 -3
  54. package/src/client/types.ts +1 -2
  55. package/src/cryptography/signature-scheme.ts +1 -6
  56. package/src/graphql/client.ts +1 -4
  57. package/src/graphql/core.ts +32 -36
  58. package/src/grpc/client.ts +1 -2
  59. package/src/grpc/core.ts +28 -32
  60. package/src/jsonRpc/core.ts +23 -27
  61. package/src/transactions/Transaction.ts +1 -2
  62. package/src/transactions/executor/parallel.ts +1 -2
  63. package/src/transactions/executor/serial.ts +1 -2
  64. package/src/version.ts +1 -1
@@ -5,9 +5,8 @@
5
5
  This guide helps you migrate from the original `@mysten/dapp-kit` (legacy) to the new
6
6
  `@mysten/dapp-kit-react` package.
7
7
 
8
- > **Note:** The legacy `@mysten/dapp-kit` package will continue to work with the latest SDK, but it only
9
- > supports JSON-RPC and will not receive further updates. We recommend migrating to
10
- > `@mysten/dapp-kit-react` for new features and gRPC support.
8
+ > **Note:** The legacy `@mysten/dapp-kit` package only supports the deprecated JSON RPC API and will not
9
+ > receive further updates. Migrate to `@mysten/dapp-kit-react` for gRPC support and new features.
11
10
 
12
11
  ## Overview
13
12
 
@@ -1,6 +1,6 @@
1
1
  # @mysten/kiosk
2
2
 
3
- > Migrate @mysten/kiosk to 2.0 with client extension pattern and KioskTransaction
3
+ > >- Migrate @mysten/kiosk to 2.0 with client extension pattern and KioskTransaction
4
4
 
5
5
  This package now exports a client extension that integrates with Sui clients.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # @mysten/sui
2
2
 
3
- > Migrate @mysten/sui from 1.x to 2.0 with gRPC clients, Core API, and BCS changes
3
+ > >- Migrate @mysten/sui from 1.x to 2.0 with gRPC clients, Core API, and BCS changes
4
4
 
5
5
  ## Removal of `SuiClient` exports
6
6
 
@@ -75,29 +75,24 @@ Available keypair types:
75
75
 
76
76
  ## With dapp-kit (React frontend)
77
77
 
78
- In a React app, use the `useSignAndExecuteTransaction` hook. The user's connected wallet signs and
79
- submits the transaction:
78
+ In a React app, use the `useDAppKit` hook. The user's connected wallet signs and submits the
79
+ transaction:
80
80
 
81
81
  ```tsx
82
82
 
83
83
  function SendButton() {
84
- const { mutate: signAndExecute } = useSignAndExecuteTransaction();
84
+ const dAppKit = useDAppKit();
85
85
 
86
- function handleClick() {
86
+ async function handleClick() {
87
87
  const tx = new Transaction();
88
88
  // ... build your transaction ...
89
89
 
90
- signAndExecute(
91
- { transaction: tx },
92
- {
93
- onSuccess: (result) => {
94
- console.log('Transaction digest:', result.digest);
95
- },
96
- onError: (error) => {
97
- console.error('Transaction failed:', error);
98
- },
99
- },
100
- );
90
+ const result = await dAppKit.signAndExecuteTransaction({ transaction: tx });
91
+ if (result.FailedTransaction) {
92
+ throw new Error(`Transaction failed: ${result.FailedTransaction.status.error?.message}`);
93
+ }
94
+
95
+ console.log('Transaction digest:', result.Transaction.digest);
101
96
  }
102
97
 
103
98
  return <button onClick={handleClick}>Send</button>;
@@ -127,20 +122,14 @@ const { signature } = await keypair.signTransaction(bytes);
127
122
  ```tsx
128
123
 
129
124
  function SignButton() {
130
- const { mutate: signTransaction } = useSignTransaction();
125
+ const dAppKit = useDAppKit();
131
126
 
132
- function handleClick() {
127
+ async function handleClick() {
133
128
  const tx = new Transaction();
134
129
  // ... build your transaction ...
135
130
 
136
- signTransaction(
137
- { transaction: tx },
138
- {
139
- onSuccess: ({ bytes, signature }) => {
140
- // Send bytes + signature to your backend, sponsor, etc.
141
- },
142
- },
143
- );
131
+ const { bytes, signature } = await dAppKit.signTransaction({ transaction: tx });
132
+ // Send bytes + signature to your backend, sponsor, etc.
144
133
  }
145
134
 
146
135
  return <button onClick={handleClick}>Sign</button>;
@@ -1,6 +1,6 @@
1
1
  # Derived Objects
2
2
 
3
- > Compute derived object IDs from parent objects for deterministic offline derivation.
3
+ > >- Compute derived object IDs from parent objects for deterministic offline derivation.
4
4
 
5
5
  Derived objects enable deterministic IDs for objects, enabling offline derivation of object IDs.
6
6
  [Click here to read more.](https://docs.sui.io/concepts/sui-move-concepts/derived-objects)
@@ -1,6 +1,6 @@
1
1
  # The `@mysten/sui/utils` package
2
2
 
3
- > Utility functions for addresses, coins, and common operations in the Sui TypeScript SDK.
3
+ > >- Utility functions for addresses, coins, and common operations in the Sui TypeScript SDK.
4
4
 
5
5
  This package contains some utilities that simplify common operations when working with the Sui
6
6
  TypeScript SDK.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mysten Labs <build@mystenlabs.com>",
4
4
  "description": "Sui TypeScript API",
5
5
  "homepage": "https://sdk.mystenlabs.com",
6
- "version": "2.26.1",
6
+ "version": "2.26.2",
7
7
  "license": "Apache-2.0",
8
8
  "sideEffects": false,
9
9
  "files": [
@@ -131,45 +131,45 @@
131
131
  "access": "public"
132
132
  },
133
133
  "devDependencies": {
134
- "@0no-co/graphqlsp": "^1.17.0",
135
- "@graphql-codegen/add": "^7.0.1",
136
- "@graphql-codegen/cli": "^7.1.2",
137
- "@graphql-codegen/typed-document-node": "^7.0.3",
138
- "@graphql-codegen/typescript": "6.0.2",
139
- "@graphql-codegen/typescript-document-nodes": "6.0.1",
140
- "@graphql-codegen/typescript-operations": "^6.0.3",
134
+ "@0no-co/graphqlsp": "^1.17.3",
135
+ "@graphql-codegen/add": "^7.1.0",
136
+ "@graphql-codegen/cli": "^7.2.0",
137
+ "@graphql-codegen/typed-document-node": "^7.1.0",
138
+ "@graphql-codegen/typescript": "6.1.0",
139
+ "@graphql-codegen/typescript-document-nodes": "6.1.0",
140
+ "@graphql-codegen/typescript-operations": "^6.1.6",
141
141
  "@grpc/grpc-js": ">=1.14.4",
142
- "@parcel/watcher": "^2.5.4",
142
+ "@parcel/watcher": "^2.6.0",
143
143
  "@protobuf-ts/grpc-transport": "^2.11.1",
144
- "@types/node": "^25.9.3",
144
+ "@types/node": "^26.2.0",
145
145
  "@types/tmp": "^0.2.6",
146
146
  "cross-env": "^10.1.0",
147
147
  "graphql-config": "^5.1.5",
148
- "msw": "^2.14.6",
148
+ "msw": "^2.15.0",
149
149
  "tmp": "^0.2.7",
150
150
  "ts-retry-promise": "^0.8.1",
151
- "typescript": "^6.0.3",
152
- "vite": "^8.0.16",
151
+ "typescript": "^7.0.2",
152
+ "vite": "^8.2.1",
153
153
  "vite-tsconfig-paths": "^6.0.4",
154
- "vitest": "^4.1.8",
155
- "wait-on": "^9.0.10"
154
+ "vitest": "^4.1.10",
155
+ "wait-on": "^9.1.0"
156
156
  },
157
157
  "dependencies": {
158
158
  "@graphql-typed-document-node/core": "^3.2.0",
159
- "@noble/curves": "^2.2.0",
160
- "@noble/hashes": "^2.2.0",
159
+ "@noble/curves": "^2.3.0",
160
+ "@noble/hashes": "^2.3.0",
161
161
  "@protobuf-ts/grpcweb-transport": "^2.11.1",
162
162
  "@protobuf-ts/runtime": "^2.11.1",
163
163
  "@protobuf-ts/runtime-rpc": "^2.11.1",
164
- "@scure/base": "^2.2.0",
165
- "@scure/bip32": "^2.2.0",
166
- "@scure/bip39": "^2.2.0",
167
- "gql.tada": "^1.10.1",
168
- "graphql": "^16.14.2",
169
- "poseidon-lite": "0.2.1",
164
+ "@scure/base": "^2.3.0",
165
+ "@scure/bip32": "^2.3.0",
166
+ "@scure/bip39": "^2.3.0",
167
+ "gql.tada": "^1.11.3",
168
+ "graphql": "^17.0.2",
169
+ "poseidon-lite": "0.3.0",
170
170
  "valibot": "^1.4.2",
171
- "@mysten/bcs": "^2.1.0",
172
- "@mysten/utils": "^0.4.0"
171
+ "@mysten/bcs": "^2.1.1",
172
+ "@mysten/utils": "^0.4.1"
173
173
  },
174
174
  "scripts": {
175
175
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
package/src/bcs/pure.ts CHANGED
@@ -7,16 +7,7 @@ import type { BcsType } from '@mysten/bcs';
7
7
  import { Address } from './bcs.js';
8
8
 
9
9
  export type BasePureType =
10
- | 'u8'
11
- | 'u16'
12
- | 'u32'
13
- | 'u64'
14
- | 'u128'
15
- | 'u256'
16
- | 'bool'
17
- | 'id'
18
- | 'string'
19
- | 'address';
10
+ 'u8' | 'u16' | 'u32' | 'u64' | 'u128' | 'u256' | 'bool' | 'id' | 'string' | 'address';
20
11
 
21
12
  interface PureShapeByType {
22
13
  u8: number;
package/src/bcs/types.ts CHANGED
@@ -132,6 +132,4 @@ type ValidDuring = {
132
132
  * Indications the expiration time for a transaction.
133
133
  */
134
134
  export type TransactionExpiration =
135
- | { None: null }
136
- | { Epoch: number }
137
- | { ValidDuring: ValidDuring };
135
+ { None: null } | { Epoch: number } | { ValidDuring: ValidDuring };
@@ -411,8 +411,7 @@ export namespace SuiClientTypes {
411
411
  }
412
412
 
413
413
  export type WaitForTransactionOptions<Include extends TransactionInclude = {}> =
414
- | WaitForTransactionByDigest<Include>
415
- | WaitForTransactionByResult<Include>;
414
+ WaitForTransactionByDigest<Include> | WaitForTransactionByResult<Include>;
416
415
 
417
416
  export interface WaitForTransactionByDigest<
418
417
  Include extends TransactionInclude = {},
@@ -27,11 +27,6 @@ export const SIGNATURE_FLAG_TO_SCHEME = {
27
27
  } as const;
28
28
 
29
29
  export type SignatureScheme =
30
- | 'ED25519'
31
- | 'Secp256k1'
32
- | 'Secp256r1'
33
- | 'MultiSig'
34
- | 'ZkLogin'
35
- | 'Passkey';
30
+ 'ED25519' | 'Secp256k1' | 'Secp256r1' | 'MultiSig' | 'ZkLogin' | 'Passkey';
36
31
 
37
32
  export type SignatureFlag = keyof typeof SIGNATURE_FLAG_TO_SCHEME;
@@ -15,10 +15,7 @@ import { normalizeStructTag } from '../utils/sui-types.js';
15
15
  import { deriveDynamicFieldID } from '../utils/dynamic-fields.js';
16
16
  import type { TransactionPlugin } from '../transactions/index.js';
17
17
 
18
- export type GraphQLDocument<
19
- Result = Record<string, unknown>,
20
- Variables = Record<string, unknown>,
21
- > =
18
+ export type GraphQLDocument<Result = Record<string, unknown>, Variables = Record<string, unknown>> =
22
19
  | string
23
20
  | DocumentNode
24
21
  | TypedDocumentString<Result, Variables>
@@ -215,32 +215,30 @@ export class GraphQLCoreClient extends CoreClient {
215
215
  );
216
216
 
217
217
  return {
218
- objects: objects.nodes.map(
219
- (obj): SuiClientTypes.Object<Include> => ({
220
- objectId: obj.address,
221
- version: obj.version?.toString()!,
222
- digest: obj.digest!,
223
- owner: mapOwner(obj.owner!),
224
- type: obj.contents?.type?.repr!,
225
- content: (obj.contents?.bcs
226
- ? fromBase64(obj.contents.bcs)
227
- : undefined) as SuiClientTypes.Object<Include>['content'],
228
- previousTransaction: (obj.previousTransaction?.digest ??
229
- undefined) as SuiClientTypes.Object<Include>['previousTransaction'],
230
- objectBcs: (obj.objectBcs
231
- ? fromBase64(obj.objectBcs)
232
- : undefined) as SuiClientTypes.Object<Include>['objectBcs'],
233
- json: (options.include?.json
234
- ? obj.contents?.json
235
- ? (obj.contents.json as Record<string, unknown>)
236
- : null
237
- : undefined) as SuiClientTypes.Object<Include>['json'],
238
- display: mapDisplay(
239
- options.include?.display,
240
- obj.contents?.display,
241
- ) as SuiClientTypes.Object<Include>['display'],
242
- }),
243
- ),
218
+ objects: objects.nodes.map((obj): SuiClientTypes.Object<Include> => ({
219
+ objectId: obj.address,
220
+ version: obj.version?.toString()!,
221
+ digest: obj.digest!,
222
+ owner: mapOwner(obj.owner!),
223
+ type: obj.contents?.type?.repr!,
224
+ content: (obj.contents?.bcs
225
+ ? fromBase64(obj.contents.bcs)
226
+ : undefined) as SuiClientTypes.Object<Include>['content'],
227
+ previousTransaction: (obj.previousTransaction?.digest ??
228
+ undefined) as SuiClientTypes.Object<Include>['previousTransaction'],
229
+ objectBcs: (obj.objectBcs
230
+ ? fromBase64(obj.objectBcs)
231
+ : undefined) as SuiClientTypes.Object<Include>['objectBcs'],
232
+ json: (options.include?.json
233
+ ? obj.contents?.json
234
+ ? (obj.contents.json as Record<string, unknown>)
235
+ : null
236
+ : undefined) as SuiClientTypes.Object<Include>['json'],
237
+ display: mapDisplay(
238
+ options.include?.display,
239
+ obj.contents?.display,
240
+ ) as SuiClientTypes.Object<Include>['display'],
241
+ })),
244
242
  hasNextPage: objects.pageInfo.hasNextPage,
245
243
  cursor: objects.pageInfo.endCursor ?? null,
246
244
  };
@@ -266,16 +264,14 @@ export class GraphQLCoreClient extends CoreClient {
266
264
  return {
267
265
  cursor: coins.pageInfo.endCursor ?? null,
268
266
  hasNextPage: coins.pageInfo.hasNextPage,
269
- objects: coins.nodes.map(
270
- (coin): SuiClientTypes.Coin => ({
271
- objectId: coin.address,
272
- version: coin.version?.toString()!,
273
- digest: coin.digest!,
274
- owner: mapOwner(coin.owner!),
275
- type: coin.contents?.type?.repr!,
276
- balance: (coin.contents?.json as { balance: string })?.balance,
277
- }),
278
- ),
267
+ objects: coins.nodes.map((coin): SuiClientTypes.Coin => ({
268
+ objectId: coin.address,
269
+ version: coin.version?.toString()!,
270
+ digest: coin.digest!,
271
+ owner: mapOwner(coin.owner!),
272
+ type: coin.contents?.type?.repr!,
273
+ balance: (coin.contents?.json as { balance: string })?.balance,
274
+ })),
279
275
  };
280
276
  }
281
277
 
@@ -108,8 +108,7 @@ export interface GrpcWaitForTransactionByResult<
108
108
  }
109
109
 
110
110
  export type GrpcWaitForTransactionOptions<Include extends GrpcTransactionInclude = {}> =
111
- | GrpcWaitForTransactionByDigest<Include>
112
- | GrpcWaitForTransactionByResult<Include>;
111
+ GrpcWaitForTransactionByDigest<Include> | GrpcWaitForTransactionByResult<Include>;
113
112
 
114
113
  export interface GrpcExecuteTransactionOptions<
115
114
  Include extends GrpcTransactionInclude = {},
package/src/grpc/core.ts CHANGED
@@ -240,28 +240,26 @@ export class GrpcCoreClient extends CoreClient {
240
240
  { abort: options.signal },
241
241
  );
242
242
 
243
- const objects = response.response.objects.map(
244
- (object): SuiClientTypes.Object<Include> => ({
245
- objectId: object.objectId!,
246
- version: object.version?.toString()!,
247
- digest: object.digest!,
248
- content: object.contents?.value as SuiClientTypes.Object<Include>['content'],
249
- owner: mapOwner(object.owner)!,
250
- type: object.objectType!,
251
- previousTransaction: (object.previousTransaction ??
252
- undefined) as SuiClientTypes.Object<Include>['previousTransaction'],
253
- objectBcs: object.bcs?.value as SuiClientTypes.Object<Include>['objectBcs'],
254
- json: (options.include?.json
255
- ? object.json
256
- ? (Value.toJson(object.json) as Record<string, unknown>)
257
- : null
258
- : undefined) as SuiClientTypes.Object<Include>['json'],
259
- display: mapDisplayProto(
260
- options.include?.display,
261
- object.display,
262
- ) as SuiClientTypes.Object<Include>['display'],
263
- }),
264
- );
243
+ const objects = response.response.objects.map((object): SuiClientTypes.Object<Include> => ({
244
+ objectId: object.objectId!,
245
+ version: object.version?.toString()!,
246
+ digest: object.digest!,
247
+ content: object.contents?.value as SuiClientTypes.Object<Include>['content'],
248
+ owner: mapOwner(object.owner)!,
249
+ type: object.objectType!,
250
+ previousTransaction: (object.previousTransaction ??
251
+ undefined) as SuiClientTypes.Object<Include>['previousTransaction'],
252
+ objectBcs: object.bcs?.value as SuiClientTypes.Object<Include>['objectBcs'],
253
+ json: (options.include?.json
254
+ ? object.json
255
+ ? (Value.toJson(object.json) as Record<string, unknown>)
256
+ : null
257
+ : undefined) as SuiClientTypes.Object<Include>['json'],
258
+ display: mapDisplayProto(
259
+ options.include?.display,
260
+ object.display,
261
+ ) as SuiClientTypes.Object<Include>['display'],
262
+ }));
265
263
 
266
264
  return {
267
265
  objects,
@@ -289,16 +287,14 @@ export class GrpcCoreClient extends CoreClient {
289
287
  );
290
288
 
291
289
  return {
292
- objects: response.response.objects.map(
293
- (object): SuiClientTypes.Coin => ({
294
- objectId: object.objectId!,
295
- version: object.version?.toString()!,
296
- digest: object.digest!,
297
- owner: mapOwner(object.owner)!,
298
- type: object.objectType!,
299
- balance: object.balance?.toString()!,
300
- }),
301
- ),
290
+ objects: response.response.objects.map((object): SuiClientTypes.Coin => ({
291
+ objectId: object.objectId!,
292
+ version: object.version?.toString()!,
293
+ digest: object.digest!,
294
+ owner: mapOwner(object.owner)!,
295
+ type: object.objectType!,
296
+ balance: object.balance?.toString()!,
297
+ })),
302
298
  cursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,
303
299
  hasNextPage: response.response.nextPageToken !== undefined,
304
300
  };
@@ -293,19 +293,17 @@ export class JSONRpcCoreClient extends CoreClient {
293
293
  });
294
294
 
295
295
  return {
296
- objects: coins.data.map(
297
- (coin): SuiClientTypes.Coin => ({
298
- objectId: coin.coinObjectId,
299
- version: coin.version,
300
- digest: coin.digest,
301
- balance: coin.balance,
302
- type: normalizeStructTag(`0x2::coin::Coin<${coin.coinType}>`),
303
- owner: {
304
- $kind: 'AddressOwner' as const,
305
- AddressOwner: options.owner,
306
- },
307
- }),
308
- ),
296
+ objects: coins.data.map((coin): SuiClientTypes.Coin => ({
297
+ objectId: coin.coinObjectId,
298
+ version: coin.version,
299
+ digest: coin.digest,
300
+ balance: coin.balance,
301
+ type: normalizeStructTag(`0x2::coin::Coin<${coin.coinType}>`),
302
+ owner: {
303
+ $kind: 'AddressOwner' as const,
304
+ AddressOwner: options.owner,
305
+ },
306
+ })),
309
307
  hasNextPage: coins.hasNextPage,
310
308
  cursor: coins.nextCursor ?? null,
311
309
  };
@@ -815,20 +813,18 @@ export class JSONRpcCoreClient extends CoreClient {
815
813
  });
816
814
 
817
815
  return {
818
- events: page.data.map(
819
- (event): SuiClientTypes.EventEntry => ({
820
- packageId: normalizeSuiAddress(event.packageId),
821
- module: event.transactionModule,
822
- sender: normalizeSuiAddress(event.sender),
823
- eventType: normalizeStructTag(event.type),
824
- bcs: event.bcsEncoding === 'base58' ? fromBase58(event.bcs) : fromBase64(event.bcs),
825
- json: (event.parsedJson as Record<string, unknown>) ?? null,
826
- // queryEvents responses do not include checkpoint information
827
- checkpoint: null,
828
- transactionDigest: event.id.txDigest,
829
- eventIndex: Number(event.id.eventSeq),
830
- }),
831
- ),
816
+ events: page.data.map((event): SuiClientTypes.EventEntry => ({
817
+ packageId: normalizeSuiAddress(event.packageId),
818
+ module: event.transactionModule,
819
+ sender: normalizeSuiAddress(event.sender),
820
+ eventType: normalizeStructTag(event.type),
821
+ bcs: event.bcsEncoding === 'base58' ? fromBase58(event.bcs) : fromBase64(event.bcs),
822
+ json: (event.parsedJson as Record<string, unknown>) ?? null,
823
+ // queryEvents responses do not include checkpoint information
824
+ checkpoint: null,
825
+ transactionDigest: event.id.txDigest,
826
+ eventIndex: Number(event.id.eventSeq),
827
+ })),
832
828
  hasNextPage: page.hasNextPage,
833
829
  startCursor: page.data.length ? JSON.stringify(page.data[0].id) : null,
834
830
  endCursor:
@@ -50,8 +50,7 @@ export type TransactionResult = Extract<Argument, { Result: unknown }> &
50
50
  Extract<Argument, { NestedResult: unknown }>[];
51
51
 
52
52
  export type TransactionResultArgument =
53
- | Extract<Argument, { Result: unknown }>
54
- | readonly Extract<Argument, { NestedResult: unknown }>[];
53
+ Extract<Argument, { Result: unknown }> | readonly Extract<Argument, { NestedResult: unknown }>[];
55
54
 
56
55
  export type AsyncTransactionThunk<
57
56
  T extends TransactionResultArgument | void = TransactionResultArgument | void,
@@ -51,8 +51,7 @@ export interface ParallelTransactionExecutorAddressBalanceOptions extends Parall
51
51
 
52
52
  /** Options for ParallelTransactionExecutor - discriminated union based on gasMode */
53
53
  export type ParallelTransactionExecutorOptions =
54
- | ParallelTransactionExecutorCoinOptions
55
- | ParallelTransactionExecutorAddressBalanceOptions;
54
+ ParallelTransactionExecutorCoinOptions | ParallelTransactionExecutorAddressBalanceOptions;
56
55
 
57
56
  interface CoinWithBalance {
58
57
  id: string;
@@ -27,8 +27,7 @@ export interface SerialTransactionExecutorAddressBalanceOptions extends SerialTr
27
27
  }
28
28
 
29
29
  export type SerialTransactionExecutorOptions =
30
- | SerialTransactionExecutorCoinOptions
31
- | SerialTransactionExecutorAddressBalanceOptions;
30
+ SerialTransactionExecutorCoinOptions | SerialTransactionExecutorAddressBalanceOptions;
32
31
 
33
32
  export class SerialTransactionExecutor {
34
33
  #queue = new SerialQueue();
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  // This file is generated by genversion.mjs. Do not edit it directly.
5
5
 
6
- export const PACKAGE_VERSION = '2.26.1';
6
+ export const PACKAGE_VERSION = '2.26.2';