Module Mina_generators.Zkapp_command_generators

type failure =
| Invalid_account_precondition
| Invalid_protocol_state_precondition
| Update_not_permitted of [ `Delegate | `App_state | `Voting_for | `Verification_key | `Zkapp_uri | `Token_symbol | `Send | `Receive ]
type role = [
| `Fee_payer
| `New_account
| `Ordinary_participant
| `New_token_account
]
val max_account_updates : int
val max_token_updates : int
val gen_account_precondition_from_account : ?failure:failure -> first_use_of_account:bool -> Mina_base.Account.t -> Mina_base.Account_update.Account_precondition.t Core_kernel.Quickcheck.Generator.t
val gen_protocol_state_precondition : Mina_base.Zkapp_precondition.Protocol_state.View.t -> Mina_base.Zkapp_precondition.Protocol_state.t Core_kernel.Quickcheck.Generator.t
val gen_zkapp_command_from : ?failure:failure -> ?max_account_updates:int -> ?max_token_updates:int -> fee_payer_keypair:Signature_lib.Keypair.t -> keymap:Signature_lib.Private_key.t Signature_lib.Public_key.Compressed.Map.t -> ?account_state_tbl:(Mina_base.Account.t * role) Mina_base.Account_id.Table.t -> ledger:Mina_ledger.Ledger.t -> ?protocol_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t -> ?vk: ( Mina_base.Side_loaded_verification_key.t, Mina_base.State_hash.t ) With_hash.Stable.V1.t -> unit -> Mina_base.Zkapp_command.t Core_kernel.Quickcheck.Generator.t

`gen_zkapp_command_from` generates a zkapp_command and record the change of accounts accordingly in `account_state_tbl`. Note that `account_state_tbl` is optional. If it's not provided then it would be computed from the ledger. If you plan to generate several zkapp_command, then please manually pass `account_state_tbl` to `gen_zkapp_command_from` function. If you are generating several zkapp_command, it's better to pre-compute the `account_state_tbl` before you call this function. This way you can manually set the role of fee payer accounts to be `Fee_payer` in `account_state_tbl` which would prevent those accounts being used as ordinary participants in other zkapp_command.

Generated zkapp_command uses dummy signatures and dummy proofs.

val gen_list_of_zkapp_command_from : ?failure:failure -> ?max_account_updates:int -> ?max_token_updates:int -> fee_payer_keypairs:Signature_lib.Keypair.t list -> keymap:Signature_lib.Private_key.t Signature_lib.Public_key.Compressed.Map.t -> ?account_state_tbl:(Mina_base.Account.t * role) Mina_base.Account_id.Table.t -> ledger:Mina_ledger.Ledger.t -> ?protocol_state_view:Mina_base.Zkapp_precondition.Protocol_state.View.t -> ?vk: ( Mina_base.Side_loaded_verification_key.t, Mina_base.State_hash.t ) With_hash.Stable.V1.t -> ?length:int -> unit -> Mina_base.Zkapp_command.t list Core_kernel.Quickcheck.Generator.t

Generate a list of zkapp_command, `fee_payer_keypairs` contains a list of possible fee payers