{"version":3,"file":"network-client.mjs","sources":["../../src/types/network-client.ts"],"sourcesContent":["import { TokenHeader } from 'algosdk'\n\n/** Config for an Algorand SDK client. */\nexport interface AlgoClientConfig {\n  /** Base URL of the server e.g. http://localhost, https://testnet-api.algonode.cloud/, etc. */\n  server: string\n  /** The port to use e.g. 4001, 443, etc. */\n  port?: string | number\n  /** The token to use for API authentication (or undefined if none needed) - can be a string, or an object with the header key => value */\n  token?: string | TokenHeader\n}\n\n/** Configuration for algod, indexer and kmd clients. */\nexport interface AlgoConfig {\n  /** Algod client configuration */\n  algodConfig: AlgoClientConfig\n  /** Indexer client configuration */\n  indexerConfig?: AlgoClientConfig\n  /** Kmd configuration */\n  kmdConfig?: AlgoClientConfig\n}\n\n/** Details of the current network. */\nexport interface NetworkDetails {\n  /** Whether or not the network is TestNet. */\n  isTestNet: boolean\n  /** Whether or not the network is MainNet. */\n  isMainNet: boolean\n  /** Whether or not the network is LocalNet. */\n  isLocalNet: boolean\n  /** The genesis ID of the current network. */\n  genesisId: string\n  /** The base64 genesis hash of the current network. */\n  genesisHash: string\n}\n\n/**\n * Returns true if the given network genesisId is associated with a LocalNet network.\n * @param genesisId The network genesis ID\n * @returns Whether the given genesis ID is associated with a LocalNet network\n */\nexport function genesisIdIsLocalNet(genesisId: string) {\n  return genesisId === 'devnet-v1' || genesisId === 'sandnet-v1' || genesisId === 'dockernet-v1'\n}\n"],"names":[],"mappings":"AAoCA;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,SAAiB,EAAA;IACnD,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,KAAK,YAAY,IAAI,SAAS,KAAK,cAAc;AAChG;;;;"}