use-frontbacked 5.1.5 → 5.1.7

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.
Files changed (101) hide show
  1. package/dist/cjs/index.js +416 -210
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/DownloadType/index.d.ts +12 -12
  4. package/dist/cjs/types/components/Firebase/AccessTokenDoor.d.ts +12 -12
  5. package/dist/cjs/types/components/Firebase/AuthView.d.ts +15 -15
  6. package/dist/cjs/types/components/Firebase/SignInView.d.ts +11 -11
  7. package/dist/cjs/types/components/Firebase/SignUpView.d.ts +10 -10
  8. package/dist/cjs/types/components/Firebase/data.type.d.ts +23 -23
  9. package/dist/cjs/types/components/Firebase/index.d.ts +14 -14
  10. package/dist/cjs/types/components/FrontbackedProvider/index.d.ts +55 -55
  11. package/dist/cjs/types/components/hooks/useReferralId.d.ts +5 -5
  12. package/dist/cjs/types/components/hooks/useSdkConfig.d.ts +10 -10
  13. package/dist/cjs/types/components/hooks/useTools/index.d.ts +14 -14
  14. package/dist/cjs/types/components/hooks/useTools/types.d.ts +62 -62
  15. package/dist/cjs/types/components/hooks/useTools/utils.d.ts +23 -23
  16. package/dist/cjs/types/components/index.d.ts +2 -2
  17. package/dist/cjs/types/components/types.d.ts +214 -214
  18. package/dist/cjs/types/components/widgets/AppButton.d.ts +17 -17
  19. package/dist/cjs/types/components/widgets/CopyView.d.ts +24 -24
  20. package/dist/cjs/types/components/widgets/DrawerPop/index.d.ts +25 -25
  21. package/dist/cjs/types/components/widgets/InfoLabel.d.ts +11 -11
  22. package/dist/cjs/types/components/widgets/InputBox/index.d.ts +94 -94
  23. package/dist/cjs/types/components/widgets/InputBox/utils.d.ts +1 -1
  24. package/dist/cjs/types/components/widgets/Link.d.ts +9 -9
  25. package/dist/cjs/types/components/widgets/Loading.d.ts +27 -27
  26. package/dist/cjs/types/components/widgets/ModalPop/index.d.ts +26 -26
  27. package/dist/cjs/types/components/widgets/PleaseWaitForX.d.ts +3 -3
  28. package/dist/cjs/types/index.d.ts +1 -1
  29. package/dist/cjs/types/theme.d.ts +3 -3
  30. package/dist/cjs/types/theme.type.d.ts +19 -19
  31. package/dist/cjs/types/utils/CustomError.d.ts +5 -5
  32. package/dist/cjs/types/utils/base64Images.d.ts +4 -4
  33. package/dist/cjs/types/utils/c.d.ts +33 -33
  34. package/dist/cjs/types/utils/f.d.ts +23 -23
  35. package/dist/components/DownloadType/index.d.ts +12 -12
  36. package/dist/components/Firebase/AccessTokenDoor.d.ts +12 -12
  37. package/dist/components/Firebase/AuthView.d.ts +15 -15
  38. package/dist/components/Firebase/SignInView.d.ts +11 -11
  39. package/dist/components/Firebase/SignUpView.d.ts +10 -10
  40. package/dist/components/Firebase/data.type.d.ts +23 -23
  41. package/dist/components/Firebase/index.d.ts +14 -14
  42. package/dist/components/FrontbackedProvider/index.d.ts +55 -55
  43. package/dist/components/hooks/useReferralId.d.ts +5 -5
  44. package/dist/components/hooks/useSdkConfig.d.ts +10 -10
  45. package/dist/components/hooks/useTools/index.d.ts +14 -14
  46. package/dist/components/hooks/useTools/types.d.ts +62 -62
  47. package/dist/components/hooks/useTools/utils.d.ts +23 -23
  48. package/dist/components/index.d.ts +2 -2
  49. package/dist/components/types.d.ts +214 -214
  50. package/dist/components/widgets/AppButton.d.ts +17 -17
  51. package/dist/components/widgets/CopyView.d.ts +24 -24
  52. package/dist/components/widgets/DrawerPop/index.d.ts +25 -25
  53. package/dist/components/widgets/InfoLabel.d.ts +11 -11
  54. package/dist/components/widgets/InputBox/index.d.ts +94 -94
  55. package/dist/components/widgets/InputBox/utils.d.ts +1 -1
  56. package/dist/components/widgets/Link.d.ts +9 -9
  57. package/dist/components/widgets/Loading.d.ts +27 -27
  58. package/dist/components/widgets/ModalPop/index.d.ts +26 -26
  59. package/dist/components/widgets/PleaseWaitForX.d.ts +3 -3
  60. package/dist/esm/index.es.js +416 -210
  61. package/dist/esm/index.es.js.map +1 -1
  62. package/dist/esm/types/components/DownloadType/index.d.ts +12 -12
  63. package/dist/esm/types/components/Firebase/AccessTokenDoor.d.ts +12 -12
  64. package/dist/esm/types/components/Firebase/AuthView.d.ts +15 -15
  65. package/dist/esm/types/components/Firebase/SignInView.d.ts +11 -11
  66. package/dist/esm/types/components/Firebase/SignUpView.d.ts +10 -10
  67. package/dist/esm/types/components/Firebase/data.type.d.ts +23 -23
  68. package/dist/esm/types/components/Firebase/index.d.ts +14 -14
  69. package/dist/esm/types/components/FrontbackedProvider/index.d.ts +55 -55
  70. package/dist/esm/types/components/hooks/useReferralId.d.ts +5 -5
  71. package/dist/esm/types/components/hooks/useSdkConfig.d.ts +10 -10
  72. package/dist/esm/types/components/hooks/useTools/index.d.ts +14 -14
  73. package/dist/esm/types/components/hooks/useTools/types.d.ts +62 -62
  74. package/dist/esm/types/components/hooks/useTools/utils.d.ts +23 -23
  75. package/dist/esm/types/components/index.d.ts +2 -2
  76. package/dist/esm/types/components/types.d.ts +214 -214
  77. package/dist/esm/types/components/widgets/AppButton.d.ts +17 -17
  78. package/dist/esm/types/components/widgets/CopyView.d.ts +24 -24
  79. package/dist/esm/types/components/widgets/DrawerPop/index.d.ts +25 -25
  80. package/dist/esm/types/components/widgets/InfoLabel.d.ts +11 -11
  81. package/dist/esm/types/components/widgets/InputBox/index.d.ts +94 -94
  82. package/dist/esm/types/components/widgets/InputBox/utils.d.ts +1 -1
  83. package/dist/esm/types/components/widgets/Link.d.ts +9 -9
  84. package/dist/esm/types/components/widgets/Loading.d.ts +27 -27
  85. package/dist/esm/types/components/widgets/ModalPop/index.d.ts +26 -26
  86. package/dist/esm/types/components/widgets/PleaseWaitForX.d.ts +3 -3
  87. package/dist/esm/types/index.d.ts +1 -1
  88. package/dist/esm/types/theme.d.ts +3 -3
  89. package/dist/esm/types/theme.type.d.ts +19 -19
  90. package/dist/esm/types/utils/CustomError.d.ts +5 -5
  91. package/dist/esm/types/utils/base64Images.d.ts +4 -4
  92. package/dist/esm/types/utils/c.d.ts +33 -33
  93. package/dist/esm/types/utils/f.d.ts +23 -23
  94. package/dist/index.d.ts +1 -1
  95. package/dist/theme.d.ts +3 -3
  96. package/dist/theme.type.d.ts +19 -19
  97. package/dist/utils/CustomError.d.ts +5 -5
  98. package/dist/utils/base64Images.d.ts +4 -4
  99. package/dist/utils/c.d.ts +33 -33
  100. package/dist/utils/f.d.ts +23 -23
  101. package/package.json +84 -83
