Safe Haskell | None |
---|---|
Language | Haskell2010 |
SLIP-0032 is an extended serialization format for BIP-0032 wallets
Implementation based on the draft SLIP-0032 spec.
Synopsis
- parse :: ByteString -> Maybe (Either XPub XPrv)
- parseXPub :: ByteString -> Maybe XPub
- parseXPrv :: ByteString -> Maybe XPrv
- parseText :: Text -> Maybe (Either XPub XPrv)
- parseXPubText :: Text -> Maybe XPub
- parseXPrvText :: Text -> Maybe XPrv
- renderXPub :: XPub -> ByteString
- renderXPrv :: XPrv -> ByteString
- renderXPubText :: XPub -> Text
- renderXPrvText :: XPrv -> Text
- data XPub = XPub !Path !Chain !Pub
- data Pub
- pub :: ByteString -> Maybe Pub
- unPub :: Pub -> ByteString
- data XPrv = XPrv !Path !Chain !Prv
- data Prv
- prv :: ByteString -> Maybe Prv
- unPrv :: Prv -> ByteString
- data Path
- path :: [Word32] -> Maybe Path
- unPath :: Path -> [Word32]
- data Chain
- chain :: ByteString -> Maybe Chain
- unChain :: Chain -> ByteString
Parsing
Text
Rendering
renderXPub :: XPub -> ByteString Source #
Render an XPub
using the SLIP-0032 encoding.
renderXPrv :: XPrv -> ByteString Source #
Render an XPub
using the SLIP-0032 encoding.
Text
renderXPubText :: XPub -> Text Source #
renderXPrvText :: XPrv -> Text Source #
Public key
Extended public key.
Public key.
Construct with pub
.
Private key
Extended private key.
Private key.
Construct with prv
.
Path
Derivation path.
Construct with path
.
Chain
Chain code.
Construct with chain
.
chain :: ByteString -> Maybe Chain Source #
Construct a Chain
code.
See Bitcoin's BIP-0032 for details.
Nothing
if the ByteString
length is not 32.