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

Cometa.Signer

Description

Inject partial signing with keys kept inside scoped closures. A signer returns witnesses without attaching them or submitting the transaction. Merge its result explicitly with addWitnesses.

import qualified Cometa.Signer as Signer
import qualified Cometa.Transaction as Tx

signWith signer transaction = do
  result <- Signer.signTransaction signer transaction
  pure (result >>= (witnesses -> Tx.addWitnesses witnesses transaction))
Synopsis

Documentation

newtype Signer Source #

An application-supplied partial signer. Captured scoped keys/handlers must remain open throughout its use; escaped closures report the existing closed key/handler error. No private-key export is required.

Constructors

Signer 

Fields

ed25519 :: SigningKey -> Signer Source #

Capture an open normal or extended Ed25519 signing key. The result contains one Shelley verification witness and does not mutate or attach it to input.

software :: Handler Ed25519 -> Signer Source #

Capture an open Ed25519 software handler, retaining its secret scope rules.

bip32 :: Handler Bip32 -> NonEmpty DerivationPath -> Signer Source #

Capture an open BIP32 software handler and nonempty five-level derivation paths. Existing path validation and role checks are reused without key export.