@mysten/docs 0.1.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 (108) hide show
  1. package/README.md +24 -0
  2. package/dist/bcs/index.md +358 -0
  3. package/dist/bcs/llms-index.md +4 -0
  4. package/dist/codegen/index.md +441 -0
  5. package/dist/codegen/llms-index.md +4 -0
  6. package/dist/dapp-kit/actions/connect-wallet.md +69 -0
  7. package/dist/dapp-kit/actions/disconnect-wallet.md +38 -0
  8. package/dist/dapp-kit/actions/sign-and-execute-transaction.md +96 -0
  9. package/dist/dapp-kit/actions/sign-personal-message.md +58 -0
  10. package/dist/dapp-kit/actions/sign-transaction.md +65 -0
  11. package/dist/dapp-kit/actions/switch-account.md +37 -0
  12. package/dist/dapp-kit/actions/switch-network.md +37 -0
  13. package/dist/dapp-kit/dapp-kit-instance.md +162 -0
  14. package/dist/dapp-kit/getting-started/create-dapp.md +151 -0
  15. package/dist/dapp-kit/getting-started/next-js.md +162 -0
  16. package/dist/dapp-kit/getting-started/react.md +172 -0
  17. package/dist/dapp-kit/getting-started/vue.md +193 -0
  18. package/dist/dapp-kit/index.md +70 -0
  19. package/dist/dapp-kit/llms-index.md +26 -0
  20. package/dist/dapp-kit/react/components/connect-button.md +42 -0
  21. package/dist/dapp-kit/react/components/connect-modal.md +51 -0
  22. package/dist/dapp-kit/react/components/index.md +13 -0
  23. package/dist/dapp-kit/react/dapp-kit-provider.md +86 -0
  24. package/dist/dapp-kit/react/hooks/index.md +25 -0
  25. package/dist/dapp-kit/react/hooks/use-current-account.md +33 -0
  26. package/dist/dapp-kit/react/hooks/use-current-client.md +36 -0
  27. package/dist/dapp-kit/react/hooks/use-current-network.md +28 -0
  28. package/dist/dapp-kit/react/hooks/use-current-wallet.md +36 -0
  29. package/dist/dapp-kit/react/hooks/use-dapp-kit.md +100 -0
  30. package/dist/dapp-kit/react/hooks/use-wallet-connection.md +48 -0
  31. package/dist/dapp-kit/react/hooks/use-wallets.md +33 -0
  32. package/dist/dapp-kit/state.md +169 -0
  33. package/dist/dapp-kit/theming.md +196 -0
  34. package/dist/dapp-kit/web-components/connect-button.md +89 -0
  35. package/dist/dapp-kit/web-components/connect-modal.md +177 -0
  36. package/dist/kiosk/advanced-examples.md +101 -0
  37. package/dist/kiosk/from-v1.md +320 -0
  38. package/dist/kiosk/index.md +22 -0
  39. package/dist/kiosk/kiosk-client/introduction.md +52 -0
  40. package/dist/kiosk/kiosk-client/kiosk-transaction/examples.md +119 -0
  41. package/dist/kiosk/kiosk-client/kiosk-transaction/kiosk-transaction.md +103 -0
  42. package/dist/kiosk/kiosk-client/kiosk-transaction/managing.md +235 -0
  43. package/dist/kiosk/kiosk-client/kiosk-transaction/purchasing.md +110 -0
  44. package/dist/kiosk/kiosk-client/querying.md +237 -0
  45. package/dist/kiosk/kiosk-client/transfer-policy-transaction/introduction.md +79 -0
  46. package/dist/kiosk/kiosk-client/transfer-policy-transaction/using-the-manager.md +115 -0
  47. package/dist/kiosk/llms-index.md +8 -0
  48. package/dist/llms-index.md +125 -0
  49. package/dist/payment-kit/getting-started.md +256 -0
  50. package/dist/payment-kit/index.md +132 -0
  51. package/dist/payment-kit/llms-index.md +8 -0
  52. package/dist/payment-kit/payment-kit-sdk.md +747 -0
  53. package/dist/payment-kit/payment-processing.md +372 -0
  54. package/dist/payment-kit/registry-management.md +529 -0
  55. package/dist/seal/index.md +85 -0
  56. package/dist/seal/llms-index.md +4 -0
  57. package/dist/slush-wallet/dapp.md +95 -0
  58. package/dist/slush-wallet/deep-linking.md +465 -0
  59. package/dist/slush-wallet/index.md +7 -0
  60. package/dist/slush-wallet/llms-index.md +6 -0
  61. package/dist/sui/bcs.md +134 -0
  62. package/dist/sui/clients/core.md +606 -0
  63. package/dist/sui/clients/graphql.md +101 -0
  64. package/dist/sui/clients/grpc.md +155 -0
  65. package/dist/sui/clients/index.md +95 -0
  66. package/dist/sui/clients/json-rpc.md +239 -0
  67. package/dist/sui/cryptography/keypairs.md +267 -0
  68. package/dist/sui/cryptography/multisig.md +194 -0
  69. package/dist/sui/cryptography/passkey.md +111 -0
  70. package/dist/sui/cryptography/webcrypto-signer.md +81 -0
  71. package/dist/sui/executors.md +148 -0
  72. package/dist/sui/faucet.md +26 -0
  73. package/dist/sui/hello-sui.md +115 -0
  74. package/dist/sui/index.md +53 -0
  75. package/dist/sui/install.md +61 -0
  76. package/dist/sui/llm-docs.md +32 -0
  77. package/dist/sui/llms-index.md +44 -0
  78. package/dist/sui/migrations/0.38.md +58 -0
  79. package/dist/sui/migrations/sui-1.0.md +455 -0
  80. package/dist/sui/migrations/sui-2.0/agent-prompt.md +42 -0
  81. package/dist/sui/migrations/sui-2.0/dapp-kit.md +350 -0
  82. package/dist/sui/migrations/sui-2.0/deepbook-v3.md +33 -0
  83. package/dist/sui/migrations/sui-2.0/index.md +158 -0
  84. package/dist/sui/migrations/sui-2.0/json-rpc-migration.md +386 -0
  85. package/dist/sui/migrations/sui-2.0/kiosk.md +120 -0
  86. package/dist/sui/migrations/sui-2.0/sdk-maintainers.md +90 -0
  87. package/dist/sui/migrations/sui-2.0/seal.md +14 -0
  88. package/dist/sui/migrations/sui-2.0/sui.md +341 -0
  89. package/dist/sui/migrations/sui-2.0/suins.md +43 -0
  90. package/dist/sui/migrations/sui-2.0/wallet-builders.md +66 -0
  91. package/dist/sui/migrations/sui-2.0/walrus.md +41 -0
  92. package/dist/sui/migrations/sui-2.0/zksend.md +95 -0
  93. package/dist/sui/plugins.md +258 -0
  94. package/dist/sui/sdk-building.md +344 -0
  95. package/dist/sui/transaction-building/basics.md +299 -0
  96. package/dist/sui/transaction-building/gas.md +62 -0
  97. package/dist/sui/transaction-building/intents.md +62 -0
  98. package/dist/sui/transaction-building/offline.md +73 -0
  99. package/dist/sui/transaction-building/sponsored-transactions.md +22 -0
  100. package/dist/sui/utils/derived_objects.md +59 -0
  101. package/dist/sui/utils/index.md +52 -0
  102. package/dist/sui/zklogin.md +83 -0
  103. package/dist/walrus/index.md +527 -0
  104. package/dist/walrus/llms-index.md +4 -0
  105. package/dist/zksend/index.md +27 -0
  106. package/dist/zksend/link-builder.md +192 -0
  107. package/dist/zksend/llms-index.md +5 -0
  108. package/package.json +66 -0
