@dogeos/dogeos-sdk 3.0.8 → 3.0.9-beta.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/README.md +653 -148
- package/dist/dogeos-sdk.css +1 -1
- package/dist/{features-animation-CXK1ztTS.js → features-animation-BsnToLWy.js} +1 -1
- package/dist/index-BPgvjTgE.js +18 -0
- package/dist/index-DAH581QK.js +1423 -0
- package/dist/{index-C7sRSEtK.js → index-DyerC0th.js} +10825 -9954
- package/dist/index.d.ts +129 -74
- package/dist/index.js +10 -9
- package/dist/src-UW24ZMRV-DP6WuHRI.js +5 -0
- package/package.json +4 -4
- package/dist/index-DdIcZIu1.js +0 -18
- package/dist/index-xbkdxzjk.js +0 -1423
- package/dist/src-UW24ZMRV-CQc-dwaz.js +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { AdaptorChainType } from '
|
|
1
|
+
import { AdaptorChainType } from '../../../wallet-adaptor-base';
|
|
2
2
|
import { Chain as Chain_2 } from 'viem/chains';
|
|
3
|
-
import { Connector } from '
|
|
3
|
+
import { Connector } from '../../../wallet-adaptor-base';
|
|
4
|
+
import { default as default_2 } from 'react';
|
|
4
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
-
import { SignInParams } from '
|
|
6
|
-
import { WalletConfig } from '
|
|
7
|
-
import {
|
|
6
|
+
import { SignInParams } from '../../../wallet-adaptor-base';
|
|
7
|
+
import { WalletConfig } from '../../../wallet-adaptor-base';
|
|
8
|
+
import { WalletConfig as WalletConfig_2 } from '../../../../wallet-adaptor-base';
|
|
9
|
+
import { WalletProvider } from '@tomo-inc/inject-providers';
|
|
10
|
+
|
|
11
|
+
export declare type BasicLoginType = "email" | "externalWallets";
|
|
8
12
|
|
|
9
13
|
export declare type Chain = {
|
|
10
14
|
id: number;
|
|
@@ -30,7 +34,9 @@ export declare type Chain = {
|
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
export declare type ChainInfo = {
|
|
33
|
-
icon:
|
|
37
|
+
icon: string | default_2.ComponentType<default_2.SVGProps<SVGSVGElement> | {
|
|
38
|
+
className?: string;
|
|
39
|
+
}> | null;
|
|
34
40
|
name: string;
|
|
35
41
|
};
|
|
36
42
|
|
|
@@ -39,8 +45,7 @@ export declare type ChainType = Exclude<AdaptorChainType, "all">;
|
|
|
39
45
|
export declare enum ChainTypeEnum {
|
|
40
46
|
All = "all",
|
|
41
47
|
EVM = "evm",
|
|
42
|
-
|
|
43
|
-
Aptos = "aptos"
|
|
48
|
+
Dogecoin = "dogecoin"
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
export declare interface ConnectData {
|
|
@@ -57,19 +62,30 @@ export declare interface ConnectVariables {
|
|
|
57
62
|
chainId?: string;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
|
-
declare
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
export declare type EvmChain = Chain_2;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Get all available chains
|
|
69
|
+
* Fetches chains from backend API and returns all supported chains in config format
|
|
70
|
+
*
|
|
71
|
+
* @returns Returns formatted chain configuration object containing all available chains
|
|
72
|
+
*/
|
|
73
|
+
export declare function getChains(): Promise<Partial<Record<ChainType, EvmChain[] | Chain[]>>>;
|
|
67
74
|
|
|
68
|
-
declare type
|
|
75
|
+
export declare type GetChainsReturnType = Promise<Partial<Record<ChainType, EvmChain[] | Chain[]>>>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get all available connectors
|
|
79
|
+
* Loads all connectors from @tomo-inc/wallet-adaptor-base including EIP6963, Wallet Standard, and WalletConnect wallets
|
|
80
|
+
*
|
|
81
|
+
* @returns Returns all available wallet connectors
|
|
82
|
+
*/
|
|
83
|
+
export declare function getConnectors(): Promise<WalletConfig_2[]>;
|
|
84
|
+
|
|
85
|
+
export declare type GetConnectorsReturnType = Promise<WalletConfig[]>;
|
|
69
86
|
|
|
70
87
|
export declare enum ModalView {
|
|
71
88
|
Loading = "LOADING",
|
|
72
|
-
Logged = "LOGGED",
|
|
73
89
|
WalletList = "WALLET_LIST",
|
|
74
90
|
WalletSearch = "WALLET_SEARCH",
|
|
75
91
|
WalletSelectProviders = "WALLET_SELECT_PROVIDERS",
|
|
@@ -86,26 +102,44 @@ export declare enum ModalView {
|
|
|
86
102
|
MyDogeSocialLogin = "MYDOGE_SOCIAL_LOGIN"
|
|
87
103
|
}
|
|
88
104
|
|
|
89
|
-
export
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
105
|
+
export { SignInParams }
|
|
106
|
+
|
|
107
|
+
export declare interface SocialLoginProvider {
|
|
108
|
+
type: SocialLoginType;
|
|
109
|
+
clientId?: string;
|
|
110
|
+
[key: string]: unknown;
|
|
93
111
|
}
|
|
94
112
|
|
|
95
|
-
export
|
|
113
|
+
export declare type SocialLoginType = "google" | "x";
|
|
96
114
|
|
|
97
115
|
export declare type SwitchChainOptions = {
|
|
98
116
|
chainType: ChainType;
|
|
99
117
|
chainInfo: Chain;
|
|
100
118
|
};
|
|
101
119
|
|
|
120
|
+
export declare type ThemeConfig = {
|
|
121
|
+
themes?: {
|
|
122
|
+
light?: {
|
|
123
|
+
colors?: Record<string, string | Record<string, string>>;
|
|
124
|
+
[key: string]: unknown;
|
|
125
|
+
};
|
|
126
|
+
dark?: {
|
|
127
|
+
colors?: Record<string, string | Record<string, string>>;
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
};
|
|
130
|
+
[key: string]: unknown;
|
|
131
|
+
};
|
|
132
|
+
[key: string]: unknown;
|
|
133
|
+
defaultTheme?: "dark" | "light";
|
|
134
|
+
};
|
|
135
|
+
|
|
102
136
|
export declare type UseAccount = {
|
|
103
137
|
address: string;
|
|
104
138
|
balance?: string;
|
|
105
139
|
chainType?: ChainType;
|
|
106
140
|
chainId?: string;
|
|
107
141
|
currentWallet?: Connector | null;
|
|
108
|
-
currentProvider?:
|
|
142
|
+
currentProvider?: WalletProvider;
|
|
109
143
|
switchChain: (options: SwitchChainOptions) => Promise<boolean>;
|
|
110
144
|
signMessage?: (params: {
|
|
111
145
|
message: string;
|
|
@@ -116,29 +150,17 @@ export declare type UseAccount = {
|
|
|
116
150
|
|
|
117
151
|
export declare const useAccount: () => UseAccount;
|
|
118
152
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* @example
|
|
124
|
-
* ```tsx
|
|
125
|
-
* const { wallet, isAvailable, message, connectedInfo, isLoading } = useEmbeddedWallet();
|
|
126
|
-
*
|
|
127
|
-
* if (isLoading) {
|
|
128
|
-
* return <div>Loading embedded wallet...</div>;
|
|
129
|
-
* }
|
|
130
|
-
*
|
|
131
|
-
* if (isAvailable && wallet) {
|
|
132
|
-
* // Use embedded wallet
|
|
133
|
-
* }
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
export declare const useEmbeddedWallet: () => EmbeddedWalletState;
|
|
153
|
+
export declare interface UserLoginConfig {
|
|
154
|
+
basicLogins?: BasicLoginType[];
|
|
155
|
+
socialLogins?: SocialLoginProvider[];
|
|
156
|
+
}
|
|
137
157
|
|
|
138
158
|
export declare type UseWalletConnect = {
|
|
139
159
|
isOpenModal: boolean;
|
|
140
160
|
isConnected: boolean;
|
|
141
|
-
|
|
161
|
+
isConnecting: boolean;
|
|
162
|
+
error: string;
|
|
163
|
+
connect: (variables: ConnectVariables) => Promise<ConnectData>;
|
|
142
164
|
disconnect: () => Promise<void>;
|
|
143
165
|
openModal: () => void;
|
|
144
166
|
closeModal: () => void;
|
|
@@ -163,10 +185,6 @@ export declare const useWalletConnect: () => {
|
|
|
163
185
|
export declare const WalletConnectEmbed: ({ className, style }: WalletConnectEmbedProps) => JSX_2.Element | null;
|
|
164
186
|
|
|
165
187
|
declare interface WalletConnectEmbedProps {
|
|
166
|
-
/**
|
|
167
|
-
* Optional view to display. If not provided, will use the default view based on prodType
|
|
168
|
-
*/
|
|
169
|
-
view?: ModalView;
|
|
170
188
|
/**
|
|
171
189
|
* Optional container class name
|
|
172
190
|
*/
|
|
@@ -178,10 +196,70 @@ declare interface WalletConnectEmbedProps {
|
|
|
178
196
|
}
|
|
179
197
|
|
|
180
198
|
export declare interface WalletConnectKitConfig {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Connector configuration
|
|
201
|
+
* Must be obtained through getConnectors() method, cannot be passed directly
|
|
202
|
+
* @example
|
|
203
|
+
* ```tsx
|
|
204
|
+
* import { getConnectors } from "@tomo-inc/wallet-connect-kit";
|
|
205
|
+
* const connectors = await getConnectors();
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
connectors?: Awaited<GetConnectorsReturnType>;
|
|
209
|
+
/**
|
|
210
|
+
* Chain configuration
|
|
211
|
+
* Must be obtained through getChains() method, cannot be passed directly
|
|
212
|
+
* @example
|
|
213
|
+
* ```tsx
|
|
214
|
+
* import { getChains } from "@tomo-inc/wallet-connect-kit";
|
|
215
|
+
* const chains = await getChains();
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
chains?: Awaited<GetChainsReturnType>;
|
|
219
|
+
/**
|
|
220
|
+
* Default connect chain
|
|
221
|
+
* @default undefined
|
|
222
|
+
* @example
|
|
223
|
+
* ```tsx
|
|
224
|
+
* import { WalletConnectProvider } from "@tomo-inc/wallet-connect-kit";
|
|
225
|
+
* const config: WalletConnectKitConfig = {
|
|
226
|
+
* defaultConnectChain: 'evm',
|
|
227
|
+
* };
|
|
228
|
+
*/
|
|
229
|
+
defaultConnectChain?: ChainType;
|
|
230
|
+
/***
|
|
231
|
+
* WalletConnect project ID
|
|
232
|
+
* Make sure to replace the projectId with your own WalletConnect Project ID, if you wish to use WalletConnect!
|
|
233
|
+
* Get your Project ID
|
|
234
|
+
* @url https://cloud.walletconnect.com/
|
|
235
|
+
*/
|
|
236
|
+
walletConnectProjectId?: string;
|
|
237
|
+
/**
|
|
238
|
+
* Application metadata
|
|
239
|
+
* @example
|
|
240
|
+
* ```tsx
|
|
241
|
+
* import { WalletConnectProvider } from "@tomo-inc/wallet-connect-kit";
|
|
242
|
+
* const config: WalletConnectKitConfig = {
|
|
243
|
+
* metadata: {
|
|
244
|
+
* name: "My DApp",
|
|
245
|
+
* description: "My decentralized application",
|
|
246
|
+
* url: "https://myapp.com",
|
|
247
|
+
* icons: ["https://myapp.com/icon.png"],
|
|
248
|
+
* },
|
|
249
|
+
* };
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
metadata?: {
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
url: string;
|
|
256
|
+
icons: string[];
|
|
257
|
+
};
|
|
258
|
+
theme?: ThemeConfig;
|
|
259
|
+
login?: UserLoginConfig;
|
|
260
|
+
embeddedWalletConfig?: {
|
|
261
|
+
stage?: "dev" | "pre" | "prod";
|
|
262
|
+
};
|
|
185
263
|
}
|
|
186
264
|
|
|
187
265
|
export declare const WalletConnectProvider: ({ children, config }: WalletConnectProviderProps) => JSX_2.Element | null;
|
|
@@ -191,29 +269,6 @@ declare interface WalletConnectProviderProps {
|
|
|
191
269
|
config?: WalletConnectKitConfig;
|
|
192
270
|
}
|
|
193
271
|
|
|
194
|
-
export
|
|
195
|
-
uuid: string;
|
|
196
|
-
name: string;
|
|
197
|
-
namespace?: string;
|
|
198
|
-
icon: string;
|
|
199
|
-
iconBackground?: string;
|
|
200
|
-
rdns?: string;
|
|
201
|
-
links: {
|
|
202
|
-
homepage?: string;
|
|
203
|
-
ios_install?: string;
|
|
204
|
-
android_install?: string;
|
|
205
|
-
chrome_install?: string;
|
|
206
|
-
mobile?: string;
|
|
207
|
-
qrCode?: string;
|
|
208
|
-
edge?: string;
|
|
209
|
-
firefox?: string;
|
|
210
|
-
opera?: string;
|
|
211
|
-
safari?: string;
|
|
212
|
-
macos?: string;
|
|
213
|
-
windows?: string;
|
|
214
|
-
linux?: string;
|
|
215
|
-
desktop?: string;
|
|
216
|
-
};
|
|
217
|
-
}
|
|
272
|
+
export { WalletProvider }
|
|
218
273
|
|
|
219
274
|
export { }
|