@mysten/docs 0.1.29 → 0.1.31

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.
@@ -32,6 +32,15 @@ console.log('Transaction digest:', result.Transaction.digest);
32
32
 
33
33
  - **`transaction`:** `Transaction | string`: The transaction to sign and execute. Can be either a
34
34
  Transaction instance or base64-encoded bcs bytes for the transaction.
35
+ - **`account`** (optional): `UiWalletAccount`: The account to sign with. Defaults to the currently
36
+ connected account. Must belong to the connected wallet, otherwise a `WalletAccountNotFoundError`
37
+ is thrown. Lets you sign with a specific account without changing the selected account via
38
+ `switchAccount`.
39
+ - **`network`** (optional): The network to sign and execute against (a configured network identifier
40
+ such as `'mainnet'`). Defaults to the active network. The chain and the client used to build the
41
+ transaction are derived from it, so you can target a network without changing the active network
42
+ via `switchNetwork`. Throws a `ChainNotSupportedError` if the signing account does not support the
43
+ network.
35
44
  - **`signal`** (optional): `AbortSignal`: An abort signal to cancel the transaction request.
36
45
 
37
46
  ## Return value
@@ -26,6 +26,15 @@ console.log('Signature:', result.signature);
26
26
  ## Parameters
27
27
 
28
28
  - **`message`:** `Uint8Array` - The message to sign as a byte array
29
+ - **`account`** (optional) - `UiWalletAccount` - The account to sign with. Defaults to the currently
30
+ connected account. Must belong to the connected wallet, otherwise a `WalletAccountNotFoundError`
31
+ is thrown. Lets you sign with a specific account without changing the selected account via
32
+ `switchAccount`.
33
+ - **`network`** (optional) - The network to sign against (a configured network identifier such as
34
+ `'mainnet'`). Defaults to the active network. The signing chain is derived from it, so you can
35
+ sign against a network without changing the active network via `switchNetwork`. Throws a
36
+ `ChainNotSupportedError` if the signing account does not support the network. This matters for
37
+ network-bound signatures such as zkLogin.
29
38
 
30
39
  ## Return value
31
40
 
@@ -28,6 +28,15 @@ const { bytes, signature } = await dAppKit.signTransaction({
28
28
 
29
29
  - **`transaction`:** `Transaction | string` - The transaction to sign. Can be either a Transaction
30
30
  instance or base64-encoded bcs bytes for the transaction.
31
+ - **`account`** (optional) - `UiWalletAccount` - The account to sign with. Defaults to the currently
32
+ connected account. Must belong to the connected wallet, otherwise a `WalletAccountNotFoundError`
33
+ is thrown. Lets you sign with a specific account without changing the selected account via
34
+ `switchAccount`.
35
+ - **`network`** (optional) - The network to sign against (a configured network identifier such as
36
+ `'mainnet'`). Defaults to the active network. The chain and the client used to build the
37
+ transaction are derived from it, so you can sign against a network without changing the active
38
+ network via `switchNetwork`. Throws a `ChainNotSupportedError` if the signing account does not
39
+ support the network.
31
40
  - **`signal`** (optional) - `AbortSignal` - An abort signal to cancel the signing request.
32
41
 
33
42
  ## Return value
@@ -185,7 +185,11 @@ The built-in mutation hooks have been removed. Use TanStack Query's `useMutation
185
185
 
186
186
  In the old dApp kit, you could optionally pass a `chain` parameter (for example, `sui:mainnet`) to
187
187
  methods like `signTransaction` and `signAndExecuteTransaction`. In the new dApp kit, use the
188
- `network` parameter instead - the chain is automatically derived from the network.
188
+ `network` parameter instead - the chain is automatically derived from the network. It is optional
189
+ and defaults to the active network, so you only need it when targeting a network other than the
190
+ active one (for example, an app that operates on both mainnet and testnet). Likewise, the
191
+ per-account `account` override is preserved as an optional parameter that defaults to the connected
192
+ account.
189
193
 
190
194
  ```diff
191
195
  - const { mutateAsync: signAndExecute } = useSignAndExecuteTransaction();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/docs",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "LLM-friendly documentation for the Sui TypeScript SDK ecosystem",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -28,28 +28,28 @@
28
28
  "next": "^16.2.9",
29
29
  "react": "^19.2.7",
30
30
  "react-dom": "^19.2.7",
31
- "@mysten/aws-kms-signer": "0.2.0",
32
31
  "@mysten/bcs": "2.1.0",
33
32
  "@mysten/dapp-kit": "1.1.0",
34
- "@mysten/dapp-kit-core": "1.4.0",
35
- "@mysten/dapp-kit-react": "2.1.0",
33
+ "@mysten/aws-kms-signer": "0.2.0",
34
+ "@mysten/dapp-kit-react": "2.1.2",
35
+ "@mysten/dapp-kit-core": "1.6.0",
36
36
  "@mysten/deepbook-v3": "1.5.0",
37
37
  "@mysten/enoki": "1.1.0",
38
38
  "@mysten/enoki-connect": "1.1.0",
39
39
  "@mysten/kiosk": "1.3.0",
40
40
  "@mysten/ledger-signer": "0.2.0",
41
- "@mysten/payment-kit": "0.2.0",
42
- "@mysten/seal": "1.2.0",
43
41
  "@mysten/gcp-kms-signer": "0.2.0",
42
+ "@mysten/seal": "1.2.0",
43
+ "@mysten/payment-kit": "0.2.0",
44
44
  "@mysten/signers": "1.1.0",
45
45
  "@mysten/slush-wallet": "1.1.0",
46
46
  "@mysten/sui": "2.18.0",
47
47
  "@mysten/suins": "1.2.0",
48
+ "@mysten/utils": "0.4.0",
48
49
  "@mysten/wallet-standard": "0.21.0",
49
50
  "@mysten/walrus": "1.2.0",
50
- "@mysten/zksend": "1.2.0",
51
- "@mysten/utils": "0.4.0",
52
- "@mysten/webcrypto-signer": "0.2.0"
51
+ "@mysten/webcrypto-signer": "0.2.0",
52
+ "@mysten/zksend": "1.2.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@tailwindcss/postcss": "^4.3.1",