@riocrypto/common 1.0.807 → 1.0.809

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.
@@ -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.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)";
8
- getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "BTC" | "ETH";
9
- getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "SOL";
7
+ getName(): Crypto.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)";
8
+ getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
9
+ getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
10
10
  getDescription(): string;
11
11
  }
@@ -65,6 +65,9 @@ class CryptoAsset extends Asset_1.Asset {
65
65
  else if (this.rawSymbol === crypto_1.Crypto.USDTEthereum) {
66
66
  return "USDT (Ethereum)";
67
67
  }
68
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
69
+ return "USDT (Tron)";
70
+ }
68
71
  else {
69
72
  return this.rawSymbol;
70
73
  }
@@ -91,6 +94,9 @@ class CryptoAsset extends Asset_1.Asset {
91
94
  else if (this.rawSymbol === crypto_1.Crypto.USDTEthereum) {
92
95
  return "USDT (Ethereum)";
93
96
  }
97
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
98
+ return "USDT (Tron)";
99
+ }
94
100
  else {
95
101
  return this.rawSymbol;
96
102
  }
@@ -105,6 +111,9 @@ class CryptoAsset extends Asset_1.Asset {
105
111
  else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
106
112
  return "MATIC";
107
113
  }
114
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
115
+ return "TRX";
116
+ }
108
117
  else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
109
118
  return "SOL";
110
119
  }
@@ -152,6 +161,9 @@ class CryptoAsset extends Asset_1.Asset {
152
161
  }
153
162
  else if (this.rawSymbol === crypto_1.Crypto.USDTEthereum) {
154
163
  return "USDT on the Ethereum chain.";
164
+ }
165
+ else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
166
+ return "USDT on the Tron chain.";
155
167
  // } else if (this.symbol === Crypto.mUSDC) {
156
168
  // return "USDC on the Polygon chain";
157
169
  // } else if (this.symbol === Crypto.USDT) {
@@ -11,7 +11,12 @@ const isValidCryptoAddress = (address, crypto) => {
11
11
  return bitcoinPattern.test(address);
12
12
  case crypto_1.Crypto.SOL:
13
13
  return solanaPattern.test(address);
14
- case crypto_1.Crypto.ETH || crypto_1.Crypto.USDC || crypto_1.Crypto.USDCPolygon:
14
+ case crypto_1.Crypto.ETH ||
15
+ crypto_1.Crypto.USDC ||
16
+ crypto_1.Crypto.USDCPolygon ||
17
+ crypto_1.Crypto.USDTTron ||
18
+ crypto_1.Crypto.USDTPolygon ||
19
+ crypto_1.Crypto.USDTEthereum:
15
20
  return ethereumPattern.test(address);
16
21
  default:
17
22
  return false;
@@ -6,5 +6,6 @@ export declare enum Crypto {
6
6
  USDCSolana = "SOL_USDC_PTHX",
7
7
  USDTPolygon = "USDT_POLYGON",
8
8
  USDTEthereum = "USDT_ERC20",
9
+ USDTTron = "TRX_USDT_S2UZ",
9
10
  SOL = "SOL"
10
11
  }
@@ -12,6 +12,7 @@ var Crypto;
12
12
  Crypto["USDCSolana"] = "SOL_USDC_PTHX";
13
13
  Crypto["USDTPolygon"] = "USDT_POLYGON";
14
14
  Crypto["USDTEthereum"] = "USDT_ERC20";
15
+ Crypto["USDTTron"] = "TRX_USDT_S2UZ";
15
16
  Crypto["SOL"] = "SOL";
16
17
  // XLM = "XLM",
17
18
  // sUSDC = "sUSDC",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.807",
3
+ "version": "1.0.809",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",