package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Contract_manager_storage/index.html
Module Tezos_raw_protocol_alpha.Contract_manager_storageSource
type Tezos_protocol_environment_alpha.Error_monad.error += | Unrevealed_manager_key of Contract_repr.t| Inconsistent_hash of {public_key : Tezos_protocol_environment_alpha.Signature.Public_key.t;expected_hash : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;provided_hash : Tezos_protocol_environment_alpha.Signature.Public_key_hash.t;
}| Previously_revealed_key of Contract_repr.t| Missing_manager_contract of Contract_repr.t
val init :
Raw_context.t ->
Contract_repr.t ->
Manager_repr.manager_key ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tinit 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_protocol_environment_alpha.Signature.Public_key_hash.t ->
bool Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tval check_public_key :
Tezos_protocol_environment_alpha.Signature.Public_key.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
unit Tezos_protocol_environment_alpha.Error_monad.tzresultcheck_publick_key pk pkh asserts that the provided pk is consistent with the expected public key hash pkh, otherwise fails with an Inconsistent_hash error.
val reveal_manager_key :
?check_consistency:bool ->
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Signature.Public_key.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.treveal_manager_key ?check_consistency ctxt manager pk reveals the public key pk for a given unrevealed manager. If the optional ?check_consistency flag is set (and it is set by default), it will re-check the same consistency checks than check_public_key above, otherwise it will assume manager is indeed the hash of pk. It is expected to fail with Previously_revealed_key contract if manager was already revealed, and with Inconsistent_hash if the (unrevealed) manager doesn't match the expected hash of the implicit contract associated to pk.
val get_manager_key :
?error:Tezos_protocol_environment_alpha.Error_monad.error ->
Raw_context.t ->
Tezos_protocol_environment_alpha.Signature.Public_key_hash.t ->
Tezos_protocol_environment_alpha.Signature.Public_key.t
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tget_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.