@mysten/sui 1.2.0 → 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 +212 -84
- package/README.md +2 -46
- 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 +48 -50
- 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 +45 -61
- 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 +2 -2
- package/dist/cjs/utils/suins.js.map +2 -2
- 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/index.d.ts +1 -1
- package/dist/cjs/zklogin/index.js +1 -0
- package/dist/cjs/zklogin/index.js.map +2 -2
- 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 +48 -50
- 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 +44 -60
- 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 +2 -2
- package/dist/esm/utils/suins.js.map +2 -2
- 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/index.d.ts +1 -1
- package/dist/esm/zklogin/index.js +2 -1
- package/dist/esm/zklogin/index.js.map +2 -2
- 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 +14 -13
- 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 +16 -2
- 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/utils/suins.ts +2 -2
- package/src/version.ts +2 -2
- package/src/zklogin/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,37 @@
|
|
|
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
|
+
|
|
21
|
+
## 1.2.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 06a900c1ab: Fix nonce generation inconsistency
|
|
26
|
+
- 45877014d1: Improve return type when passing functions to tx.add
|
|
27
|
+
- 87d6f75403: Parallel executor now only re-uses gasCoins if the gas coin is only used for gas
|
|
28
|
+
|
|
3
29
|
## 1.2.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
6
32
|
|
|
7
|
-
- 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"
|
|
8
35
|
|
|
9
36
|
## 1.1.2
|
|
10
37
|
|
|
@@ -62,8 +89,10 @@
|
|
|
62
89
|
|
|
63
90
|
### Major Changes
|
|
64
91
|
|
|
65
|
-
- a92b03de42: The Typescript SDK has been renamed to `@mysten/sui` and includes many new features
|
|
66
|
-
|
|
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.
|
|
67
96
|
|
|
68
97
|
### Patch Changes
|
|
69
98
|
|
|
@@ -97,7 +126,8 @@
|
|
|
97
126
|
|
|
98
127
|
### Minor Changes
|
|
99
128
|
|
|
100
|
-
- 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
|
|
101
131
|
|
|
102
132
|
## 0.51.2
|
|
103
133
|
|
|
@@ -129,7 +159,8 @@
|
|
|
129
159
|
|
|
130
160
|
### Minor Changes
|
|
131
161
|
|
|
132
|
-
- 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
|
|
133
164
|
|
|
134
165
|
### Patch Changes
|
|
135
166
|
|
|
@@ -183,9 +214,14 @@
|
|
|
183
214
|
|
|
184
215
|
### Minor Changes
|
|
185
216
|
|
|
186
|
-
- 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
|
|
187
219
|
|
|
188
|
-
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)
|
|
189
225
|
|
|
190
226
|
```typescript
|
|
191
227
|
import { getFullnodeUrl, SuiClient, SuiHTTPTransport } from '@mysten/sui.js/client';
|
|
@@ -211,7 +247,8 @@
|
|
|
211
247
|
|
|
212
248
|
### Patch Changes
|
|
213
249
|
|
|
214
|
-
- 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
|
|
215
252
|
|
|
216
253
|
## 0.46.0
|
|
217
254
|
|
|
@@ -222,7 +259,8 @@
|
|
|
222
259
|
### Patch Changes
|
|
223
260
|
|
|
224
261
|
- 28c2c3330: Use the same issuer string in address derivation for the two google's iss values
|
|
225
|
-
- 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.
|
|
226
264
|
- 8d1e74e52: Fix setting gasPrice for devInspectTransactionBlock
|
|
227
265
|
- 3718a230b: Adds `txb.pure.id()` to pass ID pure values more intuitively
|
|
228
266
|
|
|
@@ -266,7 +304,8 @@
|
|
|
266
304
|
|
|
267
305
|
### Patch Changes
|
|
268
306
|
|
|
269
|
-
- 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
|
|
270
309
|
- c5684bb52: rename zk to zkLogin
|
|
271
310
|
|
|
272
311
|
## 0.43.0
|
|
@@ -280,7 +319,8 @@
|
|
|
280
319
|
- txb.transferObjects now accepts `address` as JavaScript string
|
|
281
320
|
- All single objects, or lists of objects, now also accepts object IDs as JavaScript strings
|
|
282
321
|
- txb.pure accepts `SerializedBcs` (eg `txb.pure(bcs.U64.serialize(123))`)
|
|
283
|
-
- 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
|
|
284
324
|
- Deprecated using `txb.pure` with raw JavaScript values, or an explicit type argument.
|
|
285
325
|
|
|
286
326
|
- 1bc430161: Updated BCS defintions to use new BCS schema builder
|
|
@@ -322,7 +362,8 @@
|
|
|
322
362
|
|
|
323
363
|
### Minor Changes
|
|
324
364
|
|
|
325
|
-
- 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
|
|
326
367
|
|
|
327
368
|
### Patch Changes
|
|
328
369
|
|
|
@@ -336,13 +377,15 @@
|
|
|
336
377
|
|
|
337
378
|
### Patch Changes
|
|
338
379
|
|
|
339
|
-
- 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.
|
|
340
382
|
|
|
341
383
|
## 0.39.0
|
|
342
384
|
|
|
343
385
|
### Minor Changes
|
|
344
386
|
|
|
345
|
-
- 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
|
|
346
389
|
|
|
347
390
|
## 0.38.0
|
|
348
391
|
|
|
@@ -353,8 +396,8 @@
|
|
|
353
396
|
- 0f06d593a: Added a MultiSigPublicKey class for verifying multisig signatures
|
|
354
397
|
- 09f4ed3fc: update signMessage to correctly wrap PersonalMessages before signing
|
|
355
398
|
- 6d41059c7: Deprecate imports from the root path which can be imported from a modular export
|
|
356
|
-
- cc6441f46: The Sui TS SDK has been broken up into a set of modular exports, and all exports from
|
|
357
|
-
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:
|
|
358
401
|
|
|
359
402
|
- `@mysten/sui.js/client` - A client for interacting with Sui RPC nodes.
|
|
360
403
|
- `@mysten/sui.js/bcs` - A BCS builder with pre-defined types for Sui.
|
|
@@ -369,23 +412,23 @@
|
|
|
369
412
|
As part of this refactor we are deprecating a number of existing APIs:
|
|
370
413
|
|
|
371
414
|
- `JsonRPCProvider` - This Provider pattern is being replaced by a new `SuiClient`
|
|
372
|
-
- `SignerWithProver` and `RawSigner` - The Concept of Signers is being removed from the SDK.
|
|
373
|
-
in verifying has been moved to the KeyPair classes, and the
|
|
374
|
-
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`.
|
|
375
418
|
- The `superstruct` type definitions for types used by JsonRPCProvider are being replaced with
|
|
376
419
|
generated types exported from `@mysten/sui.js/client`. The new type definitions are pure
|
|
377
420
|
typescript types and can't be used for runtime validation. By generating these as types, it will
|
|
378
421
|
be easier to keep them in sync with the RPC definitions and avoid discrepancies between the type
|
|
379
422
|
definitions in the SDK and the data returned by RPC methods.
|
|
380
423
|
- A large number of "getters" are being deprecated. These getters were intended to reduce friction
|
|
381
|
-
caused by rapid iteration in the RPC layer leading up to the mainnet launch. Now that mainnet
|
|
382
|
-
been launched the RPC API should be more stable, and many of these helpers can be replaced
|
|
383
|
-
simply accessing the nested properties in the returned data directly.
|
|
384
|
-
|
|
385
|
-
The current release should be mostly backwards compatible, and all existing exports will continue
|
|
386
|
-
be available in this release (with deprecation warnings). With the large number of deprecations
|
|
387
|
-
there may be functionality that should be moved into the new modular version of the SDK. If you
|
|
388
|
-
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
|
|
389
432
|
[Github Discussion thread](https://github.com/MystenLabs/sui/discussions/13150) to track those
|
|
390
433
|
use-cases.
|
|
391
434
|
|
|
@@ -442,8 +485,8 @@
|
|
|
442
485
|
|
|
443
486
|
#### Migrating faucet requests
|
|
444
487
|
|
|
445
|
-
The ability to request Sui from a faucet was not added to `SuiClient`, instead you will need to
|
|
446
|
-
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
|
|
447
490
|
|
|
448
491
|
```diff
|
|
449
492
|
- import { JsonRpcProvider, devnetConnection } from '@mysten/sui.js';
|
|
@@ -459,12 +502,15 @@
|
|
|
459
502
|
+});
|
|
460
503
|
```
|
|
461
504
|
|
|
462
|
-
- 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.
|
|
463
508
|
|
|
464
509
|
### Patch Changes
|
|
465
510
|
|
|
466
511
|
- ad46f9f2f: add getAllEpochAddressMetrics method to rpc-provider
|
|
467
|
-
- 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
|
|
468
514
|
- 4e2a150a1: websocket client memory leak fix in reconnect logics
|
|
469
515
|
- 83d0fb734: Deprecate type aliases for strings.
|
|
470
516
|
|
|
@@ -496,8 +542,13 @@
|
|
|
496
542
|
### Minor Changes
|
|
497
543
|
|
|
498
544
|
- 3ea9adb71a: Add multisig support
|
|
499
|
-
- 1cfb1c9da3: The `TransactionBlock` builder now uses the protocol config from the chain when
|
|
500
|
-
|
|
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
|
|
501
552
|
|
|
502
553
|
### Patch Changes
|
|
503
554
|
|
|
@@ -518,13 +569,16 @@
|
|
|
518
569
|
|
|
519
570
|
- 470c27af50: Added network address metrics
|
|
520
571
|
- 671faefe3c: Add `getChainIdentifier` method
|
|
521
|
-
- 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.
|
|
522
574
|
|
|
523
575
|
### Patch Changes
|
|
524
576
|
|
|
525
577
|
- 4ea96d909a: the event BCS data is a base64 string
|
|
526
578
|
- bcbb178c44: Fixes BCS definition so it matches the RPC one
|
|
527
|
-
- 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.
|
|
528
582
|
- 9ce7e051b4: Add `subscribeTransaction` method.
|
|
529
583
|
- bb50698551: Fixes BCS type definition in the type layout
|
|
530
584
|
|
|
@@ -565,13 +619,17 @@
|
|
|
565
619
|
|
|
566
620
|
### Patch Changes
|
|
567
621
|
|
|
568
|
-
- 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.
|
|
569
624
|
- d2755a496: Fix dependency on msw
|
|
570
625
|
- f612dac98: Change the default gas budgeting to take storage rebates into account.
|
|
571
626
|
- c219e7470: Changed the response type of `getRpcApiVersion` to string.
|
|
572
|
-
- 59ae0e7d6: Removed `skipDataValidation` option, this is now not configurable and is the default
|
|
573
|
-
|
|
574
|
-
-
|
|
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.
|
|
575
633
|
- b4f0bfc76: Fix type definitions for package exports.
|
|
576
634
|
- Updated dependencies [b4f0bfc76]
|
|
577
635
|
- @mysten/bcs@0.7.1
|
|
@@ -586,7 +644,9 @@
|
|
|
586
644
|
|
|
587
645
|
### Minor Changes
|
|
588
646
|
|
|
589
|
-
- 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
|
|
590
650
|
|
|
591
651
|
## 0.31.0
|
|
592
652
|
|
|
@@ -605,59 +665,105 @@
|
|
|
605
665
|
|
|
606
666
|
### Minor Changes
|
|
607
667
|
|
|
608
|
-
- 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
|
|
609
670
|
- 4adfbff73: Use Blake2b instead of sha3_256 for address generation
|
|
610
|
-
- 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
|
|
611
673
|
- acc2edb31: Update schema for `SuiSystemState` and `DelegatedStake`
|
|
612
|
-
- 941b03af1: Change functions in transactions.ts of ts-sdk such that: `getTotalGasUsed` and
|
|
613
|
-
|
|
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.
|
|
614
680
|
- a211dc03a: Change object digest from Base64 encoded to Base58 encoded for rpc version >= 0.28.0
|
|
615
|
-
- 4c1e331b8: Gas budget is now optional, and will automatically be computed by executing a dry-run
|
|
616
|
-
|
|
617
|
-
-
|
|
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.
|
|
618
691
|
- 0d3cb44d9: Change all snake_case field in ts-sdk normalized.ts to camelCase.
|
|
619
|
-
- 36c264ebb: Remove `generateTransactionDigest`. Use one of the following instead:
|
|
620
|
-
|
|
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
|
|
621
697
|
- 2e0ef59fa: Added VALIDATORS_EVENTS_QUERY
|
|
622
|
-
- 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.
|
|
623
705
|
- 6bd88570c: Rework all coin APIs to take objects as arguments instead of positional arguments.
|
|
624
|
-
- 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.
|
|
625
709
|
- 272389c20: Support for new versioned TransactionData format
|
|
626
710
|
- 3de8de361: Remove `getSuiSystemState` method. Use `getLatestSuiSystemState` method instead.
|
|
627
|
-
- be3c4f51e: Add `display` field in `SuiObjectResponse` for frontend rendering. See more details in
|
|
628
|
-
|
|
629
|
-
-
|
|
630
|
-
|
|
631
|
-
|
|
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
|
|
632
723
|
- 9b29bef37: Pass blake2b hash to signer API
|
|
633
724
|
- 8700809b5: Add a new `getCheckpoints` endpoint that returns a paginated list of checkpoints.
|
|
634
725
|
- 5c3b00cde: Add object id to staking pool and pool id to staked sui.
|
|
635
|
-
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
726
|
+
- 01272ab7d: Remove deprecated `getCheckpointContents`, `getCheckpointContentsByDigest`,
|
|
727
|
+
`getCheckpointSummary` and `getCheckpointSummaryByDigest` methods.
|
|
636
728
|
- 9822357d6: Add getStakesByIds to get DelegatedStake queried by id
|
|
637
|
-
- 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.
|
|
638
731
|
- da72e73a9: Change the address of Move package for staking and validator related Move modules.
|
|
639
732
|
- a0955c479: Switch from 20 to 32-byte address. Match Secp256k1.deriveKeypair with Ed25519.
|
|
640
733
|
- 0c9047698: Remove all gas selection APIs from the json rpc provider.
|
|
641
|
-
- d5ef1b6e5: Added dependencies to publish command, dependencies now also returned from the sui move
|
|
642
|
-
|
|
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.
|
|
643
740
|
- 3de8de361: Remove `getValidators` API. Use `getLatestSuiSystemState` instead.
|
|
644
741
|
- dd348cf03: Refactor `getTransactions` to `queryTransactions`
|
|
645
742
|
- 57c17e02a: Removed `JsonRpcProviderWithCache`, use `JsonRpcProvider` instead.
|
|
646
|
-
- 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.
|
|
647
747
|
- a09239308: [testing only] an intent scope can be passed in to verifyMessage
|
|
648
|
-
- 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.
|
|
649
750
|
- 5dc25faad: Remove getTransactionDigestsInRange from the SDK
|
|
650
751
|
- 64234baaf: added combined `getCheckpoint` endpoint for retrieving information about a checkpoint
|
|
651
752
|
- d3170ba41: All JSON-RPC APIs now accept objects instead of positional arugments.
|
|
652
|
-
- a6ffb8088: Removed events from transaction effects, TransactionEvents will now be provided in the
|
|
653
|
-
|
|
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"
|
|
654
757
|
- 4189171ef: Adds support for validator candidate.
|
|
655
758
|
- 77bdf907f: When parsing u64, u128, and u256 values with bcs, they are now string encoded.
|
|
656
759
|
- a74df16ec: Minor change to the system transaction format
|
|
657
|
-
- 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
|
|
658
762
|
- 9b60bf700: Change all snake_case fields in checkpoint.ts and faucet.ts to camelCase
|
|
659
|
-
- 64fb649eb: Remove old `SuiExecuteTransactionResponse` interface, and `CertifiedTransaction`
|
|
660
|
-
|
|
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
|
|
661
767
|
|
|
662
768
|
### Patch Changes
|
|
663
769
|
|
|
@@ -680,7 +786,8 @@
|
|
|
680
786
|
|
|
681
787
|
### Patch Changes
|
|
682
788
|
|
|
683
|
-
- 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.
|
|
684
791
|
|
|
685
792
|
## 0.29.0
|
|
686
793
|
|
|
@@ -688,7 +795,8 @@
|
|
|
688
795
|
|
|
689
796
|
- f2e713bd0: Add TransactionExpiration to TransactionData
|
|
690
797
|
- 4baf554f1: Make fromSecretKey take the 32 bytes privkey
|
|
691
|
-
- 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.
|
|
692
800
|
- 6ff0c785f: Use DynamicFieldName struct instead of string for dynamic field's name
|
|
693
801
|
|
|
694
802
|
### Patch Changes
|
|
@@ -703,9 +811,15 @@
|
|
|
703
811
|
|
|
704
812
|
### Minor Changes
|
|
705
813
|
|
|
706
|
-
- a67cc044b: Transaction signatures are now serialized into a single string, and all APIs that
|
|
707
|
-
|
|
708
|
-
|
|
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`.
|
|
709
823
|
|
|
710
824
|
### Patch Changes
|
|
711
825
|
|
|
@@ -717,7 +831,8 @@
|
|
|
717
831
|
|
|
718
832
|
### Minor Changes
|
|
719
833
|
|
|
720
|
-
- 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.
|
|
721
836
|
- 59641dc29: Support for deserializing new ConsensusCommitPrologue system transaction
|
|
722
837
|
- 629804d26: Remove usage of `Base64DataBuffer`, and use `Uint8Array` instead.
|
|
723
838
|
- f51c85e85: remove get_objects_owned_by_object and replace it with get_dynamic_fields
|
|
@@ -753,7 +868,8 @@
|
|
|
753
868
|
|
|
754
869
|
### Minor Changes
|
|
755
870
|
|
|
756
|
-
- 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).
|
|
757
873
|
|
|
758
874
|
### Patch Changes
|
|
759
875
|
|
|
@@ -770,7 +886,8 @@
|
|
|
770
886
|
### Patch Changes
|
|
771
887
|
|
|
772
888
|
- 01458ffd5: Fix websocket default port for DevNet
|
|
773
|
-
- 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
|
|
774
891
|
- 89091ddab: change estimator logic to use upper bound
|
|
775
892
|
- 71bee7563: fix creating websocket url
|
|
776
893
|
|
|
@@ -806,16 +923,22 @@
|
|
|
806
923
|
### Minor Changes
|
|
807
924
|
|
|
808
925
|
- 4fb12ac6d: - removes `transfer` function from framework Coin
|
|
809
|
-
- 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
|
|
810
928
|
- fixes edge cases with pay txs
|
|
811
929
|
- bb14ffdc5: Remove ImmediateReturn and WaitForTxCert from ExecuteTransactionRequestType
|
|
812
|
-
- d2015f815: Rebuilt type-narrowing utilties (e.g. `isSuiObject`) on top of Superstruct, which
|
|
813
|
-
The type-narrowing functions are no longer exported, instead a
|
|
814
|
-
|
|
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.
|
|
815
937
|
|
|
816
938
|
### Patch Changes
|
|
817
939
|
|
|
818
|
-
- 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
|
|
819
942
|
|
|
820
943
|
## 0.20.0
|
|
821
944
|
|
|
@@ -866,7 +989,8 @@
|
|
|
866
989
|
|
|
867
990
|
- a9602e533: Remove deprecated events API
|
|
868
991
|
- db22728c1: \* adds dryRunTransaction support
|
|
869
|
-
- 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
|
|
870
994
|
- 3b510d0fc: adds coin transfer method to framework that uses pay and paySui
|
|
871
995
|
|
|
872
996
|
## 0.16.0
|
|
@@ -909,7 +1033,8 @@
|
|
|
909
1033
|
- b4a8ee9bf: Support passing a vector of objects in LocalTxnBuilder
|
|
910
1034
|
- ef3571dc8: Fix gas selection bug for a vector of objects
|
|
911
1035
|
- cccfe9315: Add deserialization util method to LocalTxnDataSerializer
|
|
912
|
-
- 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.
|
|
913
1038
|
- 4f0c611ff: Protocol change to add 'initial shared version' to shared object references.
|
|
914
1039
|
|
|
915
1040
|
## 0.13.0
|
|
@@ -926,10 +1051,13 @@
|
|
|
926
1051
|
### Minor Changes
|
|
927
1052
|
|
|
928
1053
|
- e0b173b9e: Standardize Ed25519KeyPair key derivation with SLIP10
|
|
929
|
-
- 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.
|
|
930
1057
|
- 03e6b552b: Add util function to get coin balances
|
|
931
1058
|
- 4575c0a02: Fix type definition of SuiMoveNormalizedType
|
|
932
|
-
- 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.
|
|
933
1061
|
|
|
934
1062
|
### Patch Changes
|
|
935
1063
|
|
package/README.md
CHANGED
|
@@ -123,8 +123,8 @@ await client.getCoins({
|
|
|
123
123
|
});
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
For local development, you can run `cargo run --bin
|
|
127
|
-
with a local validator, a fullnode, and a faucet server. Refer to
|
|
126
|
+
For local development, you can run `cargo run --bin --with-faucet --force-regenesis` to spin up a
|
|
127
|
+
local network with a local validator, a fullnode, and a faucet server. Refer to
|
|
128
128
|
[this guide](https://docs.sui.io/build/sui-local-network) for more information.
|
|
129
129
|
|
|
130
130
|
```typescript
|
|
@@ -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[];
|