@mysten/docs 0.1.83 → 0.1.85

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.
@@ -63,6 +63,7 @@ requires.
63
63
  | `onlyAddressBalanceGas()` | Requires empty gas payment so users cannot nominate sponsor gas coin objects |
64
64
  | `gasCoinNotUsed()` | Rejects commands that use `tx.gas`, which belongs to the sponsor |
65
65
  | `onlySenderWithdrawals()` | Rejects address-balance withdrawals from the sponsor or any non-sender source |
66
+ | `noRestrictedMoveCalls()` | Rejects calls that change the sender's address aliases |
66
67
  | `simulationSucceeds()` | Rejects transactions that dry-run as aborting |
67
68
  | `boundedExpiration()` | Rejects missing or too-far-ahead transaction expirations |
68
69
 
@@ -57,9 +57,9 @@ Because gas is the sponsor's, **a sponsored transaction must never use the gas c
57
57
  ## Defaults
58
58
 
59
59
  If you pass no `validate`, the sponsor runs `defaults()`: `validSender()`,
60
- `onlyAddressBalanceGas()`, `gasCoinNotUsed()`, `onlySenderWithdrawals()`, `simulationSucceeds()`,
61
- and `boundedExpiration()`. Once you add your own validators they no longer run automatically; drop
62
- them back in as one entry (the `validate` array flattens nested arrays):
60
+ `onlyAddressBalanceGas()`, `gasCoinNotUsed()`, `onlySenderWithdrawals()`, `noRestrictedMoveCalls()`,
61
+ `simulationSucceeds()`, and `boundedExpiration()`. Once you add your own validators they no longer
62
+ run automatically; drop them back in as one entry (the `validate` array flattens nested arrays):
63
63
 
