@mysten/dapp-kit-react 1.0.2 → 1.1.0
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/index.d.mts +11 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _mysten_dapp_kit_core6 from "@mysten/dapp-kit-core";
|
|
2
2
|
import { DAppKit, DefaultExpectedDppKit, RegisteredDAppKit } from "@mysten/dapp-kit-core";
|
|
3
|
+
import * as react0 from "react";
|
|
3
4
|
import { ComponentProps, PropsWithChildren } from "react";
|
|
4
5
|
import * as _lit_react0 from "@lit/react";
|
|
5
6
|
import { DAppKitConnectButton, DAppKitConnectModal } from "@mysten/dapp-kit-core/web";
|
|
@@ -24,6 +25,7 @@ declare function ConnectModal({
|
|
|
24
25
|
}: ConnectModalProps): react_jsx_runtime0.JSX.Element;
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/components/DAppKitProvider.d.ts
|
|
28
|
+
declare const DAppKitContext: react0.Context<_mysten_dapp_kit_core6.DAppKit<any, _mysten_dapp_kit_core6.ClientWithCoreApi> | null>;
|
|
27
29
|
type DAppKitProviderProps = PropsWithChildren<{
|
|
28
30
|
dAppKit: DefaultExpectedDppKit;
|
|
29
31
|
}>;
|
|
@@ -41,7 +43,7 @@ type UseWalletsOptions<TDAppKit extends DAppKit> = {
|
|
|
41
43
|
};
|
|
42
44
|
declare function useWallets<TDAppKit extends DAppKit<any> = RegisteredDAppKit>({
|
|
43
45
|
dAppKit
|
|
44
|
-
}?: UseWalletsOptions<TDAppKit>):
|
|
46
|
+
}?: UseWalletsOptions<TDAppKit>): _mysten_dapp_kit_core6.UiWallet[];
|
|
45
47
|
//#endregion
|
|
46
48
|
//#region src/hooks/useWalletConnection.d.ts
|
|
47
49
|
type UseWalletConnectionOptions<TDAppKit extends DAppKit<any>> = {
|
|
@@ -50,8 +52,8 @@ type UseWalletConnectionOptions<TDAppKit extends DAppKit<any>> = {
|
|
|
50
52
|
declare function useWalletConnection<TDAppKit extends DAppKit = RegisteredDAppKit>({
|
|
51
53
|
dAppKit
|
|
52
54
|
}?: UseWalletConnectionOptions<TDAppKit>): {
|
|
53
|
-
readonly wallet:
|
|
54
|
-
readonly account:
|
|
55
|
+
readonly wallet: _mysten_dapp_kit_core6.UiWallet;
|
|
56
|
+
readonly account: _mysten_dapp_kit_core6.UiWalletAccount;
|
|
55
57
|
readonly status: "connected";
|
|
56
58
|
readonly supportedIntents: string[];
|
|
57
59
|
readonly isConnected: true;
|
|
@@ -68,8 +70,8 @@ declare function useWalletConnection<TDAppKit extends DAppKit = RegisteredDAppKi
|
|
|
68
70
|
readonly isReconnecting: false;
|
|
69
71
|
readonly isDisconnected: false;
|
|
70
72
|
} | {
|
|
71
|
-
readonly wallet:
|
|
72
|
-
readonly account:
|
|
73
|
+
readonly wallet: _mysten_dapp_kit_core6.UiWallet;
|
|
74
|
+
readonly account: _mysten_dapp_kit_core6.UiWalletAccount;
|
|
73
75
|
readonly status: "reconnecting";
|
|
74
76
|
readonly supportedIntents: string[];
|
|
75
77
|
readonly isConnected: false;
|
|
@@ -93,7 +95,7 @@ type UseCurrentAccountOptions<TDAppKit extends DAppKit> = {
|
|
|
93
95
|
};
|
|
94
96
|
declare function useCurrentAccount<TDAppKit extends DAppKit<any> = RegisteredDAppKit>({
|
|
95
97
|
dAppKit
|
|
96
|
-
}?: UseCurrentAccountOptions<TDAppKit>):
|
|
98
|
+
}?: UseCurrentAccountOptions<TDAppKit>): _mysten_dapp_kit_core6.UiWalletAccount | null;
|
|
97
99
|
//#endregion
|
|
98
100
|
//#region src/hooks/useCurrentWallet.d.ts
|
|
99
101
|
type UseCurrentWalletOptions<TDAppKit extends DAppKit> = {
|
|
@@ -101,7 +103,7 @@ type UseCurrentWalletOptions<TDAppKit extends DAppKit> = {
|
|
|
101
103
|
};
|
|
102
104
|
declare function useCurrentWallet<TDAppKit extends DAppKit<any> = RegisteredDAppKit>({
|
|
103
105
|
dAppKit
|
|
104
|
-
}?: UseCurrentWalletOptions<TDAppKit>):
|
|
106
|
+
}?: UseCurrentWalletOptions<TDAppKit>): _mysten_dapp_kit_core6.UiWallet | null;
|
|
105
107
|
//#endregion
|
|
106
108
|
//#region src/hooks/useCurrentClient.d.ts
|
|
107
109
|
type UseCurrentClientOptions<TDAppKit extends DAppKit<any>> = {
|
|
@@ -119,5 +121,5 @@ declare function useCurrentNetwork<TDAppKit extends DAppKit<any> = RegisteredDAp
|
|
|
119
121
|
dAppKit
|
|
120
122
|
}?: UseCurrentNetworkOptions<TDAppKit>): nanostores0.StoreValue<TDAppKit["stores"]["$currentNetwork"]>;
|
|
121
123
|
//#endregion
|
|
122
|
-
export { ConnectButton, type ConnectButtonProps, ConnectModal, type ConnectModalProps, DAppKitProvider, type DAppKitProviderProps, useCurrentAccount, useCurrentClient, useCurrentNetwork, useCurrentWallet, useDAppKit, useWalletConnection, useWallets };
|
|
124
|
+
export { ConnectButton, type ConnectButtonProps, ConnectModal, type ConnectModalProps, DAppKitContext, DAppKitProvider, type DAppKitProviderProps, useCurrentAccount, useCurrentClient, useCurrentNetwork, useCurrentWallet, useDAppKit, useWalletConnection, useWallets };
|
|
123
125
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/components/ConnectButton.tsx","../src/components/ConnectModal.tsx","../src/components/DAppKitProvider.tsx","../src/hooks/useDAppKit.ts","../src/hooks/useWallets.ts","../src/hooks/useWalletConnection.ts","../src/hooks/useCurrentAccount.ts","../src/hooks/useCurrentWallet.ts","../src/hooks/useCurrentClient.ts","../src/hooks/useCurrentNetwork.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/components/ConnectButton.tsx","../src/components/ConnectModal.tsx","../src/components/DAppKitProvider.tsx","../src/hooks/useDAppKit.ts","../src/hooks/useWallets.ts","../src/hooks/useWalletConnection.ts","../src/hooks/useCurrentAccount.ts","../src/hooks/useCurrentWallet.ts","../src/hooks/useCurrentClient.ts","../src/hooks/useCurrentNetwork.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;KASY,kBAAA,GAAqB,sBAAsB;cAEjD,wBAAsB,WAAA,CAAA,kBAAA;iBAMZ,aAAA;;;GAAsC,qBAAkB,kBAAA,CAAA,GAAA,CAAA;;;KCR5D,iBAAA,GAAoB,sBAAsB;cAEhD,uBAAqB,WAAA,CAAA,kBAAA;iBAMX,YAAA;;;GAAqC,oBAAiB,kBAAA,CAAA,GAAA,CAAA;;;cCVzD,gBAAc,MAAA,CAAA,QAAA,sBAAA,CAAA,aAAoD,sBAAA,CAApD,iBAAA;KAEf,oBAAA,GAAuB;WACzB;;iBAGM,eAAA;;;GAAuC,uBAAoB,kBAAA,CAAA,GAAA,CAAA;;;iBCN3D,4BAA4B,eAAe,6BAA6B,WAAQ;;;KCApF,mCAAmC;YACpC;;iBAGK,4BAA4B,eAAe;;IAExD,kBAAkB,YAAD,sBAAA,CAAe,QAAA;;;KCNvB,4CAA4C;YAC7C;;iBAGK,qCAAqC,UAAU;;IAE5D,2BAA2B;mBAAD,sBAAA,CAAA;;;;;;;ELJjB,SAAA,cAAkB,EAAA,KAAA;AAAiD,CAAA,GAEzE;EAMU,SAAA,MAAA,EAAa,IAAA;EAAG,SAAA,OAAA,EAAA,IAAA;EAAsB,SAAA,MAAA,EAAA,YAAA;EAAkB,SAAA,gBAAA,EAAA,SAAA,EAAA;EAAA,SAAA,WAAA,EAAA,KAAA;;;;ACRxE,CAAA,GAAY;EAEN,SAAA,MAAA,iCAAqB;EAMX,SAAA,OAAY,wCAAA;EAAG,SAAA,MAAA,EAAA,cAAA;EAAsB,SAAA,gBAAA,EAAA,MAAA,EAAA;EAAiB,SAAA,WAAA,EAAA,KAAA;EAAA,SAAA,YAAA,EAAA,KAAA;;;;ECVzD,SAAA,MAAA,EAAkE,IAAA;EAAA,SAAA,OAAA,EAAA,IAApD;EAAA,SAAA,MAAA,EAAA,cAAA;EAAA,SAAA,gBAAA,EAAA,SAAA,EAAA;EAAA,SAAA,WAAA,EAAA,KAAA;EAEf,SAAA,YAAA,EAAoB,KAAA;EAIhB,SAAA,cAAe,EAAA,KAAA;EAAG,SAAA,cAAA,EAAA,IAAA;CAAS;;;KIP/B,0CAA0C;YAC3C;;iBAGK,mCAAmC,eAAe;;IAE/D,yBAAyB,YAAD,sBAAA,CAAe,eAAA;;;KCN9B,yCAAyC;YAC1C;;iBAGK,kCAAkC,eAAe;;IAE9D,wBAAwB,YAAD,sBAAA,CAAe,QAAA;;;KCL7B,yCAAyC;YAC1C;;iBAGK,kCAAkC,eAAe;;IAE9D,wBAAwB,YAEyB,WAAW;;;KCRnD,0CAA0C;YAC3C;;iBAGK,mCAAmC,eAAe;;IAE/D,yBAAyB,YAAc,WAAA,CAAA,WAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -92,5 +92,5 @@ function useCurrentNetwork({ dAppKit } = {}) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
//#endregion
|
|
95
|
-
export { ConnectButton, ConnectModal, DAppKitProvider, useCurrentAccount, useCurrentClient, useCurrentNetwork, useCurrentWallet, useDAppKit, useWalletConnection, useWallets };
|
|
95
|
+
export { ConnectButton, ConnectModal, DAppKitContext, DAppKitProvider, useCurrentAccount, useCurrentClient, useCurrentNetwork, useCurrentWallet, useDAppKit, useWalletConnection, useWallets };
|
|
96
96
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@mysten/dapp-kit-react",
|
|
3
3
|
"author": "Mysten Labs <build@mystenlabs.com>",
|
|
4
4
|
"description": "React bindings for @mysten/dapp-kit-core",
|
|
5
|
-
"version": "1.0
|
|
5
|
+
"version": "1.1.0",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"files": [
|
|
8
8
|
"LICENSE",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@lit/react": "^1.0.8",
|
|
41
41
|
"@nanostores/react": "^1.0.0",
|
|
42
42
|
"nanostores": "^1.1.0",
|
|
43
|
-
"@mysten/dapp-kit-core": "^1.0
|
|
43
|
+
"@mysten/dapp-kit-core": "^1.1.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@types/react": ">=17.0.0",
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type { ConnectButtonProps } from './components/ConnectButton.js';
|
|
|
9
9
|
export { ConnectModal } from './components/ConnectModal.js';
|
|
10
10
|
export type { ConnectModalProps } from './components/ConnectModal.js';
|
|
11
11
|
|
|
12
|
-
export { DAppKitProvider } from './components/DAppKitProvider.js';
|
|
12
|
+
export { DAppKitProvider, DAppKitContext } from './components/DAppKitProvider.js';
|
|
13
13
|
export type { DAppKitProviderProps } from './components/DAppKitProvider.js';
|
|
14
14
|
|
|
15
15
|
export { useDAppKit } from './hooks/useDAppKit.js';
|