@mysten/dapp-kit-core 1.6.17 → 1.6.19
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/CHANGELOG.md +10 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/index.mjs +6 -6
- package/dist/web/index.mjs.map +1 -1
- package/docs/actions/connect-wallet.md +2 -4
- package/docs/actions/disconnect-wallet.md +2 -4
- package/docs/actions/sign-and-execute-transaction.md +1 -3
- package/docs/actions/sign-personal-message.md +2 -4
- package/docs/actions/sign-transaction.md +2 -4
- package/docs/actions/switch-account.md +2 -4
- package/docs/actions/switch-network.md +1 -1
- package/docs/index.md +4 -16
- package/docs/llms-index.md +9 -10
- package/docs/react/dapp-kit-provider.md +1 -1
- package/docs/state.md +1 -3
- package/docs/web-components/connect-button.md +1 -1
- package/docs/web-components/connect-modal.md +1 -1
- package/package.json +13 -13
- package/src/utils/transaction-result.ts +2 -0
- package/src/web/dapp-kit-connect-modal.ts +16 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DAppKitProvider
|
|
2
2
|
|
|
3
|
-
> React context provider that makes dApp Kit available throughout your application.
|
|
3
|
+
> >- React context provider that makes dApp Kit available throughout your application.
|
|
4
4
|
|
|
5
5
|
The `DAppKitProvider` is a React context provider that makes your dApp Kit instance available
|
|
6
6
|
throughout your React application. It must wrap any components that use dApp Kit hooks.
|
package/docs/state.md
CHANGED
|
@@ -21,9 +21,7 @@ All stores are available through the `dAppKit.stores` property:
|
|
|
21
21
|
|
|
22
22
|
```typescript
|
|
23
23
|
|
|
24
|
-
const dAppKit = createDAppKit({
|
|
25
|
-
/* config */
|
|
26
|
-
});
|
|
24
|
+
const dAppKit = createDAppKit({/* config */});
|
|
27
25
|
|
|
28
26
|
// Access stores
|
|
29
27
|
const connection = dAppKit.stores.$connection.get();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Connect Button
|
|
2
2
|
|
|
3
|
-
> Framework-agnostic web component providing a complete wallet connection UI for Sui dApps.
|
|
3
|
+
> >- Framework-agnostic web component providing a complete wallet connection UI for Sui dApps.
|
|
4
4
|
|
|
5
5
|
The `<mysten-dapp-kit-connect-button>` Web Component provides a complete wallet connection UI. It
|
|
6
6
|
displays a "Connect Wallet" button when no wallet is connected, and shows the connected account with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Connect Modal
|
|
2
2
|
|
|
3
|
-
> Framework-agnostic web component for wallet selection and connection in Sui dApps.
|
|
3
|
+
> >- Framework-agnostic web component for wallet selection and connection in Sui dApps.
|
|
4
4
|
|
|
5
5
|
The `<mysten-dapp-kit-connect-modal>` Web Component provides a modal dialog for wallet connection.
|
|
6
6
|
While most apps should use the [`Connect Button`](./connect-button) which includes an integrated
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Mysten Labs <build@mystenlabs.com>",
|
|
4
4
|
"description": "Framework-agnostic toolkit for building decentralized applications on Sui.",
|
|
5
5
|
"homepage": "https://sdk.mystenlabs.com/sui",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.19",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"files": [
|
|
9
9
|
"CHANGELOG.md",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@storybook/web-components": "^10.
|
|
44
|
-
"@storybook/web-components-vite": "^10.
|
|
45
|
-
"storybook": "^10.
|
|
46
|
-
"tsdown": "0.22.
|
|
47
|
-
"typescript": "^
|
|
48
|
-
"vitest": "^4.1.
|
|
43
|
+
"@storybook/web-components": "^10.5.8",
|
|
44
|
+
"@storybook/web-components-vite": "^10.5.8",
|
|
45
|
+
"storybook": "^10.5.8",
|
|
46
|
+
"tsdown": "0.22.14",
|
|
47
|
+
"typescript": "^7.0.2",
|
|
48
|
+
"vitest": "^4.1.10"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@floating-ui/dom": "^1.
|
|
51
|
+
"@floating-ui/dom": "^1.8.0",
|
|
52
52
|
"@lit-labs/scoped-registry-mixin": "^1.0.4",
|
|
53
53
|
"@lit/task": "^1.0.3",
|
|
54
54
|
"@nanostores/lit": "^0.2.3",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"@wallet-standard/ui-registry": "^1.1.1",
|
|
57
57
|
"@webcomponents/scoped-custom-element-registry": "^0.0.10",
|
|
58
58
|
"lit": "^3.3.3",
|
|
59
|
-
"nanostores": "^1.
|
|
60
|
-
"@mysten/
|
|
61
|
-
"@mysten/
|
|
62
|
-
"@mysten/
|
|
59
|
+
"nanostores": "^1.4.2",
|
|
60
|
+
"@mysten/slush-wallet": "^1.1.19",
|
|
61
|
+
"@mysten/utils": "^0.4.1",
|
|
62
|
+
"@mysten/wallet-standard": "^0.21.19"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@mysten/sui": "^2.
|
|
65
|
+
"@mysten/sui": "^2.27.0"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
@@ -35,6 +35,8 @@ export function buildTransactionResult(
|
|
|
35
35
|
digest,
|
|
36
36
|
signatures: [signature],
|
|
37
37
|
epoch: null,
|
|
38
|
+
timestampMs: null,
|
|
39
|
+
checkpoint: null,
|
|
38
40
|
status,
|
|
39
41
|
effects: effects as SuiClientTypes.TransactionEffects,
|
|
40
42
|
transaction: parseTransactionBcs(transactionBytes),
|
|
@@ -115,15 +115,17 @@ export class DAppKitConnectModal
|
|
|
115
115
|
return html`<dialog @click=${this.handleDialogClick} @close=${this.#resetSelection}>
|
|
116
116
|
<div class="content" @click=${this.handleContentClick}>
|
|
117
117
|
<div class="connect-header">
|
|
118
|
-
${
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
${
|
|
119
|
+
showBackButton
|
|
120
|
+
? html`<button
|
|
121
|
+
class="icon-button back-button"
|
|
122
|
+
aria-label="Go back"
|
|
123
|
+
@click=${this.#resetSelection}
|
|
124
|
+
>
|
|
125
|
+
${backIcon}
|
|
126
|
+
</button>`
|
|
127
|
+
: nothing
|
|
128
|
+
}
|
|
127
129
|
<h2 class="title">${wallets.length > 0 ? 'Connect a wallet' : 'No wallets installed'}</h2>
|
|
128
130
|
<button
|
|
129
131
|
class="icon-button close-button"
|
|
@@ -173,9 +175,11 @@ export class DAppKitConnectModal
|
|
|
173
175
|
|
|
174
176
|
return html`<connection-status
|
|
175
177
|
.title=${wasRequestCancelled ? 'Request canceled' : 'Connection failed'}
|
|
176
|
-
.copy=${
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
.copy=${
|
|
179
|
+
wasRequestCancelled
|
|
180
|
+
? `You canceled the request`
|
|
181
|
+
: 'Something went wrong. Please try again'
|
|
182
|
+
}
|
|
179
183
|
.wallet=${wallet}
|
|
180
184
|
>
|
|
181
185
|
<internal-button
|