Module Proto

module Encoding : sig ... end
type 'a encoding = 'a Encoding.encoding = {
  1. json : 'a Json_encoding.encoding;
  2. bin : 'a Binary.Encoding.encoding;
}
type hex = Crypto.H.t
val hex_enc : hex Encoding.encoding
module A : sig ... end
type primitive = [
  1. | `parameter
  2. | `storage
  3. | `code
  4. | `False
  5. | `Elt
  6. | `Left
  7. | `None
  8. | `Pair
  9. | `Right
  10. | `Some
  11. | `True
  12. | `Unit
  13. | `PACK
  14. | `UNPACK
  15. | `BLAKE2B
  16. | `SHA256
  17. | `SHA512
  18. | `ABS
  19. | `ADD
  20. | `AMOUNT
  21. | `AND
  22. | `BALANCE
  23. | `CAR
  24. | `CDR
  25. | `CHECK_SIGNATURE
  26. | `COMPARE
  27. | `CONCAT
  28. | `CONS
  29. | `CREATE_ACCOUNT
  30. | `CREATE_CONTRACT
  31. | `IMPLICIT_ACCOUNT
  32. | `DIP
  33. | `DROP
  34. | `DUP
  35. | `EDIV
  36. | `EMPTY_MAP
  37. | `EMPTY_SET
  38. | `EQ
  39. | `EXEC
  40. | `FAILWITH
  41. | `GE
  42. | `GET
  43. | `GT
  44. | `HASH_KEY
  45. | `IF
  46. | `IF_CONS
  47. | `IF_LEFT
  48. | `IF_NONE
  49. | `INT
  50. | `LAMBDA
  51. | `LE
  52. | `LEFT
  53. | `LOOP
  54. | `LSL
  55. | `LSR
  56. | `LT
  57. | `MAP
  58. | `MEM
  59. | `MUL
  60. | `NEG
  61. | `NEQ
  62. | `NIL
  63. | `NONE
  64. | `NOT
  65. | `NOW
  66. | `OR
  67. | `PAIR
  68. | `PUSH
  69. | `RIGHT
  70. | `SIZE
  71. | `SOME
  72. | `SOURCE
  73. | `SENDER
  74. | `SELF
  75. | `STEPS_TO_QUOTA
  76. | `SUB
  77. | `SWAP
  78. | `TRANSFER_TOKENS
  79. | `SET_DELEGATE
  80. | `UNIT
  81. | `UPDATE
  82. | `XOR
  83. | `ITER
  84. | `LOOP_LEFT
  85. | `ADDRESS
  86. | `CONTRACT
  87. | `ISNAT
  88. | `CAST
  89. | `RENAME
  90. | `bool
  91. | `contract
  92. | `int
  93. | `key
  94. | `key_hash
  95. | `lambda
  96. | `list
  97. | `map
  98. | `big_map
  99. | `nat
  100. | `option
  101. | `or_
  102. | `pair
  103. | `set
  104. | `signature
  105. | `string
  106. | `bytes
  107. | `mutez
  108. | `timestamp
  109. | `unit
  110. | `operation
  111. | `address
  112. | `SLICE
  113. | `DIG
  114. | `DUG
  115. | `EMPTY_BIG_MAP
  116. | `APPLY
  117. | `chain_id
  118. | `CHAIN_ID
  119. | `LEVEL
  120. | `SELF_ADDRESS
  121. | `never
  122. | `NEVER
  123. | `UNPAIR
  124. | `VOTING_POWER
  125. | `TOTAL_VOTING_POWER
  126. | `KECCAK
  127. | `SHA3
  128. | `PAIRING_CHECK
  129. | `bls12_381_g1
  130. | `bls12_381_g2
  131. | `bls12_381_fr
  132. | `sapling_state
  133. | `sapling_transaction_deprecated
  134. | `SAPLING_EMPTY_STATE
  135. | `SAPLING_VERIFY_UPDATE
  136. | `ticket
  137. | `TICKET_DEPRECATED
  138. | `READ_TICKET
  139. | `SPLIT_TICKET
  140. | `JOIN_TICKETS
  141. | `GET_AND_UPDATE
  142. | `chest
  143. | `chest_key
  144. | `OPEN_CHEST
  145. | `VIEW
  146. | `view
  147. | `constant
  148. | `SUB_MUTEZ
  149. | `tx_rollup_l2_address
  150. | `MIN_BLOCK_TIME
  151. | `sapling_transaction
  152. | `EMIT
  153. | `Lambda_rec
  154. | `LAMBDA_REC
  155. | `TICKET
  156. | `BYTES
  157. | `NAT
]
val primitive_enc : primitive Encoding.encoding
val primitives : (string * primitive) list
type primitive_or_macro = [
  1. | primitive
  2. | `macro of string
]
val primitive_or_macro_enc : primitive_or_macro Encoding.encoding
type micheline =
  1. | Mint of A.zarith
  2. | Mstring of string
  3. | Mbytes of hex
  4. | Mprim of {
    1. prim : primitive_or_macro;
    2. args : micheline list;
    3. annots : string list;
    }
  5. | Mseq of micheline list
