Socket
Socket
Sign inDemoInstall

@tatumio/shared-core

Package Overview
Dependencies
Maintainers
3
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tatumio/shared-core - npm Package Compare versions

Comparing version 2.0.1-alpha.227 to 2.0.1-alpha.228

5

package.json
{
"name": "@tatumio/shared-core",
"version": "2.0.1-alpha.227",
"version": "2.0.1-alpha.228",
"license": "MIT",

@@ -9,4 +9,3 @@ "main": "./src/index.js",

"axios": "^0.24.0",
"@tatumio/api-client": "2.0.1-alpha.224",
"cross-blob": "^3.0.0",
"@tatumio/api-client": "2.0.1-alpha.227",
"form-data": "^4.0.0"

@@ -13,0 +12,0 @@ },

38

src/index.js

@@ -1,19 +0,23 @@

import { getDerivationPath } from './lib/derivation-path.common';
import { getNetworkConfig } from './lib/btc-based.network.common';
export * from './lib/models/Currency';
export * from './lib/models/Fiat';
export * from './lib/models/Blockchain';
export * from './lib/models/Web3';
export * from './lib/models/ChainTransactionKMS';
export * from './lib/http.common';
export * from './lib/contract.common';
export * from './lib/blockchain.common';
export * from './lib/derivation-path.common';
export * from './lib/btc-based.network.common';
export * from './lib/address.common';
export * from './lib/third-party.common';
export const blockchainUtils = {
getDerivationPath,
getNetworkConfig,
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.blockchainUtils = void 0;
const tslib_1 = require("tslib");
const derivation_path_common_1 = require("./lib/derivation-path.common");
const btc_based_network_common_1 = require("./lib/btc-based.network.common");
(0, tslib_1.__exportStar)(require("./lib/models/Currency"), exports);
(0, tslib_1.__exportStar)(require("./lib/models/Fiat"), exports);
(0, tslib_1.__exportStar)(require("./lib/models/Blockchain"), exports);
(0, tslib_1.__exportStar)(require("./lib/models/Web3"), exports);
(0, tslib_1.__exportStar)(require("./lib/models/ChainTransactionKMS"), exports);
(0, tslib_1.__exportStar)(require("./lib/http.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/contract.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/blockchain.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/derivation-path.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/btc-based.network.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/address.common"), exports);
(0, tslib_1.__exportStar)(require("./lib/third-party.common"), exports);
exports.blockchainUtils = {
getDerivationPath: derivation_path_common_1.getDerivationPath,
getNetworkConfig: btc_based_network_common_1.getNetworkConfig,
};
//# sourceMappingURL=index.js.map

@@ -1,4 +0,7 @@

export const ADDRESS_PREFIX = {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ADDRESS_PREFIX = void 0;
exports.ADDRESS_PREFIX = {
EVM: '0x',
};
//# sourceMappingURL=address.common.js.map

@@ -1,8 +0,11 @@

import { BtcBasedBlockchains, EvmBasedBlockchains, } from './models/Blockchain';
import { BlockchainToNativeCurrencyMapping, CurrencyToBlockchainMapping, } from './models/BlockchainCurrencyMapping';
export const blockchainHelper = {
isBtcBased: (blockchain) => BtcBasedBlockchains.includes(blockchain),
isEvmBased: (blockchain) => EvmBasedBlockchains.includes(blockchain),
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.blockchainHelper = void 0;
const Blockchain_1 = require("./models/Blockchain");
const BlockchainCurrencyMapping_1 = require("./models/BlockchainCurrencyMapping");
exports.blockchainHelper = {
isBtcBased: (blockchain) => Blockchain_1.BtcBasedBlockchains.includes(blockchain),
isEvmBased: (blockchain) => Blockchain_1.EvmBasedBlockchains.includes(blockchain),
getBlockchainByCurrency: (currency) => {
const blockchain = CurrencyToBlockchainMapping[currency];
const blockchain = BlockchainCurrencyMapping_1.CurrencyToBlockchainMapping[currency];
if (!blockchain)

@@ -13,3 +16,3 @@ throw new Error(`Blockchain for currency ${currency} not found `);

getDefaultCurrencyByBlockchain: (blockchain) => {
const currency = BlockchainToNativeCurrencyMapping[blockchain];
const currency = BlockchainCurrencyMapping_1.BlockchainToNativeCurrencyMapping[blockchain];
if (!currency)

@@ -16,0 +19,0 @@ throw new Error(`Currency for blockchain ${blockchain} not found`);

@@ -1,5 +0,9 @@

export const getNetworkConfig = (blockchain, options) => {
return (options === null || options === void 0 ? void 0 : options.testnet) ? NETWORK_CONFIG[blockchain].testnet : NETWORK_CONFIG[blockchain].mainnet;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NETWORK_CONFIG = exports.getNetworkConfig = void 0;
const getNetworkConfig = (blockchain, options) => {
return (options === null || options === void 0 ? void 0 : options.testnet) ? exports.NETWORK_CONFIG[blockchain].testnet : exports.NETWORK_CONFIG[blockchain].mainnet;
};
export const NETWORK_CONFIG = {
exports.getNetworkConfig = getNetworkConfig;
exports.NETWORK_CONFIG = {
BTC: {

@@ -6,0 +10,0 @@ mainnet: {

@@ -1,89 +0,92 @@

import { Currency } from './models/Currency';
export const CONTRACT_ADDRESSES = {
[Currency.USDT.toString()]: '0xdac17f958d2ee523a2206206994597c13d831ec7',
[Currency.LEO.toString()]: '0x2af5d2ad76741191d15dfe7bf6ac92d4bd912ca3',
[Currency.UNI.toString()]: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984',
[Currency.LINK.toString()]: '0x514910771af9ca656af840dff83e8264ecf986ca',
[Currency.WBTC.toString()]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
[Currency.FREE.toString()]: '0x2f141ce366a2462f02cea3d12cf93e4dca49e4fd',
[Currency.MKR.toString()]: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2',
[Currency.USDC.toString()]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
[Currency.BAT.toString()]: '0x0d8775f648430679a709e98d2b0cb6250d2887ef',
[Currency.USDT_MATIC.toString()]: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
[Currency.LATOKEN.toString()]: '0xe50365f5d679cb98a1dd62d6f6e58e59321bcddf',
[Currency.TUSD.toString()]: '0x0000000000085d4780B73119b644AE5ecd22b376',
[Currency.PAX.toString()]: '0x8e870d67f660d95d5be530380d0ec0bd388289e1',
[Currency.COIIN.toString()]: '0xd080f46d7781a6c82b3dd74a223b73242884e7e6',
[Currency.GMC.toString()]: '0xa6272359bc37f61af398071b65c8934aca744d53',
[Currency.PAXG.toString()]: '0x45804880de22913dafe09f4980848ece6ecbaf78',
[Currency.HAG.toString()]: '0x44e133e71bf90cb67de4c0f31c391ade021def4a',
[Currency.PLTC.toString()]: '0x429d83bb0dcb8cdd5311e34680adc8b12070a07f',
[Currency.MMY.toString()]: '0x385ddf50c3de724f6b8ecb41745c29f9dd3c6d75',
[Currency.XCON.toString()]: '0x0f237d5ea7876e0e2906034d98fdb20d43666ad4',
[Currency.REVV.toString()]: '0x557b933a7c2c45672b610f8954a3deb39a51a8ca',
[Currency.MATIC_ETH.toString()]: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
[Currency.SAND.toString()]: '0x3845badade8e6dff049820680d1f14bd3903a5d0',
[Currency.USDT_TRON.toString()]: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
[Currency.INRT_TRON.toString()]: 'TX66VmiV1txm45vVLvcHYEqPXXLoREyAXm',
[Currency.USDC_MATIC.toString()]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
[Currency.USDC_BSC.toString()]: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
[Currency.B2U_BSC.toString()]: '0x02926e6e2898e9235fdddde3f51c3b644af8c403',
[Currency.BUSD.toString()]: '0x4fabb145d64652a948d72533023f6e7a623c7c53',
[Currency.BETH.toString()]: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
[Currency.BBTC.toString()]: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c',
[Currency.BADA.toString()]: '0x3ee2200efb3400fabb9aacf31297cbdd1d435d47',
[Currency.RMD.toString()]: '0x02888e65324a98219c26f292e7cd3e52ef39c5c2',
[Currency.WBNB.toString()]: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
[Currency.BDOT.toString()]: '0x7083609fce4d1d8dc0c979aab8c869ea2c873402',
[Currency.BXRP.toString()]: '0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe',
[Currency.BLTC.toString()]: '0x4338665cbb7b2485a8855a139b75d5e34ab0db94',
[Currency.BBCH.toString()]: '0x8ff795a6f4d97e7887c79bea79aba5cc76444adf',
[Currency.CAKE.toString()]: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82',
[Currency.BUSD_BSC.toString()]: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
[Currency.GMC_BSC.toString()]: '0xa6272359bc37f61af398071b65c8934aca744d53',
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TRANSFER_METHOD_ABI = exports.CUSTODIAL_PROXY_ABI = exports.CONTRACT_DECIMALS = exports.CONTRACT_ADDRESSES = void 0;
const Currency_1 = require("./models/Currency");
exports.CONTRACT_ADDRESSES = {
[Currency_1.Currency.USDT.toString()]: '0xdac17f958d2ee523a2206206994597c13d831ec7',
[Currency_1.Currency.LEO.toString()]: '0x2af5d2ad76741191d15dfe7bf6ac92d4bd912ca3',
[Currency_1.Currency.UNI.toString()]: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984',
[Currency_1.Currency.LINK.toString()]: '0x514910771af9ca656af840dff83e8264ecf986ca',
[Currency_1.Currency.WBTC.toString()]: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
[Currency_1.Currency.FREE.toString()]: '0x2f141ce366a2462f02cea3d12cf93e4dca49e4fd',
[Currency_1.Currency.MKR.toString()]: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2',
[Currency_1.Currency.USDC.toString()]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
[Currency_1.Currency.BAT.toString()]: '0x0d8775f648430679a709e98d2b0cb6250d2887ef',
[Currency_1.Currency.USDT_MATIC.toString()]: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
[Currency_1.Currency.LATOKEN.toString()]: '0xe50365f5d679cb98a1dd62d6f6e58e59321bcddf',
[Currency_1.Currency.TUSD.toString()]: '0x0000000000085d4780B73119b644AE5ecd22b376',
[Currency_1.Currency.PAX.toString()]: '0x8e870d67f660d95d5be530380d0ec0bd388289e1',
[Currency_1.Currency.COIIN.toString()]: '0xd080f46d7781a6c82b3dd74a223b73242884e7e6',
[Currency_1.Currency.GMC.toString()]: '0xa6272359bc37f61af398071b65c8934aca744d53',
[Currency_1.Currency.PAXG.toString()]: '0x45804880de22913dafe09f4980848ece6ecbaf78',
[Currency_1.Currency.HAG.toString()]: '0x44e133e71bf90cb67de4c0f31c391ade021def4a',
[Currency_1.Currency.PLTC.toString()]: '0x429d83bb0dcb8cdd5311e34680adc8b12070a07f',
[Currency_1.Currency.MMY.toString()]: '0x385ddf50c3de724f6b8ecb41745c29f9dd3c6d75',
[Currency_1.Currency.XCON.toString()]: '0x0f237d5ea7876e0e2906034d98fdb20d43666ad4',
[Currency_1.Currency.REVV.toString()]: '0x557b933a7c2c45672b610f8954a3deb39a51a8ca',
[Currency_1.Currency.MATIC_ETH.toString()]: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
[Currency_1.Currency.SAND.toString()]: '0x3845badade8e6dff049820680d1f14bd3903a5d0',
[Currency_1.Currency.USDT_TRON.toString()]: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
[Currency_1.Currency.INRT_TRON.toString()]: 'TX66VmiV1txm45vVLvcHYEqPXXLoREyAXm',
[Currency_1.Currency.USDC_MATIC.toString()]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
[Currency_1.Currency.USDC_BSC.toString()]: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
[Currency_1.Currency.B2U_BSC.toString()]: '0x02926e6e2898e9235fdddde3f51c3b644af8c403',
[Currency_1.Currency.BUSD.toString()]: '0x4fabb145d64652a948d72533023f6e7a623c7c53',
[Currency_1.Currency.BETH.toString()]: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
[Currency_1.Currency.BBTC.toString()]: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c',
[Currency_1.Currency.BADA.toString()]: '0x3ee2200efb3400fabb9aacf31297cbdd1d435d47',
[Currency_1.Currency.RMD.toString()]: '0x02888e65324a98219c26f292e7cd3e52ef39c5c2',
[Currency_1.Currency.WBNB.toString()]: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
[Currency_1.Currency.BDOT.toString()]: '0x7083609fce4d1d8dc0c979aab8c869ea2c873402',
[Currency_1.Currency.BXRP.toString()]: '0x1d2f0da169ceb9fc7b3144628db156f3f6c60dbe',
[Currency_1.Currency.BLTC.toString()]: '0x4338665cbb7b2485a8855a139b75d5e34ab0db94',
[Currency_1.Currency.BBCH.toString()]: '0x8ff795a6f4d97e7887c79bea79aba5cc76444adf',
[Currency_1.Currency.CAKE.toString()]: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82',
[Currency_1.Currency.BUSD_BSC.toString()]: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
[Currency_1.Currency.GMC_BSC.toString()]: '0xa6272359bc37f61af398071b65c8934aca744d53',
};
export const CONTRACT_DECIMALS = {
[Currency.USDT.toString()]: 6,
[Currency.USDT_TRON.toString()]: 6,
[Currency.INRT_TRON.toString()]: 2,
[Currency.USDT_MATIC.toString()]: 6,
[Currency.WBTC.toString()]: 8,
[Currency.LEO.toString()]: 18,
[Currency.LATOKEN.toString()]: 18,
[Currency.COIIN.toString()]: 18,
[Currency.RMD.toString()]: 18,
[Currency.MATIC_ETH.toString()]: 18,
[Currency.GMC.toString()]: 18,
[Currency.GMC_BSC.toString()]: 18,
[Currency.BUSD.toString()]: 18,
[Currency.CAKE.toString()]: 18,
[Currency.BUSD_BSC.toString()]: 18,
[Currency.LINK.toString()]: 18,
[Currency.UNI.toString()]: 18,
[Currency.FREE.toString()]: 18,
[Currency.MKR.toString()]: 18,
[Currency.USDC.toString()]: 6,
[Currency.HAG.toString()]: 8,
[Currency.BAT.toString()]: 18,
[Currency.TUSD.toString()]: 18,
[Currency.PAX.toString()]: 18,
[Currency.PAXG.toString()]: 18,
[Currency.PLTC.toString()]: 18,
[Currency.MMY.toString()]: 18,
[Currency.XCON.toString()]: 18,
[Currency.REVV.toString()]: 18,
[Currency.SAND.toString()]: 18,
[Currency.USDC_MATIC.toString()]: 6,
[Currency.USDC_BSC.toString()]: 18,
[Currency.B2U_BSC.toString()]: 18,
[Currency.BETH.toString()]: 18,
[Currency.BBTC.toString()]: 18,
[Currency.BADA.toString()]: 18,
[Currency.WBNB.toString()]: 18,
[Currency.BDOT.toString()]: 18,
[Currency.BXRP.toString()]: 18,
[Currency.BLTC.toString()]: 18,
[Currency.BBCH.toString()]: 18,
exports.CONTRACT_DECIMALS = {
[Currency_1.Currency.USDT.toString()]: 6,
[Currency_1.Currency.USDT_TRON.toString()]: 6,
[Currency_1.Currency.INRT_TRON.toString()]: 2,
[Currency_1.Currency.USDT_MATIC.toString()]: 6,
[Currency_1.Currency.WBTC.toString()]: 8,
[Currency_1.Currency.LEO.toString()]: 18,
[Currency_1.Currency.LATOKEN.toString()]: 18,
[Currency_1.Currency.COIIN.toString()]: 18,
[Currency_1.Currency.RMD.toString()]: 18,
[Currency_1.Currency.MATIC_ETH.toString()]: 18,
[Currency_1.Currency.GMC.toString()]: 18,
[Currency_1.Currency.GMC_BSC.toString()]: 18,
[Currency_1.Currency.BUSD.toString()]: 18,
[Currency_1.Currency.CAKE.toString()]: 18,
[Currency_1.Currency.BUSD_BSC.toString()]: 18,
[Currency_1.Currency.LINK.toString()]: 18,
[Currency_1.Currency.UNI.toString()]: 18,
[Currency_1.Currency.FREE.toString()]: 18,
[Currency_1.Currency.MKR.toString()]: 18,
[Currency_1.Currency.USDC.toString()]: 6,
[Currency_1.Currency.HAG.toString()]: 8,
[Currency_1.Currency.BAT.toString()]: 18,
[Currency_1.Currency.TUSD.toString()]: 18,
[Currency_1.Currency.PAX.toString()]: 18,
[Currency_1.Currency.PAXG.toString()]: 18,
[Currency_1.Currency.PLTC.toString()]: 18,
[Currency_1.Currency.MMY.toString()]: 18,
[Currency_1.Currency.XCON.toString()]: 18,
[Currency_1.Currency.REVV.toString()]: 18,
[Currency_1.Currency.SAND.toString()]: 18,
[Currency_1.Currency.USDC_MATIC.toString()]: 6,
[Currency_1.Currency.USDC_BSC.toString()]: 18,
[Currency_1.Currency.B2U_BSC.toString()]: 18,
[Currency_1.Currency.BETH.toString()]: 18,
[Currency_1.Currency.BBTC.toString()]: 18,
[Currency_1.Currency.BADA.toString()]: 18,
[Currency_1.Currency.WBNB.toString()]: 18,
[Currency_1.Currency.BDOT.toString()]: 18,
[Currency_1.Currency.BXRP.toString()]: 18,
[Currency_1.Currency.BLTC.toString()]: 18,
[Currency_1.Currency.BBCH.toString()]: 18,
};
export const CUSTODIAL_PROXY_ABI = {
exports.CUSTODIAL_PROXY_ABI = {
inputs: [

@@ -106,3 +109,3 @@ {

};
export const TRANSFER_METHOD_ABI = {
exports.TRANSFER_METHOD_ABI = {
constant: false,

@@ -109,0 +112,0 @@ inputs: [

@@ -1,6 +0,10 @@

import { Blockchain } from './models/Blockchain';
export const getDerivationPath = (blockchain, options) => {
return (options === null || options === void 0 ? void 0 : options.testnet) ? TESTNET_DERIVATION_PATH[blockchain] : DERIVATION_PATH[blockchain];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.COMMON_TESTNET_DERIVATION_PATH = exports.DERIVATION_PATH = exports.getDerivationPath = void 0;
const Blockchain_1 = require("./models/Blockchain");
const getDerivationPath = (blockchain, options) => {
return (options === null || options === void 0 ? void 0 : options.testnet) ? TESTNET_DERIVATION_PATH[blockchain] : exports.DERIVATION_PATH[blockchain];
};
export const DERIVATION_PATH = {
exports.getDerivationPath = getDerivationPath;
exports.DERIVATION_PATH = {
BTC: "m/44'/0'/0'/0",

@@ -33,6 +37,6 @@ LTC: "m/44'/2'/0'/0",

};
export const COMMON_TESTNET_DERIVATION_PATH = "m/44'/1'/0'/0";
const TESTNET_DERIVATION_PATH_MAPPING = Object.values(Blockchain)
exports.COMMON_TESTNET_DERIVATION_PATH = "m/44'/1'/0'/0";
const TESTNET_DERIVATION_PATH_MAPPING = Object.values(Blockchain_1.Blockchain)
.map((v) => {
return { [v]: COMMON_TESTNET_DERIVATION_PATH };
return { [v]: exports.COMMON_TESTNET_DERIVATION_PATH };
})

@@ -45,3 +49,3 @@ .reduce((obj, item) => (Object.assign(Object.assign({}, obj), item)), {});

*/
BCH: DERIVATION_PATH.BCH, SCRYPTA: DERIVATION_PATH.SCRYPTA });
BCH: exports.DERIVATION_PATH.BCH, SCRYPTA: exports.DERIVATION_PATH.SCRYPTA });
//# sourceMappingURL=derivation-path.common.js.map

@@ -1,3 +0,7 @@

import axios from 'axios';
import { TATUM_API_CONSTANTS } from '@tatumio/api-client';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.httpHelper = void 0;
const tslib_1 = require("tslib");
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
const api_client_1 = require("@tatumio/api-client");
const EndpointsMapping = {

@@ -30,8 +34,8 @@ FABRIC: 'fabric',

};
export const httpHelper = {
get: axios.get,
exports.httpHelper = {
get: axios_1.default.get,
web3Endpoint: (blockchain, url, apiKey) => {
return `${url}/${TATUM_API_CONSTANTS.API_VERSION}/${EndpointsMapping[blockchain]}/web3/${apiKey}`;
return `${url}/${api_client_1.TATUM_API_CONSTANTS.API_VERSION}/${EndpointsMapping[blockchain]}/web3/${apiKey}`;
},
};
//# sourceMappingURL=http.common.js.map

@@ -1,2 +0,5 @@

export var Blockchain;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EvmBasedBlockchains = exports.BtcBasedBlockchains = exports.Blockchain = void 0;
var Blockchain;
(function (Blockchain) {

@@ -28,4 +31,4 @@ Blockchain["BTC"] = "BTC";

Blockchain["KCS"] = "KCS";
})(Blockchain || (Blockchain = {}));
export const BtcBasedBlockchains = [
})(Blockchain = exports.Blockchain || (exports.Blockchain = {}));
exports.BtcBasedBlockchains = [
Blockchain.BTC,

@@ -37,3 +40,3 @@ Blockchain.LTC,

];
export const EvmBasedBlockchains = [
exports.EvmBasedBlockchains = [
Blockchain.ETH,

@@ -40,0 +43,0 @@ Blockchain.CELO,

@@ -1,53 +0,56 @@

import { BSC_BASED_CURRENCIES, CELO_CURRENCIES, Currency, ETH_BASED_CURRENCIES, FLOW_CURRENCIES, MATIC_BASED_CURRENCIES, TRON_CURRENCIES, } from './Currency';
export const BlockchainCurrencyMapping = {
BTC: Currency.BTC,
LTC: Currency.LTC,
DOGE: Currency.DOGE,
BCH: Currency.BCH,
FABRIC: Currency.FABRIC,
QUORUM: Currency.QUORUM,
SOL: Currency.SOL,
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockchainToNativeCurrencyMapping = exports.CurrencyToBlockchainMapping = exports.BlockchainCurrencyMapping = void 0;
const Currency_1 = require("./Currency");
exports.BlockchainCurrencyMapping = {
BTC: Currency_1.Currency.BTC,
LTC: Currency_1.Currency.LTC,
DOGE: Currency_1.Currency.DOGE,
BCH: Currency_1.Currency.BCH,
FABRIC: Currency_1.Currency.FABRIC,
QUORUM: Currency_1.Currency.QUORUM,
SOL: Currency_1.Currency.SOL,
TRON: {
nativeCurrency: Currency.TRON,
currencies: TRON_CURRENCIES,
nativeCurrency: Currency_1.Currency.TRON,
currencies: Currency_1.TRON_CURRENCIES,
},
FLOW: {
nativeCurrency: Currency.FLOW,
currencies: FLOW_CURRENCIES,
nativeCurrency: Currency_1.Currency.FLOW,
currencies: Currency_1.FLOW_CURRENCIES,
},
CELO: {
nativeCurrency: Currency.CELO,
currencies: CELO_CURRENCIES,
nativeCurrency: Currency_1.Currency.CELO,
currencies: Currency_1.CELO_CURRENCIES,
},
HARMONY: Currency.ONE,
QTUM: Currency.QTUM,
EGLD: Currency.EGLD,
HARMONY: Currency_1.Currency.ONE,
QTUM: Currency_1.Currency.QTUM,
EGLD: Currency_1.Currency.EGLD,
ETH: {
nativeCurrency: Currency.ETH,
currencies: ETH_BASED_CURRENCIES,
nativeCurrency: Currency_1.Currency.ETH,
currencies: Currency_1.ETH_BASED_CURRENCIES,
},
BSC: {
nativeCurrency: Currency.ETH,
currencies: BSC_BASED_CURRENCIES,
nativeCurrency: Currency_1.Currency.ETH,
currencies: Currency_1.BSC_BASED_CURRENCIES,
},
POLYGON: {
nativeCurrency: Currency.MATIC,
currencies: MATIC_BASED_CURRENCIES,
nativeCurrency: Currency_1.Currency.MATIC,
currencies: Currency_1.MATIC_BASED_CURRENCIES,
},
XDC: Currency.XDC,
XRP: Currency.XRP,
XLM: Currency.XLM,
VET: Currency.VET,
NEO: Currency.NEO,
SCRYPTA: Currency.LYRA,
CARDANO: Currency.ADA,
ALGO: Currency.ALGO,
KCS: Currency.KCS,
XDC: Currency_1.Currency.XDC,
XRP: Currency_1.Currency.XRP,
XLM: Currency_1.Currency.XLM,
VET: Currency_1.Currency.VET,
NEO: Currency_1.Currency.NEO,
SCRYPTA: Currency_1.Currency.LYRA,
CARDANO: Currency_1.Currency.ADA,
ALGO: Currency_1.Currency.ALGO,
KCS: Currency_1.Currency.KCS,
};
export const CurrencyToBlockchainMapping = buildCurrencyBlockchainMapping();
export const BlockchainToNativeCurrencyMapping = buildBlockchainDefaultCurrencyMapping();
exports.CurrencyToBlockchainMapping = buildCurrencyBlockchainMapping();
exports.BlockchainToNativeCurrencyMapping = buildBlockchainDefaultCurrencyMapping();
function buildBlockchainDefaultCurrencyMapping() {
return Object.keys(BlockchainCurrencyMapping)
return Object.keys(exports.BlockchainCurrencyMapping)
.map((blockchain) => {
const value = BlockchainCurrencyMapping[blockchain];
const value = exports.BlockchainCurrencyMapping[blockchain];
if (typeof value === 'object')

@@ -60,5 +63,5 @@ return { [blockchain]: value.nativeCurrency };

function buildCurrencyBlockchainMapping() {
return Object.keys(BlockchainCurrencyMapping)
return Object.keys(exports.BlockchainCurrencyMapping)
.map((blockchain) => {
const value = BlockchainCurrencyMapping[blockchain];
const value = exports.BlockchainCurrencyMapping[blockchain];
if (typeof value === 'object') {

@@ -65,0 +68,0 @@ return value.currencies.map((c) => ({

@@ -1,2 +0,3 @@

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ChainTransactionKMS.js.map

@@ -0,3 +1,6 @@

"use strict";
// @TODO OPENAPI - should be replaced with generated
export var Currency;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NFT_SUPPORTED_CURRENCIES = exports.BSC_BASED_CURRENCIES = exports.MATIC_BASED_CURRENCIES = exports.ETH_BASED_CURRENCIES = exports.MATIC20_CURRENCIES = exports.CELO_CURRENCIES = exports.FLOW_CURRENCIES = exports.TRON_CURRENCIES = exports.NATIVE_CURRENCIES = exports.BEP20_CURRENCIES = exports.ERC20_CURRENCIES = exports.Currency = void 0;
var Currency;
(function (Currency) {

@@ -76,4 +79,4 @@ Currency["BTC"] = "BTC";

Currency["TTT"] = "TTT";
})(Currency || (Currency = {}));
export const ERC20_CURRENCIES = [
})(Currency = exports.Currency || (exports.Currency = {}));
exports.ERC20_CURRENCIES = [
Currency.USDT,

@@ -102,3 +105,3 @@ Currency.LATOKEN,

];
export const BEP20_CURRENCIES = [
exports.BEP20_CURRENCIES = [
Currency.BETH,

@@ -120,3 +123,3 @@ Currency.BBTC,

];
export const NATIVE_CURRENCIES = [
exports.NATIVE_CURRENCIES = [
Currency.BTC,

@@ -144,10 +147,10 @@ Currency.ONE,

];
export const TRON_CURRENCIES = [Currency.TRON, Currency.USDT_TRON, Currency.INRT_TRON];
export const FLOW_CURRENCIES = [Currency.FLOW, Currency.FUSD];
export const CELO_CURRENCIES = [Currency.CELO, Currency.CEUR, Currency.CUSD];
export const MATIC20_CURRENCIES = [Currency.USDC_MATIC, Currency.GAMEE, Currency.USDT_MATIC];
export const ETH_BASED_CURRENCIES = [Currency.ETH, ...ERC20_CURRENCIES];
export const MATIC_BASED_CURRENCIES = [Currency.MATIC, ...MATIC20_CURRENCIES];
export const BSC_BASED_CURRENCIES = [Currency.BSC, ...BEP20_CURRENCIES];
export const NFT_SUPPORTED_CURRENCIES = [
exports.TRON_CURRENCIES = [Currency.TRON, Currency.USDT_TRON, Currency.INRT_TRON];
exports.FLOW_CURRENCIES = [Currency.FLOW, Currency.FUSD];
exports.CELO_CURRENCIES = [Currency.CELO, Currency.CEUR, Currency.CUSD];
exports.MATIC20_CURRENCIES = [Currency.USDC_MATIC, Currency.GAMEE, Currency.USDT_MATIC];
exports.ETH_BASED_CURRENCIES = [Currency.ETH, ...exports.ERC20_CURRENCIES];
exports.MATIC_BASED_CURRENCIES = [Currency.MATIC, ...exports.MATIC20_CURRENCIES];
exports.BSC_BASED_CURRENCIES = [Currency.BSC, ...exports.BEP20_CURRENCIES];
exports.NFT_SUPPORTED_CURRENCIES = [
Currency.ETH,

@@ -154,0 +157,0 @@ Currency.MATIC,

@@ -0,1 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Fiat = void 0;
// @TODO OPENAPI - should be replaced with generated

@@ -5,3 +8,3 @@ /**

*/
export var Fiat;
var Fiat;
(function (Fiat) {

@@ -175,3 +178,3 @@ Fiat["AED"] = "AED";

Fiat["ZWL"] = "ZWL";
})(Fiat || (Fiat = {}));
})(Fiat = exports.Fiat || (exports.Fiat = {}));
//# sourceMappingURL=Fiat.js.map

@@ -1,2 +0,3 @@

export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Web3.js.map

@@ -1,2 +0,5 @@

export const THIRD_PARTY_API = {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.THIRD_PARTY_API = void 0;
exports.THIRD_PARTY_API = {
ETH_GAS_STATION: 'https://ethgasstation.info/json/ethgasAPI.json',

@@ -3,0 +6,0 @@ POLYGON_GAS_STATION: 'https://gasstation-mainnet.matic.network',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc