package tezos-mockup

  1. Overview
  2. Docs

Returns a mockup environment for the default protocol (which is the first in the list of registered protocol, cf Registration module).

val init_mockup_context_by_protocol_hash : cctxt:Tezos_client_base.Client_context.full -> protocol_hash:Tezos_crypto.Protocol_hash.t -> constants_overrides_json:Data_encoding.json option -> bootstrap_accounts_json:Data_encoding.json option -> (Tezos_mockup_registration.Registration.mockup_environment * Tezos_mockup_registration.Registration.mockup_context, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Returns a mockup environment for the specified protocol hash.

Load a mockup environment and initializes a protocol RPC context from a mockup base directory. If the protocol is specified, check that the loaded environment agrees with it.

val create_mockup : cctxt:Tezos_client_base.Client_context.full -> protocol_hash:Tezos_crypto.Protocol_hash.t -> constants_overrides_json:Data_encoding.json option -> bootstrap_accounts_json:Data_encoding.json option -> asynchronous:bool -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Initializes an on-disk mockup environment in base_dir for the specified protocol.

val overwrite_mockup : protocol_hash:Tezos_crypto.Protocol_hash.t -> chain_id:Tezos_crypto.Chain_id.t -> rpc_context:Tezos_protocol_environment.rpc_context -> base_dir:string -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Overwrites an on-disk mockup environment.

Base directory states

type base_dir_class =
  1. | Base_dir_does_not_exist
  2. | Base_dir_is_file
  3. | Base_dir_is_mockup
  4. | Base_dir_is_nonempty
  5. | Base_dir_is_empty
val pp_base_dir_class : Stdlib.Format.formatter -> base_dir_class -> unit
val classify_base_dir : string -> (base_dir_class, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Test whether base directory is a valid target for loading or creating a mockup environment.

OCaml

Innovation. Community. Security.