@mysten/sui 2.13.3 → 2.13.4
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 +6 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/client/core-resolver.mjs +5 -3
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +6 -6
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/name_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/subscription_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/transactions/Transaction.d.mts +6 -6
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/data/internal.d.mts +109 -109
- package/dist/transactions/data/v1.d.mts +220 -220
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/transactions/data/v2.d.mts +16 -16
- package/dist/transactions/data/v2.d.mts.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 +21 -10
- package/src/version.ts +1 -1
package/dist/zklogin/bcs.d.mts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _mysten_bcs1111 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_bcs1111.BcsStruct<{
|
|
6
|
+
inputs: _mysten_bcs1111.BcsStruct<{
|
|
7
|
+
proofPoints: _mysten_bcs1111.BcsStruct<{
|
|
8
|
+
a: _mysten_bcs1111.BcsType<string[], Iterable<string> & {
|
|
9
9
|
length: number;
|
|
10
10
|
}, string>;
|
|
11
|
-
b:
|
|
11
|
+
b: _mysten_bcs1111.BcsType<string[][], Iterable<Iterable<string> & {
|
|
12
12
|
length: number;
|
|
13
13
|
}> & {
|
|
14
14
|
length: number;
|
|
15
15
|
}, string>;
|
|
16
|
-
c:
|
|
16
|
+
c: _mysten_bcs1111.BcsType<string[], Iterable<string> & {
|
|
17
17
|
length: number;
|
|
18
18
|
}, string>;
|
|
19
19
|
}, string>;
|
|
20
|
-
issBase64Details:
|
|
21
|
-
value:
|
|
22
|
-
indexMod4:
|
|
20
|
+
issBase64Details: _mysten_bcs1111.BcsStruct<{
|
|
21
|
+
value: _mysten_bcs1111.BcsType<string, string, "string">;
|
|
22
|
+
indexMod4: _mysten_bcs1111.BcsType<number, number, "u8">;
|
|
23
23
|
}, string>;
|
|
24
|
-
headerBase64:
|
|
25
|
-
addressSeed:
|
|
24
|
+
headerBase64: _mysten_bcs1111.BcsType<string, string, "string">;
|
|
25
|
+
addressSeed: _mysten_bcs1111.BcsType<string, string, "string">;
|
|
26
26
|
}, string>;
|
|
27
|
-
maxEpoch:
|
|
28
|
-
userSignature:
|
|
27
|
+
maxEpoch: _mysten_bcs1111.BcsType<string, string | number | bigint, "u64">;
|
|
28
|
+
userSignature: _mysten_bcs1111.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,kBAAgB,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAkBjB,gBAAA,GAAmB,aAAA,QAAqB,gBAAA;AAAA,KACxC,sBAAA,GAAyB,gBAAA"}
|
package/package.json
CHANGED
|
@@ -85,15 +85,17 @@ export async function coreClientResolveTransactionPlugin(
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
const needsSystemState = needsGasPrice || (needsPayment && usesGasCoin);
|
|
88
|
-
const [, systemStateResult, balanceResult, coinsResult, chainIdResult] =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
const [, systemStateResult, balanceResult, coinsResult, protocolConfigResult, chainIdResult] =
|
|
89
|
+
await Promise.all([
|
|
90
|
+
normalizeInputs(transactionData, client),
|
|
91
|
+
needsSystemState ? client.core.getCurrentSystemState() : null,
|
|
92
|
+
needsPayment && gasPayer ? client.core.getBalance({ owner: gasPayer }) : null,
|
|
93
|
+
needsPayment && gasPayer
|
|
94
|
+
? client.core.listCoins({ owner: gasPayer, coinType: SUI_TYPE_ARG })
|
|
95
|
+
: null,
|
|
96
|
+
needsPayment && usesGasCoin ? client.core.getProtocolConfig() : null,
|
|
97
|
+
needsPayment && usesGasCoin ? client.core.getChainIdentifier() : null,
|
|
98
|
+
]);
|
|
97
99
|
|
|
98
100
|
await resolveObjectReferences(transactionData, client);
|
|
99
101
|
|
|
@@ -118,6 +120,7 @@ export async function coreClientResolveTransactionPlugin(
|
|
|
118
120
|
coins: coinsResult,
|
|
119
121
|
usesGasCoin,
|
|
120
122
|
withdrawals,
|
|
123
|
+
protocolConfig: protocolConfigResult?.protocolConfig,
|
|
121
124
|
gasPayer: gasPayer!,
|
|
122
125
|
chainIdentifier: chainIdResult?.chainIdentifier ?? null,
|
|
123
126
|
epoch: systemState?.epoch ?? null,
|
|
@@ -175,6 +178,7 @@ function setGasPayment({
|
|
|
175
178
|
coins,
|
|
176
179
|
usesGasCoin,
|
|
177
180
|
withdrawals,
|
|
181
|
+
protocolConfig,
|
|
178
182
|
gasPayer,
|
|
179
183
|
chainIdentifier,
|
|
180
184
|
epoch,
|
|
@@ -184,6 +188,7 @@ function setGasPayment({
|
|
|
184
188
|
coins: SuiClientTypes.ListCoinsResponse;
|
|
185
189
|
usesGasCoin: boolean;
|
|
186
190
|
withdrawals: bigint;
|
|
191
|
+
protocolConfig: SuiClientTypes.ProtocolConfig | undefined;
|
|
187
192
|
gasPayer: string;
|
|
188
193
|
chainIdentifier: string | null;
|
|
189
194
|
epoch: string | null;
|
|
@@ -216,7 +221,13 @@ function setGasPayment({
|
|
|
216
221
|
|
|
217
222
|
const reservationAmount = addressBalance - withdrawals;
|
|
218
223
|
|
|
219
|
-
if (
|
|
224
|
+
if (
|
|
225
|
+
usesGasCoin &&
|
|
226
|
+
reservationAmount > 0n &&
|
|
227
|
+
protocolConfig?.featureFlags?.['enable_coin_reservation_obj_refs'] &&
|
|
228
|
+
chainIdentifier &&
|
|
229
|
+
epoch
|
|
230
|
+
) {
|
|
220
231
|
transactionData.gasData.payment = [
|
|
221
232
|
createCoinReservationRef(reservationAmount, gasPayer, chainIdentifier, epoch),
|
|
222
233
|
...paymentCoins,
|
package/src/version.ts
CHANGED