@riocrypto/common 1.0.2658 → 1.0.2659
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/CryptoAsset.d.ts +3 -3
- package/build/classes/CryptoAsset.js +12 -0
- package/build/helpers/format-transaction-hash.js +3 -0
- package/build/helpers/get-address-for-testing.js +2 -0
- package/build/helpers/validate-address.js +1 -0
- package/build/types/blockchain.d.ts +1 -0
- package/build/types/blockchain.js +1 -0
- package/build/types/crypto.d.ts +1 -0
- package/build/types/crypto.js +1 -0
- package/build/types/currency-with-country.d.ts +1 -0
- package/build/types/currency-with-country.js +1 -0
- package/build/types/stablecoin-type.js +2 -0
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ export declare class CryptoAsset extends Asset {
|
|
|
4
4
|
rawSymbol: Crypto;
|
|
5
5
|
constructor(rawSymbol: Crypto);
|
|
6
6
|
getImageUri(): string;
|
|
7
|
-
getName(): Crypto.XLM | Crypto.Other | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "Tron" | "Solana" | "Polygon" | "BNB";
|
|
8
|
-
getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "BTC" | "ETH" | "ETH (Base)";
|
|
9
|
-
getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "BTC" | "ETH" | "BASECHAIN_ETH" | "MATIC" | "TRX" | "BNB_BSC" | "SOL" | "XLM";
|
|
7
|
+
getName(): Crypto.XLM | Crypto.Other | "Bitcoin" | "Ethereum" | "Ethereum (Base)" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "Tron" | "Solana" | "Polygon" | "BNB";
|
|
8
|
+
getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDC (Base)" | "USDC.e (Tempo)" | "EURC (Ethereum)" | "EURC (Solana)" | "EURC (Base)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "USDT (BSC)" | "BTC" | "ETH" | "ETH (Base)";
|
|
9
|
+
getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | Crypto.XLM | Crypto.BNB | Crypto.Other | "BTC" | "ETH" | "BASECHAIN_ETH" | "MATIC" | "TRX" | "BNB_BSC" | "SOL" | "XLM" | "TEMPO";
|
|
10
10
|
getDescription(): string;
|
|
11
11
|
}
|
|
@@ -77,6 +77,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
77
77
|
else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
|
|
78
78
|
return "USDC (Base)";
|
|
79
79
|
}
|
|
80
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCTempoBridged) {
|
|
81
|
+
return "USDC.e (Tempo)";
|
|
82
|
+
}
|
|
80
83
|
else if (this.rawSymbol === crypto_1.Crypto.EURCEthereum) {
|
|
81
84
|
return "EURC (Ethereum)";
|
|
82
85
|
}
|
|
@@ -142,6 +145,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
142
145
|
else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
|
|
143
146
|
return "USDC (Base)";
|
|
144
147
|
}
|
|
148
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCTempoBridged) {
|
|
149
|
+
return "USDC.e (Tempo)";
|
|
150
|
+
}
|
|
145
151
|
else if (this.rawSymbol === crypto_1.Crypto.EURCEthereum) {
|
|
146
152
|
return "EURC (Ethereum)";
|
|
147
153
|
}
|
|
@@ -198,6 +204,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
198
204
|
else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
|
|
199
205
|
return "BASECHAIN_ETH";
|
|
200
206
|
}
|
|
207
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCTempoBridged) {
|
|
208
|
+
return "TEMPO";
|
|
209
|
+
}
|
|
201
210
|
else if (this.rawSymbol === crypto_1.Crypto.USDC) {
|
|
202
211
|
return "ETH";
|
|
203
212
|
}
|
|
@@ -258,6 +267,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
258
267
|
else if (this.rawSymbol === crypto_1.Crypto.USDCBase) {
|
|
259
268
|
return "USDC on the Base chain.";
|
|
260
269
|
}
|
|
270
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCTempoBridged) {
|
|
271
|
+
return "Bridged USDC on the Tempo chain.";
|
|
272
|
+
}
|
|
261
273
|
else if (this.rawSymbol === crypto_1.Crypto.EURCEthereum) {
|
|
262
274
|
return "EURC on the Ethereum chain.";
|
|
263
275
|
}
|
|
@@ -33,6 +33,9 @@ const formatTransactionHash = (hash, crypto) => {
|
|
|
33
33
|
else if ([crypto_1.Crypto.USDCBase].includes(crypto)) {
|
|
34
34
|
return `https://basescan.org/tx/${hash}`;
|
|
35
35
|
}
|
|
36
|
+
else if ([crypto_1.Crypto.USDCTempoBridged].includes(crypto)) {
|
|
37
|
+
return `https://explore.tempo.xyz/tx/${hash}`;
|
|
38
|
+
}
|
|
36
39
|
else {
|
|
37
40
|
return "N/A";
|
|
38
41
|
}
|
|
@@ -33,6 +33,8 @@ const getAddressForTesting = (crypto) => {
|
|
|
33
33
|
};
|
|
34
34
|
case crypto_1.Crypto.USDCBase:
|
|
35
35
|
return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
|
|
36
|
+
case crypto_1.Crypto.USDCTempoBridged:
|
|
37
|
+
return { address: "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C" };
|
|
36
38
|
default:
|
|
37
39
|
throw new Error(`Unsupported crypto: ${crypto}`);
|
|
38
40
|
}
|
|
@@ -19,6 +19,7 @@ const isValidCryptoAddress = (address, crypto) => {
|
|
|
19
19
|
crypto_1.Crypto.USDC ||
|
|
20
20
|
crypto_1.Crypto.USDCPolygon ||
|
|
21
21
|
crypto_1.Crypto.USDCBase ||
|
|
22
|
+
crypto_1.Crypto.USDCTempoBridged ||
|
|
22
23
|
crypto_1.Crypto.USDTTron ||
|
|
23
24
|
crypto_1.Crypto.USDTPolygon ||
|
|
24
25
|
crypto_1.Crypto.USDTEthereum ||
|
package/build/types/crypto.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare enum Crypto {
|
|
|
8
8
|
USDCSolana = "SOL_USDC_PTHX",
|
|
9
9
|
USDCStellar = "XLM_USDC_5F3T",
|
|
10
10
|
USDCBase = "USDC_BASECHAIN_ETH_5I5C",
|
|
11
|
+
USDCTempoBridged = "USDCE_TEMPO_MXYR",
|
|
11
12
|
EURCEthereum = "EUROC_ETH_F5NG",
|
|
12
13
|
EURCSolana = "EURC_SOL",
|
|
13
14
|
EURCBase = "EURC_B609K9QB_Y213",
|
package/build/types/crypto.js
CHANGED
|
@@ -12,6 +12,7 @@ var Crypto;
|
|
|
12
12
|
Crypto["USDCSolana"] = "SOL_USDC_PTHX";
|
|
13
13
|
Crypto["USDCStellar"] = "XLM_USDC_5F3T";
|
|
14
14
|
Crypto["USDCBase"] = "USDC_BASECHAIN_ETH_5I5C";
|
|
15
|
+
Crypto["USDCTempoBridged"] = "USDCE_TEMPO_MXYR";
|
|
15
16
|
Crypto["EURCEthereum"] = "EUROC_ETH_F5NG";
|
|
16
17
|
Crypto["EURCSolana"] = "EURC_SOL";
|
|
17
18
|
Crypto["EURCBase"] = "EURC_B609K9QB_Y213";
|
|
@@ -3,6 +3,7 @@ export declare enum CurrencyWithCountry {
|
|
|
3
3
|
USDCSolana = "SOL_USDC_PTHX",
|
|
4
4
|
USDCStellar = "XLM_USDC_5F3T",
|
|
5
5
|
USDCBase = "USDC_BASECHAIN_ETH_5I5C",
|
|
6
|
+
USDCTempoBridged = "USDCE_TEMPO_MXYR",
|
|
6
7
|
EURCEthereum = "EUROC_ETH_F5NG",
|
|
7
8
|
EURCSolana = "EURC_SOL",
|
|
8
9
|
EURCBase = "EURC_B609K9QB_Y213",
|
|
@@ -7,6 +7,7 @@ var CurrencyWithCountry;
|
|
|
7
7
|
CurrencyWithCountry["USDCSolana"] = "SOL_USDC_PTHX";
|
|
8
8
|
CurrencyWithCountry["USDCStellar"] = "XLM_USDC_5F3T";
|
|
9
9
|
CurrencyWithCountry["USDCBase"] = "USDC_BASECHAIN_ETH_5I5C";
|
|
10
|
+
CurrencyWithCountry["USDCTempoBridged"] = "USDCE_TEMPO_MXYR";
|
|
10
11
|
CurrencyWithCountry["EURCEthereum"] = "EUROC_ETH_F5NG";
|
|
11
12
|
CurrencyWithCountry["EURCSolana"] = "EURC_SOL";
|
|
12
13
|
CurrencyWithCountry["EURCBase"] = "EURC_B609K9QB_Y213";
|
|
@@ -14,6 +14,7 @@ exports.USD_BACKED_CRYPTOS = [
|
|
|
14
14
|
crypto_1.Crypto.USDCSolana,
|
|
15
15
|
crypto_1.Crypto.USDCStellar,
|
|
16
16
|
crypto_1.Crypto.USDCBase,
|
|
17
|
+
crypto_1.Crypto.USDCTempoBridged,
|
|
17
18
|
crypto_1.Crypto.USDTPolygon,
|
|
18
19
|
crypto_1.Crypto.USDTEthereum,
|
|
19
20
|
crypto_1.Crypto.USDTTron,
|
|
@@ -31,6 +32,7 @@ exports.USDC_CRYPTOS = [
|
|
|
31
32
|
crypto_1.Crypto.USDCSolana,
|
|
32
33
|
crypto_1.Crypto.USDCStellar,
|
|
33
34
|
crypto_1.Crypto.USDCBase,
|
|
35
|
+
crypto_1.Crypto.USDCTempoBridged,
|
|
34
36
|
];
|
|
35
37
|
exports.USDT_CRYPTOS = [
|
|
36
38
|
crypto_1.Crypto.USDTPolygon,
|