@mysten/sui 2.16.0 → 2.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/bcs/index.d.mts +20 -20
  3. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  4. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  5. package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
  6. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
  7. package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
  8. package/dist/jsonRpc/http-transport.mjs +1 -2
  9. package/dist/jsonRpc/http-transport.mjs.map +1 -1
  10. package/dist/transactions/Transaction.d.mts +9 -9
  11. package/dist/transactions/data/v1.d.mts +220 -220
  12. package/dist/transactions/data/v1.d.mts.map +1 -1
  13. package/dist/transactions/data/v2.d.mts +16 -16
  14. package/dist/transactions/data/v2.d.mts.map +1 -1
  15. package/dist/version.mjs +2 -3
  16. package/dist/version.mjs.map +1 -1
  17. package/package.json +4 -5
  18. package/src/jsonRpc/http-transport.ts +1 -2
  19. package/src/version.ts +1 -2
  20. package/docs/bcs.md +0 -131
  21. package/docs/clients/core.md +0 -616
  22. package/docs/clients/graphql.md +0 -99
  23. package/docs/clients/grpc.md +0 -205
  24. package/docs/clients/index.md +0 -93
  25. package/docs/clients/json-rpc.md +0 -235
  26. package/docs/cryptography/keypairs.md +0 -258
  27. package/docs/cryptography/multisig.md +0 -192
  28. package/docs/cryptography/passkey.md +0 -111
  29. package/docs/cryptography/webcrypto-signer.md +0 -81
  30. package/docs/executors.md +0 -147
  31. package/docs/faucet.md +0 -26
  32. package/docs/hello-sui.md +0 -114
  33. package/docs/index.md +0 -54
  34. package/docs/install.md +0 -61
  35. package/docs/llm-docs.md +0 -32
  36. package/docs/llms-index.md +0 -60
  37. package/docs/migrations/0.38.md +0 -57
  38. package/docs/migrations/sui-1.0.md +0 -453
  39. package/docs/migrations/sui-2.0/agent-prompt.md +0 -42
  40. package/docs/migrations/sui-2.0/dapp-kit.md +0 -350
  41. package/docs/migrations/sui-2.0/deepbook-v3.md +0 -33
  42. package/docs/migrations/sui-2.0/index.md +0 -157
  43. package/docs/migrations/sui-2.0/json-rpc-migration.md +0 -399
  44. package/docs/migrations/sui-2.0/kiosk.md +0 -120
  45. package/docs/migrations/sui-2.0/sdk-maintainers.md +0 -90
  46. package/docs/migrations/sui-2.0/seal.md +0 -14
  47. package/docs/migrations/sui-2.0/sui.md +0 -341
  48. package/docs/migrations/sui-2.0/suins.md +0 -42
  49. package/docs/migrations/sui-2.0/wallet-builders.md +0 -66
  50. package/docs/migrations/sui-2.0/walrus.md +0 -41
  51. package/docs/migrations/sui-2.0/zksend.md +0 -94
  52. package/docs/plugins.md +0 -255
  53. package/docs/sdk-building.md +0 -340
  54. package/docs/transaction-building/basics.md +0 -297
  55. package/docs/transaction-building/gas.md +0 -62
  56. package/docs/transaction-building/intents.md +0 -61
  57. package/docs/transaction-building/offline.md +0 -71
  58. package/docs/transaction-building/sponsored-transactions.md +0 -22
  59. package/docs/utils/derived_objects.md +0 -80
  60. package/docs/utils/index.md +0 -59
  61. package/docs/zklogin.md +0 -78
  62. package/src/transactions/__tests__/Transaction.test.ts +0 -184
  63. package/src/transactions/__tests__/bcs.test.ts +0 -205
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mysten Labs <build@mystenlabs.com>",
4
4
  "description": "Sui TypeScript API",
5
5
  "homepage": "https://sdk.mystenlabs.com",
6
- "version": "2.16.0",
6
+ "version": "2.16.1",
7
7
  "license": "Apache-2.0",
8
8
  "sideEffects": false,
