csecp256k1

Haskell FFI bindings to bitcoin-core/secp256k1.
git clone git://git.ppad.tech/csecp256k1.git
Log | Files | Refs | README | LICENSE

commit 5354687f031f15213e12ff4be58c7528df319513
parent e94cc04da98f2266a5885e302e3173e5fb6147dc
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri,  1 Mar 2024 18:24:12 +0400

lib: doc headers for compact sig functions

Diffstat:
Mlib/Crypto/Secp256k1.hs | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/Crypto/Secp256k1.hs b/lib/Crypto/Secp256k1.hs @@ -427,9 +427,12 @@ serialize_der (Context tex) (Sig sig) = nel = fromIntegral pek BS.packCStringLen (der, nel) +-- | Parse a bytestring encoding a compact (64-byte) signature. +-- +-- >>> wcontext $ \tex -> parse_compact tex bytestring parse_compact :: Context - -> BS.ByteString -- ^ 64-byte compact signature + -> BS.ByteString -- ^ bytestring encoding a 64-byte compact signature -> IO Sig parse_compact (Context tex) bs = BS.useAsCString bs $ \(F.castPtr -> com) -> @@ -440,6 +443,9 @@ parse_compact (Context tex) bs = enc <- BS.packCStringLen (par, _SIG_BYTES) pure (Sig enc) +-- | Serialize a signature into a compact (64-byte) bytestring. +-- +-- >>> wcontext $ \tex -> serialize_compact tex sig serialize_compact :: Context -> Sig