@mysten/sui 2.9.1 → 2.10.0
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 +13 -0
- package/dist/client/core.d.mts +1 -0
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs +17 -4
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/types.d.mts +16 -0
- package/dist/client/types.d.mts.map +1 -1
- package/dist/graphql/core.d.mts +1 -0
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +13 -1
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +18 -1
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/grpc/core.d.mts +1 -0
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +12 -0
- 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/state_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/jsonRpc/core.d.mts +1 -0
- package/dist/jsonRpc/core.d.mts.map +1 -1
- package/dist/jsonRpc/core.mjs +19 -0
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/transactions/data/internal.d.mts +109 -109
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/v1.d.mts +220 -220
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +3 -3
- package/src/client/core.ts +34 -4
- package/src/client/types.ts +20 -0
- package/src/graphql/core.ts +27 -0
- package/src/graphql/generated/queries.ts +22 -0
- package/src/graphql/queries/getProtocolConfig.graphql +18 -0
- package/src/grpc/core.ts +27 -0
- package/src/jsonRpc/core.ts +34 -0
- package/src/version.ts +1 -1
|
@@ -1,245 +1,245 @@
|
|
|
1
1
|
import { TypeTag } from "../../bcs/types.mjs";
|
|
2
2
|
import "./internal.mjs";
|
|
3
3
|
import "@mysten/bcs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as valibot49 from "valibot";
|
|
5
5
|
import { GenericSchema, InferOutput } from "valibot";
|
|
6
6
|
|
|
7
7
|
//#region src/transactions/data/v1.d.ts
|
|
8
8
|
|
|
9
|
-
declare const SerializedTransactionDataV1:
|
|
10
|
-
readonly version:
|
|
11
|
-
readonly sender:
|
|
12
|
-
readonly expiration:
|
|
13
|
-
readonly Epoch:
|
|
14
|
-
}, undefined>,
|
|
15
|
-
readonly None:
|
|
9
|
+
declare const SerializedTransactionDataV1: valibot49.ObjectSchema<{
|
|
10
|
+
readonly version: valibot49.LiteralSchema<1, undefined>;
|
|
11
|
+
readonly sender: valibot49.OptionalSchema<valibot49.StringSchema<undefined>, undefined>;
|
|
12
|
+
readonly expiration: valibot49.NullishSchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
13
|
+
readonly Epoch: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
14
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
15
|
+
readonly None: valibot49.NullableSchema<valibot49.LiteralSchema<true, undefined>, undefined>;
|
|
16
16
|
}, undefined>], undefined>, undefined>;
|
|
17
|
-
readonly gasConfig:
|
|
18
|
-
readonly budget:
|
|
19
|
-
readonly price:
|
|
20
|
-
readonly payment:
|
|
21
|
-
readonly digest:
|
|
22
|
-
readonly objectId:
|
|
23
|
-
readonly version:
|
|
17
|
+
readonly gasConfig: valibot49.ObjectSchema<{
|
|
18
|
+
readonly budget: valibot49.OptionalSchema<valibot49.SchemaWithPipe<readonly [valibot49.UnionSchema<[valibot49.NumberSchema<undefined>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>, valibot49.CheckAction<string | number | bigint, undefined>]>, undefined>;
|
|
19
|
+
readonly price: valibot49.OptionalSchema<valibot49.SchemaWithPipe<readonly [valibot49.UnionSchema<[valibot49.NumberSchema<undefined>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>, valibot49.CheckAction<string | number | bigint, undefined>]>, undefined>;
|
|
20
|
+
readonly payment: valibot49.OptionalSchema<valibot49.ArraySchema<valibot49.ObjectSchema<{
|
|
21
|
+
readonly digest: valibot49.StringSchema<undefined>;
|
|
22
|
+
readonly objectId: valibot49.StringSchema<undefined>;
|
|
23
|
+
readonly version: valibot49.UnionSchema<[valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, valibot49.StringSchema<undefined>, valibot49.BigintSchema<undefined>], undefined>;
|
|
24
24
|
}, undefined>, undefined>, undefined>;
|
|
25
|
-
readonly owner:
|
|
25
|
+
readonly owner: valibot49.OptionalSchema<valibot49.StringSchema<undefined>, undefined>;
|
|
26
26
|
}, undefined>;
|
|
27
|
-
readonly inputs:
|
|
28
|
-
readonly kind:
|
|
29
|
-
readonly index:
|
|
30
|
-
readonly value:
|
|
31
|
-
readonly type:
|
|
32
|
-
}, undefined>,
|
|
33
|
-
readonly kind:
|
|
34
|
-
readonly index:
|
|
35
|
-
readonly value:
|
|
36
|
-
readonly type:
|
|
27
|
+
readonly inputs: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
28
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
29
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
30
|
+
readonly value: valibot49.UnknownSchema;
|
|
31
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
32
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
33
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
34
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
35
|
+
readonly value: valibot49.UnknownSchema;
|
|
36
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
37
37
|
}, undefined>], undefined>, undefined>;
|
|
38
|
-
readonly transactions:
|
|
39
|
-
readonly kind:
|
|
38
|
+
readonly transactions: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
39
|
+
readonly kind: valibot49.LiteralSchema<"MoveCall", undefined>;
|
|
40
40
|
readonly target: GenericSchema<`${string}::${string}::${string}`>;
|
|
41
|
-
readonly typeArguments:
|
|
42
|
-
readonly arguments:
|
|
43
|
-
readonly kind:
|
|
44
|
-
readonly index:
|
|
45
|
-
readonly value:
|
|
46
|
-
readonly type:
|
|
47
|
-
}, undefined>,
|
|
48
|
-
readonly kind:
|
|
49
|
-
readonly index:
|
|
50
|
-
readonly value:
|
|
51
|
-
readonly type:
|
|
52
|
-
}, undefined>], undefined>,
|
|
53
|
-
readonly kind:
|
|
54
|
-
}, undefined>,
|
|
55
|
-
readonly kind:
|
|
56
|
-
readonly index:
|
|
57
|
-
}, undefined>,
|
|
58
|
-
readonly kind:
|
|
59
|
-
readonly index:
|
|
60
|
-
readonly resultIndex:
|
|
41
|
+
readonly typeArguments: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
42
|
+
readonly arguments: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
43
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
44
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
45
|
+
readonly value: valibot49.UnknownSchema;
|
|
46
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
47
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
48
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
49
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
50
|
+
readonly value: valibot49.UnknownSchema;
|
|
51
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
52
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
53
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
54
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
55
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
56
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
57
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
58
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
59
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
60
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
61
61
|
}, undefined>], undefined>, undefined>;
|
|
62
|
-
}, undefined>,
|
|
63
|
-
readonly kind:
|
|
64
|
-
readonly objects:
|
|
65
|
-
readonly kind:
|
|
66
|
-
readonly index:
|
|
67
|
-
readonly value:
|
|
68
|
-
readonly type:
|
|
69
|
-
}, undefined>,
|
|
70
|
-
readonly kind:
|
|
71
|
-
readonly index:
|
|
72
|
-
readonly value:
|
|
73
|
-
readonly type:
|
|
74
|
-
}, undefined>], undefined>,
|
|
75
|
-
readonly kind:
|
|
76
|
-
}, undefined>,
|
|
77
|
-
readonly kind:
|
|
78
|
-
readonly index:
|
|
79
|
-
}, undefined>,
|
|
80
|
-
readonly kind:
|
|
81
|
-
readonly index:
|
|
82
|
-
readonly resultIndex:
|
|
62
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
63
|
+
readonly kind: valibot49.LiteralSchema<"TransferObjects", undefined>;
|
|
64
|
+
readonly objects: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
65
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
66
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
67
|
+
readonly value: valibot49.UnknownSchema;
|
|
68
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
69
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
70
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
71
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
72
|
+
readonly value: valibot49.UnknownSchema;
|
|
73
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
74
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
75
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
76
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
77
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
78
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
79
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
80
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
81
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
82
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
83
83
|
}, undefined>], undefined>, undefined>;
|
|
84
|
-
readonly address:
|
|
85
|
-
readonly kind:
|
|
86
|
-
readonly index:
|
|
87
|
-
readonly value:
|
|
88
|
-
readonly type:
|
|
89
|
-
}, undefined>,
|
|
90
|
-
readonly kind:
|
|
91
|
-
readonly index:
|
|
92
|
-
readonly value:
|
|
93
|
-
readonly type:
|
|
94
|
-
}, undefined>], undefined>,
|
|
95
|
-
readonly kind:
|
|
96
|
-
}, undefined>,
|
|
97
|
-
readonly kind:
|
|
98
|
-
readonly index:
|
|
99
|
-
}, undefined>,
|
|
100
|
-
readonly kind:
|
|
101
|
-
readonly index:
|
|
102
|
-
readonly resultIndex:
|
|
84
|
+
readonly address: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
85
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
86
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
87
|
+
readonly value: valibot49.UnknownSchema;
|
|
88
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
89
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
90
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
91
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
92
|
+
readonly value: valibot49.UnknownSchema;
|
|
93
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
94
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
95
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
96
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
97
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
98
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
99
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
100
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
101
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
102
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
103
103
|
}, undefined>], undefined>;
|
|
104
|
-
}, undefined>,
|
|
105
|
-
readonly kind:
|
|
106
|
-
readonly coin:
|
|
107
|
-
readonly kind:
|
|
108
|
-
readonly index:
|
|
109
|
-
readonly value:
|
|
110
|
-
readonly type:
|
|
111
|
-
}, undefined>,
|
|
112
|
-
readonly kind:
|
|
113
|
-
readonly index:
|
|
114
|
-
readonly value:
|
|
115
|
-
readonly type:
|
|
116
|
-
}, undefined>], undefined>,
|
|
117
|
-
readonly kind:
|
|
118
|
-
}, undefined>,
|
|
119
|
-
readonly kind:
|
|
120
|
-
readonly index:
|
|
121
|
-
}, undefined>,
|
|
122
|
-
readonly kind:
|
|
123
|
-
readonly index:
|
|
124
|
-
readonly resultIndex:
|
|
104
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
105
|
+
readonly kind: valibot49.LiteralSchema<"SplitCoins", undefined>;
|
|
106
|
+
readonly coin: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
107
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
108
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
109
|
+
readonly value: valibot49.UnknownSchema;
|
|
110
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
111
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
112
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
113
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
114
|
+
readonly value: valibot49.UnknownSchema;
|
|
115
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
116
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
117
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
118
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
119
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
120
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
121
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
122
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
123
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
124
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
125
125
|
}, undefined>], undefined>;
|
|
126
|
-
readonly amounts:
|
|
127
|
-
readonly kind:
|
|
128
|
-
readonly index:
|
|
129
|
-
readonly value:
|
|
130
|
-
readonly type:
|
|
131
|
-
}, undefined>,
|
|
132
|
-
readonly kind:
|
|
133
|
-
readonly index:
|
|
134
|
-
readonly value:
|
|
135
|
-
readonly type:
|
|
136
|
-
}, undefined>], undefined>,
|
|
137
|
-
readonly kind:
|
|
138
|
-
}, undefined>,
|
|
139
|
-
readonly kind:
|
|
140
|
-
readonly index:
|
|
141
|
-
}, undefined>,
|
|
142
|
-
readonly kind:
|
|
143
|
-
readonly index:
|
|
144
|
-
readonly resultIndex:
|
|
126
|
+
readonly amounts: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
127
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
128
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
129
|
+
readonly value: valibot49.UnknownSchema;
|
|
130
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
131
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
132
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
133
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
134
|
+
readonly value: valibot49.UnknownSchema;
|
|
135
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
136
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
137
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
138
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
139
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
140
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
141
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
142
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
143
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
144
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
145
145
|
}, undefined>], undefined>, undefined>;
|
|
146
|
-
}, undefined>,
|
|
147
|
-
readonly kind:
|
|
148
|
-
readonly destination:
|
|
149
|
-
readonly kind:
|
|
150
|
-
readonly index:
|
|
151
|
-
readonly value:
|
|
152
|
-
readonly type:
|
|
153
|
-
}, undefined>,
|
|
154
|
-
readonly kind:
|
|
155
|
-
readonly index:
|
|
156
|
-
readonly value:
|
|
157
|
-
readonly type:
|
|
158
|
-
}, undefined>], undefined>,
|
|
159
|
-
readonly kind:
|
|
160
|
-
}, undefined>,
|
|
161
|
-
readonly kind:
|
|
162
|
-
readonly index:
|
|
163
|
-
}, undefined>,
|
|
164
|
-
readonly kind:
|
|
165
|
-
readonly index:
|
|
166
|
-
readonly resultIndex:
|
|
146
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
147
|
+
readonly kind: valibot49.LiteralSchema<"MergeCoins", undefined>;
|
|
148
|
+
readonly destination: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
149
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
150
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
151
|
+
readonly value: valibot49.UnknownSchema;
|
|
152
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
153
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
154
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
155
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
156
|
+
readonly value: valibot49.UnknownSchema;
|
|
157
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
158
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
159
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
160
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
161
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
162
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
163
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
164
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
165
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
166
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
167
167
|
}, undefined>], undefined>;
|
|
168
|
-
readonly sources:
|
|
169
|
-
readonly kind:
|
|
170
|
-
readonly index:
|
|
171
|
-
readonly value:
|
|
172
|
-
readonly type:
|
|
173
|
-
}, undefined>,
|
|
174
|
-
readonly kind:
|
|
175
|
-
readonly index:
|
|
176
|
-
readonly value:
|
|
177
|
-
readonly type:
|
|
178
|
-
}, undefined>], undefined>,
|
|
179
|
-
readonly kind:
|
|
180
|
-
}, undefined>,
|
|
181
|
-
readonly kind:
|
|
182
|
-
readonly index:
|
|
183
|
-
}, undefined>,
|
|
184
|
-
readonly kind:
|
|
185
|
-
readonly index:
|
|
186
|
-
readonly resultIndex:
|
|
168
|
+
readonly sources: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
169
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
170
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
171
|
+
readonly value: valibot49.UnknownSchema;
|
|
172
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
173
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
174
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
175
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
176
|
+
readonly value: valibot49.UnknownSchema;
|
|
177
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
178
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
179
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
180
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
181
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
182
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
183
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
184
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
185
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
186
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
187
187
|
}, undefined>], undefined>, undefined>;
|
|
188
|
-
}, undefined>,
|
|
189
|
-
readonly kind:
|
|
190
|
-
readonly modules:
|
|
191
|
-
readonly dependencies:
|
|
192
|
-
}, undefined>,
|
|
193
|
-
readonly kind:
|
|
194
|
-
readonly modules:
|
|
195
|
-
readonly dependencies:
|
|
196
|
-
readonly packageId:
|
|
197
|
-
readonly ticket:
|
|
198
|
-
readonly kind:
|
|
199
|
-
readonly index:
|
|
200
|
-
readonly value:
|
|
201
|
-
readonly type:
|
|
202
|
-
}, undefined>,
|
|
203
|
-
readonly kind:
|
|
204
|
-
readonly index:
|
|
205
|
-
readonly value:
|
|
206
|
-
readonly type:
|
|
207
|
-
}, undefined>], undefined>,
|
|
208
|
-
readonly kind:
|
|
209
|
-
}, undefined>,
|
|
210
|
-
readonly kind:
|
|
211
|
-
readonly index:
|
|
212
|
-
}, undefined>,
|
|
213
|
-
readonly kind:
|
|
214
|
-
readonly index:
|
|
215
|
-
readonly resultIndex:
|
|
188
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
189
|
+
readonly kind: valibot49.LiteralSchema<"Publish", undefined>;
|
|
190
|
+
readonly modules: valibot49.ArraySchema<valibot49.ArraySchema<valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, undefined>, undefined>;
|
|
191
|
+
readonly dependencies: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
192
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
193
|
+
readonly kind: valibot49.LiteralSchema<"Upgrade", undefined>;
|
|
194
|
+
readonly modules: valibot49.ArraySchema<valibot49.ArraySchema<valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>, undefined>, undefined>;
|
|
195
|
+
readonly dependencies: valibot49.ArraySchema<valibot49.StringSchema<undefined>, undefined>;
|
|
196
|
+
readonly packageId: valibot49.StringSchema<undefined>;
|
|
197
|
+
readonly ticket: valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
198
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
199
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
200
|
+
readonly value: valibot49.UnknownSchema;
|
|
201
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
202
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
203
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
204
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
205
|
+
readonly value: valibot49.UnknownSchema;
|
|
206
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
207
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
208
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
209
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
210
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
211
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
212
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
213
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
214
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
215
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
216
216
|
}, undefined>], undefined>;
|
|
217
|
-
}, undefined>,
|
|
218
|
-
readonly kind:
|
|
219
|
-
readonly type:
|
|
217
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
218
|
+
readonly kind: valibot49.LiteralSchema<"MakeMoveVec", undefined>;
|
|
219
|
+
readonly type: valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
220
220
|
readonly Some: GenericSchema<TypeTag>;
|
|
221
|
-
}, undefined>,
|
|
222
|
-
readonly None:
|
|
221
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
222
|
+
readonly None: valibot49.NullableSchema<valibot49.LiteralSchema<true, undefined>, undefined>;
|
|
223
223
|
}, undefined>], undefined>;
|
|
224
|
-
readonly objects:
|
|
225
|
-
readonly kind:
|
|
226
|
-
readonly index:
|
|
227
|
-
readonly value:
|
|
228
|
-
readonly type:
|
|
229
|
-
}, undefined>,
|
|
230
|
-
readonly kind:
|
|
231
|
-
readonly index:
|
|
232
|
-
readonly value:
|
|
233
|
-
readonly type:
|
|
234
|
-
}, undefined>], undefined>,
|
|
235
|
-
readonly kind:
|
|
236
|
-
}, undefined>,
|
|
237
|
-
readonly kind:
|
|
238
|
-
readonly index:
|
|
239
|
-
}, undefined>,
|
|
240
|
-
readonly kind:
|
|
241
|
-
readonly index:
|
|
242
|
-
readonly resultIndex:
|
|
224
|
+
readonly objects: valibot49.ArraySchema<valibot49.UnionSchema<[valibot49.UnionSchema<[valibot49.ObjectSchema<{
|
|
225
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
226
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
227
|
+
readonly value: valibot49.UnknownSchema;
|
|
228
|
+
readonly type: valibot49.OptionalSchema<valibot49.LiteralSchema<"object", undefined>, undefined>;
|
|
229
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
230
|
+
readonly kind: valibot49.LiteralSchema<"Input", undefined>;
|
|
231
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
232
|
+
readonly value: valibot49.UnknownSchema;
|
|
233
|
+
readonly type: valibot49.LiteralSchema<"pure", undefined>;
|
|
234
|
+
}, undefined>], undefined>, valibot49.ObjectSchema<{
|
|
235
|
+
readonly kind: valibot49.LiteralSchema<"GasCoin", undefined>;
|
|
236
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
237
|
+
readonly kind: valibot49.LiteralSchema<"Result", undefined>;
|
|
238
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
239
|
+
}, undefined>, valibot49.ObjectSchema<{
|
|
240
|
+
readonly kind: valibot49.LiteralSchema<"NestedResult", undefined>;
|
|
241
|
+
readonly index: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
242
|
+
readonly resultIndex: valibot49.SchemaWithPipe<readonly [valibot49.NumberSchema<undefined>, valibot49.IntegerAction<number, undefined>]>;
|
|
243
243
|
}, undefined>], undefined>, undefined>;
|
|
244
244
|
}, undefined>], undefined>, undefined>;
|
|
245
245
|
}, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.mts","names":[],"sources":["../../../src/transactions/data/v1.ts"],"sourcesContent":[],"mappings":";;;;;;;;cA6La,
|
|
1
|
+
{"version":3,"file":"v1.d.mts","names":[],"sources":["../../../src/transactions/data/v1.ts"],"sourcesContent":[],"mappings":";;;;;;;;cA6La,uCAA2B;oBAOtC,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA9DI;kDAAa,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgEP,2BAAA,GAA8B,mBAAmB"}
|
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.10.0';\nexport const TARGETED_RPC_VERSION = '1.69.0';\n"],"mappings":";AAKA,MAAa,kBAAkB;AAC/B,MAAa,uBAAuB"}
|
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.
|
|
6
|
+
"version": "2.10.0",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"files": [
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
"graphql": "^16.12.0",
|
|
170
170
|
"poseidon-lite": "0.2.1",
|
|
171
171
|
"valibot": "^1.2.0",
|
|
172
|
-
"@mysten/
|
|
173
|
-
"@mysten/
|
|
172
|
+
"@mysten/bcs": "^2.0.3",
|
|
173
|
+
"@mysten/utils": "^0.3.1"
|
|
174
174
|
},
|
|
175
175
|
"scripts": {
|
|
176
176
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
package/src/client/core.ts
CHANGED
|
@@ -100,6 +100,10 @@ export abstract class CoreClient extends BaseClient implements SuiClientTypes.Tr
|
|
|
100
100
|
options?: SuiClientTypes.GetCurrentSystemStateOptions,
|
|
101
101
|
): Promise<SuiClientTypes.GetCurrentSystemStateResponse>;
|
|
102
102
|
|
|
103
|
+
abstract getProtocolConfig(
|
|
104
|
+
options?: SuiClientTypes.GetProtocolConfigOptions,
|
|
105
|
+
): Promise<SuiClientTypes.GetProtocolConfigResponse>;
|
|
106
|
+
|
|
103
107
|
abstract getChainIdentifier(
|
|
104
108
|
options?: SuiClientTypes.GetChainIdentifierOptions,
|
|
105
109
|
): Promise<SuiClientTypes.GetChainIdentifierResponse>;
|
|
@@ -217,7 +221,7 @@ export abstract class CoreClient extends BaseClient implements SuiClientTypes.Tr
|
|
|
217
221
|
async waitForTransaction<Include extends SuiClientTypes.TransactionInclude = {}>(
|
|
218
222
|
options: SuiClientTypes.WaitForTransactionOptions<Include>,
|
|
219
223
|
): Promise<SuiClientTypes.TransactionResult<Include>> {
|
|
220
|
-
const { signal, timeout = 60 * 1000, include } = options;
|
|
224
|
+
const { signal, timeout = 60 * 1000, pollSchedule, include } = options;
|
|
221
225
|
|
|
222
226
|
const digest =
|
|
223
227
|
'result' in options && options.result
|
|
@@ -236,7 +240,35 @@ export abstract class CoreClient extends BaseClient implements SuiClientTypes.Tr
|
|
|
236
240
|
// Swallow unhandled rejections that might be thrown after early return
|
|
237
241
|
});
|
|
238
242
|
|
|
243
|
+
// Default schedule tuned to testnet measurements:
|
|
244
|
+
// - Fullnode (gRPC/JSON-RPC): p50=130ms, p95=330ms
|
|
245
|
+
// - GraphQL indexer: p50=1300ms, p95=1430ms
|
|
246
|
+
// After schedule exhausted, repeats the last interval.
|
|
247
|
+
const schedule = pollSchedule ?? [0, 300, 600, 1500, 3500];
|
|
248
|
+
const t0 = Date.now();
|
|
249
|
+
let scheduleIndex = 0;
|
|
250
|
+
const lastInterval =
|
|
251
|
+
schedule.length > 0
|
|
252
|
+
? schedule[schedule.length - 1] - (schedule[schedule.length - 2] ?? 0)
|
|
253
|
+
: 2_000;
|
|
254
|
+
|
|
239
255
|
while (true) {
|
|
256
|
+
if (scheduleIndex < schedule.length) {
|
|
257
|
+
const remaining = t0 + schedule[scheduleIndex] - Date.now();
|
|
258
|
+
scheduleIndex++;
|
|
259
|
+
if (remaining > 0) {
|
|
260
|
+
await Promise.race([
|
|
261
|
+
new Promise((resolve) => setTimeout(resolve, remaining)),
|
|
262
|
+
abortPromise,
|
|
263
|
+
]);
|
|
264
|
+
}
|
|
265
|
+
} else {
|
|
266
|
+
await Promise.race([
|
|
267
|
+
new Promise((resolve) => setTimeout(resolve, lastInterval)),
|
|
268
|
+
abortPromise,
|
|
269
|
+
]);
|
|
270
|
+
}
|
|
271
|
+
|
|
240
272
|
abortSignal.throwIfAborted();
|
|
241
273
|
try {
|
|
242
274
|
return await this.getTransaction({
|
|
@@ -244,9 +276,7 @@ export abstract class CoreClient extends BaseClient implements SuiClientTypes.Tr
|
|
|
244
276
|
include,
|
|
245
277
|
signal: abortSignal,
|
|
246
278
|
});
|
|
247
|
-
} catch {
|
|
248
|
-
await Promise.race([new Promise((resolve) => setTimeout(resolve, 2_000)), abortPromise]);
|
|
249
|
-
}
|
|
279
|
+
} catch {}
|
|
250
280
|
}
|
|
251
281
|
}
|
|
252
282
|
|