UNPKG

@zebec-fintech/silver-card-sdk

Version:
36 lines (35 loc) 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TESTNET_CHAINIDS = exports.SupportedChain = void 0; exports.parseSupportedChain = parseSupportedChain; const errors_1 = require("./errors"); /** * Supported chainIds by zebec instant card sdk. */ var SupportedChain; (function (SupportedChain) { SupportedChain[SupportedChain["Mainnet"] = 1] = "Mainnet"; SupportedChain[SupportedChain["Sepolia"] = 11155111] = "Sepolia"; SupportedChain[SupportedChain["Base"] = 8453] = "Base"; SupportedChain[SupportedChain["Bsc"] = 56] = "Bsc"; SupportedChain[SupportedChain["BscTestnet"] = 97] = "BscTestnet"; SupportedChain[SupportedChain["Bittensor"] = 558] = "Bittensor"; SupportedChain[SupportedChain["BittensorTestnet"] = 559] = "BittensorTestnet"; })(SupportedChain || (exports.SupportedChain = SupportedChain = {})); exports.TESTNET_CHAINIDS = [11155111, 97]; function parseSupportedChain(chainId) { switch (chainId) { case 1: return SupportedChain.Mainnet; case 11155111: return SupportedChain.Sepolia; case 8453: return SupportedChain.Base; case 56: return SupportedChain.Bsc; case 97: return SupportedChain.BscTestnet; default: throw new errors_1.UnsupportedChainError(chainId); } }