nathanjohnson320 / base58 / Base58

Handles encoding/decoding base58 data

Transformations

decode : String -> Result String BigInt

Decodes a string into a BigInt

"ANYBx47k26vP81XFbQXh6XKUj7ptQRJMLt"
    |> Base58.decode
    |> Result.toMaybe
    == BigInt.fromString "146192635802076751054841979942155177482410195601230638449945"

encode : BigInt -> String

Encodes a BigInt into a string

BigInt.fromIntString "146192635802076751054841979942155177482410195601230638449945"
    |> Maybe.map Base58.encode
    == Ok "ANYBx47k26vP81XFbQXh6XKUj7ptQRJMLt"