Mavryk_mockup.Persistence
include Persistence_intf.S
val get_registered_mockup :
Mavryk_base.TzPervasives.Protocol_hash.t option ->
Mavryk_client_base.Client_context.printer ->
Mavryk_mockup_registration.Registration.mockup_environment
Mavryk_base.TzPervasives.tzresult
Lwt.t
val default_mockup_context :
Mavryk_client_base.Client_context.printer ->
(Mavryk_mockup_registration.Registration.mockup_environment
* Mavryk_mockup_registration.Registration.mockup_context)
Mavryk_base.TzPervasives.tzresult
Lwt.t
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:Mavryk_client_base.Client_context.printer ->
protocol_hash:Mavryk_base.TzPervasives.Protocol_hash.t ->
constants_overrides_json:Mavryk_base.TzPervasives.Data_encoding.json option ->
bootstrap_accounts_json:Mavryk_base.TzPervasives.Data_encoding.json option ->
(Mavryk_mockup_registration.Registration.mockup_environment
* Mavryk_mockup_registration.Registration.mockup_context)
Mavryk_base.TzPervasives.tzresult
Lwt.t
Returns a mockup environment for the specified protocol hash.
val get_mockup_context_from_disk :
base_dir:string ->
protocol_hash:Mavryk_base.TzPervasives.Protocol_hash.t option ->
Mavryk_client_base.Client_context.printer ->
(Mavryk_mockup_registration.Registration.mockup_environment
* Mavryk_mockup_registration.Registration.mockup_context)
Mavryk_base.TzPervasives.tzresult
Lwt.t
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:Mavryk_client_base.Client_context.full ->
protocol_hash:Mavryk_base.TzPervasives.Protocol_hash.t ->
constants_overrides_json:Mavryk_base.TzPervasives.Data_encoding.json option ->
bootstrap_accounts_json:Mavryk_base.TzPervasives.Data_encoding.json option ->
asynchronous:bool ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
Initializes an on-disk mockup environment in base_dir
for the specified protocol.
val overwrite_mockup :
protocol_hash:Mavryk_base.TzPervasives.Protocol_hash.t ->
chain_id:Mavryk_base.TzPervasives.Chain_id.t ->
rpc_context:Mavryk_protocol_environment.rpc_context ->
protocol_data:bytes ->
base_dir:string ->
unit Mavryk_base.TzPervasives.tzresult Lwt.t
Overwrites an on-disk mockup environment.
val pp_base_dir_class : Stdlib.Format.formatter -> base_dir_class -> unit
val classify_base_dir :
string ->
base_dir_class Mavryk_base.TzPervasives.tzresult Lwt.t
Test whether base directory is a valid target for loading or creating a mockup environment.
module type S = Persistence_intf.S
module Internal_for_tests : sig ... end