@mysten/sui 1.2.1 → 1.3.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 +204 -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 +1 -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 +1 -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 +1 -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,23 @@
|
|
|
1
1
|
# @mysten/sui.js
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 086b2bc: Add waitForLastTransaction methods to all executor classes
|
|
8
|
+
- cdedf69: Add Argument helpers for constructing transaction arguments without a Transaction
|
|
9
|
+
instance
|
|
10
|
+
- beed646: Add tx.pure.vector and tx.pure.option methods
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7fc464a: Remove unique symbols from types to improve compatability between version
|
|
15
|
+
- 0fb0628: Mark subscription methods as deprecated.
|
|
16
|
+
- 0f27a97: Update dependencies
|
|
17
|
+
- Updated dependencies [7fc464a]
|
|
18
|
+
- Updated dependencies [0f27a97]
|
|
19
|
+
- @mysten/bcs@1.0.3
|
|
20
|
+
|
|
3
21
|
## 1.2.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -12,7 +30,8 @@
|
|
|
12
30
|
|
|
13
31
|
### Minor Changes
|
|
14
32
|
|
|
15
|
-
- fef99d377f: Update parallel executor class to handle gasPrice and budgeting to remove extra rpc
|
|
33
|
+
- fef99d377f: Update parallel executor class to handle gasPrice and budgeting to remove extra rpc
|
|
34
|
+
calls during execution"
|
|
16
35
|
|
|
17
36
|
## 1.1.2
|
|
18
37
|
|
|
@@ -70,8 +89,10 @@
|
|
|
70
89
|
|
|
71
90
|
### Major Changes
|
|
72
91
|
|
|
73
|
-
- a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features
|
|
74
|
-
|
|
92
|
+
- a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features
|
|
93
|
+
and breaking changes. See the
|
|
94
|
+
[full migration guide](https://sdk.mystenlabs.com/typescript/migrations/sui-1.0) for details on
|
|
95
|
+
how to upgrade.
|
|
75
96
|
|
|
76
97
|
### Patch Changes
|
|
77
98
|
|
|
@@ -105,7 +126,8 @@
|
|
|
105
126
|
|
|
106
127
|
### Minor Changes
|
|
107
128
|
|
|
108
|
-
- 929db4976a: Add normalizeSuiNSName and isValidSuiNSName utils, and add a format option to
|
|
129
|
+
- 929db4976a: Add normalizeSuiNSName and isValidSuiNSName utils, and add a format option to
|
|
130
|
+
SuiClient.resolveNameServiceNames
|
|
109
131
|
|
|
110
132
|
## 0.51.2
|
|
111
133
|
|
|
@@ -137,7 +159,8 @@
|
|
|
137
159
|
|
|
138
160
|
### Minor Changes
|
|
139
161
|
|
|
140
|
-
- a34f1cb67d: Use Bech32 instead of Hex for private key export, supports both Hex and Bech32 for
|
|
162
|
+
- a34f1cb67d: Use Bech32 instead of Hex for private key export, supports both Hex and Bech32 for
|
|
163
|
+
importing
|
|
141
164
|
|
|
142
165
|
### Patch Changes
|
|
143
166
|
|
|
@@ -191,9 +214,14 @@
|
|
|
191
214
|
|
|
192
215
|
### Minor Changes
|
|
193
216
|
|
|
194
|
-
- 0259aec82: Removed dependency on @open-rpc/client-js and replaced it with standard fetch and
|
|
217
|
+
- 0259aec82: Removed dependency on @open-rpc/client-js and replaced it with standard fetch and
|
|
218
|
+
WebSocket based APIs
|
|
195
219
|
|
|
196
|
-
If you are using the `subscribeEvent` or `subscribeTransaction` in environments that do not
|
|
220
|
+
If you are using the `subscribeEvent` or `subscribeTransaction` in environments that do not
|
|
221
|
+
support the `WebSocket` api natively (This will be true for most versions of Node.js) you will
|
|
222
|
+
need to provide a WebSocket implementation when creating your SuiClient. You can either use a
|
|
223
|
+
global polyfill for the WebSocket class, or pass a compatible WebSocket implementation into
|
|
224
|
+
SuiHTTPTransport (eg, using the `ws` package)
|
|
197
225
|
|
|
198
226
|
```typescript
|
|
199
227
|
import { getFullnodeUrl, SuiClient, SuiHTTPTransport } from '@mysten/sui.js/client';
|
|
@@ -219,7 +247,8 @@
|
|
|
219
247
|
|
|
220
248
|
### Patch Changes
|
|
221
249
|
|
|
222
|
-
- 652bcdd92: Remove some multisig methods that had previously been deprecated and are no longer
|
|
250
|
+
- 652bcdd92: Remove some multisig methods that had previously been deprecated and are no longer
|
|
251
|
+
exported
|
|
223
252
|
|
|
224
253
|
## 0.46.0
|
|
225
254
|
|
|
@@ -230,7 +259,8 @@
|
|
|
230
259
|
### Patch Changes
|
|
231
260
|
|
|
232
261
|
- 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
|
|
262
|
+
- 43444c58f: Extend the `TransactionBlock#object()` API to accept the `TransactionResult` type as
|
|
263
|
+
well, so that it can be used flexibly in SDKs.
|
|
234
264
|
- 8d1e74e52: Fix setting gasPrice for devInspectTransactionBlock
|
|
235
265
|
- 3718a230b: Adds `txb.pure.id()` to pass ID pure values more intuitively
|
|
236
266
|
|
|
@@ -274,7 +304,8 @@
|
|
|
274
304
|
|
|
275
305
|
### Patch Changes
|
|
276
306
|
|
|
277
|
-
- faa13ded9: Ensure that TransactionBlocks can be copied via structuredClone to workaround bug in
|
|
307
|
+
- faa13ded9: Ensure that TransactionBlocks can be copied via structuredClone to workaround bug in
|
|
308
|
+
sui wallet
|
|
278
309
|
- c5684bb52: rename zk to zkLogin
|
|
279
310
|
|
|
280
311
|
## 0.43.0
|
|
@@ -288,7 +319,8 @@
|
|
|
288
319
|
- txb.transferObjects now accepts `address` as JavaScript string
|
|
289
320
|
- All single objects, or lists of objects, now also accepts object IDs as JavaScript strings
|
|
290
321
|
- 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
|
|
322
|
+
- Added pure helpers (`txb.pure.address()`, `txb.bool()`, and `txb.pure.u{8-256}()`) to simplify
|
|
323
|
+
serialization of pure values
|
|
292
324
|
- Deprecated using `txb.pure` with raw JavaScript values, or an explicit type argument.
|
|
293
325
|
|
|
294
326
|
- 1bc430161: Updated BCS defintions to use new BCS schema builder
|
|
@@ -330,7 +362,8 @@
|
|
|
330
362
|
|
|
331
363
|
### Minor Changes
|
|
332
364
|
|
|
333
|
-
- ba8e3b857: Rename TransactionBlock generated type in @mysten/sui.js/client to SuiTransactionBlock
|
|
365
|
+
- ba8e3b857: Rename TransactionBlock generated type in @mysten/sui.js/client to SuiTransactionBlock
|
|
366
|
+
to avoid conflicting names in exports
|
|
334
367
|
|
|
335
368
|
### Patch Changes
|
|
336
369
|
|
|
@@ -344,13 +377,15 @@
|
|
|
344
377
|
|
|
345
378
|
### Patch Changes
|
|
346
379
|
|
|
347
|
-
- 8281e3d25: Add new `sign` method to the TransactionBlock class, so that implementing transaction
|
|
380
|
+
- 8281e3d25: Add new `sign` method to the TransactionBlock class, so that implementing transaction
|
|
381
|
+
signing is easier.
|
|
348
382
|
|
|
349
383
|
## 0.39.0
|
|
350
384
|
|
|
351
385
|
### Minor Changes
|
|
352
386
|
|
|
353
|
-
- 47ea5ec7c: Update keypair signature methods to return bytes as a base64 encoded string for better
|
|
387
|
+
- 47ea5ec7c: Update keypair signature methods to return bytes as a base64 encoded string for better
|
|
388
|
+
compatability
|
|
354
389
|
|
|
355
390
|
## 0.38.0
|
|
356
391
|
|
|
@@ -361,8 +396,8 @@
|
|
|
361
396
|
- 0f06d593a: Added a MultiSigPublicKey class for verifying multisig signatures
|
|
362
397
|
- 09f4ed3fc: update signMessage to correctly wrap PersonalMessages before signing
|
|
363
398
|
- 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:
|
|
399
|
+
- cc6441f46: The Sui TS SDK has been broken up into a set of modular exports, and all exports from
|
|
400
|
+
the root of the package have been deprecated. The following export paths have been added:
|
|
366
401
|
|
|
367
402
|
- `@mysten/sui.js/client` - A client for interacting with Sui RPC nodes.
|
|
368
403
|
- `@mysten/sui.js/bcs` - A BCS builder with pre-defined types for Sui.
|
|
@@ -377,23 +412,23 @@
|
|
|
377
412
|
As part of this refactor we are deprecating a number of existing APIs:
|
|
378
413
|
|
|
379
414
|
- `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`.
|
|
415
|
+
- `SignerWithProver` and `RawSigner` - The Concept of Signers is being removed from the SDK.
|
|
416
|
+
Signing in verifying has been moved to the KeyPair classes, and the
|
|
417
|
+
`signAndExecuteTransactionBlock` method has been moved to the new `SuiClient`.
|
|
383
418
|
- The `superstruct` type definitions for types used by JsonRPCProvider are being replaced with
|
|
384
419
|
generated types exported from `@mysten/sui.js/client`. The new type definitions are pure
|
|
385
420
|
typescript types and can't be used for runtime validation. By generating these as types, it will
|
|
386
421
|
be easier to keep them in sync with the RPC definitions and avoid discrepancies between the type
|
|
387
422
|
definitions in the SDK and the data returned by RPC methods.
|
|
388
423
|
- 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
|
|
424
|
+
caused by rapid iteration in the RPC layer leading up to the mainnet launch. Now that mainnet
|
|
425
|
+
has been launched the RPC API should be more stable, and many of these helpers can be replaced
|
|
426
|
+
by simply accessing the nested properties in the returned data directly.
|
|
427
|
+
|
|
428
|
+
The current release should be mostly backwards compatible, and all existing exports will continue
|
|
429
|
+
to be available in this release (with deprecation warnings). With the large number of deprecations
|
|
430
|
+
there may be functionality that should be moved into the new modular version of the SDK. If you
|
|
431
|
+
find there are features that were deprecated without a suitable replacement, we have created a
|
|
397
432
|
[Github Discussion thread](https://github.com/MystenLabs/sui/discussions/13150) to track those
|
|
398
433
|
use-cases.
|
|
399
434
|
|
|
@@ -450,8 +485,8 @@
|
|
|
450
485
|
|
|
451
486
|
#### Migrating faucet requests
|
|
452
487
|
|
|
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
|
|
488
|
+
The ability to request Sui from a faucet was not added to `SuiClient`, instead you will need to
|
|
489
|
+
use a method `@mysten/sui.js/faucet` to make these requests
|
|
455
490
|
|
|
456
491
|
```diff
|
|
457
492
|
- import { JsonRpcProvider, devnetConnection } from '@mysten/sui.js';
|
|
@@ -467,12 +502,15 @@
|
|
|
467
502
|
+});
|
|
468
503
|
```
|
|
469
504
|
|
|
470
|
-
- 001148443: Introduce new `@mysten/sui.js/faucet` export, which should be used for all faucet
|
|
505
|
+
- 001148443: Introduce new `@mysten/sui.js/faucet` export, which should be used for all faucet
|
|
506
|
+
interactions. This deprecates the previous `requestSuiFromFaucet` APIs that existed on the
|
|
507
|
+
`JsonRpcProvider` and `Signer` classes.
|
|
471
508
|
|
|
472
509
|
### Patch Changes
|
|
473
510
|
|
|
474
511
|
- ad46f9f2f: add getAllEpochAddressMetrics method to rpc-provider
|
|
475
|
-
- 34242be56: Add new `isTransactionBlock` method, and deprecate the previous `TransactionBlock.is`
|
|
512
|
+
- 34242be56: Add new `isTransactionBlock` method, and deprecate the previous `TransactionBlock.is`
|
|
513
|
+
method
|
|
476
514
|
- 4e2a150a1: websocket client memory leak fix in reconnect logics
|
|
477
515
|
- 83d0fb734: Deprecate type aliases for strings.
|
|
478
516
|
|
|
@@ -504,8 +542,13 @@
|
|
|
504
542
|
### Minor Changes
|
|
505
543
|
|
|
506
544
|
- 3ea9adb71a: Add multisig support
|
|
507
|
-
- 1cfb1c9da3: The `TransactionBlock` builder now uses the protocol config from the chain when
|
|
508
|
-
|
|
545
|
+
- 1cfb1c9da3: The `TransactionBlock` builder now uses the protocol config from the chain when
|
|
546
|
+
constructing and validating transactions, instead of using hard-coded limits. If you wish to
|
|
547
|
+
perform signing offline (without a provider), you can either define a `protocolConfig` option when
|
|
548
|
+
building a transaction, or explicitly set `limits`, which will be used instead of the protocol
|
|
549
|
+
config.
|
|
550
|
+
- fb3bb9118a: Remove logging of RPCValidation errors when typescript types do not match RPC response
|
|
551
|
+
types
|
|
509
552
|
|
|
510
553
|
### Patch Changes
|
|
511
554
|
|
|
@@ -526,13 +569,16 @@
|
|
|
526
569
|
|
|
527
570
|
- 470c27af50: Added network address metrics
|
|
528
571
|
- 671faefe3c: Add `getChainIdentifier` method
|
|
529
|
-
- 9ce7e051b4: Update internal client to use `@open-rpc/client-js` instead of `jayson` and
|
|
572
|
+
- 9ce7e051b4: Update internal client to use `@open-rpc/client-js` instead of `jayson` and
|
|
573
|
+
`rpc-websockets`. This results in a more consistent experience and better error messaging.
|
|
530
574
|
|
|
531
575
|
### Patch Changes
|
|
532
576
|
|
|
533
577
|
- 4ea96d909a: the event BCS data is a base64 string
|
|
534
578
|
- 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
|
|
579
|
+
- 03828224c9: Previously, effects had an unwrapped_then_deleted field on ts-sdk. This is an issue
|
|
580
|
+
since jsonrpc returns the field as unwrappedThenDeleted. Update the transaction type definition to
|
|
581
|
+
use camelcase.
|
|
536
582
|
- 9ce7e051b4: Add `subscribeTransaction` method.
|
|
537
583
|
- bb50698551: Fixes BCS type definition in the type layout
|
|
538
584
|
|
|
@@ -573,13 +619,17 @@
|
|
|
573
619
|
|
|
574
620
|
### Patch Changes
|
|
575
621
|
|
|
576
|
-
- 4ae3cbea3: Response for `getCoinMetadata` is now nullable, in the event that no metadata can be
|
|
622
|
+
- 4ae3cbea3: Response for `getCoinMetadata` is now nullable, in the event that no metadata can be
|
|
623
|
+
found.
|
|
577
624
|
- d2755a496: Fix dependency on msw
|
|
578
625
|
- f612dac98: Change the default gas budgeting to take storage rebates into account.
|
|
579
626
|
- 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
|
-
-
|
|
627
|
+
- 59ae0e7d6: Removed `skipDataValidation` option, this is now not configurable and is the default
|
|
628
|
+
behavior.
|
|
629
|
+
- c219e7470: Fix type of `limit` on `getCheckpoints` and `getEpochs` API so that is correctly a
|
|
630
|
+
number.
|
|
631
|
+
- 4e463c691: Add `waitForTransactionBlock` API to wait for a transaction to be available over the
|
|
632
|
+
API.
|
|
583
633
|
- b4f0bfc76: Fix type definitions for package exports.
|
|
584
634
|
- Updated dependencies [b4f0bfc76]
|
|
585
635
|
- @mysten/bcs@0.7.1
|
|
@@ -594,7 +644,9 @@
|
|
|
594
644
|
|
|
595
645
|
### Minor Changes
|
|
596
646
|
|
|
597
|
-
- 9b42d0ada: This release replaces all uint64 and uint128 numbers with BigInt in all JSON RPC
|
|
647
|
+
- 9b42d0ada: This release replaces all uint64 and uint128 numbers with BigInt in all JSON RPC
|
|
648
|
+
responses to preserve precision. This is a Major Breaking Change - you must update your TS-SDK to
|
|
649
|
+
latest version
|
|
598
650
|
|
|
599
651
|
## 0.31.0
|
|
600
652
|
|
|
@@ -613,59 +665,105 @@
|
|
|
613
665
|
|
|
614
666
|
### Minor Changes
|
|
615
667
|
|
|
616
|
-
- 956ec28eb: Change `signMessage` to return message bytes. Add support for sui:signMessage in the
|
|
668
|
+
- 956ec28eb: Change `signMessage` to return message bytes. Add support for sui:signMessage in the
|
|
669
|
+
wallet standard
|
|
617
670
|
- 4adfbff73: Use Blake2b instead of sha3_256 for address generation
|
|
618
|
-
- 4c4573ebe: Removed DevInspectResultsType and now DevInspectResults has a property results of
|
|
671
|
+
- 4c4573ebe: Removed DevInspectResultsType and now DevInspectResults has a property results of
|
|
672
|
+
ExecutionResultType and a property error
|
|
619
673
|
- acc2edb31: Update schema for `SuiSystemState` and `DelegatedStake`
|
|
620
|
-
- 941b03af1: Change functions in transactions.ts of ts-sdk such that: `getTotalGasUsed` and
|
|
621
|
-
|
|
674
|
+
- 941b03af1: Change functions in transactions.ts of ts-sdk such that: `getTotalGasUsed` and
|
|
675
|
+
`getTotalGasUsedUpperBound` of ts-sdk return a `bigint`,fields of `gasCostSummary` are defined as
|
|
676
|
+
`string`, `epochId` is defined as `string`. In `sui-json-rpc` the corresponding types are defined
|
|
677
|
+
as `BigInt`. Introduce `SuiEpochId` type to `sui-json-rpc` types that is a `BigInt`.
|
|
678
|
+
- a6690ac7d: Changed the default behavior of `publish` to publish an upgreadeable-by-sender package
|
|
679
|
+
instead of immutable.
|
|
622
680
|
- 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
|
-
-
|
|
681
|
+
- 4c1e331b8: Gas budget is now optional, and will automatically be computed by executing a dry-run
|
|
682
|
+
when not provided.
|
|
683
|
+
- 19b567f21: Unified self- and delegated staking flows. Removed fields from `Validator`
|
|
684
|
+
(`stake_amount`, `pending_stake`, and `pending_withdraw`) and renamed `delegation_staking_pool` to
|
|
685
|
+
`staking_pool`. Additionally removed the `validator_stake` and `delegated_stake` fields in the
|
|
686
|
+
`ValidatorSet` type and replaced them with a `total_stake` field.
|
|
687
|
+
- 7659e2e91: Introduce new `Transaction` builder class, and deprecate all existing methods of
|
|
688
|
+
sending transactions. The new builder class is designed to take full advantage of Programmable
|
|
689
|
+
Transactions. Any transaction using the previous `SignableTransaction` interface will be converted
|
|
690
|
+
to a `Transaction` class when possible, but this interface will be fully removed soon.
|
|
626
691
|
- 0d3cb44d9: Change all snake_case field in ts-sdk normalized.ts to camelCase.
|
|
627
|
-
- 36c264ebb: Remove `generateTransactionDigest`. Use one of the following instead:
|
|
628
|
-
|
|
692
|
+
- 36c264ebb: Remove `generateTransactionDigest`. Use one of the following instead:
|
|
693
|
+
`signer.getTransactionDigest`, `Transaction.getDigest()` or
|
|
694
|
+
`TransactionDataBuilder.getDigestFromBytes()` instead.
|
|
695
|
+
- 891abf5ed: Remove support for RPC Batch Request in favor of multiGetTransactions and
|
|
696
|
+
multiGetObjects
|
|
629
697
|
- 2e0ef59fa: Added VALIDATORS_EVENTS_QUERY
|
|
630
|
-
- 33cb357e1: Change functions in json-rpc-provider.ts of ts-sdk such that:
|
|
698
|
+
- 33cb357e1: Change functions in json-rpc-provider.ts of ts-sdk such that:
|
|
699
|
+
`getTotalTransactionBlocks`, `getReferenceGasPrice` return a `bigint`,
|
|
700
|
+
`getLatestCheckpointSequenceNumber` returns a `string`, `gasPrice` of `devInspectTransactionBlock`
|
|
701
|
+
is defined as a `string`, checkpoint sequence number of `getCheckpoint` is defined as a `string`,
|
|
702
|
+
`cursor` of `getCheckpoints` is defined as a `string`. Introduce `SuiCheckpointSequenceNumber`
|
|
703
|
+
type in sui-json-rpc-types that is a `BigInt` to use instead of `CheckpointSequenceNumber` of
|
|
704
|
+
sui-types.
|
|
631
705
|
- 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
|
|
706
|
+
- f1e42f792: Consolidate get_object and get_raw_object into a single get_object endpoint which now
|
|
707
|
+
takes an additional config parameter with type `SuiObjectDataOptions` and has a new return type
|
|
708
|
+
`SuiObjectResponse`. By default, only object_id, version, and digest are fetched.
|
|
633
709
|
- 272389c20: Support for new versioned TransactionData format
|
|
634
710
|
- 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
|
-
|
|
711
|
+
- be3c4f51e: Add `display` field in `SuiObjectResponse` for frontend rendering. See more details in
|
|
712
|
+
https://forums.sui.io/t/nft-object-display-proposal/4872
|
|
713
|
+
- dbe73d5a4: Update `executeTransaction` and `signAndExecuteTransaction` to take in an additional
|
|
714
|
+
parameter `SuiTransactionBlockResponseOptions` which is used to specify which fields to include in
|
|
715
|
+
`SuiTransactionBlockResponse` (e.g., transaction, effects, events, etc). By default, only the
|
|
716
|
+
transaction digest will be included.
|
|
717
|
+
- c82e4b454: Introduce BigInt struct to sui-json-rpc-types to serialize and deserialize amounts
|
|
718
|
+
to/from string. Change ts-sdk to serialize amounts of PaySui and Pay as string.
|
|
719
|
+
- 7a2eaf4a3: Changing the SuiObjectResponse struct to use data/error fields instead of
|
|
720
|
+
details/status
|
|
721
|
+
- 2ef2bb59e: Deprecate getTransactionDigestsInRange. This method will be removed before April 2023,
|
|
722
|
+
please use `getTransactions` instead
|
|
640
723
|
- 9b29bef37: Pass blake2b hash to signer API
|
|
641
724
|
- 8700809b5: Add a new `getCheckpoints` endpoint that returns a paginated list of checkpoints.
|
|
642
725
|
- 5c3b00cde: Add object id to staking pool and pool id to staked sui.
|
|
643
|
-
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
726
|
+
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
727
|
+
`getCheckpointSummary` and `getCheckpointSummaryByDigest` methods.
|
|
644
728
|
- 9822357d6: Add getStakesByIds to get DelegatedStake queried by id
|
|
645
|
-
- 3d9a04648: Adds `deactivation_epoch` to staking pool object, and adds `inactive_pools` to the
|
|
729
|
+
- 3d9a04648: Adds `deactivation_epoch` to staking pool object, and adds `inactive_pools` to the
|
|
730
|
+
validator set object.
|
|
646
731
|
- da72e73a9: Change the address of Move package for staking and validator related Move modules.
|
|
647
732
|
- a0955c479: Switch from 20 to 32-byte address. Match Secp256k1.deriveKeypair with Ed25519.
|
|
648
733
|
- 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
|
-
|
|
734
|
+
- d5ef1b6e5: Added dependencies to publish command, dependencies now also returned from the sui move
|
|
735
|
+
CLI with the `--dump-bytecode-as-base64` flag
|
|
736
|
+
- 0a7b42a6d: This changes almost all occurences of "delegate", "delegation" (and various
|
|
737
|
+
capitalizations/forms) to their equivalent "stake"-based name. Function names, function argument
|
|
738
|
+
names, RPC endpoints, Move functions, and object fields have been updated with this new naming
|
|
739
|
+
convention.
|
|
651
740
|
- 3de8de361: Remove `getValidators` API. Use `getLatestSuiSystemState` instead.
|
|
652
741
|
- dd348cf03: Refactor `getTransactions` to `queryTransactions`
|
|
653
742
|
- 57c17e02a: Removed `JsonRpcProviderWithCache`, use `JsonRpcProvider` instead.
|
|
654
|
-
- 65f1372dd: Rename `provider.getTransactionWithEffects` to `provider.getTransaction`. The new
|
|
743
|
+
- 65f1372dd: Rename `provider.getTransactionWithEffects` to `provider.getTransaction`. The new
|
|
744
|
+
method takes in an additional parameter `SuiTransactionBlockResponseOptions` to configure which
|
|
745
|
+
fields to fetch(transaction, effects, events, etc). By default, only the transaction digest will
|
|
746
|
+
be returned.
|
|
655
747
|
- 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
|
|
748
|
+
- fe335e6ba: Removed usage of `cross-fetch` in the TypeScript SDK. If you are running in an
|
|
749
|
+
environment that does not have `fetch` defined, you will need to polyfill it.
|
|
657
750
|
- 5dc25faad: Remove getTransactionDigestsInRange from the SDK
|
|
658
751
|
- 64234baaf: added combined `getCheckpoint` endpoint for retrieving information about a checkpoint
|
|
659
752
|
- 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
|
-
|
|
753
|
+
- a6ffb8088: Removed events from transaction effects, TransactionEvents will now be provided in the
|
|
754
|
+
TransactionResponse, along side TransactionEffects.
|
|
755
|
+
- 3304eb83b: Refactor Rust SuiTransactionBlockKind to be internally tagged for Json serialization
|
|
756
|
+
with tag="type" and SuiEvent to be adjacently tagged with tag="type" and content="content"
|
|
662
757
|
- 4189171ef: Adds support for validator candidate.
|
|
663
758
|
- 77bdf907f: When parsing u64, u128, and u256 values with bcs, they are now string encoded.
|
|
664
759
|
- a74df16ec: Minor change to the system transaction format
|
|
665
|
-
- 0f7aa6507: Switching the response type of the getOwnedObjects api to a paginatedObjects response,
|
|
760
|
+
- 0f7aa6507: Switching the response type of the getOwnedObjects api to a paginatedObjects response,
|
|
761
|
+
and also moving filtering to FN
|
|
666
762
|
- 9b60bf700: Change all snake_case fields in checkpoint.ts and faucet.ts to camelCase
|
|
667
|
-
- 64fb649eb: Remove old `SuiExecuteTransactionResponse` interface, and `CertifiedTransaction`
|
|
668
|
-
|
|
763
|
+
- 64fb649eb: Remove old `SuiExecuteTransactionResponse` interface, and `CertifiedTransaction`
|
|
764
|
+
interface in favor of the new unified `SuiTransactionBlockResponse` interfaces.
|
|
765
|
+
- a6b0c4e5f: Changed the getOwnerObjectsForAddress api to getOwnedObjects, and added options/
|
|
766
|
+
pagination to the parameters
|
|
669
767
|
|
|
670
768
|
### Patch Changes
|
|
671
769
|
|
|
@@ -688,7 +786,8 @@
|
|
|
688
786
|
|
|
689
787
|
### Patch Changes
|
|
690
788
|
|
|
691
|
-
- 31bfcae6a: Make arguments field optional for MoveCall to match Rust definition. This fixes a bug
|
|
789
|
+
- 31bfcae6a: Make arguments field optional for MoveCall to match Rust definition. This fixes a bug
|
|
790
|
+
where the Explorer page does not load for transactions with no argument.
|
|
692
791
|
|
|
693
792
|
## 0.29.0
|
|
694
793
|
|
|
@@ -696,7 +795,8 @@
|
|
|
696
795
|
|
|
697
796
|
- f2e713bd0: Add TransactionExpiration to TransactionData
|
|
698
797
|
- 4baf554f1: Make fromSecretKey take the 32 bytes privkey
|
|
699
|
-
- aa650aa3b: Introduce new `Connection` class, which is used to define the endpoints that are used
|
|
798
|
+
- aa650aa3b: Introduce new `Connection` class, which is used to define the endpoints that are used
|
|
799
|
+
when interacting with the network.
|
|
700
800
|
- 6ff0c785f: Use DynamicFieldName struct instead of string for dynamic field's name
|
|
701
801
|
|
|
702
802
|
### Patch Changes
|
|
@@ -711,9 +811,15 @@
|
|
|
711
811
|
|
|
712
812
|
### Minor Changes
|
|
713
813
|
|
|
714
|
-
- a67cc044b: Transaction signatures are now serialized into a single string, and all APIs that
|
|
715
|
-
|
|
716
|
-
|
|
814
|
+
- a67cc044b: Transaction signatures are now serialized into a single string, and all APIs that
|
|
815
|
+
previously took the public key, signature, and scheme now just take the single serialized
|
|
816
|
+
signature string. To help make parsing this easier, there are new `toSerializedSignature` and
|
|
817
|
+
`toParsedSignaturePubkeyPair` methods exposed as well.
|
|
818
|
+
- a67cc044b: The RawSigner now provides a `signTransaction` function, which can be used to sign a
|
|
819
|
+
transaction without submitting it to the network.
|
|
820
|
+
- a67cc044b: The RawSigner now provides a `signMessage` function that can be used to sign personal
|
|
821
|
+
messages. The SDK also now exports a `verifyMessage` function that can be used to easily verify a
|
|
822
|
+
message signed with `signMessage`.
|
|
717
823
|
|
|
718
824
|
### Patch Changes
|
|
719
825
|
|
|
@@ -725,7 +831,8 @@
|
|
|
725
831
|
|
|
726
832
|
### Minor Changes
|
|
727
833
|
|
|
728
|
-
- 473005d8f: Add protocol_version to CheckpointSummary and SuiSystemObject. Consolidate end-of-epoch
|
|
834
|
+
- 473005d8f: Add protocol_version to CheckpointSummary and SuiSystemObject. Consolidate end-of-epoch
|
|
835
|
+
information in CheckpointSummary.
|
|
729
836
|
- 59641dc29: Support for deserializing new ConsensusCommitPrologue system transaction
|
|
730
837
|
- 629804d26: Remove usage of `Base64DataBuffer`, and use `Uint8Array` instead.
|
|
731
838
|
- f51c85e85: remove get_objects_owned_by_object and replace it with get_dynamic_fields
|
|
@@ -761,7 +868,8 @@
|
|
|
761
868
|
|
|
762
869
|
### Minor Changes
|
|
763
870
|
|
|
764
|
-
- 7b4bf43bc: Support for interacting with Devnet v0.24+ where Move Calls refer to their packages by
|
|
871
|
+
- 7b4bf43bc: Support for interacting with Devnet v0.24+ where Move Calls refer to their packages by
|
|
872
|
+
ObjectID only (not ObjectRef).
|
|
765
873
|
|
|
766
874
|
### Patch Changes
|
|
767
875
|
|
|
@@ -778,7 +886,8 @@
|
|
|
778
886
|
### Patch Changes
|
|
779
887
|
|
|
780
888
|
- 01458ffd5: Fix websocket default port for DevNet
|
|
781
|
-
- a274ecfc7: Make previousTransaction optional for CoinStruct to support v0.22 network where it
|
|
889
|
+
- a274ecfc7: Make previousTransaction optional for CoinStruct to support v0.22 network where it
|
|
890
|
+
doesn't exist
|
|
782
891
|
- 89091ddab: change estimator logic to use upper bound
|
|
783
892
|
- 71bee7563: fix creating websocket url
|
|
784
893
|
|
|
@@ -814,16 +923,22 @@
|
|
|
814
923
|
### Minor Changes
|
|
815
924
|
|
|
816
925
|
- 4fb12ac6d: - removes `transfer` function from framework Coin
|
|
817
|
-
- renames `newTransferTx` function from framework Coin to `newPayTransaction`. Also it's now a
|
|
926
|
+
- renames `newTransferTx` function from framework Coin to `newPayTransaction`. Also it's now a
|
|
927
|
+
public method and without the need of signer so a dapp can use it
|
|
818
928
|
- fixes edge cases with pay txs
|
|
819
929
|
- 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
|
-
|
|
930
|
+
- d2015f815: Rebuilt type-narrowing utilties (e.g. `isSuiObject`) on top of Superstruct, which
|
|
931
|
+
should make them more reliable. The type-narrowing functions are no longer exported, instead a
|
|
932
|
+
Superstruct schema is exported, in addition to an `is` and `assert` function, both of which can be
|
|
933
|
+
used to replace the previous narrowing functions. For example, `isSuiObject(data)` becomes
|
|
934
|
+
`is(data, SuiObject)`.
|
|
935
|
+
- 7d0f25b61: Add devInspectTransaction, which is similar to dryRunTransaction, but lets you call any
|
|
936
|
+
Move function(including non-entry function) with arbitrary values.
|
|
823
937
|
|
|
824
938
|
### Patch Changes
|
|
825
939
|
|
|
826
|
-
- 9fbe2714b: Add devInspectMoveCall, which is similar to devInspectTransaction, but lets you call
|
|
940
|
+
- 9fbe2714b: Add devInspectMoveCall, which is similar to devInspectTransaction, but lets you call
|
|
941
|
+
any Move function without a gas object and budget
|
|
827
942
|
|
|
828
943
|
## 0.20.0
|
|
829
944
|
|
|
@@ -874,7 +989,8 @@
|
|
|
874
989
|
|
|
875
990
|
- a9602e533: Remove deprecated events API
|
|
876
991
|
- db22728c1: \* adds dryRunTransaction support
|
|
877
|
-
- adds getGasCostEstimation to the signer-with-provider that estimates the gas cost for a
|
|
992
|
+
- adds getGasCostEstimation to the signer-with-provider that estimates the gas cost for a
|
|
993
|
+
transaction
|
|
878
994
|
- 3b510d0fc: adds coin transfer method to framework that uses pay and paySui
|
|
879
995
|
|
|
880
996
|
## 0.16.0
|
|
@@ -917,7 +1033,8 @@
|
|
|
917
1033
|
- b4a8ee9bf: Support passing a vector of objects in LocalTxnBuilder
|
|
918
1034
|
- ef3571dc8: Fix gas selection bug for a vector of objects
|
|
919
1035
|
- cccfe9315: Add deserialization util method to LocalTxnDataSerializer
|
|
920
|
-
- 2dc594ef7: Introduce getCoinDenominationInfo, which returns denomination info of a coin, now only
|
|
1036
|
+
- 2dc594ef7: Introduce getCoinDenominationInfo, which returns denomination info of a coin, now only
|
|
1037
|
+
supporting SUI coin.
|
|
921
1038
|
- 4f0c611ff: Protocol change to add 'initial shared version' to shared object references.
|
|
922
1039
|
|
|
923
1040
|
## 0.13.0
|
|
@@ -934,10 +1051,13 @@
|
|
|
934
1051
|
### Minor Changes
|
|
935
1052
|
|
|
936
1053
|
- e0b173b9e: Standardize Ed25519KeyPair key derivation with SLIP10
|
|
937
|
-
- 059ede517: Flip the default value of `skipDataValidation` to true in order to mitigate the impact
|
|
1054
|
+
- 059ede517: Flip the default value of `skipDataValidation` to true in order to mitigate the impact
|
|
1055
|
+
of breaking changes on applications. When there's a mismatch between the TypeScript definitions
|
|
1056
|
+
and RPC response, the SDK now log a console warning instead of throwing an error.
|
|
938
1057
|
- 03e6b552b: Add util function to get coin balances
|
|
939
1058
|
- 4575c0a02: Fix type definition of SuiMoveNormalizedType
|
|
940
|
-
- ccf7f148d: Added generic signAndExecuteTransaction method to the SDK, which can be used with any
|
|
1059
|
+
- ccf7f148d: Added generic signAndExecuteTransaction method to the SDK, which can be used with any
|
|
1060
|
+
supported type of transaction.
|
|
941
1061
|
|
|
942
1062
|
### Patch Changes
|
|
943
1063
|
|
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[];
|