UNPKG

@dinolab/crypto-mm

Version:

Crypto Market Maker

25 lines 976 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExchangeKind = getExchangeKind; exports.getExchangeHandler = getExchangeHandler; const types_js_1 = require("../types/types.js"); const raydium_js_1 = __importDefault(require("../exchanges/raydium.js")); function getExchangeKind(exchangeType) { if (exchangeType in types_js_1.DexExchangeType) return types_js_1.ExchangeKind.Dex; if (exchangeType in types_js_1.FunExchangeType) return types_js_1.ExchangeKind.Fun; return types_js_1.ExchangeKind.Dex; } function getExchangeHandler(exchangeType, rpcUrl) { switch (exchangeType) { case types_js_1.DexExchangeType.Raydium: return new raydium_js_1.default(rpcUrl); default: return undefined; } } //# sourceMappingURL=utils.js.map