@develit-services/bank 0.0.2

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.
@@ -0,0 +1,3751 @@
1
+ import { createInternalError, useResult, uuidv4 } from '@develit-io/backend-sdk';
2
+ import { s as schema } from './bank.BeH-ZCJJ.mjs';
3
+ import { and, eq } from 'drizzle-orm';
4
+ import { format, parseISO } from 'date-fns';
5
+ import { importPKCS8, SignJWT } from 'jose';
6
+ import { z } from 'zod';
7
+
8
+ const tables = schema;
9
+
10
+ const banks = [
11
+ {
12
+ name: "Finbricks MOCK_COBS",
13
+ shortName: "Finbricks MOCK_COBS",
14
+ code: "5051",
15
+ country: "Czechia"
16
+ },
17
+ {
18
+ name: "Komer\u010Dn\xED banka, a.s.",
19
+ shortName: "KB",
20
+ code: "0100",
21
+ country: "Czechia"
22
+ },
23
+ {
24
+ name: "\u010Ceskoslovensk\xE1 obchodn\xED banka, a. s.",
25
+ shortName: "\u010CSOB",
26
+ code: "0300",
27
+ country: "Czechia"
28
+ },
29
+ {
30
+ name: "MONETA Money Bank, a.s.",
31
+ shortName: "MONETA",
32
+ code: "0600",
33
+ country: "Czechia"
34
+ },
35
+ {
36
+ name: "\u010CESK\xC1 N\xC1RODN\xCD BANKA",
37
+ shortName: "\u010CNB",
38
+ code: "0710",
39
+ country: "Czechia"
40
+ },
41
+ {
42
+ name: "\u010Cesk\xE1 spo\u0159itelna, a.s.",
43
+ shortName: "\u010CS",
44
+ code: "0800",
45
+ country: "Czechia"
46
+ },
47
+ {
48
+ name: "Fio banka, a.s.",
49
+ shortName: "Fio",
50
+ code: "2010",
51
+ country: "Czechia"
52
+ },
53
+ {
54
+ name: "Citfin, spo\u0159iteln\xED dru\u017Estvo",
55
+ shortName: "Citfin",
56
+ code: "2060",
57
+ country: "Czechia"
58
+ },
59
+ {
60
+ name: "TRINITY BANK a.s.",
61
+ shortName: "Trinity",
62
+ code: "2070",
63
+ country: "Czechia"
64
+ },
65
+ {
66
+ name: "\u010CSOB Hypote\u010Dn\xED banka, a.s.",
67
+ shortName: "\u010CSOB Hypo",
68
+ code: "2100",
69
+ country: "Czechia"
70
+ },
71
+ {
72
+ name: "Pen\u011B\u017En\xED d\u016Fm, spo\u0159iteln\xED dru\u017Estvo",
73
+ shortName: "Pen\u011B\u017En\xED d\u016Fm",
74
+ code: "2200",
75
+ country: "Czechia"
76
+ },
77
+ {
78
+ name: "Artesa, spo\u0159iteln\xED dru\u017Estvo",
79
+ shortName: "Artesa",
80
+ code: "2220",
81
+ country: "Czechia"
82
+ },
83
+ {
84
+ name: "Banka CREDITAS a.s.",
85
+ shortName: "Creditas",
86
+ code: "2250",
87
+ country: "Czechia"
88
+ },
89
+ {
90
+ name: "NEY spo\u0159iteln\xED dru\u017Estvo",
91
+ shortName: "NEY",
92
+ code: "2260",
93
+ country: "Czechia"
94
+ },
95
+ {
96
+ name: "Citibank Europe plc, organiza\u010Dn\xED slo\u017Eka",
97
+ shortName: "Citibank",
98
+ code: "2600",
99
+ country: "Czechia"
100
+ },
101
+ {
102
+ name: "UniCredit Bank Czech Republic and Slovakia, a.s.",
103
+ shortName: "UniCredit",
104
+ code: "2700",
105
+ country: "Czechia"
106
+ },
107
+ {
108
+ name: "Air Bank a.s.",
109
+ shortName: "Air Bank",
110
+ code: "3030",
111
+ country: "Czechia"
112
+ },
113
+ {
114
+ name: "PKO BP S.A., Czech Branch",
115
+ shortName: "PKO BP",
116
+ code: "3060",
117
+ country: "Czechia"
118
+ },
119
+ {
120
+ name: "ING Bank N.V.",
121
+ shortName: "ING",
122
+ code: "3500",
123
+ country: "Czechia"
124
+ },
125
+ {
126
+ name: "N\xE1rodn\xED rozvojov\xE1 banka, a.s.",
127
+ shortName: "NRB",
128
+ code: "4300",
129
+ country: "Czechia"
130
+ },
131
+ {
132
+ name: "Raiffeisenbank a.s.",
133
+ shortName: "Raiffeisen",
134
+ code: "5500",
135
+ country: "Czechia"
136
+ },
137
+ {
138
+ name: "J&T BANKA, a.s.",
139
+ shortName: "J&T",
140
+ code: "5800",
141
+ country: "Czechia"
142
+ },
143
+ {
144
+ name: "PPF banka a.s.",
145
+ shortName: "PPF",
146
+ code: "6000",
147
+ country: "Czechia"
148
+ },
149
+ {
150
+ name: "COMMERZBANK Aktiengesellschaft, pobo\u010Dka Praha",
151
+ shortName: "Commerzbank",
152
+ code: "6200",
153
+ country: "Czechia"
154
+ },
155
+ {
156
+ name: "mBank S.A., organiza\u010Dn\xED slo\u017Eka",
157
+ shortName: "mBank",
158
+ code: "6210",
159
+ country: "Czechia"
160
+ },
161
+ {
162
+ name: "BNP Paribas S.A., pobo\u010Dka \u010Cesk\xE1 republika",
163
+ shortName: "BNP Paribas",
164
+ code: "6300",
165
+ country: "Czechia"
166
+ },
167
+ {
168
+ name: "Partners Banka, a.s.",
169
+ shortName: "Partners",
170
+ code: "6363",
171
+ country: "Czechia"
172
+ },
173
+ {
174
+ name: "V\u0161eobecn\xE1 \xFAverov\xE1 banka a.s., pobo\u010Dka Praha",
175
+ shortName: "V\xDAB",
176
+ code: "6700",
177
+ country: "Czechia"
178
+ },
179
+ {
180
+ name: "Sberbank CZ, a.s. v likvidaci",
181
+ shortName: "Sberbank",
182
+ code: "6800",
183
+ country: "Czechia"
184
+ },
185
+ {
186
+ name: "Deutsche Bank Aktiengesellschaft Filiale Prag, organiza\u010Dn\xED slo\u017Eka",
187
+ shortName: "Deutsche Bank",
188
+ code: "7910",
189
+ country: "Czechia"
190
+ },
191
+ {
192
+ name: "Raiffeisen stavebn\xED spo\u0159itelna a.s.",
193
+ shortName: "Raiffeisen SS",
194
+ code: "7950",
195
+ country: "Czechia"
196
+ },
197
+ {
198
+ name: "\u010CSOB Stavebn\xED spo\u0159itelna, a.s.",
199
+ shortName: "\u010CSOB SS",
200
+ code: "7960",
201
+ country: "Czechia"
202
+ },
203
+ {
204
+ name: "MONETA Stavebn\xED Spo\u0159itelna, a.s.",
205
+ shortName: "MONETA SS",
206
+ code: "7970",
207
+ country: "Czechia"
208
+ },
209
+ {
210
+ name: "Modr\xE1 pyramida stavebn\xED spo\u0159itelna, a.s.",
211
+ shortName: "Modr\xE1 pyramida",
212
+ code: "7990",
213
+ country: "Czechia"
214
+ },
215
+ {
216
+ name: "Volksbank Raiffeisenbank Nordoberpfalz eG pobo\u010Dka Cheb",
217
+ shortName: "Volksbank",
218
+ code: "8030",
219
+ country: "Czechia"
220
+ },
221
+ {
222
+ name: "Oberbank AG pobo\u010Dka \u010Cesk\xE1 republika",
223
+ shortName: "Oberbank",
224
+ code: "8040",
225
+ country: "Czechia"
226
+ },
227
+ {
228
+ name: "Stavebn\xED spo\u0159itelna \u010Cesk\xE9 spo\u0159itelny, a.s.",
229
+ shortName: "SS\u010CS",
230
+ code: "8060",
231
+ country: "Czechia"
232
+ },
233
+ {
234
+ name: "\u010Cesk\xE1 exportn\xED banka, a.s.",
235
+ shortName: "\u010CEB",
236
+ code: "8090",
237
+ country: "Czechia"
238
+ },
239
+ {
240
+ name: "HSBC Continental Europe, Czech Republic",
241
+ shortName: "HSBC",
242
+ code: "8150",
243
+ country: "Czechia"
244
+ },
245
+ {
246
+ name: "Sparkasse Oberlausitz-Niederschlesien",
247
+ shortName: "Sparkasse",
248
+ code: "8190",
249
+ country: "Czechia"
250
+ },
251
+ {
252
+ name: "FAS finance company s.r.o.",
253
+ shortName: "FAS",
254
+ code: "8198",
255
+ country: "Czechia"
256
+ },
257
+ {
258
+ name: "Payment execution s.r.o.",
259
+ shortName: "Payment execution",
260
+ code: "8220",
261
+ country: "Czechia"
262
+ },
263
+ {
264
+ name: "Bank of China (CEE) Ltd. Prague Branch",
265
+ shortName: "Bank of China",
266
+ code: "8250",
267
+ country: "Czechia"
268
+ },
269
+ {
270
+ name: "Bank of Communications Co., Ltd., Prague Branch od\u0161t\u011Bpn\xFD z\xE1vod",
271
+ shortName: "Bank of Communications",
272
+ code: "8255",
273
+ country: "Czechia"
274
+ },
275
+ {
276
+ name: "Industrial and Commercial Bank of China Limited, Prague Branch, od\u0161t\u011Bpn\xFD z\xE1vod",
277
+ shortName: "ICBC",
278
+ code: "8265",
279
+ country: "Czechia"
280
+ },
281
+ {
282
+ name: "Multitude Bank p.l.c.",
283
+ shortName: "Multitude",
284
+ code: "8500",
285
+ country: "Czechia"
286
+ }
287
+ ];
288
+
289
+ const countries = [
290
+ {
291
+ code2: "AF",
292
+ code3: "AFG",
293
+ currency: "USD",
294
+ phoneCode: "+93",
295
+ name: "Afghanistan",
296
+ native: "\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646",
297
+ vat: 10,
298
+ sanctions: true
299
+ },
300
+ {
301
+ code2: "AL",
302
+ code3: "ALB",
303
+ currency: "EUR",
304
+ phoneCode: "+355",
305
+ name: "Albania",
306
+ native: "Shqip\xEBria",
307
+ vat: 20
308
+ },
309
+ {
310
+ code2: "DZ",
311
+ code3: "DZA",
312
+ currency: "USD",
313
+ phoneCode: "+213",
314
+ name: "Algeria",
315
+ native: "\u0627\u0644\u062C\u0632\u0627\u0626\u0631",
316
+ vat: 19
317
+ },
318
+ {
319
+ code2: "AS",
320
+ code3: "ASM",
321
+ currency: "USD",
322
+ phoneCode: "+1",
323
+ name: "American Samoa",
324
+ native: "American Samoa",
325
+ vat: 15
326
+ },
327
+ {
328
+ code2: "AD",
329
+ code3: "AND",
330
+ currency: "EUR",
331
+ phoneCode: "+376",
332
+ name: "Andorra",
333
+ native: "Andorra",
334
+ vat: 4.5
335
+ },
336
+ {
337
+ code2: "AO",
338
+ code3: "AGO",
339
+ currency: "USD",
340
+ phoneCode: "+244",
341
+ name: "Angola",
342
+ native: "Angola",
343
+ vat: 14
344
+ },
345
+ {
346
+ code2: "AG",
347
+ code3: "ATG",
348
+ currency: "USD",
349
+ phoneCode: "+1",
350
+ name: "Antigua and Barbuda",
351
+ native: "Antigua and Barbuda",
352
+ vat: 15
353
+ },
354
+ {
355
+ code2: "AR",
356
+ code3: "ARG",
357
+ currency: "USD",
358
+ phoneCode: "+54",
359
+ name: "Argentina",
360
+ native: "Argentina",
361
+ vat: 21
362
+ },
363
+ {
364
+ code2: "AM",
365
+ code3: "ARM",
366
+ currency: "USD",
367
+ phoneCode: "+374",
368
+ name: "Armenia",
369
+ native: "\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576",
370
+ vat: 20
371
+ },
372
+ {
373
+ code2: "AW",
374
+ code3: "ABW",
375
+ currency: "USD",
376
+ phoneCode: "+297",
377
+ name: "Aruba",
378
+ native: "Aruba",
379
+ vat: 2
380
+ },
381
+ {
382
+ code2: "AU",
383
+ code3: "AUS",
384
+ currency: "USD",
385
+ phoneCode: "+61",
386
+ name: "Australia",
387
+ native: "Australia",
388
+ vat: 10
389
+ },
390
+ {
391
+ code2: "AT",
392
+ code3: "AUT",
393
+ currency: "EUR",
394
+ phoneCode: "+43",
395
+ name: "Austria",
396
+ native: "\xD6sterreich",
397
+ vat: 20
398
+ },
399
+ {
400
+ code2: "AZ",
401
+ code3: "AZE",
402
+ currency: "USD",
403
+ phoneCode: "+994",
404
+ name: "Azerbaijan",
405
+ native: "Az\u0259rbaycan",
406
+ vat: 18
407
+ },
408
+ {
409
+ code2: "BS",
410
+ code3: "BHS",
411
+ currency: "USD",
412
+ phoneCode: "+1",
413
+ name: "Bahamas",
414
+ native: "Bahamas",
415
+ vat: 12
416
+ },
417
+ {
418
+ code2: "BH",
419
+ code3: "BHR",
420
+ currency: "USD",
421
+ phoneCode: "+973",
422
+ name: "Bahrain",
423
+ native: "\u200F\u0627\u0644\u0628\u062D\u0631\u064A\u0646",
424
+ vat: 10
425
+ },
426
+ {
427
+ code2: "BD",
428
+ code3: "BGD",
429
+ currency: "USD",
430
+ phoneCode: "+880",
431
+ name: "Bangladesh",
432
+ native: "Bangladesh",
433
+ vat: 15
434
+ },
435
+ {
436
+ code2: "BB",
437
+ code3: "BRB",
438
+ currency: "USD",
439
+ phoneCode: "+1",
440
+ name: "Barbados",
441
+ native: "Barbados",
442
+ vat: 17.5,
443
+ sanctions: true
444
+ },
445
+ {
446
+ code2: "BY",
447
+ code3: "BLR",
448
+ currency: "USD",
449
+ phoneCode: "+375",
450
+ name: "Belarus",
451
+ native: "\u0411\u0435\u043B\u0430\u0440\u0443\u0301\u0441\u044C",
452
+ vat: 20
453
+ },
454
+ {
455
+ code2: "BE",
456
+ code3: "BEL",
457
+ currency: "EUR",
458
+ phoneCode: "+32",
459
+ name: "Belgium",
460
+ native: "Belgi\xEB",
461
+ vat: 21
462
+ },
463
+ {
464
+ code2: "BZ",
465
+ code3: "BLZ",
466
+ currency: "USD",
467
+ phoneCode: "+501",
468
+ name: "Belize",
469
+ native: "Belize",
470
+ vat: 12.5
471
+ },
472
+ {
473
+ code2: "BJ",
474
+ code3: "BEN",
475
+ currency: "USD",
476
+ phoneCode: "+229",
477
+ name: "Benin",
478
+ native: "B\xE9nin",
479
+ vat: 18
480
+ },
481
+ {
482
+ code2: "BO",
483
+ code3: "BOL",
484
+ currency: "USD",
485
+ phoneCode: "+591",
486
+ name: "Bolivia",
487
+ native: "Bolivia",
488
+ vat: 13
489
+ },
490
+ {
491
+ code2: "BQ",
492
+ code3: "BES",
493
+ currency: "USD",
494
+ phoneCode: "+599",
495
+ name: "Bonaire",
496
+ native: "Bonaire",
497
+ vat: 8
498
+ },
499
+ {
500
+ code2: "BA",
501
+ code3: "BIH",
502
+ currency: "EUR",
503
+ phoneCode: "+387",
504
+ name: "Bosnia and Herzegovina",
505
+ native: "Bosna i Hercegovina",
506
+ vat: 17
507
+ },
508
+ {
509
+ code2: "BW",
510
+ code3: "BWA",
511
+ currency: "USD",
512
+ phoneCode: "+267",
513
+ name: "Botswana",
514
+ native: "Botswana",
515
+ vat: 14
516
+ },
517
+ {
518
+ code2: "BR",
519
+ code3: "BRA",
520
+ currency: "USD",
521
+ phoneCode: "+55",
522
+ name: "Brazil",
523
+ native: "Brasil",
524
+ vat: 18
525
+ },
526
+ {
527
+ code2: "IO",
528
+ code3: "IOT",
529
+ currency: "USD",
530
+ phoneCode: "+246",
531
+ name: "British Indian Ocean Territory",
532
+ native: "British Indian Ocean Territory",
533
+ vat: 20
534
+ },
535
+ {
536
+ code2: "VG",
537
+ code3: "VGB",
538
+ currency: "USD",
539
+ phoneCode: "+1",
540
+ name: "British Virgin Islands",
541
+ native: "British Virgin Islands",
542
+ vat: 21
543
+ },
544
+ {
545
+ code2: "BG",
546
+ code3: "BGR",
547
+ currency: "BGN",
548
+ phoneCode: "+359",
549
+ name: "Bulgaria",
550
+ native: "\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F",
551
+ vat: 20
552
+ },
553
+ {
554
+ code2: "BF",
555
+ code3: "BFA",
556
+ currency: "USD",
557
+ phoneCode: "+226",
558
+ name: "Burkina Faso",
559
+ native: "Burkina Faso",
560
+ vat: 18,
561
+ sanctions: true
562
+ },
563
+ {
564
+ code2: "BI",
565
+ code3: "BDI",
566
+ currency: "USD",
567
+ phoneCode: "+257",
568
+ name: "Burundi",
569
+ native: "Burundi",
570
+ vat: 18
571
+ },
572
+ {
573
+ code2: "KH",
574
+ code3: "KHM",
575
+ currency: "USD",
576
+ phoneCode: "+855",
577
+ name: "Cambodia",
578
+ native: "K\xE2mp\u016Dch\xE9a",
579
+ vat: 10
580
+ },
581
+ {
582
+ code2: "CM",
583
+ code3: "CMR",
584
+ currency: "USD",
585
+ phoneCode: "+237",
586
+ name: "Cameroon",
587
+ native: "Cameroon",
588
+ vat: 19.25,
589
+ sanctions: true
590
+ },
591
+ {
592
+ code2: "CA",
593
+ code3: "CAN",
594
+ currency: "",
595
+ phoneCode: "+1",
596
+ name: "Canada",
597
+ native: "Canada",
598
+ vat: 5
599
+ },
600
+ {
601
+ code2: "CV",
602
+ code3: "CPV",
603
+ currency: "USD",
604
+ phoneCode: "+238",
605
+ name: "Cape Verde",
606
+ native: "Cabo Verde",
607
+ vat: 15
608
+ },
609
+ {
610
+ code2: "CF",
611
+ code3: "CAF",
612
+ currency: "USD",
613
+ phoneCode: "+236",
614
+ name: "Central African Republic",
615
+ native: "K\xF6d\xF6r\xF6s\xEAse t\xEE B\xEAafr\xEEka",
616
+ vat: 19
617
+ },
618
+ {
619
+ code2: "TD",
620
+ code3: "TCD",
621
+ currency: "USD",
622
+ phoneCode: "+235",
623
+ name: "Chad",
624
+ native: "Tchad",
625
+ vat: 18
626
+ },
627
+ {
628
+ code2: "CL",
629
+ code3: "CHL",
630
+ currency: "USD",
631
+ phoneCode: "+56",
632
+ name: "Chile",
633
+ native: "Chile",
634
+ vat: 19
635
+ },
636
+ {
637
+ code2: "CN",
638
+ code3: "CHN",
639
+ currency: "USD",
640
+ phoneCode: "+86",
641
+ name: "China",
642
+ native: "\u4E2D\u56FD",
643
+ vat: 13
644
+ },
645
+ {
646
+ code2: "CO",
647
+ code3: "COL",
648
+ currency: "USD",
649
+ phoneCode: "+57",
650
+ name: "Colombia",
651
+ native: "Colombia",
652
+ vat: 19
653
+ },
654
+ {
655
+ code2: "KM",
656
+ code3: "COM",
657
+ currency: "USD",
658
+ phoneCode: "+269",
659
+ name: "Comoros",
660
+ native: "Komori",
661
+ vat: 10
662
+ },
663
+ {
664
+ code2: "CK",
665
+ code3: "COK",
666
+ currency: "USD",
667
+ phoneCode: "+682",
668
+ name: "Cook Islands",
669
+ native: "Cook Islands",
670
+ vat: 15
671
+ },
672
+ {
673
+ code2: "CR",
674
+ code3: "CRI",
675
+ currency: "USD",
676
+ phoneCode: "+506",
677
+ name: "Costa Rica",
678
+ native: "Costa Rica",
679
+ vat: 13
680
+ },
681
+ {
682
+ code2: "HR",
683
+ code3: "HRV",
684
+ currency: "HRK",
685
+ phoneCode: "+385",
686
+ name: "Croatia",
687
+ native: "Hrvatska",
688
+ vat: 25
689
+ },
690
+ {
691
+ code2: "CW",
692
+ code3: "CUW",
693
+ currency: "USD",
694
+ phoneCode: "+599",
695
+ name: "Curacao",
696
+ native: "Cura\xE7ao",
697
+ vat: 6
698
+ },
699
+ {
700
+ code2: "CY",
701
+ code3: "CYP",
702
+ currency: "EUR",
703
+ phoneCode: "+357",
704
+ name: "Cyprus",
705
+ native: "\u039A\u03CD\u03C0\u03C1\u03BF\u03C2",
706
+ vat: 19
707
+ },
708
+ {
709
+ code2: "CZ",
710
+ code3: "CZE",
711
+ currency: "CZK",
712
+ phoneCode: "+420",
713
+ name: "Czechia",
714
+ native: "\u010Cesko",
715
+ vat: 21,
716
+ priority: 1
717
+ },
718
+ {
719
+ code2: "CD",
720
+ code3: "COD",
721
+ currency: "USD",
722
+ phoneCode: "+243",
723
+ name: "Democratic Republic of the Congo",
724
+ native: "R\xE9publique d\xE9mocratique du Congo",
725
+ vat: 18,
726
+ sanctions: true
727
+ },
728
+ {
729
+ code2: "DK",
730
+ code3: "DNK",
731
+ currency: "DKK",
732
+ phoneCode: "+45",
733
+ name: "Denmark",
734
+ native: "Danmark",
735
+ vat: 25
736
+ },
737
+ {
738
+ code2: "DJ",
739
+ code3: "DJI",
740
+ currency: "USD",
741
+ phoneCode: "+253",
742
+ name: "Djibouti",
743
+ native: "Djibouti",
744
+ vat: 10
745
+ },
746
+ {
747
+ code2: "DM",
748
+ code3: "DMA",
749
+ currency: "USD",
750
+ phoneCode: "+1",
751
+ name: "Dominica",
752
+ native: "Dominica",
753
+ vat: 15
754
+ },
755
+ {
756
+ code2: "DO",
757
+ code3: "DOM",
758
+ currency: "USD",
759
+ phoneCode: "+809",
760
+ name: "Dominican Republic",
761
+ native: "Rep\xFAblica Dominicana",
762
+ vat: 18
763
+ },
764
+ {
765
+ code2: "TL",
766
+ code3: "TLS",
767
+ currency: "USD",
768
+ phoneCode: "+670",
769
+ name: "East Timor",
770
+ native: "Timor-Leste",
771
+ vat: 10
772
+ },
773
+ {
774
+ code2: "EC",
775
+ code3: "ECU",
776
+ currency: "USD",
777
+ phoneCode: "+593",
778
+ name: "Ecuador",
779
+ native: "Ecuador",
780
+ vat: 12
781
+ },
782
+ {
783
+ code2: "EG",
784
+ code3: "EGY",
785
+ currency: "USD",
786
+ phoneCode: "+20",
787
+ name: "Egypt",
788
+ native: "\u0645\u0635\u0631\u200E",
789
+ vat: 14
790
+ },
791
+ {
792
+ code2: "SV",
793
+ code3: "SLV",
794
+ currency: "USD",
795
+ phoneCode: "+503",
796
+ name: "El Salvador",
797
+ native: "El Salvador",
798
+ vat: 13
799
+ },
800
+ {
801
+ code2: "GQ",
802
+ code3: "GNQ",
803
+ currency: "USD",
804
+ phoneCode: "+240",
805
+ name: "Equatorial Guinea",
806
+ native: "Guinea Ecuatorial",
807
+ vat: 15
808
+ },
809
+ {
810
+ code2: "ER",
811
+ code3: "ERI",
812
+ currency: "USD",
813
+ phoneCode: "+291",
814
+ name: "Eritrea",
815
+ native: "\u12A4\u122D\u1275\u122B",
816
+ vat: 5
817
+ },
818
+ {
819
+ code2: "EE",
820
+ code3: "EST",
821
+ currency: "EUR",
822
+ phoneCode: "+372",
823
+ name: "Estonia",
824
+ native: "Eesti",
825
+ vat: 20
826
+ },
827
+ {
828
+ code2: "ET",
829
+ code3: "ETH",
830
+ currency: "USD",
831
+ phoneCode: "+251",
832
+ name: "Ethiopia",
833
+ native: "\u12A2\u1275\u12EE\u1335\u12EB",
834
+ vat: 15
835
+ },
836
+ {
837
+ code2: "FO",
838
+ code3: "FRO",
839
+ currency: "USD",
840
+ phoneCode: "+298",
841
+ name: "Faroe Islands",
842
+ native: "F\xF8royar",
843
+ vat: 25
844
+ },
845
+ {
846
+ code2: "FJ",
847
+ code3: "FJI",
848
+ currency: "USD",
849
+ phoneCode: "+679",
850
+ name: "Fiji",
851
+ native: "Fiji",
852
+ vat: 9
853
+ },
854
+ {
855
+ code2: "FI",
856
+ code3: "FIN",
857
+ currency: "EUR",
858
+ phoneCode: "+358",
859
+ name: "Finland",
860
+ native: "Suomi",
861
+ vat: 24
862
+ },
863
+ {
864
+ code2: "FR",
865
+ code3: "FRA",
866
+ currency: "EUR",
867
+ phoneCode: "+33",
868
+ name: "France",
869
+ native: "France",
870
+ vat: 20
871
+ },
872
+ {
873
+ code2: "GF",
874
+ code3: "GUF",
875
+ currency: "USD",
876
+ phoneCode: "+594",
877
+ name: "French Guiana",
878
+ native: "Guyane fran\xE7aise",
879
+ vat: 14
880
+ },
881
+ {
882
+ code2: "PF",
883
+ code3: "PYF",
884
+ currency: "USD",
885
+ phoneCode: "+689",
886
+ name: "French Polynesia",
887
+ native: "Polyn\xE9sie fran\xE7aise",
888
+ vat: 16
889
+ },
890
+ {
891
+ code2: "GA",
892
+ code3: "GAB",
893
+ currency: "USD",
894
+ phoneCode: "+241",
895
+ name: "Gabon",
896
+ native: "Gabon",
897
+ vat: 18
898
+ },
899
+ {
900
+ code2: "GM",
901
+ code3: "GMB",
902
+ currency: "USD",
903
+ phoneCode: "+220",
904
+ name: "Gambia",
905
+ native: "Gambia",
906
+ vat: 15
907
+ },
908
+ {
909
+ code2: "GE",
910
+ code3: "GEO",
911
+ currency: "USD",
912
+ phoneCode: "+995",
913
+ name: "Georgia",
914
+ native: "\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD",
915
+ vat: 18
916
+ },
917
+ {
918
+ code2: "DE",
919
+ code3: "DEU",
920
+ currency: "EUR",
921
+ phoneCode: "+49",
922
+ name: "Germany",
923
+ native: "Deutschland",
924
+ vat: 19,
925
+ priority: 1
926
+ },
927
+ {
928
+ code2: "GH",
929
+ code3: "GHA",
930
+ currency: "USD",
931
+ phoneCode: "+233",
932
+ name: "Ghana",
933
+ native: "Ghana",
934
+ vat: 12.5
935
+ },
936
+ {
937
+ code2: "GR",
938
+ code3: "GRC",
939
+ currency: "EUR",
940
+ phoneCode: "+30",
941
+ name: "Greece",
942
+ native: "\u0395\u03BB\u03BB\u03AC\u03B4\u03B1",
943
+ vat: 12.5
944
+ },
945
+ {
946
+ code2: "GD",
947
+ code3: "GRD",
948
+ currency: "USD",
949
+ phoneCode: "+1",
950
+ name: "Grenada",
951
+ native: "Grenada",
952
+ vat: 15
953
+ },
954
+ {
955
+ code2: "GP",
956
+ code3: "GLP",
957
+ currency: "USD",
958
+ phoneCode: "+590",
959
+ name: "Guadeloupe",
960
+ native: "Guadeloupe",
961
+ vat: 8.5
962
+ },
963
+ {
964
+ code2: "GU",
965
+ code3: "GUM",
966
+ currency: "USD",
967
+ phoneCode: "+1",
968
+ name: "Guam",
969
+ native: "Guam",
970
+ vat: 2
971
+ },
972
+ {
973
+ code2: "GT",
974
+ code3: "GTM",
975
+ currency: "USD",
976
+ phoneCode: "+502",
977
+ name: "Guatemala",
978
+ native: "Guatemala",
979
+ vat: 12
980
+ },
981
+ {
982
+ code2: "GN",
983
+ code3: "GIN",
984
+ currency: "USD",
985
+ phoneCode: "+224",
986
+ name: "Guinea",
987
+ native: "Guin\xE9e",
988
+ vat: 18
989
+ },
990
+ {
991
+ code2: "GW",
992
+ code3: "GNB",
993
+ currency: "USD",
994
+ phoneCode: "+245",
995
+ name: "Guinea-Bissau",
996
+ native: "Guin\xE9-Bissau",
997
+ vat: 15
998
+ },
999
+ {
1000
+ code2: "GY",
1001
+ code3: "GUY",
1002
+ currency: "USD",
1003
+ phoneCode: "+592",
1004
+ name: "Guyana",
1005
+ native: "Guyana",
1006
+ vat: 14
1007
+ },
1008
+ {
1009
+ code2: "HT",
1010
+ code3: "HTI",
1011
+ currency: "USD",
1012
+ phoneCode: "+509",
1013
+ name: "Haiti",
1014
+ native: "Ha\xEFti",
1015
+ vat: 10,
1016
+ sanctions: true
1017
+ },
1018
+ {
1019
+ code2: "HN",
1020
+ code3: "HND",
1021
+ currency: "USD",
1022
+ phoneCode: "+504",
1023
+ name: "Honduras",
1024
+ native: "Honduras",
1025
+ vat: 15
1026
+ },
1027
+ {
1028
+ code2: "HU",
1029
+ code3: "HUN",
1030
+ currency: "HUF",
1031
+ phoneCode: "+36",
1032
+ name: "Hungary",
1033
+ native: "Magyarorsz\xE1g",
1034
+ vat: 27
1035
+ },
1036
+ {
1037
+ code2: "IS",
1038
+ code3: "ISL",
1039
+ currency: "EUR",
1040
+ phoneCode: "+354",
1041
+ name: "Iceland",
1042
+ native: "\xCDsland",
1043
+ vat: 24
1044
+ },
1045
+ {
1046
+ code2: "IN",
1047
+ code3: "IND",
1048
+ currency: "USD",
1049
+ phoneCode: "+91",
1050
+ name: "India",
1051
+ native: "\u092D\u093E\u0930\u0924",
1052
+ vat: 8
1053
+ },
1054
+ {
1055
+ code2: "ID",
1056
+ code3: "IDN",
1057
+ currency: "USD",
1058
+ phoneCode: "+62",
1059
+ name: "Indonesia",
1060
+ native: "Indonesia",
1061
+ vat: 10
1062
+ },
1063
+ {
1064
+ code2: "IR",
1065
+ code3: "IRN",
1066
+ currency: "USD",
1067
+ phoneCode: "+98",
1068
+ name: "Iran",
1069
+ native: "\u0627\u06CC\u0631\u0627\u0646",
1070
+ vat: 9,
1071
+ sanctions: true
1072
+ },
1073
+ {
1074
+ code2: "IQ",
1075
+ code3: "IRQ",
1076
+ currency: "USD",
1077
+ phoneCode: "+964",
1078
+ name: "Iraq",
1079
+ native: "\u0627\u0644\u0639\u0631\u0627\u0642",
1080
+ vat: 15
1081
+ },
1082
+ {
1083
+ code2: "IE",
1084
+ code3: "IRL",
1085
+ currency: "EUR",
1086
+ phoneCode: "+353",
1087
+ name: "Ireland",
1088
+ native: "\xC9ire",
1089
+ vat: 23
1090
+ },
1091
+ {
1092
+ code2: "IM",
1093
+ code3: "IMN",
1094
+ currency: "GBP",
1095
+ phoneCode: "+44",
1096
+ name: "Isle of Man",
1097
+ native: "Isle of Man",
1098
+ vat: 20
1099
+ },
1100
+ {
1101
+ code2: "IL",
1102
+ code3: "ISR",
1103
+ currency: "USD",
1104
+ phoneCode: "+972",
1105
+ name: "Israel",
1106
+ native: "\u05D9\u05B4\u05E9\u05B0\u05C2\u05E8\u05B8\u05D0\u05B5\u05DC",
1107
+ vat: 17
1108
+ },
1109
+ {
1110
+ code2: "IT",
1111
+ code3: "ITA",
1112
+ currency: "EUR",
1113
+ phoneCode: "+39",
1114
+ name: "Italy",
1115
+ native: "Italia",
1116
+ vat: 22
1117
+ },
1118
+ {
1119
+ code2: "CI",
1120
+ code3: "CIV",
1121
+ currency: "USD",
1122
+ phoneCode: "+225",
1123
+ name: "Ivory Coast",
1124
+ native: "C\xF4te d'Ivoire",
1125
+ vat: 18
1126
+ },
1127
+ {
1128
+ code2: "JM",
1129
+ code3: "JAM",
1130
+ currency: "USD",
1131
+ phoneCode: "+1",
1132
+ name: "Jamaica",
1133
+ native: "Jamaica",
1134
+ vat: 20,
1135
+ sanctions: true
1136
+ },
1137
+ {
1138
+ code2: "JP",
1139
+ code3: "JPN",
1140
+ currency: "USD",
1141
+ phoneCode: "+81",
1142
+ name: "Japan",
1143
+ native: "\u65E5\u672C",
1144
+ vat: 10
1145
+ },
1146
+ {
1147
+ code2: "JE",
1148
+ code3: "JEY",
1149
+ currency: "USD",
1150
+ phoneCode: "+44",
1151
+ name: "Jersey",
1152
+ native: "Jersey",
1153
+ vat: 5
1154
+ },
1155
+ {
1156
+ code2: "JO",
1157
+ code3: "JOR",
1158
+ currency: "USD",
1159
+ phoneCode: "+962",
1160
+ name: "Jordan",
1161
+ native: "\u0627\u0644\u0623\u0631\u062F\u0646",
1162
+ vat: 16
1163
+ },
1164
+ {
1165
+ code2: "KZ",
1166
+ code3: "KAZ",
1167
+ currency: "USD",
1168
+ phoneCode: "+7",
1169
+ name: "Kazakhstan",
1170
+ native: "\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D",
1171
+ vat: 12
1172
+ },
1173
+ {
1174
+ code2: "KE",
1175
+ code3: "KEN",
1176
+ currency: "USD",
1177
+ phoneCode: "+254",
1178
+ name: "Kenya",
1179
+ native: "Kenya",
1180
+ vat: 16
1181
+ },
1182
+ {
1183
+ code2: "KI",
1184
+ code3: "KIR",
1185
+ currency: "USD",
1186
+ phoneCode: "+686",
1187
+ name: "Kiribati",
1188
+ native: "Kiribati",
1189
+ vat: 12.5
1190
+ },
1191
+ {
1192
+ code2: "XK",
1193
+ code3: "XKX",
1194
+ currency: "EUR",
1195
+ phoneCode: "+383",
1196
+ name: "Kosovo",
1197
+ native: "Republika e Kosov\xEBs",
1198
+ vat: 18
1199
+ },
1200
+ {
1201
+ code2: "KW",
1202
+ code3: "KWT",
1203
+ currency: "USD",
1204
+ phoneCode: "+965",
1205
+ name: "Kuwait",
1206
+ native: "\u0627\u0644\u0643\u0648\u064A\u062A",
1207
+ vat: 5
1208
+ },
1209
+ {
1210
+ code2: "KG",
1211
+ code3: "KGZ",
1212
+ currency: "USD",
1213
+ phoneCode: "+996",
1214
+ name: "Kyrgyzstan",
1215
+ native: "\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D",
1216
+ vat: 12
1217
+ },
1218
+ {
1219
+ code2: "LA",
1220
+ code3: "LAO",
1221
+ currency: "USD",
1222
+ phoneCode: "+856",
1223
+ name: "Laos",
1224
+ native: "\u0EAA\u0E9B\u0E9B\u0EA5\u0EB2\u0EA7",
1225
+ vat: 10
1226
+ },
1227
+ {
1228
+ code2: "LV",
1229
+ code3: "LVA",
1230
+ currency: "EUR",
1231
+ phoneCode: "+371",
1232
+ name: "Latvia",
1233
+ native: "Latvija",
1234
+ vat: 21
1235
+ },
1236
+ {
1237
+ code2: "LB",
1238
+ code3: "LBN",
1239
+ currency: "USD",
1240
+ phoneCode: "+961",
1241
+ name: "Lebanon",
1242
+ native: "\u0644\u0628\u0646\u0627\u0646",
1243
+ vat: 11
1244
+ },
1245
+ {
1246
+ code2: "LS",
1247
+ code3: "LSO",
1248
+ currency: "USD",
1249
+ phoneCode: "+266",
1250
+ name: "Lesotho",
1251
+ native: "Lesotho",
1252
+ vat: 15
1253
+ },
1254
+ {
1255
+ code2: "LR",
1256
+ code3: "LBR",
1257
+ currency: "USD",
1258
+ phoneCode: "+231",
1259
+ name: "Liberia",
1260
+ native: "Liberia",
1261
+ vat: 10
1262
+ },
1263
+ {
1264
+ code2: "LI",
1265
+ code3: "LIE",
1266
+ currency: "EUR",
1267
+ phoneCode: "+423",
1268
+ name: "Liechtenstein",
1269
+ native: "Liechtenstein",
1270
+ vat: 7.7
1271
+ },
1272
+ {
1273
+ code2: "LT",
1274
+ code3: "LTU",
1275
+ currency: "EUR",
1276
+ phoneCode: "+370",
1277
+ name: "Lithuania",
1278
+ native: "Lietuva",
1279
+ vat: 21
1280
+ },
1281
+ {
1282
+ code2: "LU",
1283
+ code3: "LUX",
1284
+ currency: "EUR",
1285
+ phoneCode: "+352",
1286
+ name: "Luxembourg",
1287
+ native: "Luxembourg",
1288
+ vat: 17
1289
+ },
1290
+ {
1291
+ code2: "MK",
1292
+ code3: "MKD",
1293
+ currency: "EUR",
1294
+ phoneCode: "+389",
1295
+ name: "Macedonia",
1296
+ native: "\u0421\u0435\u0432\u0435\u0440\u043D\u0430 \u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430",
1297
+ vat: 18
1298
+ },
1299
+ {
1300
+ code2: "MG",
1301
+ code3: "MDG",
1302
+ currency: "USD",
1303
+ phoneCode: "+261",
1304
+ name: "Madagascar",
1305
+ native: "Madagasikara",
1306
+ vat: 20
1307
+ },
1308
+ {
1309
+ code2: "MW",
1310
+ code3: "MWI",
1311
+ currency: "USD",
1312
+ phoneCode: "+265",
1313
+ name: "Malawi",
1314
+ native: "Malawi",
1315
+ vat: 16.5
1316
+ },
1317
+ {
1318
+ code2: "MY",
1319
+ code3: "MYS",
1320
+ currency: "USD",
1321
+ phoneCode: "+60",
1322
+ name: "Malaysia",
1323
+ native: "Malaysia",
1324
+ vat: 6
1325
+ },
1326
+ {
1327
+ code2: "MV",
1328
+ code3: "MDV",
1329
+ currency: "USD",
1330
+ phoneCode: "+960",
1331
+ name: "Maldives",
1332
+ native: "Maldives",
1333
+ vat: 6
1334
+ },
1335
+ {
1336
+ code2: "ML",
1337
+ code3: "MLI",
1338
+ currency: "USD",
1339
+ phoneCode: "+223",
1340
+ name: "Mali",
1341
+ native: "Mali",
1342
+ vat: 18,
1343
+ sanctions: true
1344
+ },
1345
+ {
1346
+ code2: "MT",
1347
+ code3: "MLT",
1348
+ currency: "EUR",
1349
+ phoneCode: "+356",
1350
+ name: "Malta",
1351
+ native: "Malta",
1352
+ vat: 18
1353
+ },
1354
+ {
1355
+ code2: "MQ",
1356
+ code3: "MTQ",
1357
+ currency: "USD",
1358
+ phoneCode: "+596",
1359
+ name: "Martinique",
1360
+ native: "Martinique",
1361
+ vat: 8.5
1362
+ },
1363
+ {
1364
+ code2: "MR",
1365
+ code3: "MRT",
1366
+ currency: "USD",
1367
+ phoneCode: "+222",
1368
+ name: "Mauritania",
1369
+ native: "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627",
1370
+ vat: 16
1371
+ },
1372
+ {
1373
+ code2: "MU",
1374
+ code3: "MUS",
1375
+ currency: "USD",
1376
+ phoneCode: "+230",
1377
+ name: "Mauritius",
1378
+ native: "Maurice",
1379
+ vat: 15
1380
+ },
1381
+ {
1382
+ code2: "MX",
1383
+ code3: "MEX",
1384
+ currency: "USD",
1385
+ phoneCode: "+52",
1386
+ name: "Mexico",
1387
+ native: "M\xE9xico",
1388
+ vat: 16
1389
+ },
1390
+ {
1391
+ code2: "FM",
1392
+ code3: "FSM",
1393
+ currency: "USD",
1394
+ phoneCode: "+691",
1395
+ name: "Micronesia",
1396
+ native: "Micronesia",
1397
+ vat: 5
1398
+ },
1399
+ {
1400
+ code2: "MD",
1401
+ code3: "MDA",
1402
+ currency: "EUR",
1403
+ phoneCode: "+373",
1404
+ name: "Moldova",
1405
+ native: "Moldova",
1406
+ vat: 20
1407
+ },
1408
+ {
1409
+ code2: "MC",
1410
+ code3: "MCO",
1411
+ currency: "EUR",
1412
+ phoneCode: "+377",
1413
+ name: "Monaco",
1414
+ native: "Monaco",
1415
+ vat: 20
1416
+ },
1417
+ {
1418
+ code2: "MN",
1419
+ code3: "MNG",
1420
+ currency: "USD",
1421
+ phoneCode: "+976",
1422
+ name: "Mongolia",
1423
+ native: "\u041C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441",
1424
+ vat: 10
1425
+ },
1426
+ {
1427
+ code2: "ME",
1428
+ code3: "MNE",
1429
+ currency: "EUR",
1430
+ phoneCode: "+382",
1431
+ name: "Montenegro",
1432
+ native: "\u0426\u0440\u043D\u0430 \u0413\u043E\u0440\u0430",
1433
+ vat: 21
1434
+ },
1435
+ {
1436
+ code2: "MS",
1437
+ code3: "MSR",
1438
+ currency: "USD",
1439
+ phoneCode: "+664",
1440
+ name: "Montserrat",
1441
+ native: "Montserrat",
1442
+ vat: 15
1443
+ },
1444
+ {
1445
+ code2: "MA",
1446
+ code3: "MAR",
1447
+ currency: "USD",
1448
+ phoneCode: "+212",
1449
+ name: "Morocco",
1450
+ native: "\u0627\u0644\u0645\u063A\u0631\u0628",
1451
+ vat: 20
1452
+ },
1453
+ {
1454
+ code2: "MZ",
1455
+ code3: "MOZ",
1456
+ currency: "USD",
1457
+ phoneCode: "+258",
1458
+ name: "Mozambique",
1459
+ native: "Mo\xE7ambique",
1460
+ vat: 17,
1461
+ sanctions: true
1462
+ },
1463
+ {
1464
+ code2: "NA",
1465
+ code3: "NAM",
1466
+ currency: "USD",
1467
+ phoneCode: "+264",
1468
+ name: "Namibia",
1469
+ native: "Namibia",
1470
+ vat: 15
1471
+ },
1472
+ {
1473
+ code2: "NP",
1474
+ code3: "NPL",
1475
+ currency: "USD",
1476
+ phoneCode: "+977",
1477
+ name: "Nepal",
1478
+ native: "\u0928\u0947\u092A\u093E\u0932",
1479
+ vat: 13
1480
+ },
1481
+ {
1482
+ code2: "NL",
1483
+ code3: "NLD",
1484
+ currency: "EUR",
1485
+ phoneCode: "+31",
1486
+ name: "Netherlands",
1487
+ native: "Nederland",
1488
+ vat: 21
1489
+ },
1490
+ {
1491
+ code2: "NZ",
1492
+ code3: "NZL",
1493
+ currency: "USD",
1494
+ phoneCode: "+64",
1495
+ name: "New Zealand",
1496
+ native: "New Zealand",
1497
+ vat: 15
1498
+ },
1499
+ {
1500
+ code2: "NI",
1501
+ code3: "NIC",
1502
+ currency: "USD",
1503
+ phoneCode: "+505",
1504
+ name: "Nicaragua",
1505
+ native: "Nicaragua",
1506
+ vat: 15
1507
+ },
1508
+ {
1509
+ code2: "NE",
1510
+ code3: "NER",
1511
+ currency: "USD",
1512
+ phoneCode: "+227",
1513
+ name: "Niger",
1514
+ native: "Niger",
1515
+ vat: 19
1516
+ },
1517
+ {
1518
+ code2: "NG",
1519
+ code3: "NGA",
1520
+ currency: "USD",
1521
+ phoneCode: "+234",
1522
+ name: "Nigeria",
1523
+ native: "Nigeria",
1524
+ vat: 7.5,
1525
+ sanctions: true
1526
+ },
1527
+ {
1528
+ code2: "NU",
1529
+ code3: "NIU",
1530
+ currency: "USD",
1531
+ phoneCode: "+683",
1532
+ name: "Niue",
1533
+ native: "Niu\u0113",
1534
+ vat: 12.5
1535
+ },
1536
+ {
1537
+ code2: "NF",
1538
+ code3: "NFK",
1539
+ currency: "USD",
1540
+ phoneCode: "+672",
1541
+ name: "Norfolk Island",
1542
+ native: "Norfolk Island",
1543
+ vat: 12
1544
+ },
1545
+ {
1546
+ code2: "KP",
1547
+ code3: "PRK",
1548
+ currency: "USD",
1549
+ phoneCode: "+850",
1550
+ name: "North Korea",
1551
+ native: "\uBD81\uD55C",
1552
+ vat: 10,
1553
+ sanctions: true
1554
+ },
1555
+ {
1556
+ code2: "NO",
1557
+ code3: "NOR",
1558
+ currency: "EUR",
1559
+ phoneCode: "+47",
1560
+ name: "Norway",
1561
+ native: "Norge",
1562
+ vat: 25
1563
+ },
1564
+ {
1565
+ code2: "OM",
1566
+ code3: "OMN",
1567
+ currency: "USD",
1568
+ phoneCode: "+968",
1569
+ name: "Oman",
1570
+ native: "\u0639\u0645\u0627\u0646",
1571
+ vat: 5
1572
+ },
1573
+ {
1574
+ code2: "PK",
1575
+ code3: "PAK",
1576
+ currency: "USD",
1577
+ phoneCode: "+92",
1578
+ name: "Pakistan",
1579
+ native: "Pakistan",
1580
+ vat: 17
1581
+ },
1582
+ {
1583
+ code2: "PS",
1584
+ code3: "PSE",
1585
+ currency: "USD",
1586
+ phoneCode: "+970",
1587
+ name: "Palestine",
1588
+ native: "\u0641\u0644\u0633\u0637\u064A\u0646",
1589
+ vat: 16
1590
+ },
1591
+ {
1592
+ code2: "PA",
1593
+ code3: "PAN",
1594
+ currency: "USD",
1595
+ phoneCode: "+507",
1596
+ name: "Panama",
1597
+ native: "Panam\xE1",
1598
+ vat: 7,
1599
+ sanctions: true
1600
+ },
1601
+ {
1602
+ code2: "PG",
1603
+ code3: "PNG",
1604
+ currency: "USD",
1605
+ phoneCode: "+675",
1606
+ name: "Papua New Guinea",
1607
+ native: "Papua Niugini",
1608
+ vat: 10
1609
+ },
1610
+ {
1611
+ code2: "PY",
1612
+ code3: "PRY",
1613
+ currency: "USD",
1614
+ phoneCode: "+595",
1615
+ name: "Paraguay",
1616
+ native: "Paraguay",
1617
+ vat: 10
1618
+ },
1619
+ {
1620
+ code2: "PE",
1621
+ code3: "PER",
1622
+ currency: "USD",
1623
+ phoneCode: "+51",
1624
+ name: "Peru",
1625
+ native: "Per\xFA",
1626
+ vat: 18
1627
+ },
1628
+ {
1629
+ code2: "PH",
1630
+ code3: "PHL",
1631
+ currency: "USD",
1632
+ phoneCode: "+63",
1633
+ name: "Philippines",
1634
+ native: "Pilipinas",
1635
+ vat: 12,
1636
+ sanctions: true
1637
+ },
1638
+ {
1639
+ code2: "PL",
1640
+ code3: "POL",
1641
+ currency: "PLN",
1642
+ phoneCode: "+48",
1643
+ name: "Poland",
1644
+ native: "Polska",
1645
+ vat: 23,
1646
+ priority: 1
1647
+ },
1648
+ {
1649
+ code2: "PT",
1650
+ code3: "PRT",
1651
+ currency: "EUR",
1652
+ phoneCode: "+351",
1653
+ name: "Portugal",
1654
+ native: "Portugal",
1655
+ vat: 23
1656
+ },
1657
+ {
1658
+ code2: "PR",
1659
+ code3: "PRI",
1660
+ currency: "USD",
1661
+ phoneCode: "+1",
1662
+ name: "Puerto Rico",
1663
+ native: "Puerto Rico",
1664
+ vat: 11.5
1665
+ },
1666
+ {
1667
+ code2: "QA",
1668
+ code3: "QAT",
1669
+ currency: "USD",
1670
+ phoneCode: "+974",
1671
+ name: "Qatar",
1672
+ native: "\u0642\u0637\u0631",
1673
+ vat: 5
1674
+ },
1675
+ {
1676
+ code2: "CG",
1677
+ code3: "COG",
1678
+ currency: "USD",
1679
+ phoneCode: "+242",
1680
+ name: "Republic of the Congo",
1681
+ native: "R\xE9publique du Congo",
1682
+ vat: 18
1683
+ },
1684
+ {
1685
+ code2: "RE",
1686
+ code3: "REU",
1687
+ currency: "USD",
1688
+ phoneCode: "+262",
1689
+ name: "R\xE9union",
1690
+ native: "La R\xE9union",
1691
+ vat: 8.5
1692
+ },
1693
+ {
1694
+ code2: "RO",
1695
+ code3: "ROU",
1696
+ currency: "RON",
1697
+ phoneCode: "+40",
1698
+ name: "Romania",
1699
+ native: "Rom\xE2nia",
1700
+ vat: 19
1701
+ },
1702
+ {
1703
+ code2: "RU",
1704
+ code3: "RUS",
1705
+ currency: "RUB",
1706
+ phoneCode: "+7",
1707
+ name: "Russia",
1708
+ native: "\u0420\u043E\u0441\u0441\u0438\u044F",
1709
+ vat: 20,
1710
+ sanctions: true
1711
+ },
1712
+ {
1713
+ code2: "RW",
1714
+ code3: "RWA",
1715
+ currency: "USD",
1716
+ phoneCode: "+250",
1717
+ name: "Rwanda",
1718
+ native: "Rwanda",
1719
+ vat: 18
1720
+ },
1721
+ {
1722
+ code2: "BL",
1723
+ code3: "BLM",
1724
+ currency: "USD",
1725
+ phoneCode: "+590",
1726
+ name: "Saint Barth\xE9lemy",
1727
+ native: "Saint-Barth\xE9lemy",
1728
+ vat: 8.5
1729
+ },
1730
+ {
1731
+ code2: "KN",
1732
+ code3: "KNA",
1733
+ currency: "USD",
1734
+ phoneCode: "+869",
1735
+ name: "Saint Kitts and Nevis",
1736
+ native: "Saint Kitts and Nevis",
1737
+ vat: 17
1738
+ },
1739
+ {
1740
+ code2: "LC",
1741
+ code3: "LCA",
1742
+ currency: "USD",
1743
+ phoneCode: "+1",
1744
+ name: "Saint Lucia",
1745
+ native: "Saint Lucia",
1746
+ vat: 12.5
1747
+ },
1748
+ {
1749
+ code2: "MF",
1750
+ code3: "MAF",
1751
+ currency: "USD",
1752
+ phoneCode: "+590",
1753
+ name: "Saint Martin",
1754
+ native: "Saint-Martin",
1755
+ vat: 15
1756
+ },
1757
+ {
1758
+ code2: "VC",
1759
+ code3: "VCT",
1760
+ currency: "USD",
1761
+ phoneCode: "+1",
1762
+ name: "Saint Vincent and the Grenadines",
1763
+ native: "Saint Vincent and the Grenadines",
1764
+ vat: 16
1765
+ },
1766
+ {
1767
+ code2: "WS",
1768
+ code3: "WSM",
1769
+ currency: "USD",
1770
+ phoneCode: "+685",
1771
+ name: "Samoa",
1772
+ native: "Samoa",
1773
+ vat: 15
1774
+ },
1775
+ {
1776
+ code2: "SM",
1777
+ code3: "SMR",
1778
+ currency: "USD",
1779
+ phoneCode: "+378",
1780
+ name: "San Marino",
1781
+ native: "San Marino",
1782
+ vat: 17
1783
+ },
1784
+ {
1785
+ code2: "SA",
1786
+ code3: "SAU",
1787
+ currency: "USD",
1788
+ phoneCode: "+966",
1789
+ name: "Saudi Arabia",
1790
+ native: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629",
1791
+ vat: 5
1792
+ },
1793
+ {
1794
+ code2: "SN",
1795
+ code3: "SEN",
1796
+ currency: "USD",
1797
+ phoneCode: "+221",
1798
+ name: "Senegal",
1799
+ native: "S\xE9n\xE9gal",
1800
+ vat: 18,
1801
+ sanctions: true
1802
+ },
1803
+ {
1804
+ code2: "RS",
1805
+ code3: "SRB",
1806
+ currency: "EUR",
1807
+ phoneCode: "+381",
1808
+ name: "Serbia",
1809
+ native: "\u0421\u0440\u0431\u0438\u0458\u0430",
1810
+ vat: 20
1811
+ },
1812
+ {
1813
+ code2: "SC",
1814
+ code3: "SYC",
1815
+ currency: "USD",
1816
+ phoneCode: "+248",
1817
+ name: "Seychelles",
1818
+ native: "Seychelles",
1819
+ vat: 15
1820
+ },
1821
+ {
1822
+ code2: "SL",
1823
+ code3: "SLE",
1824
+ currency: "USD",
1825
+ phoneCode: "+232",
1826
+ name: "Sierra Leone",
1827
+ native: "Sierra Leone",
1828
+ vat: 15
1829
+ },
1830
+ {
1831
+ code2: "SG",
1832
+ code3: "SGP",
1833
+ currency: "USD",
1834
+ phoneCode: "+65",
1835
+ name: "Singapore",
1836
+ native: "Singapore",
1837
+ vat: 7
1838
+ },
1839
+ {
1840
+ code2: "SX",
1841
+ code3: "SXM",
1842
+ currency: "USD",
1843
+ phoneCode: "+1",
1844
+ name: "Sint Maarten",
1845
+ native: "Sint Maarten",
1846
+ vat: 5
1847
+ },
1848
+ {
1849
+ code2: "SK",
1850
+ code3: "SVK",
1851
+ currency: "EUR",
1852
+ phoneCode: "+421",
1853
+ name: "Slovakia",
1854
+ native: "Slovensko",
1855
+ vat: 20,
1856
+ priority: 1
1857
+ },
1858
+ {
1859
+ code2: "SI",
1860
+ code3: "SVN",
1861
+ currency: "EUR",
1862
+ phoneCode: "+386",
1863
+ name: "Slovenia",
1864
+ native: "Slovenija",
1865
+ vat: 22
1866
+ },
1867
+ {
1868
+ code2: "SO",
1869
+ code3: "SOM",
1870
+ currency: "USD",
1871
+ phoneCode: "+252",
1872
+ name: "Somalia",
1873
+ native: "Soomaaliya",
1874
+ vat: 10
1875
+ },
1876
+ {
1877
+ code2: "ZA",
1878
+ code3: "ZAF",
1879
+ currency: "USD",
1880
+ phoneCode: "+27",
1881
+ name: "South Africa",
1882
+ native: "South Africa",
1883
+ vat: 15,
1884
+ sanctions: true
1885
+ },
1886
+ {
1887
+ code2: "KR",
1888
+ code3: "KOR",
1889
+ currency: "USD",
1890
+ phoneCode: "+82",
1891
+ name: "South Korea",
1892
+ native: "\uB300\uD55C\uBBFC\uAD6D",
1893
+ vat: 10
1894
+ },
1895
+ {
1896
+ code2: "SS",
1897
+ code3: "SSD",
1898
+ currency: "USD",
1899
+ phoneCode: "+211",
1900
+ name: "South Sudan",
1901
+ native: "South Sudan",
1902
+ vat: 15,
1903
+ sanctions: true
1904
+ },
1905
+ {
1906
+ code2: "ES",
1907
+ code3: "ESP",
1908
+ currency: "EUR",
1909
+ phoneCode: "+34",
1910
+ name: "Spain",
1911
+ native: "Espa\xF1a",
1912
+ vat: 21
1913
+ },
1914
+ {
1915
+ code2: "LK",
1916
+ code3: "LKA",
1917
+ currency: "USD",
1918
+ phoneCode: "+94",
1919
+ name: "Sri Lanka",
1920
+ native: "\u015Br\u012B la\u1E43k\u0101va",
1921
+ vat: 8
1922
+ },
1923
+ {
1924
+ code2: "SD",
1925
+ code3: "SDN",
1926
+ currency: "USD",
1927
+ phoneCode: "+249",
1928
+ name: "Sudan",
1929
+ native: "\u0627\u0644\u0633\u0648\u062F\u0627\u0646",
1930
+ vat: 17
1931
+ },
1932
+ {
1933
+ code2: "SR",
1934
+ code3: "SUR",
1935
+ currency: "USD",
1936
+ phoneCode: "+597",
1937
+ name: "Suriname",
1938
+ native: "Suriname",
1939
+ vat: 10
1940
+ },
1941
+ {
1942
+ code2: "SJ",
1943
+ code3: "SJM",
1944
+ currency: "USD",
1945
+ phoneCode: "+47",
1946
+ name: "Svalbard and Jan Mayen",
1947
+ native: "Svalbard og Jan Mayen",
1948
+ vat: 25
1949
+ },
1950
+ {
1951
+ code2: "SZ",
1952
+ code3: "SWZ",
1953
+ currency: "USD",
1954
+ phoneCode: "+268",
1955
+ name: "Swaziland",
1956
+ native: "Eswatini",
1957
+ vat: 15
1958
+ },
1959
+ {
1960
+ code2: "SE",
1961
+ code3: "SWE",
1962
+ currency: "SEK",
1963
+ phoneCode: "+46",
1964
+ name: "Sweden",
1965
+ native: "Sverige",
1966
+ vat: 25
1967
+ },
1968
+ {
1969
+ code2: "CH",
1970
+ code3: "CHE",
1971
+ currency: "CHF",
1972
+ phoneCode: "+41",
1973
+ name: "Switzerland",
1974
+ native: "Schweiz",
1975
+ vat: 7.7
1976
+ },
1977
+ {
1978
+ code2: "TW",
1979
+ code3: "TWN",
1980
+ currency: "USD",
1981
+ phoneCode: "+886",
1982
+ name: "Taiwan",
1983
+ native: "\u81FA\u7063",
1984
+ vat: 5
1985
+ },
1986
+ {
1987
+ code2: "TJ",
1988
+ code3: "TJK",
1989
+ currency: "USD",
1990
+ phoneCode: "+992",
1991
+ name: "Tajikistan",
1992
+ native: "\u0422\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D",
1993
+ vat: 15
1994
+ },
1995
+ {
1996
+ code2: "TZ",
1997
+ code3: "TZA",
1998
+ currency: "USD",
1999
+ phoneCode: "+255",
2000
+ name: "Tanzania",
2001
+ native: "Tanzania",
2002
+ vat: 18,
2003
+ sanctions: true
2004
+ },
2005
+ {
2006
+ code2: "TH",
2007
+ code3: "THA",
2008
+ currency: "USD",
2009
+ phoneCode: "+66",
2010
+ name: "Thailand",
2011
+ native: "\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22",
2012
+ vat: 7
2013
+ },
2014
+ {
2015
+ code2: "TG",
2016
+ code3: "TGO",
2017
+ currency: "USD",
2018
+ phoneCode: "+228",
2019
+ name: "Togo",
2020
+ native: "Togo",
2021
+ vat: 18
2022
+ },
2023
+ {
2024
+ code2: "TO",
2025
+ code3: "TON",
2026
+ currency: "USD",
2027
+ phoneCode: "+676",
2028
+ name: "Tonga",
2029
+ native: "Tonga",
2030
+ vat: 15
2031
+ },
2032
+ {
2033
+ code2: "TT",
2034
+ code3: "TTO",
2035
+ currency: "USD",
2036
+ phoneCode: "+868",
2037
+ name: "Trinidad and Tobago",
2038
+ native: "Trinidad and Tobago",
2039
+ vat: 12.5,
2040
+ sanctions: true
2041
+ },
2042
+ {
2043
+ code2: "TN",
2044
+ code3: "TUN",
2045
+ currency: "USD",
2046
+ phoneCode: "+216",
2047
+ name: "Tunisia",
2048
+ native: "\u062A\u0648\u0646\u0633",
2049
+ vat: 19
2050
+ },
2051
+ {
2052
+ code2: "TR",
2053
+ code3: "TUR",
2054
+ currency: "USD",
2055
+ phoneCode: "+90",
2056
+ name: "Turkey",
2057
+ native: "T\xFCrkiye",
2058
+ vat: 18
2059
+ },
2060
+ {
2061
+ code2: "TM",
2062
+ code3: "TKM",
2063
+ currency: "USD",
2064
+ phoneCode: "+993",
2065
+ name: "Turkmenistan",
2066
+ native: "T\xFCrkmenistan",
2067
+ vat: 15
2068
+ },
2069
+ {
2070
+ code2: "UM",
2071
+ code3: "UMI",
2072
+ currency: "USD",
2073
+ phoneCode: "+1",
2074
+ name: "U.S. Minor Outlying Islands",
2075
+ native: "United States Minor Outlying Islands",
2076
+ vat: 4
2077
+ },
2078
+ {
2079
+ code2: "VI",
2080
+ code3: "VIR",
2081
+ currency: "USD",
2082
+ phoneCode: "+1",
2083
+ name: "U.S. Virgin Islands",
2084
+ native: "United States Virgin Islands",
2085
+ vat: 4
2086
+ },
2087
+ {
2088
+ code2: "UG",
2089
+ code3: "UGA",
2090
+ currency: "USD",
2091
+ phoneCode: "+256",
2092
+ name: "Uganda",
2093
+ native: "Uganda",
2094
+ vat: 18,
2095
+ sanctions: true
2096
+ },
2097
+ {
2098
+ code2: "UA",
2099
+ code3: "UKR",
2100
+ currency: "UAH",
2101
+ phoneCode: "+380",
2102
+ name: "Ukraine",
2103
+ native: "\u0423\u043A\u0440\u0430\u0457\u043D\u0430",
2104
+ vat: 20
2105
+ },
2106
+ {
2107
+ code2: "AE",
2108
+ code3: "ARE",
2109
+ currency: "USD",
2110
+ phoneCode: "+971",
2111
+ name: "United Arab Emirates",
2112
+ native: "\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629",
2113
+ vat: 5,
2114
+ sanctions: true
2115
+ },
2116
+ {
2117
+ code2: "GB",
2118
+ code3: "GBR",
2119
+ currency: "GBP",
2120
+ phoneCode: "+44",
2121
+ name: "United Kingdom",
2122
+ native: "United Kingdom",
2123
+ vat: 20
2124
+ },
2125
+ {
2126
+ code2: "UZ",
2127
+ code3: "UZB",
2128
+ currency: "USD",
2129
+ phoneCode: "+998",
2130
+ name: "Uzbekistan",
2131
+ native: "O'zbekiston",
2132
+ vat: 20
2133
+ },
2134
+ {
2135
+ code2: "VU",
2136
+ code3: "VUT",
2137
+ currency: "USD",
2138
+ phoneCode: "+678",
2139
+ name: "Vanuatu",
2140
+ native: "Vanuatu",
2141
+ vat: 15,
2142
+ sanctions: true
2143
+ },
2144
+ {
2145
+ code2: "VE",
2146
+ code3: "VEN",
2147
+ currency: "USD",
2148
+ phoneCode: "+58",
2149
+ name: "Venezuela",
2150
+ native: "Venezuela",
2151
+ vat: 16
2152
+ },
2153
+ {
2154
+ code2: "VN",
2155
+ code3: "VNM",
2156
+ currency: "USD",
2157
+ phoneCode: "+84",
2158
+ name: "Vietnam",
2159
+ native: "Vi\u1EC7t Nam",
2160
+ vat: 10,
2161
+ sanctions: true
2162
+ },
2163
+ {
2164
+ code2: "WF",
2165
+ code3: "WLF",
2166
+ currency: "USD",
2167
+ phoneCode: "+681",
2168
+ name: "Wallis and Futuna",
2169
+ native: "Wallis et Futuna",
2170
+ vat: 6
2171
+ },
2172
+ {
2173
+ code2: "EH",
2174
+ code3: "ESH",
2175
+ currency: "USD",
2176
+ phoneCode: "+212",
2177
+ name: "Western Sahara",
2178
+ native: "\u0627\u0644\u0635\u062D\u0631\u0627\u0621 \u0627\u0644\u063A\u0631\u0628\u064A\u0629",
2179
+ vat: 20
2180
+ },
2181
+ {
2182
+ code2: "YE",
2183
+ code3: "YEM",
2184
+ currency: "USD",
2185
+ phoneCode: "+967",
2186
+ name: "Yemen",
2187
+ native: "\u0627\u0644\u064A\u064E\u0645\u064E\u0646",
2188
+ vat: 5,
2189
+ sanctions: true
2190
+ },
2191
+ {
2192
+ code2: "ZM",
2193
+ code3: "ZMB",
2194
+ currency: "USD",
2195
+ phoneCode: "+260",
2196
+ name: "Zambia",
2197
+ native: "Zambia",
2198
+ vat: 16
2199
+ },
2200
+ {
2201
+ code2: "ZW",
2202
+ code3: "ZWE",
2203
+ currency: "USD",
2204
+ phoneCode: "+263",
2205
+ name: "Zimbabwe",
2206
+ native: "Zimbabwe",
2207
+ vat: 14.5
2208
+ }
2209
+ ];
2210
+
2211
+ const cryptoNetworks = [
2212
+ {
2213
+ code: "ETH",
2214
+ name: "Ethereum",
2215
+ nativeCurrency: "ETH",
2216
+ chainId: 1,
2217
+ rpcUrl: "https://mainnet.infura.io/v3/",
2218
+ explorerUrl: "https://etherscan.io"
2219
+ },
2220
+ {
2221
+ code: "BTC",
2222
+ name: "Bitcoin",
2223
+ nativeCurrency: "BTC",
2224
+ explorerUrl: "https://blockstream.info"
2225
+ },
2226
+ {
2227
+ code: "BSC",
2228
+ name: "Binance Smart Chain",
2229
+ nativeCurrency: "BNB",
2230
+ chainId: 56,
2231
+ rpcUrl: "https://bsc-dataseed1.binance.org",
2232
+ explorerUrl: "https://bscscan.com"
2233
+ },
2234
+ {
2235
+ code: "POLYGON",
2236
+ name: "Polygon",
2237
+ nativeCurrency: "MATIC",
2238
+ chainId: 137,
2239
+ rpcUrl: "https://polygon-rpc.com",
2240
+ explorerUrl: "https://polygonscan.com"
2241
+ },
2242
+ {
2243
+ code: "AVALANCHE",
2244
+ name: "Avalanche C-Chain",
2245
+ nativeCurrency: "AVAX",
2246
+ chainId: 43114,
2247
+ rpcUrl: "https://api.avax.network/ext/bc/C/rpc",
2248
+ explorerUrl: "https://snowtrace.io"
2249
+ },
2250
+ {
2251
+ code: "SOLANA",
2252
+ name: "Solana",
2253
+ nativeCurrency: "SOL",
2254
+ rpcUrl: "https://api.mainnet-beta.solana.com",
2255
+ explorerUrl: "https://explorer.solana.com"
2256
+ },
2257
+ {
2258
+ code: "CARDANO",
2259
+ name: "Cardano",
2260
+ nativeCurrency: "ADA",
2261
+ explorerUrl: "https://cardanoscan.io"
2262
+ },
2263
+ {
2264
+ code: "POLKADOT",
2265
+ name: "Polkadot",
2266
+ nativeCurrency: "DOT",
2267
+ explorerUrl: "https://polkadot.subscan.io"
2268
+ },
2269
+ {
2270
+ code: "COSMOS",
2271
+ name: "Cosmos Hub",
2272
+ nativeCurrency: "ATOM",
2273
+ explorerUrl: "https://www.mintscan.io/cosmos"
2274
+ },
2275
+ {
2276
+ code: "ARBITRUM",
2277
+ name: "Arbitrum One",
2278
+ nativeCurrency: "ETH",
2279
+ chainId: 42161,
2280
+ rpcUrl: "https://arb1.arbitrum.io/rpc",
2281
+ explorerUrl: "https://arbiscan.io"
2282
+ },
2283
+ {
2284
+ code: "OPTIMISM",
2285
+ name: "Optimism",
2286
+ nativeCurrency: "ETH",
2287
+ chainId: 10,
2288
+ rpcUrl: "https://mainnet.optimism.io",
2289
+ explorerUrl: "https://optimistic.etherscan.io"
2290
+ },
2291
+ {
2292
+ code: "FANTOM",
2293
+ name: "Fantom Opera",
2294
+ nativeCurrency: "FTM",
2295
+ chainId: 250,
2296
+ rpcUrl: "https://rpc.ftm.tools",
2297
+ explorerUrl: "https://ftmscan.com"
2298
+ },
2299
+ {
2300
+ code: "TRON",
2301
+ name: "Tron",
2302
+ nativeCurrency: "TRX",
2303
+ explorerUrl: "https://tronscan.org"
2304
+ },
2305
+ {
2306
+ code: "NEAR",
2307
+ name: "NEAR Protocol",
2308
+ nativeCurrency: "NEAR",
2309
+ explorerUrl: "https://explorer.near.org"
2310
+ },
2311
+ {
2312
+ code: "ALGORAND",
2313
+ name: "Algorand",
2314
+ nativeCurrency: "ALGO",
2315
+ explorerUrl: "https://algoexplorer.io"
2316
+ },
2317
+ {
2318
+ code: "TEZOS",
2319
+ name: "Tezos",
2320
+ nativeCurrency: "XTZ",
2321
+ explorerUrl: "https://tzstats.com"
2322
+ },
2323
+ {
2324
+ code: "CRONOS",
2325
+ name: "Cronos",
2326
+ nativeCurrency: "CRO",
2327
+ chainId: 25,
2328
+ rpcUrl: "https://evm.cronos.org",
2329
+ explorerUrl: "https://cronoscan.com"
2330
+ },
2331
+ {
2332
+ code: "MOONBEAM",
2333
+ name: "Moonbeam",
2334
+ nativeCurrency: "GLMR",
2335
+ chainId: 1284,
2336
+ rpcUrl: "https://rpc.api.moonbeam.network",
2337
+ explorerUrl: "https://moonscan.io"
2338
+ },
2339
+ {
2340
+ code: "AURORA",
2341
+ name: "Aurora",
2342
+ nativeCurrency: "ETH",
2343
+ chainId: 1313161554,
2344
+ rpcUrl: "https://mainnet.aurora.dev",
2345
+ explorerUrl: "https://aurorascan.dev"
2346
+ },
2347
+ {
2348
+ code: "HARMONY",
2349
+ name: "Harmony",
2350
+ nativeCurrency: "ONE",
2351
+ chainId: 16666e5,
2352
+ rpcUrl: "https://api.harmony.one",
2353
+ explorerUrl: "https://explorer.harmony.one"
2354
+ },
2355
+ {
2356
+ code: "CELO",
2357
+ name: "Celo",
2358
+ nativeCurrency: "CELO",
2359
+ chainId: 42220,
2360
+ rpcUrl: "https://forno.celo.org",
2361
+ explorerUrl: "https://explorer.celo.org"
2362
+ },
2363
+ {
2364
+ code: "KAVA",
2365
+ name: "Kava EVM",
2366
+ nativeCurrency: "KAVA",
2367
+ chainId: 2222,
2368
+ rpcUrl: "https://evm.kava.io",
2369
+ explorerUrl: "https://explorer.kava.io"
2370
+ },
2371
+ {
2372
+ code: "XRP",
2373
+ name: "XRP Ledger",
2374
+ nativeCurrency: "XRP",
2375
+ explorerUrl: "https://xrpscan.com"
2376
+ },
2377
+ {
2378
+ code: "LTC",
2379
+ name: "Litecoin",
2380
+ nativeCurrency: "LTC",
2381
+ explorerUrl: "https://blockchair.com/litecoin"
2382
+ },
2383
+ {
2384
+ code: "DOGE",
2385
+ name: "Dogecoin",
2386
+ nativeCurrency: "DOGE",
2387
+ explorerUrl: "https://dogechain.info"
2388
+ }
2389
+ ];
2390
+
2391
+ const currencies = [
2392
+ // 🔹 FIAT Currencies
2393
+ {
2394
+ code: "CZK",
2395
+ symbol: "K\u010D",
2396
+ symbolBefore: false,
2397
+ name: "Czech Koruna",
2398
+ providers: ["CNB", "currencyLayer", "trademade-live", "trademade-convert", "currencyCloud"],
2399
+ decimals: 2,
2400
+ networks: null,
2401
+ type: "FIAT"
2402
+ },
2403
+ {
2404
+ code: "EUR",
2405
+ symbol: "\u20AC",
2406
+ symbolBefore: false,
2407
+ name: "Euro",
2408
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "currencyCloud"],
2409
+ decimals: 2,
2410
+ networks: null,
2411
+ type: "FIAT"
2412
+ },
2413
+ {
2414
+ code: "USD",
2415
+ symbol: "$",
2416
+ symbolBefore: true,
2417
+ name: "United States Dollar",
2418
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "currencyCloud"],
2419
+ decimals: 2,
2420
+ networks: null,
2421
+ type: "FIAT"
2422
+ },
2423
+ {
2424
+ code: "PLN",
2425
+ symbol: "z\u0142",
2426
+ symbolBefore: false,
2427
+ name: "Polish Z\u0142oty",
2428
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "currencyCloud"],
2429
+ decimals: 2,
2430
+ networks: null,
2431
+ type: "FIAT"
2432
+ },
2433
+ {
2434
+ code: "RON",
2435
+ symbol: "lei",
2436
+ symbolBefore: false,
2437
+ name: "Romanian Leu",
2438
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2439
+ decimals: 2,
2440
+ networks: null,
2441
+ type: "FIAT"
2442
+ },
2443
+ {
2444
+ code: "GBP",
2445
+ symbol: "\xA3",
2446
+ symbolBefore: true,
2447
+ name: "British Pound Sterling",
2448
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB", "currencyCloud"],
2449
+ decimals: 2,
2450
+ networks: null,
2451
+ type: "FIAT"
2452
+ },
2453
+ {
2454
+ code: "RUB",
2455
+ symbol: "\u20BD",
2456
+ symbolBefore: false,
2457
+ name: "Russian Ruble",
2458
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2459
+ decimals: 2,
2460
+ networks: null,
2461
+ type: "FIAT"
2462
+ },
2463
+ {
2464
+ code: "HUF",
2465
+ symbol: "Ft",
2466
+ symbolBefore: false,
2467
+ name: "Hungarian Forint",
2468
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2469
+ decimals: 2,
2470
+ networks: null,
2471
+ type: "FIAT"
2472
+ },
2473
+ {
2474
+ code: "CHF",
2475
+ symbol: "SFr.",
2476
+ symbolBefore: true,
2477
+ name: "Swiss Franc",
2478
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2479
+ decimals: 2,
2480
+ networks: null,
2481
+ type: "FIAT"
2482
+ },
2483
+ {
2484
+ code: "DKK",
2485
+ symbol: "kr",
2486
+ symbolBefore: false,
2487
+ name: "Danish Krone",
2488
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2489
+ decimals: 2,
2490
+ networks: null,
2491
+ type: "FIAT"
2492
+ },
2493
+ {
2494
+ code: "SEK",
2495
+ symbol: "kr",
2496
+ symbolBefore: false,
2497
+ name: "Swedish Krona",
2498
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2499
+ decimals: 2,
2500
+ networks: null,
2501
+ type: "FIAT"
2502
+ },
2503
+ {
2504
+ code: "HRK",
2505
+ symbol: "kn",
2506
+ symbolBefore: false,
2507
+ name: "Croatian Kuna",
2508
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2509
+ decimals: 2,
2510
+ networks: null,
2511
+ type: "FIAT"
2512
+ },
2513
+ {
2514
+ code: "NOK",
2515
+ symbol: "kr",
2516
+ symbolBefore: false,
2517
+ name: "Norwegian Krone",
2518
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2519
+ decimals: 2,
2520
+ networks: null,
2521
+ type: "FIAT"
2522
+ },
2523
+ {
2524
+ code: "BGN",
2525
+ symbol: "\u043B\u0432",
2526
+ symbolBefore: false,
2527
+ name: "Bulgarian Lev",
2528
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2529
+ decimals: 2,
2530
+ networks: null,
2531
+ type: "FIAT"
2532
+ },
2533
+ {
2534
+ code: "TRY",
2535
+ symbol: "\u20BA",
2536
+ symbolBefore: false,
2537
+ name: "Turkish Lira",
2538
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2539
+ decimals: 2,
2540
+ networks: null,
2541
+ type: "FIAT"
2542
+ },
2543
+ {
2544
+ code: "AUD",
2545
+ symbol: "$",
2546
+ symbolBefore: true,
2547
+ name: "Australian Dollar",
2548
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB", "currencyCloud"],
2549
+ decimals: 2,
2550
+ networks: null,
2551
+ type: "FIAT"
2552
+ },
2553
+ {
2554
+ code: "CAD",
2555
+ symbol: "$",
2556
+ symbolBefore: true,
2557
+ name: "Canadian Dollar",
2558
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB", "currencyCloud"],
2559
+ decimals: 2,
2560
+ networks: null,
2561
+ type: "FIAT"
2562
+ },
2563
+ {
2564
+ code: "JPY",
2565
+ symbol: "\xA5",
2566
+ symbolBefore: true,
2567
+ name: "Japanese Yen",
2568
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2569
+ decimals: 0,
2570
+ networks: null,
2571
+ type: "FIAT"
2572
+ },
2573
+ {
2574
+ code: "CNY",
2575
+ symbol: "\xA5",
2576
+ symbolBefore: true,
2577
+ name: "Chinese Yuan",
2578
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2579
+ decimals: 2,
2580
+ networks: null,
2581
+ type: "FIAT"
2582
+ },
2583
+ {
2584
+ code: "INR",
2585
+ symbol: "\u20B9",
2586
+ symbolBefore: true,
2587
+ name: "Indian Rupee",
2588
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2589
+ decimals: 2,
2590
+ networks: null,
2591
+ type: "FIAT"
2592
+ },
2593
+ {
2594
+ code: "BRL",
2595
+ symbol: "R$",
2596
+ symbolBefore: true,
2597
+ name: "Brazilian Real",
2598
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2599
+ decimals: 2,
2600
+ networks: null,
2601
+ type: "FIAT"
2602
+ },
2603
+ {
2604
+ code: "MXN",
2605
+ symbol: "$",
2606
+ symbolBefore: true,
2607
+ name: "Mexican Peso",
2608
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2609
+ decimals: 2,
2610
+ networks: null,
2611
+ type: "FIAT"
2612
+ },
2613
+ {
2614
+ code: "ZAR",
2615
+ symbol: "R",
2616
+ symbolBefore: true,
2617
+ name: "South African Rand",
2618
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2619
+ decimals: 2,
2620
+ networks: null,
2621
+ type: "FIAT"
2622
+ },
2623
+ {
2624
+ code: "SGD",
2625
+ symbol: "$",
2626
+ symbolBefore: true,
2627
+ name: "Singapore Dollar",
2628
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2629
+ decimals: 2,
2630
+ networks: null,
2631
+ type: "FIAT"
2632
+ },
2633
+ {
2634
+ code: "HKD",
2635
+ symbol: "$",
2636
+ symbolBefore: true,
2637
+ name: "Hong Kong Dollar",
2638
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2639
+ decimals: 2,
2640
+ networks: null,
2641
+ type: "FIAT"
2642
+ },
2643
+ {
2644
+ code: "KRW",
2645
+ symbol: "\u20A9",
2646
+ symbolBefore: true,
2647
+ name: "South Korean Won",
2648
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2649
+ decimals: 0,
2650
+ networks: null,
2651
+ type: "FIAT"
2652
+ },
2653
+ {
2654
+ code: "MYR",
2655
+ symbol: "RM",
2656
+ symbolBefore: true,
2657
+ name: "Malaysian Ringgit",
2658
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2659
+ decimals: 2,
2660
+ networks: null,
2661
+ type: "FIAT"
2662
+ },
2663
+ {
2664
+ code: "THB",
2665
+ symbol: "\u0E3F",
2666
+ symbolBefore: true,
2667
+ name: "Thai Baht",
2668
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2669
+ decimals: 2,
2670
+ networks: null,
2671
+ type: "FIAT"
2672
+ },
2673
+ {
2674
+ code: "IDR",
2675
+ symbol: "Rp",
2676
+ symbolBefore: true,
2677
+ name: "Indonesian Rupiah",
2678
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2679
+ decimals: 2,
2680
+ networks: null,
2681
+ type: "FIAT"
2682
+ },
2683
+ {
2684
+ code: "PHP",
2685
+ symbol: "\u20B1",
2686
+ symbolBefore: true,
2687
+ name: "Philippine Peso",
2688
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2689
+ decimals: 2,
2690
+ networks: null,
2691
+ type: "FIAT"
2692
+ },
2693
+ {
2694
+ code: "AED",
2695
+ symbol: "\u062F.\u0625",
2696
+ symbolBefore: false,
2697
+ name: "UAE Dirham",
2698
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2699
+ decimals: 2,
2700
+ networks: null,
2701
+ type: "FIAT"
2702
+ },
2703
+ {
2704
+ code: "SAR",
2705
+ symbol: "\uFDFC",
2706
+ symbolBefore: false,
2707
+ name: "Saudi Riyal",
2708
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2709
+ decimals: 2,
2710
+ networks: null,
2711
+ type: "FIAT"
2712
+ },
2713
+ {
2714
+ code: "ILS",
2715
+ symbol: "\u20AA",
2716
+ symbolBefore: true,
2717
+ name: "Israeli New Shekel",
2718
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2719
+ decimals: 2,
2720
+ networks: null,
2721
+ type: "FIAT"
2722
+ },
2723
+ {
2724
+ code: "EGP",
2725
+ symbol: "\xA3",
2726
+ symbolBefore: true,
2727
+ name: "Egyptian Pound",
2728
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2729
+ decimals: 2,
2730
+ networks: null,
2731
+ type: "FIAT"
2732
+ },
2733
+ {
2734
+ code: "NGN",
2735
+ symbol: "\u20A6",
2736
+ symbolBefore: true,
2737
+ name: "Nigerian Naira",
2738
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2739
+ decimals: 2,
2740
+ networks: null,
2741
+ type: "FIAT"
2742
+ },
2743
+ {
2744
+ code: "PKR",
2745
+ symbol: "\u20A8",
2746
+ symbolBefore: true,
2747
+ name: "Pakistani Rupee",
2748
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2749
+ decimals: 2,
2750
+ networks: null,
2751
+ type: "FIAT"
2752
+ },
2753
+ {
2754
+ code: "COP",
2755
+ symbol: "$",
2756
+ symbolBefore: true,
2757
+ name: "Colombian Peso",
2758
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2759
+ decimals: 2,
2760
+ networks: null,
2761
+ type: "FIAT"
2762
+ },
2763
+ {
2764
+ code: "CLP",
2765
+ symbol: "$",
2766
+ symbolBefore: true,
2767
+ name: "Chilean Peso",
2768
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2769
+ decimals: 0,
2770
+ networks: null,
2771
+ type: "FIAT"
2772
+ },
2773
+ {
2774
+ code: "PEN",
2775
+ symbol: "S/",
2776
+ symbolBefore: true,
2777
+ name: "Peruvian Sol",
2778
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2779
+ decimals: 2,
2780
+ networks: null,
2781
+ type: "FIAT"
2782
+ },
2783
+ {
2784
+ code: "VND",
2785
+ symbol: "\u20AB",
2786
+ symbolBefore: false,
2787
+ name: "Vietnamese Dong",
2788
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2789
+ decimals: 0,
2790
+ networks: null,
2791
+ type: "FIAT"
2792
+ },
2793
+ {
2794
+ code: "KZT",
2795
+ symbol: "\u20B8",
2796
+ symbolBefore: false,
2797
+ name: "Kazakhstani Tenge",
2798
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2799
+ decimals: 2,
2800
+ networks: null,
2801
+ type: "FIAT"
2802
+ },
2803
+ {
2804
+ code: "UAH",
2805
+ symbol: "\u20B4",
2806
+ symbolBefore: false,
2807
+ name: "Ukrainian Hryvnia",
2808
+ providers: ["currencyLayer", "trademade-live", "trademade-convert", "CNB"],
2809
+ decimals: 2,
2810
+ networks: null,
2811
+ type: "FIAT"
2812
+ },
2813
+ // 🔹 Crypto Currencies
2814
+ {
2815
+ code: "BTC",
2816
+ symbol: "\u20BF",
2817
+ symbolBefore: true,
2818
+ name: "Bitcoin",
2819
+ providers: ["kraken", "binance"],
2820
+ decimals: 8,
2821
+ networks: ["BTC"],
2822
+ type: "CRYPTO"
2823
+ },
2824
+ {
2825
+ code: "ETH",
2826
+ symbol: "\u039E",
2827
+ symbolBefore: true,
2828
+ name: "Ethereum",
2829
+ providers: ["kraken", "binance"],
2830
+ decimals: 18,
2831
+ networks: ["ETH", "ARBITRUM", "OPTIMISM", "POLYGON"],
2832
+ type: "CRYPTO"
2833
+ },
2834
+ {
2835
+ code: "ADA",
2836
+ symbol: "\u20B3",
2837
+ symbolBefore: true,
2838
+ name: "Cardano",
2839
+ providers: ["kraken", "binance"],
2840
+ decimals: 6,
2841
+ networks: ["CARDANO"],
2842
+ type: "CRYPTO"
2843
+ },
2844
+ {
2845
+ code: "DOT",
2846
+ symbol: "\u25CE",
2847
+ symbolBefore: true,
2848
+ name: "Polkadot",
2849
+ providers: ["kraken", "binance"],
2850
+ decimals: 10,
2851
+ networks: ["POLKADOT"],
2852
+ type: "CRYPTO"
2853
+ },
2854
+ {
2855
+ code: "ATOM",
2856
+ symbol: "\u269B",
2857
+ symbolBefore: true,
2858
+ name: "Cosmos",
2859
+ providers: ["kraken", "binance"],
2860
+ decimals: 6,
2861
+ networks: ["COSMOS"],
2862
+ type: "CRYPTO"
2863
+ },
2864
+ {
2865
+ code: "XRP",
2866
+ symbol: "\u01A6",
2867
+ symbolBefore: true,
2868
+ name: "Ripple",
2869
+ providers: ["kraken", "binance"],
2870
+ decimals: 6,
2871
+ networks: ["XRP"],
2872
+ type: "CRYPTO"
2873
+ },
2874
+ {
2875
+ code: "LTC",
2876
+ symbol: "\u0141",
2877
+ symbolBefore: true,
2878
+ name: "Litecoin",
2879
+ providers: ["kraken", "binance"],
2880
+ decimals: 8,
2881
+ networks: ["LTC"],
2882
+ type: "CRYPTO"
2883
+ },
2884
+ {
2885
+ code: "SOL",
2886
+ symbol: "\u25CE",
2887
+ symbolBefore: true,
2888
+ name: "Solana",
2889
+ providers: ["kraken", "binance"],
2890
+ decimals: 9,
2891
+ networks: ["SOLANA"],
2892
+ type: "CRYPTO"
2893
+ },
2894
+ {
2895
+ code: "DOGE",
2896
+ symbol: "\xD0",
2897
+ symbolBefore: true,
2898
+ name: "Dogecoin",
2899
+ providers: ["kraken", "binance"],
2900
+ decimals: 8,
2901
+ networks: ["DOGE"],
2902
+ type: "CRYPTO"
2903
+ },
2904
+ {
2905
+ code: "MATIC",
2906
+ symbol: "M",
2907
+ symbolBefore: true,
2908
+ name: "Polygon",
2909
+ providers: ["kraken", "binance"],
2910
+ decimals: 18,
2911
+ networks: ["ETH", "POLYGON"],
2912
+ type: "CRYPTO"
2913
+ },
2914
+ {
2915
+ code: "AVAX",
2916
+ symbol: "\u26F0",
2917
+ symbolBefore: true,
2918
+ name: "Avalanche",
2919
+ providers: ["kraken", "binance"],
2920
+ decimals: 18,
2921
+ networks: ["AVALANCHE"],
2922
+ type: "CRYPTO"
2923
+ }
2924
+ ];
2925
+
2926
+ const currencyProviders = [
2927
+ {
2928
+ id: "currencyLayer",
2929
+ url: "https://api.currencylayer.com/live?access_key={access_key}&currencies={target}&source={base}"
2930
+ },
2931
+ {
2932
+ id: "currencyCloud",
2933
+ url: "https://api.currencycloud.com/v2/rates/detailed?buy_currency={target}&sell_currency={base}"
2934
+ },
2935
+ {
2936
+ id: "kraken",
2937
+ url: "https://api.kraken.com/0/public/Ticker?pair={pairs}"
2938
+ },
2939
+ {
2940
+ id: "binance",
2941
+ url: "https://api.binance.com/api/v3/ticker/price?symbol={base}{target}"
2942
+ },
2943
+ { id: "CNB", url: "https://api.cnb.cz/cnbapi/exrates/daily" },
2944
+ {
2945
+ id: "tradermade-live",
2946
+ url: "https://marketdata.tradermade.com/api/v1/live?currency={pairs}&api_key={access_key}"
2947
+ },
2948
+ {
2949
+ id: "tradermade-convert",
2950
+ url: "https://marketdata.tradermade.com/api/v1/convert?from={from}&to={to}&amount={amount}&api_key={access_key}"
2951
+ }
2952
+ ];
2953
+
2954
+ const languages = [
2955
+ { code: "en", name: "English", native: "English", cs: "Angli\u010Dtina" },
2956
+ { code: "de", name: "German", native: "Deutsch", cs: "N\u011Bm\u010Dina" },
2957
+ { code: "cs", name: "Czech", native: "\u010Ce\u0161tina", cs: "\u010Ce\u0161tina" },
2958
+ { code: "sk", name: "Slovak", native: "Sloven\u010Dina", cs: "Sloven\u0161tina" },
2959
+ { code: "pl", name: "Polish", native: "Polski", cs: "Pol\u0161tina" },
2960
+ { code: "hr", name: "Croatian", native: "Hrvatski", cs: "Chorvat\u0161tina" },
2961
+ { code: "ru", name: "Russian", native: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439", cs: "Ru\u0161tina" },
2962
+ { code: "es", name: "Spanish", native: "Espa\xF1ol", cs: "\u0160pan\u011Bl\u0161tina" },
2963
+ { code: "fr", name: "French", native: "Fran\xE7ais", cs: "Francouz\u0161tina" },
2964
+ { code: "it", name: "Italian", native: "Italiano", cs: "Ital\u0161tina" },
2965
+ { code: "nl", name: "Dutch", native: "Nederlands", cs: "Holand\u0161tina" },
2966
+ { code: "ro", name: "Romanian", native: "Rom\xE2n\u0103", cs: "Rumun\u0161tina" },
2967
+ { code: "ar", name: "Arabic", native: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629", cs: "Arab\u0161tina" },
2968
+ { code: "sq", name: "Albanian", native: "Shqip", cs: "Alb\xE1n\u0161tina" },
2969
+ { code: "am", name: "Amharic", native: "\u12A0\u121B\u122D\u129B", cs: "Amhar\u0161tina" },
2970
+ { code: "bs", name: "Bosnian", native: "Bosanski", cs: "Bosen\u0161tina" },
2971
+ { code: "bg", name: "Bulgarian", native: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438", cs: "Bulhar\u0161tina" },
2972
+ { code: "ca", name: "Catalan", native: "Catal\xE0", cs: "Katal\xE1n\u0161tina" },
2973
+ { code: "da", name: "Danish", native: "Dansk", cs: "D\xE1n\u0161tina" },
2974
+ { code: "et", name: "Estonian", native: "Eesti", cs: "Eston\u0161tina" },
2975
+ { code: "fi", name: "Finnish", native: "Suomi", cs: "Fin\u0161tina" },
2976
+ { code: "el", name: "Greek", native: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC", cs: "\u0158e\u010Dtina" },
2977
+ { code: "ka", name: "Georgian", native: "\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8", cs: "Gruz\xEDn\u0161tina" },
2978
+ { code: "he", name: "Hebrew", native: "\u05E2\u05D1\u05E8\u05D9\u05EA", cs: "Hebrej\u0161tina" },
2979
+ { code: "hi", name: "Hindi", native: "\u0939\u093F\u0928\u094D\u0926\u0940", cs: "Hind\u0161tina" },
2980
+ { code: "ig", name: "Igbo", native: "As\u1EE5s\u1EE5 Igbo", cs: "Igbo" },
2981
+ { code: "ja", name: "Japanese", native: "\u65E5\u672C\u8A9E", cs: "Japon\u0161tina" },
2982
+ { code: "ku", name: "Kurdish", native: "Kurd\xEE", cs: "Kurd\u0161tina" },
2983
+ { code: "ko", name: "Korean", native: "\uD55C\uAD6D\uC5B4", cs: "Korej\u0161tina" },
2984
+ { code: "kk", name: "Kazakh", native: "\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456", cs: "Kazach\u0161tina" },
2985
+ { code: "hu", name: "Hungarian", native: "Magyar", cs: "Ma\u010Far\u0161tina" },
2986
+ { code: "mk", name: "Macedonian", native: "\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438", cs: "Makedon\u0161tina" },
2987
+ {
2988
+ code: "lt",
2989
+ name: "Lithuanian",
2990
+ native: "lietuvi\u0173 kalba",
2991
+ cs: "Litev\u0161tina"
2992
+ },
2993
+ { code: "lv", name: "Latvian", native: "latvie\u0161u valoda", cs: "Loty\u0161\u0161tina" },
2994
+ {
2995
+ code: "lb",
2996
+ name: "Luxembourgish",
2997
+ native: "L\xEBtzebuergesch",
2998
+ cs: "Lucembur\u0161tina"
2999
+ },
3000
+ { code: "mn", name: "Mongolian", native: "\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B", cs: "Mongol\u0161tina" },
3001
+ { code: "no", name: "Norwegian", native: "Norsk", cs: "Nor\u0161tina" },
3002
+ { code: "fa", name: "Persian", native: "\u0641\u0627\u0631\u0633\u06CC", cs: "Per\u0161tina" },
3003
+ { code: "pt", name: "Portuguese", native: "Portugu\xEAs", cs: "Portugal\u0161tina" },
3004
+ { code: "sl", name: "Slovene", native: "Sloven\u0161\u010Dina", cs: "Slovin\u0161tina" },
3005
+ { code: "sr", name: "Serbian", native: "\u0441\u0440\u043F\u0441\u043A\u0438", cs: "Srb\u0161tina" },
3006
+ { code: "sv", name: "Swedish", native: "Svenska", cs: "\u0160v\xE9d\u0161tina" },
3007
+ { code: "tr", name: "Turkish", native: "T\xFCrk\xE7e", cs: "Ture\u010Dtina" },
3008
+ { code: "uk", name: "Ukrainian", native: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430", cs: "Ukrajin\u0161tina" },
3009
+ { code: "vi", name: "Vietnamese", native: "Ti\u1EBFng Vi\u1EC7t", cs: "Vietnam\u0161tina" },
3010
+ { code: "zh", name: "Chinese", native: "\u4E2D\u6587", cs: "\u010C\xEDn\u0161tina" },
3011
+ { code: "af", name: "Afrikaans", native: "Afrikaans", cs: "Afrik\xE1n\u0161tina" },
3012
+ { code: "hy", name: "Armenian", native: "\u0540\u0561\u0575\u0565\u0580\u0565\u0576", cs: "Arm\xE9n\u0161tina" }
3013
+ ];
3014
+
3015
+ const CURRENCY_CODES = [
3016
+ ...currencies.map((currency) => currency.code)
3017
+ ];
3018
+ const COUNTRY_CODES_2 = [
3019
+ ...countries.map((country) => country.code2)
3020
+ ];
3021
+ [
3022
+ ...countries.map((country) => country.code3)
3023
+ ];
3024
+ [
3025
+ ...countries.map((country) => country.currency)
3026
+ ];
3027
+ [
3028
+ ...countries.map((country) => country.phoneCode)
3029
+ ];
3030
+ [
3031
+ ...countries.map((country) => country.vat)
3032
+ ];
3033
+ const BANK_CODES = [...banks.map((bank) => bank.code)];
3034
+ [
3035
+ ...languages.map((language) => language.code)
3036
+ ];
3037
+ [
3038
+ ...currencyProviders.map((provider) => provider.id)
3039
+ ];
3040
+ [
3041
+ ...cryptoNetworks.map((network) => network.code)
3042
+ ];
3043
+ const FIAT_CURRENCIES = currencies.filter((c) => c.type === "FIAT");
3044
+ const CRYPTO_CURRENCIES = currencies.filter((c) => c.type === "CRYPTO");
3045
+ [
3046
+ ...FIAT_CURRENCIES.map((currency) => currency.code)
3047
+ ];
3048
+ [
3049
+ ...CRYPTO_CURRENCIES.map((currency) => currency.code)
3050
+ ];
3051
+
3052
+ const PAYMENT_TYPES = ["SEPA", "SWIFT", "IFSC", "DOMESTIC"];
3053
+ const PAYMENT_STATUSES = [
3054
+ "PREPARED",
3055
+ "INITIALIZED",
3056
+ "FAILED",
3057
+ "PENDING",
3058
+ "COMPLETED",
3059
+ "CREATED"
3060
+ ];
3061
+ const PAYMENT_DIRECTIONS = ["INCOMING", "OUTGOING"];
3062
+ const BATCH_STATUSES = [
3063
+ "OPEN",
3064
+ "WAITING_FOR_PROCESSING",
3065
+ "PROCESSING",
3066
+ "READY_TO_SIGN",
3067
+ "PREPARED",
3068
+ "COMPLETED",
3069
+ "FAILED"
3070
+ ];
3071
+ const COUNTRY_CODES = COUNTRY_CODES_2;
3072
+
3073
+ class IBankConnector {
3074
+ }
3075
+
3076
+ const isDeposit = (payment, creditorIban) => {
3077
+ return payment.creditorIban === creditorIban;
3078
+ };
3079
+ const getPaymentDirection = (payment, iban) => {
3080
+ if (isDeposit(payment, iban)) return "INCOMING";
3081
+ return "OUTGOING";
3082
+ };
3083
+
3084
+ const mapReferencesToPayment = (reference) => {
3085
+ const symbols = {
3086
+ vs: void 0,
3087
+ ss: void 0,
3088
+ ks: void 0
3089
+ };
3090
+ if (!reference) return symbols;
3091
+ if (Array.isArray(reference) && reference.length > 0) {
3092
+ symbols.vs = reference.find((ref) => ref.includes("VS")) || void 0;
3093
+ symbols.ss = reference.find((ref) => ref.includes("SS")) || void 0;
3094
+ symbols.ks = reference.find((ref) => ref.includes("KS")) || void 0;
3095
+ }
3096
+ if (typeof reference === "string") {
3097
+ const vsMatch = reference.match(/VS[:\s]*(\d+)/i);
3098
+ const ssMatch = reference.match(/SS[:\s]*(\d+)/i);
3099
+ const ksMatch = reference.match(/KS[:\s]*(\d+)/i);
3100
+ if (vsMatch) symbols.vs = vsMatch[1];
3101
+ if (ssMatch) symbols.ss = ssMatch[1];
3102
+ if (ksMatch) symbols.ks = ksMatch[1];
3103
+ }
3104
+ return symbols;
3105
+ };
3106
+
3107
+ class ErsteConnector extends IBankConnector {
3108
+ constructor(config) {
3109
+ super();
3110
+ this.connectorKey = "ERSTE";
3111
+ this.accessToken = null;
3112
+ this.API_KEY = config.API_KEY;
3113
+ this.CLIENT_ID = config.CLIENT_ID;
3114
+ this.CLIENT_SECRET = config.CLIENT_SECRET;
3115
+ this.REDIRECT_URI = config.REDIRECT_URI;
3116
+ this.AUTH_URI = config.AUTH_URI;
3117
+ this.PAYMENTS_URI = config.PAYMENTS_URI;
3118
+ this.ACCOUNTS_URI = config.ACCOUNTS_URI;
3119
+ }
3120
+ static {
3121
+ this.FETCH_INTERVAL = 60 * 60 * 5;
3122
+ }
3123
+ get adminCodeCreationURI() {
3124
+ const params = new URLSearchParams({
3125
+ redirect_uri: `${this.REDIRECT_URI}`,
3126
+ client_id: this.CLIENT_ID,
3127
+ response_type: "code",
3128
+ access_type: "offline",
3129
+ state: "csas-auth",
3130
+ prompt: "consent"
3131
+ });
3132
+ return `${this.AUTH_URI}/auth?${params.toString()}`;
3133
+ }
3134
+ async authenticate({ token, refreshToken }) {
3135
+ const grantType = refreshToken ? "refresh_token" : "authorization_code";
3136
+ let bodyParams = {
3137
+ client_id: this.CLIENT_ID,
3138
+ client_secret: this.CLIENT_SECRET,
3139
+ grant_type: grantType
3140
+ };
3141
+ if (token) {
3142
+ bodyParams = {
3143
+ ...bodyParams,
3144
+ code: token,
3145
+ redirect_uri: this.REDIRECT_URI
3146
+ };
3147
+ }
3148
+ if (refreshToken) bodyParams.refresh_token = refreshToken;
3149
+ const body = new URLSearchParams(bodyParams);
3150
+ const result = await fetch(`${this.AUTH_URI}/token`, {
3151
+ method: "POST",
3152
+ body: body.toString(),
3153
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
3154
+ });
3155
+ if (result.status !== 200) {
3156
+ throw createInternalError(null, {
3157
+ message: await result.text()
3158
+ });
3159
+ }
3160
+ const json = await result.json();
3161
+ this.accessToken = json.access_token;
3162
+ return json.refresh_token || "";
3163
+ }
3164
+ async preparePayment(payment) {
3165
+ if (!this.accessToken) {
3166
+ throw createInternalError(null, {
3167
+ message: "Internal authentication failed",
3168
+ status: 500
3169
+ });
3170
+ }
3171
+ const paymentBody = {
3172
+ paymentIdentification: {
3173
+ endToEndIdentification: payment.id,
3174
+ instructionIdentification: payment.id
3175
+ },
3176
+ paymentTypeInformation: { instructionPriority: "NORM" },
3177
+ amount: {
3178
+ instructedAmount: { value: payment.amount, currency: payment.currency }
3179
+ },
3180
+ debtorAccount: { identification: { iban: payment.debtorIban } },
3181
+ creditorAccount: { identification: { iban: payment.creditorIban } },
3182
+ creditor: {
3183
+ name: payment.creditorHolderName
3184
+ }
3185
+ };
3186
+ const [data, error] = await useResult(
3187
+ fetch(`${this.PAYMENTS_URI}/my/payments`, {
3188
+ method: "POST",
3189
+ headers: {
3190
+ "WEB-API-key": this.API_KEY,
3191
+ "Content-Type": "application/json",
3192
+ Authorization: `Bearer ${this.accessToken}`
3193
+ },
3194
+ body: JSON.stringify(paymentBody)
3195
+ })
3196
+ );
3197
+ if (error || !data) {
3198
+ throw error;
3199
+ }
3200
+ const erstePayment = await data.json();
3201
+ return {
3202
+ ...payment,
3203
+ id: uuidv4(),
3204
+ bankRefId: erstePayment.signInfo?.signId,
3205
+ refId: payment.refId,
3206
+ direction: "OUTGOING",
3207
+ paymentType: "DOMESTIC",
3208
+ status: "PREPARED",
3209
+ initiatedAt: /* @__PURE__ */ new Date()
3210
+ };
3211
+ }
3212
+ async initiateBatchFromPayments({
3213
+ payments
3214
+ }) {
3215
+ const allRefIds = payments.map((payment) => payment.bankRefId);
3216
+ const batchId = uuidv4();
3217
+ if (allRefIds.length === 0) {
3218
+ throw createInternalError(null, {
3219
+ message: "No valid payments to include in batch",
3220
+ status: 400
3221
+ });
3222
+ }
3223
+ const [signInfo, signError] = await useResult(
3224
+ this.sendBatchPaymentForAuthorization(allRefIds)
3225
+ );
3226
+ if (signError) {
3227
+ throw createInternalError(signError);
3228
+ }
3229
+ const [authUri, authUriError] = await useResult(
3230
+ this.getBatchAuthorizationURI(signInfo)
3231
+ );
3232
+ if (authUriError) {
3233
+ throw createInternalError(authUriError);
3234
+ }
3235
+ return {
3236
+ id: batchId,
3237
+ authorizationUrls: [authUri || ""],
3238
+ payments: payments.map((payment) => ({
3239
+ ...payment,
3240
+ status: "INITIALIZED"
3241
+ })),
3242
+ metadata: signInfo
3243
+ };
3244
+ }
3245
+ initiateSinglePayment() {
3246
+ throw new Error("Method not implemented.");
3247
+ }
3248
+ async sendBatchPaymentForAuthorization(paymentIds) {
3249
+ const [data, error] = await useResult(
3250
+ fetch(`${this.PAYMENTS_URI}/my/batchpayments`, {
3251
+ method: "POST",
3252
+ headers: {
3253
+ "Content-Type": "application/json",
3254
+ Authorization: `Bearer ${this.accessToken}`,
3255
+ "WEB-API-key": this.CLIENT_SECRET
3256
+ },
3257
+ body: JSON.stringify({
3258
+ exchangeIdentification: "658576010faf0a23dc",
3259
+ payments: paymentIds
3260
+ })
3261
+ })
3262
+ );
3263
+ if (error) throw error;
3264
+ const batch = await data.json();
3265
+ return {
3266
+ signHash: batch.signInfo.hash,
3267
+ signId: batch.signInfo.signId
3268
+ };
3269
+ }
3270
+ async getBatchAuthorizationURI({
3271
+ signId,
3272
+ signHash
3273
+ }) {
3274
+ const [data, error] = await useResult(
3275
+ fetch(
3276
+ `${this.PAYMENTS_URI}/my/batchpayments/federate/sign/${signId}/hash/${signHash}`,
3277
+ {
3278
+ method: "GET",
3279
+ headers: {
3280
+ "Callback-Uri": `${this.REDIRECT_URI}/payment-authorization-complete`,
3281
+ Authorization: `Bearer ${this.accessToken}`,
3282
+ "WEB-API-key": this.CLIENT_SECRET
3283
+ }
3284
+ }
3285
+ )
3286
+ );
3287
+ if (error) {
3288
+ throw error;
3289
+ }
3290
+ return (await data.json()).signingUrl;
3291
+ }
3292
+ async getAllAccountPayments({
3293
+ account,
3294
+ lastSync
3295
+ }) {
3296
+ const erstePayments = [];
3297
+ const dateFormat = "yyyy-MM-dd";
3298
+ const fromDate = format(lastSync.lastSyncedAt, dateFormat);
3299
+ const toDate = format(/* @__PURE__ */ new Date(), dateFormat);
3300
+ let page = 0;
3301
+ const pageSize = 200;
3302
+ const pageCount = 1;
3303
+ while (page < pageCount) {
3304
+ const response = await fetch(
3305
+ `${this.ACCOUNTS_URI}/my/accounts/${account.id}/transactions?fromDate=${fromDate}&toDate=${toDate}&size=${pageSize}&page=${page}&sort=bookingDate&order=desc`,
3306
+ {
3307
+ headers: {
3308
+ "WEB-API-key": this.API_KEY,
3309
+ Authorization: `Bearer ${this.accessToken}`
3310
+ }
3311
+ }
3312
+ );
3313
+ const data = await response.json();
3314
+ erstePayments.push(...data.transactions);
3315
+ page += 1;
3316
+ }
3317
+ const payments = erstePayments.map((payment) => {
3318
+ const reference = payment.entryDetails.transactionDetails.remittanceInformation?.structured.creditorReferenceInformation?.reference || [];
3319
+ const symbols = mapReferencesToPayment(reference);
3320
+ const paymentInsert = {
3321
+ id: uuidv4(),
3322
+ bankRefId: payment.entryReference,
3323
+ amount: payment.amount.value,
3324
+ currency: payment.amount.currency.code,
3325
+ debtorHolderName: payment.entryDetails.transactionDetails.relatedParties.debtor?.name,
3326
+ debtorIban: payment.entryDetails.transactionDetails.relatedParties.debtorAccount?.identification.iban,
3327
+ debtorAccountNumberWithBankCode: payment.entryDetails.transactionDetails.relatedParties.debtorAccount?.identification.other?.identification,
3328
+ creditorHolderName: payment.entryDetails.transactionDetails.relatedParties.creditor?.name || "",
3329
+ creditorIban: payment.entryDetails.transactionDetails.relatedParties.creditorAccount?.identification.iban,
3330
+ creditorAccountNumberWithBankCode: payment.entryDetails.transactionDetails.relatedParties.creditorAccount?.identification.other?.identification,
3331
+ paymentType: "DOMESTIC",
3332
+ direction: "INCOMING",
3333
+ message: payment.entryDetails.transactionDetails.remittanceInformation?.unstructured,
3334
+ vs: symbols.vs,
3335
+ ss: symbols.ss,
3336
+ ks: symbols.ks,
3337
+ processedAt: parseISO(payment.bookingDate.date),
3338
+ status: "COMPLETED"
3339
+ };
3340
+ return {
3341
+ ...paymentInsert,
3342
+ direction: getPaymentDirection(
3343
+ paymentInsert,
3344
+ account.identification.iban
3345
+ )
3346
+ };
3347
+ });
3348
+ return payments;
3349
+ }
3350
+ }
3351
+
3352
+ const mapFinbricksStatus = (status) => {
3353
+ switch (status) {
3354
+ case "BOOK":
3355
+ return "COMPLETED";
3356
+ case "PDNG":
3357
+ return "PENDING";
3358
+ case "CANCL":
3359
+ return "FAILED";
3360
+ case "RJCT":
3361
+ return "FAILED";
3362
+ case "SCHDL":
3363
+ return "PENDING";
3364
+ case "HOLD":
3365
+ return "PENDING";
3366
+ case "INFO":
3367
+ return "PENDING";
3368
+ default:
3369
+ return "PENDING";
3370
+ }
3371
+ };
3372
+
3373
+ class FinbricksConnector extends IBankConnector {
3374
+ constructor(PROVIDER, { BASE_URI, MERCHANT_ID, PRIVATE_KEY_PEM }) {
3375
+ super();
3376
+ this.connectorKey = "FINBRICKS";
3377
+ this.apiDictionary = /* @__PURE__ */ new Map([
3378
+ ["single-payment-domestic", "/transaction/platform/init"],
3379
+ ["batch-payment-domestic", "/transaction/platform/batchPayment/init"],
3380
+ ["get-accounts", "/account/list"],
3381
+ ["get-account-transactions", "/account/transactions"],
3382
+ ["authenticate-client", "/v2/auth/authenticate"],
3383
+ ["expiration", "/auth/token"]
3384
+ ]);
3385
+ this.PROVIDER = PROVIDER;
3386
+ this.BASE_URI = BASE_URI;
3387
+ this.MERCHANT_ID = MERCHANT_ID;
3388
+ this.PRIVATE_KEY_PEM = PRIVATE_KEY_PEM;
3389
+ }
3390
+ static {
3391
+ this.FETCH_INTERVAL = 60 * 60 * 5;
3392
+ }
3393
+ async signFinbricksJws({ jwsData }) {
3394
+ const privateKey = await importPKCS8(this.PRIVATE_KEY_PEM, "RS256");
3395
+ const payload = JSON.stringify(jwsData);
3396
+ const jws = await new SignJWT(JSON.parse(payload)).setProtectedHeader({
3397
+ alg: "RS256",
3398
+ kid: this.MERCHANT_ID,
3399
+ typ: "JWT"
3400
+ }).sign(privateKey);
3401
+ return jws;
3402
+ }
3403
+ async authenticate({ token }) {
3404
+ this.lastValidClientId = token;
3405
+ return this.lastValidClientId;
3406
+ }
3407
+ async isClientIdExpired(clientId) {
3408
+ const query = new URLSearchParams({
3409
+ merchantId: this.MERCHANT_ID,
3410
+ provider: this.PROVIDER,
3411
+ clientId
3412
+ });
3413
+ const uri = this.apiDictionary.get("expiration");
3414
+ const fullUri = `${uri}?${query.toString()}`;
3415
+ const signature = await this.signFinbricksJws({
3416
+ jwsData: {
3417
+ body: "",
3418
+ uri: fullUri
3419
+ }
3420
+ });
3421
+ const [data, error] = await useResult(
3422
+ fetch(`${this.BASE_URI}${fullUri}`, {
3423
+ method: "POST",
3424
+ headers: {
3425
+ "JWS-Signature": signature,
3426
+ "Content-Type": "application/json"
3427
+ },
3428
+ body: ""
3429
+ })
3430
+ );
3431
+ if (error) {
3432
+ const body = await data?.json();
3433
+ throw createInternalError(error, {
3434
+ message: body?.message || "Finbricks API error"
3435
+ });
3436
+ }
3437
+ if (!data?.ok) {
3438
+ const body = await data.json();
3439
+ throw createInternalError(null, {
3440
+ message: body.message || "Finbricks API error",
3441
+ code: "FINBRICKS_API_ERROR",
3442
+ status: data?.status || 500
3443
+ });
3444
+ }
3445
+ const tokens = await data.json();
3446
+ return !!tokens.find((token) => token.clientId === clientId);
3447
+ }
3448
+ async preparePayment(payment) {
3449
+ const bankRefId = uuidv4();
3450
+ return {
3451
+ ...payment,
3452
+ id: uuidv4(),
3453
+ bankRefId,
3454
+ direction: "OUTGOING",
3455
+ paymentType: "DOMESTIC",
3456
+ status: "PREPARED",
3457
+ initiatedAt: /* @__PURE__ */ new Date()
3458
+ };
3459
+ }
3460
+ async initiateBatchFromPayments({
3461
+ payments
3462
+ }) {
3463
+ const uri = this.apiDictionary.get("batch-payment-domestic");
3464
+ const batchId = uuidv4();
3465
+ const batchBody = {
3466
+ batchPaymentIdentification: {
3467
+ merchantId: this.MERCHANT_ID,
3468
+ debtorAccountIban: payments[0].debtorIban,
3469
+ clientId: this.lastValidClientId,
3470
+ callbackUrl: "https://example.com/callback",
3471
+ merchantBatchId: batchId
3472
+ },
3473
+ payments: payments.map((payment) => ({
3474
+ merchantTransactionId: payment.bankRefId,
3475
+ creditorAccountIban: payment.creditorIban,
3476
+ amount: payment.amount
3477
+ }))
3478
+ };
3479
+ const payload = JSON.stringify(batchBody);
3480
+ const jwsData = {
3481
+ uri,
3482
+ body: payload
3483
+ };
3484
+ const signature = await this.signFinbricksJws({
3485
+ jwsData
3486
+ });
3487
+ const [data, error] = await useResult(
3488
+ fetch(`${this.BASE_URI}${uri}`, {
3489
+ method: "POST",
3490
+ headers: {
3491
+ "JWS-Signature": signature,
3492
+ "Content-Type": "application/json"
3493
+ },
3494
+ body: payload
3495
+ })
3496
+ );
3497
+ const body = await data?.json();
3498
+ if (error) {
3499
+ throw createInternalError(error, {
3500
+ message: body?.message || "Finbricks API error"
3501
+ });
3502
+ }
3503
+ if (!data?.ok) {
3504
+ console.log("FINBRICKSBODY", body);
3505
+ throw createInternalError(null, {
3506
+ message: body?.message || "Finbricks API error",
3507
+ code: "FINBRICKS_API_ERROR",
3508
+ status: data?.status || 500
3509
+ });
3510
+ }
3511
+ const { redirectUrl } = body;
3512
+ return {
3513
+ id: batchId,
3514
+ authorizationUrls: [redirectUrl],
3515
+ payments: payments.map((payment) => ({
3516
+ ...payment,
3517
+ status: "INITIALIZED"
3518
+ }))
3519
+ };
3520
+ }
3521
+ async initiateSinglePayment(payment) {
3522
+ const uri = this.apiDictionary.get("single-payment-domestic");
3523
+ const paymentBody = {
3524
+ merchantId: this.MERCHANT_ID,
3525
+ merchantTransactionId: payment.bankRefId,
3526
+ totalPrice: payment.amount,
3527
+ creditorAccountIban: payment.creditorIban,
3528
+ debtorAccountIban: payment.debtorIban,
3529
+ creditorName: payment.creditorHolderName,
3530
+ description: payment.message || "",
3531
+ variableSymbol: payment.vs || "",
3532
+ callbackUrl: "example.com",
3533
+ paymentProvider: this.PROVIDER
3534
+ };
3535
+ const signature = await this.signFinbricksJws({
3536
+ jwsData: {
3537
+ body: JSON.stringify(paymentBody),
3538
+ uri
3539
+ }
3540
+ });
3541
+ const [data, error] = await useResult(
3542
+ fetch(`${this.BASE_URI}${uri}`, {
3543
+ method: "POST",
3544
+ headers: {
3545
+ "JWS-Signature": signature,
3546
+ "Content-Type": "application/json"
3547
+ },
3548
+ body: JSON.stringify(paymentBody)
3549
+ })
3550
+ );
3551
+ const body = await data?.json();
3552
+ if (error) {
3553
+ throw createInternalError(error, {
3554
+ message: body?.message || "Finbricks API error"
3555
+ });
3556
+ }
3557
+ if (!data?.ok) {
3558
+ console.log("FINBRICKSBODY", body);
3559
+ throw createInternalError(null, {
3560
+ message: body?.message || "Finbricks API error",
3561
+ code: "FINBRICKS_API_ERROR",
3562
+ status: data?.status || 500
3563
+ });
3564
+ }
3565
+ const redirectUrl = (await data.json()).redirectUrl;
3566
+ return {
3567
+ authorizationUrl: redirectUrl,
3568
+ payment: { ...payment, status: "INITIALIZED" }
3569
+ };
3570
+ }
3571
+ async getAllAccountPayments({
3572
+ account,
3573
+ lastSync
3574
+ }) {
3575
+ const uri = this.apiDictionary.get("get-account-transactions");
3576
+ const dateFormat = "yyyy-MM-dd";
3577
+ let cursor = null;
3578
+ let allPayments = [];
3579
+ const dateFrom = format(lastSync.lastSyncedAt, dateFormat);
3580
+ const dateTo = format(/* @__PURE__ */ new Date(), dateFormat);
3581
+ do {
3582
+ const query = new URLSearchParams({
3583
+ merchantId: this.MERCHANT_ID,
3584
+ clientId: this.lastValidClientId,
3585
+ paymentProvider: this.PROVIDER,
3586
+ bankAccountId: account.identification.number,
3587
+ dateFrom,
3588
+ dateTo,
3589
+ currency: account.currency,
3590
+ size: "20"
3591
+ });
3592
+ console.log("query", query);
3593
+ if (cursor) query.set("cursor", cursor);
3594
+ const fullUri = `${uri}?${query.toString()}`;
3595
+ const jwsData = {
3596
+ uri: fullUri,
3597
+ body: ""
3598
+ };
3599
+ const signature = await this.signFinbricksJws({ jwsData });
3600
+ console.log("signature ready", signature);
3601
+ const [data, error] = await useResult(
3602
+ fetch(`${this.BASE_URI}${fullUri}`, {
3603
+ method: "GET",
3604
+ headers: {
3605
+ "JWS-Signature": signature,
3606
+ "Content-Type": "application/json"
3607
+ }
3608
+ })
3609
+ );
3610
+ if (error) {
3611
+ const body = await data?.json();
3612
+ throw createInternalError(error, {
3613
+ message: body?.message || "Finbricks API error"
3614
+ });
3615
+ }
3616
+ if (!data?.ok) {
3617
+ const body = await data.json();
3618
+ throw createInternalError(null, {
3619
+ message: body.message || "Finbricks API error",
3620
+ code: "FINBRICKS_API_ERROR",
3621
+ status: data?.status || 500
3622
+ });
3623
+ }
3624
+ const { transactions, links } = await data.json();
3625
+ cursor = links?.[0]?.value || null;
3626
+ allPayments = [
3627
+ ...allPayments,
3628
+ ...transactions.map((tx) => {
3629
+ const isIncoming = tx.creditDebitIndicator === "CRDT";
3630
+ const relatedParties = tx.entryDetails?.transactionDetails?.relatedParties;
3631
+ const paymentInsert = {
3632
+ id: uuidv4(),
3633
+ bankRefId: tx.entryReference || tx.fbxReference,
3634
+ amount: tx.amount?.value || 0,
3635
+ currency: tx.amount?.currency || "CZK",
3636
+ debtorHolderName: isIncoming ? relatedParties?.debtor?.name || "Unknown" : "Unknown",
3637
+ debtorIban: isIncoming ? relatedParties?.debtorAccount?.identification?.iban || account.identification.iban : account.identification.iban,
3638
+ debtorAccountNumberWithBankCode: isIncoming ? relatedParties?.debtorAccount?.identification?.other?.identification || `${account.identification.number}/${account.identification.bankCode}` : `${account.identification.number}/${account.identification.bankCode}`,
3639
+ creditorHolderName: isIncoming ? "Unknown" : relatedParties?.creditor?.name || "Unknown",
3640
+ creditorIban: isIncoming ? account.identification.iban : relatedParties?.creditorAccount?.identification?.iban || account.identification.iban,
3641
+ creditorAccountNumberWithBankCode: isIncoming ? `${account.identification.number}/${account.identification.bankCode}` : relatedParties?.creditorAccount?.identification?.other?.identification || `${account.identification.number}/${account.identification.bankCode}`,
3642
+ paymentType: "DOMESTIC",
3643
+ direction: isIncoming ? "INCOMING" : "OUTGOING",
3644
+ message: tx.entryDetails?.transactionDetails?.remittanceInformation?.unstructured || tx.entryDetails?.transactionDetails?.additionalRemittanceInformation || null,
3645
+ ...mapReferencesToPayment(
3646
+ tx.entryDetails?.transactionDetails?.remittanceInformation?.structured?.creditorReferenceInformation?.reference || tx.entryDetails?.transactionDetails?.references?.endToEndIdentification
3647
+ ),
3648
+ processedAt: new Date(tx.bookingDate.date),
3649
+ status: "COMPLETED"
3650
+ };
3651
+ return {
3652
+ ...paymentInsert,
3653
+ direction: getPaymentDirection(
3654
+ paymentInsert,
3655
+ account.identification.iban
3656
+ ),
3657
+ status: mapFinbricksStatus(tx.status)
3658
+ };
3659
+ })
3660
+ ];
3661
+ } while (cursor != null);
3662
+ return allPayments;
3663
+ }
3664
+ }
3665
+
3666
+ class MockConnector extends IBankConnector {
3667
+ constructor() {
3668
+ super(...arguments);
3669
+ this.connectorKey = "MOCK";
3670
+ }
3671
+ static {
3672
+ this.FETCH_INTERVAL = 60 * 60 * 5;
3673
+ }
3674
+ async authenticate() {
3675
+ return "";
3676
+ }
3677
+ async preparePayment(payment) {
3678
+ const bankRefId = uuidv4();
3679
+ return {
3680
+ ...payment,
3681
+ id: uuidv4(),
3682
+ bankRefId,
3683
+ direction: "OUTGOING",
3684
+ paymentType: "DOMESTIC",
3685
+ status: "PREPARED",
3686
+ initiatedAt: /* @__PURE__ */ new Date()
3687
+ };
3688
+ }
3689
+ async initiateSinglePayment(payment) {
3690
+ return {
3691
+ payment: {
3692
+ ...payment,
3693
+ status: "INITIALIZED"
3694
+ },
3695
+ authorizationUrl: "http://mock.com"
3696
+ };
3697
+ }
3698
+ async initiateBatchFromPayments({
3699
+ payments
3700
+ }) {
3701
+ return {
3702
+ id: uuidv4(),
3703
+ authorizationUrls: ["http://mock.com"],
3704
+ payments: payments.map((payment) => ({
3705
+ ...payment,
3706
+ status: "INITIALIZED"
3707
+ }))
3708
+ };
3709
+ }
3710
+ async getAllAccountPayments({
3711
+ db
3712
+ }) {
3713
+ const payments = await db.select().from(tables.payment).where(
3714
+ and(
3715
+ eq(tables.payment.status, "INITIALIZED"),
3716
+ eq(tables.payment.direction, "OUTGOING")
3717
+ )
3718
+ );
3719
+ return payments.map((payment) => ({
3720
+ ...payment,
3721
+ status: "COMPLETED"
3722
+ }));
3723
+ }
3724
+ }
3725
+
3726
+ class MockCobsConnector extends FinbricksConnector {
3727
+ constructor(config) {
3728
+ super("MOCK_COBS", config);
3729
+ }
3730
+ }
3731
+
3732
+ const paymentInsertTypeZod = z.object({
3733
+ refId: z.string(),
3734
+ bankRefId: z.string(),
3735
+ amount: z.number(),
3736
+ direction: z.enum(PAYMENT_DIRECTIONS),
3737
+ paymentType: z.enum(PAYMENT_TYPES),
3738
+ currency: z.enum(CURRENCY_CODES),
3739
+ status: z.enum(PAYMENT_STATUSES),
3740
+ batchId: z.string(),
3741
+ bankPaymentInitiatedAt: z.coerce.date(),
3742
+ bankPaymentProcessedAt: z.coerce.date(),
3743
+ bankingVs: z.string().max(10),
3744
+ message: z.string(),
3745
+ creditorIban: z.string().max(34),
3746
+ creditorHolderName: z.string(),
3747
+ debtorIban: z.string().max(34),
3748
+ debtorHolderName: z.string().nullable()
3749
+ });
3750
+
3751
+ export { BATCH_STATUSES as B, CURRENCY_CODES as C, ErsteConnector as E, FinbricksConnector as F, IBankConnector as I, MockConnector as M, PAYMENT_TYPES as P, MockCobsConnector as a, PAYMENT_STATUSES as b, PAYMENT_DIRECTIONS as c, BANK_CODES as d, COUNTRY_CODES as e, getPaymentDirection as g, paymentInsertTypeZod as p, tables as t };