cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Transaction.Witness

Description

Verification-key signatures and Byron bootstrap witnesses. Construction assembles previously validated keys and signatures; it does not verify them. verificationWitness key signature assembles a Shelley witness.

Synopsis

Documentation

verificationWitness :: PublicKey -> Signature -> VerificationWitness Source #

Assemble a key witness. Cryptographic verification is a separate effect.

publicKey :: VerificationWitness -> PublicKey Source #

The signing verification key.

signature :: VerificationWitness -> Signature Source #

Signature bytes validated for Ed25519 length.

mkBootstrapWitness :: PublicKey -> Signature -> ByteString -> ByteString -> Either Error BootstrapWitness Source #

Assemble a bootstrap witness; the chain code must contain exactly 32 bytes. Attributes are the serialized Byron address attributes, retained verbatim.

chainCode :: BootstrapWitness -> ByteString Source #

Exactly 32 chain-code bytes.

attributes :: BootstrapWitness -> ByteString Source #

Opaque serialized Byron address attributes.

encodeCbor :: VerificationWitness -> ByteString Source #

Encode the two-element key/signature array.

decodeCbor :: ByteString -> Either Error VerificationWitness Source #

Decode one key/signature array, validating lengths and rejecting trailing bytes.

encodeBootstrapCbor :: BootstrapWitness -> ByteString Source #

Encode the four-element bootstrap array.

decodeBootstrapCbor :: ByteString -> Either Error BootstrapWitness Source #

Decode a bootstrap array, validating lengths and rejecting trailing bytes.