router-widget-sdk 0.1.1 → 0.1.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/components/AppKitProvider.d.ts.map +1 -1
- package/dist/components/AppProviders.d.ts +15 -12
- package/dist/components/AppProviders.d.ts.map +1 -1
- package/dist/components/EVMProvider.d.ts +8 -0
- package/dist/components/EVMProvider.d.ts.map +1 -0
- package/dist/components/RouterWidget.d.ts +4 -21
- package/dist/components/RouterWidget.d.ts.map +1 -1
- package/dist/components/SDKProviders.d.ts +13 -0
- package/dist/components/SDKProviders.d.ts.map +1 -0
- package/dist/components/SVMBaseProvider.d.ts +13 -0
- package/dist/components/SVMBaseProvider.d.ts.map +1 -0
- package/dist/components/SVMProvider.d.ts +11 -0
- package/dist/components/SVMProvider.d.ts.map +1 -0
- package/dist/components/SuiProvider.d.ts +10 -0
- package/dist/components/SuiProvider.d.ts.map +1 -0
- package/dist/components/SwapInterface.d.ts.map +1 -1
- package/dist/components/SwapSplit.d.ts.map +1 -1
- package/dist/components/SwapWalletHeader.d.ts +12 -0
- package/dist/components/SwapWalletHeader.d.ts.map +1 -0
- package/dist/components/UTXOProvider.d.ts +10 -0
- package/dist/components/UTXOProvider.d.ts.map +1 -0
- package/dist/components/UnifiedWallet/ConnectWalletButton.d.ts.map +1 -1
- package/dist/components/WalletConnectionModal.d.ts.map +1 -1
- package/dist/components/WalletProvider.d.ts +16 -0
- package/dist/components/WalletProvider.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/contexts/EVMExternalContext.d.ts +7 -0
- package/dist/contexts/EVMExternalContext.d.ts.map +1 -0
- package/dist/contexts/SVMExternalContext.d.ts +7 -0
- package/dist/contexts/SVMExternalContext.d.ts.map +1 -0
- package/dist/contexts/WalletModalContext.d.ts +12 -0
- package/dist/contexts/WalletModalContext.d.ts.map +1 -0
- package/dist/contexts/WalletProviderContext.d.ts +13 -0
- package/dist/contexts/WalletProviderContext.d.ts.map +1 -0
- package/dist/hooks/useAccountConnect.d.ts +16 -0
- package/dist/hooks/useAccountConnect.d.ts.map +1 -0
- package/dist/hooks/useAccountDisconnect.d.ts +15 -0
- package/dist/hooks/useAccountDisconnect.d.ts.map +1 -0
- package/dist/hooks/useInSolanaContext.d.ts +9 -0
- package/dist/hooks/useInSolanaContext.d.ts.map +1 -0
- package/dist/hooks/useInWagmiContext.d.ts +8 -0
- package/dist/hooks/useInWagmiContext.d.ts.map +1 -0
- package/dist/hooks/useInternalWalletProvider.d.ts +9 -0
- package/dist/hooks/useInternalWalletProvider.d.ts.map +1 -0
- package/dist/hooks/useSolanaWalletAdapter.d.ts +16 -0
- package/dist/hooks/useSolanaWalletAdapter.d.ts.map +1 -0
- package/dist/hooks/useTokenBalances.d.ts +1 -1
- package/dist/hooks/useWallet.d.ts +1 -2
- package/dist/hooks/useWallet.d.ts.map +1 -1
- package/dist/hooks/useWalletConnectTrigger.d.ts +10 -0
- package/dist/hooks/useWalletConnectTrigger.d.ts.map +1 -0
- package/dist/hooks/useWalletModal.d.ts +1 -1
- package/dist/hooks/useWalletModal.d.ts.map +1 -1
- package/dist/index.cjs.js +478 -320
- package/dist/index.esm.js +88812 -81001
- package/dist/lib/actions/handleSolanaTransactions.d.ts +4 -3
- package/dist/lib/actions/handleSolanaTransactions.d.ts.map +1 -1
- package/dist/lib/actions/submitSwapTransaction.d.ts +6 -4
- package/dist/lib/actions/submitSwapTransaction.d.ts.map +1 -1
- package/dist/lib/types/widget.d.ts +24 -0
- package/dist/lib/types/widget.d.ts.map +1 -1
- package/dist/lib/utils/item.d.ts +10 -0
- package/dist/lib/utils/item.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/wallet/handlers/connect.d.ts +27 -0
- package/dist/lib/wallet/handlers/connect.d.ts.map +1 -0
- package/dist/lib/wallet/handlers/disconnect.d.ts +22 -0
- package/dist/lib/wallet/handlers/disconnect.d.ts.map +1 -0
- package/dist/lib/wallet/helpers.d.ts +10 -1
- package/dist/lib/wallet/helpers.d.ts.map +1 -1
- package/dist/lib/wallet/providers.d.ts +59 -0
- package/dist/lib/wallet/providers.d.ts.map +1 -0
- package/dist/lib/wallet/types.d.ts +17 -0
- package/dist/lib/wallet/types.d.ts.map +1 -1
- package/dist/network/config.d.ts +1 -1
- package/dist/network/config.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/wallet.d.ts +8 -5
- package/dist/types/wallet.d.ts.map +1 -1
- package/package.json +3 -1
- package/dist/components/WidgetProvider.d.ts +0 -29
- package/dist/components/WidgetProvider.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppKitProvider.d.ts","sourceRoot":"","sources":["../../src/components/AppKitProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppKitProvider.d.ts","sourceRoot":"","sources":["../../src/components/AppKitProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4BlC;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAOnE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
|
+
import type { WidgetConfig } from "@/lib/types/widget";
|
|
2
3
|
interface AppProvidersProps extends PropsWithChildren {
|
|
3
4
|
/**
|
|
4
5
|
* Theme mode: 'light', 'dark', or 'auto'
|
|
@@ -10,20 +11,22 @@ interface AppProvidersProps extends PropsWithChildren {
|
|
|
10
11
|
* @default false
|
|
11
12
|
*/
|
|
12
13
|
enableSystem?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Widget configuration
|
|
16
|
+
*/
|
|
17
|
+
config?: WidgetConfig;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
|
-
* App Providers Component
|
|
16
|
-
*
|
|
17
|
-
* Consolidates all necessary providers for the Router Protocol application.
|
|
18
|
-
* Wraps children with PostHog, Theme, AppKit, Turnkey, and Web3Modal providers.
|
|
20
|
+
* App Providers Component (LiFi-Style)
|
|
19
21
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
* Provider hierarchy matching LiFi's pattern:
|
|
23
|
+
* 1. QueryClientProvider - React Query for server state
|
|
24
|
+
* 2. SettingsStoreProvider (WidgetConfigProvider) - Widget configuration
|
|
25
|
+
* 3. WidgetProvider (WalletProviderContextProvider) - Wallet provider registry
|
|
26
|
+
* 4. ThemeProvider - Theme management
|
|
27
|
+
* 5. WalletProvider - All wallet infrastructure (EVM, Solana, Bitcoin, Sui)
|
|
28
|
+
|
|
29
|
+
* */
|
|
30
|
+
export declare function AppProviders({ children, theme, enableSystem, config, }: AppProvidersProps): import("react/jsx-runtime").JSX.Element;
|
|
28
31
|
export {};
|
|
29
32
|
//# sourceMappingURL=AppProviders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppProviders.d.ts","sourceRoot":"","sources":["../../src/components/AppProviders.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppProviders.d.ts","sourceRoot":"","sources":["../../src/components/AppProviders.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,UAAU,iBAAkB,SAAQ,iBAAiB;IACnD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAcD;;;;;;;;;;MAUM;AACN,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAc,EACd,YAAoB,EACpB,MAAM,GACP,EAAE,iBAAiB,2CAqBnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* LiFi-style EVM provider:
|
|
4
|
+
* - If the host app already provides Wagmi context (e.g. DynamicWagmiConnector), do NOT mount internal Wagmi.
|
|
5
|
+
* - Otherwise, fall back to internal Wagmi/AppKitProvider.
|
|
6
|
+
*/
|
|
7
|
+
export declare function EVMProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=EVMProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EVMProvider.d.ts","sourceRoot":"","sources":["../../src/components/EVMProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM/C;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAW1D"}
|
|
@@ -5,34 +5,17 @@ export interface RouterWidgetProps {
|
|
|
5
5
|
* Widget configuration
|
|
6
6
|
*/
|
|
7
7
|
config?: WidgetConfig;
|
|
8
|
-
/**
|
|
9
|
-
* If true, skips wrapping with providers (assumes providers exist in parent)
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
skipProviders?: boolean;
|
|
13
8
|
}
|
|
14
9
|
/**
|
|
15
|
-
*
|
|
10
|
+
* Router Widget Component
|
|
16
11
|
*
|
|
17
12
|
* Main entry point for the Router Protocol widget.
|
|
18
|
-
*
|
|
13
|
+
* Wraps SwapInterface with all necessary providers.
|
|
19
14
|
*
|
|
20
15
|
* @example
|
|
21
16
|
* ```tsx
|
|
22
|
-
*
|
|
23
|
-
* import 'router-widget-sdk/styles.css';
|
|
24
|
-
*
|
|
25
|
-
* function App() {
|
|
26
|
-
* return (
|
|
27
|
-
* <RouterWidget
|
|
28
|
-
* config={{
|
|
29
|
-
* theme: { mode: 'dark' },
|
|
30
|
-
* integrator: 'MyDApp',
|
|
31
|
-
* }}
|
|
32
|
-
* />
|
|
33
|
-
* );
|
|
34
|
-
* }
|
|
17
|
+
* <RouterWidget config={{ isWidget: true, theme: { mode: 'dark' } }} />
|
|
35
18
|
* ```
|
|
36
19
|
*/
|
|
37
|
-
export declare function RouterWidget({ config
|
|
20
|
+
export declare function RouterWidget({ config }: RouterWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
38
21
|
//# sourceMappingURL=RouterWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouterWidget.d.ts","sourceRoot":"","sources":["../../src/components/RouterWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"RouterWidget.d.ts","sourceRoot":"","sources":["../../src/components/RouterWidget.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAazD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDKProviders - Registers wallet providers for transaction execution
|
|
3
|
+
*
|
|
4
|
+
* Similar to LiFi's SDKProviders component:
|
|
5
|
+
* - Configures wallet providers for EVM, Solana, Bitcoin
|
|
6
|
+
* - Checks for custom providers in widget config
|
|
7
|
+
* - Falls back to default providers (Wagmi for EVM, external for Sol/BTC)
|
|
8
|
+
* - Updates when wallet connections change
|
|
9
|
+
*
|
|
10
|
+
* This component doesn't render anything - it just sets up providers.
|
|
11
|
+
*/
|
|
12
|
+
export declare function SDKProviders(): null;
|
|
13
|
+
//# sourceMappingURL=SDKProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SDKProviders.d.ts","sourceRoot":"","sources":["../../src/components/SDKProviders.tsx"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,SAmG3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* SVMBaseProvider - Internal Solana wallet provider
|
|
4
|
+
*
|
|
5
|
+
* Sets up Solana wallet infrastructure:
|
|
6
|
+
* - RPC endpoint (mainnet)
|
|
7
|
+
* - Wallet adapters (auto-discovered + explicit)
|
|
8
|
+
* - ConnectionProvider and WalletProvider from @solana/wallet-adapter-react
|
|
9
|
+
*
|
|
10
|
+
* Similar to LiFi's SVMBaseProvider implementation
|
|
11
|
+
*/
|
|
12
|
+
export declare function SVMBaseProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=SVMBaseProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVMBaseProvider.d.ts","sourceRoot":"","sources":["../../src/components/SVMBaseProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAO/C;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CA+B9D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* SVMProvider - Solana Virtual Machine Provider
|
|
4
|
+
*
|
|
5
|
+
* LiFi-style provider:
|
|
6
|
+
* - If the host app already provides Solana context (e.g. Dynamic's Solana adapter), do NOT mount internal Solana provider.
|
|
7
|
+
* - Otherwise, fall back to internal Solana provider (SVMBaseProvider).
|
|
8
|
+
* - When external context exists, the host app should provide its own bridge (e.g., DynamicSolanaProvider in examples).
|
|
9
|
+
*/
|
|
10
|
+
export declare function SVMProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=SVMProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVMProvider.d.ts","sourceRoot":"","sources":["../../src/components/SVMProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM/C;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAW1D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* SuiProvider - Sui Blockchain Provider
|
|
4
|
+
*
|
|
5
|
+
* Currently a no-op since we don't have Sui support yet.
|
|
6
|
+
* This provider exists to match LiFi's structure and can be extended
|
|
7
|
+
* when we add Sui wallet support.
|
|
8
|
+
*/
|
|
9
|
+
export declare function SuiProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=SuiProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuiProvider.d.ts","sourceRoot":"","sources":["../../src/components/SuiProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAG1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapInterface.d.ts","sourceRoot":"","sources":["../../src/components/SwapInterface.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAwB,MAAM,SAAS,CAAC;AAYlE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAA2B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SwapInterface.d.ts","sourceRoot":"","sources":["../../src/components/SwapInterface.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAwB,MAAM,SAAS,CAAC;AAYlE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAA2B,MAAM,cAAc,CAAC;AAkDvE,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,KAAK,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACtD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;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,SAAS,sPAiBV,cAAc,6CAosBlB,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SwapWalletHeader
|
|
3
|
+
* LiFi-style structure:
|
|
4
|
+
* - Header decides whether to render
|
|
5
|
+
* - Menu button switches between connected/disconnected variants
|
|
6
|
+
*
|
|
7
|
+
* Behavior:
|
|
8
|
+
* - Visible only in widget mode
|
|
9
|
+
* - Hidden when host app owns wallet UX (external wagmi via DynamicWagmiConnector)
|
|
10
|
+
*/
|
|
11
|
+
export declare function SwapWalletHeader(): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
//# sourceMappingURL=SwapWalletHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwapWalletHeader.d.ts","sourceRoot":"","sources":["../../src/components/SwapWalletHeader.tsx"],"names":[],"mappings":"AAaA;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,mDAa/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* UTXOProvider - Bitcoin/UTXO Provider
|
|
4
|
+
*
|
|
5
|
+
* Currently a no-op since we use external providers (Dynamic) for Bitcoin.
|
|
6
|
+
* This provider exists to match LiFi's structure and can be extended
|
|
7
|
+
* if we add internal Bitcoin wallet support in the future.
|
|
8
|
+
*/
|
|
9
|
+
export declare function UTXOProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=UTXOProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UTXOProvider.d.ts","sourceRoot":"","sources":["../../src/components/UTXOProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAI3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectWalletButton.d.ts","sourceRoot":"","sources":["../../../src/components/UnifiedWallet/ConnectWalletButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConnectWalletButton.d.ts","sourceRoot":"","sources":["../../../src/components/UnifiedWallet/ConnectWalletButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAU7C,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,WAAW,EACX,cAAc,EACd,aAAa,EACb,aAAa,GACd,EAAE,wBAAwB,2CA4J1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletConnectionModal.d.ts","sourceRoot":"","sources":["../../src/components/WalletConnectionModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WalletConnectionModal.d.ts","sourceRoot":"","sources":["../../src/components/WalletConnectionModal.tsx"],"names":[],"mappings":"AAiBA,UAAU,0BAA0B;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAyLD,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,OAAO,GACR,EAAE,0BAA0B,2CAoZ5B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PropsWithChildren } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* WalletProvider - LiFi-style wallet provider wrapper
|
|
4
|
+
*
|
|
5
|
+
* Consolidates all wallet-related providers:
|
|
6
|
+
* - EVMProvider: EVM wallet infrastructure (Wagmi)
|
|
7
|
+
* - SVMProvider: Solana wallet infrastructure (external only)
|
|
8
|
+
* - UTXOProvider: Bitcoin wallet infrastructure (external only)
|
|
9
|
+
* - SuiProvider: Sui wallet infrastructure (external only)
|
|
10
|
+
* - SDKProviders: Registers wallet providers for transaction execution
|
|
11
|
+
* - WalletModalProvider: Wallet modal/menu state management
|
|
12
|
+
*
|
|
13
|
+
* Similar to LiFi's WalletProvider structure
|
|
14
|
+
*/
|
|
15
|
+
export declare function WalletProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=WalletProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletProvider.d.ts","sourceRoot":"","sources":["../../src/components/WalletProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAQ/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAa7D"}
|
|
@@ -22,7 +22,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
22
22
|
ref?: React.Ref<HTMLInputElement>;
|
|
23
23
|
} & {
|
|
24
24
|
asChild?: boolean;
|
|
25
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
25
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
26
26
|
value?: string;
|
|
27
27
|
onValueChange?: (search: string) => void;
|
|
28
28
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates whether the widget is running inside an external Wagmi context
|
|
3
|
+
* (e.g., provided by the host app via DynamicWagmiConnector).
|
|
4
|
+
*/
|
|
5
|
+
export declare const EVMExternalContext: import("react").Context<boolean>;
|
|
6
|
+
export declare function useEvmExternalContext(): boolean;
|
|
7
|
+
//# sourceMappingURL=EVMExternalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EVMExternalContext.d.ts","sourceRoot":"","sources":["../../src/contexts/EVMExternalContext.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,kCAAuB,CAAC;AAEvD,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates whether the widget is running inside an external Solana context
|
|
3
|
+
* (e.g., provided by the host app via Dynamic's Solana wallet adapter).
|
|
4
|
+
*/
|
|
5
|
+
export declare const SVMExternalContext: import("react").Context<boolean>;
|
|
6
|
+
export declare function useSvmExternalContext(): boolean;
|
|
7
|
+
//# sourceMappingURL=SVMExternalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SVMExternalContext.d.ts","sourceRoot":"","sources":["../../src/contexts/SVMExternalContext.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,kCAAuB,CAAC;AAEvD,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type WalletModalContextValue = {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
setIsOpen: (open: boolean) => void;
|
|
4
|
+
openModal: () => void;
|
|
5
|
+
closeModal: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function WalletModalProvider({ children }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function useWalletModalContext(): WalletModalContextValue | undefined;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=WalletModalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletModalContext.d.ts","sourceRoot":"","sources":["../../src/contexts/WalletModalContext.tsx"],"names":[],"mappings":"AAIA,KAAK,uBAAuB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAIF,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAiB9E;AAED,wBAAgB,qBAAqB,IAAI,uBAAuB,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import type { WalletProvider } from "@/lib/wallet/providers";
|
|
3
|
+
interface WalletProviderContextValue {
|
|
4
|
+
providers: WalletProvider[];
|
|
5
|
+
setProviders: (providers: WalletProvider[]) => void;
|
|
6
|
+
getProvider: (type: "evm" | "solana" | "bitcoin") => WalletProvider | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function WalletProviderContextProvider({ children }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useWalletProviderContext(): WalletProviderContextValue;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=WalletProviderContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletProviderContext.d.ts","sourceRoot":"","sources":["../../src/contexts/WalletProviderContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoD,SAAS,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,UAAU,0BAA0B;IAClC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,KAAK,cAAc,GAAG,SAAS,CAAC;CACjF;AAID,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAelF;AAED,wBAAgB,wBAAwB,+BAMvC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChainType } from "@/types/chains";
|
|
2
|
+
/**
|
|
3
|
+
* Unified Account Connect Hook
|
|
4
|
+
*
|
|
5
|
+
* Provides a single function to connect to any wallet by chain type.
|
|
6
|
+
* Routes to chain-specific connect handlers based on chain type.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const connectAccount = useAccountConnect();
|
|
11
|
+
* await connectAccount(ChainType.Evm, "metamask"); // Connect EVM wallet
|
|
12
|
+
* await connectAccount(ChainType.Sol, "Phantom"); // Connect Solana wallet
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAccountConnect(): (chainType: ChainType, walletId?: string) => Promise<void>;
|
|
16
|
+
//# sourceMappingURL=useAccountConnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAccountConnect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,gBAKX,SAAS,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAsBjE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Wallet } from "@/types/wallet";
|
|
2
|
+
/**
|
|
3
|
+
* Unified Account Disconnect Hook (LiFi-style)
|
|
4
|
+
*
|
|
5
|
+
* Provides a single function to disconnect any wallet by chain type.
|
|
6
|
+
* Routes to chain-specific disconnect handlers based on wallet chain type.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const disconnectAccount = useAccountDisconnect();
|
|
11
|
+
* await disconnectAccount(wallet); // Automatically routes to correct handler
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAccountDisconnect(): (wallet: Wallet) => Promise<void>;
|
|
15
|
+
//# sourceMappingURL=useAccountDisconnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountDisconnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAccountDisconnect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,aAKjB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAsBxC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if we're in an external Solana context (e.g., Dynamic's Solana adapter)
|
|
3
|
+
* Similar to LiFi's useInSolanaContext hook
|
|
4
|
+
*
|
|
5
|
+
* Note: We check for @solana/wallet-adapter-react's ConnectionContext
|
|
6
|
+
* If that package isn't installed, this will return false
|
|
7
|
+
*/
|
|
8
|
+
export declare function useInSolanaContext(): boolean;
|
|
9
|
+
//# sourceMappingURL=useInSolanaContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInSolanaContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useInSolanaContext.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAsB5C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if we're in an external Wagmi context (e.g., Dynamic's Wagmi connector)
|
|
3
|
+
* Similar to LiFi's useInWagmiContext hook
|
|
4
|
+
*
|
|
5
|
+
* Also checks if EVM is allowed in widget configuration
|
|
6
|
+
*/
|
|
7
|
+
export declare function useInWagmiContext(): boolean;
|
|
8
|
+
//# sourceMappingURL=useInWagmiContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInWagmiContext.d.ts","sourceRoot":"","sources":["../../src/hooks/useInWagmiContext.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAM3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if internal wallet provider should be used
|
|
3
|
+
* Similar to LiFi's useInternalWalletProvider hook
|
|
4
|
+
*
|
|
5
|
+
* @param inExternalContext - Whether external wallet context is detected
|
|
6
|
+
* @returns true if internal wallet should be used, false if external
|
|
7
|
+
*/
|
|
8
|
+
export declare function useInternalWalletProvider(inExternalContext: boolean): boolean;
|
|
9
|
+
//# sourceMappingURL=useInternalWalletProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInternalWalletProvider.d.ts","sourceRoot":"","sources":["../../src/hooks/useInternalWalletProvider.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAI7E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SignerWalletAdapter } from "@solana/wallet-adapter-base";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to get Solana wallet adapter and connection
|
|
4
|
+
* Similar to LiFi's pattern - uses @solana/wallet-adapter-react directly
|
|
5
|
+
*
|
|
6
|
+
* Works for both internal and external Solana contexts:
|
|
7
|
+
* - Internal: Returns adapter from SVMBaseProvider
|
|
8
|
+
* - External: Returns adapter from external provider (e.g., Dynamic) if it provides ConnectionContext
|
|
9
|
+
*
|
|
10
|
+
* @returns { adapter, connection } or null if not available
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSolanaWalletAdapter(): {
|
|
13
|
+
adapter: SignerWalletAdapter | null;
|
|
14
|
+
connection: any | null;
|
|
15
|
+
} | null;
|
|
16
|
+
//# sourceMappingURL=useSolanaWalletAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSolanaWalletAdapter.d.ts","sourceRoot":"","sources":["../../src/hooks/useSolanaWalletAdapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,IAAI;IACxC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,GAAG,GAAG,IAAI,CAAC;CACxB,GAAG,IAAI,CAoCP"}
|
|
@@ -8,7 +8,7 @@ export declare function useTokenBalances({ address, chainId, chainType }: UseTok
|
|
|
8
8
|
isLoading: boolean;
|
|
9
9
|
error: string | null;
|
|
10
10
|
tokenBalances: any;
|
|
11
|
-
refetch: (options?: import("@tanstack/
|
|
11
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<any, Error>>;
|
|
12
12
|
getTokenBalance: (token: Token, address: string) => Promise<TokenBalance | null | undefined>;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -17,9 +17,8 @@ interface UseWalletReturn {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Wallet hook for managing wallet connections
|
|
20
|
-
*
|
|
20
|
+
* Supports EVM (via Wagmi) and Solana (via @solana/wallet-adapter-react)
|
|
21
21
|
*
|
|
22
|
-
* TODO: Add Solana wallet support
|
|
23
22
|
* TODO: Add Bitcoin wallet support
|
|
24
23
|
*/
|
|
25
24
|
export declare function useWallet(): UseWalletReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWallet.d.ts","sourceRoot":"","sources":["../../src/hooks/useWallet.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useWallet.d.ts","sourceRoot":"","sources":["../../src/hooks/useWallet.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,UAAU,eAAe;IAEvB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,eAAe,EAAE,SAAS,CAAC;IAC3B,yBAAyB,EAAE,SAAS,CAAC;IAGrC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAGxC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,yBAAyB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrE,kBAAkB,EAAE,MAAM,MAAM,EAAE,CAAC;IACnC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;CACtE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,eAAe,CAkP3C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized "connect wallet" trigger:
|
|
3
|
+
* - If external wallet management exists (Dynamic), call config.wallet.onConnectClick
|
|
4
|
+
* - Otherwise open the widget's internal wallet modal
|
|
5
|
+
*/
|
|
6
|
+
export declare function useWalletConnectTrigger(): {
|
|
7
|
+
isExternalWalletManagement: boolean;
|
|
8
|
+
triggerConnect: () => void;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useWalletConnectTrigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWalletConnectTrigger.d.ts","sourceRoot":"","sources":["../../src/hooks/useWalletConnectTrigger.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,uBAAuB;;;EAsBtC"}
|
|
@@ -5,6 +5,6 @@ export declare function useWalletModal(): {
|
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
openModal: () => void;
|
|
7
7
|
closeModal: () => void;
|
|
8
|
-
setIsOpen:
|
|
8
|
+
setIsOpen: (open: boolean) => void;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=useWalletModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useWalletModal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useWalletModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useWalletModal.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,cAAc;;;;;EAqB7B"}
|