@0xobelisk/sui-client 0.5.11 → 0.5.13

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.
@@ -13,26 +13,25 @@ export declare class SuiTxBlock {
13
13
  inputs: ({
14
14
  index: number;
15
15
  kind: "Input";
16
- type?: "object" | undefined;
17
16
  value?: any;
17
+ type?: "object" | undefined;
18
18
  } | {
19
- type: "pure";
20
19
  index: number;
21
20
  kind: "Input";
21
+ type: "pure";
22
22
  value?: any;
23
23
  })[];
24
24
  transactions: ({
25
- typeArguments: string[];
26
25
  kind: "MoveCall";
27
26
  arguments: ({
28
27
  index: number;
29
28
  kind: "Input";
30
- type?: "object" | undefined;
31
29
  value?: any;
30
+ type?: "object" | undefined;
32
31
  } | {
33
- type: "pure";
34
32
  index: number;
35
33
  kind: "Input";
34
+ type: "pure";
36
35
  value?: any;
37
36
  } | {
38
37
  kind: "GasCoin";
@@ -45,16 +44,17 @@ export declare class SuiTxBlock {
45
44
  kind: "NestedResult";
46
45
  })[];
47
46
  target: `${string}::${string}::${string}`;
47
+ typeArguments: string[];
48
48
  } | {
49
49
  address: {
50
50
  index: number;
51
51
  kind: "Input";
52
- type?: "object" | undefined;
53
52
  value?: any;
53
+ type?: "object" | undefined;
54
54
  } | {
55
- type: "pure";
56
55
  index: number;
57
56
  kind: "Input";
57
+ type: "pure";
58
58
  value?: any;
59
59
  } | {
60
60
  kind: "GasCoin";
@@ -70,12 +70,12 @@ export declare class SuiTxBlock {
70
70
  objects: ({
71
71
  index: number;
72
72
  kind: "Input";
73
- type?: "object" | undefined;
74
73
  value?: any;
74
+ type?: "object" | undefined;
75
75
  } | {
76
- type: "pure";
77
76
  index: number;
78
77
  kind: "Input";
78
+ type: "pure";
79
79
  value?: any;
80
80
  } | {
81
81
  kind: "GasCoin";
@@ -92,12 +92,12 @@ export declare class SuiTxBlock {
92
92
  coin: {
93
93
  index: number;
94
94
  kind: "Input";
95
- type?: "object" | undefined;
96
95
  value?: any;
96
+ type?: "object" | undefined;
97
97
  } | {
98
- type: "pure";
99
98
  index: number;
100
99
  kind: "Input";
100
+ type: "pure";
101
101
  value?: any;
102
102
  } | {
103
103
  kind: "GasCoin";
@@ -112,12 +112,12 @@ export declare class SuiTxBlock {
112
112
  amounts: ({
113
113
  index: number;
114
114
  kind: "Input";
115
- type?: "object" | undefined;
116
115
  value?: any;
116
+ type?: "object" | undefined;
117
117
  } | {
118
- type: "pure";
119
118
  index: number;
120
119
  kind: "Input";
120
+ type: "pure";
121
121
  value?: any;
122
122
  } | {
123
123
  kind: "GasCoin";
@@ -134,12 +134,12 @@ export declare class SuiTxBlock {
134
134
  destination: {
135
135
  index: number;
136
136
  kind: "Input";
137
- type?: "object" | undefined;
138
137
  value?: any;
138
+ type?: "object" | undefined;
139
139
  } | {
140
- type: "pure";
141
140
  index: number;
142
141
  kind: "Input";
142
+ type: "pure";
143
143
  value?: any;
144
144
  } | {
145
145
  kind: "GasCoin";
@@ -154,12 +154,12 @@ export declare class SuiTxBlock {
154
154
  sources: ({
155
155
  index: number;
156
156
  kind: "Input";
157
- type?: "object" | undefined;
158
157
  value?: any;
158
+ type?: "object" | undefined;
159
159
  } | {
160
- type: "pure";
161
160
  index: number;
162
161
  kind: "Input";
162
+ type: "pure";
163
163
  value?: any;
164
164
  } | {
165
165
  kind: "GasCoin";
@@ -172,21 +172,23 @@ export declare class SuiTxBlock {
172
172
  kind: "NestedResult";
173
173
  })[];
174
174
  } | {
175
- type: {
176
- Some: import("@mysten/sui.js/bcs").TypeTag;
177
- } | {
178
- None: true | null;
179
- };
180
- kind: "MakeMoveVec";
181
- objects: ({
175
+ kind: "Publish";
176
+ modules: number[][];
177
+ dependencies: string[];
178
+ } | {
179
+ kind: "Upgrade";
180
+ modules: number[][];
181
+ dependencies: string[];
182
+ packageId: string;
183
+ ticket: {
182
184
  index: number;
183
185
  kind: "Input";
184
- type?: "object" | undefined;
185
186
  value?: any;
187
+ type?: "object" | undefined;
186
188
  } | {
187
- type: "pure";
188
189
  index: number;
189
190
  kind: "Input";
191
+ type: "pure";
190
192
  value?: any;
191
193
  } | {
192
194
  kind: "GasCoin";
@@ -197,25 +199,23 @@ export declare class SuiTxBlock {
197
199
  index: number;
198
200
  resultIndex: number;
199
201
  kind: "NestedResult";
200
- })[];
201
- } | {
202
- kind: "Publish";
203
- modules: number[][];
204
- dependencies: string[];
202
+ };
205
203
  } | {
206
- kind: "Upgrade";
207
- modules: number[][];
208
- dependencies: string[];
209
- packageId: string;
210
- ticket: {
204
+ kind: "MakeMoveVec";
205
+ type: {
206
+ Some: import("@mysten/sui.js/bcs").TypeTag;
207
+ } | {
208
+ None: true | null;
209
+ };
210
+ objects: ({
211
211
  index: number;
212
212
  kind: "Input";
213
- type?: "object" | undefined;
214
213
  value?: any;
214
+ type?: "object" | undefined;
215
215
  } | {
216
- type: "pure";
217
216
  index: number;
218
217
  kind: "Input";
218
+ type: "pure";
219
219
  value?: any;
220
220
  } | {
221
221
  kind: "GasCoin";
@@ -226,15 +226,15 @@ export declare class SuiTxBlock {
226
226
  index: number;
227
227
  resultIndex: number;
228
228
  kind: "NestedResult";
229
- };
229
+ })[];
230
230
  })[];
231
231
  gasConfig: {
232
- owner?: string | undefined;
233
232
  payment?: {
234
233
  digest: string;
235
234
  objectId: string;
236
235
  version: string | number | bigint;
237
236
  }[] | undefined;
237
+ owner?: string | undefined;
238
238
  price?: string | number | bigint | undefined;
239
239
  budget?: string | number | bigint | undefined;
240
240
  };
@@ -248,23 +248,23 @@ export declare class SuiTxBlock {
248
248
  address(value: string): {
249
249
  index: number;
250
250
  kind: "Input";
251
- type?: "object" | undefined;
252
251
  value?: any;
252
+ type?: "object" | undefined;
253
253
  } | {
254
- type: "pure";
255
254
  index: number;
256
255
  kind: "Input";
256
+ type: "pure";
257
257
  value?: any;
258
258
  };
259
259
  pure(value: unknown, type?: string): {
260
260
  index: number;
261
261
  kind: "Input";
262
- type?: "object" | undefined;
263
262
  value?: any;
263
+ type?: "object" | undefined;
264
264
  } | {
265
- type: "pure";
266
265
  index: number;
267
266
  kind: "Input";
267
+ type: "pure";
268
268
  value?: any;
269
269
  };
270
270
  object(value: string | ObjectCallArg): TransactionObjectArgument;
@@ -30,9 +30,9 @@ export declare function isMoveVecArg(arg: SuiTxArg | SuiVecTxArg): arg is SuiVec
30
30
  * @returns The converted array of TransactionArgument.
31
31
  */
32
32
  export declare function convertArgs(txBlock: TransactionBlock, args: (SuiTxArg | SuiVecTxArg)[]): ({
33
- type: "pure";
34
33
  index: number;
35
34
  kind: "Input";
35
+ type: "pure";
36
36
  value?: any;
37
37
  } | TransactionObjectArgument | import("@mysten/bcs").SerializedBcs<unknown, unknown>)[];
38
38
  /**
@@ -43,9 +43,9 @@ export declare function convertArgs(txBlock: TransactionBlock, args: (SuiTxArg |
43
43
  * @returns The converted TransactionArgument.
44
44
  */
45
45
  export declare function convertAddressArg(txBlock: TransactionBlock, arg: SuiAddressArg): TransactionObjectArgument | {
46
- type: "pure";
47
46
  index: number;
48
47
  kind: "Input";
48
+ type: "pure";
49
49
  value?: any;
50
50
  } | import("@mysten/bcs").SerializedBcs<unknown, unknown>;
51
51
  /**
@@ -1,10 +1,12 @@
1
- import { ObjectContentFields } from '@mysten/sui.js/src/types';
1
+ import type { Infer } from 'superstruct';
2
2
  import type { SerializedBcs } from '@mysten/bcs';
3
3
  import type { TransactionArgument } from '@mysten/sui.js/transactions';
4
4
  import type { TransactionBlock, TransactionObjectArgument, TransactionResult } from '@mysten/sui.js/transactions';
5
5
  import type { SuiObjectRef, SuiMoveNormalizedModules, DevInspectResults, SuiTransactionBlockResponse, DisplayFieldsResponse, MoveStruct } from '@mysten/sui.js/client';
6
6
  import type { SharedObjectRef, ObjectArg } from '@mysten/sui.js/bcs';
7
7
  import { SuiMoveMoudleFuncType } from '../libs/suiContractFactory/types';
8
+ export declare const ObjectContentFields: import("superstruct").Struct<Record<string, any>, null>;
9
+ export type ObjectContentFields = Infer<typeof ObjectContentFields>;
8
10
  export type ObeliskObjectData = {
9
11
  objectId: string;
10
12
  objectType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xobelisk/sui-client",
3
- "version": "0.5.11",
3
+ "version": "0.5.13",
4
4
  "description": "Tookit for interacting with move eps framework",
5
5
  "keywords": [
6
6
  "sui",
@@ -37,12 +37,13 @@
37
37
  "src"
38
38
  ],
39
39
  "dependencies": {
40
- "@mysten/bcs": "^0.8.1",
41
- "@mysten/sui.js": "^0.49.1",
40
+ "@mysten/bcs": "^0.11.1",
41
+ "@mysten/sui.js": "^0.51.2",
42
42
  "@noble/curves": "^1.2.0",
43
43
  "@noble/hashes": "^1.3.2",
44
44
  "@scure/bip39": "^1.2.1",
45
45
  "assert": "^2.1.0",
46
+ "bech32": "^2.0.0",
46
47
  "superstruct": "^1.0.3",
47
48
  "ts-retry-promise": "^0.7.1",
48
49
  "tweetnacl": "^1.0.3",
@@ -53,7 +54,7 @@
53
54
  "tmp": "^0.2.1"
54
55
  },
55
56
  "peerDependencies": {
56
- "@mysten/sui.js": "^0.49.1"
57
+ "@mysten/sui.js": "^0.51.2"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@commitlint/cli": "^18.0.0",
@@ -1,4 +1,5 @@
1
- import { ObjectContentFields } from '@mysten/sui.js/src/types';
1
+ import type { Infer } from 'superstruct';
2
+ import { any, record, string } from 'superstruct';
2
3
  import type { SerializedBcs } from '@mysten/bcs';
3
4
  import type { TransactionArgument } from '@mysten/sui.js/transactions';
4
5
  import type {
@@ -19,6 +20,9 @@ import type { SharedObjectRef, ObjectArg } from '@mysten/sui.js/bcs';
19
20
 
20
21
  import { SuiMoveMoudleFuncType } from '../libs/suiContractFactory/types';
21
22
 
23
+ export const ObjectContentFields = record(string(), any());
24
+ export type ObjectContentFields = Infer<typeof ObjectContentFields>;
25
+
22
26
  export type ObeliskObjectData = {
23
27
  objectId: string;
24
28
  objectType: string;