@@ -1,62 +1,62 @@
1
- import { Timestamp } from "firebase/firestore";
2
- export interface StaticTool {
3
- id: string;
4
- siteUrl: string;
5
- mobileVideoUrl?: string | null;
6
- is_static: true;
7
- desktopVideoUrl?: string | null;
8
- name: string;
9
- isActive: boolean;
10
- isHidden: boolean;
11
- create_price: number;
12
- create_price_discount: number;
13
- update_price: number;
14
- allow_freemium: boolean;
15
- create_price_is_monthly: boolean;
16
- yearly_price?: number;
17
- quarterly_price?: number;
18
- rank: number;
19
- siteLogoUrl?: string | null;
20
- icon?: string;
21
- }
22
- export interface DynamicTool {
23
- id: string;
24
- authorId: string;
25
- createdAt: Timestamp;
26
- icon: string;
27
- allow_freemium: boolean;
28
- update_price: number;
29
- is_static: boolean;
30
- isActive: boolean;
31
- is_freemium: boolean;
32
- name: string;
33
- description: string;
34
- create_price: number;
35
- isHidden: boolean;
36
- youtube: string;
37
- templates_url: string;
38
- updatedAt: Timestamp;
39
- templates: DynamicTemplate[];
40
- }
41
- export interface DynamicTemplate {
42
- id: string;
43
- name: string;
44
- logo: string;
45
- data_url: string;
46
- is_default?: boolean;
47
- split_on_download?: boolean;
48
- thumbnail: string;
49
- }
50
- export interface ToolsData {
51
- totalUpdates?: number;
52
- lastUpdatedOn?: string;
53
- previouslyUpdatedOn?: string;
54
- tools?: (StaticTool | DynamicTool)[];
55
- toolsById?: {
56
- [x: string]: DynamicTool;
57
- } | null;
58
- toolsByTemplatesUrl?: {
59
- [x: string]: DynamicTool;
60
- } | null;
61
- getTool: (toolId: string) => DynamicTool | null;
62
- }
1
+ import { Timestamp } from "firebase/firestore";
2
+ export interface StaticTool {
3
+ id: string;
4
+ siteUrl: string;
5
+ mobileVideoUrl?: string | null;
6
+ is_static: true;
7
+ desktopVideoUrl?: string | null;
8
+ name: string;
9
+ isActive: boolean;
10
+ isHidden: boolean;
11
+ create_price: number;
12
+ create_price_discount: number;
13
+ update_price: number;
14
+ allow_freemium: boolean;
15
+ create_price_is_monthly: boolean;
16
+ yearly_price?: number;
17
+ quarterly_price?: number;
18
+ rank: number;
19
+ siteLogoUrl?: string | null;
20
+ icon?: string;
21
+ }
22
+ export interface DynamicTool {
23
+ id: string;
24
+ authorId: string;
25
+ createdAt: Timestamp;
26
+ icon: string;
27
+ allow_freemium: boolean;
28
+ update_price: number;
29
+ is_static: boolean;
30
+ isActive: boolean;
31
+ is_freemium: boolean;
32
+ name: string;
33
+ description: string;
34
+ create_price: number;
35
+ isHidden: boolean;
36
+ youtube: string;
37
+ templates_url: string;
38
+ updatedAt: Timestamp;
39
+ templates: DynamicTemplate[];
40
+ }
41
+ export interface DynamicTemplate {
42
+ id: string;
43
+ name: string;
44
+ logo: string;
45
+ data_url: string;
46
+ is_default?: boolean;
47
+ split_on_download?: boolean;
48
+ thumbnail: string;
49
+ }
50
+ export interface ToolsData {
51
+ totalUpdates?: number;
52
+ lastUpdatedOn?: string;
53
+ previouslyUpdatedOn?: string;
54
+ tools?: (StaticTool | DynamicTool)[];
55
+ toolsById?: {
56
+ [x: string]: DynamicTool;
57
+ } | null;
58
+ toolsByTemplatesUrl?: {
59
+ [x: string]: DynamicTool;
60
+ } | null;
61
+ getTool: (toolId: string) => DynamicTool | null;
62
+ }
@@ -1,23 +1,23 @@
1
- /**
2
- * Removes a specific query string parameter from a URL.
3
- * @param {string} url - The original URL.
4
- * @param {string} queryString - The query string parameter to remove.
5
- * @returns {string} - The updated URL without the specified query string parameter.
6
- */
7
- export declare function removeQueryString(url: string, queryString: string): string;
8
- /**
9
- * Converts an array of objects to a map using a specified attribute as the key.
10
- *
11
- * @param {Array<Object>} arr - The array of objects to be converted.
12
- * @param {string} attr - The attribute to use as the key for the mapping.
13
- * @returns {Object} - An object mapping each unique attribute value to its corresponding item.
14
- */
15
- export declare function arrayToMap(attr: string, arr: {
16
- [x: string]: any;
17
- }[], keyParser?: (key: string) => string): {
18
- [x: string]: {
19
- [x: string]: any;
20
- };
21
- };
22
- export declare function removeUpdateQueryString(url: string): string;
23
- export declare const rmUpdates: (url: string) => any;
1
+ /**
2
+ * Removes a specific query string parameter from a URL.
3
+ * @param {string} url - The original URL.
4
+ * @param {string} queryString - The query string parameter to remove.
5
+ * @returns {string} - The updated URL without the specified query string parameter.
6
+ */
7
+ export declare function removeQueryString(url: string, queryString: string): string;
8
+ /**
9
+ * Converts an array of objects to a map using a specified attribute as the key.
10
+ *
11
+ * @param {Array<Object>} arr - The array of objects to be converted.
12
+ * @param {string} attr - The attribute to use as the key for the mapping.
13
+ * @returns {Object} - An object mapping each unique attribute value to its corresponding item.
14
+ */
15
+ export declare function arrayToMap(attr: string, arr: {
16
+ [x: string]: any;
17
+ }[], keyParser?: (key: string) => string): {
18
+ [x: string]: {
19
+ [x: string]: any;
20
+ };
21
+ };
22
+ export declare function removeUpdateQueryString(url: string): string;
23
+ export declare const rmUpdates: (url: string) => any;
@@ -1,2 +1,2 @@
1
- export { FrontbackedProvider, useFrontbacked, useTools, useSdkConfig, rmUpdates, useReferralId } from "./FrontbackedProvider";
2
- export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult } from "./FrontbackedProvider";
1
+ export { FrontbackedProvider, useFrontbacked, useTools, useSdkConfig, rmUpdates, useReferralId } from "./FrontbackedProvider";
2
+ export type { StaticTool, DynamicTool, DynamicTemplate, ToolsData, UseToolsResult } from "./FrontbackedProvider";
@@ -1,214 +1,214 @@
1
- import { User } from "firebase/auth";
2
- export interface Doc {
3
- [x: string]: any;
4
- }
5
- export interface Router {
6
- push: (url: string) => void;
7
- }
8
- export interface DownloadTypeProps {
9
- toolVersionCode?: number;
10
- title?: string;
11
- removeFreemiumBeforeUpdate?: boolean;
12
- toolId?: string;
13
- freeTitle?: string;
14
- freeMessage?: string;
15
- paidTitle?: string;
16
- paidMessage?: string;
17
- updateMessage?: string;
18
- renewSubscription?: boolean;
19
- isFreemium?: boolean;
20
- }
21
- export interface DocRules {
22
- allow_freemium: boolean;
23
- create_price: number;
24
- update_price: number;
25
- create_price_is_monthly?: boolean;
26
- yearly_price?: number;
27
- quarterly_price?: number;
28
- x?: string[];
29
- }
30
- export interface SubscriptionType {
31
- monthly: "monthly";
32
- quarterly: "quarterly";
33
- yearly: "yearly";
34
- }
35
- export declare const SUSCRIPTION_TYPES: SubscriptionType;
36
- export interface DownloadTypeResult extends DocRules {
37
- is_freemium: boolean;
38
- is_create: boolean;
39
- subscription_type?: "monthly" | "quarterly" | "yearly";
40
- cost: number;
41
- }
42
- export interface Tool extends DocRules {
43
- id: string;
44
- isActive: boolean;
45
- isHidden: boolean;
46
- siteLogoUrl: string;
47
- siteUrl: string;
48
- desktopVideoUrl: string | null;
49
- mobileVideoUrl: string | null;
50
- is_static?: boolean | null;
51
- allowFreemium?: boolean | null;
52
- createPrice?: number | null;
53
- description?: string | null;
54
- icon?: string | null;
55
- name: string;
56
- templates_url?: string | null;
57
- updatePrice?: number | null;
58
- youtube?: string | null;
59
- }
60
- export interface Vendor {
61
- name: string;
62
- number: string;
63
- freq: number;
64
- }
65
- export interface SdkConfig {
66
- app_version_code: number;
67
- ttl_days: number;
68
- valid_till: number;
69
- min_deposit: number;
70
- min_vendor_deposit: number;
71
- parent_site_home: string;
72
- contact_link: string;
73
- group_link: string;
74
- group_links: string[];
75
- aff_pct: number;
76
- tools: Tool[];
77
- vendors: Vendor[];
78
- }
79
- export interface Coins {
80
- [x: string]: {
81
- coingecko_price_key: string;
82
- disabled: boolean;
83
- key: string;
84
- symbol: string;
85
- decimals: number;
86
- requiredConfirmations: number;
87
- priority: number;
88
- name: string;
89
- depositWarning: string;
90
- secondsPerBlock: number;
91
- logo: string;
92
- abiData: {
93
- rpcUrl: string;
94
- chainId: number;
95
- address: string;
96
- abi: {}[];
97
- [x: string]: any;
98
- };
99
- };
100
- }
101
- export interface UseBalanceUpdateResult {
102
- usdBalance: number;
103
- balanceUpdating: boolean;
104
- referralEarnings: number;
105
- bnbPaymentAddress: string | null;
106
- bnbTestnetPaymentAddress: string | null;
107
- updatePaymentAddress: (address: string, chainCoin: string, user?: User | null) => Promise<void>;
108
- syncConfirmedBalance: (coinsInfo: {
109
- [x: string]: BigInt;
110
- }) => void;
111
- transferCredit: (recipientEmail: string, amount: number, user?: User | null) => Promise<void>;
112
- }
113
- export interface BalanceDoc {
114
- usd_balance: number;
115
- referral_earnings: number;
116
- bnb_payment_address: string | null;
117
- bnb_testnet_payment_address: string | null;
118
- referred_by: string | null;
119
- [coinXReferralEarnings: string]: any;
120
- }
121
- export interface PriceData {
122
- [coinPrice: string]: number;
123
- }
124
- export interface Balance {
125
- loading: boolean;
126
- ethWallet: string | null | undefined;
127
- ethWalletContracted: boolean;
128
- bnbWallet: string | null | undefined;
129
- bnbWalletContracted: boolean;
130
- ethBalance: number;
131
- ethBalanceInUsd: number;
132
- bnbBalance: number;
133
- bnbBalanceInUsd: number;
134
- ethBalancePending: number;
135
- ethBalancePendingInUsd: number;
136
- bnbBalancePending: number;
137
- bnbBalancePendingInUsd: number;
138
- balanceInUsd: number;
139
- balancePendingInUsd: number;
140
- }
141
- export interface SaltBalanceInfo {
142
- salt: string;
143
- paddedSalt: string;
144
- wallet: string;
145
- isCreated: boolean;
146
- balance: BigInt;
147
- blockNumber: number | string;
148
- }
149
- export interface SaltBalanceConfirmation extends SaltBalanceInfo {
150
- depositedAmount: BigInt;
151
- depositedAmountInCoin: number;
152
- remainingConfirmations: number;
153
- requiredConfirmations: number;
154
- coin: string;
155
- depositedAmountInUsd: number;
156
- }
157
- export interface BalanceInfo {
158
- hasError: boolean;
159
- confirmedDepositsBalance: BigInt;
160
- confirmedDepositsBalanceInCoin: number;
161
- unconfirmedDepositsBalance: BigInt;
162
- unconfirmedDepositsBalanceInCoin: number;
163
- unconfirmedDeposits: SaltBalanceConfirmation[];
164
- latestDeposit: SaltBalanceConfirmation | null | undefined;
165
- salt: string | null | undefined;
166
- paddedSalt: string | null | undefined;
167
- wallet: string | null | undefined;
168
- walletCreated: boolean;
169
- confirmedDepositsBalanceInUsd: number;
170
- unconfirmedDepositsBalanceInUsd: number;
171
- }
172
- export interface AllCoinsBalanceInfo {
173
- hasErrorBnbTest: boolean;
174
- confirmedDepositsBalanceBnbTest: BigInt;
175
- confirmedDepositsBalanceInCoinBnbTest: number;
176
- unconfirmedDepositsBalanceBnbTest: BigInt;
177
- unconfirmedDepositsBalanceInCoinBnbTest: number;
178
- unconfirmedDepositsBnbTest: SaltBalanceConfirmation[];
179
- latestDepositBnbTest: SaltBalanceConfirmation | null | undefined;
180
- saltBnbTest: string | null | undefined;
181
- paddedSaltBnbTest: string | null | undefined;
182
- walletBnbTest: string | null | undefined;
183
- walletCreatedBnbTest: boolean;
184
- confirmedDepositsBalanceInUsdBnbTest: number;
185
- unconfirmedDepositsBalanceInUsdBnbTest: number;
186
- hasErrorBnb: boolean;
187
- confirmedDepositsBalanceBnb: BigInt;
188
- confirmedDepositsBalanceInCoinBnb: number;
189
- unconfirmedDepositsBalanceBnb: BigInt;
190
- unconfirmedDepositsBalanceInCoinBnb: number;
191
- unconfirmedDepositsBnb: SaltBalanceConfirmation[];
192
- latestDepositBnb: SaltBalanceConfirmation | null | undefined;
193
- saltBnb: string | null | undefined;
194
- paddedSaltBnb: string | null | undefined;
195
- walletBnb: string | null | undefined;
196
- walletCreatedBnb: boolean;
197
- confirmedDepositsBalanceInUsdBnb: number;
198
- unconfirmedDepositsBalanceInUsdBnb: number;
199
- hasErrorEth: boolean;
200
- confirmedDepositsBalanceEth: BigInt;
201
- confirmedDepositsBalanceInCoinEth: number;
202
- unconfirmedDepositsBalanceEth: BigInt;
203
- unconfirmedDepositsBalanceInCoinEth: number;
204
- unconfirmedDepositsEth: SaltBalanceConfirmation[];
205
- latestDepositEth: SaltBalanceConfirmation | null | undefined;
206
- saltEth: string | null | undefined;
207
- paddedSaltEth: string | null | undefined;
208
- walletEth: string | null | undefined;
209
- walletCreatedEth: boolean;
210
- confirmedDepositsBalanceInUsdEth: number;
211
- unconfirmedDepositsBalanceInUsdEth: number;
212
- balanceInUsd: number;
213
- balancePendingInUsd: number;
214
- }
1
+ import { User } from "firebase/auth";
2
+ export interface Doc {
3
+ [x: string]: any;
4
+ }
5
+ export interface Router {
6
+ push: (url: string) => void;
7
+ }
8
+ export interface DownloadTypeProps {
9
+ toolVersionCode?: number;
10
+ title?: string;
11
+ removeFreemiumBeforeUpdate?: boolean;
12
+ toolId?: string;
13
+ freeTitle?: string;
14
+ freeMessage?: string;
15
+ paidTitle?: string;
16
+ paidMessage?: string;
17
+ updateMessage?: string;
18
+ renewSubscription?: boolean;
19
+ isFreemium?: boolean;
20
+ }
21
+ export interface DocRules {
22
+ allow_freemium: boolean;
23
+ create_price: number;
24
+ update_price: number;
25
+ create_price_is_monthly?: boolean;
26
+ yearly_price?: number;
27
+ quarterly_price?: number;
28
+ x?: string[];
29
+ }
30
+ export interface SubscriptionType {
31
+ monthly: "monthly";
32
+ quarterly: "quarterly";
33
+ yearly: "yearly";
34
+ }
35
+ export declare const SUSCRIPTION_TYPES: SubscriptionType;
36
+ export interface DownloadTypeResult extends DocRules {
37
+ is_freemium: boolean;
38
+ is_create: boolean;
39
+ subscription_type?: "monthly" | "quarterly" | "yearly";
40
+ cost: number;
41
+ }
42
+ export interface Tool extends DocRules {
43
+ id: string;
44
+ isActive: boolean;
45
+ isHidden: boolean;
46
+ siteLogoUrl: string;
47
+ siteUrl: string;
48
+ desktopVideoUrl: string | null;
49
+ mobileVideoUrl: string | null;
50
+ is_static?: boolean | null;
51
+ allowFreemium?: boolean | null;
52
+ createPrice?: number | null;
53
+ description?: string | null;
54
+ icon?: string | null;
55
+ name: string;
56
+ templates_url?: string | null;
57
+ updatePrice?: number | null;
58
+ youtube?: string | null;
59
+ }
60
+ export interface Vendor {
61
+ name: string;
62
+ number: string;
63
+ freq: number;
64
+ }
65
+ export interface SdkConfig {
66
+ app_version_code: number;
67
+ ttl_days: number;
68
+ valid_till: number;
69
+ min_deposit: number;
70
+ min_vendor_deposit: number;
71
+ parent_site_home: string;
72
+ contact_link: string;
73
+ group_link: string;
74
+ group_links: string[];
75
+ aff_pct: number;
76
+ tools: Tool[];
77
+ vendors: Vendor[];
78
+ }
79
+ export interface Coins {
80
+ [x: string]: {
81
+ coingecko_price_key: string;
82
+ disabled: boolean;
83
+ key: string;
84
+ symbol: string;
85
+ decimals: number;
86
+ requiredConfirmations: number;
87
+ priority: number;
88
+ name: string;
89
+ depositWarning: string;
90
+ secondsPerBlock: number;
91
+ logo: string;
92
+ abiData: {
93
+ rpcUrl: string;
94
+ chainId: number;
95
+ address: string;
96
+ abi: {}[];
97
+ [x: string]: any;
98
+ };
99
+ };
100
+ }
101
+ export interface UseBalanceUpdateResult {
102
+ usdBalance: number;
103
+ balanceUpdating: boolean;
104
+ referralEarnings: number;
105
+ bnbPaymentAddress: string | null;
106
+ bnbTestnetPaymentAddress: string | null;
107
+ updatePaymentAddress: (address: string, chainCoin: string, user?: User | null) => Promise<void>;
108
+ syncConfirmedBalance: (coinsInfo: {
109
+ [x: string]: BigInt;
110
+ }) => void;
111
+ transferCredit: (recipientEmail: string, amount: number, user?: User | null) => Promise<void>;
112
+ }
113
+ export interface BalanceDoc {
114
+ usd_balance: number;
115
+ referral_earnings: number;
116
+ bnb_payment_address: string | null;
117
+ bnb_testnet_payment_address: string | null;
118
+ referred_by: string | null;
119
+ [coinXReferralEarnings: string]: any;
120
+ }
121
+ export interface PriceData {
122
+ [coinPrice: string]: number;
123
+ }
124
+ export interface Balance {
125
+ loading: boolean;
126
+ ethWallet: string | null | undefined;
127
+ ethWalletContracted: boolean;
128
+ bnbWallet: string | null | undefined;
129
+ bnbWalletContracted: boolean;
130
+ ethBalance: number;
131
+ ethBalanceInUsd: number;
132
+ bnbBalance: number;
133
+ bnbBalanceInUsd: number;
134
+ ethBalancePending: number;
135
+ ethBalancePendingInUsd: number;
136
+ bnbBalancePending: number;
137
+ bnbBalancePendingInUsd: number;
138
+ balanceInUsd: number;
139
+ balancePendingInUsd: number;
140
+ }
141
+ export interface SaltBalanceInfo {
142
+ salt: string;
143
+ paddedSalt: string;
144
+ wallet: string;
145
+ isCreated: boolean;
146
+ balance: BigInt;
147
+ blockNumber: number | string;
148
+ }
149
+ export interface SaltBalanceConfirmation extends SaltBalanceInfo {
150
+ depositedAmount: BigInt;
151
+ depositedAmountInCoin: number;
152
+ remainingConfirmations: number;
153
+ requiredConfirmations: number;
154
+ coin: string;
155
+ depositedAmountInUsd: number;
156
+ }
157
+ export interface BalanceInfo {
158
+ hasError: boolean;
159
+ confirmedDepositsBalance: BigInt;
160
+ confirmedDepositsBalanceInCoin: number;
161
+ unconfirmedDepositsBalance: BigInt;
162
+ unconfirmedDepositsBalanceInCoin: number;
163
+ unconfirmedDeposits: SaltBalanceConfirmation[];
164
+ latestDeposit: SaltBalanceConfirmation | null | undefined;
165
+ salt: string | null | undefined;
166
+ paddedSalt: string | null | undefined;
167
+ wallet: string | null | undefined;
168
+ walletCreated: boolean;
169
+ confirmedDepositsBalanceInUsd: number;
170
+ unconfirmedDepositsBalanceInUsd: number;
171
+ }
172
+ export interface AllCoinsBalanceInfo {
173
+ hasErrorBnbTest: boolean;
174
+ confirmedDepositsBalanceBnbTest: BigInt;
175
+ confirmedDepositsBalanceInCoinBnbTest: number;
176
+ unconfirmedDepositsBalanceBnbTest: BigInt;
177
+ unconfirmedDepositsBalanceInCoinBnbTest: number;
178
+ unconfirmedDepositsBnbTest: SaltBalanceConfirmation[];
179
+ latestDepositBnbTest: SaltBalanceConfirmation | null | undefined;
180
+ saltBnbTest: string | null | undefined;
181
+ paddedSaltBnbTest: string | null | undefined;
182
+ walletBnbTest: string | null | undefined;
183
+ walletCreatedBnbTest: boolean;
184
+ confirmedDepositsBalanceInUsdBnbTest: number;
185
+ unconfirmedDepositsBalanceInUsdBnbTest: number;
186
+ hasErrorBnb: boolean;
187
+ confirmedDepositsBalanceBnb: BigInt;
188
+ confirmedDepositsBalanceInCoinBnb: number;
189
+ unconfirmedDepositsBalanceBnb: BigInt;
190
+ unconfirmedDepositsBalanceInCoinBnb: number;
191
+ unconfirmedDepositsBnb: SaltBalanceConfirmation[];
192
+ latestDepositBnb: SaltBalanceConfirmation | null | undefined;
193
+ saltBnb: string | null | undefined;
194
+ paddedSaltBnb: string | null | undefined;
195
+ walletBnb: string | null | undefined;
196
+ walletCreatedBnb: boolean;
197
+ confirmedDepositsBalanceInUsdBnb: number;
198
+ unconfirmedDepositsBalanceInUsdBnb: number;
199
+ hasErrorEth: boolean;
200
+ confirmedDepositsBalanceEth: BigInt;
201
+ confirmedDepositsBalanceInCoinEth: number;
202
+ unconfirmedDepositsBalanceEth: BigInt;
203
+ unconfirmedDepositsBalanceInCoinEth: number;
204
+ unconfirmedDepositsEth: SaltBalanceConfirmation[];
205
+ latestDepositEth: SaltBalanceConfirmation | null | undefined;
206
+ saltEth: string | null | undefined;
207
+ paddedSaltEth: string | null | undefined;
208
+ walletEth: string | null | undefined;
209
+ walletCreatedEth: boolean;
210
+ confirmedDepositsBalanceInUsdEth: number;
211
+ unconfirmedDepositsBalanceInUsdEth: number;
212
+ balanceInUsd: number;
213
+ balancePendingInUsd: number;
214
+ }
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import { ResponsiveValue } from "@chakra-ui/react";
3
- interface AppButtonProps {
4
- as?: any;
5
- children?: any;
6
- variant?: ResponsiveValue<any>;
7
- bgColor?: ResponsiveValue<any>;
8
- outlineColor?: ResponsiveValue<any>;
9
- leftIcon?: ResponsiveValue<any>;
10
- rightIcon?: ResponsiveValue<any>;
11
- loading?: boolean;
12
- disabled?: boolean;
13
- onClick?: (e: any) => void;
14
- [x: string]: any;
15
- }
16
- declare const AppButton: React.FC<AppButtonProps>;
17
- export default AppButton;
1
+ import React from 'react';
2
+ import { ResponsiveValue } from "@chakra-ui/react";
3
+ interface AppButtonProps {
4
+ as?: any;
5
+ children?: any;
6
+ variant?: ResponsiveValue<any>;
7
+ bgColor?: ResponsiveValue<any>;
8
+ outlineColor?: ResponsiveValue<any>;
9
+ leftIcon?: ResponsiveValue<any>;
10
+ rightIcon?: ResponsiveValue<any>;
11
+ loading?: boolean;
12
+ disabled?: boolean;
13
+ onClick?: (e: any) => void;
14
+ [x: string]: any;
15
+ }
16
+ declare const AppButton: React.FC<AppButtonProps>;
17
+ export default AppButton;