@0xsequence/wallet-widget 5.0.2-ecosystem-beta.0 → 5.0.3
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/cjs/hooks/useOpenWalletModal.d.ts +44 -2
- package/dist/cjs/hooks/useOpenWalletModal.d.ts.map +1 -1
- package/dist/cjs/hooks/useOpenWalletModal.js +34 -0
- package/dist/cjs/hooks/useOpenWalletModal.js.map +1 -1
- package/dist/esm/hooks/useOpenWalletModal.d.ts +44 -2
- package/dist/esm/hooks/useOpenWalletModal.d.ts.map +1 -1
- package/dist/esm/hooks/useOpenWalletModal.js +34 -0
- package/dist/esm/hooks/useOpenWalletModal.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Return type for the useOpenWalletModal hook.
|
|
3
|
+
*
|
|
4
|
+
* @property {function(isOpen: boolean): void} setOpenWalletModal - Function to open or close the Wallet modal
|
|
5
|
+
* @property {boolean} openWalletModalState - Current open state of the Wallet modal
|
|
6
|
+
*/
|
|
7
|
+
type UseOpenWalletModalReturnType = {
|
|
8
|
+
setOpenWalletModal: (isOpen: boolean) => void;
|
|
3
9
|
openWalletModalState: boolean;
|
|
4
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Hook to manage the Wallet Inventory modal that allows users to view their tokens and NFTs.
|
|
13
|
+
*
|
|
14
|
+
* This hook provides a method to open and close the wallet inventory modal, and access its current open state.
|
|
15
|
+
* The Wallet modal displays all tokens, NFTs and collectibles present in the connected wallet.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenWalletModal} for more detailed documentation.
|
|
18
|
+
*
|
|
19
|
+
* @returns An object containing function to control the Wallet modal and its state {@link UseOpenWalletModalReturnType}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { useOpenWalletModal } from '@0xsequence/wallet-widget'
|
|
24
|
+
*
|
|
25
|
+
* const YourComponent = () => {
|
|
26
|
+
* // Get the function to open/close the wallet modal
|
|
27
|
+
* const { setOpenWalletModal } = useOpenWalletModal()
|
|
28
|
+
*
|
|
29
|
+
* // Function to handle opening the wallet inventory
|
|
30
|
+
* const handleViewInventory = () => {
|
|
31
|
+
* setOpenWalletModal(true) // Open the wallet modal to view tokens
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* return (
|
|
35
|
+
* <button
|
|
36
|
+
* onClick={handleViewInventory}
|
|
37
|
+
* title="Inventory"
|
|
38
|
+
* >
|
|
39
|
+
* View all tokens in your wallet
|
|
40
|
+
* </button>
|
|
41
|
+
* )
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const useOpenWalletModal: () => UseOpenWalletModalReturnType;
|
|
46
|
+
export {};
|
|
5
47
|
//# sourceMappingURL=useOpenWalletModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenWalletModal.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"useOpenWalletModal.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,KAAK,4BAA4B,GAAG;IAClC,kBAAkB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7C,oBAAoB,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,kBAAkB,QAAO,4BAIrC,CAAA"}
|
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useOpenWalletModal = void 0;
|
|
4
4
|
const WalletModal_1 = require("../contexts/WalletModal");
|
|
5
|
+
/**
|
|
6
|
+
* Hook to manage the Wallet Inventory modal that allows users to view their tokens and NFTs.
|
|
7
|
+
*
|
|
8
|
+
* This hook provides a method to open and close the wallet inventory modal, and access its current open state.
|
|
9
|
+
* The Wallet modal displays all tokens, NFTs and collectibles present in the connected wallet.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenWalletModal} for more detailed documentation.
|
|
12
|
+
*
|
|
13
|
+
* @returns An object containing function to control the Wallet modal and its state {@link UseOpenWalletModalReturnType}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* import { useOpenWalletModal } from '@0xsequence/wallet-widget'
|
|
18
|
+
*
|
|
19
|
+
* const YourComponent = () => {
|
|
20
|
+
* // Get the function to open/close the wallet modal
|
|
21
|
+
* const { setOpenWalletModal } = useOpenWalletModal()
|
|
22
|
+
*
|
|
23
|
+
* // Function to handle opening the wallet inventory
|
|
24
|
+
* const handleViewInventory = () => {
|
|
25
|
+
* setOpenWalletModal(true) // Open the wallet modal to view tokens
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* return (
|
|
29
|
+
* <button
|
|
30
|
+
* onClick={handleViewInventory}
|
|
31
|
+
* title="Inventory"
|
|
32
|
+
* >
|
|
33
|
+
* View all tokens in your wallet
|
|
34
|
+
* </button>
|
|
35
|
+
* )
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
5
39
|
const useOpenWalletModal = () => {
|
|
6
40
|
const { setOpenWalletModal, openWalletModalState } = (0, WalletModal_1.useWalletModalContext)();
|
|
7
41
|
return { setOpenWalletModal, openWalletModalState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenWalletModal.js","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":";;;AAAA,yDAA+D;
|
|
1
|
+
{"version":3,"file":"useOpenWalletModal.js","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":";;;AAAA,yDAA+D;AAa/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACI,MAAM,kBAAkB,GAAG,GAAiC,EAAE;IACnE,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAAG,IAAA,mCAAqB,GAAE,CAAA;IAE5E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA;AACrD,CAAC,CAAA;AAJY,QAAA,kBAAkB,sBAI9B"}
|
|
@@ -1,5 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Return type for the useOpenWalletModal hook.
|
|
3
|
+
*
|
|
4
|
+
* @property {function(isOpen: boolean): void} setOpenWalletModal - Function to open or close the Wallet modal
|
|
5
|
+
* @property {boolean} openWalletModalState - Current open state of the Wallet modal
|
|
6
|
+
*/
|
|
7
|
+
type UseOpenWalletModalReturnType = {
|
|
8
|
+
setOpenWalletModal: (isOpen: boolean) => void;
|
|
3
9
|
openWalletModalState: boolean;
|
|
4
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Hook to manage the Wallet Inventory modal that allows users to view their tokens and NFTs.
|
|
13
|
+
*
|
|
14
|
+
* This hook provides a method to open and close the wallet inventory modal, and access its current open state.
|
|
15
|
+
* The Wallet modal displays all tokens, NFTs and collectibles present in the connected wallet.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenWalletModal} for more detailed documentation.
|
|
18
|
+
*
|
|
19
|
+
* @returns An object containing function to control the Wallet modal and its state {@link UseOpenWalletModalReturnType}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { useOpenWalletModal } from '@0xsequence/wallet-widget'
|
|
24
|
+
*
|
|
25
|
+
* const YourComponent = () => {
|
|
26
|
+
* // Get the function to open/close the wallet modal
|
|
27
|
+
* const { setOpenWalletModal } = useOpenWalletModal()
|
|
28
|
+
*
|
|
29
|
+
* // Function to handle opening the wallet inventory
|
|
30
|
+
* const handleViewInventory = () => {
|
|
31
|
+
* setOpenWalletModal(true) // Open the wallet modal to view tokens
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* return (
|
|
35
|
+
* <button
|
|
36
|
+
* onClick={handleViewInventory}
|
|
37
|
+
* title="Inventory"
|
|
38
|
+
* >
|
|
39
|
+
* View all tokens in your wallet
|
|
40
|
+
* </button>
|
|
41
|
+
* )
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const useOpenWalletModal: () => UseOpenWalletModalReturnType;
|
|
46
|
+
export {};
|
|
5
47
|
//# sourceMappingURL=useOpenWalletModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenWalletModal.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"useOpenWalletModal.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,KAAK,4BAA4B,GAAG;IAClC,kBAAkB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7C,oBAAoB,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,kBAAkB,QAAO,4BAIrC,CAAA"}
|
|
@@ -1,4 +1,38 @@
|
|
|
1
1
|
import { useWalletModalContext } from '../contexts/WalletModal';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to manage the Wallet Inventory modal that allows users to view their tokens and NFTs.
|
|
4
|
+
*
|
|
5
|
+
* This hook provides a method to open and close the wallet inventory modal, and access its current open state.
|
|
6
|
+
* The Wallet modal displays all tokens, NFTs and collectibles present in the connected wallet.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenWalletModal} for more detailed documentation.
|
|
9
|
+
*
|
|
10
|
+
* @returns An object containing function to control the Wallet modal and its state {@link UseOpenWalletModalReturnType}
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { useOpenWalletModal } from '@0xsequence/wallet-widget'
|
|
15
|
+
*
|
|
16
|
+
* const YourComponent = () => {
|
|
17
|
+
* // Get the function to open/close the wallet modal
|
|
18
|
+
* const { setOpenWalletModal } = useOpenWalletModal()
|
|
19
|
+
*
|
|
20
|
+
* // Function to handle opening the wallet inventory
|
|
21
|
+
* const handleViewInventory = () => {
|
|
22
|
+
* setOpenWalletModal(true) // Open the wallet modal to view tokens
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* return (
|
|
26
|
+
* <button
|
|
27
|
+
* onClick={handleViewInventory}
|
|
28
|
+
* title="Inventory"
|
|
29
|
+
* >
|
|
30
|
+
* View all tokens in your wallet
|
|
31
|
+
* </button>
|
|
32
|
+
* )
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
2
36
|
export const useOpenWalletModal = () => {
|
|
3
37
|
const { setOpenWalletModal, openWalletModalState } = useWalletModalContext();
|
|
4
38
|
return { setOpenWalletModal, openWalletModalState };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenWalletModal.js","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"useOpenWalletModal.js","sourceRoot":"","sources":["../../../src/hooks/useOpenWalletModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAa/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAiC,EAAE;IACnE,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAAG,qBAAqB,EAAE,CAAA;IAE5E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA;AACrD,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/wallet-widget",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Wallet UI for Sequence Web SDK",
|
|
5
5
|
"repository": "https://github.com/0xsequence/web-sdk/tree/master/packages/wallet-widget",
|
|
6
6
|
"author": "Horizon Blockchain Games",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@0xsequence/design-system": "^2.0.
|
|
23
|
+
"@0xsequence/design-system": "^2.0.11",
|
|
24
24
|
"@radix-ui/react-popover": "^1.0.7",
|
|
25
25
|
"dayjs": "^1.11.11",
|
|
26
26
|
"fuse.js": "^6.6.2",
|
|
27
27
|
"qrcode.react": "^4.0.1",
|
|
28
28
|
"react-copy-to-clipboard": "^5.1.0",
|
|
29
29
|
"motion": "^12.3.1",
|
|
30
|
-
"@0xsequence/hooks": "5.0.
|
|
30
|
+
"@0xsequence/hooks": "5.0.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@0xsequence/api": ">= 2.2.13",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react-dom": ">= 17",
|
|
41
41
|
"viem": ">= 2.0.0",
|
|
42
42
|
"wagmi": ">= 2.14.13",
|
|
43
|
-
"@0xsequence/connect": "5.0.
|
|
43
|
+
"@0xsequence/connect": "5.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@tanstack/react-query": "^5.62.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-dom": "^19.0.0",
|
|
51
51
|
"viem": "^2.23.10",
|
|
52
52
|
"wagmi": "^2.14.13",
|
|
53
|
-
"@0xsequence/connect": "5.0.
|
|
53
|
+
"@0xsequence/connect": "5.0.3"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "pnpm build:clean && pnpm build:esm && pnpm build:cjs",
|