val micheline_enc : micheline Encoding.encoding
val prim : ?args:micheline list -> ?annots:string list -> primitive_or_macro -> micheline
type entrypoint =
  1. | EPdefault
  2. | EProot
  3. | EPdo
  4. | EPset
  5. | EPremove
  6. | EPnamed of string
val entrypoint_enc : entrypoint Encoding.encoding
type script_expr =
  1. | Micheline of micheline
  2. | Bytes of hex
val script_expr_enc : script_expr Encoding.encoding
type 'p parameters = {
  1. entrypoint : entrypoint;
  2. value : 'p;
}
val parameters_enc : 'p Encoding.encoding -> 'p parameters Encoding.encoding
type 'p contract_script = {
  1. code : 'p;
  2. storage : 'p;
}
val contract_script_enc : 'p Encoding.encoding -> 'p contract_script Encoding.encoding
type freezer_content = {
  1. fr_delegate : A.pkh;
  2. fr_cycle : A.uint32;
}
val freezer_content_enc : freezer_content Encoding.encoding
type freezer =
  1. | Legacy_rewards of freezer_content
  2. | Legacy_fees of freezer_content
  3. | Legacy_deposits of freezer_content
  4. | Deposits of A.pkh
val freezer_enc : freezer Encoding.encoding
type minted =
  1. | Nonce_revelation_rewards
  2. | Double_signing_evidence_rewards
  3. | Endorsing_rewards
  4. | Baking_rewards
  5. | Baking_bonuses
  6. | Subsidy
  7. | Invoice
val minted_enc : minted Encoding.encoding
type burned =
  1. | Storage_fees
  2. | Punishments
  3. | Lost_endorsing_rewards of {
    1. delegate : A.pkh;
    2. participation : bool;
    3. revelation : bool;
    }
val burned_enc : burned Encoding.encoding
type balance_update_base =
  1. | Contract of A.contract
  2. | Freezer of freezer
  3. | Accumulator of unit
  4. | Minted of minted
  5. | Burned of burned
  6. | Commitment of string
  7. | Ignore of string
