Module Injector_protocol.Make

Parameters

Signature

type proto_client = (module Injector_sigs.PROTOCOL_CLIENT with type operation = Parameters.Operation.t and type state = Parameters.state)

Register a protocol client for a specific protocol to be used by the injector.

val proto_client_for_protocol : Mavryk_base.TzPervasives.Protocol_hash.t -> proto_client

Return the protocol client for a given protocol.

  • raises Protocol_not_found

    if the protocol is not known by the injector. In this case the injector will not be able to inject operations in blocks of this protocol.

val registered_proto_clients : unit -> (Mavryk_base.TzPervasives.Protocol_hash.t * proto_client) list

Returns the list of protocol clients registered.

val check_registered_proto_clients : Parameters.state -> (unit, Mavryk_base.TzPervasives.tztrace) Stdlib.result

Runs the checks functions on all registered protocol clients for the injector.