package secp256k1

  1. Overview
  2. Docs

Module Secp256k1.SignSource

Message

Sourcetype msg
Sourceval msg_of_bytes : ?pos:int -> buffer -> msg option
Sourceval msg_of_bytes_exn : ?pos:int -> buffer -> msg
Sourceval write_msg_exn : ?pos:int -> buffer -> msg -> int
Sourceval write_msg : ?pos:int -> buffer -> msg -> (int, string) result
Sourceval msg_to_bytes : msg -> buffer

Signature

Sourcetype plain
Sourcetype recoverable
Sourcetype _ t = private
  1. | P : buffer -> plain t
  2. | R : buffer -> recoverable t
Sourceval equal : 'a t -> 'a t -> bool
Sourceval to_plain : Context.t -> recoverable t -> plain t

Input/Output

Sourceval read : Context.t -> ?pos:int -> buffer -> (plain t, string) result
Sourceval read_exn : Context.t -> ?pos:int -> buffer -> plain t
Sourceval read_der : Context.t -> ?pos:int -> buffer -> (plain t, string) result
Sourceval read_der_exn : Context.t -> ?pos:int -> buffer -> plain t
Sourceval read_recoverable : Context.t -> recid:int -> ?pos:int -> buffer -> (recoverable t, string) result
Sourceval read_recoverable_exn : Context.t -> recid:int -> ?pos:int -> buffer -> recoverable t
Sourceval write_exn : ?der:bool -> Context.t -> ?pos:int -> buffer -> _ t -> int
Sourceval write : ?der:bool -> Context.t -> ?pos:int -> buffer -> _ t -> (int, string) result
Sourceval to_bytes : ?der:bool -> Context.t -> _ t -> buffer
Sourceval to_bytes_recid : Context.t -> recoverable t -> buffer * int

Sign

Creation
Sourceval sign : Context.t -> sk:Key.secret Key.t -> msg:msg -> (plain t, string) result
Sourceval sign_exn : Context.t -> sk:Key.secret Key.t -> msg:msg -> plain t
Sourceval sign_recoverable : Context.t -> sk:Key.secret Key.t -> msg -> (recoverable t, string) result
Sourceval sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> msg -> recoverable t
Direct write in buffers
Sourceval write_sign : Context.t -> sk:Key.secret Key.t -> msg:msg -> ?pos:int -> buffer -> (int, string) result
Sourceval write_sign_exn : Context.t -> sk:Key.secret Key.t -> msg:msg -> ?pos:int -> buffer -> int
Sourceval write_sign_recoverable : Context.t -> sk:Key.secret Key.t -> msg:msg -> ?pos:int -> buffer -> (int, string) result
Sourceval write_sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> msg:msg -> ?pos:int -> buffer -> int
Verification
Sourceval verify_exn : Context.t -> pk:Key.public Key.t -> msg:msg -> signature:_ t -> bool
Sourceval verify : Context.t -> pk:Key.public Key.t -> msg:msg -> signature:_ t -> (bool, string) result
Recovery
Sourceval recover_exn : Context.t -> signature:recoverable t -> msg:msg -> Key.public Key.t
Sourceval recover : Context.t -> signature:recoverable t -> msg:msg -> (Key.public Key.t, string) result