@@ -0,0 +1,192 @@
1
+ # Creating zkSend Links
2
+
3
+ > Create and customize zkSend claim links
4
+
5
+ > **Warning:** Products and services that incorporate zkSend links may be subject to financial regulations,
6
+ > including obtaining money transmitter licenses in jurisdictions where you provide your services.
7
+ > It is the developer's responsibility to ensure compliance with all relevant laws and obtain any
8
+ > necessary licenses. The information provided by Mysten Labs is not legal advice, and developers
9
+ > should consult with a qualified legal professional to address their specific circumstances.
10
+
11
+ ## Limitations
12
+
13
+ - zkSend only supports Mainnet and Testnet at this time.
14
+ - Objects within links must be publicly transferrable.
15
+
16
+ ## Create a link
17
+
18
+ You can start creating your own zkSend link using the `linkBuilder` method on the zkSend client
19
+ extension:
20
+
21
+ ```ts
22
+
23
+ const client = new SuiGrpcClient({
24
+ network: 'mainnet',
25
+ baseUrl: 'https://fullnode.mainnet.sui.io:443',
26
+ }).$extend(zksend());
27
+
28
+ const link = client.zksend.linkBuilder({
29
+ sender: '0x...',
30
+ });
31
+ ```
32
+
33
+ #### Adding SUI to the link
34
+
35
+ You can add SUI to the link by calling `link.addClaimableMist()`. This method takes the following
36
+ params:
37
+
38
+ - **`amount`** (required) - The amount of MIST (the base unit of SUI) to add to the link.
39
+
40
+ #### Adding non-SUI coins to the link
41
+
42
+ You can add non-SUI coins to the link by calling `link.addClaimableBalance()`. This method takes the
43
+ following params:
44
+
45
+ - **`coinType`** (required) - The coin type of the coin to add to the link (e.g. `0x2::sui::SUI`).
46
+ - **`amount`** (required) - The amount of the coin to add to the link. Represented in the base unit
47
+ of the coin.
48
+
49
+ The SDK will automatically perform the necessary coin management logic to transfer the defined
50
+ amount, such as merging and splitting coin objects.
51
+
52
+ #### Adding objects to the link
53
+
54
+ You can add a publicly-transferrable object to the link by calling `link.addClaimableObject()`. This
55
+ method takes the following params:
56
+
57
+ - **`id`** (required) - The ID of the object. This must be owned by the `sender` you configured when
58
+ creating the link.
59
+
60
+ #### Adding objects created in the same transaction
61
+
62
+ You can create objects to add to links in the same transaction the link is created in by using
63
+ `link.addClaimableObjectRef()`
64
+
65
+ - **`ref`** (required) - The reference to the object you want to add to the link.
66
+ - **`type`** (required) - The move type of the object you are adding
67
+
68
+ ```ts
69
+
70
+ const tx = new Transaction();
71
+
72
+ const link = client.zksend.linkBuilder({
73
+ sender: '0x...',
74
+ });
75
+
76
+ const newObject = tx.moveCall({
77
+ target: `${PACKAGE_ID}::your_module::mint`,
78
+ });
79
+
80
+ link.addClaimableObjectRef({
81
+ ref: newObject,
82
+ type: `${PACKAGE_ID}::your_module::YourType`,
83
+ });
84
+
85
+ // Adds the link creation transactions to the transaction
86
+ link.createSendTransaction({
87
+ transaction: tx,
88
+ });
89
+ ```
90
+
91
+ #### Getting the link URL
92
+
93
+ At any time, you can get the URL for the link by calling `link.getLink()`.
94
+
95
+ ## Submitting the link transaction
96
+
97
+ Once you have built your zkSend link, you need to execute a transaction to transfer assets and make
98
+ the link claimable.
99
+
100
+ You can call the `link.createSendTransaction()` method, which returns a `Transaction` object that
101
+ you can sign and submit to the blockchain.
102
+
103
+ ```ts
104
+ const tx = await link.createSendTransaction();
105
+
106
+ const { bytes, signature } = tx.sign({ client, signer: keypair });
107
+
108
+ const result = await client.executeTransactionBlock({
109
+ transactionBlock: bytes,
110
+ signature,
111
+ });
112
+ ```
113
+
114
+ If you have a keypair you would like to send the transaction with, you can use the `create` method
115
+ as shorthand for creating the send transaction, signing it, and submitting it to the blockchain.
116
+
117
+ ```ts
118
+ await link.create({
119
+ signer: yourKeypair,
120
+ // Wait until the new link is ready to be indexed so it is claimable
121
+ waitForTransaction: true,
122
+ });
123
+ ```
124
+
125
+ ## Claiming a link
126
+
127
+ To claim a link via the SDK you can use the `loadLinkFromUrl` method:
128
+
129
+ ```ts
130
+ // Load a link instance from a URL
131
+ const link = await client.zksend.loadLinkFromUrl('https://zksend.com/claim#$abc...');
132
+
133
+ // list what claimable assets the link has
134
+ const { nfts, balances } = link.assets;
135
+
136
+ // claim all the assets from the link
137
+ await link.claimAssets(addressOfClaimer);
138
+ ```
139
+
140
+ ## Regenerating links
141
+
142
+ If you lose a link you've created, you can re-generate the link (this can only done from the address
143
+ that originally created the link):
144
+
145
+ ```ts
146
+ // url will be the new link url
147
+ const { url, transaction } = await link.createRegenerateTransaction(addressOfLinkCreator);
148
+
149
+ // Execute the transaction to regenerate the link
150
+ const result = await client.signAndExecuteTransaction({
151
+ transaction,
152
+ signer: keypair,
153
+ });
154
+
155
+ // Check transaction status
156
+ if (result.$kind === 'FailedTransaction') {
157
+ throw new Error(`Link regeneration failed: ${result.FailedTransaction.status.error?.message}`);
158
+ }
159
+ ```
160
+
161
+ ## Bulk link creation
162
+
163
+ To create multiple links in a single transaction, you can use `client.zksend.createLinks`:
164
+
165
+ ```ts
166
+ const links = [];
167
+
168
+ for (let i = 0; i < 10; i++) {
169
+ const link = client.zksend.linkBuilder({
170
+ sender: keypair.toSuiAddress(),
171
+ });
172
+
173
+ link.addClaimableMist(100n);
174
+ links.push(link);
175
+ }
176
+
177
+ const urls = links.map((link) => link.getLink());
178
+
179
+ const tx = await client.zksend.createLinks({
180
+ links,
181
+ });
182
+
183
+ const result = await client.signAndExecuteTransaction({
184
+ transaction: tx,
185
+ signer: keypair,
186
+ });
187
+
188
+ // Check transaction status
189
+ if (result.$kind === 'FailedTransaction') {
190
+ throw new Error(`Link creation failed: ${result.FailedTransaction.status.error?.message}`);
191
+ }
192
+ ```
@@ -0,0 +1,5 @@
1
+ # ZkSend
2
+ > Send Sui with a link
3
+
4
+ - [zkSend SDK](./index.md): Send Sui assets via shareable links with zkSend
5
+ - [Creating zkSend Links](./link-builder.md): Create and customize zkSend claim links
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@mysten/docs",
3
+ "version": "0.1.1",
4
+ "description": "LLM-friendly documentation for the Sui TypeScript SDK ecosystem",
5
+ "license": "Apache-2.0",
6
+ "files": [
7
+ "dist/"
8
+ ],
9
+ "scripts": {
10
+ "build": "typedoc && next build && pnpm run build:docs",
11
+ "build:docs": "tsx scripts/build-docs.ts --all",
12
+ "dev": "next dev",
13
+ "start": "next start",
14
+ "postinstall": "fumadocs-mdx",
15
+ "validate-docs": "tsx scripts/validate-llm-docs.ts",
16
+ "prettier:check": "prettier -c --ignore-unknown .",
17
+ "prettier:fix": "prettier -w --ignore-unknown .",
18
+ "oxlint:check": "oxlint .",
19
+ "oxlint:fix": "oxlint --fix",
20
+ "lint": "pnpm run oxlint:check && pnpm run prettier:check",
21
+ "lint:fix": "pnpm run oxlint:fix && pnpm run prettier:fix"
22
+ },
23
+ "dependencies": {
24
+ "@mysten/bcs": "workspace:^",
25
+ "@mysten/dapp-kit": "workspace:^",
26
+ "@mysten/dapp-kit-core": "workspace:^",
27
+ "@mysten/dapp-kit-react": "workspace:^",
28
+ "@mysten/deepbook-v3": "workspace:^",
29
+ "@mysten/enoki": "workspace:^",
30
+ "@mysten/enoki-connect": "workspace:^",
31
+ "@mysten/kiosk": "workspace:^",
32
+ "@mysten/payment-kit": "workspace:^",
33
+ "@mysten/seal": "workspace:^",
34
+ "@mysten/signers": "workspace:^",
35
+ "@mysten/slush-wallet": "workspace:^",
36
+ "@mysten/sui": "workspace:^",
37
+ "@mysten/suins": "workspace:^",
38
+ "@mysten/utils": "workspace:^",
39
+ "@mysten/wallet-standard": "workspace:^",
40
+ "@mysten/walrus": "workspace:^",
41
+ "@mysten/zksend": "workspace:^",
42
+ "@tanstack/react-query": "^5.90.16",
43
+ "fast-glob": "^3.3.3",
44
+ "fumadocs-core": "16.4.7",
45
+ "fumadocs-docgen": "^3.0.5",
46
+ "fumadocs-mdx": "14.2.5",
47
+ "fumadocs-typescript": "^5.0.1",
48
+ "fumadocs-ui": "16.4.7",
49
+ "gray-matter": "^4.0.3",
50
+ "next": "^16.1.5",
51
+ "react": "^19.2.3",
52
+ "react-dom": "^19.2.3"
53
+ },
54
+ "devDependencies": {
55
+ "@tailwindcss/postcss": "^4.1.18",
56
+ "@types/mdx": "^2.0.13",
57
+ "@types/node": "^25.0.8",
58
+ "@types/react": "^19.2.8",
59
+ "@types/react-dom": "^19.2.3",
60
+ "postcss": "^8.5.6",
61
+ "tailwindcss": "^4.1.18",
62
+ "typedoc": "^0.28.16",
63
+ "typedoc-plugin-mermaid": "^1.12.0",
64
+ "typescript": "^5.9.3"
65
+ }
66
+ }