@mysten/sui 2.8.0 → 2.9.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.
@@ -1,31 +1,31 @@
1
- import * as _mysten_bcs817 from "@mysten/bcs";
1
+ import * as _mysten_bcs810 from "@mysten/bcs";
2
2
  import { InferBcsInput } from "@mysten/bcs";
3
3
 
4
4
  //#region src/zklogin/bcs.d.ts
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> & {
5
+ declare const zkLoginSignature: _mysten_bcs810.BcsStruct<{
6
+ inputs: _mysten_bcs810.BcsStruct<{
7
+ proofPoints: _mysten_bcs810.BcsStruct<{
8
+ a: _mysten_bcs810.BcsType<string[], Iterable<string> & {
9
9
  length: number;
10
10
  }, string>;
11
- b: _mysten_bcs817.BcsType<string[][], Iterable<Iterable<string> & {
11
+ b: _mysten_bcs810.BcsType<string[][], Iterable<Iterable<string> & {
12
12
  length: number;
13
13
  }> & {
14
14
  length: number;
15
15
  }, string>;
16
- c: _mysten_bcs817.BcsType<string[], Iterable<string> & {
16
+ c: _mysten_bcs810.BcsType<string[], Iterable<string> & {
17
17
  length: number;
18
18
  }, string>;
19
19
  }, string>;
20
- issBase64Details: _mysten_bcs817.BcsStruct<{
21
- value: _mysten_bcs817.BcsType<string, string, "string">;
22
- indexMod4: _mysten_bcs817.BcsType<number, number, "u8">;
20
+ issBase64Details: _mysten_bcs810.BcsStruct<{
21
+ value: _mysten_bcs810.BcsType<string, string, "string">;
22
+ indexMod4: _mysten_bcs810.BcsType<number, number, "u8">;
23
23
  }, string>;
24
- headerBase64: _mysten_bcs817.BcsType<string, string, "string">;
25
- addressSeed: _mysten_bcs817.BcsType<string, string, "string">;
24
+ headerBase64: _mysten_bcs810.BcsType<string, string, "string">;
25
+ addressSeed: _mysten_bcs810.BcsType<string, string, "string">;
26
26
  }, string>;
27
- maxEpoch: _mysten_bcs817.BcsType<string, string | number | bigint, "u64">;
28
- userSignature: _mysten_bcs817.BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
27
+ maxEpoch: _mysten_bcs810.BcsType<string, string | number | bigint, "u64">;
28
+ userSignature: _mysten_bcs810.BcsType<Uint8Array<ArrayBufferLike>, Iterable<number>, "vector<u8>">;
29
29
  }, string>;
30
30
  type ZkLoginSignature = InferBcsInput<typeof zkLoginSignature>;
31
31
  type ZkLoginSignatureInputs = ZkLoginSignature['inputs'];
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.8.0",
6
+ "version": "2.9.1",
7
7
  "license": "Apache-2.0",
8
8
  "sideEffects": false,
9
9
  "files": [
@@ -194,6 +194,10 @@ async function setExpiration(
194
194
  client: ClientWithCoreApi,
195
195
  existingSystemState: SystemStateData | null,
196
196
  ) {
197
+ if (transactionData.expiration || hasVersionedInputs(transactionData)) {
198
+ return;
199
+ }
200
+
197
201
  const [systemState, { chainIdentifier }] = await Promise.all([
198
202
  existingSystemState ?? client.core.getCurrentSystemState().then((r) => r.systemState),
199
203
  client.core.getChainIdentifier(),
@@ -213,6 +217,17 @@ async function setExpiration(
213
217
  };
214
218
  }
215
219
 
220
+ function hasVersionedInputs(transactionData: TransactionDataBuilder): boolean {
221
+ if (transactionData.gasData.payment?.length) {
222
+ return true;
223
+ }
224
+
225
+ return transactionData.inputs.some(
226
+ (input) =>
227
+ input.Object?.ImmOrOwnedObject || (input.UnresolvedObject && input.UnresolvedObject.version),
228
+ );
229
+ }
230
+
216
231
  async function resolveObjectReferences(
217
232
  transactionData: TransactionDataBuilder,
218
233
  client: ClientWithCoreApi,
@@ -18,5 +18,7 @@ export const SUI_SYSTEM_STATE_OBJECT_ID =
18
18
  '0x0000000000000000000000000000000000000000000000000000000000000005';
19
19
  export const SUI_RANDOM_OBJECT_ID =
20
20
  '0x0000000000000000000000000000000000000000000000000000000000000008';
21
+ export const SUI_COIN_REGISTRY_OBJECT_ID =
22
+ '0x000000000000000000000000000000000000000000000000000000000000000c';
21
23
  export const SUI_DENY_LIST_OBJECT_ID =
22
24
  '0x0000000000000000000000000000000000000000000000000000000000000403';
@@ -28,6 +28,7 @@ export {
28
28
  SUI_TYPE_ARG,
29
29
  SUI_SYSTEM_STATE_OBJECT_ID,
30
30
  SUI_RANDOM_OBJECT_ID,
31
+ SUI_COIN_REGISTRY_OBJECT_ID,
31
32
  SUI_DENY_LIST_OBJECT_ID,
32
33
  } from './constants.js';
33
34
 
package/src/version.ts CHANGED
@@ -3,5 +3,5 @@
3
3
 
4
4
  // This file is generated by genversion.mjs. Do not edit it directly.
5
5
 
6
- export const PACKAGE_VERSION = '2.8.0';
6
+ export const PACKAGE_VERSION = '2.9.1';
7
7
  export const TARGETED_RPC_VERSION = '1.69.0';