@riocrypto/common 1.0.332 → 1.0.335
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/classes/Asset.d.ts +11 -0
- package/build/classes/Asset.js +9 -0
- package/build/classes/CountryAsset.d.ts +8 -0
- package/build/classes/CountryAsset.js +399 -0
- package/build/classes/CryptoAsset.d.ts +11 -0
- package/build/classes/CryptoAsset.js +232 -0
- package/build/classes/FiatAsset.d.ts +8 -0
- package/build/classes/FiatAsset.js +99 -0
- package/build/classes/LanguageAsset.d.ts +8 -0
- package/build/classes/LanguageAsset.js +44 -0
- package/build/classes/PaymentMethodAsset.d.ts +8 -0
- package/build/classes/PaymentMethodAsset.js +28 -0
- package/build/classes/PayoutMethodAsset.d.ts +8 -0
- package/build/classes/PayoutMethodAsset.js +26 -0
- package/build/classes/USStateAsset.d.ts +8 -0
- package/build/classes/USStateAsset.js +140 -0
- package/build/classes/WyrePaymentMethodAsset.d.ts +7 -0
- package/build/classes/WyrePaymentMethodAsset.js +21 -0
- package/build/index.d.ts +9 -0
- package/build/index.js +9 -0
- package/build/types/crypto.d.ts +1 -1
- package/build/types/crypto.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Country } from "../types/country";
|
|
2
|
+
import { Fiat } from "../types/fiat";
|
|
3
|
+
import { Language } from "../types/language";
|
|
4
|
+
import { PaymentMethod } from "../types/payment-method";
|
|
5
|
+
import { USState } from "../types/us-state";
|
|
6
|
+
export declare abstract class Asset {
|
|
7
|
+
symbol: Fiat | Crypto | Language | Country | PaymentMethod | USState | string;
|
|
8
|
+
constructor(symbol: Fiat | Crypto | Language | Country | PaymentMethod | USState | string);
|
|
9
|
+
abstract getName(): string;
|
|
10
|
+
abstract getImageUri(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CountryAsset = void 0;
|
|
4
|
+
const country_1 = require("../types/country");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class CountryAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
switch (this.symbol) {
|
|
13
|
+
case country_1.Country.Mexico:
|
|
14
|
+
return "Mexico";
|
|
15
|
+
case country_1.Country.France:
|
|
16
|
+
return "France";
|
|
17
|
+
case country_1.Country.Portugal:
|
|
18
|
+
return "Portugal";
|
|
19
|
+
case country_1.Country.Spain:
|
|
20
|
+
return "Spain";
|
|
21
|
+
case country_1.Country.Germany:
|
|
22
|
+
return "Germany";
|
|
23
|
+
case country_1.Country.Italy:
|
|
24
|
+
return "Italy";
|
|
25
|
+
case country_1.Country.Japan:
|
|
26
|
+
return "Japan";
|
|
27
|
+
// case Country.RussianFederation:
|
|
28
|
+
// return "Russia";
|
|
29
|
+
// case Country.China:
|
|
30
|
+
// return "China";
|
|
31
|
+
case country_1.Country.Brazil:
|
|
32
|
+
return "Brazil";
|
|
33
|
+
case country_1.Country.Australia:
|
|
34
|
+
return "Australia";
|
|
35
|
+
case country_1.Country.Canada:
|
|
36
|
+
return "Canada";
|
|
37
|
+
case country_1.Country.Korea:
|
|
38
|
+
return "South Korea";
|
|
39
|
+
case country_1.Country.India:
|
|
40
|
+
return "India";
|
|
41
|
+
case country_1.Country.Indonesia:
|
|
42
|
+
return "Indonesia";
|
|
43
|
+
case country_1.Country.Philippines:
|
|
44
|
+
return "Philippines";
|
|
45
|
+
case country_1.Country.Turkey:
|
|
46
|
+
return "Turkey";
|
|
47
|
+
// case Country.SaudiArabia:
|
|
48
|
+
// return "Saudi Arabia";
|
|
49
|
+
// case Country.Iran:
|
|
50
|
+
// return "Iran";
|
|
51
|
+
case country_1.Country.SouthAfrica:
|
|
52
|
+
return "South Africa";
|
|
53
|
+
// case Country.Nigeria:
|
|
54
|
+
// return "Nigeria";
|
|
55
|
+
// case Country.Kenya:
|
|
56
|
+
// return "Kenya";
|
|
57
|
+
// case Country.Ghana:
|
|
58
|
+
// return "Ghana";
|
|
59
|
+
// case Country.Cameroon:
|
|
60
|
+
// return "Cameroon";
|
|
61
|
+
case country_1.Country.Netherlands:
|
|
62
|
+
return "Netherlands";
|
|
63
|
+
case country_1.Country.Belgium:
|
|
64
|
+
return "Belgium";
|
|
65
|
+
case country_1.Country.Austria:
|
|
66
|
+
return "Austria";
|
|
67
|
+
case country_1.Country.Switzerland:
|
|
68
|
+
return "Switzerland";
|
|
69
|
+
// case Country.Finland:
|
|
70
|
+
// return "Finland";
|
|
71
|
+
case country_1.Country.Norway:
|
|
72
|
+
return "Norway";
|
|
73
|
+
case country_1.Country.Sweden:
|
|
74
|
+
return "Sweden";
|
|
75
|
+
case country_1.Country.Poland:
|
|
76
|
+
return "Poland";
|
|
77
|
+
// case Country.Romania:
|
|
78
|
+
// return "Romania";
|
|
79
|
+
// case Country.Hungary:
|
|
80
|
+
// return "Hungary";
|
|
81
|
+
case country_1.Country.Greece:
|
|
82
|
+
return "Greece";
|
|
83
|
+
case country_1.Country.Ireland:
|
|
84
|
+
return "Ireland";
|
|
85
|
+
case country_1.Country.Iceland:
|
|
86
|
+
return "Iceland";
|
|
87
|
+
// case Country.Afghanistan:
|
|
88
|
+
// return "Afghanistan";
|
|
89
|
+
// case Country.Albania:
|
|
90
|
+
// return "Albania";
|
|
91
|
+
case country_1.Country.Algeria:
|
|
92
|
+
return "Algeria";
|
|
93
|
+
// case Country.AmericanSamoa:
|
|
94
|
+
// return "American Samoa";
|
|
95
|
+
// case Country.Andorra:
|
|
96
|
+
// return "Andorra";
|
|
97
|
+
// case Country.Angola:
|
|
98
|
+
// return "Angola";
|
|
99
|
+
// case Country.Anguilla:
|
|
100
|
+
// return "Anguilla";
|
|
101
|
+
// case Country.AntiguaAndBarbuda:
|
|
102
|
+
// return "Antigua and Barbuda";
|
|
103
|
+
case country_1.Country.Argentina:
|
|
104
|
+
return "Argentina";
|
|
105
|
+
// case Country.Armenia:
|
|
106
|
+
// return "Armenia";
|
|
107
|
+
// case Country.Aruba:
|
|
108
|
+
// return "Aruba";
|
|
109
|
+
case country_1.Country.Australia:
|
|
110
|
+
return "Australia";
|
|
111
|
+
case country_1.Country.Austria:
|
|
112
|
+
return "Austria";
|
|
113
|
+
// case Country.Azerbaijan:
|
|
114
|
+
// return "Azerbaijan";
|
|
115
|
+
// case Country.Bahamas:
|
|
116
|
+
// return "Bahamas";
|
|
117
|
+
// case Country.Bahrain:
|
|
118
|
+
// return "Bahrain";
|
|
119
|
+
// case Country.Bangladesh:
|
|
120
|
+
// return "Bangladesh";
|
|
121
|
+
// case Country.Barbados:
|
|
122
|
+
// return "Barbados";
|
|
123
|
+
// case Country.Belarus:
|
|
124
|
+
// return "Belarus";
|
|
125
|
+
// case Country.Belize:
|
|
126
|
+
// return "Belize";
|
|
127
|
+
// case Country.Benin:
|
|
128
|
+
// return "Benin";
|
|
129
|
+
// case Country.Bermuda:
|
|
130
|
+
// return "Bermuda";
|
|
131
|
+
// case Country.Bhutan:
|
|
132
|
+
// return "Bhutan";
|
|
133
|
+
case country_1.Country.Bolivia:
|
|
134
|
+
return "Bolivia";
|
|
135
|
+
// case Country.BosniaAndHerzegovina:
|
|
136
|
+
// return "Bosnia and Herzegovina";
|
|
137
|
+
// case Country.Botswana:
|
|
138
|
+
// return "Botswana";
|
|
139
|
+
case country_1.Country.Brazil:
|
|
140
|
+
return "Brazil";
|
|
141
|
+
// case Country.VirginIslandsBritish:
|
|
142
|
+
// return "British Virgin Islands";
|
|
143
|
+
// case Country.BruneiDarussalam:
|
|
144
|
+
// return "Brunei";
|
|
145
|
+
// case Country.Bulgaria:
|
|
146
|
+
// return "Bulgaria";
|
|
147
|
+
// case Country.BurkinaFaso:
|
|
148
|
+
// return "Burkina Faso";
|
|
149
|
+
// case Country.Burundi:
|
|
150
|
+
// return "Burundi";
|
|
151
|
+
// case Country.Cambodia:
|
|
152
|
+
// return "Cambodia";
|
|
153
|
+
// case Country.Cameroon:
|
|
154
|
+
// return "Cameroon";
|
|
155
|
+
case country_1.Country.Canada:
|
|
156
|
+
return "Canada";
|
|
157
|
+
// case Country.CapeVerde:
|
|
158
|
+
// return "Cape Verde";
|
|
159
|
+
// case Country.CaymanIslands:
|
|
160
|
+
// return "Cayman Islands";
|
|
161
|
+
// case Country.CentralAfricanRepublic:
|
|
162
|
+
// return "Central African Republic";
|
|
163
|
+
// case Country.Chad:
|
|
164
|
+
// return "Chad";
|
|
165
|
+
case country_1.Country.Chile:
|
|
166
|
+
return "Chile";
|
|
167
|
+
// case Country.China:
|
|
168
|
+
// return "China";
|
|
169
|
+
case country_1.Country.Colombia:
|
|
170
|
+
return "Colombia";
|
|
171
|
+
// case Country.Comoros:
|
|
172
|
+
// return "Comoros";
|
|
173
|
+
// case Country.Congo:
|
|
174
|
+
// return "Congo";
|
|
175
|
+
// case Country.CookIslands:
|
|
176
|
+
// return "Cook Islands";
|
|
177
|
+
case country_1.Country.CostaRica:
|
|
178
|
+
return "Costa Rica";
|
|
179
|
+
// case Country.CoteDIvoire:
|
|
180
|
+
// return "Cote D'ivoire";
|
|
181
|
+
// case Country.Croatia:
|
|
182
|
+
// return "Croatia";
|
|
183
|
+
// case Country.Cuba:
|
|
184
|
+
// return "Cuba";
|
|
185
|
+
// case Country.Curaçao:
|
|
186
|
+
// return "Curaçao";
|
|
187
|
+
case country_1.Country.Cyprus:
|
|
188
|
+
return "Cyprus";
|
|
189
|
+
case country_1.Country.CzechRepublic:
|
|
190
|
+
return "Czech Republic";
|
|
191
|
+
// case Country.CongoDemocraticRepublic:
|
|
192
|
+
// return "Democratic Republic of the Congo";
|
|
193
|
+
case country_1.Country.Denmark:
|
|
194
|
+
return "Denmark";
|
|
195
|
+
// case Country.Djibouti:
|
|
196
|
+
// return "Djibouti";
|
|
197
|
+
// case Country.Dominica:
|
|
198
|
+
// return "Dominica";
|
|
199
|
+
case country_1.Country.DominicanRepublic:
|
|
200
|
+
return "Dominican Republic";
|
|
201
|
+
// case Country.Ecuador:
|
|
202
|
+
// return "Ecuador";
|
|
203
|
+
// case Country.Egypt:
|
|
204
|
+
// return "Egypt";
|
|
205
|
+
// case Country.ElSalvador:
|
|
206
|
+
// return "El Salvador";
|
|
207
|
+
// case Country.EquatorialGuinea:
|
|
208
|
+
// return "Equatorial Guinea";
|
|
209
|
+
// case Country.Eritrea:
|
|
210
|
+
// return "Eritrea";
|
|
211
|
+
case country_1.Country.Estonia:
|
|
212
|
+
return "Estonia";
|
|
213
|
+
// case Country.Ethiopia:
|
|
214
|
+
// return "Ethiopia";
|
|
215
|
+
// case Country.FalklandIslands:
|
|
216
|
+
// return "Falkland Islands";
|
|
217
|
+
// case Country.FaroeIslands:
|
|
218
|
+
// return "Faroe Islands";
|
|
219
|
+
case country_1.Country.Fiji:
|
|
220
|
+
return "Fiji";
|
|
221
|
+
// case Country.Finland:
|
|
222
|
+
// return "Finland";
|
|
223
|
+
case country_1.Country.France:
|
|
224
|
+
return "France";
|
|
225
|
+
// case Country.FrenchGuiana:
|
|
226
|
+
// return "French Guiana";
|
|
227
|
+
// case Country.FrenchPolynesia:
|
|
228
|
+
// return "French Polynesia";
|
|
229
|
+
// case Country.Gabon:
|
|
230
|
+
// return "Gabon";
|
|
231
|
+
// case Country.Gambia:
|
|
232
|
+
// return "Gambia";
|
|
233
|
+
// case Country.Georgia:
|
|
234
|
+
// return "Georgia";
|
|
235
|
+
case country_1.Country.Germany:
|
|
236
|
+
return "Germany";
|
|
237
|
+
// case Country.Ghana:
|
|
238
|
+
// return "Ghana";
|
|
239
|
+
// case Country.Gibraltar:
|
|
240
|
+
// return "Gibraltar";
|
|
241
|
+
case country_1.Country.Greece:
|
|
242
|
+
return "Greece";
|
|
243
|
+
// case Country.Greenland:
|
|
244
|
+
// return "Greenland";
|
|
245
|
+
// case Country.Grenada:
|
|
246
|
+
// return "Grenada";
|
|
247
|
+
// case Country.Guadeloupe:
|
|
248
|
+
// return "Guadeloupe";
|
|
249
|
+
// case Country.Guam:
|
|
250
|
+
// return "Guam";
|
|
251
|
+
// case Country.Guatemala:
|
|
252
|
+
// return "Guatemala";
|
|
253
|
+
// case Country.Guernsey:
|
|
254
|
+
// return "Guernsey";
|
|
255
|
+
// case Country.Guinea:
|
|
256
|
+
// return "Guinea";
|
|
257
|
+
// case Country.GuineaBissau:
|
|
258
|
+
// return "Guinea-Bissau";
|
|
259
|
+
// case Country.Guyana:
|
|
260
|
+
// return "Guyana";
|
|
261
|
+
// case Country.Haiti:
|
|
262
|
+
// return "Haiti";
|
|
263
|
+
// case Country.Honduras:
|
|
264
|
+
// return "Honduras";
|
|
265
|
+
case country_1.Country.HongKong:
|
|
266
|
+
return "Hong Kong";
|
|
267
|
+
// case Country.Hungary:
|
|
268
|
+
// return "Hungary";
|
|
269
|
+
case country_1.Country.Iceland:
|
|
270
|
+
return "Iceland";
|
|
271
|
+
case country_1.Country.India:
|
|
272
|
+
return "India";
|
|
273
|
+
case country_1.Country.Indonesia:
|
|
274
|
+
return "Indonesia";
|
|
275
|
+
// case Country.Iran:
|
|
276
|
+
// return "Iran";
|
|
277
|
+
// case Country.Iraq:
|
|
278
|
+
// return "Iraq";
|
|
279
|
+
case country_1.Country.Ireland:
|
|
280
|
+
return "Ireland";
|
|
281
|
+
// case Country.IsleOfMan:
|
|
282
|
+
// return "Isle of Man";
|
|
283
|
+
// case Country.AlandIslands:
|
|
284
|
+
// return "Aland Islands";
|
|
285
|
+
// case Country.Antarctica:
|
|
286
|
+
// return "Antartica";
|
|
287
|
+
// case Country.BonaireSintEustatiusSaba:
|
|
288
|
+
// return "Caribbean Netherlands";
|
|
289
|
+
// case Country.BouvetIsland:
|
|
290
|
+
// return "Bouvet Island";
|
|
291
|
+
// case Country.ChristmasIsland:
|
|
292
|
+
// return "Christmans Islands";
|
|
293
|
+
// case Country.FrenchSouthernTerritories:
|
|
294
|
+
// return "French Southern and Antarctic Territories";
|
|
295
|
+
// case Country.HeardIslandMcdonaldIslands:
|
|
296
|
+
// return "Heard Island and McDonald Islands";
|
|
297
|
+
// case Country.ElSalvador:
|
|
298
|
+
// return "El Salvador";
|
|
299
|
+
case country_1.Country.Israel:
|
|
300
|
+
return "Israel";
|
|
301
|
+
case country_1.Country.Israel:
|
|
302
|
+
return "Israel";
|
|
303
|
+
// case Country.Jersey:
|
|
304
|
+
// return "Jersey";
|
|
305
|
+
// case Country.Jordan:
|
|
306
|
+
// return "Jordan";
|
|
307
|
+
// case Country.Kazakhstan:
|
|
308
|
+
// return "Kazakhstan";
|
|
309
|
+
// case Country.Zimbabwe:
|
|
310
|
+
// return "Zimbabwe";
|
|
311
|
+
// case Country.VirginIslandsUS:
|
|
312
|
+
// return "US Virgin Islands";
|
|
313
|
+
// case Country.LaoPeoplesDemocraticRepublic:
|
|
314
|
+
// return "Laos";
|
|
315
|
+
// case Country.SouthGeorgiaAndSandwichIsl:
|
|
316
|
+
// return "South Georgia and the South Sandwich Islands";
|
|
317
|
+
// case Country.HolySeeVaticanCityState:
|
|
318
|
+
// return "Vatican City";
|
|
319
|
+
// case Country.KoreaDemocraticPeoplesRepublic:
|
|
320
|
+
// return "North Korea";
|
|
321
|
+
// case Country.LibyanArabJamahiriya:
|
|
322
|
+
// return "Libya";
|
|
323
|
+
// case Country.PalestinianTerritory:
|
|
324
|
+
// return "Palestine";
|
|
325
|
+
// case Country.PapuaNewGuinea:
|
|
326
|
+
// return "Papua New Guinea";
|
|
327
|
+
// case Country.PuertoRico:
|
|
328
|
+
// return "Puerto Rico";
|
|
329
|
+
// case Country.SaintKittsAndNevis:
|
|
330
|
+
// return "Saint Kitts and Nevis";
|
|
331
|
+
// case Country.SaintPierreAndMiquelon:
|
|
332
|
+
// return "Saint Pierre and Miquelon";
|
|
333
|
+
// case Country.SaintVincentAndGrenadines:
|
|
334
|
+
// return "Saint Vincent and the Grenadines";
|
|
335
|
+
// case Country.SaoTomeAndPrincipe:
|
|
336
|
+
// return "São Tomé and Príncipe";
|
|
337
|
+
// case Country.SierraLeone:
|
|
338
|
+
// return "Sierra Leone";
|
|
339
|
+
// case Country.SintMaarten:
|
|
340
|
+
// return "Sint Maarten";
|
|
341
|
+
// case Country.SolomonIslands:
|
|
342
|
+
// return "Solomon Islands";
|
|
343
|
+
// case Country.SouthSudan:
|
|
344
|
+
// return "South Sudan";
|
|
345
|
+
// case Country.SriLanka:
|
|
346
|
+
// return "Sri Lanka";
|
|
347
|
+
// case Country.SvalbardAndJanMayen:
|
|
348
|
+
// return "Svalbard and Jan Mayen";
|
|
349
|
+
// case Country.SyrianArabRepublic:
|
|
350
|
+
// return "Syria";
|
|
351
|
+
// case Country.TimorLeste:
|
|
352
|
+
// return "Timor-Leste";
|
|
353
|
+
// case Country.TrinidadAndTobago:
|
|
354
|
+
// return "Trinidad and Tobago";
|
|
355
|
+
// case Country.TurksAndCaicosIslands:
|
|
356
|
+
// return "Turks and Caicos Islands";
|
|
357
|
+
// case Country.UnitedArabEmirates:
|
|
358
|
+
// return "United Arab Emirates";
|
|
359
|
+
case country_1.Country.UnitedKingdom:
|
|
360
|
+
return "United Kingdom";
|
|
361
|
+
// case Country.UnitedStatesOutlyingIslands:
|
|
362
|
+
// return "United States Outlying Islands";
|
|
363
|
+
// case Country.WallisAndFutuna:
|
|
364
|
+
// return "Wallis and Futuna";
|
|
365
|
+
// case Country.WesternSahara:
|
|
366
|
+
// return "Wested Sahara";
|
|
367
|
+
// case Country.SanMarino:
|
|
368
|
+
// return "San Marino";
|
|
369
|
+
// case Country.SaintLucia:
|
|
370
|
+
// return "Saint Lucia";
|
|
371
|
+
// case Country.SaintMartin:
|
|
372
|
+
// return "Saint Martin";
|
|
373
|
+
// case Country.SaintHelena:
|
|
374
|
+
// return "Saint Helena";
|
|
375
|
+
// case Country.SaintBarthelemy:
|
|
376
|
+
// return "Saint Barthelemy";
|
|
377
|
+
// case Country.NorthernMarianaIslands:
|
|
378
|
+
// return "Northern Mariana Islands";
|
|
379
|
+
case country_1.Country.NewZealand:
|
|
380
|
+
return "New Zealand";
|
|
381
|
+
// case Country.NewCaledonia:
|
|
382
|
+
// return "New Caledonia";
|
|
383
|
+
// case Country.NewCaledonia:
|
|
384
|
+
// return "New Caledonia";
|
|
385
|
+
// case Country.CocosKeelingIslands:
|
|
386
|
+
// return "Cocos (Keeling) Islands";
|
|
387
|
+
// case Country.BritishIndianOceanTerritory:
|
|
388
|
+
// return "Birdt Indian Ocean Territory";
|
|
389
|
+
default:
|
|
390
|
+
const indexOfSymbol = Object.values(country_1.Country).indexOf(this.symbol);
|
|
391
|
+
const key = Object.keys(country_1.Country)[indexOfSymbol];
|
|
392
|
+
return key;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
getImageUri() {
|
|
396
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/${this.symbol}.svg`;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
exports.CountryAsset = CountryAsset;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Crypto } from "../types/crypto";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class CryptoAsset extends Asset {
|
|
4
|
+
rawSymbol: Crypto;
|
|
5
|
+
constructor(rawSymbol: Crypto);
|
|
6
|
+
getImageUri(): string;
|
|
7
|
+
getName(): "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)";
|
|
8
|
+
getSymbol(): "USDC (Ethereum)" | "USDC (Polygon)" | "BTC" | "ETH";
|
|
9
|
+
getGasSymbol(): "BTC" | "ETH" | "MATIC";
|
|
10
|
+
getDescription(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CryptoAsset = void 0;
|
|
4
|
+
const crypto_1 = require("../types/crypto");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class CryptoAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(rawSymbol) {
|
|
8
|
+
super(rawSymbol);
|
|
9
|
+
this.rawSymbol = rawSymbol;
|
|
10
|
+
}
|
|
11
|
+
getImageUri() {
|
|
12
|
+
// if (this.symbol === Crypto.USDS) {
|
|
13
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/ETH.svg`;
|
|
14
|
+
// }
|
|
15
|
+
// if (this.symbol === Crypto.GYEN) {
|
|
16
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/ETH.svg`;
|
|
17
|
+
// }
|
|
18
|
+
// if (this.symbol === Crypto.ZUSD) {
|
|
19
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/ETH.svg`;
|
|
20
|
+
// }
|
|
21
|
+
// if (this.symbol === Crypto.RAI) {
|
|
22
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/ETH.svg`;
|
|
23
|
+
// }
|
|
24
|
+
// if (this.symbol === Crypto.WBTC) {
|
|
25
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/WBTC.svg`;
|
|
26
|
+
// }
|
|
27
|
+
// if (this.symbol === Crypto.WETH) {
|
|
28
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/ETH.svg`;
|
|
29
|
+
// }
|
|
30
|
+
// if (this.symbol.includes("USDT")) {
|
|
31
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/USDT.svg`;
|
|
32
|
+
// }
|
|
33
|
+
if (this.rawSymbol.includes("USDC")) {
|
|
34
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/USDC.svg`;
|
|
35
|
+
}
|
|
36
|
+
if (this.rawSymbol.includes("BTC")) {
|
|
37
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/BTC.svg`;
|
|
38
|
+
// }
|
|
39
|
+
// if (this.symbol.includes("DAI")) {
|
|
40
|
+
// return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/DAI.svg`;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/logos/${this.rawSymbol}.svg`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
getName() {
|
|
47
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
48
|
+
return "Bitcoin";
|
|
49
|
+
}
|
|
50
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
51
|
+
return "Ethereum";
|
|
52
|
+
// } else if (this.symbol === Crypto.XLM) {
|
|
53
|
+
// return "Stellar";
|
|
54
|
+
// } else if (this.symbol === Crypto.sUSDC) {
|
|
55
|
+
// return "Stellar USDC";
|
|
56
|
+
// } else if (this.symbol === Crypto.AVAX) {
|
|
57
|
+
// return "Avalanche X-Chain";
|
|
58
|
+
// } else if (this.symbol === Crypto.AVAXCUSDC) {
|
|
59
|
+
// return "C-Chain USDC";
|
|
60
|
+
// } else if (this.symbol === Crypto.DAI) {
|
|
61
|
+
// return "DAI";
|
|
62
|
+
// } else if (this.symbol === Crypto.pDAI) {
|
|
63
|
+
// return "Palm Dai";
|
|
64
|
+
}
|
|
65
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDC) {
|
|
66
|
+
return "USDC (Ethereum)";
|
|
67
|
+
}
|
|
68
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
|
|
69
|
+
return "USDC (Polygon)";
|
|
70
|
+
// } else if (this.symbol === Crypto.mUSDC) {
|
|
71
|
+
// return "Matic USDC";
|
|
72
|
+
// } else if (this.symbol === Crypto["L-BTC"]) {
|
|
73
|
+
// return "Liquid BTC";
|
|
74
|
+
// } else if (this.symbol === Crypto.USDT) {
|
|
75
|
+
// return "Tether";
|
|
76
|
+
// } else if (this.symbol === Crypto.MATIC) {
|
|
77
|
+
// return "Polygon";
|
|
78
|
+
// } else if (this.symbol === Crypto.BUSD) {
|
|
79
|
+
// return "Binance USD";
|
|
80
|
+
// } else if (this.symbol === Crypto.FUSD) {
|
|
81
|
+
// return "Flow USD";
|
|
82
|
+
// } else if (this.symbol === Crypto.GUSD) {
|
|
83
|
+
// return "Gemini Dollar";
|
|
84
|
+
// } else if (this.symbol === Crypto.PAX) {
|
|
85
|
+
// return "Paxos Standard";
|
|
86
|
+
// } else if (this.symbol === Crypto.USDS) {
|
|
87
|
+
// return "Stalby Dollar";
|
|
88
|
+
// } else if (this.symbol === Crypto.AAVE) {
|
|
89
|
+
// return "Aave";
|
|
90
|
+
// } else if (this.symbol === Crypto.COMP) {
|
|
91
|
+
// return "Compound";
|
|
92
|
+
// } else if (this.symbol === Crypto.LINK) {
|
|
93
|
+
// return "Chainlink";
|
|
94
|
+
// } else if (this.symbol === Crypto.WBTC) {
|
|
95
|
+
// return "Wrapped Bitcoin";
|
|
96
|
+
// } else if (this.symbol === Crypto.WETH) {
|
|
97
|
+
// return "Wrapped Ethereum";
|
|
98
|
+
// } else if (this.symbol === Crypto.BAT) {
|
|
99
|
+
// return "Basic Attention Token";
|
|
100
|
+
// } else if (this.symbol === Crypto.CRV) {
|
|
101
|
+
// return "Curve";
|
|
102
|
+
// } else if (this.symbol === Crypto.MKR) {
|
|
103
|
+
// return "Maker";
|
|
104
|
+
// } else if (this.symbol === Crypto.SNX) {
|
|
105
|
+
// return "Synthetix";
|
|
106
|
+
// } else if (this.symbol === Crypto.UMA) {
|
|
107
|
+
// return "Uma";
|
|
108
|
+
// } else if (this.symbol === Crypto.UNI) {
|
|
109
|
+
// return "Uniswap";
|
|
110
|
+
// } else if (this.symbol === Crypto.YFI) {
|
|
111
|
+
// return "Yearn Finance";
|
|
112
|
+
// } else if (this.symbol === Crypto.GYEN) {
|
|
113
|
+
// return "Digital JPY";
|
|
114
|
+
// } else if (this.symbol === Crypto.ZUSD) {
|
|
115
|
+
// return "Digital USD";
|
|
116
|
+
// } else if (this.symbol === Crypto.RAI) {
|
|
117
|
+
// return "Rai Reflex Index";
|
|
118
|
+
// } else if (this.symbol === Crypto.LETH) {
|
|
119
|
+
// return "Loopring Ethereum";
|
|
120
|
+
// } else if (this.symbol === Crypto.LUSDC) {
|
|
121
|
+
// return "Loopring USDC";
|
|
122
|
+
// } else if (this.symbol === Crypto.ALGO) {
|
|
123
|
+
// return "Algorand";
|
|
124
|
+
// } else if (this.symbol === Crypto.AUSDC) {
|
|
125
|
+
// return "Algorand USDC";
|
|
126
|
+
// } else if (this.symbol === Crypto.AUSDT) {
|
|
127
|
+
// return "Algorand USDT";
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return this.rawSymbol;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
getSymbol() {
|
|
134
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
135
|
+
return "BTC";
|
|
136
|
+
}
|
|
137
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
138
|
+
return "ETH";
|
|
139
|
+
}
|
|
140
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDC) {
|
|
141
|
+
return "USDC (Ethereum)";
|
|
142
|
+
}
|
|
143
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
|
|
144
|
+
return "USDC (Polygon)";
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
return this.rawSymbol;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
getGasSymbol() {
|
|
151
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
152
|
+
return "BTC";
|
|
153
|
+
}
|
|
154
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
155
|
+
return "ETH";
|
|
156
|
+
}
|
|
157
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
|
|
158
|
+
return "MATIC";
|
|
159
|
+
}
|
|
160
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDC) {
|
|
161
|
+
return "ETH";
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return this.rawSymbol;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
getDescription() {
|
|
168
|
+
if (this.symbol === crypto_1.Crypto.BTC) {
|
|
169
|
+
return "Bitcoin is a decentralized digital currency that can be transferred on the peer-to-peer bitcoin network.";
|
|
170
|
+
}
|
|
171
|
+
else if (this.symbol === crypto_1.Crypto.ETH) {
|
|
172
|
+
return "Ethereum is a decentralized, open-source blockchain with smart contract functionality.";
|
|
173
|
+
// } else if (this.symbol === Crypto.XLM) {
|
|
174
|
+
// return "Stellar is an open source, decentralized protocol for digital currency to fiat money low-cost transfers which allows cross-border transactions between any pair of currencies.";
|
|
175
|
+
// } else if (this.symbol === Crypto.sUSDC) {
|
|
176
|
+
// return "Stellar USDC combines the power of the Stellar network with a fully-backed and trusted digital US Dollar asset.";
|
|
177
|
+
// } else if (this.symbol === Crypto.AVAX) {
|
|
178
|
+
// return "Avalanche is a decentralized, open-source proof of stake blockchain with smart contract functionality. AVAX is the native cryptocurrency of the platform.";
|
|
179
|
+
// } else if (this.symbol === Crypto.AVAXCUSDC) {
|
|
180
|
+
// return "A token representing USDC on Avalanche that was bridged from the Ethereum blockchain via the Avalanche Bridge";
|
|
181
|
+
// } else if (this.symbol === Crypto.DAI) {
|
|
182
|
+
// return "Dai is a stablecoin cryptocurrency on the Ethereum blockchain which aims to keep its value as close to one United States dollar as possible through a system of smart contracts and the decentralized participants which those contracts incentivize to perform maintenance and governance functions.";
|
|
183
|
+
}
|
|
184
|
+
else if (this.symbol === crypto_1.Crypto.USDC) {
|
|
185
|
+
return "USD Coin is a digital stablecoin pegged to the United States dollar. USD Coin is managed by a consortium called Centre, which was founded by Circle and includes members from the cryptocurrency exchange Coinbase and Bitcoin mining company Bitmain, an investor in Circle.";
|
|
186
|
+
// } else if (this.symbol === Crypto.mUSDC) {
|
|
187
|
+
// return "USDC on the Polygon chain";
|
|
188
|
+
// } else if (this.symbol === Crypto.USDT) {
|
|
189
|
+
// return "Tetheris an USD-backed cryptocurrency stablecoin. It was launched by the company Tether Limited Inc.";
|
|
190
|
+
// } else if (this.symbol === Crypto.BUSD) {
|
|
191
|
+
// return "BUSD is USD-backed stablecoin issued by Binance and Paxos";
|
|
192
|
+
// } else if (this.symbol === Crypto.GUSD) {
|
|
193
|
+
// return "Gemini dollar is a cryptographic token built on the Ethereum network according to the ERC-20 standard, and is strictly pegged 1:1 to the U.S. dollar.";
|
|
194
|
+
// } else if (this.symbol === Crypto.PAX) {
|
|
195
|
+
// return "The Paxos Standard Token is a stablecoin running on Ethereum.";
|
|
196
|
+
// } else if (this.symbol === Crypto.AAVE) {
|
|
197
|
+
// return "Aave is a decentralized finance (DeFi) lending platform primarily based on the Ethereum blockchain.";
|
|
198
|
+
// } else if (this.symbol === Crypto.COMP) {
|
|
199
|
+
// return "Compound is a decentralized, blockchain-based protocol that allows you to lend and borrow crypto — and have a say in its governance with its native COMP token.";
|
|
200
|
+
// } else if (this.symbol === Crypto.LINK) {
|
|
201
|
+
// return "Chainlink is a decentralized blockchain oracle network built on Ethereum.";
|
|
202
|
+
// } else if (this.symbol === Crypto.WBTC) {
|
|
203
|
+
// return "WBTC is an Ethereum ERC-20 token that represents Bitcoin and can be swapped on a 1:1 basis for BTC.";
|
|
204
|
+
// } else if (this.symbol === Crypto.WETH) {
|
|
205
|
+
// return "WETH is the ERC-20 compatible and tradable version of ETH and can be used to interact with other ERC-20 assets.";
|
|
206
|
+
// } else if (this.symbol === Crypto.BAT) {
|
|
207
|
+
// return "The Basic Attention Token is a blockchain-based system for tracking media consumers' time and attention on websites using the Brave web browser.";
|
|
208
|
+
// } else if (this.symbol === Crypto.CRV) {
|
|
209
|
+
// return "Curve is an Ethereum token that powers Curve.fi, a decentralized exchange and automated market maker protocol.";
|
|
210
|
+
// } else if (this.symbol === Crypto.MKR) {
|
|
211
|
+
// return "Maker is a smart contract platform built on the Ethereum blockchain that aims to solve volatility issues for the crypto market.";
|
|
212
|
+
// } else if (this.symbol === Crypto.SNX) {
|
|
213
|
+
// return "Synthetix supports synthetic commodities like gold and silver, synthetic cryptocurrencies, synthetic inverse cryptocurrencies, synthetic cryptocurrency indexes, and synthetic fiat currencies.";
|
|
214
|
+
// } else if (this.symbol === Crypto.UNI) {
|
|
215
|
+
// return "Uniswap is an Ethereum token that powers Uniswap, an automated liquidity provider that's designed to make it easy to exchange Ethereum (ERC-20) tokens.";
|
|
216
|
+
// } else if (this.symbol === Crypto.YFI) {
|
|
217
|
+
// return "Token of Yearn Finance, a DeFi lending protocol built on Ethereum. It was made to alleviate popular DeFi protocols for non-savvy users and provide the largest profit to the holders of cryptocurrencies.";
|
|
218
|
+
// } else if (this.symbol === Crypto.ALGO) {
|
|
219
|
+
// return "Algorand is a blockchain platform and cryptocurrency designed to function like a major payment processor.";
|
|
220
|
+
// } else if (this.symbol === Crypto.AUSDC) {
|
|
221
|
+
// return "USDC on the Algorand blockchain";
|
|
222
|
+
// } else if (this.symbol === Crypto.AUSDT) {
|
|
223
|
+
// return "USDT on the Algorand blockchain";
|
|
224
|
+
// } else if (this.symbol === Crypto.MATIC) {
|
|
225
|
+
// return "Polygon is a cryptocurrency and a technology platform that was launched to connect and grow Ethereum-compatible projects and blockchains.";
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
return this.rawSymbol;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
exports.CryptoAsset = CryptoAsset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Fiat } from "../types/fiat";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class FiatAsset extends Asset {
|
|
4
|
+
symbol: Fiat;
|
|
5
|
+
constructor(symbol: Fiat);
|
|
6
|
+
getName(): "Brazilian Real" | "United States Dollar" | "Peruvian Sol" | "ERR";
|
|
7
|
+
getImageUri(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FiatAsset = void 0;
|
|
4
|
+
const fiat_1 = require("../types/fiat");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class FiatAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
// if (this.symbol === Fiat.AUD) {
|
|
13
|
+
// return "Australian Dollar";
|
|
14
|
+
// // } else if (this.symbol === Fiat.BGN) {
|
|
15
|
+
// // return "Bulgarian Lev";
|
|
16
|
+
if (this.symbol === fiat_1.Fiat.BRL) {
|
|
17
|
+
return "Brazilian Real";
|
|
18
|
+
}
|
|
19
|
+
// } else if (this.symbol === Fiat.CAD) {
|
|
20
|
+
// return "Canadian Dollar";
|
|
21
|
+
// } else if (this.symbol === Fiat.CHF) {
|
|
22
|
+
// return "Swiss Franc";
|
|
23
|
+
// } else if (this.symbol === Fiat.CLP) {
|
|
24
|
+
// return "Chilean Peso";
|
|
25
|
+
// } else if (this.symbol === Fiat.CNY) {
|
|
26
|
+
// return "Renminbi";
|
|
27
|
+
// } else if (this.symbol === Fiat.CZK) {
|
|
28
|
+
// return "Czech Koruna";
|
|
29
|
+
// } else if (this.symbol === Fiat.DKK) {
|
|
30
|
+
// return "Danish Krone";
|
|
31
|
+
// } else if (this.symbol === Fiat.EUR) {
|
|
32
|
+
// return "Euro";
|
|
33
|
+
// } else if (this.symbol === Fiat.GBP) {
|
|
34
|
+
// return "British Pound";
|
|
35
|
+
// } else if (this.symbol === Fiat.HRK) {
|
|
36
|
+
// return "Croatian Kuna";
|
|
37
|
+
// } else if (this.symbol === Fiat.HUF) {
|
|
38
|
+
// return "Hungarian Forint";
|
|
39
|
+
// } else if (this.symbol === Fiat.IDR) {
|
|
40
|
+
// return "Indonesian Rupiah";
|
|
41
|
+
// } else if (this.symbol === Fiat.ILS) {
|
|
42
|
+
// return "Israeli Shekel";
|
|
43
|
+
// } else if (this.symbol === Fiat.INR) {
|
|
44
|
+
// return "Indian Rupee";
|
|
45
|
+
// } else if (this.symbol === Fiat.JPY) {
|
|
46
|
+
// return "Japanese Yen";
|
|
47
|
+
// } else if (this.symbol === Fiat.KRW) {
|
|
48
|
+
// return "South Korean Won";
|
|
49
|
+
// } else if (this.symbol === Fiat.MXN) {
|
|
50
|
+
// return "Mexican Peso";
|
|
51
|
+
// } else if (this.symbol === Fiat.MYR) {
|
|
52
|
+
// return "Malaysian Ringgit";
|
|
53
|
+
// } else if (this.symbol === Fiat.NOK) {
|
|
54
|
+
// return "Norwegian Krone";
|
|
55
|
+
// } else if (this.symbol === Fiat.NZD) {
|
|
56
|
+
// return "New Zealand Dollar";
|
|
57
|
+
// } else if (this.symbol === Fiat.PHP) {
|
|
58
|
+
// return "Philippine Peso";
|
|
59
|
+
// } else if (this.symbol === Fiat.PLN) {
|
|
60
|
+
// return "Polish Złoty";
|
|
61
|
+
// } else if (this.symbol === Fiat.RON) {
|
|
62
|
+
// return "Swedish Krona";
|
|
63
|
+
// } else if (this.symbol === Fiat.RUB) {
|
|
64
|
+
// return "Russian Ruble";
|
|
65
|
+
// } else if (this.symbol === Fiat.SEK) {
|
|
66
|
+
// return "Swedish Krona";
|
|
67
|
+
// } else if (this.symbol === Fiat.THB) {
|
|
68
|
+
// return "Thai Baht";
|
|
69
|
+
// } else if (this.symbol === Fiat.TRY) {
|
|
70
|
+
// return "Turkish Lira";
|
|
71
|
+
if (this.symbol === fiat_1.Fiat.USD) {
|
|
72
|
+
return "United States Dollar";
|
|
73
|
+
// } else if (this.symbol === Fiat.VND) {
|
|
74
|
+
// return "Vietnamese Dong";
|
|
75
|
+
// } else if (this.symbol === Fiat.ZAR) {
|
|
76
|
+
// return "South African Rand";
|
|
77
|
+
// } else if (this.symbol === Fiat.COP) {
|
|
78
|
+
// return "Colombian Peso";
|
|
79
|
+
// } else if (this.symbol === Fiat.SGD) {
|
|
80
|
+
// return "Singapore Dollar";
|
|
81
|
+
// } else if (this.symbol === Fiat.ARS) {
|
|
82
|
+
// return "Argentine Peso";
|
|
83
|
+
// } else if (this.symbol === Fiat.ISK) {
|
|
84
|
+
// return "Icelandic Krona";
|
|
85
|
+
// } else if (this.symbol === Fiat.HKD) {
|
|
86
|
+
// return "Hong Kong Dollar";
|
|
87
|
+
}
|
|
88
|
+
else if (this.symbol === fiat_1.Fiat.PEN) {
|
|
89
|
+
return "Peruvian Sol";
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return "ERR";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
getImageUri() {
|
|
96
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/${this.symbol.substring(0, 2)}.svg`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.FiatAsset = FiatAsset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Language } from "../types/language";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class LanguageAsset extends Asset {
|
|
4
|
+
symbol: Language;
|
|
5
|
+
constructor(symbol: Language);
|
|
6
|
+
getName(): "ERR" | "English" | "Spanish" | "French" | "Portugese";
|
|
7
|
+
getImageUri(): "https://purecatamphetamine.github.io/country-flag-icons/3x2/US.svg" | "https://purecatamphetamine.github.io/country-flag-icons/3x2/MX.svg" | "https://purecatamphetamine.github.io/country-flag-icons/3x2/FR.svg" | "https://purecatamphetamine.github.io/country-flag-icons/3x2/PT.svg";
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LanguageAsset = void 0;
|
|
4
|
+
const language_1 = require("../types/language");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class LanguageAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
if (this.symbol === language_1.Language.EN) {
|
|
13
|
+
return "English";
|
|
14
|
+
}
|
|
15
|
+
else if (this.symbol === language_1.Language.ES) {
|
|
16
|
+
return "Spanish";
|
|
17
|
+
}
|
|
18
|
+
else if (this.symbol === language_1.Language.FR) {
|
|
19
|
+
return "French";
|
|
20
|
+
}
|
|
21
|
+
else if (this.symbol === language_1.Language.PT) {
|
|
22
|
+
return "Portugese";
|
|
23
|
+
}
|
|
24
|
+
else
|
|
25
|
+
return "ERR";
|
|
26
|
+
}
|
|
27
|
+
getImageUri() {
|
|
28
|
+
if (this.symbol === language_1.Language.EN) {
|
|
29
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/US.svg`;
|
|
30
|
+
}
|
|
31
|
+
else if (this.symbol === language_1.Language.ES) {
|
|
32
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/MX.svg`;
|
|
33
|
+
}
|
|
34
|
+
else if (this.symbol === language_1.Language.FR) {
|
|
35
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/FR.svg`;
|
|
36
|
+
}
|
|
37
|
+
else if (this.symbol === language_1.Language.PT) {
|
|
38
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/PT.svg`;
|
|
39
|
+
}
|
|
40
|
+
else
|
|
41
|
+
return `https://purecatamphetamine.github.io/country-flag-icons/3x2/US.svg`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.LanguageAsset = LanguageAsset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PaymentMethod } from "../types/payment-method";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class PaymentMethodAsset extends Asset {
|
|
4
|
+
symbol: PaymentMethod;
|
|
5
|
+
constructor(symbol: PaymentMethod);
|
|
6
|
+
getName(): "Card" | "Bank Transfer" | "Err";
|
|
7
|
+
getImageUri(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentMethodAsset = void 0;
|
|
4
|
+
const payment_method_1 = require("../types/payment-method");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class PaymentMethodAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
switch (this.symbol) {
|
|
13
|
+
case payment_method_1.PaymentMethod.Card:
|
|
14
|
+
return "Card";
|
|
15
|
+
case payment_method_1.PaymentMethod.BankTransfer:
|
|
16
|
+
return "Bank Transfer";
|
|
17
|
+
default:
|
|
18
|
+
return "Err";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
getImageUri() {
|
|
22
|
+
if (this.symbol === payment_method_1.PaymentMethod.BankTransfer) {
|
|
23
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/icons/bank.svg`;
|
|
24
|
+
}
|
|
25
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/icons/${this.symbol}.svg`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.PaymentMethodAsset = PaymentMethodAsset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PayoutMethod } from "../types/payout-method";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class PayoutMethodAsset extends Asset {
|
|
4
|
+
symbol: PayoutMethod;
|
|
5
|
+
constructor(symbol: PayoutMethod);
|
|
6
|
+
getName(): "Bank Transfer" | "Err";
|
|
7
|
+
getImageUri(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayoutMethodAsset = void 0;
|
|
4
|
+
const payout_method_1 = require("../types/payout-method");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class PayoutMethodAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
switch (this.symbol) {
|
|
13
|
+
case payout_method_1.PayoutMethod.BankTransfer:
|
|
14
|
+
return "Bank Transfer";
|
|
15
|
+
default:
|
|
16
|
+
return "Err";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
getImageUri() {
|
|
20
|
+
if (this.symbol === payout_method_1.PayoutMethod.BankTransfer) {
|
|
21
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/icons/bank.svg`;
|
|
22
|
+
}
|
|
23
|
+
return `${process.env.NEXT_PUBLIC_BASE_PATH}/icons/${this.symbol}.svg`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.PayoutMethodAsset = PayoutMethodAsset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { USState } from "../types/us-state";
|
|
2
|
+
import { Asset } from "./Asset";
|
|
3
|
+
export declare class USStateAsset extends Asset {
|
|
4
|
+
symbol: USState;
|
|
5
|
+
constructor(symbol: USState);
|
|
6
|
+
getName(): "Alabama" | "Alaska" | "Arizona" | "Arkansas" | "American Samoa" | "California" | "Colorado" | "Connecticut" | "Delaware" | "District of Columbia" | "Florida" | "Federated States of Micronesia" | "Georgia" | "Guam" | "Hawaii" | "Idaho" | "Illinois" | "Indiana" | "Iowa" | "Kansas" | "Kentucky" | "Louisiana" | "Maine" | "Maryland" | "Massachusetts" | "Michigan" | "Minnesota" | "Marshall Islands" | "Northern Mariana Islands" | "Mississippi" | "Missouri" | "Montana" | "Nebraska" | "Nevada" | "New Hampshire" | "New Jersey" | "New Mexico" | "New York" | "North Carolina" | "North Dakota" | "Ohio" | "Oklahoma" | "Oregon" | "Pennsylvania" | "Palau" | "Puerto Rico" | "Rhode Island" | "South Carolina" | "South Dakota" | "Tennessee" | "Texas" | "Utah" | "Vermont" | "Virgin Islands" | "Virginia" | "Washington" | "West Virginia" | "Wisconsin" | "Wyoming";
|
|
7
|
+
getImageUri(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USStateAsset = void 0;
|
|
4
|
+
const us_state_1 = require("../types/us-state");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class USStateAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
switch (this.symbol) {
|
|
13
|
+
case us_state_1.USState.AL:
|
|
14
|
+
return "Alabama";
|
|
15
|
+
case us_state_1.USState.AK:
|
|
16
|
+
return "Alaska";
|
|
17
|
+
case us_state_1.USState.AZ:
|
|
18
|
+
return "Arizona";
|
|
19
|
+
case us_state_1.USState.AR:
|
|
20
|
+
return "Arkansas";
|
|
21
|
+
case us_state_1.USState.AS:
|
|
22
|
+
return "American Samoa";
|
|
23
|
+
case us_state_1.USState.CA:
|
|
24
|
+
return "California";
|
|
25
|
+
case us_state_1.USState.CO:
|
|
26
|
+
return "Colorado";
|
|
27
|
+
case us_state_1.USState.CT:
|
|
28
|
+
return "Connecticut";
|
|
29
|
+
case us_state_1.USState.DE:
|
|
30
|
+
return "Delaware";
|
|
31
|
+
case us_state_1.USState.DC:
|
|
32
|
+
return "District of Columbia";
|
|
33
|
+
case us_state_1.USState.FL:
|
|
34
|
+
return "Florida";
|
|
35
|
+
case us_state_1.USState.FM:
|
|
36
|
+
return "Federated States of Micronesia";
|
|
37
|
+
case us_state_1.USState.GA:
|
|
38
|
+
return "Georgia";
|
|
39
|
+
case us_state_1.USState.GU:
|
|
40
|
+
return "Guam";
|
|
41
|
+
case us_state_1.USState.HI:
|
|
42
|
+
return "Hawaii";
|
|
43
|
+
case us_state_1.USState.ID:
|
|
44
|
+
return "Idaho";
|
|
45
|
+
case us_state_1.USState.IL:
|
|
46
|
+
return "Illinois";
|
|
47
|
+
case us_state_1.USState.IN:
|
|
48
|
+
return "Indiana";
|
|
49
|
+
case us_state_1.USState.IA:
|
|
50
|
+
return "Iowa";
|
|
51
|
+
case us_state_1.USState.KS:
|
|
52
|
+
return "Kansas";
|
|
53
|
+
case us_state_1.USState.KY:
|
|
54
|
+
return "Kentucky";
|
|
55
|
+
case us_state_1.USState.LA:
|
|
56
|
+
return "Louisiana";
|
|
57
|
+
case us_state_1.USState.ME:
|
|
58
|
+
return "Maine";
|
|
59
|
+
case us_state_1.USState.MD:
|
|
60
|
+
return "Maryland";
|
|
61
|
+
case us_state_1.USState.MA:
|
|
62
|
+
return "Massachusetts";
|
|
63
|
+
case us_state_1.USState.MI:
|
|
64
|
+
return "Michigan";
|
|
65
|
+
case us_state_1.USState.MN:
|
|
66
|
+
return "Minnesota";
|
|
67
|
+
case us_state_1.USState.MH:
|
|
68
|
+
return "Marshall Islands";
|
|
69
|
+
case us_state_1.USState.MP:
|
|
70
|
+
return "Northern Mariana Islands";
|
|
71
|
+
case us_state_1.USState.MS:
|
|
72
|
+
return "Mississippi";
|
|
73
|
+
case us_state_1.USState.MO:
|
|
74
|
+
return "Missouri";
|
|
75
|
+
case us_state_1.USState.MT:
|
|
76
|
+
return "Montana";
|
|
77
|
+
case us_state_1.USState.NE:
|
|
78
|
+
return "Nebraska";
|
|
79
|
+
case us_state_1.USState.NV:
|
|
80
|
+
return "Nevada";
|
|
81
|
+
case us_state_1.USState.NH:
|
|
82
|
+
return "New Hampshire";
|
|
83
|
+
case us_state_1.USState.NJ:
|
|
84
|
+
return "New Jersey";
|
|
85
|
+
case us_state_1.USState.NM:
|
|
86
|
+
return "New Mexico";
|
|
87
|
+
case us_state_1.USState.NY:
|
|
88
|
+
return "New York";
|
|
89
|
+
case us_state_1.USState.NC:
|
|
90
|
+
return "North Carolina";
|
|
91
|
+
case us_state_1.USState.ND:
|
|
92
|
+
return "North Dakota";
|
|
93
|
+
case us_state_1.USState.OH:
|
|
94
|
+
return "Ohio";
|
|
95
|
+
case us_state_1.USState.OK:
|
|
96
|
+
return "Oklahoma";
|
|
97
|
+
case us_state_1.USState.OR:
|
|
98
|
+
return "Oregon";
|
|
99
|
+
case us_state_1.USState.PA:
|
|
100
|
+
return "Pennsylvania";
|
|
101
|
+
case us_state_1.USState.PW:
|
|
102
|
+
return "Palau";
|
|
103
|
+
case us_state_1.USState.PR:
|
|
104
|
+
return "Puerto Rico";
|
|
105
|
+
case us_state_1.USState.RI:
|
|
106
|
+
return "Rhode Island";
|
|
107
|
+
case us_state_1.USState.SC:
|
|
108
|
+
return "South Carolina";
|
|
109
|
+
case us_state_1.USState.SD:
|
|
110
|
+
return "South Dakota";
|
|
111
|
+
case us_state_1.USState.TN:
|
|
112
|
+
return "Tennessee";
|
|
113
|
+
case us_state_1.USState.TX:
|
|
114
|
+
return "Texas";
|
|
115
|
+
case us_state_1.USState.UT:
|
|
116
|
+
return "Utah";
|
|
117
|
+
case us_state_1.USState.VT:
|
|
118
|
+
return "Vermont";
|
|
119
|
+
case us_state_1.USState.VI:
|
|
120
|
+
return "Virgin Islands";
|
|
121
|
+
case us_state_1.USState.VA:
|
|
122
|
+
return "Virginia";
|
|
123
|
+
case us_state_1.USState.WA:
|
|
124
|
+
return "Washington";
|
|
125
|
+
case us_state_1.USState.WV:
|
|
126
|
+
return "West Virginia";
|
|
127
|
+
case us_state_1.USState.WI:
|
|
128
|
+
return "Wisconsin";
|
|
129
|
+
case us_state_1.USState.WY:
|
|
130
|
+
return "Wyoming";
|
|
131
|
+
default:
|
|
132
|
+
return this.symbol;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
getImageUri() {
|
|
136
|
+
// return url to image of state
|
|
137
|
+
return ``;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.USStateAsset = USStateAsset;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WyrePaymentMethodAsset = void 0;
|
|
4
|
+
const payment_method_1 = require("../types/payment-method");
|
|
5
|
+
const Asset_1 = require("./Asset");
|
|
6
|
+
class WyrePaymentMethodAsset extends Asset_1.Asset {
|
|
7
|
+
constructor(symbol) {
|
|
8
|
+
super(symbol);
|
|
9
|
+
this.symbol = symbol;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
return this.symbol;
|
|
13
|
+
}
|
|
14
|
+
getImageUri() {
|
|
15
|
+
if (this.symbol === payment_method_1.PaymentMethod.Card) {
|
|
16
|
+
return `/icons/bank.svg`;
|
|
17
|
+
}
|
|
18
|
+
return `/icons/${this.symbol}.svg`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.WyrePaymentMethodAsset = WyrePaymentMethodAsset;
|
package/build/index.d.ts
CHANGED
|
@@ -108,3 +108,12 @@ export * from "./types/business-user";
|
|
|
108
108
|
export * from "./types/business-user-input";
|
|
109
109
|
export * from "./types/business-user-update";
|
|
110
110
|
export * from "./types/user-type";
|
|
111
|
+
export * from "./classes/Asset";
|
|
112
|
+
export * from "./classes/CountryAsset";
|
|
113
|
+
export * from "./classes/CryptoAsset";
|
|
114
|
+
export * from "./classes/FiatAsset";
|
|
115
|
+
export * from "./classes/LanguageAsset";
|
|
116
|
+
export * from "./classes/PaymentMethodAsset";
|
|
117
|
+
export * from "./classes/PayoutMethodAsset";
|
|
118
|
+
export * from "./classes/USStateAsset";
|
|
119
|
+
export * from "./classes/WyrePaymentMethodAsset";
|
package/build/index.js
CHANGED
|
@@ -124,3 +124,12 @@ __exportStar(require("./types/business-user"), exports);
|
|
|
124
124
|
__exportStar(require("./types/business-user-input"), exports);
|
|
125
125
|
__exportStar(require("./types/business-user-update"), exports);
|
|
126
126
|
__exportStar(require("./types/user-type"), exports);
|
|
127
|
+
__exportStar(require("./classes/Asset"), exports);
|
|
128
|
+
__exportStar(require("./classes/CountryAsset"), exports);
|
|
129
|
+
__exportStar(require("./classes/CryptoAsset"), exports);
|
|
130
|
+
__exportStar(require("./classes/FiatAsset"), exports);
|
|
131
|
+
__exportStar(require("./classes/LanguageAsset"), exports);
|
|
132
|
+
__exportStar(require("./classes/PaymentMethodAsset"), exports);
|
|
133
|
+
__exportStar(require("./classes/PayoutMethodAsset"), exports);
|
|
134
|
+
__exportStar(require("./classes/USStateAsset"), exports);
|
|
135
|
+
__exportStar(require("./classes/WyrePaymentMethodAsset"), exports);
|
package/build/types/crypto.d.ts
CHANGED
package/build/types/crypto.js
CHANGED