9
9
  "files": [
@@ -139,7 +139,6 @@
139
139
  "@graphql-codegen/typescript-document-nodes": "5.0.7",
140
140
  "@graphql-codegen/typescript-operations": "^5.0.7",
141
141
  "@grpc/grpc-js": "^1.13.3",
142
- "@iarna/toml": "^2.2.5",
143
142
  "@parcel/watcher": "^2.5.4",
144
143
  "@protobuf-ts/grpc-transport": "^2.11.1",
145
144
  "@types/node": "^25.0.8",
@@ -169,8 +168,8 @@
169
168
  "graphql": "^16.12.0",
170
169
  "poseidon-lite": "0.2.1",
171
170
  "valibot": "^1.2.0",
172
- "@mysten/bcs": "^2.0.3",
173
- "@mysten/utils": "^0.3.1"
171
+ "@mysten/bcs": "^2.0.4",
172
+ "@mysten/utils": "^0.3.2"
174
173
  },
175
174
  "scripts": {
176
175
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
@@ -183,7 +182,7 @@
183
182
  "codegen:grpc-header": "find src/grpc/proto -type f -exec sh -c 'echo \"// Copyright (c) Mysten Labs, Inc.\\n// SPDX-License-Identifier: Apache-2.0\\n\" | cat - {} > temp && mv temp {}' \\;",
184
183
  "codegen:grpc-extensions": "find src/grpc/proto -name '*.ts' | xargs sed -i '' -E 's/from \"(\\.[^\"]+)\"/from \"\\1.js\"/g'",
185
184
  "build": "rm -rf dist && node genversion.mjs && tsc --noEmit && tsdown",
186
- "build:docs": "tsx ../docs/scripts/build-docs.ts",
185
+ "build:docs": "node ../docs/scripts/build-docs.ts",
187
186
  "vitest": "vitest",
188
187
  "test": "pnpm test:typecheck && pnpm test:unit",
189
188
  "test:typecheck": "tsc -p ./test",
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { PACKAGE_VERSION, TARGETED_RPC_VERSION } from '../version.js';
4
+ import { PACKAGE_VERSION } from '../version.js';
5
5
  import { JsonRpcError, SuiHTTPStatusError } from './errors.js';
6
6
 
7
7
  /**
@@ -58,7 +58,6 @@ export class JsonRpcHTTPTransport implements JsonRpcTransport {
58
58
  'Content-Type': 'application/json',
59
59
  'Client-Sdk-Type': 'typescript',
60
60
  'Client-Sdk-Version': PACKAGE_VERSION,
61
- 'Client-Target-Api-Version': TARGETED_RPC_VERSION,
62
61
  'Client-Request-Method': input.method,
63
62
  ...this.#options.rpc?.headers,
64
63
  },
package/src/version.ts CHANGED
@@ -3,5 +3,4 @@
3
3
 
4
4
  // This file is generated by genversion.mjs. Do not edit it directly.
5
5
 
6
- export const PACKAGE_VERSION = '2.16.0';
7
- export const TARGETED_RPC_VERSION = '1.71.0';
6
+ export const PACKAGE_VERSION = '2.16.1';
package/docs/bcs.md DELETED
@@ -1,131 +0,0 @@
1
- # BCS
2
-
3
- > Binary Canonical Serialization for encoding Sui Move types
4
-
5
- The `@mysten/sui/bcs` package extends `@mysten/bcs` with Sui specific scheme definitions.
6
-
7
- To learn more about using BCS see the [BCS documentation](/bcs).
8
-
9
- the `bcs` export of `@mysten/sui/bcs` contains all the same exports as `bcs` from `@mysten/bcs` plus
10
- the following pre-defined schemes:
11
-
12
- - `U8`
13
- - `U16`
14
- - `U32`
15
- - `U64`
16
- - `U128`
17
- - `U256`
18
- - `ULEB128`
19
- - `Bool`
20
- - `String`
21
- - `Address`
22
- - `Argument`
23
- - `CallArg`
24
- - `CompressedSignature`
25
- - `GasData`
26
- - `MultiSig`
27
- - `MultiSigPkMap`
28
- - `MultiSigPublicKey`
29
- - `ObjectArg`
30
- - `ObjectDigest`
31
- - `ProgrammableMoveCall`
32
- - `ProgrammableTransaction`
33
- - `PublicKey`
34
- - `SenderSignedData`
35
- - `SharedObjectRef`
36
- - `StructTag`
37
- - `SuiObjectRef`
38
- - `Transaction`
39
- - `TransactionData`
40
- - `TransactionDataV1`
41
- - `TransactionExpiration`
42
- - `TransactionKind`
43
- - `TypeTag`
44
- - `Object` - Complete object with data, owner, previousTransaction, and storageRebate
45
- - `TransactionEffects` - Transaction execution effects (supports both V1 and V2)
46
- - `TransactionEffectsV1` - Legacy transaction effects format
47
- - `TransactionEffectsV2` - Current transaction effects format with detailed object changes
48
-
49
- All the upper-cased values are `BcsType` instances, and can be used directly to parse and serialize
50
- data.
51
-
52
- ```typescript
53
- bcs.U8.serialize(1);
54
- bcs.Address.serialize('0x1');
55
- bcs.TypeTag.serialize({
56
- vector: {
57
- u8: true,
58
- },
59
- });
60
- ```
61
-
62
- ## Working with Objects
63
-
64
- To parse on-chain objects, fetch them with `include: { content: true }` and pass `object.content` to
65
- a generated BCS type or a manual struct definition. The `content` field contains only the inner Move
66
- struct bytes:
67
-
68
- ```typescript
69
- const { object } = await client.core.getObject({
70
- objectId: '0x123...',
71
- include: { content: true },
72
- });
73
-
74
- const parsed = MyStruct.parse(object.content);
75
- ```
76
-
77
- ### `bcs.Object` — Full object envelope
78
-
79
- The `bcs.Object` schema represents the complete on-chain object, including metadata (type, owner,
80
- version, previous transaction, storage rebate) wrapping the inner struct bytes. This is what the
81
- `objectBcs` include option returns. Most of this metadata is already available as fields on the
82
- object response, so you typically only need `content`.
83
-
84
- ```typescript
85
-
86
- // Parse a full object envelope (from objectBcs include option)
87
- const envelope = bcs.Object.parse(object.objectBcs);
88
- console.log('Owner:', envelope.owner);
89
- console.log('Inner struct bytes:', envelope.data.Move.contents);
90
-
91
- // Serialize a full object envelope
92
- const serialized = bcs.Object.serialize({
93
- data: {
94
- Move: {
95
- type: { GasCoin: null },
96
- hasPublicTransfer: true,
97
- version: '1',
98
- contents: new Uint8Array([...]),
99
- },
100
- },
101
- owner: { AddressOwner: '0x...' },
102
- previousTransaction: '...',
103
- storageRebate: '1000',
104
- });
105
- ```
106
-
107
- > **Warning:** Do not pass `objectBcs` bytes to a Move struct parser — it contains wrapping metadata
108
- > that will cause parsing to fail. Use `content` for parsing Move struct fields. See the
109
- > [Core API docs](/sui/clients/core#objectbcs) for details.
110
-
111
- ## Working with Transaction Effects
112
-
113
- The `bcs.TransactionEffects` schema can be used to parse transaction effects:
114
-
115
- ```typescript
116
- // Parse transaction effects
117
- const effects = bcs.TransactionEffects.parse(effectsBytes);
118
-
119
- // Check execution status
120
- if (effects.V2.status.$kind === 'Success') {
121
- console.log('Transaction succeeded');
122
- } else {
123
- console.log('Transaction failed:', effects.V2.status.Failure.error);
124
- }
125
-
126
- // Access changed objects
127
- for (const [objectId, change] of effects.V2.changedObjects) {
128
- console.log('Object:', objectId);
129
- console.log('Output state:', change.outputState.$kind);
130
- }
131
- ```