@mysten/docs 0.1.74 → 0.1.76
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/dist/sui/clients/executing.md +7 -1
- package/dist/sui/index.md +47 -7
- package/package.json +21 -21
|
@@ -110,4 +110,10 @@ Two further options change how the node runs the simulation:
|
|
|
110
110
|
| Option | Effect |
|
|
111
111
|
| ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
112
112
|
| `checksEnabled` | Set `false` to skip transaction validation, so non-public and non-entry functions can be inspected. Defaults to `true` |
|
|
113
|
-
| `doGasSelection` | Overrides whether the
|
|
113
|
+
| `doGasSelection` | gRPC and GraphQL only. Overrides whether the node selects real gas. Defaults to `true` only when gas payment is `[]` |
|
|
114
|
+
|
|
115
|
+
A transaction with no gas payment is simulated with a mocked gas coin, which also funds anything
|
|
116
|
+
drawn from `tx.gas`, so the result validates the transaction and estimates gas but is not a preview
|
|
117
|
+
of what the sender would spend. To simulate with the sender's real gas, set gas coins on the
|
|
118
|
+
transaction, or on gRPC and GraphQL set an empty gas payment and let the node select gas. The
|
|
119
|
+
result's `gasPaymentMocked` field reports which case ran.
|
package/dist/sui/index.md
CHANGED
|
@@ -50,8 +50,8 @@ The following table lists the locations for Sui networks.
|
|
|
50
50
|
| Network | Full node | faucet |
|
|
51
51
|
| ------- | ------------------------------------- | ---------------------------------------- |
|
|
52
52
|
| local | `http://127.0.0.1:9000` (default) | `http://127.0.0.1:9123/v2/gas` (default) |
|
|
53
|
-
| Devnet | `https://fullnode.devnet.sui.io:443` | `https://faucet.devnet.sui.io/
|
|
54
|
-
| Testnet | `https://fullnode.testnet.sui.io:443` | `https://faucet.testnet.sui.io/
|
|
53
|
+
| Devnet | `https://fullnode.devnet.sui.io:443` | `https://faucet.devnet.sui.io/v3/gas` |
|
|
54
|
+
| Testnet | `https://fullnode.testnet.sui.io:443` | `https://faucet.testnet.sui.io/v3/gas` |
|
|
55
55
|
| Mainnet | `https://fullnode.mainnet.sui.io:443` | `null` |
|
|
56
56
|
|
|
57
57
|
> **Warning:** Use dedicated nodes/shared services rather than public endpoints for production apps. The public
|
|
@@ -92,7 +92,7 @@ console.log('Address:', keypair.toSuiAddress());
|
|
|
92
92
|
console.log('Secret key:', keypair.getSecretKey());
|
|
93
93
|
|
|
94
94
|
// Request SUI from the devnet faucet
|
|
95
|
-
await
|
|
95
|
+
await requestSuiFromFaucetV3({
|
|
96
96
|
host: getFaucetHost('devnet'),
|
|
97
97
|
recipient: keypair.toSuiAddress(),
|
|
98
98
|
});
|
|
@@ -183,17 +183,57 @@ node transfer.ts
|
|
|
183
183
|
|
|
184
184
|
### Faucet
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
Use `requestSuiFromFaucetV3` on Devnet and Testnet. It fetches a challenge from `/v3/challenge`,
|
|
187
|
+
computes Argon2d proof-of-work, and submits the proof to `/v3/gas`:
|
|
188
188
|
|
|
189
189
|
```typescript
|
|
190
190
|
|
|
191
|
-
await
|
|
191
|
+
const result = await requestSuiFromFaucetV3({
|
|
192
192
|
host: getFaucetHost('testnet'),
|
|
193
|
-
recipient: '0xYourAddress',
|
|
193
|
+
recipient: '0xYourAddress', // Replace with your Sui address.
|
|
194
|
+
timeout: 180_000,
|
|
194
195
|
});
|
|
196
|
+
|
|
197
|
+
console.log(result.digest, result.amountMist);
|
|
195
198
|
```
|
|
196
199
|
|
|
200
|
+
V3 credits the recipient's address balance, not a coin object. Its response contains `digest`,
|
|
201
|
+
`recipient`, `amountMist`, and `difficulty`; it does not contain V2's `coins_sent`. Amounts are
|
|
202
|
+
returned as decimal strings to preserve precision. The faucet sets the payout amount.
|
|
203
|
+
|
|
204
|
+
Set `host` to the faucet's origin (scheme, hostname, and optional port), such as
|
|
205
|
+
`https://faucet.testnet.sui.io`. The API must serve `/v3/challenge` and `/v3/gas` at the origin
|
|
206
|
+
root. Path prefixes such as `/faucet` are not supported; any path in `host` is discarded.
|
|
207
|
+
|
|
208
|
+
Optional `headers` apply to both requests. The `timeout` covers fetching, solving, and submission,
|
|
209
|
+
and defaults to 180,000 milliseconds. Pass an `AbortSignal` as `signal` to cancel earlier.
|
|
210
|
+
|
|
211
|
+
The helper uses Node's asynchronous native Argon2d when available (Node 24.7 or newer), with Noble
|
|
212
|
+
as the fallback for Node 22 and browsers. Native hashing does not require an addon. Browser apps can
|
|
213
|
+
run the helper in a Web Worker to keep proof-of-work off the UI thread.
|
|
214
|
+
|
|
215
|
+
For a local **no-PoW faucet**, keep using V2:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
|
|
219
|
+
await requestSuiFromFaucetV2({
|
|
220
|
+
host: getFaucetHost('localnet'),
|
|
221
|
+
recipient: '0xYourAddress', // Replace with your Sui address.
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
For a local **PoW faucet**, use `requestSuiFromFaucetV3` and set `host` to its origin, with
|
|
226
|
+
`/v3/challenge` and `/v3/gas` served at the origin root. If it listens on the default local faucet
|
|
227
|
+
port, use `getFaucetHost('localnet')`. The helper does not infer the protocol from the host or fall
|
|
228
|
+
back to V2.
|
|
229
|
+
|
|
230
|
+
V3 refreshes expired challenges before submission but never automatically retries a payout. HTTP 429
|
|
231
|
+
throws `FaucetRateLimitError`. Other HTTP errors throw `FaucetError`, which exposes `status` and,
|
|
232
|
+
when provided by the server, `code` and a transaction `digest`. Non-JSON error responses use a
|
|
233
|
+
fallback message and preserve the parse error as `cause`. If a digest is present, resolve that
|
|
234
|
+
transaction before requesting another payout. A timeout or connection loss during submission does
|
|
235
|
+
not prove the payout failed; do not blindly retry it.
|
|
236
|
+
|
|
197
237
|
> **Note:** Faucets on Devnet and Testnet are rate limited. If you hit the limit, wait before trying again.
|
|
198
238
|
> For Testnet, you can also get SUI through the web UI at `faucet.sui.io` or through the [Sui
|
|
199
239
|
> Discord](https://discord.gg/sui) faucet channels.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten/docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"description": "LLM-friendly documentation for the Sui TypeScript SDK ecosystem",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -25,30 +25,30 @@
|
|
|
25
25
|
"fumadocs-mdx": "15.2.3",
|
|
26
26
|
"fumadocs-typescript": "^5.3.0",
|
|
27
27
|
"fumadocs-ui": "16.14.4",
|
|
28
|
-
"next": "^16.3.
|
|
28
|
+
"next": "^16.3.6",
|
|
29
29
|
"react": "^19.2.8",
|
|
30
30
|
"react-dom": "^19.2.8",
|
|
31
|
-
"@mysten/aws-kms-signer": "0.3.
|
|
32
|
-
"@mysten/dapp-kit-core": "1.6.35",
|
|
33
|
-
"@mysten/deepbook-v3": "2.6.6",
|
|
34
|
-
"@mysten/enoki": "1.2.29",
|
|
35
|
-
"@mysten/dapp-kit-react": "2.1.37",
|
|
36
|
-
"@mysten/gcp-kms-signer": "0.2.31",
|
|
37
|
-
"@mysten/kiosk": "1.4.17",
|
|
31
|
+
"@mysten/aws-kms-signer": "0.3.30",
|
|
38
32
|
"@mysten/bcs": "2.1.2",
|
|
39
|
-
"@mysten/
|
|
40
|
-
"@mysten/
|
|
41
|
-
"@mysten/
|
|
42
|
-
"@mysten/
|
|
43
|
-
"@mysten/
|
|
44
|
-
"@mysten/
|
|
45
|
-
"@mysten/
|
|
46
|
-
"@mysten/
|
|
33
|
+
"@mysten/dapp-kit-core": "1.6.37",
|
|
34
|
+
"@mysten/dapp-kit-react": "2.1.39",
|
|
35
|
+
"@mysten/deepbook-v3": "2.6.8",
|
|
36
|
+
"@mysten/enoki-connect": "1.1.35",
|
|
37
|
+
"@mysten/kiosk": "1.4.19",
|
|
38
|
+
"@mysten/enoki": "1.2.31",
|
|
39
|
+
"@mysten/payment-kit": "0.2.33",
|
|
40
|
+
"@mysten/seal": "1.4.19",
|
|
41
|
+
"@mysten/gcp-kms-signer": "0.2.33",
|
|
42
|
+
"@mysten/signers": "1.1.33",
|
|
43
|
+
"@mysten/ledger-signer": "0.2.33",
|
|
44
|
+
"@mysten/sui": "2.35.0",
|
|
45
|
+
"@mysten/slush-wallet": "1.3.3",
|
|
46
|
+
"@mysten/suins": "2.0.15",
|
|
47
47
|
"@mysten/utils": "0.4.1",
|
|
48
|
-
"@mysten/
|
|
49
|
-
"@mysten/
|
|
50
|
-
"@mysten/
|
|
51
|
-
"@mysten/
|
|
48
|
+
"@mysten/webcrypto-signer": "0.2.33",
|
|
49
|
+
"@mysten/zksend": "1.2.36",
|
|
50
|
+
"@mysten/wallet-standard": "0.21.33",
|
|
51
|
+
"@mysten/walrus": "1.2.34"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@tailwindcss/postcss": "^4.3.3",
|