package tezos-client-015-PtLimaPt

  1. Overview
  2. Docs
Tezos/Protocol: protocol specific library for `tezos-client`

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-client-015-PtLimaPt.sapling/Tezos_client_sapling_015_PtLimaPt/Context/index.html

Module Tezos_client_sapling_015_PtLimaPt.ContextSource

This module allows the creation of Sapling transactions: shield, unshield and transfer. Because Sapling uses an UTXO model, it is necessary for the client to maintain locally the set of unspent outputs for each viewing key, for each smart contract. This operation is called scanning. This local cache is updated downloading from the node only the difference from the last scanned state.

Sourcemodule Tez : module type of Tezos_protocol_015_PtLimaPt.Protocol.Alpha_context.Tez
Sourcemodule Shielded_tez : sig ... end

This module is used to represent any shielded token to avoid confusing it with Tez.

Sourceval sapling_transaction_as_arg : Tezos_sapling.Core.Client.UTXO.transaction -> string

Convert a Sapling transaction to a suitable argument for the Smart Contract.

Sourcemodule Account : sig ... end

Account corresponding to a contract and a viewing key

Sourcemodule Contract_state : sig ... end

State of a contract, potentially involving several viewing keys

Sourcemodule Client_state : sig ... end
Sourceval shield : Tezos_client_base.Client_context.full -> dst:Tezos_sapling.Core.Client.Viewing_key.address -> ?message:bytes -> Tez.t -> Contract_state.t -> string -> Tezos_sapling.Core.Client.UTXO.transaction Tezos_base.TzPervasives.tzresult Lwt.t

shield ~message ~dst tez cstate anti-replay returns a transaction shielding tez tez to a sapling address dst using a sapling storage cstate and the anti-replay string.

Sourceval unshield : src:Tezos_sapling.Core.Client.Spending_key.t -> bound_data:string -> backdst:Tezos_sapling.Core.Client.Viewing_key.address -> Shielded_tez.t -> Contract_state.t -> string -> Tezos_sapling.Core.Client.UTXO.transaction Tezos_base.TzPervasives.tzresult

unshield ~src_name ~src ~dst ~backdst stez cstate storage returns a transaction unshielding stez shielded tokens from a sapling wallet src to a transparent tezos address dst, sending the change back to backdst and using a Sapling storage cstate and a anti-replay string. The transaction is refused if there is an insufficient amount of shielded tez in the wallet src, the error is raised with src_name.

Sourceval transfer : Tezos_client_base.Client_context.full -> src:Tezos_sapling.Core.Client.Spending_key.t -> dst:Tezos_sapling.Core.Client.Viewing_key.address -> backdst:Tezos_sapling.Core.Client.Viewing_key.address -> ?message:bytes -> Shielded_tez.t -> Contract_state.t -> string -> Tezos_sapling.Core.Client.UTXO.transaction Tezos_base.TzPervasives.tzresult Lwt.t

transfer ~message ~src ~dst ~backdst amount cstate anti-replay creates a Sapling transaction of amount shielded tez from Sapling wallet src to Sapling address dst, sending the change to backdst, using a Sapling storage cstate and a anti-replay string. ~message is a message that will be uploaded encrypted on chain.

OCaml

Innovation. Community. Security.