algonaut_algod 0.6.0

API endpoint for algod operations.
Documentation
/*
 * Algod REST API.
 *
 * API endpoint for algod operations.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: contact@algorand.com
 *
 * NOTE: This struct was originally generated by openapi-generator and
 * has been extended by hand to cover the simulate-endpoint power-pack
 * fields the upstream spec at HEAD now publishes (see ADR
 * `simulaterequest-model-needs-power-pack-fields`). Re-running the
 * generator must preserve these additive fields.
 */

/// SimulateRequest : Request type for simulation endpoint.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SimulateRequest {
    /// The transaction groups to simulate.
    #[serde(rename = "txn-groups")]
    pub txn_groups: Vec<crate::models::SimulateRequestTransactionGroup>,

    /// Lift the per-app log-call and per-app log-size limits during the
    /// simulation. The response echoes the override in
    /// `eval-overrides.max-log-calls` / `max-log-size`.
    #[serde(rename = "allow-more-logging", skip_serializing_if = "Option::is_none")]
    pub allow_more_logging: Option<bool>,

    /// Allow transactions without signatures to be simulated as if they
    /// were properly signed.
    #[serde(
        rename = "allow-empty-signatures",
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_empty_signatures: Option<bool>,

    /// Allow access to (and reporting on) unnamed resources for
    /// foreign-app / foreign-asset / account references.
    #[serde(
        rename = "allow-unnamed-resources",
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_unnamed_resources: Option<bool>,

    /// Apply extra opcode budget for every transaction group call.
    #[serde(
        rename = "extra-opcode-budget",
        skip_serializing_if = "Option::is_none"
    )]
    pub extra_opcode_budget: Option<u64>,

    /// Execution trace configuration to apply across the simulation.
    #[serde(rename = "exec-trace-config", skip_serializing_if = "Option::is_none")]
    pub exec_trace_config: Option<Box<crate::models::SimulateTraceConfig>>,

    /// Simulate the transaction(s) at a specific past round. Omit to use
    /// the most recently committed round.
    #[serde(rename = "round", skip_serializing_if = "Option::is_none")]
    pub round: Option<u64>,

    /// If a transaction is rejected because its sender is rekeyed,
    /// replay it with the auth-address (rather than failing).
    #[serde(rename = "fix-signers", skip_serializing_if = "Option::is_none")]
    pub fix_signers: Option<bool>,
}

impl SimulateRequest {
    /// Request type for simulation endpoint.
    pub fn new(txn_groups: Vec<crate::models::SimulateRequestTransactionGroup>) -> SimulateRequest {
        SimulateRequest {
            txn_groups,
            allow_more_logging: None,
            allow_empty_signatures: None,
            allow_unnamed_resources: None,
            extra_opcode_budget: None,
            exec_trace_config: None,
            round: None,
            fix_signers: None,
        }
    }
}