package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type Tezos_protocol_environment_alpha__Environment.Error_monad.error +=
  1. | Unrevealed_manager_key of Contract_repr.t
  2. | Inconsistent_hash of {
    1. public_key : Tezos_crypto.Signature.public_key;
    2. expected_hash : Tezos_crypto.Signature.public_key_hash;
    3. provided_hash : Tezos_crypto.Signature.public_key_hash;
    }
  3. | Previously_revealed_key of Contract_repr.t
val init : Raw_context.t -> Contract_repr.t -> Manager_repr.manager_key -> (Raw_context.t, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t

init ctxt contract manager associates manager to contract. This function is undefined if contract has already a manager associated to it.

val is_manager_key_revealed : Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> (bool, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t
val reveal_manager_key : Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> Tezos_crypto.Signature.public_key -> (Raw_context.t, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t
val get_manager_key : ?error:Tezos_protocol_environment_alpha__Environment.Error_monad.error -> Raw_context.t -> Tezos_crypto.Signature.public_key_hash -> (Tezos_crypto.Signature.public_key, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t

get_manager_key ?error ctxt pkh returns the revealed manager key of the contract represented by pkh. When error is not provided this function fails with "get_manager_key" error if pkh does not have a manager, and with Unrevealed_manager_key error if the manager has not revealed its key. When error is provided, the function fails with the provided error in both cases.

val remove_existing : Raw_context.t -> Contract_repr.t -> (Raw_context.t, Tezos_protocol_environment_alpha__Environment.Error_monad.error Tezos_protocol_environment_alpha__Environment.Error_monad.trace) Stdlib.result Lwt.t
OCaml

Innovation. Community. Security.