@mysten/docs 0.1.18 → 0.1.20
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/bcs/index.md +1 -1
- package/dist/bcs/llms-index.md +1 -1
- package/dist/codegen/index.md +53 -53
- package/dist/codegen/llms-index.md +1 -1
- package/dist/dapp-kit/actions/connect-wallet.md +4 -4
- package/dist/dapp-kit/actions/disconnect-wallet.md +8 -7
- package/dist/dapp-kit/actions/sign-and-execute-transaction.md +14 -14
- package/dist/dapp-kit/actions/sign-personal-message.md +8 -8
- package/dist/dapp-kit/actions/sign-transaction.md +7 -7
- package/dist/dapp-kit/actions/switch-account.md +6 -6
- package/dist/dapp-kit/actions/switch-network.md +5 -5
- package/dist/dapp-kit/dapp-kit-instance.md +19 -18
- package/dist/dapp-kit/getting-started/create-dapp.md +12 -12
- package/dist/dapp-kit/getting-started/next-js.md +12 -11
- package/dist/dapp-kit/getting-started/react.md +25 -25
- package/dist/dapp-kit/getting-started/vue.md +12 -12
- package/dist/dapp-kit/index.md +4 -4
- package/dist/dapp-kit/llms-index.md +23 -23
- package/dist/dapp-kit/react/components/connect-button.md +3 -3
- package/dist/dapp-kit/react/components/connect-modal.md +3 -3
- package/dist/dapp-kit/react/components/index.md +2 -2
- package/dist/dapp-kit/react/dapp-kit-provider.md +6 -6
- package/dist/dapp-kit/react/hooks/index.md +4 -3
- package/dist/dapp-kit/react/hooks/use-current-account.md +3 -3
- package/dist/dapp-kit/react/hooks/use-current-client.md +3 -3
- package/dist/dapp-kit/react/hooks/use-current-network.md +3 -3
- package/dist/dapp-kit/react/hooks/use-current-wallet.md +3 -3
- package/dist/dapp-kit/react/hooks/use-dapp-kit.md +5 -5
- package/dist/dapp-kit/react/hooks/use-wallet-connection.md +3 -3
- package/dist/dapp-kit/react/hooks/use-wallets.md +3 -3
- package/dist/dapp-kit/state.md +16 -16
- package/dist/dapp-kit/theming.md +27 -27
- package/dist/dapp-kit/web-components/connect-button.md +9 -9
- package/dist/dapp-kit/web-components/connect-modal.md +16 -16
- package/dist/kiosk/advanced-examples.md +1 -1
- package/dist/kiosk/from-v1.md +1 -1
- package/dist/kiosk/index.md +5 -5
- package/dist/kiosk/kiosk-client/introduction.md +6 -6
- package/dist/kiosk/kiosk-client/kiosk-transaction/examples.md +3 -3
- package/dist/kiosk/kiosk-client/kiosk-transaction/kiosk-transaction.md +1 -1
- package/dist/kiosk/kiosk-client/kiosk-transaction/managing.md +11 -11
- package/dist/kiosk/kiosk-client/kiosk-transaction/purchasing.md +1 -1
- package/dist/kiosk/kiosk-client/querying.md +1 -1
- package/dist/kiosk/kiosk-client/transfer-policy-transaction/introduction.md +1 -1
- package/dist/kiosk/kiosk-client/transfer-policy-transaction/using-the-manager.md +1 -3
- package/dist/kiosk/llms-index.md +5 -5
- package/dist/llms-index.md +83 -83
- package/dist/payment-kit/getting-started.md +13 -13
- package/dist/payment-kit/index.md +13 -13
- package/dist/payment-kit/llms-index.md +5 -5
- package/dist/payment-kit/payment-kit-sdk.md +18 -18
- package/dist/payment-kit/payment-processing.md +34 -34
- package/dist/payment-kit/registry-management.md +35 -35
- package/dist/seal/index.md +5 -5
- package/dist/seal/llms-index.md +1 -1
- package/dist/slush-wallet/dapp.md +10 -10
- package/dist/slush-wallet/deep-linking.md +54 -54
- package/dist/slush-wallet/index.md +2 -2
- package/dist/slush-wallet/llms-index.md +3 -3
- package/dist/sui/bcs.md +11 -11
- package/dist/sui/clients/core.md +57 -56
- package/dist/sui/clients/graphql.md +3 -3
- package/dist/sui/clients/grpc.md +10 -10
- package/dist/sui/clients/index.md +14 -14
- package/dist/sui/clients/json-rpc.md +16 -16
- package/dist/sui/cryptography/keypairs.md +6 -6
- package/dist/sui/cryptography/multisig.md +4 -4
- package/dist/sui/cryptography/passkey.md +15 -14
- package/dist/sui/cryptography/webcrypto-signer.md +4 -4
- package/dist/sui/executors.md +18 -16
- package/dist/sui/faucet.md +3 -3
- package/dist/sui/hello-sui.md +5 -5
- package/dist/sui/index.md +12 -12
- package/dist/sui/install.md +3 -3
- package/dist/sui/llm-docs.md +9 -9
- package/dist/sui/llms-index.md +41 -41
- package/dist/sui/migrations/0.38.md +6 -6
- package/dist/sui/migrations/sui-1.0.md +32 -32
- package/dist/sui/migrations/sui-2.0/agent-prompt.md +3 -3
- package/dist/sui/migrations/sui-2.0/dapp-kit.md +43 -43
- package/dist/sui/migrations/sui-2.0/deepbook-v3.md +1 -1
- package/dist/sui/migrations/sui-2.0/index.md +37 -37
- package/dist/sui/migrations/sui-2.0/json-rpc-migration.md +53 -47
- package/dist/sui/migrations/sui-2.0/kiosk.md +8 -8
- package/dist/sui/migrations/sui-2.0/sdk-maintainers.md +7 -7
- package/dist/sui/migrations/sui-2.0/seal.md +1 -1
- package/dist/sui/migrations/sui-2.0/sui.md +16 -16
- package/dist/sui/migrations/sui-2.0/suins.md +4 -3
- package/dist/sui/migrations/sui-2.0/wallet-builders.md +5 -5
- package/dist/sui/migrations/sui-2.0/walrus.md +3 -3
- package/dist/sui/migrations/sui-2.0/zksend.md +5 -5
- package/dist/sui/plugins.md +14 -14
- package/dist/sui/sdk-building.md +32 -32
- package/dist/sui/transaction-building/basics.md +13 -13
- package/dist/sui/transaction-building/gas.md +2 -3
- package/dist/sui/transaction-building/intents.md +4 -4
- package/dist/sui/transaction-building/offline.md +8 -8
- package/dist/sui/transaction-building/sponsored-transactions.md +1 -1
- package/dist/sui/utils/derived_objects.md +10 -10
- package/dist/sui/utils/index.md +1 -1
- package/dist/sui/zklogin.md +1 -1
- package/dist/walrus/index.md +1 -1
- package/dist/walrus/llms-index.md +1 -1
- package/dist/zksend/index.md +2 -2
- package/dist/zksend/link-builder.md +5 -4
- package/dist/zksend/llms-index.md +2 -2
- package/package.json +6 -6
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Deep Linking
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Configure deep links to open Slush Wallet directly to specific screens or actions.
|
|
4
4
|
|
|
5
5
|
Deep linking allows external applications, websites, and services to open Slush directly to specific
|
|
6
6
|
screens or trigger specific actions. This enables seamless integrations where users can be directed
|
|
7
|
-
into the wallet to perform actions like swapping tokens, claiming assets, or browsing
|
|
7
|
+
into the wallet to perform actions like swapping tokens, claiming assets, or browsing apps.
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
11
|
Slush supports two types of deep linking:
|
|
12
12
|
|
|
13
|
-
1. **Custom URL
|
|
14
|
-
2. **Universal
|
|
13
|
+
1. **Custom URL schemes**: Direct links using `slush://` (mobile app only)
|
|
14
|
+
2. **Universal links and app links**: HTTPS links that work across mobile and desktop
|
|
15
15
|
|
|
16
16
|
> **Note:** For most integrations, use `my.slush.app` HTTPS links. They work on iOS, Android, and desktop
|
|
17
17
|
> browsers, opening the native app when installed or falling back to the web app.
|
|
@@ -21,7 +21,7 @@ Slush supports two types of deep linking:
|
|
|
21
21
|
> **Warning:** Always URL-encode parameter values, especially token type addresses which contain special
|
|
22
22
|
> characters like colons (`:`). See [URL Encode Parameters](#url-encode-parameters) for examples.
|
|
23
23
|
|
|
24
|
-
## URL
|
|
24
|
+
## URL schemes
|
|
25
25
|
|
|
26
26
|
Slush registers a custom URL scheme:
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ Slush registers a custom URL scheme:
|
|
|
29
29
|
| ---------- | ----------------------------------- |
|
|
30
30
|
| `slush://` | Primary scheme for the Slush wallet |
|
|
31
31
|
|
|
32
|
-
### Basic
|
|
32
|
+
### Basic format
|
|
33
33
|
|
|
34
34
|
```
|
|
35
35
|
slush://<path>?<parameters>
|
|
@@ -42,7 +42,7 @@ slush://swap?fromCoinType=0x2::sui::SUI
|
|
|
42
42
|
slush://browse/https://app.example.com
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
## Universal
|
|
45
|
+
## Universal links and app links
|
|
46
46
|
|
|
47
47
|
Slush responds to HTTPS links (Universal Links on iOS, App Links on Android) from the following
|
|
48
48
|
domains:
|
|
@@ -51,7 +51,7 @@ domains:
|
|
|
51
51
|
| -------------- | -------------------------------------------- |
|
|
52
52
|
| `my.slush.app` | `/browse/*`, `/claim/*`, `/swap/*`, `/pay/*` |
|
|
53
53
|
|
|
54
|
-
### Cross-
|
|
54
|
+
### Cross-platform behavior
|
|
55
55
|
|
|
56
56
|
The `my.slush.app` domain is recommended because it works across all platforms:
|
|
57
57
|
|
|
@@ -61,28 +61,28 @@ The `my.slush.app` domain is recommended because it works across all platforms:
|
|
|
61
61
|
| Mobile (app not installed) | Opens in the mobile browser with the Slush web app |
|
|
62
62
|
| Desktop browser | Opens the Slush web app |
|
|
63
63
|
|
|
64
|
-
> **Note:** Unlike custom URL schemes (`slush://`), `my.slush.app` links never fail
|
|
64
|
+
> **Note:** Unlike custom URL schemes (`slush://`), `my.slush.app` links never fail. They always open either
|
|
65
65
|
> the native app or the web app, ensuring users can complete their intended action.
|
|
66
66
|
|
|
67
67
|
### Examples
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
# Opens dApp browser
|
|
70
|
+
# Opens dApp browser: works on mobile and desktop
|
|
71
71
|
https://my.slush.app/browse/https://app.turbos.finance
|
|
72
72
|
|
|
73
|
-
# Opens claim flow
|
|
73
|
+
# Opens claim flow: works on mobile and desktop
|
|
74
74
|
https://my.slush.app/claim?claimUrl=abc123xyz
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
## Supported
|
|
77
|
+
## Supported routes
|
|
78
78
|
|
|
79
|
-
###
|
|
79
|
+
### App browser
|
|
80
80
|
|
|
81
81
|
Open the in-app browser to load a specific URL:
|
|
82
82
|
|
|
83
|
-
| Route | Description
|
|
84
|
-
| ------------- |
|
|
85
|
-
| `browse/:url` | Opens a URL in the
|
|
83
|
+
| Route | Description |
|
|
84
|
+
| ------------- | ------------------------------ |
|
|
85
|
+
| `browse/:url` | Opens a URL in the app browser |
|
|
86
86
|
|
|
87
87
|
**Parameters:**
|
|
88
88
|
|
|
@@ -97,9 +97,9 @@ slush://browse/https://app.turbos.finance
|
|
|
97
97
|
https://my.slush.app/browse/https://app.cetus.zone
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
> The URL must be a complete, valid URL including the protocol (
|
|
100
|
+
> The URL must be a complete, valid URL including the protocol (for example, `https://`).
|
|
101
101
|
|
|
102
|
-
### Token
|
|
102
|
+
### Token swap
|
|
103
103
|
|
|
104
104
|
Open the token swap screen with optional pre-filled values:
|
|
105
105
|
|
|
@@ -128,7 +128,7 @@ slush://swap?fromCoinType=0x2::sui::SUI&toCoinType=0xdba34672e30cb065b1f93e3ab55
|
|
|
128
128
|
slush://swap?fromCoinType=0x2::sui::SUI&presetAmount=100
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
### Claim
|
|
131
|
+
### Claim assets
|
|
132
132
|
|
|
133
133
|
Open the claim screen to receive stashed or gifted tokens:
|
|
134
134
|
|
|
@@ -149,7 +149,7 @@ slush://claim?claimUrl=https://zksend.com/claim/abc123xyz
|
|
|
149
149
|
slush://claim?claimUrl=https://getstashed.com/claim/def456
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
### Token
|
|
152
|
+
### Token details
|
|
153
153
|
|
|
154
154
|
View details for a specific token:
|
|
155
155
|
|
|
@@ -173,7 +173,7 @@ slush://tokens?coinType=0x2::sui::SUI
|
|
|
173
173
|
slush://tokens?coinType=0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
### Receive / QR
|
|
176
|
+
### Receive / QR code
|
|
177
177
|
|
|
178
178
|
Open the receive screen to display the wallet address or scan a QR code:
|
|
179
179
|
|
|
@@ -197,7 +197,7 @@ slush://suime?action=RECEIVE
|
|
|
197
197
|
slush://suime?action=SCAN_QR_CODE
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
### DeFi
|
|
200
|
+
### DeFi strategies
|
|
201
201
|
|
|
202
202
|
Access yield strategies and DeFi opportunities:
|
|
203
203
|
|
|
@@ -250,7 +250,7 @@ slush://staking/native-stake
|
|
|
250
250
|
slush://staking/liquid-stake
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
### Send
|
|
253
|
+
### Send tokens
|
|
254
254
|
|
|
255
255
|
Access the send flow:
|
|
256
256
|
|
|
@@ -271,7 +271,7 @@ slush://send-coins/camera
|
|
|
271
271
|
### Payment Kit
|
|
272
272
|
|
|
273
273
|
Open the payment flow using Payment Kit URIs. Slush supports the `sui:pay` protocol for processing
|
|
274
|
-
|
|
274
|
+
onchain payments with optional registry support.
|
|
275
275
|
|
|
276
276
|
| Route | Description |
|
|
277
277
|
| ----- | --------------------------- |
|
|
@@ -288,16 +288,16 @@ https://my.slush.app/pay?receiver=<address>&amount=<amount>&coinType=<coinType>&
|
|
|
288
288
|
|
|
289
289
|
**Parameters:**
|
|
290
290
|
|
|
291
|
-
| Parameter | Type | Required | Description
|
|
292
|
-
| ---------- | ------ | -------- |
|
|
293
|
-
| `receiver` | string | Yes | Recipient Sui address
|
|
294
|
-
| `amount` | string | Yes | Payment amount in smallest unit (
|
|
295
|
-
| `coinType` | string | Yes | Coin type (
|
|
296
|
-
| `nonce` | string | Yes | Unique payment identifier (max 36 characters)
|
|
297
|
-
| `registry` | string | No | Registry name or object ID for registry-based payments
|
|
298
|
-
| `label` | string | No | Human-readable label for the payment
|
|
299
|
-
| `message` | string | No | Message or memo for the payment
|
|
300
|
-
| `iconUrl` | string | No | URL to an icon image for display purposes
|
|
291
|
+
| Parameter | Type | Required | Description |
|
|
292
|
+
| ---------- | ------ | -------- | ----------------------------------------------------------- |
|
|
293
|
+
| `receiver` | string | Yes | Recipient Sui address |
|
|
294
|
+
| `amount` | string | Yes | Payment amount in smallest unit (for example, MIST for SUI) |
|
|
295
|
+
| `coinType` | string | Yes | Coin type (for example, `0x2::sui::SUI`) |
|
|
296
|
+
| `nonce` | string | Yes | Unique payment identifier (max 36 characters) |
|
|
297
|
+
| `registry` | string | No | Registry name or object ID for registry-based payments |
|
|
298
|
+
| `label` | string | No | Human-readable label for the payment |
|
|
299
|
+
| `message` | string | No | Message or memo for the payment |
|
|
300
|
+
| `iconUrl` | string | No | URL to an icon image for display purposes |
|
|
301
301
|
|
|
302
302
|
**Examples:**
|
|
303
303
|
|
|
@@ -318,9 +318,9 @@ https://my.slush.app/pay?receiver=0x1234...abcd&amount=5000000&coinType=0xdba346
|
|
|
318
318
|
> Use the `@mysten/payment-kit` SDK to generate properly formatted payment URIs. See the [Payment
|
|
319
319
|
> Kit documentation](/payment-kit/getting-started) for more details.
|
|
320
320
|
|
|
321
|
-
## Implementation
|
|
321
|
+
## Implementation examples
|
|
322
322
|
|
|
323
|
-
### Web
|
|
323
|
+
### Web integration
|
|
324
324
|
|
|
325
325
|
Link to Slush from any web page (mobile or desktop):
|
|
326
326
|
|
|
@@ -387,13 +387,13 @@ val customIntent = Intent(Intent.ACTION_VIEW, Uri.parse("slush://swap"))
|
|
|
387
387
|
startActivity(customIntent)
|
|
388
388
|
```
|
|
389
389
|
|
|
390
|
-
## Best
|
|
390
|
+
## Best practices
|
|
391
391
|
|
|
392
|
-
### Use my.slush.app
|
|
392
|
+
### Use my.slush.app links for maximum compatibility
|
|
393
393
|
|
|
394
394
|
When linking from any platform, prefer `my.slush.app` links over custom URL schemes. These links
|
|
395
|
-
work everywhere
|
|
396
|
-
|
|
395
|
+
work everywhere, mobile apps, mobile browsers, and desktop browsers, providing a seamless experience
|
|
396
|
+
for all users.
|
|
397
397
|
|
|
398
398
|
```html
|
|
399
399
|
<!-- Recommended: Works on mobile (app or browser) and desktop -->
|
|
@@ -406,7 +406,7 @@ experience for all users.
|
|
|
406
406
|
> Use `my.slush.app` links as your default choice. Only use custom URL schemes (`slush://`) when you
|
|
407
407
|
> specifically need to detect whether the mobile app is installed.
|
|
408
408
|
|
|
409
|
-
### URL
|
|
409
|
+
### URL encode parameters
|
|
410
410
|
|
|
411
411
|
Always URL-encode parameter values, especially token type addresses which contain special
|
|
412
412
|
characters:
|
|
@@ -417,7 +417,7 @@ const encodedCoinType = encodeURIComponent(coinType);
|
|
|
417
417
|
const url = `slush://swap?fromCoinType=${encodedCoinType}`;
|
|
418
418
|
```
|
|
419
419
|
|
|
420
|
-
### Check
|
|
420
|
+
### Check app installation (custom schemes only)
|
|
421
421
|
|
|
422
422
|
If you're using custom URL schemes (`slush://`), check if the app is installed to provide
|
|
423
423
|
appropriate fallbacks. This is not needed when using `my.slush.app` links, which automatically fall
|
|
@@ -433,28 +433,28 @@ if (canOpenSlush) {
|
|
|
433
433
|
}
|
|
434
434
|
```
|
|
435
435
|
|
|
436
|
-
### Handle
|
|
436
|
+
### Handle missing parameters gracefully
|
|
437
437
|
|
|
438
438
|
Slush will attempt to open the requested screen even if optional parameters are missing. Required
|
|
439
439
|
parameters that are missing will result in the app opening to a default or error state.
|
|
440
440
|
|
|
441
441
|
## Troubleshooting
|
|
442
442
|
|
|
443
|
-
### Link
|
|
443
|
+
### Link not opening the app
|
|
444
444
|
|
|
445
|
-
1. **Verify the app is installed
|
|
446
|
-
2. **Check URL format
|
|
447
|
-
3. **iOS Universal Links
|
|
448
|
-
|
|
449
|
-
4. **Android App Links
|
|
445
|
+
1. **Verify the app is installed**: Custom URL schemes only work if Slush is installed
|
|
446
|
+
2. **Check URL format**: Ensure the URL is properly formatted and encoded
|
|
447
|
+
3. **iOS Universal Links**: Must be clicked from Safari or apps that support Universal Links; copied
|
|
448
|
+
or pasted URLs might not trigger the app
|
|
449
|
+
4. **Android App Links**: Ensure the device has verified the app link association
|
|
450
450
|
|
|
451
|
-
### Wrong
|
|
451
|
+
### Wrong screen opens
|
|
452
452
|
|
|
453
|
-
1. **Check the path
|
|
454
|
-
2. **Check parameters
|
|
455
|
-
3. **Check parameter encoding
|
|
453
|
+
1. **Check the path**: Verify the route matches one of the supported routes above
|
|
454
|
+
2. **Check parameters**: Ensure all required parameters are provided
|
|
455
|
+
3. **Check parameter encoding**: Special characters in coin types must be URL-encoded
|
|
456
456
|
|
|
457
|
-
### Universal
|
|
457
|
+
### Universal links open in browser instead of app
|
|
458
458
|
|
|
459
459
|
This can happen if:
|
|
460
460
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Slush Wallet Integration
|
|
2
2
|
|
|
3
|
-
> Integrate Slush Wallet into your Sui
|
|
3
|
+
> Integrate Slush Wallet into your Sui application for mobile and web wallet support.
|
|
4
4
|
|
|
5
5
|
This section covers integration with [Slush Wallet](https://slush.app), a mobile wallet for the Sui
|
|
6
|
-
blockchain. You'll find guides for wallet-specific functionality to enhance your
|
|
6
|
+
blockchain. You'll find guides for wallet-specific functionality to enhance your app's user
|
|
7
7
|
experience.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Slush Wallet
|
|
2
2
|
> Slush Wallet Integration
|
|
3
3
|
|
|
4
|
-
- [Slush Wallet Integration](..md): Integrate Slush Wallet into your Sui
|
|
5
|
-
- [
|
|
6
|
-
- [Deep Linking](./deep-linking.md):
|
|
4
|
+
- [Slush Wallet Integration](..md): Integrate Slush Wallet into your Sui application for mobile and web wallet support.
|
|
5
|
+
- [App Integration](./dapp.md): Connect your app to Slush Wallet using the Slush Wallet SDK and wallet standard.
|
|
6
|
+
- [Deep Linking](./deep-linking.md): Configure deep links to open Slush Wallet directly to specific screens or actions.
|
package/dist/sui/bcs.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BCS
|
|
2
2
|
|
|
3
|
-
> Binary Canonical Serialization for encoding Sui Move types
|
|
3
|
+
> Binary Canonical Serialization for encoding Sui Move types.
|
|
4
4
|
|
|
5
5
|
The `@mysten/sui/bcs` package extends `@mysten/bcs` with Sui specific scheme definitions.
|
|
6
6
|
|
|
@@ -41,10 +41,10 @@ the following pre-defined schemes:
|
|
|
41
41
|
- `TransactionExpiration`
|
|
42
42
|
- `TransactionKind`
|
|
43
43
|
- `TypeTag`
|
|
44
|
-
- `Object
|
|
45
|
-
- `TransactionEffects
|
|
46
|
-
- `TransactionEffectsV1
|
|
47
|
-
- `TransactionEffectsV2
|
|
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
48
|
|
|
49
49
|
All the upper-cased values are `BcsType` instances, and can be used directly to parse and serialize
|
|
50
50
|
data.
|
|
@@ -60,9 +60,9 @@ bcs.TypeTag.serialize({
|
|
|
60
60
|
});
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
## Working with
|
|
63
|
+
## Working with objects
|
|
64
64
|
|
|
65
|
-
To parse
|
|
65
|
+
To parse onchain objects, fetch them with `include: { content: true }` and pass `object.content` to
|
|
66
66
|
a generated BCS type or a manual struct definition. The `content` field contains only the inner Move
|
|
67
67
|
struct bytes:
|
|
68
68
|
|
|
@@ -76,9 +76,9 @@ const { object } = await client.core.getObject({
|
|
|
76
76
|
const parsed = MyStruct.parse(object.content);
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
### `bcs.Object
|
|
79
|
+
### `bcs.Object`: Full object envelope
|
|
80
80
|
|
|
81
|
-
The `bcs.Object` schema represents the complete
|
|
81
|
+
The `bcs.Object` schema represents the complete onchain object, including metadata (type, owner,
|
|
82
82
|
version, previous transaction, storage rebate) wrapping the inner struct bytes. This is what the
|
|
83
83
|
`objectBcs` include option returns. Most of this metadata is already available as fields on the
|
|
84
84
|
object response, so you typically only need `content`.
|
|
@@ -106,11 +106,11 @@ const serialized = bcs.Object.serialize({
|
|
|
106
106
|
});
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
> **Warning:** Do not pass `objectBcs` bytes to a Move struct parser
|
|
109
|
+
> **Warning:** Do not pass `objectBcs` bytes to a Move struct parser. It contains wrapping metadata that will
|
|
110
110
|
> cause parsing to fail. Use `content` for parsing Move struct fields. See the [Core API
|
|
111
111
|
> docs](/sui/clients/core#objectbcs) for details.
|
|
112
112
|
|
|
113
|
-
## Working with
|
|
113
|
+
## Working with transaction effects
|
|
114
114
|
|
|
115
115
|
The `bcs.TransactionEffects` schema can be used to parse transaction effects:
|
|
116
116
|
|