@ercworldio/blockchain-shared 1.0.5-dev.8-PLAT300.7 → 1.0.5-dev.8-fix

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 (69) hide show
  1. package/build/chains/networks_dev.json +11 -2
  2. package/build/chains/networks_prod-ab120.json +644 -0
  3. package/build/chains/networks_prod-bu.json +0 -14
  4. package/build/chains/networks_prod-dz-v1.json +1 -1
  5. package/build/chains/networks_prod-dz.json +47 -26
  6. package/build/chains/networks_stg-ab120-mainnet.json +681 -0
  7. package/build/chains/networks_stg-ab120.json +597 -0
  8. package/build/chains/networks_stg-bu.json +25 -30
  9. package/build/chains/networks_stg-dz.json +20 -21
  10. package/build/chains/networks_stg-yb-v1.json +574 -0
  11. package/build/contracts/Escrow.d.ts +2 -0
  12. package/build/contracts/Escrow.d.ts.map +1 -1
  13. package/build/contracts/Escrow.js +63 -0
  14. package/build/contracts/artifacts/Escrow.json +87 -10
  15. package/build/contracts/contract-events/EscrowEvents.d.ts +14 -14
  16. package/build/contracts/contract-events/EscrowEvents.d.ts.map +1 -1
  17. package/build/contracts/contract-events/EscrowEvents.js +5 -5
  18. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts +31 -17
  19. package/build/contracts/typechain-types/contracts/escrow/Escrow.d.ts.map +1 -1
  20. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.d.ts +1 -1
  21. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowAccessControl__factory.js +1 -1
  22. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.d.ts +1 -1
  23. package/build/contracts/typechain-types/factories/contracts/escrow/EscrowSignature__factory.js +1 -1
  24. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts +67 -9
  25. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.d.ts.map +1 -1
  26. package/build/contracts/typechain-types/factories/contracts/escrow/Escrow__factory.js +88 -11
  27. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.d.ts +1 -1
  28. package/build/contracts/typechain-types/factories/contracts/lib/MultisigLib__factory.js +1 -1
  29. package/build/index.d.ts +1 -1
  30. package/build/index.d.ts.map +1 -1
  31. package/build/index.js +3 -3
  32. package/build/services/AccountingService.d.ts +2 -0
  33. package/build/services/AccountingService.d.ts.map +1 -1
  34. package/build/services/AccountingService.js +35 -6
  35. package/build/services/AlchemyService.d.ts.map +1 -1
  36. package/build/services/AlchemyService.js +2 -3
  37. package/build/services/AzureEventHubHandler.d.ts.map +1 -1
  38. package/build/services/AzureEventHubHandler.js +4 -1
  39. package/build/services/ClaimJobService.d.ts.map +1 -1
  40. package/build/services/ClaimJobService.js +12 -5
  41. package/build/services/Redis.js +2 -2
  42. package/build/services/RedisPubSub.js +1 -1
  43. package/build/services/WithdrawalManager.js +1 -1
  44. package/build/services/db/multisig/MultisigService.d.ts +1 -19
  45. package/build/services/db/multisig/MultisigService.d.ts.map +1 -1
  46. package/build/services/db/multisig/MultisigService.js +0 -63
  47. package/build/services/db/timelock/ScheduleTransactionService.d.ts +16 -2
  48. package/build/services/db/timelock/ScheduleTransactionService.d.ts.map +1 -1
  49. package/build/services/db/timelock/ScheduleTransactionService.js +265 -1
  50. package/build/services/solana/escrow/idl/escrow.json +1459 -4161
  51. package/build/services/solana/escrow/services/EscrowAdminUtility.d.ts.map +1 -1
  52. package/build/services/solana/escrow/services/EscrowAdminUtility.js +0 -1
  53. package/build/services/solana/escrow/services/TreasuryWithdrawalSignature.d.ts +1 -8
  54. package/build/services/solana/escrow/services/TreasuryWithdrawalSignature.d.ts.map +1 -1
  55. package/build/services/solana/escrow/services/TreasuryWithdrawalSignature.js +2 -9
  56. package/build/services/solana/escrow/types/escrow.d.ts +1457 -4159
  57. package/build/services/solana/escrow/types/escrow.d.ts.map +1 -1
  58. package/build/services/types/azure_event_hub_handler.d.ts +3 -1
  59. package/build/services/types/azure_event_hub_handler.d.ts.map +1 -1
  60. package/build/services/types/azure_event_hub_handler.js +3 -0
  61. package/build/services/types/claim.d.ts +1 -0
  62. package/build/services/types/claim.d.ts.map +1 -1
  63. package/build/services/types/db/multisig_service.d.ts +0 -74
  64. package/build/services/types/db/multisig_service.d.ts.map +1 -1
  65. package/build/services/types/db/timelock.d.ts +56 -0
  66. package/build/services/types/db/timelock.d.ts.map +1 -1
  67. package/build/utils/solana.d.ts.map +1 -1
  68. package/build/utils/solana.js +5 -3
  69. package/package.json +1 -1
