@0xsequence/connect 5.0.8 → 5.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/cjs/components/Connect/Connect.js +1 -1
- package/dist/cjs/components/Connect/Connect.js.map +1 -1
- package/dist/cjs/config/defaultConnectors.d.ts +3 -1
- package/dist/cjs/config/defaultConnectors.d.ts.map +1 -1
- package/dist/cjs/config/defaultConnectors.js +3 -0
- package/dist/cjs/config/defaultConnectors.js.map +1 -1
- package/dist/cjs/constants/version.d.ts +1 -1
- package/dist/cjs/constants/version.js +1 -1
- package/dist/cjs/hooks/useChain.d.ts +29 -1
- package/dist/cjs/hooks/useChain.d.ts.map +1 -1
- package/dist/cjs/hooks/useChain.js +27 -1
- package/dist/cjs/hooks/useChain.js.map +1 -1
- package/dist/cjs/hooks/useCheckWaasFeeOptions.d.ts +41 -0
- package/dist/cjs/hooks/useCheckWaasFeeOptions.d.ts.map +1 -1
- package/dist/cjs/hooks/useCheckWaasFeeOptions.js +41 -0
- package/dist/cjs/hooks/useCheckWaasFeeOptions.js.map +1 -1
- package/dist/cjs/hooks/useDirectEcosystemConnect.d.ts +32 -0
- package/dist/cjs/hooks/useDirectEcosystemConnect.d.ts.map +1 -1
- package/dist/cjs/hooks/useDirectEcosystemConnect.js +32 -0
- package/dist/cjs/hooks/useDirectEcosystemConnect.js.map +1 -1
- package/dist/cjs/hooks/useListAccounts.d.ts +39 -0
- package/dist/cjs/hooks/useListAccounts.d.ts.map +1 -0
- package/dist/cjs/hooks/useListAccounts.js +62 -0
- package/dist/cjs/hooks/useListAccounts.js.map +1 -0
- package/dist/cjs/hooks/useOpenConnectModal.d.ts +1 -1
- package/dist/cjs/hooks/useOpenConnectModal.js +1 -1
- package/dist/cjs/hooks/useProjectAccessKey.d.ts +17 -0
- package/dist/cjs/hooks/useProjectAccessKey.d.ts.map +1 -1
- package/dist/cjs/hooks/useProjectAccessKey.js +17 -0
- package/dist/cjs/hooks/useProjectAccessKey.js.map +1 -1
- package/dist/cjs/hooks/useSignInEmail.d.ts +20 -0
- package/dist/cjs/hooks/useSignInEmail.d.ts.map +1 -1
- package/dist/cjs/hooks/useSignInEmail.js +20 -0
- package/dist/cjs/hooks/useSignInEmail.js.map +1 -1
- package/dist/cjs/hooks/useTheme.d.ts +26 -0
- package/dist/cjs/hooks/useTheme.d.ts.map +1 -1
- package/dist/cjs/hooks/useTheme.js +26 -0
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useWaasConfirmationHandler.d.ts +39 -0
- package/dist/cjs/hooks/useWaasConfirmationHandler.d.ts.map +1 -1
- package/dist/cjs/hooks/useWaasConfirmationHandler.js +39 -0
- package/dist/cjs/hooks/useWaasConfirmationHandler.js.map +1 -1
- package/dist/cjs/hooks/useWaasEmailAuth.d.ts +46 -0
- package/dist/cjs/hooks/useWaasEmailAuth.d.ts.map +1 -1
- package/dist/cjs/hooks/useWaasEmailAuth.js +46 -0
- package/dist/cjs/hooks/useWaasEmailAuth.js.map +1 -1
- package/dist/cjs/hooks/useWaasEmailConflict.d.ts +39 -0
- package/dist/cjs/hooks/useWaasEmailConflict.d.ts.map +1 -1
- package/dist/cjs/hooks/useWaasEmailConflict.js +39 -0
- package/dist/cjs/hooks/useWaasEmailConflict.js.map +1 -1
- package/dist/cjs/hooks/useWaasGetLinkedWalletsSignature.d.ts +60 -0
- package/dist/cjs/hooks/useWaasGetLinkedWalletsSignature.d.ts.map +1 -1
- package/dist/cjs/hooks/useWaasGetLinkedWalletsSignature.js +50 -0
- package/dist/cjs/hooks/useWaasGetLinkedWalletsSignature.js.map +1 -1
- package/dist/cjs/hooks/useWaasLinkWallet.d.ts +57 -0
- package/dist/cjs/hooks/useWaasLinkWallet.d.ts.map +1 -1
- package/dist/cjs/hooks/useWaasLinkWallet.js +42 -0
- package/dist/cjs/hooks/useWaasLinkWallet.js.map +1 -1
- package/dist/cjs/hooks/useWalletSettings.d.ts +28 -0
- package/dist/cjs/hooks/useWalletSettings.d.ts.map +1 -1
- package/dist/cjs/hooks/useWalletSettings.js +28 -0
- package/dist/cjs/hooks/useWalletSettings.js.map +1 -1
- package/dist/cjs/hooks/useWallets.d.ts.map +1 -1
- package/dist/cjs/hooks/useWallets.js +17 -1
- package/dist/cjs/hooks/useWallets.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Connect/Connect.js +1 -1
- package/dist/esm/components/Connect/Connect.js.map +1 -1
- package/dist/esm/config/defaultConnectors.d.ts +3 -1
- package/dist/esm/config/defaultConnectors.d.ts.map +1 -1
- package/dist/esm/config/defaultConnectors.js +3 -0
- package/dist/esm/config/defaultConnectors.js.map +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/hooks/useChain.d.ts +29 -1
- package/dist/esm/hooks/useChain.d.ts.map +1 -1
- package/dist/esm/hooks/useChain.js +27 -1
- package/dist/esm/hooks/useChain.js.map +1 -1
- package/dist/esm/hooks/useCheckWaasFeeOptions.d.ts +41 -0
- package/dist/esm/hooks/useCheckWaasFeeOptions.d.ts.map +1 -1
- package/dist/esm/hooks/useCheckWaasFeeOptions.js +41 -0
- package/dist/esm/hooks/useCheckWaasFeeOptions.js.map +1 -1
- package/dist/esm/hooks/useDirectEcosystemConnect.d.ts +32 -0
- package/dist/esm/hooks/useDirectEcosystemConnect.d.ts.map +1 -1
- package/dist/esm/hooks/useDirectEcosystemConnect.js +32 -0
- package/dist/esm/hooks/useDirectEcosystemConnect.js.map +1 -1
- package/dist/esm/hooks/useListAccounts.d.ts +39 -0
- package/dist/esm/hooks/useListAccounts.d.ts.map +1 -0
- package/dist/esm/hooks/useListAccounts.js +58 -0
- package/dist/esm/hooks/useListAccounts.js.map +1 -0
- package/dist/esm/hooks/useOpenConnectModal.d.ts +1 -1
- package/dist/esm/hooks/useOpenConnectModal.js +1 -1
- package/dist/esm/hooks/useProjectAccessKey.d.ts +17 -0
- package/dist/esm/hooks/useProjectAccessKey.d.ts.map +1 -1
- package/dist/esm/hooks/useProjectAccessKey.js +17 -0
- package/dist/esm/hooks/useProjectAccessKey.js.map +1 -1
- package/dist/esm/hooks/useSignInEmail.d.ts +20 -0
- package/dist/esm/hooks/useSignInEmail.d.ts.map +1 -1
- package/dist/esm/hooks/useSignInEmail.js +20 -0
- package/dist/esm/hooks/useSignInEmail.js.map +1 -1
- package/dist/esm/hooks/useTheme.d.ts +26 -0
- package/dist/esm/hooks/useTheme.d.ts.map +1 -1
- package/dist/esm/hooks/useTheme.js +26 -0
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useWaasConfirmationHandler.d.ts +39 -0
- package/dist/esm/hooks/useWaasConfirmationHandler.d.ts.map +1 -1
- package/dist/esm/hooks/useWaasConfirmationHandler.js +39 -0
- package/dist/esm/hooks/useWaasConfirmationHandler.js.map +1 -1
- package/dist/esm/hooks/useWaasEmailAuth.d.ts +46 -0
- package/dist/esm/hooks/useWaasEmailAuth.d.ts.map +1 -1
- package/dist/esm/hooks/useWaasEmailAuth.js +46 -0
- package/dist/esm/hooks/useWaasEmailAuth.js.map +1 -1
- package/dist/esm/hooks/useWaasEmailConflict.d.ts +39 -0
- package/dist/esm/hooks/useWaasEmailConflict.d.ts.map +1 -1
- package/dist/esm/hooks/useWaasEmailConflict.js +39 -0
- package/dist/esm/hooks/useWaasEmailConflict.js.map +1 -1
- package/dist/esm/hooks/useWaasGetLinkedWalletsSignature.d.ts +60 -0
- package/dist/esm/hooks/useWaasGetLinkedWalletsSignature.d.ts.map +1 -1
- package/dist/esm/hooks/useWaasGetLinkedWalletsSignature.js +50 -0
- package/dist/esm/hooks/useWaasGetLinkedWalletsSignature.js.map +1 -1
- package/dist/esm/hooks/useWaasLinkWallet.d.ts +57 -0
- package/dist/esm/hooks/useWaasLinkWallet.d.ts.map +1 -1
- package/dist/esm/hooks/useWaasLinkWallet.js +42 -0
- package/dist/esm/hooks/useWaasLinkWallet.js.map +1 -1
- package/dist/esm/hooks/useWalletSettings.d.ts +28 -0
- package/dist/esm/hooks/useWalletSettings.d.ts.map +1 -1
- package/dist/esm/hooks/useWalletSettings.js +28 -0
- package/dist/esm/hooks/useWalletSettings.js.map +1 -1
- package/dist/esm/hooks/useWallets.d.ts.map +1 -1
- package/dist/esm/hooks/useWallets.js +17 -1
- package/dist/esm/hooks/useWallets.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConnectors.js","sourceRoot":"","sources":["../../../src/config/defaultConnectors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAA+B,MAAM,yBAAyB,CAAA;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D,OAAO,EAAE,i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are const WEB_SDK_VERSION = "5.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const WEB_SDK_VERSION = '5.0
|
|
1
|
+
export const WEB_SDK_VERSION = '5.1.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1,2 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import { Chain } from 'wagmi/chains';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for retrieving chain configuration information from wagmi's chain configurations
|
|
4
|
+
*
|
|
5
|
+
* This hook provides functionality to:
|
|
6
|
+
* - Get the configuration for the currently connected chain
|
|
7
|
+
* - Get the configuration for a specific chain by ID
|
|
8
|
+
* - Access chain-specific details like name, network configuration, RPC URLs, and block explorers
|
|
9
|
+
*
|
|
10
|
+
* The hook is commonly used in conjunction with other Sequence hooks to access chain-specific
|
|
11
|
+
* information when working with transactions, indexer clients, or network-specific features.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useChain} for more detailed documentation.
|
|
14
|
+
*
|
|
15
|
+
* @param chainId - Optional chain ID to get configuration for a specific chain. If not provided, returns the current chain's configuration.
|
|
16
|
+
* @returns Chain configuration object for the specified or current chain, or undefined if not found
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // Get current chain configuration
|
|
21
|
+
* const currentChain = useChain();
|
|
22
|
+
* console.log('Current chain name:', currentChain?.name);
|
|
23
|
+
*
|
|
24
|
+
* // Get configuration for a specific chain
|
|
25
|
+
* const ethereumChain = useChain(1); // Ethereum Mainnet
|
|
26
|
+
* console.log('Ethereum chain details:', ethereumChain);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const useChain: (chainId?: number) => Chain | undefined;
|
|
2
30
|
//# sourceMappingURL=useChain.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useChain.d.ts","sourceRoot":"","sources":["../../../src/hooks/useChain.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,KAAG,KAAK,GAAG,SAKnD,CAAA"}
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
import { useChainId, useChains } from 'wagmi';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Hook for retrieving chain configuration information from wagmi's chain configurations
|
|
4
|
+
*
|
|
5
|
+
* This hook provides functionality to:
|
|
6
|
+
* - Get the configuration for the currently connected chain
|
|
7
|
+
* - Get the configuration for a specific chain by ID
|
|
8
|
+
* - Access chain-specific details like name, network configuration, RPC URLs, and block explorers
|
|
9
|
+
*
|
|
10
|
+
* The hook is commonly used in conjunction with other Sequence hooks to access chain-specific
|
|
11
|
+
* information when working with transactions, indexer clients, or network-specific features.
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useChain} for more detailed documentation.
|
|
14
|
+
*
|
|
15
|
+
* @param chainId - Optional chain ID to get configuration for a specific chain. If not provided, returns the current chain's configuration.
|
|
16
|
+
* @returns Chain configuration object for the specified or current chain, or undefined if not found
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // Get current chain configuration
|
|
21
|
+
* const currentChain = useChain();
|
|
22
|
+
* console.log('Current chain name:', currentChain?.name);
|
|
23
|
+
*
|
|
24
|
+
* // Get configuration for a specific chain
|
|
25
|
+
* const ethereumChain = useChain(1); // Ethereum Mainnet
|
|
26
|
+
* console.log('Ethereum chain details:', ethereumChain);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
3
29
|
export const useChain = (chainId) => {
|
|
4
30
|
const chains = useChains();
|
|
5
31
|
const currentChainId = useChainId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChain.js","sourceRoot":"","sources":["../../../src/hooks/useChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useChain.js","sourceRoot":"","sources":["../../../src/hooks/useChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAgB,EAAqB,EAAE;IAC9D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,cAAc,GAAG,UAAU,EAAE,CAAA;IAEnC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,cAAc,CAAC,CAAC,CAAA;AAC7F,CAAC,CAAA"}
|
|
@@ -1,4 +1,45 @@
|
|
|
1
1
|
import { FeeOption, Transaction } from '@0xsequence/waas';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for checking transaction fee options in Sequence WaaS (Wallet as a Service)
|
|
4
|
+
*
|
|
5
|
+
* This hook provides functionality to:
|
|
6
|
+
* - Check if a transaction will be sponsored
|
|
7
|
+
* - Get available fee options for unsponsored transactions
|
|
8
|
+
* - Retrieve fee quotes for transactions
|
|
9
|
+
*
|
|
10
|
+
* The hook is commonly used in conjunction with `useWaasFeeOptions` to handle fee payments
|
|
11
|
+
* for unsponsored transactions. It's particularly useful in
|
|
12
|
+
* wallet interfaces and transaction confirmation flows.
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useCheckWaasFeeOptions} for more detailed documentation.
|
|
15
|
+
*
|
|
16
|
+
* @returns A function that accepts transaction details and returns fee information
|
|
17
|
+
* @returns.feeQuote - The fee quote for the transaction if available
|
|
18
|
+
* @returns.feeOptions - Available fee payment options if the transaction is not sponsored
|
|
19
|
+
* @returns.isSponsored - Whether the transaction is sponsored (true) or requires fee payment (false)
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { useCheckWaasFeeOptions } from '@0xsequence/connect'
|
|
24
|
+
*
|
|
25
|
+
* const YourComponent = () => {
|
|
26
|
+
* const checkFeeOptions = useCheckWaasFeeOptions()
|
|
27
|
+
*
|
|
28
|
+
* const handleTransaction = async () => {
|
|
29
|
+
* const { isSponsored, feeOptions, feeQuote } = await checkFeeOptions({
|
|
30
|
+
* transactions: [transaction],
|
|
31
|
+
* chainId: 1 // Ethereum Mainnet
|
|
32
|
+
* })
|
|
33
|
+
*
|
|
34
|
+
* if (!isSponsored && feeOptions) {
|
|
35
|
+
* // Handle fee options for unsponsored transaction
|
|
36
|
+
* console.log('Available fee options:', feeOptions)
|
|
37
|
+
* console.log('Fee quote:', feeQuote)
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
2
43
|
export declare function useCheckWaasFeeOptions(): (params: {
|
|
3
44
|
transactions: Transaction[];
|
|
4
45
|
chainId: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckWaasFeeOptions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCheckWaasFeeOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGzD,wBAAgB,sBAAsB,IAAI,CAAC,MAAM,EAAE;IAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC;IAC9G,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,CAAA;IACnC,WAAW,EAAE,OAAO,CAAA;CACrB,CAAC,CAwBD"}
|
|
1
|
+
{"version":3,"file":"useCheckWaasFeeOptions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCheckWaasFeeOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,sBAAsB,IAAI,CAAC,MAAM,EAAE;IAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC;IAC9G,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,UAAU,EAAE,SAAS,EAAE,GAAG,SAAS,CAAA;IACnC,WAAW,EAAE,OAAO,CAAA;CACrB,CAAC,CAwBD"}
|
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useConnections } from 'wagmi';
|
|
3
|
+
/**
|
|
4
|
+
* Hook for checking transaction fee options in Sequence WaaS (Wallet as a Service)
|
|
5
|
+
*
|
|
6
|
+
* This hook provides functionality to:
|
|
7
|
+
* - Check if a transaction will be sponsored
|
|
8
|
+
* - Get available fee options for unsponsored transactions
|
|
9
|
+
* - Retrieve fee quotes for transactions
|
|
10
|
+
*
|
|
11
|
+
* The hook is commonly used in conjunction with `useWaasFeeOptions` to handle fee payments
|
|
12
|
+
* for unsponsored transactions. It's particularly useful in
|
|
13
|
+
* wallet interfaces and transaction confirmation flows.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useCheckWaasFeeOptions} for more detailed documentation.
|
|
16
|
+
*
|
|
17
|
+
* @returns A function that accepts transaction details and returns fee information
|
|
18
|
+
* @returns.feeQuote - The fee quote for the transaction if available
|
|
19
|
+
* @returns.feeOptions - Available fee payment options if the transaction is not sponsored
|
|
20
|
+
* @returns.isSponsored - Whether the transaction is sponsored (true) or requires fee payment (false)
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { useCheckWaasFeeOptions } from '@0xsequence/connect'
|
|
25
|
+
*
|
|
26
|
+
* const YourComponent = () => {
|
|
27
|
+
* const checkFeeOptions = useCheckWaasFeeOptions()
|
|
28
|
+
*
|
|
29
|
+
* const handleTransaction = async () => {
|
|
30
|
+
* const { isSponsored, feeOptions, feeQuote } = await checkFeeOptions({
|
|
31
|
+
* transactions: [transaction],
|
|
32
|
+
* chainId: 1 // Ethereum Mainnet
|
|
33
|
+
* })
|
|
34
|
+
*
|
|
35
|
+
* if (!isSponsored && feeOptions) {
|
|
36
|
+
* // Handle fee options for unsponsored transaction
|
|
37
|
+
* console.log('Available fee options:', feeOptions)
|
|
38
|
+
* console.log('Fee quote:', feeQuote)
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
3
44
|
export function useCheckWaasFeeOptions() {
|
|
4
45
|
const connections = useConnections();
|
|
5
46
|
const waasConnector = connections.find(c => c.connector.id.includes('waas'))?.connector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckWaasFeeOptions.js","sourceRoot":"","sources":["../../../src/hooks/useCheckWaasFeeOptions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,UAAU,sBAAsB;IAKpC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IACpC,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,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YAAY,GAAI,aAAqB,CAAC,oBAAoB,CAAA;QAChE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO;gBACL,QAAQ,EAAE,SAAS;gBACnB,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,IAAI;aAClB,CAAA;QACH,CAAC;QAED,OAAO,YAAY,CAAC,0BAA0B,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAA;IAC3E,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1,2 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to directly connect to an ecosystem wallet with email
|
|
3
|
+
*
|
|
4
|
+
* @returns A function that triggers the ecosystem wallet connection
|
|
5
|
+
* @throws {Error} If the ecosystem wallet connector is not found among available connectors
|
|
6
|
+
*
|
|
7
|
+
* The returned function accepts:
|
|
8
|
+
* - `auxData` (optional) - Additional data to pass to the ecosystem connector during connection
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const triggerConnect = useDirectEcosystemConnect()
|
|
13
|
+
*
|
|
14
|
+
* // Connect without auxiliary data
|
|
15
|
+
* await triggerConnect()
|
|
16
|
+
*
|
|
17
|
+
* // Connect with auxiliary data
|
|
18
|
+
* await triggerConnect({
|
|
19
|
+
* someKey: 'someValue',
|
|
20
|
+
* anotherKey: 123
|
|
21
|
+
* })
|
|
22
|
+
*
|
|
23
|
+
* // Handle connection errors
|
|
24
|
+
* try {
|
|
25
|
+
* await triggerConnect()
|
|
26
|
+
* } catch (error) {
|
|
27
|
+
* if (error.message === 'Ecosystem wallet connector not found') {
|
|
28
|
+
* console.error('Ecosystem wallet is not configured')
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
1
33
|
export declare const useDirectEcosystemConnect: () => (auxData?: Record<string, unknown>) => Promise<void>;
|
|
2
34
|
//# sourceMappingURL=useDirectEcosystemConnect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDirectEcosystemConnect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDirectEcosystemConnect.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB,mBAGI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kBAiBhE,CAAA"}
|
|
1
|
+
{"version":3,"file":"useDirectEcosystemConnect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDirectEcosystemConnect.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,yBAAyB,mBAGI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kBAiBhE,CAAA"}
|
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
import { useConnect } from 'wagmi';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to directly connect to an ecosystem wallet with email
|
|
4
|
+
*
|
|
5
|
+
* @returns A function that triggers the ecosystem wallet connection
|
|
6
|
+
* @throws {Error} If the ecosystem wallet connector is not found among available connectors
|
|
7
|
+
*
|
|
8
|
+
* The returned function accepts:
|
|
9
|
+
* - `auxData` (optional) - Additional data to pass to the ecosystem connector during connection
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const triggerConnect = useDirectEcosystemConnect()
|
|
14
|
+
*
|
|
15
|
+
* // Connect without auxiliary data
|
|
16
|
+
* await triggerConnect()
|
|
17
|
+
*
|
|
18
|
+
* // Connect with auxiliary data
|
|
19
|
+
* await triggerConnect({
|
|
20
|
+
* someKey: 'someValue',
|
|
21
|
+
* anotherKey: 123
|
|
22
|
+
* })
|
|
23
|
+
*
|
|
24
|
+
* // Handle connection errors
|
|
25
|
+
* try {
|
|
26
|
+
* await triggerConnect()
|
|
27
|
+
* } catch (error) {
|
|
28
|
+
* if (error.message === 'Ecosystem wallet connector not found') {
|
|
29
|
+
* console.error('Ecosystem wallet is not configured')
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
2
34
|
export const useDirectEcosystemConnect = () => {
|
|
3
35
|
const { connectors, connect } = useConnect();
|
|
4
36
|
const triggerConnect = async (auxData) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDirectEcosystemConnect.js","sourceRoot":"","sources":["../../../src/hooks/useDirectEcosystemConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIlC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAA;IAE5C,MAAM,cAAc,GAAG,KAAK,EAAE,OAAiC,EAAE,EAAE;QACjE,MAAM,kBAAkB,GAAG,UAAU,CAAC,IAAI,CACxC,CAAC,SAAS,EAAmC,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,kBAAkB,CACtF,CAAA;QAED,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;QACzD,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,kBAAkB,CAAC,OAAO,GAAG,OAAO,CAAA;QACtC,CAAC;QAED,OAAO,OAAO,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAA;IACnD,CAAC,CAAA;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"useDirectEcosystemConnect.js","sourceRoot":"","sources":["../../../src/hooks/useDirectEcosystemConnect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAAA;IAE5C,MAAM,cAAc,GAAG,KAAK,EAAE,OAAiC,EAAE,EAAE;QACjE,MAAM,kBAAkB,GAAG,UAAU,CAAC,IAAI,CACxC,CAAC,SAAS,EAAmC,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,kBAAkB,CACtF,CAAA;QAED,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;QACzD,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,kBAAkB,CAAC,OAAO,GAAG,OAAO,CAAA;QACtC,CAAC;QAED,OAAO,OAAO,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAA;IACnD,CAAC,CAAA;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IntentResponseAccountList } from '@0xsequence/waas';
|
|
2
|
+
interface UseListAccountsResult {
|
|
3
|
+
/** The accounts data if available */
|
|
4
|
+
data?: IntentResponseAccountList;
|
|
5
|
+
/** Whether the query is currently loading */
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
/** Any error that occurred during the query */
|
|
8
|
+
error: Error | null;
|
|
9
|
+
/** Function to manually refetch the accounts */
|
|
10
|
+
refetch: () => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Hook to list all accounts associated with the current WaaS session.
|
|
14
|
+
* Uses React Query for proper async state management.
|
|
15
|
+
*
|
|
16
|
+
* @returns {UseListAccountsResult} Object containing the accounts data, loading state, error state, and refetch function
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* function AccountsList() {
|
|
21
|
+
* const { data, isLoading, error, refetch } = useListAccounts()
|
|
22
|
+
*
|
|
23
|
+
* if (isLoading) return <div>Loading accounts...</div>
|
|
24
|
+
* if (error) return <div>Error: {error.message}</div>
|
|
25
|
+
*
|
|
26
|
+
* return (
|
|
27
|
+
* <div>
|
|
28
|
+
* <button onClick={() => refetch()}>Refresh Accounts</button>
|
|
29
|
+
* {data?.accounts.map(account => (
|
|
30
|
+
* <div key={account.id}>{account.address}</div>
|
|
31
|
+
* ))}
|
|
32
|
+
* </div>
|
|
33
|
+
* )
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const useListAccounts: () => UseListAccountsResult;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=useListAccounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListAccounts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useListAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAgB,MAAM,kBAAkB,CAAA;AAI1E,UAAU,qBAAqB;IAC7B,qCAAqC;IACrC,IAAI,CAAC,EAAE,yBAAyB,CAAA;IAChC,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,gDAAgD;IAChD,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,eAAe,QAAO,qBAuClC,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { useConnections } from 'wagmi';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to list all accounts associated with the current WaaS session.
|
|
5
|
+
* Uses React Query for proper async state management.
|
|
6
|
+
*
|
|
7
|
+
* @returns {UseListAccountsResult} Object containing the accounts data, loading state, error state, and refetch function
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* function AccountsList() {
|
|
12
|
+
* const { data, isLoading, error, refetch } = useListAccounts()
|
|
13
|
+
*
|
|
14
|
+
* if (isLoading) return <div>Loading accounts...</div>
|
|
15
|
+
* if (error) return <div>Error: {error.message}</div>
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <div>
|
|
19
|
+
* <button onClick={() => refetch()}>Refresh Accounts</button>
|
|
20
|
+
* {data?.accounts.map(account => (
|
|
21
|
+
* <div key={account.id}>{account.address}</div>
|
|
22
|
+
* ))}
|
|
23
|
+
* </div>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export const useListAccounts = () => {
|
|
29
|
+
const connections = useConnections();
|
|
30
|
+
const { data, isLoading, error, refetch: reactQueryRefetch } = useQuery({
|
|
31
|
+
queryKey: ['waas', 'listAccounts'],
|
|
32
|
+
queryFn: async () => {
|
|
33
|
+
const waasConnection = connections.find(c => c.connector.id.includes('waas'));
|
|
34
|
+
if (!waasConnection) {
|
|
35
|
+
throw new Error('No WaaS connector found');
|
|
36
|
+
}
|
|
37
|
+
const sequenceWaas = waasConnection.connector.sequenceWaas;
|
|
38
|
+
if (!sequenceWaas) {
|
|
39
|
+
throw new Error('WaaS instance not properly initialized');
|
|
40
|
+
}
|
|
41
|
+
return await sequenceWaas.listAccounts();
|
|
42
|
+
},
|
|
43
|
+
// Only run the query if we have connections
|
|
44
|
+
enabled: connections.length > 0,
|
|
45
|
+
// Cache the results for 1 minute
|
|
46
|
+
staleTime: 60 * 1000
|
|
47
|
+
});
|
|
48
|
+
const refetch = async () => {
|
|
49
|
+
await reactQueryRefetch();
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
data,
|
|
53
|
+
isLoading,
|
|
54
|
+
error: error,
|
|
55
|
+
refetch
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=useListAccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListAccounts.js","sourceRoot":"","sources":["../../../src/hooks/useListAccounts.ts"],"names":[],"m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14,7 @@ type UseOpenConnectModalReturnType = {
|
|
|
14
14
|
* This hook provides a method to open and close the connect modal, and access its current open state.
|
|
15
15
|
* The Connect modal provides various wallet connection options including Sequence wallet and external wallets.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenConnectModal} for more detailed documentation.
|
|
18
18
|
*
|
|
19
19
|
* @returns An object containing function to control the Connect modal and its state {@link UseOpenConnectModalReturnType}
|
|
20
20
|
*
|
|
@@ -5,7 +5,7 @@ import { useConnectModalContext } from '../contexts/ConnectModal';
|
|
|
5
5
|
* This hook provides a method to open and close the connect modal, and access its current open state.
|
|
6
6
|
* The Connect modal provides various wallet connection options including Sequence wallet and external wallets.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useOpenConnectModal} for more detailed documentation.
|
|
9
9
|
*
|
|
10
10
|
* @returns An object containing function to control the Connect modal and its state {@link UseOpenConnectModalReturnType}
|
|
11
11
|
*
|
|
@@ -1,2 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access the project access key from the Sequence Connect configuration.
|
|
3
|
+
*
|
|
4
|
+
* The project access key is a required configuration parameter used to authenticate and
|
|
5
|
+
* identify your application with Sequence services. It is used across various SDK features
|
|
6
|
+
* including marketplace integration and wallet connections.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useProjectAccessKey} for more detailed documentation.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string} The project access key configured for the application
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const projectAccessKey = useProjectAccessKey()
|
|
15
|
+
* const marketplaceClient = new MarketplaceIndexer(apiUrl, projectAccessKey)
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
1
18
|
export declare const useProjectAccessKey: () => string;
|
|
2
19
|
//# sourceMappingURL=useProjectAccessKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProjectAccessKey.d.ts","sourceRoot":"","sources":["../../../src/hooks/useProjectAccessKey.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,cAI/B,CAAA"}
|
|
1
|
+
{"version":3,"file":"useProjectAccessKey.d.ts","sourceRoot":"","sources":["../../../src/hooks/useProjectAccessKey.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,cAI/B,CAAA"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { useConnectConfigContext } from '../contexts/ConnectConfig.js';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to access the project access key from the Sequence Connect configuration.
|
|
4
|
+
*
|
|
5
|
+
* The project access key is a required configuration parameter used to authenticate and
|
|
6
|
+
* identify your application with Sequence services. It is used across various SDK features
|
|
7
|
+
* including marketplace integration and wallet connections.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useProjectAccessKey} for more detailed documentation.
|
|
10
|
+
*
|
|
11
|
+
* @returns {string} The project access key configured for the application
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const projectAccessKey = useProjectAccessKey()
|
|
16
|
+
* const marketplaceClient = new MarketplaceIndexer(apiUrl, projectAccessKey)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
2
19
|
export const useProjectAccessKey = () => {
|
|
3
20
|
const { projectAccessKey } = useConnectConfigContext();
|
|
4
21
|
return projectAccessKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProjectAccessKey.js","sourceRoot":"","sources":["../../../src/hooks/useProjectAccessKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAEtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,EAAE,CAAA;IAEtD,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"useProjectAccessKey.js","sourceRoot":"","sources":["../../../src/hooks/useProjectAccessKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAEtE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,EAAE,CAAA;IAEtD,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA"}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to retrieve the email address associated with the currently connected wallet.
|
|
3
|
+
*
|
|
4
|
+
* This hook monitors the connection status and retrieves the stored email address when a wallet
|
|
5
|
+
* is connected. It works with both WaaS (Wallet-as-a-Service) and universal wallet types.
|
|
6
|
+
* The email is cleared when the wallet is disconnected.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useSignInEmail} for more detailed documentation.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string | null} The email address of the connected wallet user, or null if not connected
|
|
11
|
+
* or no email is associated
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const email = useSignInEmail()
|
|
16
|
+
* if (email) {
|
|
17
|
+
* console.log('Connected user email:', email)
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
1
21
|
export declare const useSignInEmail: () => string | null;
|
|
2
22
|
//# sourceMappingURL=useSignInEmail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignInEmail.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSignInEmail.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,qBAoB1B,CAAA"}
|
|
1
|
+
{"version":3,"file":"useSignInEmail.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSignInEmail.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,qBAoB1B,CAAA"}
|
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { useConfig, useAccount } from 'wagmi';
|
|
4
4
|
import { LocalStorageKey } from '../constants/localStorage';
|
|
5
|
+
/**
|
|
6
|
+
* Hook to retrieve the email address associated with the currently connected wallet.
|
|
7
|
+
*
|
|
8
|
+
* This hook monitors the connection status and retrieves the stored email address when a wallet
|
|
9
|
+
* is connected. It works with both WaaS (Wallet-as-a-Service) and universal wallet types.
|
|
10
|
+
* The email is cleared when the wallet is disconnected.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useSignInEmail} for more detailed documentation.
|
|
13
|
+
*
|
|
14
|
+
* @returns {string | null} The email address of the connected wallet user, or null if not connected
|
|
15
|
+
* or no email is associated
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const email = useSignInEmail()
|
|
20
|
+
* if (email) {
|
|
21
|
+
* console.log('Connected user email:', email)
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
5
25
|
export const useSignInEmail = () => {
|
|
6
26
|
const { storage } = useConfig();
|
|
7
27
|
const { isConnected } = useAccount();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignInEmail.js","sourceRoot":"","sources":["../../../src/hooks/useSignInEmail.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAE,eA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,CAAgB,IAAI,CAAC,CAAA;IAEvD,MAAM,UAAU,GAAG,KAAK,IAAI,EAAE;QAC5B,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAA;QAE3E,QAAQ,CAAC,WAAqB,CAAC,CAAA;IACjC,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,EAAE,CAAC;YAChB,UAAU,EAAE,CAAA;QACd,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CAAC,CAAA;QAChB,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;IAEjB,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access and modify the theme and modal position settings.
|
|
3
|
+
*
|
|
4
|
+
* This hook provides access to the current theme (light/dark) and modal position settings,
|
|
5
|
+
* along with functions to update these values. The modal position can be set to various
|
|
6
|
+
* predefined positions on the screen.
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useTheme} for more detailed documentation.
|
|
9
|
+
*
|
|
10
|
+
* @returns {Object} An object containing:
|
|
11
|
+
* - `theme` - The current theme setting
|
|
12
|
+
* - `setTheme` - Function to update the theme
|
|
13
|
+
* - `position` - The current modal position ('center', 'top-right', 'bottom-left', etc.)
|
|
14
|
+
* - `setPosition` - Function to update the modal position
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const { theme, setTheme, position, setPosition } = useTheme()
|
|
19
|
+
*
|
|
20
|
+
* // Change theme
|
|
21
|
+
* setTheme('dark')
|
|
22
|
+
*
|
|
23
|
+
* // Update modal position
|
|
24
|
+
* setPosition('top-right')
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
1
27
|
export declare const useTheme: () => {
|
|
2
28
|
setTheme: import("react").Dispatch<import("react").SetStateAction<import("@0xsequence/design-system").Theme>>;
|
|
3
29
|
theme: import("@0xsequence/design-system").Theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;;CASpB,CAAA"}
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ;;;;;CASpB,CAAA"}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
import { useThemeContext } from '../contexts/Theme';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to access and modify the theme and modal position settings.
|
|
4
|
+
*
|
|
5
|
+
* This hook provides access to the current theme (light/dark) and modal position settings,
|
|
6
|
+
* along with functions to update these values. The modal position can be set to various
|
|
7
|
+
* predefined positions on the screen.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://docs.sequence.xyz/sdk/web/hooks/useTheme} for more detailed documentation.
|
|
10
|
+
*
|
|
11
|
+
* @returns {Object} An object containing:
|
|
12
|
+
* - `theme` - The current theme setting
|
|
13
|
+
* - `setTheme` - Function to update the theme
|
|
14
|
+
* - `position` - The current modal position ('center', 'top-right', 'bottom-left', etc.)
|
|
15
|
+
* - `setPosition` - Function to update the modal position
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const { theme, setTheme, position, setPosition } = useTheme()
|
|
20
|
+
*
|
|
21
|
+
* // Change theme
|
|
22
|
+
* setTheme('dark')
|
|
23
|
+
*
|
|
24
|
+
* // Update modal position
|
|
25
|
+
* setPosition('top-right')
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
2
28
|
export const useTheme = () => {
|
|
3
29
|
const { setTheme, theme, position, setPosition } = useThemeContext();
|
|
4
30
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,eAAe,EAAE,CAAA;IAEpE,OAAO;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,WAAW;KACZ,CAAA;AACH,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,eAAe,EAAE,CAAA;IAEpE,OAAO;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,WAAW;KACZ,CAAA;AACH,CAAC,CAAA"}
|