buildOutput function
- String address,
- BigInt value,
- UTXONetworkType networkType
Implementation
Output buildOutput(String address, BigInt value, UTXONetworkType networkType) {
final lockingScript = P2Hash(address).publicKeyScript;
return switch (networkType) {
BITCOIN_NETWORK() ||
BITCOINCASH_NETWORK() ||
ZENIQ_NETWORK() ||
LITECOIN_NETWORK() =>
BTCOutput(
value: value,
scriptPubKey: lockingScript,
),
EUROCOIN_NETWORK() => EC8Output(
value: value,
scriptPubKey: lockingScript,
),
};
}