val balance_update_base_enc : balance_update_base Encoding.encoding
type balance_update = {
  1. bu_change : A.zarith;
  2. bu_update : balance_update_base;
  3. bu_origin : string option;
}
val balance_update_enc : balance_update Encoding.encoding
type node_error = {
  1. err_kind : string option;
  2. err_id : string option;
  3. err_info : Json_repr.ezjsonm;
}
val node_error_enc : node_error Encoding.encoding
type 'p transaction_info = {
  1. amount : A.uint64;
  2. destination : A.contract;
  3. parameters : 'p parameters option;
}
val transaction_info_enc : 'p Encoding.encoding -> 'p transaction_info Encoding.encoding
type 'p origination_info = {
  1. balance : A.uint64;
  2. script : 'p contract_script;
}
val origination_info_enc : 'p Encoding.encoding -> 'p origination_info Encoding.encoding
type tx_rollup_commitment = {
  1. txrc_level : A.uint32;
  2. txrc_messages : A.tx_message_result_hash list;
  3. txrc_predecessor : A.tx_commitment_hash option;
  4. txrc_inbox_merkle_root : A.tx_inbox_hash;
}
val tx_rollup_commitment_enc : tx_rollup_commitment Encoding.encoding
type sc_rollup_commitment = {
  1. scrc_compressed_state : A.sc_state_hash;
  2. scrc_inbox_level : A.uint32;
  3. scrc_predecessor : A.sc_commitment_hash;
  4. scrc_number_of_messages : A.uint32;
  5. scrc_number_of_ticks : A.uint32;
}
val sc_rollup_commitment_enc : sc_rollup_commitment Encoding.encoding
type transfer_ticket = {
  1. tt_contents : script_expr;
  2. tt_type : script_expr;
  3. tt_ticketer : A.contract;
  4. tt_amount : A.uint64;
  5. tt_destination : A.contract;
  6. tt_entrypoint : entrypoint;
}
val transfer_ticket_enc : transfer_ticket Encoding.encoding
val unknown_kind_enc : string Encoding.encoding
type dal_slot = {
  1. ds_level : int;
  2. ds_index : int;
  3. ds_header : int;
}
val dal_slot_enc : dal_slot Encoding.encoding
type 'p manager_operation_kind =
  1. | Reveal of A.pk
  2. | Transaction of 'p transaction_info
  3. | Origination of 'p origination_info
  4. | Delegation of A.pkh option
  5. | Event of {
    1. type_ : micheline;
    2. payload : micheline;
    3. tag : string option;
    }
  6. | Constant of 'p
  7. | Deposits_limit of A.uint64 option
  8. | Increase_paid_storage of {
    1. amount : A.zarith;
    2. destination : A.contract;
    }
  9. | Update_consensus_key of A.pk
  10. | Tx_rollup_origination of unit
  11. | Tx_rollup_submit_batch of {
    1. rollup : A.tx_rollup_hash;
    2. content : hex;
    3. burn_limit : A.uint64 option;
    }
  12. | Tx_rollup_commit of {
    1. rollup : A.tx_rollup_hash;
    2. commitment : tx_rollup_commitment;
    }
  13. | Tx_rollup_return_bond of A.tx_rollup_hash
  14. | Tx_rollup_finalize_commitment of A.tx_rollup_hash
  15. | Tx_rollup_remove_commitment of A.tx_rollup_hash
  16. | Tx_rollup_rejection of unit
  17. | Tx_rollup_dispatch_tickets of unit
  18. | Transfer_ticket of transfer_ticket
  19. | Sc_rollup_originate of {
    1. pvm_kind : unit;
    2. boot_sector : string;
    3. origination_proof : string;
    4. parameters_ty : script_expr;
    }
  20. | Dal_publish of dal_slot
  21. | Sc_rollup_add_messages of {
    1. rollup : A.sc_rollup_hash;
    2. message : string list;
    }
  22. | Sc_rollup_cement of {
    1. rollup : A.sc_rollup_hash;
    2. commitment : A.sc_commitment_hash;
    }
  23. | Sc_rollup_publish of {
    1. rollup : A.sc_rollup_hash;
    2. commitment : sc_rollup_commitment;
    }
  24. | Sc_rollup_refute of {
    1. rollup : A.sc_rollup_hash;
    2. opponent : A.pkh;
    3. refutation : unit;
    }
  25. | Sc_rollup_timeout of {
    1. rollup : A.sc_rollup_hash;
    2. stakers : A.pkh * A.pkh;
    }
  26. | Sc_rollup_execute of {
    1. rollup : A.sc_rollup_hash;
    2. cemented_commitment : sc_rollup_commitment;
    3. output_proof : string;
    }
  27. | Sc_rollup_recover of A.sc_rollup_hash
  28. | Sc_rollup_dal_slot_subscribe of {
    1. rollup : A.sc_rollup_hash;
    2. slot_index : int;
    }
  29. | Unknown of string
val manager_operation_kind_enc : 'p Encoding.encoding -> 'p manager_operation_kind Encoding.encoding
type manager_operation_numbers = {
  1. fee : A.uint64;
  2. counter : A.zarith;
  3. gas_limit : A.zarith;
  4. storage_limit : A.zarith;
}
val manager_operation_numbers_enc : manager_operation_numbers Encoding.encoding
type 'kind manager_operation_info_gen = {
  1. source : A.contract;
  2. kind : 'kind;
}
val manager_operation_info_gen_enc : 'kind Encoding.encoding -> 'kind manager_operation_info_gen Encoding.encoding
type 'p manager_operation_info = 'p manager_operation_kind manager_operation_info_gen
val manager_operation_info_enc : 'p Encoding.encoding -> 'p manager_operation_info Encoding.encoding
type big_map_update = {
  1. bm_key_hash : A.script_expr_hash;
  2. bm_key : micheline;
  3. bm_value : micheline option;
}
val big_map_update_enc : big_map_update Encoding.encoding
type big_map_diff =
  1. | SDUpdate of big_map_update list
  2. | SDRemove
  3. | SDCopy of {
    1. source : string;
    2. updates : big_map_update list;
    }
  4. | SDAlloc of {
    1. updates : big_map_update list;
    2. key_type : micheline;
    3. value_type : micheline;
    }
val big_map_diff_enc : big_map_diff Encoding.encoding
type storage_diff_item =
  1. | Big_map of {
    1. id : A.zarith;
    2. diff : big_map_diff;
    }
  2. | Sapling_state of unit
