PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@iota/iota-sdk/dist/esm/client

Просмотр файла: network.js

var Network = /* @__PURE__ */ ((Network2) => {
  Network2["Mainnet"] = "mainnet";
  Network2["Devnet"] = "devnet";
  Network2["Testnet"] = "testnet";
  Network2["Localnet"] = "localnet";
  Network2["Custom"] = "custom";
  return Network2;
})(Network || {});
function getAllNetworks() {
  const networksStringified = '{\n    "mainnet": {\n        "id": "mainnet",\n        "name": "Mainnet",\n        "url": "https://api.mainnet.iota.cafe",\n        "graphql": "https://graphql.mainnet.iota.cafe",\n        "explorer": "https://explorer.rebased.iota.org",\n        "chain": "iota:mainnet"\n    },\n    "testnet": {\n        "id": "testnet",\n        "name": "Testnet",\n        "url": "https://api.testnet.iota.cafe",\n        "graphql": "https://graphql.testnet.iota.cafe",\n        "explorer": "https://explorer.rebased.iota.org",\n        "chain": "iota:testnet",\n        "faucet": "https://faucet.testnet.iota.cafe",\n        "kiosk": {\n            "royaltyRulePackageId": "0x975f749f57701209454e4b9b9e33825ccb6a9abf57de2ce86979e5fa86c343f2",\n            "kioskLockRulePackageId": "0x975f749f57701209454e4b9b9e33825ccb6a9abf57de2ce86979e5fa86c343f2",\n            "floorPriceRulePackageId": "0x975f749f57701209454e4b9b9e33825ccb6a9abf57de2ce86979e5fa86c343f2",\n            "personalKioskRulePackageId": "0x975f749f57701209454e4b9b9e33825ccb6a9abf57de2ce86979e5fa86c343f2"\n        }\n    },\n    "devnet": {\n        "id": "devnet",\n        "name": "Devnet",\n        "url": "https://api.devnet.iota.cafe",\n        "graphql": "https://graphql.devnet.iota.cafe",\n        "explorer": "https://explorer.rebased.iota.org",\n        "chain": "iota:devnet",\n        "faucet": "https://faucet.devnet.iota.cafe"\n    },\n    "localnet": {\n        "id": "localnet",\n        "name": "Localnet",\n        "url": "http://localhost:9000",\n        "graphql": "http://localhost:9125",\n        "explorer": "http://localhost:3000",\n        "chain": "iota:local",\n        "faucet": "http://localhost:9123"\n    }\n}';
  if (!networksStringified) {
    throw new Error('"IOTA_NETWORKS" env var is not set.');
  }
  let networks;
  try {
    networks = JSON.parse(networksStringified);
  } catch {
    throw new Error('Failed to parse env var "IOTA_NETWORKS".');
  }
  return networks;
}
function getNetwork(network) {
  const networks = getAllNetworks();
  const requestedNetwork = networks[network] ?? network;
  return requestedNetwork;
}
function getDefaultNetwork() {
  return "mainnet";
}
function getFullnodeUrl(network) {
  return getNetwork(network).url;
}
function getGraphQLUrl(network) {
  return getNetwork(network).graphql;
}
export {
  Network,
  getAllNetworks,
  getDefaultNetwork,
  getFullnodeUrl,
  getGraphQLUrl,
  getNetwork
};
//# sourceMappingURL=network.js.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!