@riocrypto/common 1.0.2488 → 1.0.2489

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.
@@ -0,0 +1,3 @@
1
+ import { Crypto } from "../types/crypto";
2
+ import { StablecoinType } from "../types/stablecoin-type";
3
+ export declare const getStablecoinType: (crypto: Crypto) => StablecoinType | null;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStablecoinType = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const getStablecoinType = (crypto) => {
6
+ if (stablecoin_type_1.USD_BACKED_CRYPTOS.includes(crypto)) {
7
+ return stablecoin_type_1.StablecoinType.USD;
8
+ }
9
+ if (stablecoin_type_1.EUR_BACKED_CRYPTOS.includes(crypto)) {
10
+ return stablecoin_type_1.StablecoinType.EUR;
11
+ }
12
+ return null;
13
+ };
14
+ exports.getStablecoinType = getStablecoinType;
@@ -0,0 +1,2 @@
1
+ import { Crypto } from "../types/crypto";
2
+ export declare const isEurBackedCrypto: (crypto: Crypto) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEurBackedCrypto = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const isEurBackedCrypto = (crypto) => {
6
+ return stablecoin_type_1.EUR_BACKED_CRYPTOS.includes(crypto);
7
+ };
8
+ exports.isEurBackedCrypto = isEurBackedCrypto;
@@ -0,0 +1,2 @@
1
+ import { Crypto } from "../types/crypto";
2
+ export declare const isEurcCrypto: (crypto: Crypto) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isEurcCrypto = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const isEurcCrypto = (crypto) => {
6
+ return stablecoin_type_1.EURC_CRYPTOS.includes(crypto);
7
+ };
8
+ exports.isEurcCrypto = isEurcCrypto;
@@ -0,0 +1,2 @@
1
+ import { Crypto } from "../types/crypto";
2
+ export declare const isUsdBackedCrypto: (crypto: Crypto) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUsdBackedCrypto = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const isUsdBackedCrypto = (crypto) => {
6
+ return stablecoin_type_1.USD_BACKED_CRYPTOS.includes(crypto);
7
+ };
8
+ exports.isUsdBackedCrypto = isUsdBackedCrypto;
@@ -0,0 +1,2 @@
1
+ import { Crypto } from "../types/crypto";
2
+ export declare const isUsdcCrypto: (crypto: Crypto) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUsdcCrypto = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const isUsdcCrypto = (crypto) => {
6
+ return stablecoin_type_1.USDC_CRYPTOS.includes(crypto);
7
+ };
8
+ exports.isUsdcCrypto = isUsdcCrypto;
@@ -0,0 +1,2 @@
1
+ import { Crypto } from "../types/crypto";
2
+ export declare const isUsdtCrypto: (crypto: Crypto) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isUsdtCrypto = void 0;
4
+ const stablecoin_type_1 = require("../types/stablecoin-type");
5
+ const isUsdtCrypto = (crypto) => {
6
+ return stablecoin_type_1.USDT_CRYPTOS.includes(crypto);
7
+ };
8
+ exports.isUsdtCrypto = isUsdtCrypto;
package/build/index.d.ts CHANGED
@@ -464,6 +464,13 @@ export * from "./types/liquidity-sourcing-step-status";
464
464
  export * from "./types/liquidity-sourcing-exclusion";
465
465
  export * from "./types/liquidity-sourcing-exclusion-type";
466
466
  export * from "./types/liquidity-sourcing-settings";
467
+ export * from "./types/stablecoin-type";
468
+ export * from "./helpers/get-stablecoin-type";
469
+ export * from "./helpers/is-usd-backed-crypto";
470
+ export * from "./helpers/is-eur-backed-crypto";
471
+ export * from "./helpers/is-usdc-crypto";
472
+ export * from "./helpers/is-usdt-crypto";
473
+ export * from "./helpers/is-eurc-crypto";
467
474
  export * from "./classes/KYCFieldClass";
468
475
  export * from "./classes/KYCFileClass";
469
476
  export * from "./classes/CountryAsset";