val storage_diff_item_enc : storage_diff_item Encoding.encoding
type op_status = [
  1. | `applied
  2. | `failed
  3. | `skipped
  4. | `backtracked
]
val op_status_enc : op_status Encoding.encoding
type op_metadata = {
  1. op_status : op_status;
  2. op_consumed_milligas : A.zarith;
  3. op_balance_updates : balance_update list;
  4. op_allocated_destination_contract : bool;
  5. op_originated_contracts : A.contract list;
  6. op_storage_size : A.zarith;
  7. op_storage : micheline option;
  8. op_paid_storage_size_diff : A.zarith;
  9. op_lazy_storage_diff : storage_diff_item list;
  10. op_errors : node_error list;
  11. op_originated_rollup : A.tx_rollup_hash option;
  12. op_global_address : A.script_expr_hash option;
}
val op_metadata_enc : op_metadata Encoding.encoding
type internal_manager_operation = {
  1. in_content : micheline manager_operation_info;
  2. in_nonce : A.uint32;
  3. in_result : op_metadata;
}
val internal_manager_operation_enc : internal_manager_operation Encoding.encoding
type manager_metadata = {
  1. man_balance_updates : balance_update list;
  2. man_operation_result : op_metadata;
  3. man_internal_operation_results : internal_manager_operation list;
}
val manager_metadata_enc : manager_metadata Encoding.encoding
type 'kind manager_operation_gen = {
  1. man_info : 'kind manager_operation_info_gen;
  2. man_numbers : manager_operation_numbers;
  3. man_metadata : manager_metadata option;
}
val manager_operation_gen_enc : 'kind Encoding.encoding -> 'kind manager_operation_gen Encoding.encoding
type 'p manager_operation = 'p manager_operation_kind manager_operation_gen
val manager_operation_enc : 'p Encoding.encoding -> 'p manager_operation Encoding.encoding
type 'a block_operation = {
  1. op_protocol : A.protocol_hash;
  2. op_chain_id : A.chain_id;
  3. op_hash : A.operation_hash;
  4. op_branch : A.block_hash;
  5. op_contents : 'a list;
  6. op_signature : A.signature option;
}
val block_operation_enc : 'a Encoding.encoding -> 'a block_operation Encoding.encoding
type fitness = {
  1. fit_version : A.uint32;
  2. fit_level : A.uint32;
  3. fit_pred_round : A.uint32;
  4. fit_round : A.uint32;
  5. fit_locked : A.uint32 option;
}
val fitness_enc : fitness Encoding.encoding
type shell = {
  1. level : A.uint32;
  2. proto : A.uint32;
  3. predecessor : A.block_hash;
  4. timestamp : A.timestamp;
  5. validation_pass : A.uint32;
  6. operations_hash : A.operations_hash;
  7. fitness : fitness;
  8. context : A.context_hash;
}
val shell_enc : shell Encoding.encoding
type header = {
  1. shell : shell;
  2. proof_of_work_nonce : hex;
  3. seed_nonce_hash : A.nonce_hash option;
  4. signature : A.signature;
}
val header_enc : header Encoding.encoding
type level = {
  1. nl_level : A.uint32;
  2. nl_level_position : A.uint32;
  3. nl_cycle : A.uint32;
  4. nl_cycle_position : A.uint32;
  5. nl_expected_commitment : bool;
}
val level_enc : level Encoding.encoding
type metadata = {
  1. meta_baker : A.pkh;
  2. meta_level : level;
  3. meta_nonce_hash : A.nonce_hash option;
  4. meta_consumed_gas : A.uint64;
  5. meta_consumed_milligas : A.uint64;
  6. meta_deactivated : string list;
  7. meta_balance_updates : balance_update list;
}
val metadata_enc : metadata Encoding.encoding
type 'a block0 = {
  1. protocol : A.protocol_hash;
  2. chain_id : A.chain_id;
  3. hash : A.block_hash;
  4. header : header;
  5. metadata : metadata option;
  6. operations : 'a;
}
val block0_enc : 'a Encoding.encoding -> 'a block0 Encoding.encoding
type block = A.operation_hash list block0
val block_enc : block Encoding.encoding
val full_block_enc : full_block Encoding.encoding
type account = {
  1. ac_balance : A.uint64;
  2. ac_delegate : A.pkh option;
  3. ac_script : micheline contract_script option;
  4. ac_counter : A.zarith option;
}
val account_enc : account Encoding.encoding
val time_between_blocks_enc : float Encoding.encoding
type constants = {
  1. hard_gas_limit_per_operation : A.zarith;
  2. hard_gas_limit_per_block : A.zarith;
  3. hard_storage_limit_per_operation : A.zarith;
  4. time_between_blocks : float;
}
val constants_enc : constants Encoding.encoding