Network

@Serializable
data class Network(val id: String, val name: String, val type: NetworkType, val chainId: BigInteger? = null, val rpc: RpcConfig? = null, val evmFeatures: EvmFeatures? = null, val addressFormats: List<String>? = null, val bech32Prefix: String? = null, val utxoFeatures: UtxoFeatures? = null, val nativeCurrency: NativeCurrency, val explorer: Explorer)

Network definition for our wallet.

This is the single source of truth for supported blockchains.

  • Network-centric (execution, fees, explorers, UX)

  • Not key-centric (no derivation paths, no SLIP-44 coupling)

  • Backend-driven (can evolve without app redeploys)

  • Shared across Flutter + KMP

Constructors

Link copied to clipboard
constructor(id: String, name: String, type: NetworkType, chainId: BigInteger? = null, rpc: RpcConfig? = null, evmFeatures: EvmFeatures? = null, addressFormats: List<String>? = null, bech32Prefix: String? = null, utxoFeatures: UtxoFeatures? = null, nativeCurrency: NativeCurrency, explorer: Explorer)

Properties

Link copied to clipboard

Supported address formats (UTXO only, e.g., "p2pkh", "p2wpkh")

Link copied to clipboard

Bech32 address prefix (UTXO only, e.g., "bc" for Bitcoin)

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
val chainId: BigInteger?

EVM chain ID (required for EVM networks, null for UTXO)

Link copied to clipboard

Feature flags for EVM networks

Link copied to clipboard

Block explorer URL templates

Link copied to clipboard
val id: String

Canonical network identifier (e.g., "ethereum", "base", "bitcoin")

Link copied to clipboard

Human-readable display name

Link copied to clipboard

Native currency details

Link copied to clipboard

RPC configuration (EVM only)

Link copied to clipboard

Network type (EVM or UTXO)

Link copied to clipboard

Feature flags for UTXO networks

Functions

Link copied to clipboard

Extension function to get WalletCore coin type from a Network.