diff --git a/vendors/ocaml-secp256k1/src/external.ml b/vendors/ocaml-secp256k1/src/external.ml index 579b6ee0a..b21422eb2 100644 --- a/vendors/ocaml-secp256k1/src/external.ml +++ b/vendors/ocaml-secp256k1/src/external.ml @@ -325,9 +325,9 @@ module Sign = struct let _nb_written = write_exn ~der ctx buf signature in buf | R _ as signature -> - let buf = Bigstring.create recoverable_bytes in - let _nb_written = write_exn ctx buf signature in - buf + let buf = Bigstring.create recoverable_bytes in + let _nb_written = write_exn ctx buf signature in + buf external normalize : Context.t -> Bigstring.t -> Bigstring.t -> bool = @@ -454,5 +454,5 @@ module Sign = struct let recover ctx ~signature msg = try Ok (recover_exn ctx ~signature msg) with - Invalid_argument msg -> Error msg + Invalid_argument msg -> Error msg end diff --git a/vendors/ocaml-secp256k1/src/external.mli b/vendors/ocaml-secp256k1/src/external.mli index e4adc883c..cdaa8e2a5 100644 --- a/vendors/ocaml-secp256k1/src/external.mli +++ b/vendors/ocaml-secp256k1/src/external.mli @@ -156,51 +156,51 @@ module Sign : sig (** {4 Creation} *) val sign : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> (plain - t, string) result + t, string) result val sign_exn : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> - plain t + plain t val sign_recoverable : Context.t -> sk:Key.secret Key.t -> - Bigstring.t -> (recoverable t, string) result + Bigstring.t -> (recoverable t, string) result val sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> - Bigstring.t -> recoverable t + Bigstring.t -> recoverable t (** {4 Direct write} *) val write_sign : Context.t -> Bigstring.t -> sk:Key.secret Key.t -> - msg:Bigstring.t -> (int, string) result (** [write_sign ctx buf ~sk - ~msg] writes signs [msg] with [sk] and writes the signature to - [buf] at [?pos]. It returns the number of bytes written (64) on - success, or ar error message otherwise. *) + msg:Bigstring.t -> (int, string) result (** [write_sign ctx buf ~sk + ~msg] writes signs [msg] with [sk] and writes the signature to + [buf] at [?pos]. It returns the number of bytes written (64) on + success, or ar error message otherwise. *) val write_sign_exn : Context.t -> Bigstring.t -> sk:Key.secret Key.t - -> msg:Bigstring.t -> int (** [write_sign_exn ctx buf ~sk ~msg] - writes signs [msg] with [sk] and writes the signature to [buf] at - [?pos]. It returns the number of bytes written (64). + -> msg:Bigstring.t -> int (** [write_sign_exn ctx buf ~sk ~msg] + writes signs [msg] with [sk] and writes the signature to [buf] at + [?pos]. It returns the number of bytes written (64). - @raise [Invalid_argument] if [buf] is not long enough to contain - a signature or signing has failed. *) + @raise [Invalid_argument] if [buf] is not long enough to contain + a signature or signing has failed. *) val write_sign_recoverable : Context.t -> sk:Key.secret Key.t -> - msg:Bigstring.t -> Bigstring.t -> (int, string) result + msg:Bigstring.t -> Bigstring.t -> (int, string) result val write_sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> - msg:Bigstring.t -> Bigstring.t -> int + msg:Bigstring.t -> Bigstring.t -> int (** {4 Verification} *) val verify_exn : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t - -> signature:_ t -> bool + -> signature:_ t -> bool val verify : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t -> - signature:_ t -> (bool, string) result + signature:_ t -> (bool, string) result (** {4 Recovery} *) val recover_exn : Context.t -> signature:recoverable t -> - Bigstring.t -> Key.public Key.t + Bigstring.t -> Key.public Key.t val recover : Context.t -> signature:recoverable t -> Bigstring.t -> - (Key.public Key.t, string) result end + (Key.public Key.t, string) result end