@bluxcc/react 0.1.2 → 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/assets/Icons.d.ts +2 -0
- package/dist/assets/logos.d.ts +8 -7
- package/dist/components/CardItem/index.d.ts +7 -3
- package/dist/components/Input/OTPInput.d.ts +6 -1
- package/dist/components/Modal/index.d.ts +1 -2
- package/dist/constants/index.d.ts +0 -2
- package/dist/containers/Pages/ConfirmCode/index.d.ts +1 -1
- package/dist/context/provider.d.ts +2 -3
- package/dist/index.cjs.js +1 -1405
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1399
- package/dist/index.esm.js.map +1 -1
- package/dist/networks.d.ts +8 -0
- package/dist/types/index.d.ts +22 -5
- package/dist/utils/setWalletNetwork.d.ts +3 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -29,18 +29,27 @@ export interface AccountData {
|
|
|
29
29
|
xlmBalance: string;
|
|
30
30
|
transactions?: Horizon.ServerApi.TransactionRecord[];
|
|
31
31
|
}
|
|
32
|
+
interface IServers {
|
|
33
|
+
horizon?: string;
|
|
34
|
+
soroban?: string;
|
|
35
|
+
}
|
|
36
|
+
export type ITransports = Record<string, IServers>;
|
|
32
37
|
/**
|
|
33
38
|
* Configuration options for the provider.
|
|
34
39
|
*/
|
|
35
40
|
export interface IProviderConfig {
|
|
36
41
|
appName: string;
|
|
37
42
|
appLogo?: string;
|
|
38
|
-
|
|
43
|
+
networks: string[];
|
|
44
|
+
appearance: IAppearance;
|
|
45
|
+
transports?: ITransports;
|
|
46
|
+
loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'passkey'>;
|
|
39
47
|
}
|
|
40
48
|
/**
|
|
41
49
|
* Information about the connected wallet.
|
|
42
50
|
*/
|
|
43
51
|
export interface WalletInfo {
|
|
52
|
+
passphrase: string;
|
|
44
53
|
name: SupportedWallets;
|
|
45
54
|
address: string | null;
|
|
46
55
|
}
|
|
@@ -49,6 +58,8 @@ export interface WalletInfo {
|
|
|
49
58
|
*/
|
|
50
59
|
export interface IUser {
|
|
51
60
|
wallet: WalletInfo | null;
|
|
61
|
+
email: string | null;
|
|
62
|
+
phoneNumber: number | null;
|
|
52
63
|
}
|
|
53
64
|
/**
|
|
54
65
|
* Context state management interface.
|
|
@@ -84,7 +95,6 @@ export interface IAppearance {
|
|
|
84
95
|
*/
|
|
85
96
|
export interface ContextInterface {
|
|
86
97
|
config: IProviderConfig;
|
|
87
|
-
appearance: IAppearance;
|
|
88
98
|
user: IUser;
|
|
89
99
|
isModalOpen: boolean;
|
|
90
100
|
isReady: boolean;
|
|
@@ -108,7 +118,8 @@ export declare enum Routes {
|
|
|
108
118
|
PROFILE = "PROFILE",// User profile view
|
|
109
119
|
SIGN_TRANSACTION = "SIGN_TRANSACTION",// User sign transaction view
|
|
110
120
|
SEND = "SEND",// User sign transaction view
|
|
111
|
-
ACTIVITY = "ACTIVITY"
|
|
121
|
+
ACTIVITY = "ACTIVITY",// User sign transaction view
|
|
122
|
+
OTP = "OTP"
|
|
112
123
|
}
|
|
113
124
|
/**
|
|
114
125
|
* Modal state management interface.
|
|
@@ -128,6 +139,7 @@ export interface ModalHeights {
|
|
|
128
139
|
[Routes.SIGN_TRANSACTION]: number;
|
|
129
140
|
[Routes.SEND]: number;
|
|
130
141
|
[Routes.ACTIVITY]: number;
|
|
142
|
+
[Routes.OTP]: number;
|
|
131
143
|
}
|
|
132
144
|
/**
|
|
133
145
|
* Represents the result of a successful wallet connection.
|
|
@@ -141,6 +153,10 @@ export interface ConnectResult {
|
|
|
141
153
|
export interface SignResult {
|
|
142
154
|
signedXdr: string;
|
|
143
155
|
}
|
|
156
|
+
export interface GetNetworkResult {
|
|
157
|
+
network: string;
|
|
158
|
+
passphrase: string;
|
|
159
|
+
}
|
|
144
160
|
/**
|
|
145
161
|
* Defines the available actions for interacting with a wallet.
|
|
146
162
|
*/
|
|
@@ -162,9 +178,9 @@ export interface WalletInterface {
|
|
|
162
178
|
submit?: boolean;
|
|
163
179
|
}) => Promise<string>;
|
|
164
180
|
disconnect?: () => Promise<void>;
|
|
165
|
-
getNetwork
|
|
181
|
+
getNetwork: () => Promise<{
|
|
166
182
|
network: string;
|
|
167
|
-
|
|
183
|
+
passphrase: string;
|
|
168
184
|
}>;
|
|
169
185
|
signMessage?: (message: string, options?: {
|
|
170
186
|
networkPassphrase?: string;
|
|
@@ -183,3 +199,4 @@ export interface WalletInterface {
|
|
|
183
199
|
signerPublicKey?: string;
|
|
184
200
|
}>;
|
|
185
201
|
}
|
|
202
|
+
export {};
|