BitcoinKit icon indicating copy to clipboard operation
BitcoinKit copied to clipboard

Is BitcoinAddress legacy wrong when HashType is .scriptHash ?

Open QiuDaniel opened this issue 4 years ago • 0 comments

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)

QiuDaniel avatar Jan 06 '22 05:01 QiuDaniel