Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PubKey = PubKey {
- getPubKey :: LedgerBytes
- newtype PrivateKey = PrivateKey {
- getPrivateKey :: LedgerBytes
- newtype Signature = Signature {
- getSignature :: BuiltinByteString
- newtype Passphrase = Passphrase {
- unPassphrase :: ByteString
- pubKeyHash :: PubKey -> PubKeyHash
- signedBy :: ByteArrayAccess a => Signature -> PubKey -> a -> Bool
- sign :: ByteArrayAccess a => a -> XPrv -> Passphrase -> Signature
- signTx :: TxId -> XPrv -> Passphrase -> Signature
- generateFromSeed :: ByteString -> Passphrase -> XPrv
- toPublicKey :: XPrv -> PubKey
- xPubToPublicKey :: XPub -> PubKey
- sign' :: ByteArrayAccess a => a -> XPrv -> Signature
- signTx' :: TxId -> XPrv -> Signature
- generateFromSeed' :: ByteString -> XPrv
Documentation
Instances
newtype PrivateKey Source #
A cryptographic private key.
PrivateKey | |
|
Instances
A message with a cryptographic signature.
Signature | |
|
Instances
newtype Passphrase Source #
Passphrase newtype to mark intent
Passphrase | |
|
Instances
Show Passphrase Source # | |
Defined in Ledger.Crypto | |
IsString Passphrase Source # | |
Defined in Ledger.Crypto fromString :: String -> Passphrase Source # |
pubKeyHash :: PubKey -> PubKeyHash Source #
Compute the hash of a public key.
signedBy :: ByteArrayAccess a => Signature -> PubKey -> a -> Bool Source #
Check whether the given Signature
was signed by the private key corresponding to the given public key.
sign :: ByteArrayAccess a => a -> XPrv -> Passphrase -> Signature Source #
Sign a message using a private key and passphrase.
signTx :: TxId -> XPrv -> Passphrase -> Signature Source #
Sign the hash of a transaction using a private key and passphrase.
generateFromSeed :: ByteString -> Passphrase -> XPrv Source #
Generate a private key from a seed phrase and passphrase
toPublicKey :: XPrv -> PubKey Source #
xPubToPublicKey :: XPub -> PubKey Source #
Signing and generation with no passphrase
sign' :: ByteArrayAccess a => a -> XPrv -> Signature Source #
Sign a message using a private key with no passphrase.
signTx' :: TxId -> XPrv -> Signature Source #
Sign the hash of a transaction using a private key that has no passphrase.
generateFromSeed' :: ByteString -> XPrv Source #
Generate a private key from a seed phrase without a passphrase.