@@ -0,0 +1,574 @@
1
+ {
2
+ "1": {
3
+ "status": true,
4
+ "isTestnet": false,
5
+ "name": "Ethereum",
6
+ "blockchainType": "evm",
7
+ "chainId": 1,
8
+ "blockexplorerUrl": "https://etherscan.io",
9
+ "rpcBaseUrl": "https://rpc.ankr.com/eth",
10
+ "rpcBaseUrlWss": "wss://rpc.ankr.com/eth/ws",
11
+ "targetConfirmations": 10,
12
+ "accounting": {
13
+ "funding_wallet": "0xA9bEA932CFf638324eDa1046AB4D84723C84987c",
14
+ "treasury_receiver": "0x28DE9CeCd83D9b20Ee6A438d39114Add08ED5FF7",
15
+ "overflow_treasury_receiver": "0x28DE9CeCd83D9b20Ee6A438d39114Add08ED5FF7",
16
+ "overflow_threshold_decimal": 100000,
17
+ "min_funding_wallet_balance_usd": 5,
18
+ "allowed_receivers": [
19
+ "0x28DE9CeCd83D9b20Ee6A438d39114Add08ED5FF7"
20
+ ]
21
+ },
22
+ "custodialAlchemyWebhooks": [],
23
+ "quicknodeNotificationConfig": [
24
+ {
25
+ "name": "escrow-eth-stg-yb",
26
+ "network": "ethereum-mainnet",
27
+ "template": "evmWalletFilter",
28
+ "source": "contract",
29
+ "chain_id": 1
30
+ },
31
+ {
32
+ "name": "qn-custodial-webhook-eth-stg-yb",
33
+ "network": "ethereum-mainnet",
34
+ "template": "evmWalletFilter"
35
+ }
36
+ ],
37
+ "contracts": [
38
+ {
39
+ "type": "Escrow",
40
+ "version": "1",
41
+ "startingBlock": 24754256,
42
+ "escrowAlchemyWebhooks": [],
43
+ "addresses": [
44
+ "0x28DE9CeCd83D9b20Ee6A438d39114Add08ED5FF7"
45
+ ]
46
+ },
47
+ {
48
+ "type": "FundingWallet",
49
+ "version": "1",
50
+ "startingBlock": 1,
51
+ "escrowAlchemyWebhooks": [],
52
+ "addresses": [
53
+ "0xA9bEA932CFf638324eDa1046AB4D84723C84987c"
54
+ ]
55
+ }
56
+ ],
57
+ "paymentTokens": [
58
+ {
59
+ "name": "Ethereum",
60
+ "symbol": "ETH",
61
+ "token_standard": "ERC-20",
62
+ "type": "native",
63
+ "isStableCoin": false,
64
+ "decimals": 18,
65
+ "address": "0x0000000000000000000000000000000000000000",
66
+ "sweepThreshold": 0.004,
67
+ "sweepWalletMinBalance": 0.0002,
68
+ "recommendedMinBalanceFundingWallet": 0.025,
69
+ "recommendedMinBalanceEscrow": 0.5,
70
+ "recommendedMinBalanceRentEnergy": 0
71
+ },
72
+ {
73
+ "name": "Tether Token",
74
+ "symbol": "USDT",
75
+ "token_standard": "ERC-20",
76
+ "type": "erc20",
77
+ "isStableCoin": true,
78
+ "decimals": 6,
79
+ "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
80
+ "sweepThreshold": 5,
81
+ "sweepWalletMinBalance": 1,
82
+ "recommendedMinBalanceFundingWallet": 0,
83
+ "recommendedMinBalanceEscrow": 100,
84
+ "recommendedMinBalanceRentEnergy": 0
85
+ },
86
+ {
87
+ "name": "Circle Token",
88
+ "symbol": "USDC",
89
+ "token_standard": "ERC-20",
90
+ "type": "erc20",
91
+ "isStableCoin": true,
92
+ "decimals": 6,
93
+ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
94
+ "sweepThreshold": 1,
95
+ "sweepWalletMinBalance": 0.1,
96
+ "recommendedMinBalanceFundingWallet": 0,
97
+ "recommendedMinBalanceEscrow": 100,
98
+ "recommendedMinBalanceRentEnergy": 0
99
+ }
100
+ ]
101
+ },
102
+ "56": {
103
+ "status": true,
104
+ "isTestnet": false,
105
+ "name": "BNB Chain",
106
+ "blockchainType": "evm",
107
+ "chainId": 56,
108
+ "blockexplorerUrl": "https://bscscan.com",
109
+ "rpcBaseUrl": "https://rpc.ankr.com/bsc",
110
+ "rpcBaseUrlWss": "wss://rpc.ankr.com/bsc/ws",
111
+ "targetConfirmations": 5,
112
+ "accounting": {
113
+ "funding_wallet": "0xA9bEA932CFf638324eDa1046AB4D84723C84987c",
114
+ "treasury_receiver": "0x6d47B7230F5D466677795E271db3aEE4C59c0B47",
115
+ "overflow_treasury_receiver": "0x6d47B7230F5D466677795E271db3aEE4C59c0B47",
116
+ "overflow_threshold_decimal": 100000,
117
+ "min_funding_wallet_balance_usd": 5,
118
+ "allowed_receivers": [
119
+ "0x6d47B7230F5D466677795E271db3aEE4C59c0B47"
120
+ ]
121
+ },
122
+ "custodialAlchemyWebhooks": [],
123
+ "quicknodeNotificationConfig": [
124
+ {
125
+ "name": "escrow-bnb-stg-yb",
126
+ "network": "bnbchain-mainnet",
127
+ "template": "evmWalletFilter",
128
+ "source": "contract",
129
+ "chain_id": 56
130
+ },
131
+ {
132
+ "name": "qn-custodial-webhook-bnb-stg-yb",
133
+ "network": "bnbchain-mainnet",
134
+ "template": "evmWalletFilter"
135
+ }
136
+ ],
137
+ "contracts": [
138
+ {
139
+ "type": "Escrow",
140
+ "version": "1",
141
+ "startingBlock": 89178576,
142
+ "escrowAlchemyWebhooks": [],
143
+ "addresses": [
144
+ "0x6d47B7230F5D466677795E271db3aEE4C59c0B47"
145
+ ]
146
+ },
147
+ {
148
+ "type": "FundingWallet",
149
+ "version": "1",
150
+ "startingBlock": 1,
151
+ "escrowAlchemyWebhooks": [],
152
+ "addresses": [
153
+ "0xA9bEA932CFf638324eDa1046AB4D84723C84987c"
154
+ ]
155
+ }
156
+ ],
157
+ "paymentTokens": [
158
+ {
159
+ "name": "BNB Chain",
160
+ "symbol": "BNB",
161
+ "token_standard": "BEP-20",
162
+ "type": "native",
163
+ "isStableCoin": false,
164
+ "decimals": 18,
165
+ "address": "0x0000000000000000000000000000000000000000",
166
+ "sweepThreshold": 0.008,
167
+ "sweepWalletMinBalance": 0.0002,
168
+ "recommendedMinBalanceFundingWallet": 0.1,
169
+ "recommendedMinBalanceEscrow": 1,
170
+ "recommendedMinBalanceRentEnergy": 0
171
+ },
172
+ {
173
+ "name": "Tether Token",
174
+ "symbol": "USDT",
175
+ "token_standard": "BEP-20",
176
+ "type": "erc20",
177
+ "isStableCoin": true,
178
+ "decimals": 18,
179
+ "address": "0x55d398326f99059fF775485246999027B3197955",
180
+ "sweepThreshold": 5,
181
+ "sweepWalletMinBalance": 1,
182
+ "recommendedMinBalanceFundingWallet": 0,
183
+ "recommendedMinBalanceEscrow": 100,
184
+ "recommendedMinBalanceRentEnergy": 0
185
+ }
186
+ ]
187
+ },
188
+ "101": {
189
+ "status": true,
190
+ "isTestnet": false,
191
+ "name": "Solana",
192
+ "blockchainType": "solana",
193
+ "chainId": 101,
194
+ "blockexplorerUrl": "https://solscan.io",
195
+ "rpcBaseUrl": "https://rpc.ankr.com/solana",
196
+ "rpcBaseUrlWss": "wss://rpc.ankr.com/solana/ws",
197
+ "targetConfirmations": 32,
198
+ "accounting": {
199
+ "funding_wallet": "AeuBUW7EHTD2Er5FrtZKbMHLwdHmMmMtHi6sFJvfHAKL",
200
+ "treasury_receiver": "Etsf9vBYTwrJP69AFmvgJifFJ5FnNAufBPujPxxg1Y3z",
201
+ "overflow_treasury_receiver": "Etsf9vBYTwrJP69AFmvgJifFJ5FnNAufBPujPxxg1Y3z",
202
+ "overflow_threshold_decimal": 100000,
203
+ "min_funding_wallet_balance_usd": 5,
204
+ "allowed_receivers": [
205
+ "Etsf9vBYTwrJP69AFmvgJifFJ5FnNAufBPujPxxg1Y3z",
206
+ "AeuBUW7EHTD2Er5FrtZKbMHLwdHmMmMtHi6sFJvfHAKL"
207
+ ]
208
+ },
209
+ "custodialAlchemyWebhooks": [
210
+ {
211
+ "chainId": "101",
212
+ "network_symbol": "sol",
213
+ "network": "SOLANA_MAINNET",
214
+ "total_wallet_count": 10,
215
+ "endpoint": "webhook/alchemy/address-activity-sol",
216
+ "source": "wallet"
217
+ }
218
+ ],
219
+ "quicknodeNotificationConfig": [
220
+ {
221
+ "name": "escrow-sol-stg-sh",
222
+ "network": "solana-mainnet",
223
+ "template": "solanaWalletFilter",
224
+ "source": "contract",
225
+ "chain_id": 101
226
+ },
227
+ {
228
+ "name": "qn-custodial-webhook-sol-stg-sh",
229
+ "network": "solana-mainnet",
230
+ "template": "solanaWalletFilter"
231
+ }
232
+ ],
233
+ "contracts": [
234
+ {
235
+ "type": "Escrow",
236
+ "version": "1",
237
+ "startingBlock": 416497745,
238
+ "escrowAlchemyWebhooks": [
239
+ {
240
+ "chainId": "101",
241
+ "network_symbol": "sol",
242
+ "network": "SOLANA_MAINNET",
243
+ "type": "ADDRESS_ACTIVITY",
244
+ "endpoint": "webhook/alchemy/solana/escrow-events",
245
+ "source": "contract"
246
+ }
247
+ ],
248
+ "addresses": [
249
+ "Etsf9vBYTwrJP69AFmvgJifFJ5FnNAufBPujPxxg1Y3z"
250
+ ]
251
+ },
252
+ {
253
+ "type": "FundingWallet",
254
+ "version": "1",
255
+ "startingBlock": 45852351,
256
+ "escrowAlchemyWebhooks": [],
257
+ "addresses": [
258
+ "AeuBUW7EHTD2Er5FrtZKbMHLwdHmMmMtHi6sFJvfHAKL"
259
+ ]
260
+ }
261
+ ],
262
+ "paymentTokens": [
263
+ {
264
+ "name": "Solana",
265
+ "symbol": "SOL",
266
+ "token_standard": "SOL",
267
+ "type": "native",
268
+ "isStableCoin": false,
269
+ "decimals": 9,
270
+ "address": "11111111111111111111111111111111",
271
+ "sweepThreshold": 0.05,
272
+ "sweepWalletMinBalance": 0.01,
273
+ "recommendedMinBalanceFundingWallet": 0.1,
274
+ "recommendedMinBalanceEscrow": 1,
275
+ "recommendedMinBalanceRentEnergy": 0
276
+ },
277
+ {
278
+ "name": "Circle Token",
279
+ "symbol": "USDC",
280
+ "token_standard": "SOL",
281
+ "type": "erc20",
282
+ "isStableCoin": true,
283
+ "decimals": 6,
284
+ "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
285
+ "sweepThreshold": 1,
286
+ "sweepWalletMinBalance": 1,
287
+ "recommendedMinBalanceFundingWallet": 0,
288
+ "recommendedMinBalanceEscrow": 100,
289
+ "recommendedMinBalanceRentEnergy": 0
290
+ }
291
+ ]
292
+ },
293
+ "137": {
294
+ "status": true,
295
+ "isTestnet": false,
296
+ "name": "Polygon",
297
+ "blockchainType": "evm",
298
+ "chainId": 137,
299
+ "blockexplorerUrl": "https://polygonscan.com",
300
+ "rpcBaseUrl": "https://rpc.ankr.com/polygon",
301
+ "rpcBaseUrlWss": "wss://rpc.ankr.com/polygon/ws",
302
+ "targetConfirmations": 10,
303
+ "accounting": {
304
+ "funding_wallet": "0xA9bEA932CFf638324eDa1046AB4D84723C84987c",
305
+ "treasury_receiver": "0x6d47B7230F5D466677795E271db3aEE4C59c0B47",
306
+ "overflow_treasury_receiver": "0x6d47B7230F5D466677795E271db3aEE4C59c0B47",
307
+ "overflow_threshold_decimal": 100000,
308
+ "min_funding_wallet_balance_usd": 5,
309
+ "allowed_receivers": [
310
+ "0x6d47B7230F5D466677795E271db3aEE4C59c0B47"
311
+ ]
312
+ },
313
+ "custodialAlchemyWebhooks": [],
314
+ "quicknodeNotificationConfig": [
315
+ {
316
+ "name": "escrow-pol-stg-yb",
317
+ "network": "polygon-mainnet",
318
+ "template": "evmWalletFilter",
319
+ "source": "contract",
320
+ "chain_id": 137
321
+ },
322
+ {
323
+ "name": "qn-custodial-webhook-pol-stg-yb",
324
+ "network": "polygon-mainnet",
325
+ "template": "evmWalletFilter"
326
+ }
327
+ ],
328
+ "contracts": [
329
+ {
330
+ "type": "Escrow",
331
+ "version": "1",
332
+ "startingBlock": 84779780,
333
+ "escrowAlchemyWebhooks": [],
334
+ "addresses": [
335
+ "0x6d47B7230F5D466677795E271db3aEE4C59c0B47"
336
+ ]
337
+ },
338
+ {
339
+ "type": "FundingWallet",
340
+ "version": "1",
341
+ "startingBlock": 1,
342
+ "escrowAlchemyWebhooks": [],
343
+ "addresses": [
344
+ "0xA9bEA932CFf638324eDa1046AB4D84723C84987c"
345
+ ]
346
+ }
347
+ ],
348
+ "paymentTokens": [
349
+ {
350
+ "name": "Polygon",
351
+ "symbol": "POL",
352
+ "token_standard": "POL",
353
+ "type": "native",
354
+ "isStableCoin": false,
355
+ "decimals": 18,
356
+ "address": "0x0000000000000000000000000000000000000000",
357
+ "sweepThreshold": 10,
358
+ "sweepWalletMinBalance": 0.1,
359
+ "recommendedMinBalanceFundingWallet": 50,
360
+ "recommendedMinBalanceEscrow": 1000,
361
+ "recommendedMinBalanceRentEnergy": 0
362
+ },
363
+ {
364
+ "name": "Tether Token",
365
+ "symbol": "USDT",
366
+ "token_standard": "POL",
367
+ "type": "erc20",
368
+ "isStableCoin": true,
369
+ "decimals": 6,
370
+ "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
371
+ "sweepThreshold": 0,
372
+ "sweepWalletMinBalance": 1,
373
+ "recommendedMinBalanceFundingWallet": 0,
374
+ "recommendedMinBalanceEscrow": 100,
375
+ "recommendedMinBalanceRentEnergy": 0
376
+ }
377
+ ]
378
+ },
379
+ "43114": {
380
+ "status": true,
381
+ "isTestnet": false,
382
+ "name": "Avalanche C-Chain",
383
+ "blockchainType": "evm",
384
+ "chainId": 43114,
385
+ "blockexplorerUrl": "https://snowtrace.io",
386
+ "rpcBaseUrl": "https://rpc.ankr.com/avalanche",
387
+ "rpcBaseUrlWss": "wss://rpc.ankr.com/avalanche/ws",
388
+ "targetConfirmations": 10,
389
+ "accounting": {
390
+ "funding_wallet": "0xA9bEA932CFf638324eDa1046AB4D84723C84987c",
391
+ "treasury_receiver": "0x51bDD157950FB7C8B56F7E3A09828E991c1BDB17",
392
+ "overflow_treasury_receiver": "0x51bDD157950FB7C8B56F7E3A09828E991c1BDB17",
393
+ "overflow_threshold_decimal": 100000,
394
+ "min_funding_wallet_balance_usd": 5,
395
+ "allowed_receivers": [
396
+ "0x51bDD157950FB7C8B56F7E3A09828E991c1BDB17"
397
+ ]
398
+ },
399
+ "custodialAlchemyWebhooks": [],
400
+ "quicknodeNotificationConfig": [
401
+ {
402
+ "name": "escrow-avax-stg-yb",
403
+ "network": "avalanche-mainnet",
404
+ "template": "evmWalletFilter",
405
+ "source": "contract",
406
+ "chain_id": 43114
407
+ },
408
+ {
409
+ "name": "qn-custodial-webhook-avax-stg-yb",
410
+ "network": "avalanche-mainnet",
411
+ "template": "evmWalletFilter"
412
+ }
413
+ ],
414
+ "contracts": [
415
+ {
416
+ "type": "Escrow",
417
+ "version": "1",
418
+ "startingBlock": 81474572,
419
+ "escrowAlchemyWebhooks": [],
420
+ "addresses": [
421
+ "0x51bDD157950FB7C8B56F7E3A09828E991c1BDB17"
422
+ ]
423
+ },
424
+ {
425
+ "type": "FundingWallet",
426
+ "version": "1",
427
+ "startingBlock": 1,
428
+ "escrowAlchemyWebhooks": [],
429
+ "addresses": [
430
+ "0xA9bEA932CFf638324eDa1046AB4D84723C84987c"
431
+ ]
432
+ }
433
+ ],
434
+ "paymentTokens": [
435
+ {
436
+ "name": "Avalanche",
437
+ "symbol": "AVAX",
438
+ "token_standard": "AVAXC",
439
+ "type": "native",
440
+ "isStableCoin": false,
441
+ "decimals": 18,
442
+ "address": "0x0000000000000000000000000000000000000000",
443
+ "sweepThreshold": 0.05,
444
+ "sweepWalletMinBalance": 0.01,
445
+ "recommendedMinBalanceFundingWallet": 1,
446
+ "recommendedMinBalanceEscrow": 10,
447
+ "recommendedMinBalanceRentEnergy": 0
448
+ },
449
+ {
450
+ "name": "Tether Token",
451
+ "symbol": "USDT",
452
+ "token_standard": "AVAXC",
453
+ "type": "erc20",
454
+ "isStableCoin": true,
455
+ "decimals": 6,
456
+ "address": "0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",
457
+ "sweepThreshold": 5,
458
+ "sweepWalletMinBalance": 1,
459
+ "recommendedMinBalanceFundingWallet": 0,
460
+ "recommendedMinBalanceEscrow": 100,
461
+ "recommendedMinBalanceRentEnergy": 0
462
+ }
463
+ ]
464
+ },
465
+ "728126428": {
466
+ "status": true,
467
+ "isTestnet": false,
468
+ "name": "Tron",
469
+ "blockchainType": "tron",
470
+ "chainId": 728126428,
471
+ "blockexplorerUrl": "https://tronscan.org",
472
+ "tronConfig": {
473
+ "trxTransferCost": 270000,
474
+ "trc20TransferCost": 4000000,
475
+ "rentEnergyWallet": ""
476
+ },
477
+ "accounting": {
478
+ "funding_wallet": "TH3fM3JAgBsXyzBHw3vE6XcZpFtnyxhXN1",
479
+ "treasury_receiver": "TH3fM3JAgBsXyzBHw3vE6XcZpFtnyxhXN1",
480
+ "overflow_treasury_receiver": "TH3fM3JAgBsXyzBHw3vE6XcZpFtnyxhXN1",
481
+ "overflow_threshold_decimal": 100000,
482
+ "min_funding_wallet_balance_usd": 5,
483
+ "allowed_receivers": [
484
+ "TH3fM3JAgBsXyzBHw3vE6XcZpFtnyxhXN1",
485
+ "TCxAEDMEsB7k4CsnouPT1kxTtZ9SQcG4zH"
486
+ ]
487
+ },
488
+ "rpcMetadata": {
489
+ "rpcBaseUrl": "https://rpc.ankr.com/premium-http/tron",
490
+ "tronGridApi": "https://api.trongrid.io"
491
+ },
492
+ "rpcBaseUrl": "https://rpc.ankr.com/premium-http/tron",
493
+ "rpcBaseUrlWss": "",
494
+ "targetConfirmations": 2,
495
+ "quicknodeStreams": [
496
+ {
497
+ "network": "tron-mainnet",
498
+ "dataset": "logs",
499
+ "name": "tron-custodial-transfers",
500
+ "listConfig": {
501
+ "key": "custodial-addresses"
502
+ }
503
+ }
504
+ ],
505
+ "custodialAlchemyWebhooks": [],
506
+ "contracts": [
507
+ {
508
+ "type": "FundingWallet",
509
+ "version": "1",
510
+ "startingBlock": 1,
511
+ "escrowAlchemyWebhooks": [],
512
+ "addresses": [
513
+ "TH3fM3JAgBsXyzBHw3vE6XcZpFtnyxhXN1"
514
+ ]
515
+ }
516
+ ],
517
+ "paymentTokens": [
518
+ {
519
+ "name": "Tron",
520
+ "symbol": "TRX",
521
+ "token_standard": "TRX",
522
+ "type": "native",
523
+ "isStableCoin": false,
524
+ "decimals": 6,
525
+ "address": "0000000000000000000000000000000000000000",
526
+ "sweepThreshold": 10,
527
+ "sweepWalletMinBalance": 6,
528
+ "recommendedMinBalanceFundingWallet": 333,
529
+ "recommendedMinBalanceEscrow": 0,
530
+ "recommendedMinBalanceRentEnergy": 50
531
+ },
532
+ {
533
+ "name": "Tether Token",
534
+ "symbol": "USDT",
535
+ "token_standard": "TRC-20",
536
+ "type": "trc20",
537
+ "isStableCoin": true,
538
+ "decimals": 6,
539
+ "address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
540
+ "sweepThreshold": 2,
541
+ "sweepWalletMinBalance": 0.1,
542
+ "recommendedMinBalanceFundingWallet": 100,
543
+ "recommendedMinBalanceEscrow": 0,
544
+ "recommendedMinBalanceRentEnergy": 0
545
+ }
546
+ ]
547
+ },
548
+ "1000000000": {
549
+ "status": true,
550
+ "isTestnet": false,
551
+ "name": "BTC Lightning",
552
+ "blockchainType": "lightning",
553
+ "chainId": 1000000000,
554
+ "blockexplorerUrl": "https://mempool.space/lightning",
555
+ "rpcBaseUrl": "",
556
+ "rpcBaseUrlWss": "",
557
+ "targetConfirmations": 1,
558
+ "custodialAlchemyWebhooks": [],
559
+ "contracts": [],
560
+ "paymentTokens": [
561
+ {
562
+ "name": "Bitcoin",
563
+ "symbol": "BTC",
564
+ "token_standard": "LIGHTNING",
565
+ "type": "native",
566
+ "isStableCoin": false,
567
+ "decimals": 8,
568
+ "address": "000000000000000000000000000000000000000000",
569
+ "sweepThreshold": 0.001,
570
+ "sweepWalletMinBalance": 0.01
571
+ }
572
+ ]
573
+ }
574
+ }
@@ -164,6 +164,8 @@ declare class EscrowInteraction extends Errors {
164
164
  };
