package octez-libs

  1. Overview
  2. Docs
include Core_sig.T_encoding
type t
val encoding : t Data_encoding.t
val of_bytes : bytes -> t option
val to_bytes : t -> bytes
val of_sk : Spending_key.t -> t
type index

Indexes to derive addresses. Starting from default_index, the following addresses can be derived with index_succ *

val compare_index : index -> index -> int
val default_index : index
val index_succ : index -> index
val index_to_int64 : index -> int64
val index_of_int64 : int64 -> index
val index_encoding : index Data_encoding.t
type address

To be given to the payer. Does not appear on the blockchain. Different addresses can be derived from one key which is necessary to prevent a loss of anonymity because of several payers colluding. e.g. two payers can conclude that they are paying the same person if they send money to the same address. *

val address_encoding : address Data_encoding.t
val address_b58check_encoding : address Tezos_crypto.Base58.encoding
val new_address : t -> index -> index * address

Returns a new address and a new index to be used for the next address generation. *

val dummy_address : unit -> address

A dummy address can be generated to create dummy inputs or outputs of value 0. Note that tokens sent to dummy addresses are lost! *

type ivk

Incoming viewing keys can be used to see transactions received to any address generated from this key. This feature is not enforced by the protocol, a payer could spend tokens on-chain and transmit to the recipient invalid information. The recipient should always check the received transactions with its ivk. *

val to_ivk : t -> ivk
type ovk
val ovk_of_xfvk : t -> ovk
OCaml

Innovation. Community. Security.