@mysten/dapp-kit 1.0.4 → 1.0.5
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 +14 -0
- package/package.json +10 -13
- package/dist/components/AccountDropdownMenu.css.d.ts +0 -7
- package/dist/components/AccountDropdownMenu.css.d.ts.map +0 -1
- package/dist/components/AccountDropdownMenu.d.ts +0 -11
- package/dist/components/AccountDropdownMenu.d.ts.map +0 -1
- package/dist/components/ConnectButton.d.ts +0 -10
- package/dist/components/ConnectButton.d.ts.map +0 -1
- package/dist/components/SuiClientProvider.d.ts +0 -26
- package/dist/components/SuiClientProvider.d.ts.map +0 -1
- package/dist/components/WalletProvider.d.ts +0 -27
- package/dist/components/WalletProvider.d.ts.map +0 -1
- package/dist/components/connect-modal/ConnectModal.css.d.ts +0 -12
- package/dist/components/connect-modal/ConnectModal.css.d.ts.map +0 -1
- package/dist/components/connect-modal/ConnectModal.d.ts +0 -24
- package/dist/components/connect-modal/ConnectModal.d.ts.map +0 -1
- package/dist/components/connect-modal/InfoSection.css.d.ts +0 -2
- package/dist/components/connect-modal/InfoSection.css.d.ts.map +0 -1
- package/dist/components/connect-modal/InfoSection.d.ts +0 -7
- package/dist/components/connect-modal/InfoSection.d.ts.map +0 -1
- package/dist/components/connect-modal/views/ConnectionStatus.css.d.ts +0 -6
- package/dist/components/connect-modal/views/ConnectionStatus.css.d.ts.map +0 -1
- package/dist/components/connect-modal/views/ConnectionStatus.d.ts +0 -9
- package/dist/components/connect-modal/views/ConnectionStatus.d.ts.map +0 -1
- package/dist/components/connect-modal/views/GettingStarted.css.d.ts +0 -4
- package/dist/components/connect-modal/views/GettingStarted.css.d.ts.map +0 -1
- package/dist/components/connect-modal/views/GettingStarted.d.ts +0 -2
- package/dist/components/connect-modal/views/GettingStarted.d.ts.map +0 -1
- package/dist/components/connect-modal/views/WhatIsAWallet.css.d.ts +0 -3
- package/dist/components/connect-modal/views/WhatIsAWallet.css.d.ts.map +0 -1
- package/dist/components/connect-modal/views/WhatIsAWallet.d.ts +0 -2
- package/dist/components/connect-modal/views/WhatIsAWallet.d.ts.map +0 -1
- package/dist/components/connect-modal/wallet-list/WalletList.css.d.ts +0 -2
- package/dist/components/connect-modal/wallet-list/WalletList.css.d.ts.map +0 -1
- package/dist/components/connect-modal/wallet-list/WalletList.d.ts +0 -10
- package/dist/components/connect-modal/wallet-list/WalletList.d.ts.map +0 -1
- package/dist/components/connect-modal/wallet-list/WalletListItem.css.d.ts +0 -5
- package/dist/components/connect-modal/wallet-list/WalletListItem.css.d.ts.map +0 -1
- package/dist/components/connect-modal/wallet-list/WalletListItem.d.ts +0 -10
- package/dist/components/connect-modal/wallet-list/WalletListItem.d.ts.map +0 -1
- package/dist/components/icons/BackIcon.d.ts +0 -3
- package/dist/components/icons/BackIcon.d.ts.map +0 -1
- package/dist/components/icons/CheckIcon.d.ts +0 -3
- package/dist/components/icons/CheckIcon.d.ts.map +0 -1
- package/dist/components/icons/ChevronIcon.d.ts +0 -3
- package/dist/components/icons/ChevronIcon.d.ts.map +0 -1
- package/dist/components/icons/CloseIcon.d.ts +0 -3
- package/dist/components/icons/CloseIcon.d.ts.map +0 -1
- package/dist/components/styling/InjectedThemeStyles.d.ts +0 -7
- package/dist/components/styling/InjectedThemeStyles.d.ts.map +0 -1
- package/dist/components/styling/StyleMarker.css.d.ts +0 -2
- package/dist/components/styling/StyleMarker.css.d.ts.map +0 -1
- package/dist/components/styling/StyleMarker.d.ts +0 -3
- package/dist/components/styling/StyleMarker.d.ts.map +0 -1
- package/dist/components/ui/Button.css.d.ts +0 -34
- package/dist/components/ui/Button.css.d.ts.map +0 -1
- package/dist/components/ui/Button.d.ts +0 -9
- package/dist/components/ui/Button.d.ts.map +0 -1
- package/dist/components/ui/Heading.css.d.ts +0 -34
- package/dist/components/ui/Heading.css.d.ts.map +0 -1
- package/dist/components/ui/Heading.d.ts +0 -13
- package/dist/components/ui/Heading.d.ts.map +0 -1
- package/dist/components/ui/IconButton.css.d.ts +0 -2
- package/dist/components/ui/IconButton.css.d.ts.map +0 -1
- package/dist/components/ui/IconButton.d.ts +0 -7
- package/dist/components/ui/IconButton.d.ts.map +0 -1
- package/dist/components/ui/Text.css.d.ts +0 -34
- package/dist/components/ui/Text.css.d.ts.map +0 -1
- package/dist/components/ui/Text.d.ts +0 -13
- package/dist/components/ui/Text.d.ts.map +0 -1
- package/dist/constants/styleDataAttribute.d.ts +0 -6
- package/dist/constants/styleDataAttribute.d.ts.map +0 -1
- package/dist/constants/walletDefaults.d.ts +0 -7
- package/dist/constants/walletDefaults.d.ts.map +0 -1
- package/dist/constants/walletMutationKeys.d.ts +0 -14
- package/dist/constants/walletMutationKeys.d.ts.map +0 -1
- package/dist/contexts/walletContext.d.ts +0 -14
- package/dist/contexts/walletContext.d.ts.map +0 -1
- package/dist/errors/walletErrors.d.ts +0 -23
- package/dist/errors/walletErrors.d.ts.map +0 -1
- package/dist/hooks/networkConfig.d.ts +0 -11
- package/dist/hooks/networkConfig.d.ts.map +0 -1
- package/dist/hooks/useResolveSuiNSNames.d.ts +0 -4
- package/dist/hooks/useResolveSuiNSNames.d.ts.map +0 -1
- package/dist/hooks/useSuiClient.d.ts +0 -4
- package/dist/hooks/useSuiClient.d.ts.map +0 -1
- package/dist/hooks/useSuiClientInfiniteQuery.d.ts +0 -26
- package/dist/hooks/useSuiClientInfiniteQuery.d.ts.map +0 -1
- package/dist/hooks/useSuiClientMutation.d.ts +0 -5
- package/dist/hooks/useSuiClientMutation.d.ts.map +0 -1
- package/dist/hooks/useSuiClientQueries.d.ts +0 -28
- package/dist/hooks/useSuiClientQueries.d.ts.map +0 -1
- package/dist/hooks/useSuiClientQuery.d.ts +0 -39
- package/dist/hooks/useSuiClientQuery.d.ts.map +0 -1
- package/dist/hooks/wallet/useAccounts.d.ts +0 -6
- package/dist/hooks/wallet/useAccounts.d.ts.map +0 -1
- package/dist/hooks/wallet/useAutoConnectWallet.d.ts +0 -2
- package/dist/hooks/wallet/useAutoConnectWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useConnectWallet.d.ts +0 -16
- package/dist/hooks/wallet/useConnectWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useCurrentAccount.d.ts +0 -6
- package/dist/hooks/wallet/useCurrentAccount.d.ts.map +0 -1
- package/dist/hooks/wallet/useCurrentWallet.d.ts +0 -26
- package/dist/hooks/wallet/useCurrentWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useDisconnectWallet.d.ts +0 -10
- package/dist/hooks/wallet/useDisconnectWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useSignAndExecuteTransaction.d.ts +0 -30
- package/dist/hooks/wallet/useSignAndExecuteTransaction.d.ts.map +0 -1
- package/dist/hooks/wallet/useSignPersonalMessage.d.ts +0 -14
- package/dist/hooks/wallet/useSignPersonalMessage.d.ts.map +0 -1
- package/dist/hooks/wallet/useSignTransaction.d.ts +0 -18
- package/dist/hooks/wallet/useSignTransaction.d.ts.map +0 -1
- package/dist/hooks/wallet/useSlushWallet.d.ts +0 -6
- package/dist/hooks/wallet/useSlushWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useSwitchAccount.d.ts +0 -15
- package/dist/hooks/wallet/useSwitchAccount.d.ts.map +0 -1
- package/dist/hooks/wallet/useUnsafeBurnerWallet.d.ts +0 -2
- package/dist/hooks/wallet/useUnsafeBurnerWallet.d.ts.map +0 -1
- package/dist/hooks/wallet/useWalletPropertiesChanged.d.ts +0 -5
- package/dist/hooks/wallet/useWalletPropertiesChanged.d.ts.map +0 -1
- package/dist/hooks/wallet/useWalletStore.d.ts +0 -3
- package/dist/hooks/wallet/useWalletStore.d.ts.map +0 -1
- package/dist/hooks/wallet/useWallets.d.ts +0 -5
- package/dist/hooks/wallet/useWallets.d.ts.map +0 -1
- package/dist/hooks/wallet/useWalletsChanged.d.ts +0 -6
- package/dist/hooks/wallet/useWalletsChanged.d.ts.map +0 -1
- package/dist/index.d.ts +0 -26
- package/dist/index.d.ts.map +0 -1
- package/dist/themes/lightTheme.d.ts +0 -3
- package/dist/themes/lightTheme.d.ts.map +0 -1
- package/dist/themes/themeContract.d.ts +0 -141
- package/dist/themes/themeContract.d.ts.map +0 -1
- package/dist/types/utilityTypes.d.ts +0 -2
- package/dist/types/utilityTypes.d.ts.map +0 -1
- package/dist/types.d.ts +0 -3
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/assertUnreachable.d.ts +0 -5
- package/dist/utils/assertUnreachable.d.ts.map +0 -1
- package/dist/utils/stateStorage.d.ts +0 -3
- package/dist/utils/stateStorage.d.ts.map +0 -1
- package/dist/utils/walletUtils.d.ts +0 -4
- package/dist/utils/walletUtils.d.ts.map +0 -1
- package/dist/walletStore.d.ts +0 -45
- package/dist/walletStore.d.ts.map +0 -1
- package/docs/index.md +0 -91
- package/docs/llms-index.md +0 -27
- package/docs/rpc-hooks.md +0 -161
- package/docs/slush.md +0 -29
- package/docs/sui-client-provider.md +0 -191
- package/docs/themes.md +0 -115
- package/docs/wallet-components/ConnectButton.md +0 -22
- package/docs/wallet-components/ConnectModal.md +0 -66
- package/docs/wallet-hooks/useAccounts.md +0 -36
- package/docs/wallet-hooks/useAutoConnectWallet.md +0 -29
- package/docs/wallet-hooks/useConnectWallet.md +0 -48
- package/docs/wallet-hooks/useCurrentAccount.md +0 -36
- package/docs/wallet-hooks/useCurrentWallet.md +0 -59
- package/docs/wallet-hooks/useDisconnectWallet.md +0 -26
- package/docs/wallet-hooks/useSignAndExecuteTransaction.md +0 -124
- package/docs/wallet-hooks/useSignPersonalMessage.md +0 -59
- package/docs/wallet-hooks/useSignTransaction.md +0 -67
- package/docs/wallet-hooks/useSwitchAccount.md +0 -47
- package/docs/wallet-hooks/useWallets.md +0 -38
- package/docs/wallet-provider.md +0 -37
package/dist/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from './components/connect-modal/ConnectModal.js';
|
|
2
|
-
export * from './components/ConnectButton.js';
|
|
3
|
-
export * from './components/SuiClientProvider.js';
|
|
4
|
-
export * from './components/WalletProvider.js';
|
|
5
|
-
export * from './hooks/networkConfig.js';
|
|
6
|
-
export * from './hooks/useResolveSuiNSNames.js';
|
|
7
|
-
export * from './hooks/useSuiClient.js';
|
|
8
|
-
export * from './hooks/useSuiClientInfiniteQuery.js';
|
|
9
|
-
export * from './hooks/useSuiClientMutation.js';
|
|
10
|
-
export * from './hooks/useSuiClientQuery.js';
|
|
11
|
-
export * from './hooks/useSuiClientQueries.js';
|
|
12
|
-
export * from './hooks/wallet/useAccounts.js';
|
|
13
|
-
export * from './hooks/wallet/useAutoConnectWallet.js';
|
|
14
|
-
export * from './hooks/wallet/useConnectWallet.js';
|
|
15
|
-
export * from './hooks/wallet/useCurrentAccount.js';
|
|
16
|
-
export * from './hooks/wallet/useCurrentWallet.js';
|
|
17
|
-
export * from './hooks/wallet/useDisconnectWallet.js';
|
|
18
|
-
export * from './hooks/wallet/useSignAndExecuteTransaction.js';
|
|
19
|
-
export * from './hooks/wallet/useSignPersonalMessage.js';
|
|
20
|
-
export * from './hooks/wallet/useSignTransaction.js';
|
|
21
|
-
export * from './hooks/wallet/useSwitchAccount.js';
|
|
22
|
-
export * from './hooks/wallet/useWallets.js';
|
|
23
|
-
export * from './themes/lightTheme.js';
|
|
24
|
-
export * from './types.js';
|
|
25
|
-
export type { Theme, ThemeVars, DynamicTheme } from './themes/themeContract.js';
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAE3B,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lightTheme.d.ts","sourceRoot":"","sources":["../../src/themes/lightTheme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,eAAO,MAAM,UAAU,EAAE,SAyDxB,CAAC"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
declare const themeContractValues: {
|
|
2
|
-
blurs: {
|
|
3
|
-
modalOverlay: string;
|
|
4
|
-
};
|
|
5
|
-
backgroundColors: {
|
|
6
|
-
primaryButton: string;
|
|
7
|
-
primaryButtonHover: string;
|
|
8
|
-
outlineButtonHover: string;
|
|
9
|
-
walletItemHover: string;
|
|
10
|
-
walletItemSelected: string;
|
|
11
|
-
modalOverlay: string;
|
|
12
|
-
modalPrimary: string;
|
|
13
|
-
modalSecondary: string;
|
|
14
|
-
iconButton: string;
|
|
15
|
-
iconButtonHover: string;
|
|
16
|
-
dropdownMenu: string;
|
|
17
|
-
dropdownMenuSeparator: string;
|
|
18
|
-
};
|
|
19
|
-
borderColors: {
|
|
20
|
-
outlineButton: string;
|
|
21
|
-
};
|
|
22
|
-
colors: {
|
|
23
|
-
primaryButton: string;
|
|
24
|
-
outlineButton: string;
|
|
25
|
-
body: string;
|
|
26
|
-
bodyMuted: string;
|
|
27
|
-
bodyDanger: string;
|
|
28
|
-
iconButton: string;
|
|
29
|
-
};
|
|
30
|
-
radii: {
|
|
31
|
-
small: string;
|
|
32
|
-
medium: string;
|
|
33
|
-
large: string;
|
|
34
|
-
xlarge: string;
|
|
35
|
-
};
|
|
36
|
-
shadows: {
|
|
37
|
-
primaryButton: string;
|
|
38
|
-
walletItemSelected: string;
|
|
39
|
-
};
|
|
40
|
-
fontWeights: {
|
|
41
|
-
normal: string;
|
|
42
|
-
medium: string;
|
|
43
|
-
bold: string;
|
|
44
|
-
};
|
|
45
|
-
fontSizes: {
|
|
46
|
-
small: string;
|
|
47
|
-
medium: string;
|
|
48
|
-
large: string;
|
|
49
|
-
xlarge: string;
|
|
50
|
-
};
|
|
51
|
-
typography: {
|
|
52
|
-
fontFamily: string;
|
|
53
|
-
fontStyle: string;
|
|
54
|
-
lineHeight: string;
|
|
55
|
-
letterSpacing: string;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export type ThemeVars = typeof themeContractValues;
|
|
59
|
-
/**
|
|
60
|
-
* A custom theme that is enabled when various conditions are
|
|
61
|
-
*/
|
|
62
|
-
export type DynamicTheme = {
|
|
63
|
-
/**
|
|
64
|
-
* An optional media query required for the given theme to be enabled. This is useful
|
|
65
|
-
* when you want the theme of your application to automatically switch depending on
|
|
66
|
-
* a media feature.
|
|
67
|
-
*
|
|
68
|
-
* @example '(prefers-color-scheme: dark)'
|
|
69
|
-
*/
|
|
70
|
-
mediaQuery?: string;
|
|
71
|
-
/**
|
|
72
|
-
* An optional CSS selector required for the given theme to be enabled. This is useful
|
|
73
|
-
* when you have a manual theme switcher on your application that sets a top-level
|
|
74
|
-
* class name or data-attribute to control the current theme.
|
|
75
|
-
*
|
|
76
|
-
* @example '.data-dark'
|
|
77
|
-
*/
|
|
78
|
-
selector?: string;
|
|
79
|
-
/** The theme definitions that will be set when the selector and mediaQuery criteria are matched. */
|
|
80
|
-
variables: ThemeVars;
|
|
81
|
-
};
|
|
82
|
-
export type Theme = ThemeVars | DynamicTheme[];
|
|
83
|
-
export declare const themeVars: {
|
|
84
|
-
blurs: {
|
|
85
|
-
modalOverlay: `var(--${string})`;
|
|
86
|
-
};
|
|
87
|
-
backgroundColors: {
|
|
88
|
-
primaryButton: `var(--${string})`;
|
|
89
|
-
primaryButtonHover: `var(--${string})`;
|
|
90
|
-
outlineButtonHover: `var(--${string})`;
|
|
91
|
-
walletItemHover: `var(--${string})`;
|
|
92
|
-
walletItemSelected: `var(--${string})`;
|
|
93
|
-
modalOverlay: `var(--${string})`;
|
|
94
|
-
modalPrimary: `var(--${string})`;
|
|
95
|
-
modalSecondary: `var(--${string})`;
|
|
96
|
-
iconButton: `var(--${string})`;
|
|
97
|
-
iconButtonHover: `var(--${string})`;
|
|
98
|
-
dropdownMenu: `var(--${string})`;
|
|
99
|
-
dropdownMenuSeparator: `var(--${string})`;
|
|
100
|
-
};
|
|
101
|
-
borderColors: {
|
|
102
|
-
outlineButton: `var(--${string})`;
|
|
103
|
-
};
|
|
104
|
-
colors: {
|
|
105
|
-
primaryButton: `var(--${string})`;
|
|
106
|
-
outlineButton: `var(--${string})`;
|
|
107
|
-
body: `var(--${string})`;
|
|
108
|
-
bodyMuted: `var(--${string})`;
|
|
109
|
-
bodyDanger: `var(--${string})`;
|
|
110
|
-
iconButton: `var(--${string})`;
|
|
111
|
-
};
|
|
112
|
-
radii: {
|
|
113
|
-
small: `var(--${string})`;
|
|
114
|
-
medium: `var(--${string})`;
|
|
115
|
-
large: `var(--${string})`;
|
|
116
|
-
xlarge: `var(--${string})`;
|
|
117
|
-
};
|
|
118
|
-
shadows: {
|
|
119
|
-
primaryButton: `var(--${string})`;
|
|
120
|
-
walletItemSelected: `var(--${string})`;
|
|
121
|
-
};
|
|
122
|
-
fontWeights: {
|
|
123
|
-
normal: `var(--${string})`;
|
|
124
|
-
medium: `var(--${string})`;
|
|
125
|
-
bold: `var(--${string})`;
|
|
126
|
-
};
|
|
127
|
-
fontSizes: {
|
|
128
|
-
small: `var(--${string})`;
|
|
129
|
-
medium: `var(--${string})`;
|
|
130
|
-
large: `var(--${string})`;
|
|
131
|
-
xlarge: `var(--${string})`;
|
|
132
|
-
};
|
|
133
|
-
typography: {
|
|
134
|
-
fontFamily: `var(--${string})`;
|
|
135
|
-
fontStyle: `var(--${string})`;
|
|
136
|
-
lineHeight: `var(--${string})`;
|
|
137
|
-
letterSpacing: `var(--${string})`;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
export {};
|
|
141
|
-
//# sourceMappingURL=themeContract.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeContract.d.ts","sourceRoot":"","sources":["../../src/themes/themeContract.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDxB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,OAAO,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,oGAAoG;IACpG,SAAS,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,YAAY,EAAE,CAAC;AAE/C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilityTypes.d.ts","sourceRoot":"","sources":["../../src/types/utilityTypes.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/types.d.ts
DELETED
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxF,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertUnreachable.d.ts","sourceRoot":"","sources":["../../src/utils/assertUnreachable.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAErD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stateStorage.d.ts","sourceRoot":"","sources":["../../src/utils/stateStorage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,wBAAgB,mBAAmB,IAAI,YAAY,CAalD"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Wallet, WalletWithFeatures, WalletWithRequiredFeatures } from '@mysten/wallet-standard';
|
|
2
|
-
export declare function getRegisteredWallets<AdditionalFeatures extends Wallet['features']>(preferredWallets: string[], walletFilter?: (wallet: WalletWithRequiredFeatures) => boolean): WalletWithFeatures<import("@mysten/wallet-standard").StandardConnectFeature & import("@mysten/wallet-standard").StandardEventsFeature & AdditionalFeatures>[];
|
|
3
|
-
export declare function getWalletUniqueIdentifier(wallet?: Wallet): string | undefined;
|
|
4
|
-
//# sourceMappingURL=walletUtils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"walletUtils.d.ts","sourceRoot":"","sources":["../../src/utils/walletUtils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEX,MAAM,EACN,kBAAkB,EAClB,0BAA0B,EAC1B,MAAM,yBAAyB,CAAC;AAGjC,wBAAgB,oBAAoB,CAAC,kBAAkB,SAAS,MAAM,CAAC,UAAU,CAAC,EACjF,gBAAgB,EAAE,MAAM,EAAE,EAC1B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,OAAO,iKAmB9D;AAED,wBAAgB,yBAAyB,CAAC,MAAM,CAAC,EAAE,MAAM,sBAExD"}
|
package/dist/walletStore.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Wallet, WalletAccount, WalletWithRequiredFeatures } from '@mysten/wallet-standard';
|
|
2
|
-
import type { StateStorage } from 'zustand/middleware';
|
|
3
|
-
type WalletConnectionStatus = 'disconnected' | 'connecting' | 'connected';
|
|
4
|
-
export type WalletActions = {
|
|
5
|
-
setAccountSwitched: (selectedAccount: WalletAccount) => void;
|
|
6
|
-
setConnectionStatus: (connectionStatus: WalletConnectionStatus) => void;
|
|
7
|
-
setWalletConnected: (wallet: WalletWithRequiredFeatures, connectedAccounts: readonly WalletAccount[], selectedAccount: WalletAccount | null, supportedIntents?: string[]) => void;
|
|
8
|
-
updateWalletAccounts: (accounts: readonly WalletAccount[]) => void;
|
|
9
|
-
setWalletDisconnected: () => void;
|
|
10
|
-
setWalletRegistered: (updatedWallets: WalletWithRequiredFeatures[]) => void;
|
|
11
|
-
setWalletUnregistered: (updatedWallets: WalletWithRequiredFeatures[], unregisteredWallet: Wallet) => void;
|
|
12
|
-
};
|
|
13
|
-
export type WalletStore = ReturnType<typeof createWalletStore>;
|
|
14
|
-
export type StoreState = {
|
|
15
|
-
autoConnectEnabled: boolean;
|
|
16
|
-
wallets: WalletWithRequiredFeatures[];
|
|
17
|
-
accounts: readonly WalletAccount[];
|
|
18
|
-
currentWallet: WalletWithRequiredFeatures | null;
|
|
19
|
-
currentAccount: WalletAccount | null;
|
|
20
|
-
lastConnectedAccountAddress: string | null;
|
|
21
|
-
lastConnectedWalletName: string | null;
|
|
22
|
-
connectionStatus: WalletConnectionStatus;
|
|
23
|
-
supportedIntents: string[];
|
|
24
|
-
} & WalletActions;
|
|
25
|
-
type WalletConfiguration = {
|
|
26
|
-
autoConnectEnabled: boolean;
|
|
27
|
-
wallets: WalletWithRequiredFeatures[];
|
|
28
|
-
storage: StateStorage;
|
|
29
|
-
storageKey: string;
|
|
30
|
-
};
|
|
31
|
-
export declare function createWalletStore({ wallets, storage, storageKey, autoConnectEnabled, }: WalletConfiguration): Omit<import("zustand").StoreApi<StoreState>, "setState" | "persist"> & {
|
|
32
|
-
setState(partial: StoreState | Partial<StoreState> | ((state: StoreState) => StoreState | Partial<StoreState>), replace?: false | undefined): unknown;
|
|
33
|
-
setState(state: StoreState | ((state: StoreState) => StoreState), replace: true): unknown;
|
|
34
|
-
persist: {
|
|
35
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<StoreState, unknown, unknown>>) => void;
|
|
36
|
-
clearStorage: () => void;
|
|
37
|
-
rehydrate: () => Promise<void> | void;
|
|
38
|
-
hasHydrated: () => boolean;
|
|
39
|
-
onHydrate: (fn: (state: StoreState) => void) => () => void;
|
|
40
|
-
onFinishHydration: (fn: (state: StoreState) => void) => () => void;
|
|
41
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<StoreState, unknown, unknown>>;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=walletStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"walletStore.d.ts","sourceRoot":"","sources":["../src/walletStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKvD,KAAK,sBAAsB,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,CAAC;AAE1E,MAAM,MAAM,aAAa,GAAG;IAC3B,kBAAkB,EAAE,CAAC,eAAe,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7D,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACxE,kBAAkB,EAAE,CACnB,MAAM,EAAE,0BAA0B,EAClC,iBAAiB,EAAE,SAAS,aAAa,EAAE,EAC3C,eAAe,EAAE,aAAa,GAAG,IAAI,EACrC,gBAAgB,CAAC,EAAE,MAAM,EAAE,KACvB,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,KAAK,IAAI,CAAC;IACnE,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,EAAE,CAAC,cAAc,EAAE,0BAA0B,EAAE,KAAK,IAAI,CAAC;IAC5E,qBAAqB,EAAE,CACtB,cAAc,EAAE,0BAA0B,EAAE,EAC5C,kBAAkB,EAAE,MAAM,KACtB,IAAI,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE/D,MAAM,MAAM,UAAU,GAAG;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IACnC,aAAa,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACjD,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,aAAa,CAAC;AAElB,KAAK,mBAAmB,GAAG;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EACjC,OAAO,EACP,OAAO,EACP,UAAU,EACV,kBAAkB,GAClB,EAAE,mBAAmB;;;;;;;;;;;;EAuFrB"}
|
package/docs/index.md
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# Sui dApp Kit (Legacy)
|
|
2
|
-
|
|
3
|
-
> dApp Kit API reference for @mysten/dapp-kit
|
|
4
|
-
|
|
5
|
-
> **Warning:** **Deprecated - JSON RPC Only**: This legacy version of `@mysten/dapp-kit` only works
|
|
6
|
-
> with the deprecated JSON RPC API and will not be updated to support gRPC or GraphQL. For new
|
|
7
|
-
> projects, use [`@mysten/dapp-kit-core` and `@mysten/dapp-kit-react`](/dapp-kit).
|
|
8
|
-
|
|
9
|
-
The Sui dApp Kit is a set of React components, hooks, and utilities to help you build a dApp for the
|
|
10
|
-
Sui ecosystem. Its hooks and components provide an interface for querying data from the Sui network
|
|
11
|
-
and connecting to Sui wallets.
|
|
12
|
-
|
|
13
|
-
### Core Features
|
|
14
|
-
|
|
15
|
-
Some of the core features of the dApp Kit include:
|
|
16
|
-
|
|
17
|
-
- Query hooks to get the information your dApp needs
|
|
18
|
-
- Automatic wallet state management
|
|
19
|
-
- Support for all Sui wallets
|
|
20
|
-
- Pre-built React components
|
|
21
|
-
- Lower level hooks for custom components
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
To use the Sui dApp Kit in your project, run the following command in your project root:
|
|
26
|
-
|
|
27
|
-
```sh npm2yarn
|
|
28
|
-
npm i --save @mysten/dapp-kit @mysten/sui @tanstack/react-query
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Setting up providers
|
|
32
|
-
|
|
33
|
-
To use the hooks and components in the dApp Kit, wrap your app with the providers shown in the
|
|
34
|
-
following example. The props available on the providers are covered in more detail in their
|
|
35
|
-
respective pages.
|
|
36
|
-
|
|
37
|
-
```tsx
|
|
38
|
-
// Config options for the networks you want to connect to
|
|
39
|
-
const { networkConfig } = createNetworkConfig({
|
|
40
|
-
localnet: { url: getFullnodeUrl('localnet') },
|
|
41
|
-
mainnet: { url: getFullnodeUrl('mainnet') },
|
|
42
|
-
});
|
|
43
|
-
const queryClient = new QueryClient();
|
|
44
|
-
|
|
45
|
-
function App() {
|
|
46
|
-
return (
|
|
47
|
-
<QueryClientProvider client={queryClient}>
|
|
48
|
-
<SuiClientProvider networks={networkConfig} defaultNetwork="localnet">
|
|
49
|
-
<WalletProvider>
|
|
50
|
-
<YourApp />
|
|
51
|
-
</WalletProvider>
|
|
52
|
-
</SuiClientProvider>
|
|
53
|
-
</QueryClientProvider>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Using UI components to connect to a wallet
|
|
59
|
-
|
|
60
|
-
The dApp Kit provides a set of flexible UI components that you can use to connect and manage wallet
|
|
61
|
-
accounts from your dApp. The components are built on top of
|
|
62
|
-
[Radix UI](https://www.radix-ui.com/primitives) and are customizable.
|
|
63
|
-
|
|
64
|
-
To use the provided UI components, import the dApp Kit CSS stylesheet into your dApp. For more
|
|
65
|
-
information regarding customization options, check out the respective documentation pages for the
|
|
66
|
-
components and [themes](/dapp-kit/legacy/themes).
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Using hooks to make RPC calls
|
|
73
|
-
|
|
74
|
-
The dApp Kit provides a set of hooks for making RPC calls to the Sui blockchain. The hooks are thin
|
|
75
|
-
wrappers around `useQuery` from `@tanstack/react-query`. For more comprehensive documentation on how
|
|
76
|
-
to use these query hooks, check out the
|
|
77
|
-
[react-query documentation](https://tanstack.com/query/latest/docs/react/overview).
|
|
78
|
-
|
|
79
|
-
```tsx
|
|
80
|
-
function MyComponent() {
|
|
81
|
-
const { data, isPending, error, refetch } = useSuiClientQuery('getOwnedObjects', {
|
|
82
|
-
owner: '0x123',
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
if (isPending) {
|
|
86
|
-
return <div>Loading...</div>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return <pre>{JSON.stringify(data, null, 2)}</pre>;
|
|
90
|
-
}
|
|
91
|
-
```
|
package/docs/llms-index.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# dApp Kit (Legacy)
|
|
2
|
-
|
|
3
|
-
> Build Sui dapps in React with @mysten/dapp-kit
|
|
4
|
-
|
|
5
|
-
- [Sui dApp Kit (Legacy)](./index.md): dApp Kit API reference for @mysten/dapp-kit
|
|
6
|
-
- [SuiClientProvider](./sui-client-provider.md): React provider for Sui client configuration
|
|
7
|
-
- [Rpc Hooks](./rpc-hooks.md): React hooks for Sui RPC queries
|
|
8
|
-
- [WalletProvider](./wallet-provider.md): React provider for wallet connections
|
|
9
|
-
- [ConnectButton](./wallet-components/ConnectButton.md): React connect button component
|
|
10
|
-
- [ConnectModal](./wallet-components/ConnectModal.md): React connect modal component
|
|
11
|
-
- [useAccounts](./wallet-hooks/useAccounts.md): List wallet accounts
|
|
12
|
-
- [useAutoConnectWallet](./wallet-hooks/useAutoConnectWallet.md): Automatically reconnect to the
|
|
13
|
-
last connected wallet
|
|
14
|
-
- [useConnectWallet](./wallet-hooks/useConnectWallet.md): Connect a wallet to the dApp
|
|
15
|
-
- [useCurrentAccount](./wallet-hooks/useCurrentAccount.md): Get the current wallet account
|
|
16
|
-
- [useCurrentWallet](./wallet-hooks/useCurrentWallet.md): Get the current wallet connection
|
|
17
|
-
- [useDisconnectWallet](./wallet-hooks/useDisconnectWallet.md): Disconnect the current wallet
|
|
18
|
-
- [useSignAndExecuteTransaction](./wallet-hooks/useSignAndExecuteTransaction.md): Sign and execute a
|
|
19
|
-
transaction
|
|
20
|
-
- [useSignPersonalMessage](./wallet-hooks/useSignPersonalMessage.md): Sign a personal message with
|
|
21
|
-
the connected wallet
|
|
22
|
-
- [useSignTransaction](./wallet-hooks/useSignTransaction.md): Sign a transaction without executing
|
|
23
|
-
it
|
|
24
|
-
- [useSwitchAccount](./wallet-hooks/useSwitchAccount.md): Switch the active wallet account
|
|
25
|
-
- [useWallets](./wallet-hooks/useWallets.md): List available wallet extensions
|
|
26
|
-
- [Slush Integration](./slush.md): Slush wallet integration for dApp Kit
|
|
27
|
-
- [Themes](./themes.md): theming API for dApp Kit components
|
package/docs/rpc-hooks.md
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
# Rpc Hooks
|
|
2
|
-
|
|
3
|
-
> React hooks for Sui RPC queries
|
|
4
|
-
|
|
5
|
-
Sui dApp Kit ships with hooks for each of the RPC methods defined in the
|
|
6
|
-
[JSON RPC specification](https://docs.sui.io/sui-api-ref).
|
|
7
|
-
|
|
8
|
-
## useSuiClientQuery
|
|
9
|
-
|
|
10
|
-
Load data from the Sui RPC using the `useSuiClientQuery` hook. This hook is a wrapper around the
|
|
11
|
-
[useQuery](https://tanstack.com/query/latest/docs/react/guides/queries) hook from
|
|
12
|
-
@tanstack/react-query.
|
|
13
|
-
|
|
14
|
-
The hook takes the RPC method name as the first argument and any parameters as the second argument.
|
|
15
|
-
You can pass any additional `useQuery` options as the third argument. You can read the
|
|
16
|
-
[useQuery documentation](https://tanstack.com/query/latest/docs/react/guides/queries) for more
|
|
17
|
-
details on the full set of options available.
|
|
18
|
-
|
|
19
|
-
```tsx
|
|
20
|
-
function MyComponent() {
|
|
21
|
-
const { data, isPending, isError, error, refetch } = useSuiClientQuery(
|
|
22
|
-
'getOwnedObjects',
|
|
23
|
-
{ owner: '0x123' },
|
|
24
|
-
{
|
|
25
|
-
gcTime: 10000,
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
if (isPending) {
|
|
30
|
-
return <div>Loading...</div>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (isError) {
|
|
34
|
-
return <div>Error: {error.message}</div>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return <pre>{JSON.stringify(data, null, 2)}</pre>;
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## useSuiClientQueries
|
|
42
|
-
|
|
43
|
-
You can fetch a variable number of Sui RPC queries using the `useSuiClientQueries` hook. This hook
|
|
44
|
-
is a wrapper around the
|
|
45
|
-
[useQueries](https://tanstack.com/query/latest/docs/react/reference/useQueries) hook from
|
|
46
|
-
@tanstack/react-query.
|
|
47
|
-
|
|
48
|
-
The `queries` value is an array of query option objects identical to the `useSuiClientQuery` hook.
|
|
49
|
-
|
|
50
|
-
The `combine` parameter is optional. Use this parameter to combine the results of the queries into a
|
|
51
|
-
single value. The result is structurally shared to be as referentially stable as possible.
|
|
52
|
-
|
|
53
|
-
```tsx
|
|
54
|
-
function MyComponent() {
|
|
55
|
-
const { data, isPending, isError } = useSuiClientQueries({
|
|
56
|
-
queries: [
|
|
57
|
-
{
|
|
58
|
-
method: 'getAllBalances',
|
|
59
|
-
params: {
|
|
60
|
-
owner: '0x123',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
method: 'queryTransactionBlocks',
|
|
65
|
-
params: {
|
|
66
|
-
filter: {
|
|
67
|
-
FromAddress: '0x123',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
combine: (result) => {
|
|
73
|
-
return {
|
|
74
|
-
data: result.map((res) => res.data),
|
|
75
|
-
isSuccess: result.every((res) => res.isSuccess),
|
|
76
|
-
isPending: result.some((res) => res.isPending),
|
|
77
|
-
isError: result.some((res) => res.isError),
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
if (isPending) {
|
|
83
|
-
return <div>Loading...</div>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (isError) {
|
|
87
|
-
return <div>Fetching Error</div>;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return <pre>{JSON.stringify(data, null, 2)}</pre>;
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## useSuiClientInfiniteQuery
|
|
95
|
-
|
|
96
|
-
For RPC methods that support pagination, dApp Kit also implements a `useSuiClientInfiniteQuery`
|
|
97
|
-
hook. For more details check out the
|
|
98
|
-
[`useInfiniteQuery` documentation](https://tanstack.com/query/latest/docs/react/guides/infinite-queries).
|
|
99
|
-
|
|
100
|
-
```tsx
|
|
101
|
-
function MyComponent() {
|
|
102
|
-
const { data, isPending, isError, error, isFetching, fetchNextPage, hasNextPage } =
|
|
103
|
-
useSuiClientInfiniteQuery('getOwnedObjects', {
|
|
104
|
-
owner: '0x123',
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
if (isPending) {
|
|
108
|
-
return <div>Loading...</div>;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (isError) {
|
|
112
|
-
return <div>Error: {error.message}</div>;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return <pre>{JSON.stringify(data, null, 2)}</pre>;
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## useSuiClientMutation
|
|
120
|
-
|
|
121
|
-
For RPC methods that mutate state, dApp Kit implements a `useSuiClientMutation` hook. Use this hook
|
|
122
|
-
with any RPC method to imperatively call the RPC method. For more details, check out the
|
|
123
|
-
[`useMutation` documentation](https://tanstack.com/query/latest/docs/react/guides/mutations).
|
|
124
|
-
|
|
125
|
-
```tsx
|
|
126
|
-
function MyComponent() {
|
|
127
|
-
const { mutate } = useSuiClientMutation('dryRunTransactionBlock');
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<Button
|
|
131
|
-
onClick={() => {
|
|
132
|
-
mutate({
|
|
133
|
-
transactionBlock: tx,
|
|
134
|
-
});
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
137
|
-
Dry run transaction
|
|
138
|
-
</Button>
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## useResolveSuiNSName
|
|
144
|
-
|
|
145
|
-
To get the SuiNS name for a given address, use the `useResolveSuiNSName` hook.
|
|
146
|
-
|
|
147
|
-
```tsx
|
|
148
|
-
function MyComponent() {
|
|
149
|
-
const { data, isPending } = useResolveSuiNSName('0x123');
|
|
150
|
-
|
|
151
|
-
if (isPending) {
|
|
152
|
-
return <div>Loading...</div>;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (data) {
|
|
156
|
-
return <div>Domain name is: {data}</div>;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return <div>Domain name not found</div>;
|
|
160
|
-
}
|
|
161
|
-
```
|
package/docs/slush.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Slush Integration
|
|
2
|
-
|
|
3
|
-
> Slush wallet integration for dApp Kit
|
|
4
|
-
|
|
5
|
-
dApp Kit provides out-of-the-box opt-in support for the [Slush wallet](/slush-wallet/dapp).
|
|
6
|
-
|
|
7
|
-
## Setup
|
|
8
|
-
|
|
9
|
-
To enable support for Slush wallets, pass the `slushWallet` object to the `WalletProvider`
|
|
10
|
-
component. This object has the following properties:
|
|
11
|
-
|
|
12
|
-
- **`name`** - The name of your dApp, shown to the user when connecting to the dApp.
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
function App({ children }) {
|
|
16
|
-
return (
|
|
17
|
-
<WalletProvider
|
|
18
|
-
slushWallet={{
|
|
19
|
-
name: 'Your dApp name',
|
|
20
|
-
}}
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
</WalletProvider>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
> Note: In the connect modal, users with the Slush Wallet extension installed will only see the
|
|
29
|
-
> extension. If they don’t have it, the connection will default to the Slush web app.
|