165
165
  fee?: undefined;
166
166
  }>;
167
+ private _depositEther;
168
+ private _depositERC20;
167
169
  decodeRevertError(error: ErrorObject): EscrowErrorMessage;
168
170
  }
169
171
  export default EscrowInteraction;
@@ -1 +1 @@
1
- {"version":3,"file":"Escrow.d.ts","sourceRoot":"","sources":["../../src/contracts/Escrow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAqC,MAAM,EAA2B,MAAM,QAAQ,CAAC;AAG9G,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAqB,MAAM,gBAAgB,CAAC;AACpF,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAiB,wBAAwB,EAAE,kBAAkB,EAAiB,MAAM,EAAa,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGhM;;;GAGG;AACH,cAAM,iBAAkB,SAAQ,MAAM;IAClC,OAAO,CAAC,MAAM,CAAuB;IAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,aAAa,CAAa;gBAEf,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM;IAU7E;;;OAGG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM;IAK/B,uBAAuB;IAEvB;;;;OAIG;IACU,mBAAmB,CAAC,WAAW,EAAE,MAAM;IAYpD;;;;;OAKG;IACU,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAgBzD,uBAAuB;IAEV,WAAW,CAAC,OAAO,EAAE,kBAAkB;;;;;;;;;;;;;;;;;IAiCvC,eAAe,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;IA6BnE,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GA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388
+ _depositEther(amountInWei_1) {
389
+ return __awaiter(this, arguments, void 0, function* (amountInWei, bonusCode = "", signature) {
390
+ try {
391
+ if (!this.signer) {
392
+ throw new Error("Signer not set");
393
+ }
394
+ if (!amountInWei) {
395
+ throw new Error("Failed to convert amount to wei");
396
+ }
397
+ const tx = yield this.escrowContract.deposit(bonusCode, signature, {
398
+ value: ethers_1.ethers.toBigInt(amountInWei)
399
+ });
400
+ const receipt = yield tx.wait(this.CONFIRMATIONS);
401
+ return {
402
+ status: escrow_1.TransactionStatus.SUCCESS,
403
+ transactionHash: tx.hash,
404
+ receipt
405
+ };
406
+ }
407
+ catch (e) {
408
+ const errorResult = this.decodeRevertError(e);
409
+ return {
410
+ status: escrow_1.TransactionStatus.FAILED,
411
+ transactionHash: null,
412
+ receipt: null,
413
+ error: Object.assign({}, errorResult)
414
+ };
415
+ }
416
+ });
417
+ }
418
+ // Depositing ERC20 token
419
+ _depositERC20(amountInTokenUnits_1, tokenAddress_1) {
420
+ return __awaiter(this, arguments, void 0, function* (amountInTokenUnits, tokenAddress, bonusCode = "", signature, signer) {
421
+ try {
422
+ const EscrowAddress = yield this.escrowContract.getAddress();
423
+ // Initialize token contract
424
+ const tokenContract = new ethers_1.Contract(tokenAddress, ERC20Mock_json_1.default, this.signer);
425
+ // Request approval only if the token is not already approved for spending by escrow contract
426
+ const allowance = yield tokenContract.allowance(yield signer.getAddress(), EscrowAddress);
427
+ if (allowance < ethers_1.ethers.toBigInt(amountInTokenUnits)) {
428
+ const approveTx = yield tokenContract.approve(EscrowAddress, amountInTokenUnits);
429
+ yield approveTx.wait(this.CONFIRMATIONS);
430
+ }
431
+ const depositTx = yield this.escrowContract.depositErc20(amountInTokenUnits, tokenAddress, bonusCode, signature);
432
+ const depositReceipt = yield depositTx.wait(this.CONFIRMATIONS);
433
+ return {
434
+ status: escrow_1.TransactionStatus.SUCCESS,
435
+ transactionHash: depositTx.hash,
436
+ receipt: depositReceipt,
437
+ };
438
+ }
439
+ catch (e) {
440
+ const errorResult = this.decodeRevertError(e);
441
+ return {
442
+ status: escrow_1.TransactionStatus.FAILED,
443
+ transactionHash: null,
444
+ receipt: null,
445
+ error: Object.assign({}, errorResult)
446
+ };
447
+ }
448
+ });
449
+ }
387
450
  decodeRevertError(error) {
388
451
  // Decode error data
389
452
  if (error.data && error.data !== "0x") {