mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
cleanup
This commit is contained in:
parent
2dbd2f2597
commit
d9e3c22579
1 changed files with 2 additions and 4 deletions
|
@ -63,13 +63,11 @@ sealed abstract class Base58 {
|
|||
*/
|
||||
def encode(byte: Byte): String = encode(ByteVector.fromByte(byte))
|
||||
|
||||
/** Takes in [[org.bitcoins.core.protocol.blockchain.Base58Type Base58Type]]
|
||||
* string and returns sequence of [[scala.Byte Byte]]s.
|
||||
* [[https://github.com/ACINQ/bitcoin-lib/blob/master/src/main/scala/fr/acinq/bitcoin/Base58.scala]]
|
||||
/** Decodes a base58 string to a [[ByteVector]]
|
||||
*/
|
||||
def decode(input: String): ByteVector = {
|
||||
ByteVector.fromBase58(input).getOrElse {
|
||||
throw new IllegalArgumentException(s"Invalid input, got=$input")
|
||||
throw new IllegalArgumentException(s"Invalid base58 input, got=$input")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue