@dogeos/dogeos-sdk 3.0.7 → 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-Dc6ZFmM3.js → features-animation-BsnToLWy.js} +1 -1
- package/dist/index-BPgvjTgE.js +18 -0
- package/dist/index-DAH581QK.js +1423 -0
- package/dist/{index-UJLT6A17.js → index-DyerC0th.js} +10723 -9844
- package/dist/index.d.ts +129 -73
- package/dist/index.js +10 -9
- package/dist/src-UW24ZMRV-DP6WuHRI.js +5 -0
- package/package.json +4 -4
- package/dist/index-BZt4TkSe.js +0 -1423
- package/dist/index-DnuidqYy.js +0 -18
- package/dist/src-UW24ZMRV-D7nf-2D5.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,25 +102,44 @@ export declare enum ModalView {
|
|
|
86
102
|
MyDogeSocialLogin = "MYDOGE_SOCIAL_LOGIN"
|
|
87
103
|
}
|
|
88
104
|
|
|
89
|
-
export
|
|
90
|
-
|
|
91
|
-
|
|
105
|
+
export { SignInParams }
|
|
106
|
+
|
|
107
|
+
export declare interface SocialLoginProvider {
|
|
108
|
+
type: SocialLoginType;
|
|
109
|
+
clientId?: string;
|
|
110
|
+
[key: string]: unknown;
|
|
92
111
|
}
|
|
93
112
|
|
|
94
|
-
export
|
|
113
|
+
export declare type SocialLoginType = "google" | "x";
|
|
95
114
|
|
|
96
115
|
export declare type SwitchChainOptions = {
|
|
97
116
|
chainType: ChainType;
|
|
98
117
|
chainInfo: Chain;
|
|
99
118
|
};
|
|
100
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
|
+
|
|
101
136
|
export declare type UseAccount = {
|
|
102
137
|
address: string;
|
|
103
138
|
balance?: string;
|
|
104
139
|
chainType?: ChainType;
|
|
105
140
|
chainId?: string;
|
|
106
141
|
currentWallet?: Connector | null;
|
|
107
|
-
currentProvider?:
|
|
142
|
+
currentProvider?: WalletProvider;
|
|
108
143
|
switchChain: (options: SwitchChainOptions) => Promise<boolean>;
|
|
109
144
|
signMessage?: (params: {
|
|
110
145
|
message: string;
|
|
@@ -115,29 +150,17 @@ export declare type UseAccount = {
|
|
|
115
150
|
|
|
116
151
|
export declare const useAccount: () => UseAccount;
|
|
117
152
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
* @example
|
|
123
|
-
* ```tsx
|
|
124
|
-
* const { wallet, isAvailable, message, connectedInfo, isLoading } = useEmbeddedWallet();
|
|
125
|
-
*
|
|
126
|
-
* if (isLoading) {
|
|
127
|
-
* return <div>Loading embedded wallet...</div>;
|
|
128
|
-
* }
|
|
129
|
-
*
|
|
130
|
-
* if (isAvailable && wallet) {
|
|
131
|
-
* // Use embedded wallet
|
|
132
|
-
* }
|
|
133
|
-
* ```
|
|
134
|
-
*/
|
|
135
|
-
export declare const useEmbeddedWallet: () => EmbeddedWalletState;
|
|
153
|
+
export declare interface UserLoginConfig {
|
|
154
|
+
basicLogins?: BasicLoginType[];
|
|
155
|
+
socialLogins?: SocialLoginProvider[];
|
|
156
|
+
}
|
|
136
157
|
|
|
137
158
|
export declare type UseWalletConnect = {
|
|
138
159
|
isOpenModal: boolean;
|
|
139
160
|
isConnected: boolean;
|
|
140
|
-
|
|
161
|
+
isConnecting: boolean;
|
|
162
|
+
error: string;
|
|
163
|
+
connect: (variables: ConnectVariables) => Promise<ConnectData>;
|
|
141
164
|
disconnect: () => Promise<void>;
|
|
142
165
|
openModal: () => void;
|
|
143
166
|
closeModal: () => void;
|
|
@@ -162,10 +185,6 @@ export declare const useWalletConnect: () => {
|
|
|
162
185
|
export declare const WalletConnectEmbed: ({ className, style }: WalletConnectEmbedProps) => JSX_2.Element | null;
|
|
163
186
|
|
|
164
187
|
declare interface WalletConnectEmbedProps {
|
|
165
|
-
/**
|
|
166
|
-
* Optional view to display. If not provided, will use the default view based on prodType
|
|
167
|
-
*/
|
|
168
|
-
view?: ModalView;
|
|
169
188
|
/**
|
|
170
189
|
* Optional container class name
|
|
171
190
|
*/
|
|
@@ -177,10 +196,70 @@ declare interface WalletConnectEmbedProps {
|
|
|
177
196
|
}
|
|
178
197
|
|
|
179
198
|
export declare interface WalletConnectKitConfig {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
+
};
|
|
184
263
|
}
|
|
185
264
|
|
|
186
265
|
export declare const WalletConnectProvider: ({ children, config }: WalletConnectProviderProps) => JSX_2.Element | null;
|
|
@@ -190,29 +269,6 @@ declare interface WalletConnectProviderProps {
|
|
|
190
269
|
config?: WalletConnectKitConfig;
|
|
191
270
|
}
|
|
192
271
|
|
|
193
|
-
export
|
|
194
|
-
uuid: string;
|
|
195
|
-
name: string;
|
|
196
|
-
namespace?: string;
|
|
197
|
-
icon: string;
|
|
198
|
-
iconBackground?: string;
|
|
199
|
-
rdns?: string;
|
|
200
|
-
links: {
|
|
201
|
-
homepage?: string;
|
|
202
|
-
ios_install?: string;
|
|
203
|
-
android_install?: string;
|
|
204
|
-
chrome_install?: string;
|
|
205
|
-
mobile?: string;
|
|
206
|
-
qrCode?: string;
|
|
207
|
-
edge?: string;
|
|
208
|
-
firefox?: string;
|
|
209
|
-
opera?: string;
|
|
210
|
-
safari?: string;
|
|
211
|
-
macos?: string;
|
|
212
|
-
windows?: string;
|
|
213
|
-
linux?: string;
|
|
214
|
-
desktop?: string;
|
|
215
|
-
};
|
|
216
|
-
}
|
|
272
|
+
export { WalletProvider }
|
|
217
273
|
|
|
218
274
|
export { }
|