@tomo-inc/wallet-connect-kit 0.0.18 → 0.0.19
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.ts +47 -1
- package/dist/index.js +6181 -10
- package/dist/wallet-connect-kit.css +1 -1
- package/package.json +7 -4
- package/dist/features-animation-Czbt7YWI.js +0 -2509
- package/dist/index-CKW2YGSw.js +0 -35008
- package/dist/index-CuWvAl7U.js +0 -1423
- package/dist/index-Cvucm6Hk.js +0 -18
- package/dist/src-UW24ZMRV-dmt8vgSd.js +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ConnectorProvider } from '../../../wallet-adaptor-base';
|
|
|
7
7
|
import { ConnectorProviders } from '../../../../wallet-adaptor-base';
|
|
8
8
|
import { default as default_2 } from 'react';
|
|
9
9
|
import type { DefaultThemeType } from '@heroui/theme';
|
|
10
|
+
import { EmbeddedWallet } from '@tomo-inc/embedded-wallet-providers';
|
|
10
11
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
12
|
import type { LayoutTheme } from '@heroui/theme';
|
|
12
13
|
import { SignInParams } from '../../../wallet-adaptor-base';
|
|
@@ -67,6 +68,23 @@ export declare interface ConnectVariables {
|
|
|
67
68
|
chainId?: string;
|
|
68
69
|
}
|
|
69
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Connected information from embedded wallet
|
|
73
|
+
*/
|
|
74
|
+
declare interface EmbeddedWalletConnectedInfo {
|
|
75
|
+
evmProvider?: ProviderConnectionInfo;
|
|
76
|
+
solanaProvider?: ProviderConnectionInfo;
|
|
77
|
+
dogeProvider?: ProviderConnectionInfo;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare interface EmbeddedWalletState {
|
|
81
|
+
wallet: EmbeddedWallet | null;
|
|
82
|
+
isAvailable: boolean;
|
|
83
|
+
message: string | null;
|
|
84
|
+
connectedInfo: EmbeddedWalletConnectedInfo | null;
|
|
85
|
+
isLoading: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
70
88
|
export declare type EvmChain = Chain_2;
|
|
71
89
|
|
|
72
90
|
/**
|
|
@@ -103,7 +121,16 @@ export declare enum ModalView {
|
|
|
103
121
|
SignInWallet = "SIGN_IN_WALLET",
|
|
104
122
|
WalletConnect = "WALLET_CONNECT",
|
|
105
123
|
UnsupportChain = "UNSUPPORT_CHAIN",
|
|
106
|
-
|
|
124
|
+
WalletHome = "WALLET_HOME"
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Provider connection information
|
|
129
|
+
*/
|
|
130
|
+
declare interface ProviderConnectionInfo {
|
|
131
|
+
chainType: ChainTypeEnum;
|
|
132
|
+
connected: boolean;
|
|
133
|
+
address?: string[];
|
|
107
134
|
}
|
|
108
135
|
|
|
109
136
|
/**
|
|
@@ -172,6 +199,25 @@ export declare const useConnectors: () => {
|
|
|
172
199
|
currentProvider: WalletProvider_3 | null;
|
|
173
200
|
};
|
|
174
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Hook to access embedded wallet from anywhere in the app
|
|
204
|
+
* Make sure your component is wrapped with WalletConnectProvider
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```tsx
|
|
208
|
+
* const { wallet, isAvailable, message, connectedInfo, isLoading } = useEmbeddedWallet();
|
|
209
|
+
*
|
|
210
|
+
* if (isLoading) {
|
|
211
|
+
* return <div>Loading embedded wallet...</div>;
|
|
212
|
+
* }
|
|
213
|
+
*
|
|
214
|
+
* if (isAvailable && wallet) {
|
|
215
|
+
* // Use embedded wallet
|
|
216
|
+
* }
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
export declare const useEmbeddedWallet: () => EmbeddedWalletState;
|
|
220
|
+
|
|
175
221
|
export declare interface UserLoginConfig {
|
|
176
222
|
basicLogins?: BasicLoginType[];
|
|
177
223
|
socialLogins?: SocialLoginProvider[];
|