Library
Module
Module type
Parameter
Class
Class type
type signer = {
alias : string;
pkh : Tezos_crypto.Signature.public_key_hash;
pk : Tezos_crypto.Signature.public_key;
sk : Tezos_client_base.Client_keys.sk_uri;
}
The type of signers for operations injected by the injector
type 'block reorg = {
old_chain : 'block list;
(*The blocks that were in the old chain and which are not in the new one.
*)new_chain : 'block list;
(*The blocks that are now in the new chain. The length of
*)old_chain
andnew_chain
may be different.
}
Type of chain reorganizations.
val get_signer :
Tezos_client_base.Client_context.wallet ->
Tezos_crypto.Signature.public_key_hash ->
signer Tezos_base.TzPervasives.tzresult Lwt.t
Retrieve a signer from the client wallet.
val no_reorg : 'a reorg
val reorg_encoding :
'a Tezos_base.TzPervasives.Data_encoding.t ->
'a reorg Tezos_base.TzPervasives.Data_encoding.t
type block_info :=
Tezos_client_alpha.Protocol_client_context.Alpha_block_services.block_info
val fetch_tezos_block :
find_in_cache:
(Tezos_crypto.Block_hash.t ->
(Tezos_crypto.Block_hash.t -> block_info option Lwt.t) ->
block_info option Lwt.t) ->
Tezos_client_alpha.Protocol_client_context.full ->
Tezos_crypto.Block_hash.t ->
block_info Tezos_base.TzPervasives.tzresult Lwt.t
fetch_tezos_block ~find_in_cache cctxt hash
returns Some block_info
given a block hash. Looks for the block using find_in_cache
first, and fetches it from the L1 node otherwise. Returns None
if no such block hash exists. find_in_cache
should be from an instance of Ringo_lwt.Sigs.CACHE_MAP_RESULT
.
val tezos_reorg :
(Tezos_crypto.Block_hash.t ->
block_info Tezos_base.TzPervasives.tzresult Lwt.t) ->
old_head_hash:Tezos_crypto.Block_hash.t ->
new_head_hash:Tezos_crypto.Block_hash.t ->
block_info reorg Tezos_base.TzPervasives.tzresult Lwt.t
tezos_reorg fetch ~old_head_hash ~new_head_hash
computes the reorganization of L1 blocks from the chain whose head is old_head_hash
and the chain whose head new_head_hash
.