package/build/index.js CHANGED
@@ -480,6 +480,13 @@ __exportStar(require("./types/liquidity-sourcing-step-status"), exports);
480
480
  __exportStar(require("./types/liquidity-sourcing-exclusion"), exports);
481
481
  __exportStar(require("./types/liquidity-sourcing-exclusion-type"), exports);
482
482
  __exportStar(require("./types/liquidity-sourcing-settings"), exports);
483
+ __exportStar(require("./types/stablecoin-type"), exports);
484
+ __exportStar(require("./helpers/get-stablecoin-type"), exports);
485
+ __exportStar(require("./helpers/is-usd-backed-crypto"), exports);
486
+ __exportStar(require("./helpers/is-eur-backed-crypto"), exports);
487
+ __exportStar(require("./helpers/is-usdc-crypto"), exports);
488
+ __exportStar(require("./helpers/is-usdt-crypto"), exports);
489
+ __exportStar(require("./helpers/is-eurc-crypto"), exports);
483
490
  __exportStar(require("./classes/KYCFieldClass"), exports);
484
491
  __exportStar(require("./classes/KYCFileClass"), exports);
485
492
  __exportStar(require("./classes/CountryAsset"), exports);
@@ -0,0 +1,10 @@
1
+ import { Crypto } from "./crypto";
2
+ export declare enum StablecoinType {
3
+ USD = "USD",
4
+ EUR = "EUR"
5
+ }
6
+ export declare const USD_BACKED_CRYPTOS: Crypto[];
7
+ export declare const EUR_BACKED_CRYPTOS: Crypto[];
8
+ export declare const USDC_CRYPTOS: Crypto[];
9
+ export declare const USDT_CRYPTOS: Crypto[];
10
+ export declare const EURC_CRYPTOS: Crypto[];
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EURC_CRYPTOS = exports.USDT_CRYPTOS = exports.USDC_CRYPTOS = exports.EUR_BACKED_CRYPTOS = exports.USD_BACKED_CRYPTOS = exports.StablecoinType = void 0;
4
+ const crypto_1 = require("./crypto");
5
+ var StablecoinType;
6
+ (function (StablecoinType) {
7
+ StablecoinType["USD"] = "USD";
8
+ StablecoinType["EUR"] = "EUR";
9
+ })(StablecoinType = exports.StablecoinType || (exports.StablecoinType = {}));
10
+ exports.USD_BACKED_CRYPTOS = [
11
+ crypto_1.Crypto.USDC,
12
+ crypto_1.Crypto.USDCPolygon,
13
+ crypto_1.Crypto.USDCPolygonBridged,
14
+ crypto_1.Crypto.USDCSolana,
15
+ crypto_1.Crypto.USDCStellar,
16
+ crypto_1.Crypto.USDCBase,
17
+ crypto_1.Crypto.USDTPolygon,
18
+ crypto_1.Crypto.USDTEthereum,
19
+ crypto_1.Crypto.USDTTron,
20
+ ];
21
+ exports.EUR_BACKED_CRYPTOS = [
22
+ crypto_1.Crypto.EURCEthereum,
23
+ crypto_1.Crypto.EURCSolana,
24
+ crypto_1.Crypto.EURCBase,
25
+ ];
26
+ exports.USDC_CRYPTOS = [
27
+ crypto_1.Crypto.USDC,
28
+ crypto_1.Crypto.USDCPolygon,
29
+ crypto_1.Crypto.USDCPolygonBridged,
30
+ crypto_1.Crypto.USDCSolana,
31
+ crypto_1.Crypto.USDCStellar,
32
+ crypto_1.Crypto.USDCBase,
33
+ ];
34
+ exports.USDT_CRYPTOS = [
35
+ crypto_1.Crypto.USDTPolygon,
36
+ crypto_1.Crypto.USDTEthereum,
37
+ crypto_1.Crypto.USDTTron,
38
+ ];
39
+ exports.EURC_CRYPTOS = [
40
+ crypto_1.Crypto.EURCEthereum,
41
+ crypto_1.Crypto.EURCSolana,
42
+ crypto_1.Crypto.EURCBase,
43
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.2488",
3
+ "version": "1.0.2489",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",