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.224 to 2.0.1-alpha.227

4

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

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

"axios": "^0.24.0",
"@tatumio/api-client": "2.0.1-alpha.223",
"@tatumio/api-client": "2.0.1-alpha.224",
"cross-blob": "^3.0.0",

@@ -12,0 +12,0 @@ "form-data": "^4.0.0"

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

"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,
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,
};
//# sourceMappingURL=index.js.map

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

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

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

"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),
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),
getBlockchainByCurrency: (currency) => {
const blockchain = BlockchainCurrencyMapping_1.CurrencyToBlockchainMapping[currency];
const blockchain = CurrencyToBlockchainMapping[currency];
if (!blockchain)

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

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

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

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

"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 getNetworkConfig = (blockchain, options) => {
return (options === null || options === void 0 ? void 0 : options.testnet) ? NETWORK_CONFIG[blockchain].testnet : NETWORK_CONFIG[blockchain].mainnet;
};
exports.getNetworkConfig = getNetworkConfig;
exports.NETWORK_CONFIG = {
export const NETWORK_CONFIG = {
BTC: {

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

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

"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',
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',
};
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 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.CUSTODIAL_PROXY_ABI = {
export const CUSTODIAL_PROXY_ABI = {
inputs: [

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

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

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

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

"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];
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];
};
exports.getDerivationPath = getDerivationPath;
exports.DERIVATION_PATH = {
export const DERIVATION_PATH = {
BTC: "m/44'/0'/0'/0",

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

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

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

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

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

"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");
import axios from 'axios';
import { TATUM_API_CONSTANTS } from '@tatumio/api-client';
const EndpointsMapping = {

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

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

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

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

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

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

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

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

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

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

"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,
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,
TRON: {
nativeCurrency: Currency_1.Currency.TRON,
currencies: Currency_1.TRON_CURRENCIES,
nativeCurrency: Currency.TRON,
currencies: TRON_CURRENCIES,
},
FLOW: {
nativeCurrency: Currency_1.Currency.FLOW,
currencies: Currency_1.FLOW_CURRENCIES,
nativeCurrency: Currency.FLOW,
currencies: FLOW_CURRENCIES,
},
CELO: {
nativeCurrency: Currency_1.Currency.CELO,
currencies: Currency_1.CELO_CURRENCIES,
nativeCurrency: Currency.CELO,
currencies: CELO_CURRENCIES,
},
HARMONY: Currency_1.Currency.ONE,
QTUM: Currency_1.Currency.QTUM,
EGLD: Currency_1.Currency.EGLD,
HARMONY: Currency.ONE,
QTUM: Currency.QTUM,
EGLD: Currency.EGLD,
ETH: {
nativeCurrency: Currency_1.Currency.ETH,
currencies: Currency_1.ETH_BASED_CURRENCIES,
nativeCurrency: Currency.ETH,
currencies: ETH_BASED_CURRENCIES,
},
BSC: {
nativeCurrency: Currency_1.Currency.ETH,
currencies: Currency_1.BSC_BASED_CURRENCIES,
nativeCurrency: Currency.ETH,
currencies: BSC_BASED_CURRENCIES,
},
POLYGON: {
nativeCurrency: Currency_1.Currency.MATIC,
currencies: Currency_1.MATIC_BASED_CURRENCIES,
nativeCurrency: Currency.MATIC,
currencies: MATIC_BASED_CURRENCIES,
},
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,
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,
};
exports.CurrencyToBlockchainMapping = buildCurrencyBlockchainMapping();
exports.BlockchainToNativeCurrencyMapping = buildBlockchainDefaultCurrencyMapping();
export const CurrencyToBlockchainMapping = buildCurrencyBlockchainMapping();
export const BlockchainToNativeCurrencyMapping = buildBlockchainDefaultCurrencyMapping();
function buildBlockchainDefaultCurrencyMapping() {
return Object.keys(exports.BlockchainCurrencyMapping)
return Object.keys(BlockchainCurrencyMapping)
.map((blockchain) => {
const value = exports.BlockchainCurrencyMapping[blockchain];
const value = BlockchainCurrencyMapping[blockchain];
if (typeof value === 'object')

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

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

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

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

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

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

"use strict";
// @TODO OPENAPI - should be replaced with generated
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;
export var Currency;
(function (Currency) {

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

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

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

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

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

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

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

];
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 = [
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 = [
Currency.ETH,

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

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

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

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

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

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

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

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

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

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

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

@@ -6,0 +3,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