NetworkConfig
data class NetworkConfig(val network: MidnightNetwork, val indexerBaseUrl: String, val nodeRpcUrl: String, val proofServerUrl: String, val developmentMode: Boolean)
Configuration for a Midnight network environment.
URL Conventions:
indexerBaseUrl: Base URL for indexer API (without /graphql suffix)
IndexerClientImpl appends /graphql for HTTP and /graphql/ws for WebSocket
nodeRpcUrl: Full URL for node JSON-RPC endpoint
proofServerUrl: Full URL for proof server (appends /prove-tx internally)
Localhost host resolution (see DeviceType.localhostHost):
Emulator:
10.0.2.2(Android emulator's special host alias)Physical device:
127.0.0.1(requiresadb reverse tcp:<port> tcp:<port>for the indexer/node/proof-server ports). See./gradlew adbReverseLocalnet.
The localnet (UNDEPLOYED) network uses this for all three services. PREPROD and PREVIEW use it only for the local proof server.
Constructors
Link copied to clipboard
constructor(network: MidnightNetwork, indexerBaseUrl: String, nodeRpcUrl: String, proofServerUrl: String, developmentMode: Boolean)