BitcoinKit
BitcoinKit copied to clipboard
Is BitcoinAddress legacy wrong when HashType is .scriptHash ?
In BitcoinAddress+Legacy.swift
public var legacy: String {
switch hashType {
case .pubkeyHash:
return Base58Check.encode([network.pubkeyhash] + data)
case .scriptHash:
return Base58Check.encode([network.pubkeyhash] + data)
}
}
correct way:
case .scriptHash:
return Base58Check.encode([network.scripthash] + data)