@riocrypto/common 1.0.805 → 1.0.808
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 +6 -0
- package/build/clients/rio-admin-client.d.ts +2 -1
- package/build/clients/rio-admin-client.js +3 -2
- package/build/helpers/validate-address.js +6 -1
- package/build/types/crypto.d.ts +1 -0
- package/build/types/crypto.js +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(): 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.USDTTron | Crypto.SOL | "Bitcoin" | "Ethereum" | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)";
|
|
8
|
+
getSymbol(): Crypto.USDTTron | Crypto.SOL | "USDC (Ethereum)" | "USDC (Polygon)" | "USDC (Solana)" | "USDT (Polygon)" | "USDT (Ethereum)" | "BTC" | "ETH";
|
|
9
|
+
getGasSymbol(): Crypto.SOL | "BTC" | "ETH" | "MATIC" | "TRX" | "SOL";
|
|
10
10
|
getDescription(): string;
|
|
11
11
|
}
|
|
@@ -105,6 +105,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
105
105
|
else if (this.rawSymbol === crypto_1.Crypto.USDCPolygon) {
|
|
106
106
|
return "MATIC";
|
|
107
107
|
}
|
|
108
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
109
|
+
return "TRX";
|
|
110
|
+
}
|
|
108
111
|
else if (this.rawSymbol === crypto_1.Crypto.USDCSolana) {
|
|
109
112
|
return "SOL";
|
|
110
113
|
}
|
|
@@ -152,6 +155,9 @@ class CryptoAsset extends Asset_1.Asset {
|
|
|
152
155
|
}
|
|
153
156
|
else if (this.rawSymbol === crypto_1.Crypto.USDTEthereum) {
|
|
154
157
|
return "USDT on the Ethereum chain.";
|
|
158
|
+
}
|
|
159
|
+
else if (this.rawSymbol === crypto_1.Crypto.USDTTron) {
|
|
160
|
+
return "USDT on the Tron chain.";
|
|
155
161
|
// } else if (this.symbol === Crypto.mUSDC) {
|
|
156
162
|
// return "USDC on the Polygon chain";
|
|
157
163
|
// } else if (this.symbol === Crypto.USDT) {
|
|
@@ -24,6 +24,7 @@ import { OrderUpdate } from "../types/order-update";
|
|
|
24
24
|
import { QuoteInput } from "../types/quote-input";
|
|
25
25
|
import { OrderQuery } from "../types/order-query";
|
|
26
26
|
import { UserQuery } from "../types/user-query";
|
|
27
|
+
import { BankAccountQuery } from "../types/bank-account-query";
|
|
27
28
|
export declare class RioAdminClient {
|
|
28
29
|
private axios;
|
|
29
30
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -103,7 +104,7 @@ export declare class RioAdminClient {
|
|
|
103
104
|
x: number;
|
|
104
105
|
}>;
|
|
105
106
|
getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
|
|
106
|
-
getBankAccounts(page: number, limit: number): Promise<BankAccount[]>;
|
|
107
|
+
getBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<BankAccount[]>;
|
|
107
108
|
getBankAccount(id: string): Promise<BankAccount>;
|
|
108
109
|
getSupportedPayoutMethods(fiat: Fiat, country: Country): Promise<PayoutMethod[]>;
|
|
109
110
|
getPartner(partnerId: string): Promise<Partner>;
|
|
@@ -354,10 +354,11 @@ class RioAdminClient {
|
|
|
354
354
|
return response.data;
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
|
-
getBankAccounts(page, limit) {
|
|
357
|
+
getBankAccounts(page, limit, query) {
|
|
358
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
359
359
|
const response = yield this.axios.get(`/api/bank/accounts`, {
|
|
360
|
-
params: { page,
|
|
360
|
+
params: Object.assign({ page,
|
|
361
|
+
limit }, query),
|
|
361
362
|
});
|
|
362
363
|
return response.data;
|
|
363
364
|
});
|
|
@@ -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 ||
|
|
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;
|
package/build/types/crypto.d.ts
CHANGED
package/build/types/crypto.js
CHANGED