Module Raw.Ciphertext

type t = {
  1. cv : CV.t;
  2. epk : DH.epk;
  3. payload_enc : Stdlib.Bytes.t;
  4. nonce_enc : Mavryk_crypto.Crypto_box.nonce;
  5. payload_out : Stdlib.Bytes.t;
  6. nonce_out : Mavryk_crypto.Crypto_box.nonce;
}
val encoding : t Data_encoding.encoding
type plaintext = {
  1. diversifier : Viewing_key.diversifier;
  2. amount : int64;
  3. rcm : Rcm.t;
  4. memo : Stdlib.Bytes.t;
}
val plaintext_encoding : plaintext Data_encoding.encoding
val get_memo_size : t -> int
val decompose_plaintext_out : bytes -> R.pkd * R.esk
val encrypt_aux : Mavryk_crypto.Crypto_box.Secretbox.key -> int64 -> Viewing_key.address -> Rcm.t -> Stdlib.Bytes.t -> R.esk -> CV.t -> t
val encrypt : int64 -> Viewing_key.address -> Viewing_key.t -> Rcm.t -> Stdlib.Bytes.t -> (R.cv * R.commitment * R.epk) -> R.esk -> t
val encrypt_without_ovk : int64 -> Viewing_key.address -> Rcm.t -> Stdlib.Bytes.t -> R.esk -> CV.t -> t
val decrypt : t -> Viewing_key.t -> (Viewing_key.address * int64 * Rcm.t * Stdlib.Bytes.t) option
val decrypt_ovk : t -> R.ovk -> (R.commitment * R.epk) -> (Viewing_key.address * int64 * Rcm.t * Stdlib.Bytes.t) option