@riocrypto/common 1.0.2417 → 1.0.2419
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 +3 -0
- package/build/events/deposit-address-created-event.d.ts +1 -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 +3 -0
- package/build/types/bulk-crypto-payment.d.ts +1 -0
- package/build/types/crypto-address.d.ts +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/fireblocks-vault.d.ts +3 -0
- package/build/types/order.d.ts +1 -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(): "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "Tron" | "Solana" | "Polygon";
|
|
8
|
-
getSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
|
|
9
|
-
getGasSymbol(): Crypto.SOL | Crypto.TRON | Crypto.POL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
|
|
7
|
+
getName(): "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDC (Stellar)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "Tron" | "Solana" | "Polygon";
|
|
8
|
+
getSymbol(): Crypto.USDCStellar | Crypto.SOL | Crypto.TRON | Crypto.POL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Bridged to Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "USDT (Tron)" | "BTC" | "ETH";
|
|
9
|
+
getGasSymbol(): Crypto.USDCStellar | Crypto.SOL | Crypto.TRON | Crypto.POL | "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.USDCSolana) {
|
|
66
66
|
return "USDC (Solana)";
|
|
67
67
|
}
|
|
68
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDCStellar) {
|
|
69
|
+
return "USDC (Stellar)";
|
|
70
|
+
}
|
|
68
71
|
else if (this.rawSymbol === crypto_1.Crypto.USDTPolygon) {
|
|
69
72
|
return "USDT (Polygon)";
|
|
70
73
|
}
|
|
@@ -15,6 +15,9 @@ const formatTransactionHash = (hash, crypto) => {
|
|
|
15
15
|
else if ([crypto_1.Crypto.USDTTron].includes(crypto)) {
|
|
16
16
|
return `https://tronscan.org/#/transaction/${hash}`;
|
|
17
17
|
}
|
|
18
|
+
else if ([crypto_1.Crypto.USDCStellar].includes(crypto)) {
|
|
19
|
+
return `https://stellar.expert/explorer/public/tx/${hash}`;
|
|
20
|
+
}
|
|
18
21
|
else {
|
|
19
22
|
return "N/A";
|
|
20
23
|
}
|
|
@@ -18,6 +18,8 @@ const getAddressForTesting = (crypto) => {
|
|
|
18
18
|
return "5BZDQjWad45rT1vYT5KdJHgSU4rWXL1Y5nDoTwSrT8Pr";
|
|
19
19
|
case crypto_1.Crypto.USDTTron:
|
|
20
20
|
return "TS9kzAVq4PR7xNoQDJXSP6Kgi8GFbwUbzg";
|
|
21
|
+
case crypto_1.Crypto.USDCStellar:
|
|
22
|
+
return "GAFLAAPPSSN2HT2IMK2WFGPFIXQMUUKIFECJEGP373WJQST432CPXKFD";
|
|
21
23
|
default:
|
|
22
24
|
return "Err";
|
|
23
25
|
}
|
|
@@ -6,11 +6,14 @@ const isValidCryptoAddress = (address, crypto) => {
|
|
|
6
6
|
const bitcoinPattern = /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/;
|
|
7
7
|
const ethereumPattern = /^0x[a-fA-F0-9]{40}$/;
|
|
8
8
|
const solanaPattern = /^([1-9A-HJ-NP-Za-km-z]{32,44})$/;
|
|
9
|
+
const stellarPattern = /^G[A-Za-z0-9]{55}$/;
|
|
9
10
|
switch (crypto) {
|
|
10
11
|
case crypto_1.Crypto.BTC:
|
|
11
12
|
return bitcoinPattern.test(address);
|
|
12
13
|
case crypto_1.Crypto.SOL:
|
|
13
14
|
return solanaPattern.test(address);
|
|
15
|
+
case crypto_1.Crypto.USDCStellar:
|
|
16
|
+
return stellarPattern.test(address);
|
|
14
17
|
case crypto_1.Crypto.ETH ||
|
|
15
18
|
crypto_1.Crypto.USDC ||
|
|
16
19
|
crypto_1.Crypto.USDCPolygon ||
|
package/build/types/crypto.d.ts
CHANGED
package/build/types/crypto.js
CHANGED
|
@@ -9,6 +9,7 @@ var Crypto;
|
|
|
9
9
|
Crypto["USDCPolygonBridged"] = "USDC_POLYGON";
|
|
10
10
|
Crypto["USDCPolygon"] = "USDC_POLYGON_NXTB";
|
|
11
11
|
Crypto["USDCSolana"] = "SOL_USDC_PTHX";
|
|
12
|
+
Crypto["USDCStellar"] = "XLM_USDC_5F3T";
|
|
12
13
|
Crypto["USDTPolygon"] = "USDT_POLYGON";
|
|
13
14
|
Crypto["USDTEthereum"] = "USDT_ERC20";
|
|
14
15
|
Crypto["USDTTron"] = "TRX_USDT_S2UZ";
|
|
@@ -5,6 +5,7 @@ var CurrencyWithCountry;
|
|
|
5
5
|
(function (CurrencyWithCountry) {
|
|
6
6
|
CurrencyWithCountry["USDCPolygon"] = "USDC_POLYGON_NXTB";
|
|
7
7
|
CurrencyWithCountry["USDCSolana"] = "SOL_USDC_PTHX";
|
|
8
|
+
CurrencyWithCountry["USDCStellar"] = "XLM_USDC_5F3T";
|
|
8
9
|
CurrencyWithCountry["USDTPolygon"] = "USDT_POLYGON";
|
|
9
10
|
CurrencyWithCountry["USDTEthereum"] = "USDT_ERC20";
|
|
10
11
|
CurrencyWithCountry["USDTTron"] = "TRX_USDT_S2UZ";
|
package/build/types/order.d.ts
CHANGED