@mysten/sui 1.2.1 → 1.3.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.
- package/CHANGELOG.md +210 -84
- package/README.md +0 -44
- package/dist/cjs/bcs/bcs.d.ts +2 -2
- package/dist/cjs/bcs/bcs.js.map +2 -2
- package/dist/cjs/bcs/index.d.ts +20 -20
- package/dist/cjs/bcs/type-tag-serializer.js.map +1 -1
- package/dist/cjs/client/client.d.ts +5 -2
- package/dist/cjs/client/client.js +5 -0
- package/dist/cjs/client/client.js.map +2 -2
- package/dist/cjs/client/http-transport.js +14 -28
- package/dist/cjs/client/http-transport.js.map +1 -1
- package/dist/cjs/client/network.js.map +1 -1
- package/dist/cjs/client/rpc-websocket-client.d.ts +1 -8
- package/dist/cjs/client/rpc-websocket-client.js +14 -31
- package/dist/cjs/client/rpc-websocket-client.js.map +1 -1
- package/dist/cjs/cryptography/publickey.js +1 -2
- package/dist/cjs/cryptography/publickey.js.map +1 -1
- package/dist/cjs/faucet/faucet.js.map +1 -1
- package/dist/cjs/graphql/client.js +11 -22
- package/dist/cjs/graphql/client.js.map +2 -2
- package/dist/cjs/graphql/schemas/2024.1/index.d.ts +681 -681
- package/dist/cjs/graphql/schemas/2024.4/index.d.ts +682 -682
- package/dist/cjs/keypairs/ed25519/keypair.js.map +1 -1
- package/dist/cjs/keypairs/ed25519/publickey.js.map +1 -1
- package/dist/cjs/keypairs/secp256k1/publickey.js.map +1 -1
- package/dist/cjs/keypairs/secp256r1/publickey.js.map +1 -1
- package/dist/cjs/multisig/publickey.js.map +1 -1
- package/dist/cjs/multisig/signer.js +9 -20
- package/dist/cjs/multisig/signer.js.map +1 -1
- package/dist/cjs/transactions/Arguments.d.ts +988 -0
- package/dist/cjs/transactions/Arguments.js +32 -0
- package/dist/cjs/transactions/Arguments.js.map +7 -0
- package/dist/cjs/transactions/Commands.d.ts +19 -72
- package/dist/cjs/transactions/Commands.js.map +1 -1
- package/dist/cjs/transactions/ObjectCache.d.ts +1 -4
- package/dist/cjs/transactions/ObjectCache.js +8 -19
- package/dist/cjs/transactions/ObjectCache.js.map +1 -1
- package/dist/cjs/transactions/Transaction.d.ts +47 -49
- package/dist/cjs/transactions/Transaction.js +25 -51
- package/dist/cjs/transactions/Transaction.js.map +2 -2
- package/dist/cjs/transactions/TransactionData.d.ts +2 -2
- package/dist/cjs/transactions/TransactionData.js.map +2 -2
- package/dist/cjs/transactions/data/internal.d.ts +447 -2128
- package/dist/cjs/transactions/data/internal.js +32 -29
- package/dist/cjs/transactions/data/internal.js.map +2 -2
- package/dist/cjs/transactions/data/v1.d.ts +288 -1818
- package/dist/cjs/transactions/data/v1.js +80 -80
- package/dist/cjs/transactions/data/v1.js.map +2 -2
- package/dist/cjs/transactions/data/v2.d.ts +24 -192
- package/dist/cjs/transactions/data/v2.js +3 -3
- package/dist/cjs/transactions/data/v2.js.map +2 -2
- package/dist/cjs/transactions/executor/caching.d.ts +1 -0
- package/dist/cjs/transactions/executor/caching.js +23 -22
- package/dist/cjs/transactions/executor/caching.js.map +2 -2
- package/dist/cjs/transactions/executor/parallel.d.ts +1 -0
- package/dist/cjs/transactions/executor/parallel.js +36 -60
- package/dist/cjs/transactions/executor/parallel.js.map +2 -2
- package/dist/cjs/transactions/executor/queue.js +6 -13
- package/dist/cjs/transactions/executor/queue.js.map +1 -1
- package/dist/cjs/transactions/executor/serial.d.ts +2 -1
- package/dist/cjs/transactions/executor/serial.js +14 -40
- package/dist/cjs/transactions/executor/serial.js.map +2 -2
- package/dist/cjs/transactions/hash.js.map +1 -1
- package/dist/cjs/transactions/index.d.ts +1 -0
- package/dist/cjs/transactions/index.js +2 -2
- package/dist/cjs/transactions/index.js.map +2 -2
- package/dist/cjs/transactions/intents/CoinWithBalance.js.map +2 -2
- package/dist/cjs/transactions/json-rpc-resolver.js +4 -2
- package/dist/cjs/transactions/json-rpc-resolver.js.map +2 -2
- package/dist/cjs/transactions/pure.d.ts +25 -182
- package/dist/cjs/transactions/pure.js +58 -12
- package/dist/cjs/transactions/pure.js.map +3 -3
- package/dist/cjs/transactions/serializer.js.map +1 -1
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/cjs/utils/format.js.map +1 -1
- package/dist/cjs/utils/sui-types.js +1 -2
- package/dist/cjs/utils/sui-types.js.map +2 -2
- package/dist/cjs/utils/suins.js.map +1 -1
- package/dist/cjs/verify/verify.js.map +1 -1
- package/dist/cjs/version.d.ts +2 -2
- package/dist/cjs/version.js +2 -2
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/zklogin/jwt-utils.js.map +1 -1
- package/dist/cjs/zklogin/publickey.js +11 -22
- package/dist/cjs/zklogin/publickey.js.map +1 -1
- package/dist/esm/bcs/bcs.d.ts +2 -2
- package/dist/esm/bcs/bcs.js.map +2 -2
- package/dist/esm/bcs/index.d.ts +20 -20
- package/dist/esm/bcs/type-tag-serializer.js.map +1 -1
- package/dist/esm/client/client.d.ts +5 -2
- package/dist/esm/client/client.js +5 -0
- package/dist/esm/client/client.js.map +2 -2
- package/dist/esm/client/http-transport.js +13 -27
- package/dist/esm/client/http-transport.js.map +1 -1
- package/dist/esm/client/network.js.map +1 -1
- package/dist/esm/client/rpc-websocket-client.d.ts +1 -8
- package/dist/esm/client/rpc-websocket-client.js +13 -30
- package/dist/esm/client/rpc-websocket-client.js.map +1 -1
- package/dist/esm/cryptography/publickey.js +1 -2
- package/dist/esm/cryptography/publickey.js.map +1 -1
- package/dist/esm/faucet/faucet.js.map +1 -1
- package/dist/esm/graphql/client.js +10 -21
- package/dist/esm/graphql/client.js.map +2 -2
- package/dist/esm/graphql/schemas/2024.1/index.d.ts +681 -681
- package/dist/esm/graphql/schemas/2024.4/index.d.ts +682 -682
- package/dist/esm/keypairs/ed25519/keypair.js.map +1 -1
- package/dist/esm/keypairs/ed25519/publickey.js.map +1 -1
- package/dist/esm/keypairs/secp256k1/publickey.js.map +1 -1
- package/dist/esm/keypairs/secp256r1/publickey.js.map +1 -1
- package/dist/esm/multisig/publickey.js.map +1 -1
- package/dist/esm/multisig/signer.js +8 -19
- package/dist/esm/multisig/signer.js.map +1 -1
- package/dist/esm/transactions/Arguments.d.ts +988 -0
- package/dist/esm/transactions/Arguments.js +12 -0
- package/dist/esm/transactions/Arguments.js.map +7 -0
- package/dist/esm/transactions/Commands.d.ts +19 -72
- package/dist/esm/transactions/Commands.js.map +1 -1
- package/dist/esm/transactions/ObjectCache.d.ts +1 -4
- package/dist/esm/transactions/ObjectCache.js +7 -18
- package/dist/esm/transactions/ObjectCache.js.map +1 -1
- package/dist/esm/transactions/Transaction.d.ts +47 -49
- package/dist/esm/transactions/Transaction.js +24 -50
- package/dist/esm/transactions/Transaction.js.map +2 -2
- package/dist/esm/transactions/TransactionData.d.ts +2 -2
- package/dist/esm/transactions/TransactionData.js.map +2 -2
- package/dist/esm/transactions/data/internal.d.ts +447 -2128
- package/dist/esm/transactions/data/internal.js +35 -31
- package/dist/esm/transactions/data/internal.js.map +2 -2
- package/dist/esm/transactions/data/v1.d.ts +288 -1818
- package/dist/esm/transactions/data/v1.js +83 -82
- package/dist/esm/transactions/data/v1.js.map +2 -2
- package/dist/esm/transactions/data/v2.d.ts +24 -192
- package/dist/esm/transactions/data/v2.js +4 -3
- package/dist/esm/transactions/data/v2.js.map +2 -2
- package/dist/esm/transactions/executor/caching.d.ts +1 -0
- package/dist/esm/transactions/executor/caching.js +22 -21
- package/dist/esm/transactions/executor/caching.js.map +2 -2
- package/dist/esm/transactions/executor/parallel.d.ts +1 -0
- package/dist/esm/transactions/executor/parallel.js +35 -59
- package/dist/esm/transactions/executor/parallel.js.map +2 -2
- package/dist/esm/transactions/executor/queue.js +5 -12
- package/dist/esm/transactions/executor/queue.js.map +1 -1
- package/dist/esm/transactions/executor/serial.d.ts +2 -1
- package/dist/esm/transactions/executor/serial.js +13 -39
- package/dist/esm/transactions/executor/serial.js.map +2 -2
- package/dist/esm/transactions/hash.js.map +1 -1
- package/dist/esm/transactions/index.d.ts +1 -0
- package/dist/esm/transactions/index.js +2 -2
- package/dist/esm/transactions/index.js.map +2 -2
- package/dist/esm/transactions/intents/CoinWithBalance.js.map +2 -2
- package/dist/esm/transactions/json-rpc-resolver.js +4 -2
- package/dist/esm/transactions/json-rpc-resolver.js.map +2 -2
- package/dist/esm/transactions/pure.d.ts +25 -182
- package/dist/esm/transactions/pure.js +48 -2
- package/dist/esm/transactions/pure.js.map +2 -2
- package/dist/esm/transactions/serializer.js.map +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/sui-types.js +1 -2
- package/dist/esm/utils/sui-types.js.map +2 -2
- package/dist/esm/utils/suins.js.map +1 -1
- package/dist/esm/verify/verify.js.map +1 -1
- package/dist/esm/version.d.ts +2 -2
- package/dist/esm/version.js +2 -2
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/zklogin/jwt-utils.js.map +1 -1
- package/dist/esm/zklogin/publickey.js +10 -21
- package/dist/esm/zklogin/publickey.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/src/bcs/bcs.ts +2 -2
- package/src/client/client.ts +7 -4
- package/src/graphql/client.ts +1 -1
- package/src/transactions/Arguments.ts +23 -0
- package/src/transactions/Commands.ts +12 -12
- package/src/transactions/Transaction.ts +11 -11
- package/src/transactions/TransactionData.ts +4 -2
- package/src/transactions/data/internal.ts +52 -47
- package/src/transactions/data/v1.ts +102 -100
- package/src/transactions/data/v2.ts +9 -8
- package/src/transactions/executor/caching.ts +14 -2
- package/src/transactions/executor/parallel.ts +5 -1
- package/src/transactions/executor/serial.ts +3 -10
- package/src/transactions/index.ts +2 -0
- package/src/transactions/intents/CoinWithBalance.ts +2 -2
- package/src/transactions/json-rpc-resolver.ts +5 -1
- package/src/transactions/pure.ts +106 -4
- package/src/utils/sui-types.ts +1 -1
- package/src/version.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @mysten/sui.js
|
|
2
2
|
|
|
3
|
+
## 1.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a45f461: Shared objects passed to MakeMoveVec, MergeCoins, and SplitCoin are now marked as mutable
|
|
8
|
+
|
|
9
|
+
## 1.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 086b2bc: Add waitForLastTransaction methods to all executor classes
|
|
14
|
+
- cdedf69: Add Argument helpers for constructing transaction arguments without a Transaction
|
|
15
|
+
instance
|
|
16
|
+
- beed646: Add tx.pure.vector and tx.pure.option methods
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 7fc464a: Remove unique symbols from types to improve compatability between version
|
|
21
|
+
- 0fb0628: Mark subscription methods as deprecated.
|
|
22
|
+
- 0f27a97: Update dependencies
|
|
23
|
+
- Updated dependencies [7fc464a]
|
|
24
|
+
- Updated dependencies [0f27a97]
|
|
25
|
+
- @mysten/bcs@1.0.3
|
|
26
|
+
|
|
3
27
|
## 1.2.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -12,7 +36,8 @@
|
|
|
12
36
|
|
|
13
37
|
### Minor Changes
|
|
14
38
|
|
|
15
|
-
- fef99d377f: Update parallel executor class to handle gasPrice and budgeting to remove extra rpc
|
|
39
|
+
- fef99d377f: Update parallel executor class to handle gasPrice and budgeting to remove extra rpc
|
|
40
|
+
calls during execution"
|
|
16
41
|
|
|
17
42
|
## 1.1.2
|
|
18
43
|
|
|
@@ -70,8 +95,10 @@
|
|
|
70
95
|
|
|
71
96
|
### Major Changes
|
|
72
97
|
|
|
73
|
-
- a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features
|
|
74
|
-
|
|
98
|
+
- a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features
|
|
99
|
+
and breaking changes. See the
|
|
100
|
+
[full migration guide](https://sdk.mystenlabs.com/typescript/migrations/sui-1.0) for details on
|
|
101
|
+
how to upgrade.
|
|
75
102
|
|
|
76
103
|
### Patch Changes
|
|
77
104
|
|
|
@@ -105,7 +132,8 @@
|
|
|
105
132
|
|
|
106
133
|
### Minor Changes
|
|
107
134
|
|
|
108
|
-
- 929db4976a: Add normalizeSuiNSName and isValidSuiNSName utils, and add a format option to
|
|
135
|
+
- 929db4976a: Add normalizeSuiNSName and isValidSuiNSName utils, and add a format option to
|
|
136
|
+
SuiClient.resolveNameServiceNames
|
|
109
137
|
|
|
110
138
|
## 0.51.2
|
|
111
139
|
|
|
@@ -137,7 +165,8 @@
|
|
|
137
165
|
|
|
138
166
|
### Minor Changes
|
|
139
167
|
|
|
140
|
-
- a34f1cb67d: Use Bech32 instead of Hex for private key export, supports both Hex and Bech32 for
|
|
168
|
+
- a34f1cb67d: Use Bech32 instead of Hex for private key export, supports both Hex and Bech32 for
|
|
169
|
+
importing
|
|
141
170
|
|
|
142
171
|
### Patch Changes
|
|
143
172
|
|
|
@@ -191,9 +220,14 @@
|
|
|
191
220
|
|
|
192
221
|
### Minor Changes
|
|
193
222
|
|
|
194
|
-
- 0259aec82: Removed dependency on @open-rpc/client-js and replaced it with standard fetch and
|
|
223
|
+
- 0259aec82: Removed dependency on @open-rpc/client-js and replaced it with standard fetch and
|
|
224
|
+
WebSocket based APIs
|
|
195
225
|
|
|
196
|
-
If you are using the `subscribeEvent` or `subscribeTransaction` in environments that do not
|
|
226
|
+
If you are using the `subscribeEvent` or `subscribeTransaction` in environments that do not
|
|
227
|
+
support the `WebSocket` api natively (This will be true for most versions of Node.js) you will
|
|
228
|
+
need to provide a WebSocket implementation when creating your SuiClient. You can either use a
|
|
229
|
+
global polyfill for the WebSocket class, or pass a compatible WebSocket implementation into
|
|
230
|
+
SuiHTTPTransport (eg, using the `ws` package)
|
|
197
231
|
|
|
198
232
|
```typescript
|
|
199
233
|
import { getFullnodeUrl, SuiClient, SuiHTTPTransport } from '@mysten/sui.js/client';
|
|
@@ -219,7 +253,8 @@
|
|
|
219
253
|
|
|
220
254
|
### Patch Changes
|
|
221
255
|
|
|
222
|
-
- 652bcdd92: Remove some multisig methods that had previously been deprecated and are no longer
|
|
256
|
+
- 652bcdd92: Remove some multisig methods that had previously been deprecated and are no longer
|
|
257
|
+
exported
|
|
223
258
|
|
|
224
259
|
## 0.46.0
|
|
225
260
|
|
|
@@ -230,7 +265,8 @@
|
|
|
230
265
|
### Patch Changes
|
|
231
266
|
|
|
232
267
|
- 28c2c3330: Use the same issuer string in address derivation for the two google's iss values
|
|
233
|
-
- 43444c58f: Extend the `TransactionBlock#object()` API to accept the `TransactionResult` type as
|
|
268
|
+
- 43444c58f: Extend the `TransactionBlock#object()` API to accept the `TransactionResult` type as
|
|
269
|
+
well, so that it can be used flexibly in SDKs.
|
|
234
270
|
- 8d1e74e52: Fix setting gasPrice for devInspectTransactionBlock
|
|
235
271
|
- 3718a230b: Adds `txb.pure.id()` to pass ID pure values more intuitively
|
|
236
272
|
|
|
@@ -274,7 +310,8 @@
|
|
|
274
310
|
|
|
275
311
|
### Patch Changes
|
|
276
312
|
|
|
277
|
-
- faa13ded9: Ensure that TransactionBlocks can be copied via structuredClone to workaround bug in
|
|
313
|
+
- faa13ded9: Ensure that TransactionBlocks can be copied via structuredClone to workaround bug in
|
|
314
|
+
sui wallet
|
|
278
315
|
- c5684bb52: rename zk to zkLogin
|
|
279
316
|
|
|
280
317
|
## 0.43.0
|
|
@@ -288,7 +325,8 @@
|
|
|
288
325
|
- txb.transferObjects now accepts `address` as JavaScript string
|
|
289
326
|
- All single objects, or lists of objects, now also accepts object IDs as JavaScript strings
|
|
290
327
|
- txb.pure accepts `SerializedBcs` (eg `txb.pure(bcs.U64.serialize(123))`)
|
|
291
|
-
- Added pure helpers (`txb.pure.address()`, `txb.bool()`, and `txb.pure.u{8-256}()`) to simplify
|
|
328
|
+
- Added pure helpers (`txb.pure.address()`, `txb.bool()`, and `txb.pure.u{8-256}()`) to simplify
|
|
329
|
+
serialization of pure values
|
|
292
330
|
- Deprecated using `txb.pure` with raw JavaScript values, or an explicit type argument.
|
|
293
331
|
|
|
294
332
|
- 1bc430161: Updated BCS defintions to use new BCS schema builder
|
|
@@ -330,7 +368,8 @@
|
|
|
330
368
|
|
|
331
369
|
### Minor Changes
|
|
332
370
|
|
|
333
|
-
- ba8e3b857: Rename TransactionBlock generated type in @mysten/sui.js/client to SuiTransactionBlock
|
|
371
|
+
- ba8e3b857: Rename TransactionBlock generated type in @mysten/sui.js/client to SuiTransactionBlock
|
|
372
|
+
to avoid conflicting names in exports
|
|
334
373
|
|
|
335
374
|
### Patch Changes
|
|
336
375
|
|
|
@@ -344,13 +383,15 @@
|
|
|
344
383
|
|
|
345
384
|
### Patch Changes
|
|
346
385
|
|
|
347
|
-
- 8281e3d25: Add new `sign` method to the TransactionBlock class, so that implementing transaction
|
|
386
|
+
- 8281e3d25: Add new `sign` method to the TransactionBlock class, so that implementing transaction
|
|
387
|
+
signing is easier.
|
|
348
388
|
|
|
349
389
|
## 0.39.0
|
|
350
390
|
|
|
351
391
|
### Minor Changes
|
|
352
392
|
|
|
353
|
-
- 47ea5ec7c: Update keypair signature methods to return bytes as a base64 encoded string for better
|
|
393
|
+
- 47ea5ec7c: Update keypair signature methods to return bytes as a base64 encoded string for better
|
|
394
|
+
compatability
|
|
354
395
|
|
|
355
396
|
## 0.38.0
|
|
356
397
|
|
|
@@ -361,8 +402,8 @@
|
|
|
361
402
|
- 0f06d593a: Added a MultiSigPublicKey class for verifying multisig signatures
|
|
362
403
|
- 09f4ed3fc: update signMessage to correctly wrap PersonalMessages before signing
|
|
363
404
|
- 6d41059c7: Deprecate imports from the root path which can be imported from a modular export
|
|
364
|
-
- cc6441f46: The Sui TS SDK has been broken up into a set of modular exports, and all exports from
|
|
365
|
-
the package have been deprecated. The following export paths have been added:
|
|
405
|
+
- cc6441f46: The Sui TS SDK has been broken up into a set of modular exports, and all exports from
|
|
406
|
+
the root of the package have been deprecated. The following export paths have been added:
|
|
366
407
|
|
|
367
408
|
- `@mysten/sui.js/client` - A client for interacting with Sui RPC nodes.
|
|
368
409
|
- `@mysten/sui.js/bcs` - A BCS builder with pre-defined types for Sui.
|
|
@@ -377,23 +418,23 @@
|
|
|
377
418
|
As part of this refactor we are deprecating a number of existing APIs:
|
|
378
419
|
|
|
379
420
|
- `JsonRPCProvider` - This Provider pattern is being replaced by a new `SuiClient`
|
|
380
|
-
- `SignerWithProver` and `RawSigner` - The Concept of Signers is being removed from the SDK.
|
|
381
|
-
in verifying has been moved to the KeyPair classes, and the
|
|
382
|
-
method has been moved to the new `SuiClient`.
|
|
421
|
+
- `SignerWithProver` and `RawSigner` - The Concept of Signers is being removed from the SDK.
|
|
422
|
+
Signing in verifying has been moved to the KeyPair classes, and the
|
|
423
|
+
`signAndExecuteTransactionBlock` method has been moved to the new `SuiClient`.
|
|
383
424
|
- The `superstruct` type definitions for types used by JsonRPCProvider are being replaced with
|
|
384
425
|
generated types exported from `@mysten/sui.js/client`. The new type definitions are pure
|
|
385
426
|
typescript types and can't be used for runtime validation. By generating these as types, it will
|
|
386
427
|
be easier to keep them in sync with the RPC definitions and avoid discrepancies between the type
|
|
387
428
|
definitions in the SDK and the data returned by RPC methods.
|
|
388
429
|
- A large number of "getters" are being deprecated. These getters were intended to reduce friction
|
|
389
|
-
caused by rapid iteration in the RPC layer leading up to the mainnet launch. Now that mainnet
|
|
390
|
-
been launched the RPC API should be more stable, and many of these helpers can be replaced
|
|
391
|
-
simply accessing the nested properties in the returned data directly.
|
|
392
|
-
|
|
393
|
-
The current release should be mostly backwards compatible, and all existing exports will continue
|
|
394
|
-
be available in this release (with deprecation warnings). With the large number of deprecations
|
|
395
|
-
there may be functionality that should be moved into the new modular version of the SDK. If you
|
|
396
|
-
there are features that were deprecated without a suitable replacement, we have created a
|
|
430
|
+
caused by rapid iteration in the RPC layer leading up to the mainnet launch. Now that mainnet
|
|
431
|
+
has been launched the RPC API should be more stable, and many of these helpers can be replaced
|
|
432
|
+
by simply accessing the nested properties in the returned data directly.
|
|
433
|
+
|
|
434
|
+
The current release should be mostly backwards compatible, and all existing exports will continue
|
|
435
|
+
to be available in this release (with deprecation warnings). With the large number of deprecations
|
|
436
|
+
there may be functionality that should be moved into the new modular version of the SDK. If you
|
|
437
|
+
find there are features that were deprecated without a suitable replacement, we have created a
|
|
397
438
|
[Github Discussion thread](https://github.com/MystenLabs/sui/discussions/13150) to track those
|
|
398
439
|
use-cases.
|
|
399
440
|
|
|
@@ -450,8 +491,8 @@
|
|
|
450
491
|
|
|
451
492
|
#### Migrating faucet requests
|
|
452
493
|
|
|
453
|
-
The ability to request Sui from a faucet was not added to `SuiClient`, instead you will need to
|
|
454
|
-
a method `@mysten/sui.js/faucet` to make these requests
|
|
494
|
+
The ability to request Sui from a faucet was not added to `SuiClient`, instead you will need to
|
|
495
|
+
use a method `@mysten/sui.js/faucet` to make these requests
|
|
455
496
|
|
|
456
497
|
```diff
|
|
457
498
|
- import { JsonRpcProvider, devnetConnection } from '@mysten/sui.js';
|
|
@@ -467,12 +508,15 @@
|
|
|
467
508
|
+});
|
|
468
509
|
```
|
|
469
510
|
|
|
470
|
-
- 001148443: Introduce new `@mysten/sui.js/faucet` export, which should be used for all faucet
|
|
511
|
+
- 001148443: Introduce new `@mysten/sui.js/faucet` export, which should be used for all faucet
|
|
512
|
+
interactions. This deprecates the previous `requestSuiFromFaucet` APIs that existed on the
|
|
513
|
+
`JsonRpcProvider` and `Signer` classes.
|
|
471
514
|
|
|
472
515
|
### Patch Changes
|
|
473
516
|
|
|
474
517
|
- ad46f9f2f: add getAllEpochAddressMetrics method to rpc-provider
|
|
475
|
-
- 34242be56: Add new `isTransactionBlock` method, and deprecate the previous `TransactionBlock.is`
|
|
518
|
+
- 34242be56: Add new `isTransactionBlock` method, and deprecate the previous `TransactionBlock.is`
|
|
519
|
+
method
|
|
476
520
|
- 4e2a150a1: websocket client memory leak fix in reconnect logics
|
|
477
521
|
- 83d0fb734: Deprecate type aliases for strings.
|
|
478
522
|
|
|
@@ -504,8 +548,13 @@
|
|
|
504
548
|
### Minor Changes
|
|
505
549
|
|
|
506
550
|
- 3ea9adb71a: Add multisig support
|
|
507
|
-
- 1cfb1c9da3: The `TransactionBlock` builder now uses the protocol config from the chain when
|
|
508
|
-
|
|
551
|
+
- 1cfb1c9da3: The `TransactionBlock` builder now uses the protocol config from the chain when
|
|
552
|
+
constructing and validating transactions, instead of using hard-coded limits. If you wish to
|
|
553
|
+
perform signing offline (without a provider), you can either define a `protocolConfig` option when
|
|
554
|
+
building a transaction, or explicitly set `limits`, which will be used instead of the protocol
|
|
555
|
+
config.
|
|
556
|
+
- fb3bb9118a: Remove logging of RPCValidation errors when typescript types do not match RPC response
|
|
557
|
+
types
|
|
509
558
|
|
|
510
559
|
### Patch Changes
|
|
511
560
|
|
|
@@ -526,13 +575,16 @@
|
|
|
526
575
|
|
|
527
576
|
- 470c27af50: Added network address metrics
|
|
528
577
|
- 671faefe3c: Add `getChainIdentifier` method
|
|
529
|
-
- 9ce7e051b4: Update internal client to use `@open-rpc/client-js` instead of `jayson` and
|
|
578
|
+
- 9ce7e051b4: Update internal client to use `@open-rpc/client-js` instead of `jayson` and
|
|
579
|
+
`rpc-websockets`. This results in a more consistent experience and better error messaging.
|
|
530
580
|
|
|
531
581
|
### Patch Changes
|
|
532
582
|
|
|
533
583
|
- 4ea96d909a: the event BCS data is a base64 string
|
|
534
584
|
- bcbb178c44: Fixes BCS definition so it matches the RPC one
|
|
535
|
-
- 03828224c9: Previously, effects had an unwrapped_then_deleted field on ts-sdk. This is an issue
|
|
585
|
+
- 03828224c9: Previously, effects had an unwrapped_then_deleted field on ts-sdk. This is an issue
|
|
586
|
+
since jsonrpc returns the field as unwrappedThenDeleted. Update the transaction type definition to
|
|
587
|
+
use camelcase.
|
|
536
588
|
- 9ce7e051b4: Add `subscribeTransaction` method.
|
|
537
589
|
- bb50698551: Fixes BCS type definition in the type layout
|
|
538
590
|
|
|
@@ -573,13 +625,17 @@
|
|
|
573
625
|
|
|
574
626
|
### Patch Changes
|
|
575
627
|
|
|
576
|
-
- 4ae3cbea3: Response for `getCoinMetadata` is now nullable, in the event that no metadata can be
|
|
628
|
+
- 4ae3cbea3: Response for `getCoinMetadata` is now nullable, in the event that no metadata can be
|
|
629
|
+
found.
|
|
577
630
|
- d2755a496: Fix dependency on msw
|
|
578
631
|
- f612dac98: Change the default gas budgeting to take storage rebates into account.
|
|
579
632
|
- c219e7470: Changed the response type of `getRpcApiVersion` to string.
|
|
580
|
-
- 59ae0e7d6: Removed `skipDataValidation` option, this is now not configurable and is the default
|
|
581
|
-
|
|
582
|
-
-
|
|
633
|
+
- 59ae0e7d6: Removed `skipDataValidation` option, this is now not configurable and is the default
|
|
634
|
+
behavior.
|
|
635
|
+
- c219e7470: Fix type of `limit` on `getCheckpoints` and `getEpochs` API so that is correctly a
|
|
636
|
+
number.
|
|
637
|
+
- 4e463c691: Add `waitForTransactionBlock` API to wait for a transaction to be available over the
|
|
638
|
+
API.
|
|
583
639
|
- b4f0bfc76: Fix type definitions for package exports.
|
|
584
640
|
- Updated dependencies [b4f0bfc76]
|
|
585
641
|
- @mysten/bcs@0.7.1
|
|
@@ -594,7 +650,9 @@
|
|
|
594
650
|
|
|
595
651
|
### Minor Changes
|
|
596
652
|
|
|
597
|
-
- 9b42d0ada: This release replaces all uint64 and uint128 numbers with BigInt in all JSON RPC
|
|
653
|
+
- 9b42d0ada: This release replaces all uint64 and uint128 numbers with BigInt in all JSON RPC
|
|
654
|
+
responses to preserve precision. This is a Major Breaking Change - you must update your TS-SDK to
|
|
655
|
+
latest version
|
|
598
656
|
|
|
599
657
|
## 0.31.0
|
|
600
658
|
|
|
@@ -613,59 +671,105 @@
|
|
|
613
671
|
|
|
614
672
|
### Minor Changes
|
|
615
673
|
|
|
616
|
-
- 956ec28eb: Change `signMessage` to return message bytes. Add support for sui:signMessage in the
|
|
674
|
+
- 956ec28eb: Change `signMessage` to return message bytes. Add support for sui:signMessage in the
|
|
675
|
+
wallet standard
|
|
617
676
|
- 4adfbff73: Use Blake2b instead of sha3_256 for address generation
|
|
618
|
-
- 4c4573ebe: Removed DevInspectResultsType and now DevInspectResults has a property results of
|
|
677
|
+
- 4c4573ebe: Removed DevInspectResultsType and now DevInspectResults has a property results of
|
|
678
|
+
ExecutionResultType and a property error
|
|
619
679
|
- acc2edb31: Update schema for `SuiSystemState` and `DelegatedStake`
|
|
620
|
-
- 941b03af1: Change functions in transactions.ts of ts-sdk such that: `getTotalGasUsed` and
|
|
621
|
-
|
|
680
|
+
- 941b03af1: Change functions in transactions.ts of ts-sdk such that: `getTotalGasUsed` and
|
|
681
|
+
`getTotalGasUsedUpperBound` of ts-sdk return a `bigint`,fields of `gasCostSummary` are defined as
|
|
682
|
+
`string`, `epochId` is defined as `string`. In `sui-json-rpc` the corresponding types are defined
|
|
683
|
+
as `BigInt`. Introduce `SuiEpochId` type to `sui-json-rpc` types that is a `BigInt`.
|
|
684
|
+
- a6690ac7d: Changed the default behavior of `publish` to publish an upgreadeable-by-sender package
|
|
685
|
+
instead of immutable.
|
|
622
686
|
- a211dc03a: Change object digest from Base64 encoded to Base58 encoded for rpc version >= 0.28.0
|
|
623
|
-
- 4c1e331b8: Gas budget is now optional, and will automatically be computed by executing a dry-run
|
|
624
|
-
|
|
625
|
-
-
|
|
687
|
+
- 4c1e331b8: Gas budget is now optional, and will automatically be computed by executing a dry-run
|
|
688
|
+
when not provided.
|
|
689
|
+
- 19b567f21: Unified self- and delegated staking flows. Removed fields from `Validator`
|
|
690
|
+
(`stake_amount`, `pending_stake`, and `pending_withdraw`) and renamed `delegation_staking_pool` to
|
|
691
|
+
`staking_pool`. Additionally removed the `validator_stake` and `delegated_stake` fields in the
|
|
692
|
+
`ValidatorSet` type and replaced them with a `total_stake` field.
|
|
693
|
+
- 7659e2e91: Introduce new `Transaction` builder class, and deprecate all existing methods of
|
|
694
|
+
sending transactions. The new builder class is designed to take full advantage of Programmable
|
|
695
|
+
Transactions. Any transaction using the previous `SignableTransaction` interface will be converted
|
|
696
|
+
to a `Transaction` class when possible, but this interface will be fully removed soon.
|
|
626
697
|
- 0d3cb44d9: Change all snake_case field in ts-sdk normalized.ts to camelCase.
|
|
627
|
-
- 36c264ebb: Remove `generateTransactionDigest`. Use one of the following instead:
|
|
628
|
-
|
|
698
|
+
- 36c264ebb: Remove `generateTransactionDigest`. Use one of the following instead:
|
|
699
|
+
`signer.getTransactionDigest`, `Transaction.getDigest()` or
|
|
700
|
+
`TransactionDataBuilder.getDigestFromBytes()` instead.
|
|
701
|
+
- 891abf5ed: Remove support for RPC Batch Request in favor of multiGetTransactions and
|
|
702
|
+
multiGetObjects
|
|
629
703
|
- 2e0ef59fa: Added VALIDATORS_EVENTS_QUERY
|
|
630
|
-
- 33cb357e1: Change functions in json-rpc-provider.ts of ts-sdk such that:
|
|
704
|
+
- 33cb357e1: Change functions in json-rpc-provider.ts of ts-sdk such that:
|
|
705
|
+
`getTotalTransactionBlocks`, `getReferenceGasPrice` return a `bigint`,
|
|
706
|
+
`getLatestCheckpointSequenceNumber` returns a `string`, `gasPrice` of `devInspectTransactionBlock`
|
|
707
|
+
is defined as a `string`, checkpoint sequence number of `getCheckpoint` is defined as a `string`,
|
|
708
|
+
`cursor` of `getCheckpoints` is defined as a `string`. Introduce `SuiCheckpointSequenceNumber`
|
|
709
|
+
type in sui-json-rpc-types that is a `BigInt` to use instead of `CheckpointSequenceNumber` of
|
|
710
|
+
sui-types.
|
|
631
711
|
- 6bd88570c: Rework all coin APIs to take objects as arguments instead of positional arguments.
|
|
632
|
-
- f1e42f792: Consolidate get_object and get_raw_object into a single get_object endpoint which now
|
|
712
|
+
- f1e42f792: Consolidate get_object and get_raw_object into a single get_object endpoint which now
|
|
713
|
+
takes an additional config parameter with type `SuiObjectDataOptions` and has a new return type
|
|
714
|
+
`SuiObjectResponse`. By default, only object_id, version, and digest are fetched.
|
|
633
715
|
- 272389c20: Support for new versioned TransactionData format
|
|
634
716
|
- 3de8de361: Remove `getSuiSystemState` method. Use `getLatestSuiSystemState` method instead.
|
|
635
|
-
- be3c4f51e: Add `display` field in `SuiObjectResponse` for frontend rendering. See more details in
|
|
636
|
-
|
|
637
|
-
-
|
|
638
|
-
|
|
639
|
-
|
|
717
|
+
- be3c4f51e: Add `display` field in `SuiObjectResponse` for frontend rendering. See more details in
|
|
718
|
+
https://forums.sui.io/t/nft-object-display-proposal/4872
|
|
719
|
+
- dbe73d5a4: Update `executeTransaction` and `signAndExecuteTransaction` to take in an additional
|
|
720
|
+
parameter `SuiTransactionBlockResponseOptions` which is used to specify which fields to include in
|
|
721
|
+
`SuiTransactionBlockResponse` (e.g., transaction, effects, events, etc). By default, only the
|
|
722
|
+
transaction digest will be included.
|
|
723
|
+
- c82e4b454: Introduce BigInt struct to sui-json-rpc-types to serialize and deserialize amounts
|
|
724
|
+
to/from string. Change ts-sdk to serialize amounts of PaySui and Pay as string.
|
|
725
|
+
- 7a2eaf4a3: Changing the SuiObjectResponse struct to use data/error fields instead of
|
|
726
|
+
details/status
|
|
727
|
+
- 2ef2bb59e: Deprecate getTransactionDigestsInRange. This method will be removed before April 2023,
|
|
728
|
+
please use `getTransactions` instead
|
|
640
729
|
- 9b29bef37: Pass blake2b hash to signer API
|
|
641
730
|
- 8700809b5: Add a new `getCheckpoints` endpoint that returns a paginated list of checkpoints.
|
|
642
731
|
- 5c3b00cde: Add object id to staking pool and pool id to staked sui.
|
|
643
|
-
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
732
|
+
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
733
|
+
`getCheckpointSummary` and `getCheckpointSummaryByDigest` methods.
|
|
644
734
|
- 9822357d6: Add getStakesByIds to get DelegatedStake queried by id
|
|
645
|
-
- 3d9a04648: Adds `deactivation_epoch` to staking pool object, and adds `inactive_pools` to the
|
|
735
|
+
- 3d9a04648: Adds `deactivation_epoch` to staking pool object, and adds `inactive_pools` to the
|
|
736
|
+
validator set object.
|
|
646
737
|
- da72e73a9: Change the address of Move package for staking and validator related Move modules.
|
|
647
738
|
- a0955c479: Switch from 20 to 32-byte address. Match Secp256k1.deriveKeypair with Ed25519.
|
|
648
739
|
- 0c9047698: Remove all gas selection APIs from the json rpc provider.
|
|
649
|
-
- d5ef1b6e5: Added dependencies to publish command, dependencies now also returned from the sui move
|
|
650
|
-
|
|
740
|
+
- d5ef1b6e5: Added dependencies to publish command, dependencies now also returned from the sui move
|
|
741
|
+
CLI with the `--dump-bytecode-as-base64` flag
|
|
742
|
+
- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various
|
|
743
|
+
capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument
|
|
744
|
+
names, RPC endpoints, Move functions, and object fields have been updated with this new naming
|
|
745
|
+
convention.
|
|
651
746
|
- 3de8de361: Remove `getValidators` API. Use `getLatestSuiSystemState` instead.
|
|
652
747
|
- dd348cf03: Refactor `getTransactions` to `queryTransactions`
|
|
653
748
|
- 57c17e02a: Removed `JsonRpcProviderWithCache`, use `JsonRpcProvider` instead.
|
|
654
|
-
- 65f1372dd: Rename `provider.getTransactionWithEffects` to `provider.getTransaction`. The new
|
|
749
|
+
- 65f1372dd: Rename `provider.getTransactionWithEffects` to `provider.getTransaction`. The new
|
|
750
|
+
method takes in an additional parameter `SuiTransactionBlockResponseOptions` to configure which
|
|
751
|
+
fields to fetch(transaction, effects, events, etc). By default, only the transaction digest will
|
|
752
|
+
be returned.
|
|
655
753
|
- a09239308: [testing only] an intent scope can be passed in to verifyMessage
|
|
656
|
-
- fe335e6ba: Removed usage of `cross-fetch` in the TypeScript SDK. If you are running in an
|
|
754
|
+
- fe335e6ba: Removed usage of `cross-fetch` in the TypeScript SDK. If you are running in an
|
|
755
|
+
environment that does not have `fetch` defined, you will need to polyfill it.
|
|
657
756
|
- 5dc25faad: Remove getTransactionDigestsInRange from the SDK
|
|
658
757
|
- 64234baaf: added combined `getCheckpoint` endpoint for retrieving information about a checkpoint
|
|
659
758
|
- d3170ba41: All JSON-RPC APIs now accept objects instead of positional arugments.
|
|
660
|
-
- a6ffb8088: Removed events from transaction effects, TransactionEvents will now be provided in the
|
|
661
|
-
|
|
759
|
+
- a6ffb8088: Removed events from transaction effects, TransactionEvents will now be provided in the
|
|
760
|
+
TransactionResponse, along side TransactionEffects.
|
|
761
|
+
- 3304eb83b: Refactor Rust SuiTransactionBlockKind to be internally tagged for Json serialization
|
|
762
|
+
with tag="type" and SuiEvent to be adjacently tagged with tag="type" and content="content"
|
|
662
763
|
- 4189171ef: Adds support for validator candidate.
|
|
663
764
|
- 77bdf907f: When parsing u64, u128, and u256 values with bcs, they are now string encoded.
|
|
664
765
|
- a74df16ec: Minor change to the system transaction format
|
|
665
|
-
- 0f7aa6507: Switching the response type of the getOwnedObjects api to a paginatedObjects response,
|
|
766
|
+
- 0f7aa6507: Switching the response type of the getOwnedObjects api to a paginatedObjects response,
|
|
767
|
+
and also moving filtering to FN
|
|
666
768
|
- 9b60bf700: Change all snake_case fields in checkpoint.ts and faucet.ts to camelCase
|
|
667
|
-
- 64fb649eb: Remove old `SuiExecuteTransactionResponse` interface, and `CertifiedTransaction`
|
|
668
|
-
|
|
769
|
+
- 64fb649eb: Remove old `SuiExecuteTransactionResponse` interface, and `CertifiedTransaction`
|
|
770
|
+
interface in favor of the new unified `SuiTransactionBlockResponse` interfaces.
|
|
771
|
+
- a6b0c4e5f: Changed the getOwnerObjectsForAddress api to getOwnedObjects, and added options/
|
|
772
|
+
pagination to the parameters
|
|
669
773
|
|
|
670
774
|
### Patch Changes
|
|
671
775
|
|
|
@@ -688,7 +792,8 @@
|
|
|
688
792
|
|
|
689
793
|
### Patch Changes
|
|
690
794
|
|
|
691
|
-
- 31bfcae6a: Make arguments field optional for MoveCall to match Rust definition. This fixes a bug
|
|
795
|
+
- 31bfcae6a: Make arguments field optional for MoveCall to match Rust definition. This fixes a bug
|
|
796
|
+
where the Explorer page does not load for transactions with no argument.
|
|
692
797
|
|
|
693
798
|
## 0.29.0
|
|
694
799
|
|
|
@@ -696,7 +801,8 @@
|
|
|
696
801
|
|
|
697
802
|
- f2e713bd0: Add TransactionExpiration to TransactionData
|
|
698
803
|
- 4baf554f1: Make fromSecretKey take the 32 bytes privkey
|
|
699
|
-
- aa650aa3b: Introduce new `Connection` class, which is used to define the endpoints that are used
|
|
804
|
+
- aa650aa3b: Introduce new `Connection` class, which is used to define the endpoints that are used
|
|
805
|
+
when interacting with the network.
|
|
700
806
|
- 6ff0c785f: Use DynamicFieldName struct instead of string for dynamic field's name
|
|
701
807
|
|
|
702
808
|
### Patch Changes
|
|
@@ -711,9 +817,15 @@
|
|
|
711
817
|
|
|
712
818
|
### Minor Changes
|
|
713
819
|
|
|
714
|
-
- a67cc044b: Transaction signatures are now serialized into a single string, and all APIs that
|
|
715
|
-
|
|
716
|
-
|
|
820
|
+
- a67cc044b: Transaction signatures are now serialized into a single string, and all APIs that
|
|
821
|
+
previously took the public key, signature, and scheme now just take the single serialized
|
|
822
|
+
signature string. To help make parsing this easier, there are new `toSerializedSignature` and
|
|
823
|
+
`toParsedSignaturePubkeyPair` methods exposed as well.
|
|
824
|
+
- a67cc044b: The RawSigner now provides a `signTransaction` function, which can be used to sign a
|
|
825
|
+
transaction without submitting it to the network.
|
|
826
|
+
- a67cc044b: The RawSigner now provides a `signMessage` function that can be used to sign personal
|
|
827
|
+
messages. The SDK also now exports a `verifyMessage` function that can be used to easily verify a
|
|
828
|
+
message signed with `signMessage`.
|
|
717
829
|
|
|
718
830
|
### Patch Changes
|
|
719
831
|
|
|
@@ -725,7 +837,8 @@
|
|
|
725
837
|
|
|
726
838
|
### Minor Changes
|
|
727
839
|
|
|
728
|
-
- 473005d8f: Add protocol_version to CheckpointSummary and SuiSystemObject. Consolidate end-of-epoch
|
|
840
|
+
- 473005d8f: Add protocol_version to CheckpointSummary and SuiSystemObject. Consolidate end-of-epoch
|
|
841
|
+
information in CheckpointSummary.
|
|
729
842
|
- 59641dc29: Support for deserializing new ConsensusCommitPrologue system transaction
|
|
730
843
|
- 629804d26: Remove usage of `Base64DataBuffer`, and use `Uint8Array` instead.
|
|
731
844
|
- f51c85e85: remove get_objects_owned_by_object and replace it with get_dynamic_fields
|
|
@@ -761,7 +874,8 @@
|
|
|
761
874
|
|
|
762
875
|
### Minor Changes
|
|
763
876
|
|
|
764
|
-
- 7b4bf43bc: Support for interacting with Devnet v0.24+ where Move Calls refer to their packages by
|
|
877
|
+
- 7b4bf43bc: Support for interacting with Devnet v0.24+ where Move Calls refer to their packages by
|
|
878
|
+
ObjectID only (not ObjectRef).
|
|
765
879
|
|
|
766
880
|
### Patch Changes
|
|
767
881
|
|
|
@@ -778,7 +892,8 @@
|
|
|
778
892
|
### Patch Changes
|
|
779
893
|
|
|
780
894
|
- 01458ffd5: Fix websocket default port for DevNet
|
|
781
|
-
- a274ecfc7: Make previousTransaction optional for CoinStruct to support v0.22 network where it
|
|
895
|
+
- a274ecfc7: Make previousTransaction optional for CoinStruct to support v0.22 network where it
|
|
896
|
+
doesn't exist
|
|
782
897
|
- 89091ddab: change estimator logic to use upper bound
|
|
783
898
|
- 71bee7563: fix creating websocket url
|
|
784
899
|
|
|
@@ -814,16 +929,22 @@
|
|
|
814
929
|
### Minor Changes
|
|
815
930
|
|
|
816
931
|
- 4fb12ac6d: - removes `transfer` function from framework Coin
|
|
817
|
-
- renames `newTransferTx` function from framework Coin to `newPayTransaction`. Also it's now a
|
|
932
|
+
- renames `newTransferTx` function from framework Coin to `newPayTransaction`. Also it's now a
|
|
933
|
+
public method and without the need of signer so a dapp can use it
|
|
818
934
|
- fixes edge cases with pay txs
|
|
819
935
|
- bb14ffdc5: Remove ImmediateReturn and WaitForTxCert from ExecuteTransactionRequestType
|
|
820
|
-
- d2015f815: Rebuilt type-narrowing utilties (e.g. `isSuiObject`) on top of Superstruct, which
|
|
821
|
-
The type-narrowing functions are no longer exported, instead a
|
|
822
|
-
|
|
936
|
+
- d2015f815: Rebuilt type-narrowing utilties (e.g. `isSuiObject`) on top of Superstruct, which
|
|
937
|
+
should make them more reliable. The type-narrowing functions are no longer exported, instead a
|
|
938
|
+
Superstruct schema is exported, in addition to an `is` and `assert` function, both of which can be
|
|
939
|
+
used to replace the previous narrowing functions. For example, `isSuiObject(data)` becomes
|
|
940
|
+
`is(data, SuiObject)`.
|
|
941
|
+
- 7d0f25b61: Add devInspectTransaction, which is similar to dryRunTransaction, but lets you call any
|
|
942
|
+
Move function(including non-entry function) with arbitrary values.
|
|
823
943
|
|
|
824
944
|
### Patch Changes
|
|
825
945
|
|
|
826
|
-
- 9fbe2714b: Add devInspectMoveCall, which is similar to devInspectTransaction, but lets you call
|
|
946
|
+
- 9fbe2714b: Add devInspectMoveCall, which is similar to devInspectTransaction, but lets you call
|
|
947
|
+
any Move function without a gas object and budget
|
|
827
948
|
|
|
828
949
|
## 0.20.0
|
|
829
950
|
|
|
@@ -874,7 +995,8 @@
|
|
|
874
995
|
|
|
875
996
|
- a9602e533: Remove deprecated events API
|
|
876
997
|
- db22728c1: \* adds dryRunTransaction support
|
|
877
|
-
- adds getGasCostEstimation to the signer-with-provider that estimates the gas cost for a
|
|
998
|
+
- adds getGasCostEstimation to the signer-with-provider that estimates the gas cost for a
|
|
999
|
+
transaction
|
|
878
1000
|
- 3b510d0fc: adds coin transfer method to framework that uses pay and paySui
|
|
879
1001
|
|
|
880
1002
|
## 0.16.0
|
|
@@ -917,7 +1039,8 @@
|
|
|
917
1039
|
- b4a8ee9bf: Support passing a vector of objects in LocalTxnBuilder
|
|
918
1040
|
- ef3571dc8: Fix gas selection bug for a vector of objects
|
|
919
1041
|
- cccfe9315: Add deserialization util method to LocalTxnDataSerializer
|
|
920
|
-
- 2dc594ef7: Introduce getCoinDenominationInfo, which returns denomination info of a coin, now only
|
|
1042
|
+
- 2dc594ef7: Introduce getCoinDenominationInfo, which returns denomination info of a coin, now only
|
|
1043
|
+
supporting SUI coin.
|
|
921
1044
|
- 4f0c611ff: Protocol change to add 'initial shared version' to shared object references.
|
|
922
1045
|
|
|
923
1046
|
## 0.13.0
|
|
@@ -934,10 +1057,13 @@
|
|
|
934
1057
|
### Minor Changes
|
|
935
1058
|
|
|
936
1059
|
- e0b173b9e: Standardize Ed25519KeyPair key derivation with SLIP10
|
|
937
|
-
- 059ede517: Flip the default value of `skipDataValidation` to true in order to mitigate the impact
|
|
1060
|
+
- 059ede517: Flip the default value of `skipDataValidation` to true in order to mitigate the impact
|
|
1061
|
+
of breaking changes on applications. When there's a mismatch between the TypeScript definitions
|
|
1062
|
+
and RPC response, the SDK now log a console warning instead of throwing an error.
|
|
938
1063
|
- 03e6b552b: Add util function to get coin balances
|
|
939
1064
|
- 4575c0a02: Fix type definition of SuiMoveNormalizedType
|
|
940
|
-
- ccf7f148d: Added generic signAndExecuteTransaction method to the SDK, which can be used with any
|
|
1065
|
+
- ccf7f148d: Added generic signAndExecuteTransaction method to the SDK, which can be used with any
|
|
1066
|
+
supported type of transaction.
|
|
941
1067
|
|
|
942
1068
|
### Patch Changes
|
|
943
1069
|
|
package/README.md
CHANGED
|
@@ -478,47 +478,3 @@ const events = client.queryEvents({
|
|
|
478
478
|
limit: 2,
|
|
479
479
|
});
|
|
480
480
|
```
|
|
481
|
-
|
|
482
|
-
Subscribe to all events created by transactions sent by account
|
|
483
|
-
`0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231`
|
|
484
|
-
|
|
485
|
-
```typescript
|
|
486
|
-
import { getFullnodeUrl, SuiClient } from '@mysten/sui/client';
|
|
487
|
-
|
|
488
|
-
const client = new SuiClient({
|
|
489
|
-
url: getFullnodeUrl('testnet'),
|
|
490
|
-
});
|
|
491
|
-
// calls RPC method 'suix_subscribeEvent' with params:
|
|
492
|
-
// [ { Sender: '0xbff6ccc8707aa517b4f1b95750a2a8c666012df3' } ]
|
|
493
|
-
const unsubscribe = await client.subscribeEvent({
|
|
494
|
-
filter: {
|
|
495
|
-
Sender: '0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231',
|
|
496
|
-
},
|
|
497
|
-
onMessage(event) {
|
|
498
|
-
// handle subscription notification message here. This function is called once per subscription message.
|
|
499
|
-
},
|
|
500
|
-
});
|
|
501
|
-
|
|
502
|
-
// later, to unsubscribe:
|
|
503
|
-
await unsubscribe();
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
Subscribe to all events created by a package's `nft` module
|
|
507
|
-
|
|
508
|
-
```typescript
|
|
509
|
-
import { getFullnodeUrl, SuiClient } from '@mysten/sui/client';
|
|
510
|
-
|
|
511
|
-
const client = new SuiClient({
|
|
512
|
-
url: getFullnodeUrl('testnet'),
|
|
513
|
-
});
|
|
514
|
-
const somePackage = '0x...';
|
|
515
|
-
const devnetNftFilter = {
|
|
516
|
-
MoveModule: { package: somePackage, module: 'nft' },
|
|
517
|
-
};
|
|
518
|
-
const devNftSub = await client.subscribeEvent({
|
|
519
|
-
filter: devnetNftFilter,
|
|
520
|
-
onMessage(event) {
|
|
521
|
-
// handle subscription notification message here
|
|
522
|
-
},
|
|
523
|
-
});
|
|
524
|
-
```
|
package/dist/cjs/bcs/bcs.d.ts
CHANGED
|
@@ -1455,7 +1455,7 @@ export declare function IntentMessage<T extends BcsType<any>>(T: T): BcsType<{
|
|
|
1455
1455
|
$kind: "Sui";
|
|
1456
1456
|
};
|
|
1457
1457
|
};
|
|
1458
|
-
value: T extends BcsType<infer
|
|
1458
|
+
value: T extends BcsType<infer U, any> ? U : never;
|
|
1459
1459
|
}, {
|
|
1460
1460
|
intent: {
|
|
1461
1461
|
scope: import("@mysten/bcs").EnumInputShape<{
|
|
@@ -1471,7 +1471,7 @@ export declare function IntentMessage<T extends BcsType<any>>(T: T): BcsType<{
|
|
|
1471
1471
|
Sui: boolean | object | null;
|
|
1472
1472
|
};
|
|
1473
1473
|
};
|
|
1474
|
-
value: T extends BcsType<any, infer
|
|
1474
|
+
value: T extends BcsType<any, infer U_1> ? U_1 : never;
|
|
1475
1475
|
}>;
|
|
1476
1476
|
export declare const CompressedSignature: BcsType<import("@mysten/bcs").EnumOutputShapeWithKeys<{
|
|
1477
1477
|
ED25519: number[];
|