package tezt-tezos

  1. Overview
  2. Docs
type t

A representation of a consensus operation.

val dal_attestation : attestation:bool array -> level:int -> t

dal_attestation ~attestation ~level crafts a slot attestation operation to attest at level slot headers published at level level - attestation_lag. For each slot, the value of the booleans indicates whether the data is deemed available.

val consensus : use_legacy_name:bool -> kind:consensus_kind -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

consensus ~kind ~use_legacy_name ~level ~round ~slot ~block_payload_hash crafts a consensus operation with the kind at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "(pre)endorsement" instead of "(pre)attestation".

val preattestation : use_legacy_name:bool -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

preattestation ?use_legacy_name ~level ~round ~slot ~block_payload_hash crafts a preattestation operation at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "preendorsement" instead of "preattestation".

val attestation : use_legacy_name:bool -> slot:int -> level:int -> round:int -> block_payload_hash:string -> t

attestation ?use_legacy_name ~level ~round ~slot ~block_payload_hash crafts an attestation operation at level on the round with the slot and block_payload_hash. If use_legacy_name is set, the kind field in the crafted JSON will be "endorsement" instead of "attestation".

val kind_to_string : consensus_kind -> bool -> string

kind_to_string kind use_legacy_name return the name of the kind. If use_legacy_name is set, the name corresponding to the kind will be "(pre)endorsement" instead of "(pre)attestation".

val operation : ?branch:string -> ?chain_id:string -> signer:Account.key -> t -> Client.t -> operation Lwt.t

operation constructs an operation from a consensus operation. the client is used to fetch the branch and the chain_id.

val inject : ?request:[ `Inject | `Notify ] -> ?force:bool -> ?branch:string -> ?chain_id:string -> ?error:Tezt.Base.rex -> signer:Account.key -> t -> Client.t -> [ `OpHash of string ] Lwt.t

A wrapper for inject with consensus operations. The client is used to get all the data that was not provided if it can be recovered via RPCs. Mainly those are the branch and the chain_id.

OCaml

Innovation. Community. Security.