networkForDefine function
Map a ZEC_NETWORK define value to the SDK network. Pure so every arm is
pinned by a unit test (the const define can't vary inside one test binary);
the throw is the fail-loud arm — never default a typo to mainnet.
Implementation
Network networkForDefine(String define) => switch (define) {
'mainnet' => Network.main,
'testnet' => Network.test,
_ => throw StateError(
'Unknown ZEC_NETWORK "$define" — use "mainnet" or "testnet".',
),
};