secp256k1

Elliptic curve library secp256k1 wrapper for Ocaml
IN THIS PACKAGE
Module Secp256k1 . Key
type secret
type public
type _ t = private
| Sk : buffer -> secret t
| Pk : buffer -> public t
val to_buffer : _ t -> buffer
val length : _ t -> int
val equal : 'a t -> 'a t -> bool
val copy : 'a t -> 'a t

Aritmetic operations

val negate : Context.t -> 'a t -> 'a t
val add_tweak : Context.t -> 'a t -> ?pos:int -> buffer -> 'a t
val mul_tweak : Context.t -> 'a t -> ?pos:int -> buffer -> 'a t
val neuterize : Context.t -> _ t -> public t option
val neuterize_exn : Context.t -> _ t -> public t
val combine : Context.t -> _ t list -> public t option
val combine_exn : Context.t -> _ t list -> public t

Input/Output

val read_sk : Context.t -> ?pos:int -> buffer -> ( secret t, string ) result
val read_sk_exn : Context.t -> ?pos:int -> buffer -> secret t
val read_pk : Context.t -> ?pos:int -> buffer -> ( public t, string ) result
val read_pk_exn : Context.t -> ?pos:int -> buffer -> public t
val write : ?compress:bool -> Context.t -> ?pos:int -> buffer -> _ t -> int
val to_bytes : ?compress:bool -> Context.t -> _ t -> buffer