package secp256k1

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

Opaque data structure that holds a parsed and valid public key.

val compare : t -> t -> int
val of_bytes : Context.t -> ?pos:int -> buffer -> t option
val of_bytes_exn : Context.t -> ?pos:int -> buffer -> t

Parse a variable-length public key. This function supports parsing compressed (33 bytes, header byte 0x02 or 0x03), uncompressed (65 bytes, header byte 0x04), or hybrid (65 bytes, header byte 0x06 or 0x07) format public keys.

val of_secret : Context.t -> Secret.t -> t

Compute the public key for a secret key.

val to_bytes : ?compress:bool -> Context.t -> t -> buffer

Serialize a pubkey object into a serialized byte sequence.

val write : ?compress:bool -> Context.t -> buffer -> ?pos:int -> t -> unit

write ?compress ctx buf ?pos key writes key at but starting at pos.

OCaml

Innovation. Community. Security.