use-frontbacked 5.0.1
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 +1 -0
- package/dist/cjs/index.js +8066 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/node_modules/web3-types/src/eth_types.d.ts +440 -0
- package/dist/cjs/types/node_modules/web3-types/src/primitives_types.d.ts +4 -0
- package/dist/cjs/types/src/components/CreditTransfer/index.d.ts +12 -0
- package/dist/cjs/types/src/components/DownloadType/index.d.ts +12 -0
- package/dist/cjs/types/src/components/Firebase/AccessTokenDoor.d.ts +12 -0
- package/dist/cjs/types/src/components/Firebase/AuthView.d.ts +15 -0
- package/dist/cjs/types/src/components/Firebase/SignInView.d.ts +11 -0
- package/dist/cjs/types/src/components/Firebase/SignUpView.d.ts +10 -0
- package/dist/cjs/types/src/components/Firebase/data.type.d.ts +23 -0
- package/dist/cjs/types/src/components/Firebase/index.d.ts +14 -0
- package/dist/cjs/types/src/components/PayFlow/AmountEditor.d.ts +9 -0
- package/dist/cjs/types/src/components/PayFlow/CryptoDeposit/index.d.ts +16 -0
- package/dist/cjs/types/src/components/PayFlow/FiatDeposit/index.d.ts +22 -0
- package/dist/cjs/types/src/components/PayFlow/PaymentDetected.d.ts +7 -0
- package/dist/cjs/types/src/components/PayFlow/StatusCoin.d.ts +6 -0
- package/dist/cjs/types/src/components/PayFlow/WalletFactory.d.ts +21 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useCoinListener.d.ts +18 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/usePriceData.d.ts +3 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useReferralId.d.ts +5 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useSdkConfig.d.ts +10 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useServerBalanceUpdate.d.ts +4 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useTools/index.d.ts +14 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useTools/types.d.ts +62 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useTools/utils.d.ts +23 -0
- package/dist/cjs/types/src/components/PayFlow/hooks/useWalletListener.d.ts +4 -0
- package/dist/cjs/types/src/components/PayFlow/index.d.ts +19 -0
- package/dist/cjs/types/src/components/PayFlow/types.d.ts +214 -0
- package/dist/cjs/types/src/components/PaymentRequest/index.d.ts +12 -0
- package/dist/cjs/types/src/components/SdkProvider/index.d.ts +55 -0
- package/dist/cjs/types/src/components/WalletTracker/index.d.ts +19 -0
- package/dist/cjs/types/src/components/index.d.ts +2 -0
- package/dist/cjs/types/src/components/widgets/AppButton.d.ts +17 -0
- package/dist/cjs/types/src/components/widgets/CopyView.d.ts +24 -0
- package/dist/cjs/types/src/components/widgets/DrawerPop/index.d.ts +25 -0
- package/dist/cjs/types/src/components/widgets/InfoLabel.d.ts +11 -0
- package/dist/cjs/types/src/components/widgets/InputBox/index.d.ts +94 -0
- package/dist/cjs/types/src/components/widgets/InputBox/utils.d.ts +1 -0
- package/dist/cjs/types/src/components/widgets/Link.d.ts +9 -0
- package/dist/cjs/types/src/components/widgets/Loading.d.ts +27 -0
- package/dist/cjs/types/src/components/widgets/ModalPop/index.d.ts +26 -0
- package/dist/cjs/types/src/components/widgets/PleaseWaitForX.d.ts +3 -0
- package/dist/cjs/types/src/index.d.ts +1 -0
- package/dist/cjs/types/src/theme.d.ts +3 -0
- package/dist/cjs/types/src/theme.type.d.ts +19 -0
- package/dist/cjs/types/src/utils/CustomError.d.ts +5 -0
- package/dist/cjs/types/src/utils/base64Images.d.ts +4 -0
- package/dist/cjs/types/src/utils/c.d.ts +38 -0
- package/dist/cjs/types/src/utils/f.d.ts +27 -0
- package/dist/cjs/types/src/utils/storeframer.d.ts +7 -0
- package/dist/components/CreditTransfer/index.d.ts +12 -0
- package/dist/components/DownloadType/index.d.ts +12 -0
- package/dist/components/Firebase/AccessTokenDoor.d.ts +12 -0
- package/dist/components/Firebase/AuthView.d.ts +15 -0
- package/dist/components/Firebase/SignInView.d.ts +11 -0
- package/dist/components/Firebase/SignUpView.d.ts +10 -0
- package/dist/components/Firebase/data.type.d.ts +23 -0
- package/dist/components/Firebase/index.d.ts +14 -0
- package/dist/components/PayFlow/AmountEditor.d.ts +9 -0
- package/dist/components/PayFlow/CryptoDeposit/index.d.ts +16 -0
- package/dist/components/PayFlow/FiatDeposit/index.d.ts +22 -0
- package/dist/components/PayFlow/PaymentDetected.d.ts +7 -0
- package/dist/components/PayFlow/StatusCoin.d.ts +6 -0
- package/dist/components/PayFlow/WalletFactory.d.ts +21 -0
- package/dist/components/PayFlow/hooks/useCoinListener.d.ts +18 -0
- package/dist/components/PayFlow/hooks/usePriceData.d.ts +3 -0
- package/dist/components/PayFlow/hooks/useReferralId.d.ts +5 -0
- package/dist/components/PayFlow/hooks/useSdkConfig.d.ts +10 -0
- package/dist/components/PayFlow/hooks/useServerBalanceUpdate.d.ts +4 -0
- package/dist/components/PayFlow/hooks/useTools/index.d.ts +14 -0
- package/dist/components/PayFlow/hooks/useTools/types.d.ts +62 -0
- package/dist/components/PayFlow/hooks/useTools/utils.d.ts +23 -0
- package/dist/components/PayFlow/hooks/useWalletListener.d.ts +4 -0
- package/dist/components/PayFlow/index.d.ts +19 -0
- package/dist/components/PayFlow/types.d.ts +214 -0
- package/dist/components/PaymentRequest/index.d.ts +12 -0
- package/dist/components/SdkProvider/index.d.ts +55 -0
- package/dist/components/WalletTracker/index.d.ts +19 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/widgets/AppButton.d.ts +17 -0
- package/dist/components/widgets/CopyView.d.ts +24 -0
- package/dist/components/widgets/DrawerPop/index.d.ts +25 -0
- package/dist/components/widgets/InfoLabel.d.ts +11 -0
- package/dist/components/widgets/InputBox/index.d.ts +94 -0
- package/dist/components/widgets/InputBox/utils.d.ts +1 -0
- package/dist/components/widgets/Link.d.ts +9 -0
- package/dist/components/widgets/Loading.d.ts +27 -0
- package/dist/components/widgets/ModalPop/index.d.ts +26 -0
- package/dist/components/widgets/PleaseWaitForX.d.ts +3 -0
- package/dist/esm/index.es.js +8049 -0
- package/dist/esm/index.es.js.map +1 -0
- package/dist/esm/types/node_modules/web3-types/src/eth_types.d.ts +440 -0
- package/dist/esm/types/node_modules/web3-types/src/primitives_types.d.ts +4 -0
- package/dist/esm/types/src/components/CreditTransfer/index.d.ts +12 -0
- package/dist/esm/types/src/components/DownloadType/index.d.ts +12 -0
- package/dist/esm/types/src/components/Firebase/AccessTokenDoor.d.ts +12 -0
- package/dist/esm/types/src/components/Firebase/AuthView.d.ts +15 -0
- package/dist/esm/types/src/components/Firebase/SignInView.d.ts +11 -0
- package/dist/esm/types/src/components/Firebase/SignUpView.d.ts +10 -0
- package/dist/esm/types/src/components/Firebase/data.type.d.ts +23 -0
- package/dist/esm/types/src/components/Firebase/index.d.ts +14 -0
- package/dist/esm/types/src/components/PayFlow/AmountEditor.d.ts +9 -0
- package/dist/esm/types/src/components/PayFlow/CryptoDeposit/index.d.ts +16 -0
- package/dist/esm/types/src/components/PayFlow/FiatDeposit/index.d.ts +22 -0
- package/dist/esm/types/src/components/PayFlow/PaymentDetected.d.ts +7 -0
- package/dist/esm/types/src/components/PayFlow/StatusCoin.d.ts +6 -0
- package/dist/esm/types/src/components/PayFlow/WalletFactory.d.ts +21 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useCoinListener.d.ts +18 -0
- package/dist/esm/types/src/components/PayFlow/hooks/usePriceData.d.ts +3 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useReferralId.d.ts +5 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useSdkConfig.d.ts +10 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useServerBalanceUpdate.d.ts +4 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useTools/index.d.ts +14 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useTools/types.d.ts +62 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useTools/utils.d.ts +23 -0
- package/dist/esm/types/src/components/PayFlow/hooks/useWalletListener.d.ts +4 -0
- package/dist/esm/types/src/components/PayFlow/index.d.ts +19 -0
- package/dist/esm/types/src/components/PayFlow/types.d.ts +214 -0
- package/dist/esm/types/src/components/PaymentRequest/index.d.ts +12 -0
- package/dist/esm/types/src/components/SdkProvider/index.d.ts +55 -0
- package/dist/esm/types/src/components/WalletTracker/index.d.ts +19 -0
- package/dist/esm/types/src/components/index.d.ts +2 -0
- package/dist/esm/types/src/components/widgets/AppButton.d.ts +17 -0
- package/dist/esm/types/src/components/widgets/CopyView.d.ts +24 -0
- package/dist/esm/types/src/components/widgets/DrawerPop/index.d.ts +25 -0
- package/dist/esm/types/src/components/widgets/InfoLabel.d.ts +11 -0
- package/dist/esm/types/src/components/widgets/InputBox/index.d.ts +94 -0
- package/dist/esm/types/src/components/widgets/InputBox/utils.d.ts +1 -0
- package/dist/esm/types/src/components/widgets/Link.d.ts +9 -0
- package/dist/esm/types/src/components/widgets/Loading.d.ts +27 -0
- package/dist/esm/types/src/components/widgets/ModalPop/index.d.ts +26 -0
- package/dist/esm/types/src/components/widgets/PleaseWaitForX.d.ts +3 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/esm/types/src/theme.d.ts +3 -0
- package/dist/esm/types/src/theme.type.d.ts +19 -0
- package/dist/esm/types/src/utils/CustomError.d.ts +5 -0
- package/dist/esm/types/src/utils/base64Images.d.ts +4 -0
- package/dist/esm/types/src/utils/c.d.ts +38 -0
- package/dist/esm/types/src/utils/f.d.ts +27 -0
- package/dist/esm/types/src/utils/storeframer.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/theme.d.ts +3 -0
- package/dist/theme.type.d.ts +19 -0
- package/dist/utils/CustomError.d.ts +5 -0
- package/dist/utils/base64Images.d.ts +4 -0
- package/dist/utils/c.d.ts +38 -0
- package/dist/utils/f.d.ts +27 -0
- package/dist/utils/storeframer.d.ts +7 -0
- package/package.json +85 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import { Bytes, HexString, Numbers } from './primitives_types.js';
|
|
2
|
+
export type ValueTypes = 'address' | 'bool' | 'string' | 'int256' | 'uint256' | 'bytes' | 'bigint';
|
|
3
|
+
export type HexString32Bytes = HexString;
|
|
4
|
+
export type HexString16Bytes = HexString;
|
|
5
|
+
export type HexString8Bytes = HexString;
|
|
6
|
+
export type HexStringSingleByte = HexString;
|
|
7
|
+
export type HexStringBytes = HexString;
|
|
8
|
+
export type HexString256Bytes = HexString;
|
|
9
|
+
export type Uint = HexString;
|
|
10
|
+
export type Uint256 = HexString;
|
|
11
|
+
export type Address = HexString;
|
|
12
|
+
export type Topic = HexString32Bytes;
|
|
13
|
+
export type TransactionHash = HexString;
|
|
14
|
+
export type Uncles = HexString32Bytes[];
|
|
15
|
+
export declare enum BlockTags {
|
|
16
|
+
EARLIEST = "earliest",
|
|
17
|
+
LATEST = "latest",
|
|
18
|
+
PENDING = "pending",
|
|
19
|
+
SAFE = "safe",
|
|
20
|
+
FINALIZED = "finalized"
|
|
21
|
+
}
|
|
22
|
+
export type BlockTag = `${BlockTags}`;
|
|
23
|
+
export type BlockNumberOrTag = Numbers | BlockTag;
|
|
24
|
+
export interface Proof {
|
|
25
|
+
readonly address: HexString;
|
|
26
|
+
readonly nonce: string;
|
|
27
|
+
readonly balance: string;
|
|
28
|
+
}
|
|
29
|
+
export interface TransactionInput {
|
|
30
|
+
readonly [key: string]: unknown;
|
|
31
|
+
readonly to?: HexString;
|
|
32
|
+
readonly from?: HexString;
|
|
33
|
+
readonly data?: string;
|
|
34
|
+
readonly input?: string;
|
|
35
|
+
readonly gas: HexString;
|
|
36
|
+
readonly gasLimit?: string;
|
|
37
|
+
readonly gasPrice?: string;
|
|
38
|
+
readonly maxPriorityFeePerGas?: string;
|
|
39
|
+
readonly maxFeePerGas?: string;
|
|
40
|
+
readonly nonce: string;
|
|
41
|
+
readonly value: string;
|
|
42
|
+
readonly blockNumber?: HexString;
|
|
43
|
+
readonly transactionIndex?: HexString;
|
|
44
|
+
readonly type?: HexString;
|
|
45
|
+
readonly chainId?: HexString;
|
|
46
|
+
}
|
|
47
|
+
export type TransactionOutput = {
|
|
48
|
+
readonly [key: string]: unknown;
|
|
49
|
+
readonly to?: HexString;
|
|
50
|
+
readonly from?: HexString;
|
|
51
|
+
readonly input: string;
|
|
52
|
+
readonly gas?: Numbers;
|
|
53
|
+
readonly gasLimit?: string;
|
|
54
|
+
readonly nonce: Numbers;
|
|
55
|
+
readonly value: Numbers;
|
|
56
|
+
readonly blockNumber?: Numbers;
|
|
57
|
+
readonly transactionIndex?: Numbers;
|
|
58
|
+
} & ({
|
|
59
|
+
maxPriorityFeePerGas: Numbers;
|
|
60
|
+
maxFeePerGas: Numbers;
|
|
61
|
+
gasPrice?: never;
|
|
62
|
+
} | {
|
|
63
|
+
maxPriorityFeePerGas?: never;
|
|
64
|
+
maxFeePerGas?: never;
|
|
65
|
+
gasPrice: Numbers;
|
|
66
|
+
});
|
|
67
|
+
export interface LogsInput {
|
|
68
|
+
readonly blockHash?: HexString;
|
|
69
|
+
readonly transactionHash?: HexString;
|
|
70
|
+
readonly logIndex?: HexString;
|
|
71
|
+
readonly id?: string;
|
|
72
|
+
readonly blockNumber?: HexString;
|
|
73
|
+
readonly transactionIndex?: HexString;
|
|
74
|
+
readonly address: HexString;
|
|
75
|
+
readonly topics: HexString[];
|
|
76
|
+
readonly data: HexString;
|
|
77
|
+
}
|
|
78
|
+
export interface LogsOutput {
|
|
79
|
+
readonly id?: string;
|
|
80
|
+
readonly removed: boolean;
|
|
81
|
+
readonly logIndex?: Numbers;
|
|
82
|
+
readonly transactionIndex?: Numbers;
|
|
83
|
+
readonly transactionHash?: HexString32Bytes;
|
|
84
|
+
readonly blockHash?: HexString32Bytes;
|
|
85
|
+
readonly blockNumber?: Numbers;
|
|
86
|
+
readonly address: string;
|
|
87
|
+
readonly topics: HexString[];
|
|
88
|
+
readonly data: HexString;
|
|
89
|
+
}
|
|
90
|
+
export interface BlockInput {
|
|
91
|
+
readonly gasLimit: HexString;
|
|
92
|
+
readonly gasUsed: HexString;
|
|
93
|
+
readonly size: HexString;
|
|
94
|
+
readonly timestamp: HexString;
|
|
95
|
+
readonly number?: HexString;
|
|
96
|
+
readonly difficulty?: HexString;
|
|
97
|
+
readonly totalDifficulty?: HexString;
|
|
98
|
+
readonly transactions?: TransactionInput[];
|
|
99
|
+
readonly miner?: HexString;
|
|
100
|
+
readonly baseFeePerGas?: HexString;
|
|
101
|
+
}
|
|
102
|
+
export interface BlockOutput {
|
|
103
|
+
readonly gasLimit: bigint | number;
|
|
104
|
+
readonly gasUsed: bigint | number;
|
|
105
|
+
readonly size: bigint | number;
|
|
106
|
+
readonly timestamp: bigint | number;
|
|
107
|
+
readonly number?: bigint | number;
|
|
108
|
+
readonly difficulty?: bigint | number;
|
|
109
|
+
readonly totalDifficulty?: bigint | number;
|
|
110
|
+
readonly transactions?: TransactionOutput[];
|
|
111
|
+
readonly miner?: HexString;
|
|
112
|
+
readonly baseFeePerGas?: bigint | number;
|
|
113
|
+
readonly parentHash?: HexString32Bytes;
|
|
114
|
+
}
|
|
115
|
+
export interface Withdrawals {
|
|
116
|
+
readonly index: Numbers;
|
|
117
|
+
readonly validatorIndex: Numbers;
|
|
118
|
+
readonly address: Address;
|
|
119
|
+
readonly amount: Numbers;
|
|
120
|
+
}
|
|
121
|
+
export interface BlockHeaderOutput {
|
|
122
|
+
readonly hash?: HexString32Bytes;
|
|
123
|
+
readonly parentHash?: HexString32Bytes;
|
|
124
|
+
readonly receiptsRoot?: HexString32Bytes;
|
|
125
|
+
readonly miner?: HexString;
|
|
126
|
+
readonly stateRoot?: HexString32Bytes;
|
|
127
|
+
readonly transactionsRoot?: HexString32Bytes;
|
|
128
|
+
readonly withdrawalsRoot?: HexString32Bytes;
|
|
129
|
+
readonly logsBloom?: Bytes;
|
|
130
|
+
readonly difficulty?: Numbers;
|
|
131
|
+
readonly number?: Numbers;
|
|
132
|
+
readonly gasLimit: Numbers;
|
|
133
|
+
readonly gasUsed: Numbers;
|
|
134
|
+
readonly timestamp: Numbers;
|
|
135
|
+
readonly extraData?: Bytes;
|
|
136
|
+
readonly nonce?: Numbers;
|
|
137
|
+
readonly sha3Uncles: HexString32Bytes[];
|
|
138
|
+
readonly baseFeePerGas?: Numbers;
|
|
139
|
+
readonly author?: Address;
|
|
140
|
+
readonly totalDifficulty?: Numbers;
|
|
141
|
+
readonly size?: Numbers;
|
|
142
|
+
readonly excessDataGas?: Numbers;
|
|
143
|
+
readonly mixHash?: HexString32Bytes;
|
|
144
|
+
readonly transactions?: TransactionOutput[];
|
|
145
|
+
readonly uncles?: Uncles;
|
|
146
|
+
readonly withdrawals?: Withdrawals[];
|
|
147
|
+
}
|
|
148
|
+
export interface ReceiptInput {
|
|
149
|
+
readonly [x: string]: unknown;
|
|
150
|
+
readonly blockNumber?: HexString;
|
|
151
|
+
readonly transactionIndex?: HexString;
|
|
152
|
+
readonly cumulativeGasUsed: HexString;
|
|
153
|
+
readonly gasUsed: HexString;
|
|
154
|
+
readonly logs?: LogsInput[];
|
|
155
|
+
readonly contractAddress?: HexString;
|
|
156
|
+
readonly status?: string;
|
|
157
|
+
readonly effectiveGasPrice?: HexString;
|
|
158
|
+
}
|
|
159
|
+
export interface ReceiptOutput {
|
|
160
|
+
readonly blockNumber?: bigint | number;
|
|
161
|
+
readonly transactionIndex?: bigint | number;
|
|
162
|
+
readonly cumulativeGasUsed: bigint | number;
|
|
163
|
+
readonly gasUsed: bigint | number;
|
|
164
|
+
readonly logs?: LogsOutput[];
|
|
165
|
+
readonly contractAddress?: HexString;
|
|
166
|
+
readonly status: boolean;
|
|
167
|
+
readonly effectiveGasPrice?: bigint | number;
|
|
168
|
+
}
|
|
169
|
+
export interface PostInput {
|
|
170
|
+
readonly ttl?: HexString;
|
|
171
|
+
readonly workToProve?: HexString;
|
|
172
|
+
readonly priority?: HexString;
|
|
173
|
+
readonly expiry?: HexString;
|
|
174
|
+
readonly sent?: HexString;
|
|
175
|
+
readonly workProved?: HexString;
|
|
176
|
+
readonly topics?: HexString[];
|
|
177
|
+
}
|
|
178
|
+
export interface PostOutput {
|
|
179
|
+
readonly ttl?: bigint | number;
|
|
180
|
+
readonly workToProve?: bigint | number;
|
|
181
|
+
readonly priority?: bigint | number;
|
|
182
|
+
readonly expiry?: bigint | number;
|
|
183
|
+
readonly sent?: bigint | number;
|
|
184
|
+
readonly workProved?: bigint | number;
|
|
185
|
+
readonly topics?: string[];
|
|
186
|
+
}
|
|
187
|
+
export interface SyncInput {
|
|
188
|
+
readonly startingBlock: HexString;
|
|
189
|
+
readonly currentBlock: HexString;
|
|
190
|
+
readonly highestBlock: HexString;
|
|
191
|
+
readonly knownStates?: HexString;
|
|
192
|
+
readonly pulledStates?: HexString;
|
|
193
|
+
}
|
|
194
|
+
export interface SyncOutput {
|
|
195
|
+
readonly startingBlock: Numbers;
|
|
196
|
+
readonly currentBlock: Numbers;
|
|
197
|
+
readonly highestBlock: Numbers;
|
|
198
|
+
readonly knownStates?: Numbers;
|
|
199
|
+
readonly pulledStates?: Numbers;
|
|
200
|
+
}
|
|
201
|
+
export type Receipt = Record<string, unknown>;
|
|
202
|
+
type FilterOption = Record<string, Numbers | Numbers[] | boolean | boolean[]>;
|
|
203
|
+
export interface Filter {
|
|
204
|
+
readonly fromBlock?: BlockNumberOrTag;
|
|
205
|
+
readonly toBlock?: BlockNumberOrTag;
|
|
206
|
+
readonly address?: Address | Address[];
|
|
207
|
+
readonly blockHash?: Address;
|
|
208
|
+
readonly topics?: (null | Topic | Topic[])[];
|
|
209
|
+
readonly filter?: FilterOption;
|
|
210
|
+
}
|
|
211
|
+
export interface AccessListEntry {
|
|
212
|
+
readonly address?: Address;
|
|
213
|
+
readonly storageKeys?: HexString32Bytes[];
|
|
214
|
+
}
|
|
215
|
+
export type AccessList = AccessListEntry[];
|
|
216
|
+
export type AccessListResult = {
|
|
217
|
+
readonly accessList?: AccessList;
|
|
218
|
+
readonly gasUsed?: Numbers;
|
|
219
|
+
};
|
|
220
|
+
export type ValidChains = 'goerli' | 'kovan' | 'mainnet' | 'rinkeby' | 'ropsten' | 'sepolia';
|
|
221
|
+
export declare enum HardforksOrdered {
|
|
222
|
+
chainstart = "chainstart",
|
|
223
|
+
frontier = "frontier",
|
|
224
|
+
homestead = "homestead",
|
|
225
|
+
dao = "dao",
|
|
226
|
+
tangerineWhistle = "tangerineWhistle",
|
|
227
|
+
spuriousDragon = "spuriousDragon",
|
|
228
|
+
byzantium = "byzantium",
|
|
229
|
+
constantinople = "constantinople",
|
|
230
|
+
petersburg = "petersburg",
|
|
231
|
+
istanbul = "istanbul",
|
|
232
|
+
muirGlacier = "muirGlacier",
|
|
233
|
+
berlin = "berlin",
|
|
234
|
+
london = "london",
|
|
235
|
+
altair = "altair",
|
|
236
|
+
arrowGlacier = "arrowGlacier",
|
|
237
|
+
grayGlacier = "grayGlacier",
|
|
238
|
+
bellatrix = "bellatrix",
|
|
239
|
+
merge = "merge",
|
|
240
|
+
capella = "capella",
|
|
241
|
+
shanghai = "shanghai"
|
|
242
|
+
}
|
|
243
|
+
export type Hardfork = `${HardforksOrdered}`;
|
|
244
|
+
export interface LogBase<NumberType, ByteType> {
|
|
245
|
+
readonly removed?: boolean;
|
|
246
|
+
readonly logIndex?: NumberType;
|
|
247
|
+
readonly transactionIndex?: NumberType;
|
|
248
|
+
readonly transactionHash?: ByteType;
|
|
249
|
+
readonly blockHash?: ByteType;
|
|
250
|
+
readonly blockNumber?: NumberType;
|
|
251
|
+
readonly address?: Address;
|
|
252
|
+
readonly data?: ByteType;
|
|
253
|
+
readonly topics?: ByteType[];
|
|
254
|
+
readonly id?: string;
|
|
255
|
+
}
|
|
256
|
+
export interface Log extends LogBase<Numbers, Bytes> {
|
|
257
|
+
readonly id?: string;
|
|
258
|
+
}
|
|
259
|
+
export interface EventLog {
|
|
260
|
+
readonly event: string;
|
|
261
|
+
readonly id?: string;
|
|
262
|
+
readonly logIndex?: bigint | number | string;
|
|
263
|
+
readonly transactionIndex?: bigint | number | string;
|
|
264
|
+
readonly transactionHash?: HexString32Bytes;
|
|
265
|
+
readonly blockHash?: HexString32Bytes;
|
|
266
|
+
readonly blockNumber?: bigint | number | string;
|
|
267
|
+
readonly address: string;
|
|
268
|
+
readonly topics: HexString[];
|
|
269
|
+
readonly data: HexString;
|
|
270
|
+
readonly raw?: {
|
|
271
|
+
data: string;
|
|
272
|
+
topics: unknown[];
|
|
273
|
+
};
|
|
274
|
+
readonly returnValues: Record<string, unknown>;
|
|
275
|
+
readonly signature?: HexString;
|
|
276
|
+
}
|
|
277
|
+
export interface TransactionReceiptBase<numberType, hashByteType, logsBloomByteType, logsType> {
|
|
278
|
+
readonly transactionHash: hashByteType;
|
|
279
|
+
readonly transactionIndex: numberType;
|
|
280
|
+
readonly blockHash: hashByteType;
|
|
281
|
+
readonly blockNumber: numberType;
|
|
282
|
+
readonly from: Address;
|
|
283
|
+
readonly to: Address;
|
|
284
|
+
readonly cumulativeGasUsed: numberType;
|
|
285
|
+
readonly gasUsed: numberType;
|
|
286
|
+
readonly effectiveGasPrice?: numberType;
|
|
287
|
+
readonly contractAddress?: Address;
|
|
288
|
+
readonly logs: logsType[];
|
|
289
|
+
readonly logsBloom: logsBloomByteType;
|
|
290
|
+
readonly root: hashByteType;
|
|
291
|
+
readonly status: numberType;
|
|
292
|
+
readonly type?: numberType;
|
|
293
|
+
events?: {
|
|
294
|
+
[key: string]: EventLog;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
export type TransactionReceipt = TransactionReceiptBase<Numbers, Bytes, Bytes, Log>;
|
|
298
|
+
export interface CustomChain {
|
|
299
|
+
name?: string;
|
|
300
|
+
networkId: Numbers;
|
|
301
|
+
chainId: Numbers;
|
|
302
|
+
}
|
|
303
|
+
export interface Common {
|
|
304
|
+
customChain: CustomChain;
|
|
305
|
+
baseChain?: ValidChains;
|
|
306
|
+
hardfork?: Hardfork;
|
|
307
|
+
}
|
|
308
|
+
interface TransactionBase {
|
|
309
|
+
value?: Numbers;
|
|
310
|
+
accessList?: AccessList;
|
|
311
|
+
common?: Common;
|
|
312
|
+
gas?: Numbers;
|
|
313
|
+
gasPrice?: Numbers;
|
|
314
|
+
type?: Numbers;
|
|
315
|
+
maxFeePerGas?: Numbers;
|
|
316
|
+
maxPriorityFeePerGas?: Numbers;
|
|
317
|
+
data?: Bytes;
|
|
318
|
+
input?: Bytes;
|
|
319
|
+
nonce?: Numbers;
|
|
320
|
+
chain?: ValidChains;
|
|
321
|
+
hardfork?: Hardfork;
|
|
322
|
+
chainId?: Numbers;
|
|
323
|
+
networkId?: Numbers;
|
|
324
|
+
gasLimit?: Numbers;
|
|
325
|
+
yParity?: Uint;
|
|
326
|
+
v?: Numbers;
|
|
327
|
+
r?: Bytes;
|
|
328
|
+
s?: Bytes;
|
|
329
|
+
}
|
|
330
|
+
export interface Transaction extends TransactionBase {
|
|
331
|
+
from?: Address;
|
|
332
|
+
to?: Address | null;
|
|
333
|
+
}
|
|
334
|
+
export interface TransactionForAccessList extends Transaction {
|
|
335
|
+
from: Address;
|
|
336
|
+
}
|
|
337
|
+
export interface TransactionCall extends Transaction {
|
|
338
|
+
to: Address;
|
|
339
|
+
}
|
|
340
|
+
export interface TransactionWithFromLocalWalletIndex extends Omit<Transaction, 'from'> {
|
|
341
|
+
from: Numbers;
|
|
342
|
+
}
|
|
343
|
+
export interface TransactionWithToLocalWalletIndex extends Omit<Transaction, 'to'> {
|
|
344
|
+
to: Numbers;
|
|
345
|
+
}
|
|
346
|
+
export interface TransactionWithFromAndToLocalWalletIndex extends Omit<Transaction, 'from' | 'to'> {
|
|
347
|
+
from: Numbers;
|
|
348
|
+
to: Numbers;
|
|
349
|
+
}
|
|
350
|
+
export interface TransactionInfo extends Transaction {
|
|
351
|
+
readonly blockHash?: Bytes;
|
|
352
|
+
readonly blockNumber?: Numbers;
|
|
353
|
+
readonly from: Address;
|
|
354
|
+
readonly hash: Bytes;
|
|
355
|
+
readonly transactionIndex?: Numbers;
|
|
356
|
+
}
|
|
357
|
+
export interface PopulatedUnsignedBaseTransaction {
|
|
358
|
+
from: Address;
|
|
359
|
+
to?: Address;
|
|
360
|
+
value: Numbers;
|
|
361
|
+
gas?: Numbers;
|
|
362
|
+
gasPrice: Numbers;
|
|
363
|
+
type: Numbers;
|
|
364
|
+
input?: Bytes;
|
|
365
|
+
data?: Bytes;
|
|
366
|
+
nonce: Numbers;
|
|
367
|
+
networkId: Numbers;
|
|
368
|
+
chain: ValidChains;
|
|
369
|
+
hardfork: Hardfork;
|
|
370
|
+
chainId: Numbers;
|
|
371
|
+
common: Common;
|
|
372
|
+
gasLimit: Numbers;
|
|
373
|
+
}
|
|
374
|
+
export interface PopulatedUnsignedEip2930Transaction extends PopulatedUnsignedBaseTransaction {
|
|
375
|
+
accessList: AccessList;
|
|
376
|
+
}
|
|
377
|
+
export interface PopulatedUnsignedEip1559Transaction extends PopulatedUnsignedEip2930Transaction {
|
|
378
|
+
gasPrice: never;
|
|
379
|
+
maxFeePerGas: Numbers;
|
|
380
|
+
maxPriorityFeePerGas: Numbers;
|
|
381
|
+
}
|
|
382
|
+
export type PopulatedUnsignedTransaction = PopulatedUnsignedBaseTransaction | PopulatedUnsignedEip2930Transaction | PopulatedUnsignedEip1559Transaction;
|
|
383
|
+
export interface BlockBase<ByteType, HexStringType, NumberType, extraDataType, TransactionTypes, logsBloomType> {
|
|
384
|
+
readonly parentHash: ByteType;
|
|
385
|
+
readonly sha3Uncles: ByteType;
|
|
386
|
+
readonly miner: HexStringType;
|
|
387
|
+
readonly stateRoot: ByteType;
|
|
388
|
+
readonly transactionsRoot: ByteType;
|
|
389
|
+
readonly receiptsRoot: ByteType;
|
|
390
|
+
readonly logsBloom?: logsBloomType;
|
|
391
|
+
readonly difficulty?: NumberType;
|
|
392
|
+
readonly number: NumberType;
|
|
393
|
+
readonly gasLimit: NumberType;
|
|
394
|
+
readonly gasUsed: NumberType;
|
|
395
|
+
readonly timestamp: NumberType;
|
|
396
|
+
readonly extraData: extraDataType;
|
|
397
|
+
readonly mixHash: ByteType;
|
|
398
|
+
readonly nonce: NumberType;
|
|
399
|
+
readonly totalDifficulty: NumberType;
|
|
400
|
+
readonly baseFeePerGas?: NumberType;
|
|
401
|
+
readonly size: NumberType;
|
|
402
|
+
readonly transactions: TransactionTypes;
|
|
403
|
+
readonly uncles: Uncles;
|
|
404
|
+
readonly hash?: ByteType;
|
|
405
|
+
}
|
|
406
|
+
export type Block = BlockBase<Bytes, Bytes, Numbers, Bytes, TransactionHash[] | TransactionInfo[], Bytes>;
|
|
407
|
+
export interface FeeHistoryBase<NumberType> {
|
|
408
|
+
readonly oldestBlock: NumberType;
|
|
409
|
+
readonly baseFeePerGas: NumberType;
|
|
410
|
+
readonly reward: NumberType[][];
|
|
411
|
+
readonly gasUsedRatio: NumberType[];
|
|
412
|
+
}
|
|
413
|
+
export type FeeHistory = FeeHistoryBase<Numbers>;
|
|
414
|
+
export interface StorageProof {
|
|
415
|
+
readonly key: Bytes;
|
|
416
|
+
readonly value: Numbers;
|
|
417
|
+
readonly proof: Bytes[];
|
|
418
|
+
}
|
|
419
|
+
export interface AccountObject {
|
|
420
|
+
readonly balance: Numbers;
|
|
421
|
+
readonly codeHash: Bytes;
|
|
422
|
+
readonly nonce: Numbers;
|
|
423
|
+
readonly storageHash: Bytes;
|
|
424
|
+
readonly accountProof: Bytes[];
|
|
425
|
+
readonly storageProof: StorageProof[];
|
|
426
|
+
}
|
|
427
|
+
export interface Eip712TypeDetails {
|
|
428
|
+
name: string;
|
|
429
|
+
type: string;
|
|
430
|
+
}
|
|
431
|
+
export interface Eip712TypedData {
|
|
432
|
+
readonly types: {
|
|
433
|
+
EIP712Domain: Eip712TypeDetails[];
|
|
434
|
+
[key: string]: Eip712TypeDetails[];
|
|
435
|
+
};
|
|
436
|
+
readonly primaryType: string;
|
|
437
|
+
readonly domain: Record<string, string | number>;
|
|
438
|
+
readonly message: Record<string, unknown>;
|
|
439
|
+
}
|
|
440
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { User } from "firebase/auth";
|
|
3
|
+
import { Config } from "../../theme.type";
|
|
4
|
+
interface CreditTransfer {
|
|
5
|
+
usdBalance: number;
|
|
6
|
+
config: Config;
|
|
7
|
+
transferCredit: (recipientEmail: string, amount: number, user?: User | null) => Promise<void>;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
isDarkMode?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const CreditTransfer: React.FC<CreditTransfer>;
|
|
12
|
+
export default CreditTransfer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DownloadTypeProps, DownloadTypeResult, Tool } from "../PayFlow/types";
|
|
3
|
+
import { Config } from "../../theme.type";
|
|
4
|
+
interface DownloadType extends DownloadTypeProps {
|
|
5
|
+
config: Config;
|
|
6
|
+
onSuccess: (result: DownloadTypeResult) => void;
|
|
7
|
+
onError: (error: Error) => void;
|
|
8
|
+
onGetTool: (id: string) => Tool | null;
|
|
9
|
+
isDarkMode?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const DownloadType: React.FC<DownloadType>;
|
|
12
|
+
export default DownloadType;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { User } from 'firebase/auth';
|
|
3
|
+
import { Config } from '../../theme.type';
|
|
4
|
+
interface AccessTokenDoor {
|
|
5
|
+
show: boolean;
|
|
6
|
+
onSuccess: (accessToken: string, User: User) => void;
|
|
7
|
+
onError: (error: any) => void;
|
|
8
|
+
config: Config;
|
|
9
|
+
isDarkMode?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const AccessTokenDoor: React.FC<any>;
|
|
12
|
+
export default AccessTokenDoor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { User } from 'firebase/auth';
|
|
3
|
+
import { Config } from '../../theme.type';
|
|
4
|
+
interface AuthView {
|
|
5
|
+
show: boolean;
|
|
6
|
+
setUser: (user: User) => void;
|
|
7
|
+
signInTitle: string;
|
|
8
|
+
signUpTitle: string;
|
|
9
|
+
onSuccess: (user: User) => void;
|
|
10
|
+
onError: (error: any) => void;
|
|
11
|
+
config: Config;
|
|
12
|
+
isDarkMode?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const AuthView: React.FC<any>;
|
|
15
|
+
export default AuthView;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { User } from "firebase/auth";
|
|
3
|
+
import { Config } from "../../theme.type";
|
|
4
|
+
export interface SignView {
|
|
5
|
+
setUser: (user: User) => void;
|
|
6
|
+
config: Config;
|
|
7
|
+
onAuthDone?: (user: User) => void;
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
}
|
|
10
|
+
declare const SignInView: React.FC<SignView>;
|
|
11
|
+
export default SignInView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { User } from "firebase/auth";
|
|
3
|
+
import { Config } from "../../theme.type";
|
|
4
|
+
interface SignUpView {
|
|
5
|
+
setUser: (user: User) => void;
|
|
6
|
+
config: Config;
|
|
7
|
+
onAuthDone?: (user: User) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const SignUpView: React.FC<SignUpView>;
|
|
10
|
+
export default SignUpView;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Auth as A, User as U } from "firebase/auth";
|
|
2
|
+
import { Firestore } from "firebase/firestore";
|
|
3
|
+
export interface AdminInfo {
|
|
4
|
+
uid: string;
|
|
5
|
+
permissions: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface User extends U {
|
|
8
|
+
metadata: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
};
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface Auth extends A {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface AuthResource {
|
|
17
|
+
uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
|
|
18
|
+
auth: Auth | null | undefined;
|
|
19
|
+
user?: User | null | undefined;
|
|
20
|
+
adminInfo?: AdminInfo | null;
|
|
21
|
+
authLoading?: boolean;
|
|
22
|
+
db?: Firestore | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Firestore } from "firebase/firestore";
|
|
3
|
+
import { AdminInfo, Auth, User } from './data.type';
|
|
4
|
+
import { Config } from '../../theme.type';
|
|
5
|
+
declare const useFirebase: (config: Config) => {
|
|
6
|
+
auth: Auth | null | undefined;
|
|
7
|
+
db: Firestore | null | undefined;
|
|
8
|
+
user: User | null | undefined;
|
|
9
|
+
setUser: import("react").Dispatch<import("react").SetStateAction<User | null | undefined>>;
|
|
10
|
+
adminInfo: AdminInfo | null | undefined;
|
|
11
|
+
authLoading: boolean;
|
|
12
|
+
uploadFile: (file: Blob | Uint8Array | ArrayBuffer, pathToFile: string) => Promise<string>;
|
|
13
|
+
};
|
|
14
|
+
export default useFirebase;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AllCoinsBalanceInfo } from '../types';
|
|
3
|
+
interface CryptoDeposit {
|
|
4
|
+
isDarkMode?: boolean;
|
|
5
|
+
amount: number;
|
|
6
|
+
coin: string;
|
|
7
|
+
setCoin: (coin: string) => void;
|
|
8
|
+
coinAmount: number;
|
|
9
|
+
coinSymbol: string;
|
|
10
|
+
wallet: string | null | undefined;
|
|
11
|
+
setWallet: (wallet: string | null | undefined) => void;
|
|
12
|
+
walletListenerResult: AllCoinsBalanceInfo;
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
}
|
|
15
|
+
declare const CryptoDeposit: React.FC<CryptoDeposit>;
|
|
16
|
+
export default CryptoDeposit;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Vendor } from '../types';
|
|
3
|
+
interface WhatsappDeposit {
|
|
4
|
+
contactLink?: string | null;
|
|
5
|
+
vendors?: Vendor[] | null;
|
|
6
|
+
coinAmount: number;
|
|
7
|
+
coinSymbol: string;
|
|
8
|
+
wallet: string | null | undefined;
|
|
9
|
+
usdAmount: number;
|
|
10
|
+
fiatSymbol: string;
|
|
11
|
+
fiatName: string;
|
|
12
|
+
fiatLogo: any;
|
|
13
|
+
minVendorCoinAmount: number;
|
|
14
|
+
minVendorUSDAmount: number;
|
|
15
|
+
isDarkMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const WhatsappDeposit: React.FC<WhatsappDeposit>;
|
|
18
|
+
interface FiatDeposit extends WhatsappDeposit {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}
|
|
21
|
+
declare const FiatDeposit: React.FC<FiatDeposit>;
|
|
22
|
+
export default FiatDeposit;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Web3 from "web3";
|
|
2
|
+
import { SaltBalanceInfo } from "./types";
|
|
3
|
+
declare class WalletFactory {
|
|
4
|
+
private address;
|
|
5
|
+
private abi;
|
|
6
|
+
private rpcList;
|
|
7
|
+
private secondsPerBlock;
|
|
8
|
+
web3?: Web3 | null;
|
|
9
|
+
private subscriptions;
|
|
10
|
+
private stop;
|
|
11
|
+
private lastRpcIndex;
|
|
12
|
+
constructor(address: string, abi: any, rpcList: string[], secondsPerBlock?: number);
|
|
13
|
+
startSubscriptions(): void;
|
|
14
|
+
stopSubscriptions(): void;
|
|
15
|
+
private getWeb3;
|
|
16
|
+
private getContract;
|
|
17
|
+
getSaltBalance(salt: string, blockNumber?: number): Promise<SaltBalanceInfo>;
|
|
18
|
+
startBlockListener(callBack: (blockNumber: any) => void, lastBlock: number): void;
|
|
19
|
+
getCurrentBlockNumber(): Promise<unknown>;
|
|
20
|
+
}
|
|
21
|
+
export default WalletFactory;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PriceData, SaltBalanceConfirmation } from '../types';
|
|
2
|
+
import { Config } from '../../../theme.type';
|
|
3
|
+
declare const useCoinListener: (coin: string, decimals: number, requiredConfirmations: number, priceData: PriceData, config: Config, disableBlockchainPoll?: boolean) => [
|
|
4
|
+
boolean,
|
|
5
|
+
BigInt,
|
|
6
|
+
number,
|
|
7
|
+
BigInt,
|
|
8
|
+
number,
|
|
9
|
+
SaltBalanceConfirmation[],
|
|
10
|
+
SaltBalanceConfirmation | null | undefined,
|
|
11
|
+
string | null | undefined,
|
|
12
|
+
string | null | undefined,
|
|
13
|
+
string | null | undefined,
|
|
14
|
+
boolean,
|
|
15
|
+
number,
|
|
16
|
+
number
|
|
17
|
+
];
|
|
18
|
+
export default useCoinListener;
|