package tezos-sapling

  1. Overview
  2. Docs
type t = {
  1. rcm : Rcm.t;
  2. pos : int64;
  3. amount : int64;
  4. address : Viewing_key.address;
}

Necessary infos to create spend some money belonging to our key. *

include T_encoding with type t := t
val encoding : t Data_encoding.t
val compare : t -> t -> int
val of_ciphertext : pos:int64 -> Ciphertext.t -> Viewing_key.t -> (Bytes.t * t) option

Decrypt a ciphertext to create a input. The decryption can fail if the description key is incorrect or the ciphertext is incorrect. The returned bytes are a memo added by the sender *

val of_ciphertext_out : pos:int64 -> Ciphertext.t -> Spending_key.ovk -> Commitment.t -> (Bytes.t * t) option

Same as of_ciphertext but requires only the ovk. *

val check_cm : t -> Commitment.t -> bool

Check that a commitment corresponds to an input *