64
64
  ```ts
65
65
  createSponsor({ signer, client }); // runs defaults()
@@ -71,9 +71,10 @@ the sponsor is also the sender; `onlyAddressBalanceGas()` and `gasCoinNotUsed()`
71
71
  spending the sponsor's gas (its address balance pays, and the gas coin is the sponsor's);
72
72
  `onlySenderWithdrawals()` rejects any `FundsWithdrawal` input that isn't the sender's, including one
73
73
  from the sponsor's **address balance** (the same balance that pays gas, a direct drain the gas-coin
74
- check can't see, because the withdrawal is an input, not a command argument); `simulationSucceeds()`
75
- avoids paying for a transaction that aborts; and `boundedExpiration()` requires a bounded expiration
76
- for address-balance gas.
74
+ check can't see, because the withdrawal is an input, not a command argument);
75
+ `noRestrictedMoveCalls()` rejects calls that change the sender's address aliases;
76
+ `simulationSucceeds()` avoids paying for a transaction that aborts; and `boundedExpiration()`
77
+ requires a bounded expiration for address-balance gas.
77
78
 
78
79
  Two things the defaults **don't** do, by design (handle them at your service boundary):
79
80
 
@@ -149,18 +149,25 @@ it contributes `SponsorRejection | null`, deduping its analyzers with that graph
149
149
 
150
150
  ## Built-in validation analyzers
151
151
 
152
- | Validator | Reads | Rejects when… |
153
- | ------------------------------ | ---------------------- | --------------------------------------------------------- |
154
- | `validSender()` | `data` | the sender is unset, or is the gas owner (sponsor) |
155
- | `onlyAddressBalanceGas()` | `data` | the gas payment isn't empty (`[]`)† |
156
- | `gasCoinNotUsed()` | `data` | a command uses the gas coin (`tx.gas`) |
157
- | `onlySenderWithdrawals()` | `data` | a `FundsWithdrawal` input isn't the sender's |
158
- | `userSignatureMatchesSender()` | `bytes`, `data` | a supplied user signature isn't a valid sender signature‡ |
159
- | `gasBudget({ min?, max? })` | `data` | the gas budget is unset or outside the range |
160
- | `allowedPackages([...])` | `data` | a MoveCall targets a package outside the allowlist |
161
- | `allowedFunctions([...])` | `data` | a MoveCall targets a function outside the allowlist |
162
- | `simulationSucceeds()` | `transactionResponse` | the dry-run succeeds but the transaction would abort\* |
163
- | `boundedExpiration()` | `data`, `currentEpoch` | the expiration is missing or beyond the next epoch |
152
+ | Validator | Reads | Rejects when… |
153
+ | ------------------------------ | ---------------------- | ------------------------------------------------------------ |
154
+ | `validSender()` | `data` | the sender is unset, or is the gas owner (sponsor) |
155
+ | `onlyAddressBalanceGas()` | `data` | the gas payment isn't empty (`[]`)† |
156
+ | `gasCoinNotUsed()` | `data` | a command uses the gas coin (`tx.gas`) |
157
+ | `onlySenderWithdrawals()` | `data` | a `FundsWithdrawal` input isn't the sender's |
158
+ | `noRestrictedMoveCalls(opts?)` | `data` | a MoveCall is restricted (by default, `0x2::address_alias`)§ |
159
+ | `userSignatureMatchesSender()` | `bytes`, `data` | a supplied user signature isn't a valid sender signature‡ |
160
+ | `gasBudget({ min?, max? })` | `data` | the gas budget is unset or outside the range |
161
+ | `allowedPackages([...])` | `data` | a MoveCall targets a package outside the allowlist |
162
+ | `allowedFunctions([...])` | `data` | a MoveCall targets a function outside the allowlist |
163
+ | `simulationSucceeds()` | `transactionResponse` | the dry-run succeeds but the transaction would abort\* |
164
+ | `boundedExpiration()` | `data`, `currentEpoch` | the expiration is missing or beyond the next epoch |
165
+
166
+ § Uses `restrictedMoveCalls` from `@mysten/wallet-sdk`. With no options it rejects calls that change
167
+ the sender's address aliases (which addresses can sign for the account). Pass `targets` to restrict
168
+ more packages, modules, or functions, for example
169
+ `noRestrictedMoveCalls({ targets: { '0xbad': 'block' } })`, or `{ addressAliases: false }` to
170
+ sponsor alias changes.
164
171
 
165
172
  \* The dry-run itself _succeeding_ but reporting an aborting transaction is a **policy** rejection
166
173
  (`TRANSACTION_WOULD_FAIL`): the bytes are executable and would still cost the sponsor gas (landing a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/docs",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "description": "LLM-friendly documentation for the Sui TypeScript SDK ecosystem",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -28,27 +28,27 @@
28
28
  "next": "^16.4.1",
29
29
  "react": "^19.2.8",
30
30
  "react-dom": "^19.2.8",
31
- "@mysten/aws-kms-signer": "0.3.33",
31
+ "@mysten/aws-kms-signer": "0.3.34",
32
32
  "@mysten/bcs": "2.1.3",
33
- "@mysten/dapp-kit-core": "1.6.41",
34
- "@mysten/dapp-kit-react": "2.1.43",
35
- "@mysten/deepbook-v3": "2.9.1",
36
- "@mysten/enoki": "1.3.2",
37
- "@mysten/enoki-connect": "1.1.38",
38
- "@mysten/gcp-kms-signer": "0.2.36",
39
- "@mysten/kiosk": "1.4.22",
40
- "@mysten/ledger-signer": "0.2.36",
41
- "@mysten/seal": "1.5.2",
42
- "@mysten/payment-kit": "0.2.36",
43
- "@mysten/signers": "1.1.36",
44
- "@mysten/slush-wallet": "1.3.6",
45
- "@mysten/suins": "2.0.18",
33
+ "@mysten/dapp-kit-core": "1.6.42",
34
+ "@mysten/deepbook-v3": "2.10.0",
35
+ "@mysten/dapp-kit-react": "2.1.44",
36
+ "@mysten/enoki": "1.3.3",
37
+ "@mysten/enoki-connect": "1.1.39",
38
+ "@mysten/gcp-kms-signer": "0.2.37",
39
+ "@mysten/kiosk": "1.4.23",
40
+ "@mysten/ledger-signer": "0.2.37",
41
+ "@mysten/payment-kit": "0.2.37",
42
+ "@mysten/slush-wallet": "1.3.7",
43
+ "@mysten/signers": "1.1.37",
44
+ "@mysten/seal": "1.5.3",
45
+ "@mysten/sui": "2.39.0",
46
+ "@mysten/suins": "2.0.19",
46
47
  "@mysten/utils": "0.4.2",
47
- "@mysten/sui": "2.38.0",
48
- "@mysten/wallet-standard": "0.21.36",
49
- "@mysten/walrus": "1.2.37",
50
- "@mysten/webcrypto-signer": "0.2.36",
51
- "@mysten/zksend": "1.2.39"
48
+ "@mysten/wallet-standard": "0.21.37",
49
+ "@mysten/walrus": "1.2.38",
50
+ "@mysten/webcrypto-signer": "0.2.37",
51
+ "@mysten/zksend": "1.2.40"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@tailwindcss/postcss": "^4.3.3",