| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Transaction.Signing
Description
Produce and attach Ed25519 transaction witnesses using scoped signing keys. Signatures cover the exact transaction-body hash; witnesses and outer framing never enter the signed message. Operations preserve the source transaction.
Synopsis
- verificationWitness :: SigningKey -> Transaction -> IO (Either Error VerificationWitness)
- sign :: SigningKey -> Transaction -> IO (Either Error Transaction)
- subTransactionWitness :: SigningKey -> SubTransaction -> IO (Either Error VerificationWitness)
- signSubTransaction :: SigningKey -> SubTransaction -> IO (Either Error SubTransaction)
Documentation
verificationWitness :: SigningKey -> Transaction -> IO (Either Error VerificationWitness) Source #
Sign the exact body hash and pair it with the key's public key. The key must remain open throughout the operation. No transaction bytes are changed.
sign :: SigningKey -> Transaction -> IO (Either Error Transaction) Source #
Add this key's witness, retaining existing partial signatures and exact body bytes. Repeating the same signature is an exact no-op; a conflicting existing signature for that public key fails. Closed keys and native failures fail.
subTransactionWitness :: SigningKey -> SubTransaction -> IO (Either Error VerificationWitness) Source #
Sign a sub-transaction's own body hash, independent of its enclosing body.
signSubTransaction :: SigningKey -> SubTransaction -> IO (Either Error SubTransaction) Source #
Add a signature to this sub-transaction while preserving its exact body.