@riocrypto/common 1.0.580 → 1.0.582
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 | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)";
|
|
8
|
-
getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "ETH";
|
|
9
|
-
getGasSymbol(): Crypto.SOL | "ETH" | "MATIC" | "SOL";
|
|
7
|
+
getName(): Crypto.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)";
|
|
8
|
+
getSymbol(): Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "BTC" | "ETH";
|
|
9
|
+
getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "SOL";
|
|
10
10
|
getDescription(): string;
|
|
11
11
|
}
|
|
@@ -44,10 +44,10 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
getName() {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
47
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
48
|
+
return "Bitcoin";
|
|
49
|
+
}
|
|
50
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
51
51
|
return "Ethereum";
|
|
52
52
|
// } else if (this.symbol === Crypto.XLM) {
|
|
53
53
|
// return "Stellar";
|
|
@@ -134,10 +134,10 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
getSymbol() {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
137
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
138
|
+
return "BTC";
|
|
139
|
+
}
|
|
140
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
141
141
|
return "ETH";
|
|
142
142
|
}
|
|
143
143
|
else if (this.rawSymbol === crypto_1.Crypto.USDC) {
|
|
@@ -154,10 +154,10 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
getGasSymbol() {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
157
|
+
if (this.rawSymbol === crypto_1.Crypto.BTC) {
|
|
158
|
+
return "BTC";
|
|
159
|
+
}
|
|
160
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
161
161
|
return "ETH";
|
|
162
162
|
}
|
|
163
163
|
else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
|
|
@@ -174,10 +174,10 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
getDescription() {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
177
|
+
if (this.symbol === crypto_1.Crypto.BTC) {
|
|
178
|
+
return "Bitcoin is a decentralized digital currency that can be transferred on the peer-to-peer bitcoin network.";
|
|
179
|
+
}
|
|
180
|
+
else if (this.rawSymbol === crypto_1.Crypto.ETH) {
|
|
181
181
|
return "Ethereum is a decentralized, open-source blockchain with smart contract functionality.";
|
|
182
182
|
// } else if (this.symbol === Crypto.XLM) {
|
|
183
183
|
// 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.";
|
|
@@ -7,8 +7,8 @@ const isValidCryptoAddress = (address, crypto) => {
|
|
|
7
7
|
const ethereumPattern = /^0x[a-fA-F0-9]{40}$/;
|
|
8
8
|
const solanaPattern = /^([1-9A-HJ-NP-Za-km-z]{32,44})$/;
|
|
9
9
|
switch (crypto) {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
case crypto_1.Crypto.BTC:
|
|
11
|
+
return bitcoinPattern.test(address);
|
|
12
12
|
case crypto_1.Crypto.SOL:
|
|
13
13
|
return solanaPattern.test(address);
|
|
14
14
|
case crypto_1.Crypto.ETH || crypto_1.Crypto.USDC || crypto_1.Crypto.USDCPolygon:
|
package/build/types/crypto.d.ts
CHANGED
package/build/types/crypto.js
CHANGED