algokit-utils 5.0.0a3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- algokit_abi/__init__.py +9 -0
- algokit_abi/_arc32_to_arc56.py +242 -0
- algokit_abi/_arc56_serde.py +161 -0
- algokit_abi/abi.py +667 -0
- algokit_abi/arc32.py +210 -0
- algokit_abi/arc56.py +821 -0
- algokit_abi/py.typed +0 -0
- algokit_algo25/__init__.py +38 -0
- algokit_algo25/_encoding.py +46 -0
- algokit_algo25/_wordlist.py +2065 -0
- algokit_algo25/exceptions.py +29 -0
- algokit_algo25/mnemonic.py +128 -0
- algokit_algo25/py.typed +0 -0
- algokit_algod_client/__init__.py +10 -0
- algokit_algod_client/client.py +1585 -0
- algokit_algod_client/config.py +36 -0
- algokit_algod_client/exceptions.py +59 -0
- algokit_algod_client/models/__init__.py +229 -0
- algokit_algod_client/models/_account.py +150 -0
- algokit_algod_client/models/_account_application_response.py +25 -0
- algokit_algod_client/models/_account_asset_response.py +25 -0
- algokit_algod_client/models/_account_participation.py +53 -0
- algokit_algod_client/models/_account_state_delta.py +30 -0
- algokit_algod_client/models/_allocations_for_genesis_file.py +23 -0
- algokit_algod_client/models/_allocations_for_genesis_file_state_model.py +42 -0
- algokit_algod_client/models/_application.py +23 -0
- algokit_algod_client/models/_application_initial_states.py +37 -0
- algokit_algod_client/models/_application_kvstorage.py +29 -0
- algokit_algod_client/models/_application_local_state.py +33 -0
- algokit_algod_client/models/_application_params.py +63 -0
- algokit_algod_client/models/_application_state_operation.py +41 -0
- algokit_algod_client/models/_application_state_schema.py +22 -0
- algokit_algod_client/models/_asset.py +23 -0
- algokit_algod_client/models/_asset_holding.py +29 -0
- algokit_algod_client/models/_asset_params.py +102 -0
- algokit_algod_client/models/_avm_key_value.py +28 -0
- algokit_algod_client/models/_avm_value.py +32 -0
- algokit_algod_client/models/_block.py +363 -0
- algokit_algod_client/models/_block_hash_response.py +14 -0
- algokit_algod_client/models/_block_txids_response.py +14 -0
- algokit_algod_client/models/_box.py +36 -0
- algokit_algod_client/models/_box_descriptor.py +24 -0
- algokit_algod_client/models/_boxes_response.py +21 -0
- algokit_algod_client/models/_build_version_contains_the_current_algod_build_version_information.py +34 -0
- algokit_algod_client/models/_compile_response.py +24 -0
- algokit_algod_client/models/_disassemble_response.py +14 -0
- algokit_algod_client/models/_error_response.py +22 -0
- algokit_algod_client/models/_eval_delta.py +32 -0
- algokit_algod_client/models/_eval_delta_key_value.py +28 -0
- algokit_algod_client/models/_genesis_file_in_json.py +53 -0
- algokit_algod_client/models/_get_block_time_stamp_offset_response.py +14 -0
- algokit_algod_client/models/_get_sync_round_response.py +14 -0
- algokit_algod_client/models/_ledger_state_delta.py +389 -0
- algokit_algod_client/models/_light_block_header_proof.py +32 -0
- algokit_algod_client/models/_node_status_response.py +118 -0
- algokit_algod_client/models/_pending_transaction_response.py +91 -0
- algokit_algod_client/models/_pending_transactions_response.py +29 -0
- algokit_algod_client/models/_post_transactions_response.py +14 -0
- algokit_algod_client/models/_scratch_change.py +23 -0
- algokit_algod_client/models/_serde_helpers.py +241 -0
- algokit_algod_client/models/_simulate_initial_states.py +25 -0
- algokit_algod_client/models/_simulate_request.py +54 -0
- algokit_algod_client/models/_simulate_request_transaction_group.py +25 -0
- algokit_algod_client/models/_simulate_response.py +44 -0
- algokit_algod_client/models/_simulate_trace_config.py +30 -0
- algokit_algod_client/models/_simulate_transaction_group_result.py +46 -0
- algokit_algod_client/models/_simulate_transaction_result.py +41 -0
- algokit_algod_client/models/_simulate_unnamed_resources_accessed.py +64 -0
- algokit_algod_client/models/_simulation_eval_overrides.py +40 -0
- algokit_algod_client/models/_simulation_opcode_trace_unit.py +55 -0
- algokit_algod_client/models/_simulation_transaction_exec_trace.py +82 -0
- algokit_algod_client/models/_source_map.py +30 -0
- algokit_algod_client/models/_state_delta.py +6 -0
- algokit_algod_client/models/_state_proof.py +28 -0
- algokit_algod_client/models/_state_proof_message.py +44 -0
- algokit_algod_client/models/_supply_response.py +26 -0
- algokit_algod_client/models/_teal_key_value.py +28 -0
- algokit_algod_client/models/_teal_key_value_store.py +6 -0
- algokit_algod_client/models/_teal_value.py +32 -0
- algokit_algod_client/models/_transaction_group_ledger_state_deltas_for_round_response.py +21 -0
- algokit_algod_client/models/_transaction_parameters_response.py +45 -0
- algokit_algod_client/models/_transaction_proof.py +44 -0
- algokit_algod_client/models/_version_contains_the_current_algod_version.py +38 -0
- algokit_algod_client/models/suggested_params.py +42 -0
- algokit_algod_client/py.typed +1 -0
- algokit_algod_client/types.py +7 -0
- algokit_algosdk/__init__.py +38 -0
- algokit_algosdk/account.py +32 -0
- algokit_algosdk/app_access.py +228 -0
- algokit_algosdk/box_reference.py +100 -0
- algokit_algosdk/constants.py +147 -0
- algokit_algosdk/encoding.py +89 -0
- algokit_algosdk/error.py +180 -0
- algokit_algosdk/logic.py +61 -0
- algokit_algosdk/logicsig.py +218 -0
- algokit_algosdk/mnemonic.py +216 -0
- algokit_algosdk/multisig.py +161 -0
- algokit_algosdk/py.typed +0 -0
- algokit_algosdk/transaction.py +596 -0
- algokit_algosdk/wordlist.py +2054 -0
- algokit_common/__init__.py +50 -0
- algokit_common/address.py +34 -0
- algokit_common/constants.py +47 -0
- algokit_common/hashing.py +25 -0
- algokit_common/py.typed +0 -0
- algokit_common/serde/__init__.py +40 -0
- algokit_common/serde/_core.py +610 -0
- algokit_common/serde/_primitives.py +135 -0
- algokit_common/source_map.py +158 -0
- algokit_indexer_client/__init__.py +10 -0
- algokit_indexer_client/client.py +1456 -0
- algokit_indexer_client/config.py +36 -0
- algokit_indexer_client/exceptions.py +59 -0
- algokit_indexer_client/models/__init__.py +148 -0
- algokit_indexer_client/models/_account.py +161 -0
- algokit_indexer_client/models/_account_participation.py +53 -0
- algokit_indexer_client/models/_account_response.py +19 -0
- algokit_indexer_client/models/_account_state_delta.py +29 -0
- algokit_indexer_client/models/_accounts_response.py +29 -0
- algokit_indexer_client/models/_application.py +35 -0
- algokit_indexer_client/models/_application_local_state.py +45 -0
- algokit_indexer_client/models/_application_local_states_response.py +29 -0
- algokit_indexer_client/models/_application_log_data.py +28 -0
- algokit_indexer_client/models/_application_logs_response.py +33 -0
- algokit_indexer_client/models/_application_params.py +62 -0
- algokit_indexer_client/models/_application_response.py +20 -0
- algokit_indexer_client/models/_application_state_schema.py +22 -0
- algokit_indexer_client/models/_applications_response.py +29 -0
- algokit_indexer_client/models/_asset.py +35 -0
- algokit_indexer_client/models/_asset_balances_response.py +29 -0
- algokit_indexer_client/models/_asset_holding.py +41 -0
- algokit_indexer_client/models/_asset_holdings_response.py +29 -0
- algokit_indexer_client/models/_asset_params.py +102 -0
- algokit_indexer_client/models/_asset_response.py +19 -0
- algokit_indexer_client/models/_assets_response.py +29 -0
- algokit_indexer_client/models/_block.py +150 -0
- algokit_indexer_client/models/_block_headers_response.py +29 -0
- algokit_indexer_client/models/_block_rewards.py +38 -0
- algokit_indexer_client/models/_block_upgrade_state.py +34 -0
- algokit_indexer_client/models/_block_upgrade_vote.py +26 -0
- algokit_indexer_client/models/_box.py +36 -0
- algokit_indexer_client/models/_box_descriptor.py +24 -0
- algokit_indexer_client/models/_box_reference.py +28 -0
- algokit_indexer_client/models/_boxes_response.py +29 -0
- algokit_indexer_client/models/_error_response.py +18 -0
- algokit_indexer_client/models/_eval_delta.py +32 -0
- algokit_indexer_client/models/_eval_delta_key_value.py +28 -0
- algokit_indexer_client/models/_hash_factory.py +14 -0
- algokit_indexer_client/models/_hb_proof_fields.py +57 -0
- algokit_indexer_client/models/_health_check.py +42 -0
- algokit_indexer_client/models/_holding_ref.py +23 -0
- algokit_indexer_client/models/_indexer_state_proof_message.py +40 -0
- algokit_indexer_client/models/_locals_ref.py +23 -0
- algokit_indexer_client/models/_merkle_array_proof.py +29 -0
- algokit_indexer_client/models/_mini_asset_holding.py +38 -0
- algokit_indexer_client/models/_on_completion.py +25 -0
- algokit_indexer_client/models/_participation_updates.py +22 -0
- algokit_indexer_client/models/_resource_ref.py +42 -0
- algokit_indexer_client/models/_serde_helpers.py +241 -0
- algokit_indexer_client/models/_state_delta.py +6 -0
- algokit_indexer_client/models/_state_proof_fields.py +57 -0
- algokit_indexer_client/models/_state_proof_participant.py +20 -0
- algokit_indexer_client/models/_state_proof_reveal.py +25 -0
- algokit_indexer_client/models/_state_proof_sig_slot.py +20 -0
- algokit_indexer_client/models/_state_proof_signature.py +37 -0
- algokit_indexer_client/models/_state_proof_tracking.py +32 -0
- algokit_indexer_client/models/_state_proof_verifier.py +24 -0
- algokit_indexer_client/models/_state_schema.py +25 -0
- algokit_indexer_client/models/_teal_key_value.py +28 -0
- algokit_indexer_client/models/_teal_key_value_store.py +6 -0
- algokit_indexer_client/models/_teal_value.py +32 -0
- algokit_indexer_client/models/_transaction.py +213 -0
- algokit_indexer_client/models/_transaction_application.py +105 -0
- algokit_indexer_client/models/_transaction_asset_config.py +31 -0
- algokit_indexer_client/models/_transaction_asset_freeze.py +29 -0
- algokit_indexer_client/models/_transaction_asset_transfer.py +41 -0
- algokit_indexer_client/models/_transaction_heartbeat.py +52 -0
- algokit_indexer_client/models/_transaction_keyreg.py +59 -0
- algokit_indexer_client/models/_transaction_payment.py +33 -0
- algokit_indexer_client/models/_transaction_response.py +19 -0
- algokit_indexer_client/models/_transaction_signature.py +35 -0
- algokit_indexer_client/models/_transaction_signature_logicsig.py +59 -0
- algokit_indexer_client/models/_transaction_signature_multisig.py +36 -0
- algokit_indexer_client/models/_transaction_signature_multisig_subsignature.py +28 -0
- algokit_indexer_client/models/_transaction_state_proof.py +32 -0
- algokit_indexer_client/models/_transactions_response.py +29 -0
- algokit_indexer_client/py.typed +1 -0
- algokit_indexer_client/types.py +7 -0
- algokit_kmd_client/__init__.py +10 -0
- algokit_kmd_client/client.py +1240 -0
- algokit_kmd_client/config.py +36 -0
- algokit_kmd_client/exceptions.py +59 -0
- algokit_kmd_client/models/__init__.py +112 -0
- algokit_kmd_client/models/_classical_signatures.py +4 -0
- algokit_kmd_client/models/_create_wallet_request.py +30 -0
- algokit_kmd_client/models/_create_wallet_response.py +19 -0
- algokit_kmd_client/models/_delete_key_request.py +27 -0
- algokit_kmd_client/models/_delete_multisig_request.py +27 -0
- algokit_kmd_client/models/_digest_represents_a32_byte_value_holding_the256_bit_hash_digest.py +4 -0
- algokit_kmd_client/models/_ed25519_public_key.py +4 -0
- algokit_kmd_client/models/_export_key_request.py +27 -0
- algokit_kmd_client/models/_export_key_response.py +24 -0
- algokit_kmd_client/models/_export_master_key_request.py +22 -0
- algokit_kmd_client/models/_export_master_key_response.py +18 -0
- algokit_kmd_client/models/_export_multisig_request.py +23 -0
- algokit_kmd_client/models/_export_multisig_response.py +26 -0
- algokit_kmd_client/models/_generate_key_request.py +18 -0
- algokit_kmd_client/models/_generate_key_response.py +19 -0
- algokit_kmd_client/models/_import_key_request.py +28 -0
- algokit_kmd_client/models/_import_key_response.py +19 -0
- algokit_kmd_client/models/_import_multisig_request.py +30 -0
- algokit_kmd_client/models/_import_multisig_response.py +19 -0
- algokit_kmd_client/models/_init_wallet_handle_token_request.py +22 -0
- algokit_kmd_client/models/_init_wallet_handle_token_response.py +18 -0
- algokit_kmd_client/models/_list_keys_request.py +18 -0
- algokit_kmd_client/models/_list_keys_response.py +18 -0
- algokit_kmd_client/models/_list_multisig_request.py +18 -0
- algokit_kmd_client/models/_list_multisig_response.py +18 -0
- algokit_kmd_client/models/_list_wallets_request.py +11 -0
- algokit_kmd_client/models/_list_wallets_response.py +25 -0
- algokit_kmd_client/models/_master_derivation_key.py +4 -0
- algokit_kmd_client/models/_multisig_sig.py +33 -0
- algokit_kmd_client/models/_multisig_subsig.py +23 -0
- algokit_kmd_client/models/_public_key.py +4 -0
- algokit_kmd_client/models/_release_wallet_handle_token_request.py +18 -0
- algokit_kmd_client/models/_rename_wallet_request.py +26 -0
- algokit_kmd_client/models/_rename_wallet_response.py +19 -0
- algokit_kmd_client/models/_renew_wallet_handle_token_request.py +18 -0
- algokit_kmd_client/models/_renew_wallet_handle_token_response.py +19 -0
- algokit_kmd_client/models/_serde_helpers.py +241 -0
- algokit_kmd_client/models/_sign_multisig_response.py +24 -0
- algokit_kmd_client/models/_sign_multisig_txn_request.py +45 -0
- algokit_kmd_client/models/_sign_program_multisig_request.py +50 -0
- algokit_kmd_client/models/_sign_program_multisig_response.py +24 -0
- algokit_kmd_client/models/_sign_program_request.py +37 -0
- algokit_kmd_client/models/_sign_program_response.py +24 -0
- algokit_kmd_client/models/_sign_transaction_response.py +24 -0
- algokit_kmd_client/models/_sign_txn_request.py +36 -0
- algokit_kmd_client/models/_signature.py +4 -0
- algokit_kmd_client/models/_tx_type.py +4 -0
- algokit_kmd_client/models/_versions_request.py +11 -0
- algokit_kmd_client/models/_versions_response.py +19 -0
- algokit_kmd_client/models/_wallet.py +38 -0
- algokit_kmd_client/models/_wallet_handle.py +24 -0
- algokit_kmd_client/models/_wallet_info_request.py +18 -0
- algokit_kmd_client/models/_wallet_info_response.py +19 -0
- algokit_kmd_client/py.typed +1 -0
- algokit_kmd_client/types.py +7 -0
- algokit_transact/__init__.py +190 -0
- algokit_transact/codec/__init__.py +0 -0
- algokit_transact/codec/msgpack.py +11 -0
- algokit_transact/codec/serde.py +7 -0
- algokit_transact/codec/signed.py +57 -0
- algokit_transact/codec/transaction.py +65 -0
- algokit_transact/exceptions.py +17 -0
- algokit_transact/logicsig.py +220 -0
- algokit_transact/models/__init__.py +0 -0
- algokit_transact/models/app_call.py +447 -0
- algokit_transact/models/asset_config.py +19 -0
- algokit_transact/models/asset_freeze.py +11 -0
- algokit_transact/models/asset_transfer.py +13 -0
- algokit_transact/models/common.py +17 -0
- algokit_transact/models/heartbeat.py +21 -0
- algokit_transact/models/key_registration.py +14 -0
- algokit_transact/models/payment.py +14 -0
- algokit_transact/models/signed_transaction.py +21 -0
- algokit_transact/models/state_proof.py +150 -0
- algokit_transact/models/transaction.py +88 -0
- algokit_transact/multisig.py +93 -0
- algokit_transact/ops/__init__.py +0 -0
- algokit_transact/ops/fees.py +47 -0
- algokit_transact/ops/group.py +28 -0
- algokit_transact/ops/ids.py +14 -0
- algokit_transact/ops/validate.py +503 -0
- algokit_transact/py.typed +0 -0
- algokit_transact/signer.py +195 -0
- algokit_transact/signing/__init__.py +0 -0
- algokit_transact/signing/logic_signature.py +19 -0
- algokit_transact/signing/multisig.py +84 -0
- algokit_transact/signing/types.py +39 -0
- algokit_transact/signing/validation.py +63 -0
- algokit_utils/__init__.py +23 -0
- algokit_utils/_debugging.py +304 -0
- algokit_utils/accounts/__init__.py +2 -0
- algokit_utils/accounts/account_manager.py +1051 -0
- algokit_utils/accounts/kmd_account_manager.py +206 -0
- algokit_utils/algo25.py +46 -0
- algokit_utils/algorand.py +383 -0
- algokit_utils/applications/__init__.py +7 -0
- algokit_utils/applications/abi.py +280 -0
- algokit_utils/applications/app_client.py +2193 -0
- algokit_utils/applications/app_deployer.py +788 -0
- algokit_utils/applications/app_factory.py +1140 -0
- algokit_utils/applications/app_manager.py +575 -0
- algokit_utils/applications/app_spec/__init__.py +6 -0
- algokit_utils/applications/enums.py +40 -0
- algokit_utils/assets/__init__.py +1 -0
- algokit_utils/assets/asset_manager.py +344 -0
- algokit_utils/clients/__init__.py +41 -0
- algokit_utils/clients/client_manager.py +756 -0
- algokit_utils/clients/dispenser_api_client.py +212 -0
- algokit_utils/common.py +40 -0
- algokit_utils/config.py +159 -0
- algokit_utils/errors/__init__.py +1 -0
- algokit_utils/errors/logic_error.py +160 -0
- algokit_utils/models/__init__.py +7 -0
- algokit_utils/models/account.py +12 -0
- algokit_utils/models/amount.py +198 -0
- algokit_utils/models/application.py +90 -0
- algokit_utils/models/network.py +29 -0
- algokit_utils/models/simulate.py +7 -0
- algokit_utils/models/state.py +53 -0
- algokit_utils/models/transaction.py +49 -0
- algokit_utils/protocols/__init__.py +3 -0
- algokit_utils/protocols/account.py +11 -0
- algokit_utils/protocols/signer.py +17 -0
- algokit_utils/protocols/typed_clients.py +110 -0
- algokit_utils/py.typed +0 -0
- algokit_utils/transact.py +195 -0
- algokit_utils/transactions/__init__.py +3 -0
- algokit_utils/transactions/builders/__init__.py +67 -0
- algokit_utils/transactions/builders/app.py +248 -0
- algokit_utils/transactions/builders/asset.py +256 -0
- algokit_utils/transactions/builders/common.py +263 -0
- algokit_utils/transactions/builders/keyreg.py +103 -0
- algokit_utils/transactions/builders/method_call.py +380 -0
- algokit_utils/transactions/builders/payment.py +43 -0
- algokit_utils/transactions/composer_resources.py +409 -0
- algokit_utils/transactions/fee_coverage.py +79 -0
- algokit_utils/transactions/helpers.py +9 -0
- algokit_utils/transactions/transaction_composer.py +1574 -0
- algokit_utils/transactions/transaction_creator.py +699 -0
- algokit_utils/transactions/transaction_sender.py +1240 -0
- algokit_utils/transactions/types.py +262 -0
- algokit_utils-5.0.0a3.dist-info/METADATA +105 -0
- algokit_utils-5.0.0a3.dist-info/RECORD +337 -0
- algokit_utils-5.0.0a3.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(slots=True)
|
|
10
|
+
class PostTransactionsResponse:
|
|
11
|
+
tx_id: str = field(
|
|
12
|
+
default="",
|
|
13
|
+
metadata=wire("txId"),
|
|
14
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import nested, wire
|
|
7
|
+
|
|
8
|
+
from ._avm_value import AvmValue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(slots=True)
|
|
12
|
+
class ScratchChange:
|
|
13
|
+
"""
|
|
14
|
+
A write operation into a scratch slot.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
new_value: AvmValue = field(
|
|
18
|
+
metadata=nested("new-value", lambda: AvmValue, required=True),
|
|
19
|
+
)
|
|
20
|
+
slot: int = field(
|
|
21
|
+
default=0,
|
|
22
|
+
metadata=wire("slot"),
|
|
23
|
+
)
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
import base64
|
|
3
|
+
from binascii import Error as BinasciiError
|
|
4
|
+
from collections.abc import Callable, Iterable, Mapping
|
|
5
|
+
from dataclasses import is_dataclass
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from typing import TypeAlias, TypeVar
|
|
8
|
+
|
|
9
|
+
from algokit_common.serde import from_wire, to_wire
|
|
10
|
+
|
|
11
|
+
DecodedT = TypeVar("DecodedT")
|
|
12
|
+
EnumValueT = TypeVar("EnumValueT", bound=Enum)
|
|
13
|
+
MapKeyT = TypeVar("MapKeyT")
|
|
14
|
+
BytesLike: TypeAlias = bytes | bytearray | memoryview
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _coerce_bytes(value: bytes | bytearray | memoryview) -> bytes:
|
|
18
|
+
if isinstance(value, memoryview):
|
|
19
|
+
return value.tobytes()
|
|
20
|
+
if isinstance(value, bytearray):
|
|
21
|
+
return bytes(value)
|
|
22
|
+
return value
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def encode_bytes_base64(value: BytesLike) -> str:
|
|
26
|
+
return base64.b64encode(_coerce_bytes(value)).decode("ascii")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def decode_bytes_base64(raw: object) -> bytes:
|
|
30
|
+
if isinstance(raw, bytes | bytearray | memoryview):
|
|
31
|
+
return bytes(raw)
|
|
32
|
+
if isinstance(raw, str):
|
|
33
|
+
try:
|
|
34
|
+
return base64.b64decode(raw.encode("ascii"), validate=True)
|
|
35
|
+
except (BinasciiError, UnicodeEncodeError) as exc:
|
|
36
|
+
raise ValueError("Invalid base64 payload") from exc
|
|
37
|
+
raise TypeError(f"Unsupported value for bytes field: {type(raw)!r}")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def encode_fixed_bytes_base64(value: BytesLike, expected_length: int) -> str:
|
|
41
|
+
"""Encode fixed-length bytes to base64, validating the length."""
|
|
42
|
+
coerced = _coerce_bytes(value)
|
|
43
|
+
if len(coerced) != expected_length:
|
|
44
|
+
raise ValueError(f"Expected {expected_length} bytes, got {len(coerced)}")
|
|
45
|
+
return base64.b64encode(coerced).decode("ascii")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def decode_fixed_bytes_base64(raw: object, expected_length: int) -> bytes:
|
|
49
|
+
"""Decode base64 to fixed-length bytes, validating the length."""
|
|
50
|
+
decoded = decode_bytes_base64(raw)
|
|
51
|
+
if len(decoded) != expected_length:
|
|
52
|
+
raise ValueError(f"Expected {expected_length} bytes, got {len(decoded)}")
|
|
53
|
+
return decoded
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def decode_bytes_map_key(raw: object) -> bytes:
|
|
57
|
+
if isinstance(raw, bytes | bytearray | memoryview):
|
|
58
|
+
return bytes(raw)
|
|
59
|
+
if isinstance(raw, str):
|
|
60
|
+
try:
|
|
61
|
+
return decode_bytes_base64(raw)
|
|
62
|
+
except ValueError:
|
|
63
|
+
try:
|
|
64
|
+
return raw.encode("utf-8")
|
|
65
|
+
except UnicodeEncodeError as fallback_exc:
|
|
66
|
+
raise ValueError("Invalid bytes map key") from fallback_exc
|
|
67
|
+
raise TypeError(f"Unsupported map key for bytes field: {type(raw)!r}")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def encode_bytes_sequence(values: Iterable[BytesLike | None] | None) -> list[str | None] | None:
|
|
71
|
+
if values is None:
|
|
72
|
+
return None
|
|
73
|
+
encoded: list[str | None] = []
|
|
74
|
+
for value in values:
|
|
75
|
+
if value is None:
|
|
76
|
+
encoded.append(None)
|
|
77
|
+
continue
|
|
78
|
+
if not isinstance(value, bytes | bytearray | memoryview):
|
|
79
|
+
raise TypeError(f"Unsupported value for bytes field sequence: {type(value)!r}")
|
|
80
|
+
encoded.append(encode_bytes_base64(value))
|
|
81
|
+
return encoded or None
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def decode_bytes_sequence(raw: object) -> list[bytes | None] | None:
|
|
85
|
+
if not isinstance(raw, list):
|
|
86
|
+
return None
|
|
87
|
+
decoded: list[bytes | None] = []
|
|
88
|
+
for item in raw:
|
|
89
|
+
if item is None:
|
|
90
|
+
decoded.append(None)
|
|
91
|
+
continue
|
|
92
|
+
decoded.append(decode_bytes_base64(item))
|
|
93
|
+
return decoded or None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def encode_fixed_bytes_sequence(
|
|
97
|
+
values: Iterable[BytesLike | None] | None, expected_length: int
|
|
98
|
+
) -> list[str | None] | None:
|
|
99
|
+
"""Encode a sequence of fixed-length bytes to base64, validating each element's length."""
|
|
100
|
+
if values is None:
|
|
101
|
+
return None
|
|
102
|
+
encoded: list[str | None] = []
|
|
103
|
+
for value in values:
|
|
104
|
+
if value is None:
|
|
105
|
+
encoded.append(None)
|
|
106
|
+
continue
|
|
107
|
+
if not isinstance(value, bytes | bytearray | memoryview):
|
|
108
|
+
raise TypeError(f"Unsupported value for bytes field sequence: {type(value)!r}")
|
|
109
|
+
encoded.append(encode_fixed_bytes_base64(value, expected_length))
|
|
110
|
+
return encoded or None
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def decode_fixed_bytes_sequence(raw: object, expected_length: int) -> list[bytes | None] | None:
|
|
114
|
+
"""Decode a sequence of base64 strings to fixed-length bytes, validating each element's length."""
|
|
115
|
+
if not isinstance(raw, list):
|
|
116
|
+
return None
|
|
117
|
+
decoded: list[bytes | None] = []
|
|
118
|
+
for item in raw:
|
|
119
|
+
if item is None:
|
|
120
|
+
decoded.append(None)
|
|
121
|
+
continue
|
|
122
|
+
decoded.append(decode_fixed_bytes_base64(item, expected_length))
|
|
123
|
+
return decoded or None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def encode_model_sequence(values: Iterable[object] | None) -> list[dict[str, object]] | None:
|
|
127
|
+
if values is None:
|
|
128
|
+
return None
|
|
129
|
+
encoded: list[dict[str, object]] = []
|
|
130
|
+
for value in values:
|
|
131
|
+
if value is None:
|
|
132
|
+
continue
|
|
133
|
+
encoded.append(to_wire(value))
|
|
134
|
+
return encoded or None
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def decode_model_sequence(cls_factory: Callable[[], type[DecodedT]], raw: object) -> list[DecodedT] | None:
|
|
138
|
+
if not isinstance(raw, list):
|
|
139
|
+
return None
|
|
140
|
+
cls = cls_factory()
|
|
141
|
+
decoded: list[DecodedT] = []
|
|
142
|
+
for item in raw:
|
|
143
|
+
if isinstance(item, Mapping):
|
|
144
|
+
decoded.append(from_wire(cls, item))
|
|
145
|
+
return decoded or None
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def encode_enum_sequence(values: Iterable[object] | None) -> list[object] | None:
|
|
149
|
+
if values is None:
|
|
150
|
+
return None
|
|
151
|
+
encoded: list[object] = []
|
|
152
|
+
for value in values:
|
|
153
|
+
if value is None:
|
|
154
|
+
continue
|
|
155
|
+
encoded.append(value.value if hasattr(value, "value") else value)
|
|
156
|
+
return encoded or None
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def decode_enum_sequence(enum_factory: Callable[[], type[EnumValueT]], raw: object) -> list[EnumValueT] | None:
|
|
160
|
+
if not isinstance(raw, list):
|
|
161
|
+
return None
|
|
162
|
+
enum_cls = enum_factory()
|
|
163
|
+
decoded: list[EnumValueT] = []
|
|
164
|
+
for item in raw:
|
|
165
|
+
try:
|
|
166
|
+
decoded.append(enum_cls(item))
|
|
167
|
+
except Exception:
|
|
168
|
+
continue
|
|
169
|
+
return decoded or None
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def encode_model_mapping(
|
|
173
|
+
factory: Callable[[], type[DecodedT]],
|
|
174
|
+
mapping: Mapping[object, object] | None,
|
|
175
|
+
*,
|
|
176
|
+
key_encoder: Callable[[object], str] | None = None,
|
|
177
|
+
) -> dict[str, object] | None:
|
|
178
|
+
if mapping is None:
|
|
179
|
+
return None
|
|
180
|
+
cls = factory()
|
|
181
|
+
encoded: dict[str, object] = {}
|
|
182
|
+
for key, value in mapping.items():
|
|
183
|
+
if value is None:
|
|
184
|
+
continue
|
|
185
|
+
encoded_key: str
|
|
186
|
+
if key_encoder is not None:
|
|
187
|
+
encoded_key = key_encoder(key)
|
|
188
|
+
elif isinstance(key, str):
|
|
189
|
+
encoded_key = key
|
|
190
|
+
else:
|
|
191
|
+
encoded_key = str(key)
|
|
192
|
+
if isinstance(value, cls) or is_dataclass(value):
|
|
193
|
+
encoded[encoded_key] = to_wire(value)
|
|
194
|
+
else:
|
|
195
|
+
encoded[encoded_key] = value
|
|
196
|
+
return encoded or None
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def decode_model_mapping(
|
|
200
|
+
factory: Callable[[], type[DecodedT]],
|
|
201
|
+
raw: object,
|
|
202
|
+
*,
|
|
203
|
+
key_decoder: Callable[[object], MapKeyT] | None = None,
|
|
204
|
+
) -> dict[MapKeyT, DecodedT] | None:
|
|
205
|
+
if not isinstance(raw, Mapping):
|
|
206
|
+
return None
|
|
207
|
+
cls = factory()
|
|
208
|
+
decoded: dict[MapKeyT, DecodedT] = {}
|
|
209
|
+
for key, value in raw.items():
|
|
210
|
+
if isinstance(value, Mapping):
|
|
211
|
+
decoded_key = key_decoder(key) if key_decoder is not None else key
|
|
212
|
+
decoded[decoded_key] = from_wire(cls, value)
|
|
213
|
+
return decoded or None
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def decode_optional_bool(raw: object) -> bool | None:
|
|
217
|
+
if raw is None:
|
|
218
|
+
return None
|
|
219
|
+
return bool(raw)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def mapping_encoder(
|
|
223
|
+
factory: Callable[[], type[DecodedT]],
|
|
224
|
+
*,
|
|
225
|
+
key_encoder: Callable[[object], str] | None = None,
|
|
226
|
+
) -> Callable[[Mapping[object, object] | None], dict[str, object] | None]:
|
|
227
|
+
def _encode(mapping: Mapping[object, object] | None) -> dict[str, object] | None:
|
|
228
|
+
return encode_model_mapping(factory, mapping, key_encoder=key_encoder)
|
|
229
|
+
|
|
230
|
+
return _encode
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def mapping_decoder(
|
|
234
|
+
factory: Callable[[], type[DecodedT]],
|
|
235
|
+
*,
|
|
236
|
+
key_decoder: Callable[[object], MapKeyT] | None = None,
|
|
237
|
+
) -> Callable[[object], dict[MapKeyT, DecodedT] | None]:
|
|
238
|
+
def _decode(raw: object) -> dict[MapKeyT, DecodedT] | None:
|
|
239
|
+
return decode_model_mapping(factory, raw, key_decoder=key_decoder)
|
|
240
|
+
|
|
241
|
+
return _decode
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._application_initial_states import ApplicationInitialStates
|
|
9
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class SimulateInitialStates:
|
|
14
|
+
"""
|
|
15
|
+
Initial states of resources that were accessed during simulation.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
app_initial_states: list[ApplicationInitialStates] | None = field(
|
|
19
|
+
default=None,
|
|
20
|
+
metadata=wire(
|
|
21
|
+
"app-initial-states",
|
|
22
|
+
encode=encode_model_sequence,
|
|
23
|
+
decode=lambda raw: decode_model_sequence(lambda: ApplicationInitialStates, raw),
|
|
24
|
+
),
|
|
25
|
+
)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import nested, wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
9
|
+
from ._simulate_request_transaction_group import SimulateRequestTransactionGroup
|
|
10
|
+
from ._simulate_trace_config import SimulateTraceConfig
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(slots=True)
|
|
14
|
+
class SimulateRequest:
|
|
15
|
+
"""
|
|
16
|
+
Request type for simulation endpoint.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
txn_groups: list[SimulateRequestTransactionGroup] = field(
|
|
20
|
+
default_factory=list,
|
|
21
|
+
metadata=wire(
|
|
22
|
+
"txn-groups",
|
|
23
|
+
encode=encode_model_sequence,
|
|
24
|
+
decode=lambda raw: decode_model_sequence(lambda: SimulateRequestTransactionGroup, raw),
|
|
25
|
+
),
|
|
26
|
+
)
|
|
27
|
+
allow_empty_signatures: bool | None = field(
|
|
28
|
+
default=None,
|
|
29
|
+
metadata=wire("allow-empty-signatures"),
|
|
30
|
+
)
|
|
31
|
+
allow_more_logging: bool | None = field(
|
|
32
|
+
default=None,
|
|
33
|
+
metadata=wire("allow-more-logging"),
|
|
34
|
+
)
|
|
35
|
+
allow_unnamed_resources: bool | None = field(
|
|
36
|
+
default=None,
|
|
37
|
+
metadata=wire("allow-unnamed-resources"),
|
|
38
|
+
)
|
|
39
|
+
exec_trace_config: SimulateTraceConfig | None = field(
|
|
40
|
+
default=None,
|
|
41
|
+
metadata=nested("exec-trace-config", lambda: SimulateTraceConfig),
|
|
42
|
+
)
|
|
43
|
+
extra_opcode_budget: int | None = field(
|
|
44
|
+
default=None,
|
|
45
|
+
metadata=wire("extra-opcode-budget"),
|
|
46
|
+
)
|
|
47
|
+
fix_signers: bool | None = field(
|
|
48
|
+
default=None,
|
|
49
|
+
metadata=wire("fix-signers"),
|
|
50
|
+
)
|
|
51
|
+
round_: int | None = field(
|
|
52
|
+
default=None,
|
|
53
|
+
metadata=wire("round"),
|
|
54
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
from algokit_transact.models.signed_transaction import SignedTransaction
|
|
8
|
+
|
|
9
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class SimulateRequestTransactionGroup:
|
|
14
|
+
"""
|
|
15
|
+
A transaction group to simulate.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
txns: list[SignedTransaction] = field(
|
|
19
|
+
default_factory=list,
|
|
20
|
+
metadata=wire(
|
|
21
|
+
"txns",
|
|
22
|
+
encode=encode_model_sequence,
|
|
23
|
+
decode=lambda raw: decode_model_sequence(lambda: SignedTransaction, raw),
|
|
24
|
+
),
|
|
25
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import nested, wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
9
|
+
from ._simulate_initial_states import SimulateInitialStates
|
|
10
|
+
from ._simulate_trace_config import SimulateTraceConfig
|
|
11
|
+
from ._simulate_transaction_group_result import SimulateTransactionGroupResult
|
|
12
|
+
from ._simulation_eval_overrides import SimulationEvalOverrides
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass(slots=True)
|
|
16
|
+
class SimulateResponse:
|
|
17
|
+
last_round: int = field(
|
|
18
|
+
default=0,
|
|
19
|
+
metadata=wire("last-round"),
|
|
20
|
+
)
|
|
21
|
+
txn_groups: list[SimulateTransactionGroupResult] = field(
|
|
22
|
+
default_factory=list,
|
|
23
|
+
metadata=wire(
|
|
24
|
+
"txn-groups",
|
|
25
|
+
encode=encode_model_sequence,
|
|
26
|
+
decode=lambda raw: decode_model_sequence(lambda: SimulateTransactionGroupResult, raw),
|
|
27
|
+
),
|
|
28
|
+
)
|
|
29
|
+
version: int = field(
|
|
30
|
+
default=0,
|
|
31
|
+
metadata=wire("version"),
|
|
32
|
+
)
|
|
33
|
+
eval_overrides: SimulationEvalOverrides | None = field(
|
|
34
|
+
default=None,
|
|
35
|
+
metadata=nested("eval-overrides", lambda: SimulationEvalOverrides),
|
|
36
|
+
)
|
|
37
|
+
exec_trace_config: SimulateTraceConfig | None = field(
|
|
38
|
+
default=None,
|
|
39
|
+
metadata=nested("exec-trace-config", lambda: SimulateTraceConfig),
|
|
40
|
+
)
|
|
41
|
+
initial_states: SimulateInitialStates | None = field(
|
|
42
|
+
default=None,
|
|
43
|
+
metadata=nested("initial-states", lambda: SimulateInitialStates),
|
|
44
|
+
)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(slots=True)
|
|
10
|
+
class SimulateTraceConfig:
|
|
11
|
+
"""
|
|
12
|
+
An object that configures simulation execution trace.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
enable: bool | None = field(
|
|
16
|
+
default=None,
|
|
17
|
+
metadata=wire("enable"),
|
|
18
|
+
)
|
|
19
|
+
scratch_change: bool | None = field(
|
|
20
|
+
default=None,
|
|
21
|
+
metadata=wire("scratch-change"),
|
|
22
|
+
)
|
|
23
|
+
stack_change: bool | None = field(
|
|
24
|
+
default=None,
|
|
25
|
+
metadata=wire("stack-change"),
|
|
26
|
+
)
|
|
27
|
+
state_change: bool | None = field(
|
|
28
|
+
default=None,
|
|
29
|
+
metadata=wire("state-change"),
|
|
30
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import nested, wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
9
|
+
from ._simulate_transaction_result import SimulateTransactionResult
|
|
10
|
+
from ._simulate_unnamed_resources_accessed import SimulateUnnamedResourcesAccessed
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(slots=True)
|
|
14
|
+
class SimulateTransactionGroupResult:
|
|
15
|
+
"""
|
|
16
|
+
Simulation result for an atomic transaction group
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
txn_results: list[SimulateTransactionResult] = field(
|
|
20
|
+
default_factory=list,
|
|
21
|
+
metadata=wire(
|
|
22
|
+
"txn-results",
|
|
23
|
+
encode=encode_model_sequence,
|
|
24
|
+
decode=lambda raw: decode_model_sequence(lambda: SimulateTransactionResult, raw),
|
|
25
|
+
),
|
|
26
|
+
)
|
|
27
|
+
app_budget_added: int | None = field(
|
|
28
|
+
default=None,
|
|
29
|
+
metadata=wire("app-budget-added"),
|
|
30
|
+
)
|
|
31
|
+
app_budget_consumed: int | None = field(
|
|
32
|
+
default=None,
|
|
33
|
+
metadata=wire("app-budget-consumed"),
|
|
34
|
+
)
|
|
35
|
+
failed_at: list[int] | None = field(
|
|
36
|
+
default=None,
|
|
37
|
+
metadata=wire("failed-at"),
|
|
38
|
+
)
|
|
39
|
+
failure_message: str | None = field(
|
|
40
|
+
default=None,
|
|
41
|
+
metadata=wire("failure-message"),
|
|
42
|
+
)
|
|
43
|
+
unnamed_resources_accessed: SimulateUnnamedResourcesAccessed | None = field(
|
|
44
|
+
default=None,
|
|
45
|
+
metadata=nested("unnamed-resources-accessed", lambda: SimulateUnnamedResourcesAccessed),
|
|
46
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import nested, wire
|
|
7
|
+
|
|
8
|
+
from ._pending_transaction_response import PendingTransactionResponse
|
|
9
|
+
from ._simulate_unnamed_resources_accessed import SimulateUnnamedResourcesAccessed
|
|
10
|
+
from ._simulation_transaction_exec_trace import SimulationTransactionExecTrace
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(slots=True)
|
|
14
|
+
class SimulateTransactionResult:
|
|
15
|
+
"""
|
|
16
|
+
Simulation result for an individual transaction
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
txn_result: PendingTransactionResponse = field(
|
|
20
|
+
metadata=nested("txn-result", lambda: PendingTransactionResponse, required=True),
|
|
21
|
+
)
|
|
22
|
+
app_budget_consumed: int | None = field(
|
|
23
|
+
default=None,
|
|
24
|
+
metadata=wire("app-budget-consumed"),
|
|
25
|
+
)
|
|
26
|
+
exec_trace: SimulationTransactionExecTrace | None = field(
|
|
27
|
+
default=None,
|
|
28
|
+
metadata=nested("exec-trace", lambda: SimulationTransactionExecTrace),
|
|
29
|
+
)
|
|
30
|
+
fixed_signer: str | None = field(
|
|
31
|
+
default=None,
|
|
32
|
+
metadata=wire("fixed-signer"),
|
|
33
|
+
)
|
|
34
|
+
logic_sig_budget_consumed: int | None = field(
|
|
35
|
+
default=None,
|
|
36
|
+
metadata=wire("logic-sig-budget-consumed"),
|
|
37
|
+
)
|
|
38
|
+
unnamed_resources_accessed: SimulateUnnamedResourcesAccessed | None = field(
|
|
39
|
+
default=None,
|
|
40
|
+
metadata=nested("unnamed-resources-accessed", lambda: SimulateUnnamedResourcesAccessed),
|
|
41
|
+
)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
from algokit_transact.models.app_call import BoxReference, HoldingReference, LocalsReference
|
|
8
|
+
|
|
9
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class SimulateUnnamedResourcesAccessed:
|
|
14
|
+
"""
|
|
15
|
+
These are resources that were accessed by this group that would normally have caused
|
|
16
|
+
failure, but were allowed in simulation. Depending on where this object is in the
|
|
17
|
+
response, the unnamed resources it contains may or may not qualify for group resource
|
|
18
|
+
sharing. If this is a field in SimulateTransactionGroupResult, the resources do qualify,
|
|
19
|
+
but if this is a field in SimulateTransactionResult, they do not qualify. In order to
|
|
20
|
+
make this group valid for actual submission, resources that qualify for group sharing
|
|
21
|
+
can be made available by any transaction of the group; otherwise, resources must be
|
|
22
|
+
placed in the same transaction which accessed them.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
accounts: list[str] | None = field(
|
|
26
|
+
default=None,
|
|
27
|
+
metadata=wire("accounts"),
|
|
28
|
+
)
|
|
29
|
+
app_locals: list[LocalsReference] | None = field(
|
|
30
|
+
default=None,
|
|
31
|
+
metadata=wire(
|
|
32
|
+
"app-locals",
|
|
33
|
+
encode=encode_model_sequence,
|
|
34
|
+
decode=lambda raw: decode_model_sequence(lambda: LocalsReference, raw),
|
|
35
|
+
),
|
|
36
|
+
)
|
|
37
|
+
apps: list[int] | None = field(
|
|
38
|
+
default=None,
|
|
39
|
+
metadata=wire("apps"),
|
|
40
|
+
)
|
|
41
|
+
asset_holdings: list[HoldingReference] | None = field(
|
|
42
|
+
default=None,
|
|
43
|
+
metadata=wire(
|
|
44
|
+
"asset-holdings",
|
|
45
|
+
encode=encode_model_sequence,
|
|
46
|
+
decode=lambda raw: decode_model_sequence(lambda: HoldingReference, raw),
|
|
47
|
+
),
|
|
48
|
+
)
|
|
49
|
+
assets: list[int] | None = field(
|
|
50
|
+
default=None,
|
|
51
|
+
metadata=wire("assets"),
|
|
52
|
+
)
|
|
53
|
+
boxes: list[BoxReference] | None = field(
|
|
54
|
+
default=None,
|
|
55
|
+
metadata=wire(
|
|
56
|
+
"boxes",
|
|
57
|
+
encode=encode_model_sequence,
|
|
58
|
+
decode=lambda raw: decode_model_sequence(lambda: BoxReference, raw),
|
|
59
|
+
),
|
|
60
|
+
)
|
|
61
|
+
extra_box_refs: int | None = field(
|
|
62
|
+
default=None,
|
|
63
|
+
metadata=wire("extra-box-refs"),
|
|
64
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(slots=True)
|
|
10
|
+
class SimulationEvalOverrides:
|
|
11
|
+
"""
|
|
12
|
+
The set of parameters and limits override during simulation. If this set of parameters
|
|
13
|
+
is present, then evaluation parameters may differ from standard evaluation in certain
|
|
14
|
+
ways.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
allow_empty_signatures: bool | None = field(
|
|
18
|
+
default=None,
|
|
19
|
+
metadata=wire("allow-empty-signatures"),
|
|
20
|
+
)
|
|
21
|
+
allow_unnamed_resources: bool | None = field(
|
|
22
|
+
default=None,
|
|
23
|
+
metadata=wire("allow-unnamed-resources"),
|
|
24
|
+
)
|
|
25
|
+
extra_opcode_budget: int | None = field(
|
|
26
|
+
default=None,
|
|
27
|
+
metadata=wire("extra-opcode-budget"),
|
|
28
|
+
)
|
|
29
|
+
fix_signers: bool | None = field(
|
|
30
|
+
default=None,
|
|
31
|
+
metadata=wire("fix-signers"),
|
|
32
|
+
)
|
|
33
|
+
max_log_calls: int | None = field(
|
|
34
|
+
default=None,
|
|
35
|
+
metadata=wire("max-log-calls"),
|
|
36
|
+
)
|
|
37
|
+
max_log_size: int | None = field(
|
|
38
|
+
default=None,
|
|
39
|
+
metadata=wire("max-log-size"),
|
|
40
|
+
)
|