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,363 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from dataclasses import dataclass, field
|
|
6
|
+
from typing import cast
|
|
7
|
+
|
|
8
|
+
from algokit_common.serde import addr, addr_seq, flatten, nested, wire
|
|
9
|
+
from algokit_transact.models.signed_transaction import SignedTransaction
|
|
10
|
+
|
|
11
|
+
from ._serde_helpers import (
|
|
12
|
+
decode_bytes_map_key,
|
|
13
|
+
decode_model_mapping,
|
|
14
|
+
decode_model_sequence,
|
|
15
|
+
decode_optional_bool,
|
|
16
|
+
encode_bytes_base64,
|
|
17
|
+
encode_model_mapping,
|
|
18
|
+
encode_model_sequence,
|
|
19
|
+
mapping_decoder,
|
|
20
|
+
mapping_encoder,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"ApplyData",
|
|
25
|
+
"Block",
|
|
26
|
+
"BlockAccountStateDelta",
|
|
27
|
+
"BlockAppEvalDelta",
|
|
28
|
+
"BlockEvalDelta",
|
|
29
|
+
"BlockHeader",
|
|
30
|
+
"BlockResponse",
|
|
31
|
+
"BlockStateDelta",
|
|
32
|
+
"BlockStateProofTracking",
|
|
33
|
+
"BlockStateProofTrackingData",
|
|
34
|
+
"ParticipationUpdates",
|
|
35
|
+
"RewardState",
|
|
36
|
+
"SignedTxnInBlock",
|
|
37
|
+
"SignedTxnWithAD",
|
|
38
|
+
"TxnCommitments",
|
|
39
|
+
"UpgradeState",
|
|
40
|
+
"UpgradeVote",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
BlockStateDelta = dict[bytes, "BlockEvalDelta"]
|
|
45
|
+
BlockStateProofTracking = dict[int, "BlockStateProofTrackingData"]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _encode_block_state_delta(value: BlockStateDelta | None) -> dict[str, object] | None:
|
|
49
|
+
if value is None:
|
|
50
|
+
return None
|
|
51
|
+
return encode_model_mapping(
|
|
52
|
+
lambda: BlockEvalDelta,
|
|
53
|
+
cast(Mapping[object, object], value),
|
|
54
|
+
key_encoder=_encode_state_delta_key,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _encode_state_delta_key(key: object) -> str:
|
|
59
|
+
if isinstance(key, bytes):
|
|
60
|
+
return encode_bytes_base64(key)
|
|
61
|
+
if isinstance(key, memoryview):
|
|
62
|
+
return encode_bytes_base64(bytes(key))
|
|
63
|
+
if isinstance(key, bytearray):
|
|
64
|
+
return encode_bytes_base64(bytes(key))
|
|
65
|
+
raise TypeError("State delta keys must be bytes-like")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _decode_state_proof_tracking_key(key: object) -> int:
|
|
69
|
+
if isinstance(key, int):
|
|
70
|
+
return key
|
|
71
|
+
if isinstance(key, str):
|
|
72
|
+
return int(key)
|
|
73
|
+
raise TypeError("State proof tracking keys must be numeric")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _decode_block_state_delta(raw: object) -> BlockStateDelta | None:
|
|
77
|
+
decoded = decode_model_mapping(lambda: BlockEvalDelta, raw, key_decoder=decode_bytes_map_key)
|
|
78
|
+
return decoded or None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _encode_local_delta_index_key(key: object) -> str:
|
|
82
|
+
if isinstance(key, bool):
|
|
83
|
+
return str(int(key))
|
|
84
|
+
if isinstance(key, int):
|
|
85
|
+
return str(key)
|
|
86
|
+
if isinstance(key, str):
|
|
87
|
+
return str(int(key))
|
|
88
|
+
raise TypeError("Local delta keys must be numeric")
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _encode_local_deltas(mapping: Mapping[int, BlockStateDelta] | None) -> dict[str, object] | None:
|
|
92
|
+
if mapping is None:
|
|
93
|
+
return None
|
|
94
|
+
out: dict[str, object] = {}
|
|
95
|
+
for key, value in mapping.items():
|
|
96
|
+
encoded = _encode_block_state_delta(value)
|
|
97
|
+
if encoded:
|
|
98
|
+
out[_encode_local_delta_index_key(key)] = encoded
|
|
99
|
+
return out or None
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def _decode_local_deltas(raw: object) -> dict[int, BlockStateDelta] | None:
|
|
103
|
+
if not isinstance(raw, Mapping):
|
|
104
|
+
return None
|
|
105
|
+
out: dict[int, BlockStateDelta] = {}
|
|
106
|
+
for key, value in raw.items():
|
|
107
|
+
decoded = _decode_block_state_delta(value)
|
|
108
|
+
if decoded is not None:
|
|
109
|
+
out[_decode_local_delta_index_key(key)] = decoded
|
|
110
|
+
return out or None
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _decode_local_delta_index_key(key: object) -> int:
|
|
114
|
+
if isinstance(key, int):
|
|
115
|
+
return key
|
|
116
|
+
if isinstance(key, str):
|
|
117
|
+
return int(key)
|
|
118
|
+
raise TypeError("Local delta keys must be numeric")
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@dataclass(slots=True)
|
|
122
|
+
class BlockEvalDelta:
|
|
123
|
+
"""Represents a TEAL value delta within block state changes."""
|
|
124
|
+
|
|
125
|
+
action: int = field(metadata=wire("at", required=True))
|
|
126
|
+
bytes_value: bytes | None = field(default=None, metadata=wire("bs"))
|
|
127
|
+
uint: int | None = field(default=None, metadata=wire("ui"))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@dataclass(slots=True)
|
|
131
|
+
class BlockAccountStateDelta:
|
|
132
|
+
"""Associates an account address with its state delta."""
|
|
133
|
+
|
|
134
|
+
address: str = field(metadata=wire("address", required=True))
|
|
135
|
+
delta: BlockStateDelta = field(
|
|
136
|
+
metadata=wire(
|
|
137
|
+
"delta",
|
|
138
|
+
encode=_encode_block_state_delta,
|
|
139
|
+
decode=_decode_block_state_delta,
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
@dataclass(slots=True)
|
|
145
|
+
class BlockStateProofTrackingData:
|
|
146
|
+
"""Tracking metadata for a specific state proof type."""
|
|
147
|
+
|
|
148
|
+
state_proof_voters_commitment: bytes | None = field(
|
|
149
|
+
default=None,
|
|
150
|
+
metadata=wire("v"),
|
|
151
|
+
)
|
|
152
|
+
state_proof_online_total_weight: int | None = field(
|
|
153
|
+
default=None,
|
|
154
|
+
metadata=wire("t"),
|
|
155
|
+
)
|
|
156
|
+
state_proof_next_round: int | None = field(
|
|
157
|
+
default=None,
|
|
158
|
+
metadata=wire("n"),
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@dataclass(slots=True)
|
|
163
|
+
class ApplyData:
|
|
164
|
+
"""Transaction execution apply data containing state changes and rewards."""
|
|
165
|
+
|
|
166
|
+
closing_amount: int | None = field(default=None, metadata=wire("ca"))
|
|
167
|
+
asset_closing_amount: int | None = field(default=None, metadata=wire("aca"))
|
|
168
|
+
sender_rewards: int | None = field(default=None, metadata=wire("rs"))
|
|
169
|
+
receiver_rewards: int | None = field(default=None, metadata=wire("rr"))
|
|
170
|
+
close_rewards: int | None = field(default=None, metadata=wire("rc"))
|
|
171
|
+
eval_delta: "BlockAppEvalDelta | None" = field(
|
|
172
|
+
default=None,
|
|
173
|
+
metadata=nested("dt", lambda: BlockAppEvalDelta),
|
|
174
|
+
)
|
|
175
|
+
config_asset: int | None = field(default=None, metadata=wire("caid"))
|
|
176
|
+
application_id: int | None = field(default=None, metadata=wire("apid"))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
@dataclass(slots=True)
|
|
180
|
+
class SignedTxnWithAD:
|
|
181
|
+
"""Signed transaction with associated apply data."""
|
|
182
|
+
|
|
183
|
+
signed_transaction: SignedTransaction = field(metadata=flatten(lambda: SignedTransaction))
|
|
184
|
+
apply_data: ApplyData | None = field(default=None, metadata=flatten(lambda: ApplyData))
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@dataclass(slots=True)
|
|
188
|
+
class TxnCommitments:
|
|
189
|
+
"""Transaction commitment hashes for the block."""
|
|
190
|
+
|
|
191
|
+
transactions_root: bytes = field(default_factory=lambda: bytes(32), metadata=wire("txn"))
|
|
192
|
+
transactions_root_sha256: bytes = field(default_factory=lambda: bytes(32), metadata=wire("txn256"))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@dataclass(slots=True)
|
|
196
|
+
class RewardState:
|
|
197
|
+
"""Reward distribution state for the block."""
|
|
198
|
+
|
|
199
|
+
fee_sink: str | None = field(default=None, metadata=addr("fees"))
|
|
200
|
+
rewards_pool: str | None = field(default=None, metadata=addr("rwd"))
|
|
201
|
+
rewards_level: int | None = field(default=None, metadata=wire("earn"))
|
|
202
|
+
rewards_rate: int | None = field(default=None, metadata=wire("rate"))
|
|
203
|
+
rewards_residue: int | None = field(default=None, metadata=wire("frac"))
|
|
204
|
+
rewards_recalculation_round: int | None = field(default=None, metadata=wire("rwcalr"))
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
@dataclass(slots=True)
|
|
208
|
+
class UpgradeState:
|
|
209
|
+
"""Protocol upgrade state for the block."""
|
|
210
|
+
|
|
211
|
+
current_protocol: str | None = field(default=None, metadata=wire("proto"))
|
|
212
|
+
next_protocol: str | None = field(default=None, metadata=wire("nextproto"))
|
|
213
|
+
next_protocol_approvals: int | None = field(default=None, metadata=wire("nextyes"))
|
|
214
|
+
next_protocol_vote_before: int | None = field(default=None, metadata=wire("nextbefore"))
|
|
215
|
+
next_protocol_switch_on: int | None = field(default=None, metadata=wire("nextswitch"))
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
@dataclass(slots=True)
|
|
219
|
+
class UpgradeVote:
|
|
220
|
+
"""Protocol upgrade vote parameters for the block."""
|
|
221
|
+
|
|
222
|
+
upgrade_propose: str | None = field(default=None, metadata=wire("upgradeprop"))
|
|
223
|
+
upgrade_delay: int | None = field(default=None, metadata=wire("upgradedelay"))
|
|
224
|
+
upgrade_approve: bool | None = field(default=None, metadata=wire("upgradeyes"))
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@dataclass(slots=True)
|
|
228
|
+
class ParticipationUpdates:
|
|
229
|
+
"""Participation account updates embedded in a block."""
|
|
230
|
+
|
|
231
|
+
expired_participation_accounts: tuple[str, ...] | None = field(default=None, metadata=addr_seq("partupdrmv"))
|
|
232
|
+
absent_participation_accounts: tuple[str, ...] | None = field(default=None, metadata=addr_seq("partupdabs"))
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
@dataclass(slots=True)
|
|
236
|
+
class SignedTxnInBlock:
|
|
237
|
+
"""Signed transaction details with block-specific apply data."""
|
|
238
|
+
|
|
239
|
+
signed_transaction: SignedTxnWithAD = field(metadata=flatten(lambda: SignedTxnWithAD))
|
|
240
|
+
has_genesis_id: bool | None = field(default=None, metadata=wire("hgi", decode=decode_optional_bool))
|
|
241
|
+
has_genesis_hash: bool | None = field(default=None, metadata=wire("hgh", decode=decode_optional_bool))
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
@dataclass(slots=True)
|
|
245
|
+
class BlockAppEvalDelta:
|
|
246
|
+
"""State changes produced by an application execution during block evaluation."""
|
|
247
|
+
|
|
248
|
+
global_delta: BlockStateDelta | None = field(
|
|
249
|
+
default=None,
|
|
250
|
+
metadata=wire(
|
|
251
|
+
"gd",
|
|
252
|
+
encode=_encode_block_state_delta,
|
|
253
|
+
decode=_decode_block_state_delta,
|
|
254
|
+
),
|
|
255
|
+
)
|
|
256
|
+
local_deltas: dict[int, BlockStateDelta] | None = field(
|
|
257
|
+
default=None,
|
|
258
|
+
metadata=wire(
|
|
259
|
+
"ld",
|
|
260
|
+
encode=_encode_local_deltas,
|
|
261
|
+
decode=_decode_local_deltas,
|
|
262
|
+
),
|
|
263
|
+
)
|
|
264
|
+
inner_txns: list[SignedTxnWithAD] | None = field(
|
|
265
|
+
default=None,
|
|
266
|
+
metadata=wire(
|
|
267
|
+
"itx",
|
|
268
|
+
encode=encode_model_sequence,
|
|
269
|
+
decode=lambda raw: decode_model_sequence(lambda: SignedTxnWithAD, raw),
|
|
270
|
+
),
|
|
271
|
+
)
|
|
272
|
+
shared_accounts: tuple[str, ...] | None = field(default=None, metadata=addr_seq("sa"))
|
|
273
|
+
logs: list[bytes] | None = field(default=None, metadata=wire("lg"))
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
@dataclass(slots=True)
|
|
277
|
+
class BlockHeader:
|
|
278
|
+
"""Block header fields."""
|
|
279
|
+
|
|
280
|
+
round: int | None = field(default=None, metadata=wire("rnd"))
|
|
281
|
+
txn_commitments: TxnCommitments = field(
|
|
282
|
+
default_factory=TxnCommitments,
|
|
283
|
+
metadata=flatten(lambda: TxnCommitments),
|
|
284
|
+
)
|
|
285
|
+
previous_block_hash: bytes = field(default_factory=lambda: bytes(32), metadata=wire("prev"))
|
|
286
|
+
previous_block_hash_512: bytes | None = field(default=None, metadata=wire("prev512"))
|
|
287
|
+
seed: bytes | None = field(default=None, metadata=wire("seed"))
|
|
288
|
+
transactions_root_sha512: bytes | None = field(default=None, metadata=wire("txn512"))
|
|
289
|
+
timestamp: int | None = field(default=None, metadata=wire("ts"))
|
|
290
|
+
genesis_id: str | None = field(default=None, metadata=wire("gen"))
|
|
291
|
+
genesis_hash: bytes = field(default_factory=lambda: bytes(32), metadata=wire("gh"))
|
|
292
|
+
proposer: str | None = field(default=None, metadata=addr("prp"))
|
|
293
|
+
fees_collected: int | None = field(default=None, metadata=wire("fc"))
|
|
294
|
+
bonus: int | None = field(default=None, metadata=wire("bi"))
|
|
295
|
+
proposer_payout: int | None = field(default=None, metadata=wire("pp"))
|
|
296
|
+
reward_state: RewardState = field(
|
|
297
|
+
default_factory=RewardState,
|
|
298
|
+
metadata=flatten(lambda: RewardState),
|
|
299
|
+
)
|
|
300
|
+
upgrade_state: UpgradeState = field(
|
|
301
|
+
default_factory=UpgradeState,
|
|
302
|
+
metadata=flatten(lambda: UpgradeState),
|
|
303
|
+
)
|
|
304
|
+
upgrade_vote: UpgradeVote = field(
|
|
305
|
+
default_factory=UpgradeVote,
|
|
306
|
+
metadata=flatten(lambda: UpgradeVote),
|
|
307
|
+
)
|
|
308
|
+
txn_counter: int | None = field(default=None, metadata=wire("tc"))
|
|
309
|
+
state_proof_tracking: BlockStateProofTracking | None = field(
|
|
310
|
+
default=None,
|
|
311
|
+
metadata=wire(
|
|
312
|
+
"spt",
|
|
313
|
+
encode=mapping_encoder(lambda: BlockStateProofTrackingData),
|
|
314
|
+
decode=mapping_decoder(
|
|
315
|
+
lambda: BlockStateProofTrackingData,
|
|
316
|
+
key_decoder=_decode_state_proof_tracking_key,
|
|
317
|
+
),
|
|
318
|
+
),
|
|
319
|
+
)
|
|
320
|
+
participation_updates: ParticipationUpdates | None = field(
|
|
321
|
+
default=None,
|
|
322
|
+
metadata=flatten(lambda: ParticipationUpdates),
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
@dataclass(slots=True)
|
|
327
|
+
class Block:
|
|
328
|
+
"""Block header fields and transactions for a ledger round."""
|
|
329
|
+
|
|
330
|
+
header: BlockHeader = field(metadata=flatten(lambda: BlockHeader))
|
|
331
|
+
payset: list[SignedTxnInBlock] | None = field(
|
|
332
|
+
default=None,
|
|
333
|
+
metadata=wire(
|
|
334
|
+
"txns",
|
|
335
|
+
encode=encode_model_sequence,
|
|
336
|
+
decode=lambda raw: decode_model_sequence(lambda: SignedTxnInBlock, raw),
|
|
337
|
+
),
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
def __post_init__(self) -> None:
|
|
341
|
+
# populates genesis id and hash on transactions if required to ensure
|
|
342
|
+
# tx id's are correct
|
|
343
|
+
genesis_id = self.header.genesis_id
|
|
344
|
+
genesis_hash = self.header.genesis_hash
|
|
345
|
+
set_frozen_field = object.__setattr__
|
|
346
|
+
for txn_in_block in self.payset or []:
|
|
347
|
+
txn = txn_in_block.signed_transaction.signed_transaction.txn
|
|
348
|
+
|
|
349
|
+
if txn_in_block.has_genesis_id and txn.genesis_id is None:
|
|
350
|
+
set_frozen_field(txn, "genesis_id", genesis_id)
|
|
351
|
+
|
|
352
|
+
# the following assumes that Consensus.RequireGenesisHash is true
|
|
353
|
+
# so assigns genesis hash unless explicitly set to False
|
|
354
|
+
if txn_in_block.has_genesis_hash is not False and txn.genesis_hash is None:
|
|
355
|
+
set_frozen_field(txn, "genesis_hash", genesis_hash)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
@dataclass(slots=True)
|
|
359
|
+
class BlockResponse:
|
|
360
|
+
"""Response payload for the get block endpoint (with optional certificate)."""
|
|
361
|
+
|
|
362
|
+
block: Block = field(metadata=nested("block", lambda: Block))
|
|
363
|
+
cert: dict[str, object] | None = field(default=None, metadata=wire("cert"))
|
|
@@ -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 BlockHashResponse:
|
|
11
|
+
block_hash: str = field(
|
|
12
|
+
default="",
|
|
13
|
+
metadata=wire("blockHash"),
|
|
14
|
+
)
|
|
@@ -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 BlockTxidsResponse:
|
|
11
|
+
block_tx_ids: list[str] = field(
|
|
12
|
+
default_factory=list,
|
|
13
|
+
metadata=wire("blockTxids"),
|
|
14
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_bytes_base64, encode_bytes_base64
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(slots=True)
|
|
12
|
+
class Box:
|
|
13
|
+
"""
|
|
14
|
+
Box name and its content.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: bytes = field(
|
|
18
|
+
default=b"",
|
|
19
|
+
metadata=wire(
|
|
20
|
+
"name",
|
|
21
|
+
encode=encode_bytes_base64,
|
|
22
|
+
decode=decode_bytes_base64,
|
|
23
|
+
),
|
|
24
|
+
)
|
|
25
|
+
round_: int = field(
|
|
26
|
+
default=0,
|
|
27
|
+
metadata=wire("round"),
|
|
28
|
+
)
|
|
29
|
+
value: bytes = field(
|
|
30
|
+
default=b"",
|
|
31
|
+
metadata=wire(
|
|
32
|
+
"value",
|
|
33
|
+
encode=encode_bytes_base64,
|
|
34
|
+
decode=decode_bytes_base64,
|
|
35
|
+
),
|
|
36
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_bytes_base64, encode_bytes_base64
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(slots=True)
|
|
12
|
+
class BoxDescriptor:
|
|
13
|
+
"""
|
|
14
|
+
Box descriptor describes a Box.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: bytes = field(
|
|
18
|
+
default=b"",
|
|
19
|
+
metadata=wire(
|
|
20
|
+
"name",
|
|
21
|
+
encode=encode_bytes_base64,
|
|
22
|
+
decode=decode_bytes_base64,
|
|
23
|
+
),
|
|
24
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._box_descriptor import BoxDescriptor
|
|
9
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class BoxesResponse:
|
|
14
|
+
boxes: list[BoxDescriptor] = field(
|
|
15
|
+
default_factory=list,
|
|
16
|
+
metadata=wire(
|
|
17
|
+
"boxes",
|
|
18
|
+
encode=encode_model_sequence,
|
|
19
|
+
decode=lambda raw: decode_model_sequence(lambda: BoxDescriptor, raw),
|
|
20
|
+
),
|
|
21
|
+
)
|
algokit_algod_client/models/_build_version_contains_the_current_algod_build_version_information.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 BuildVersionContainsTheCurrentAlgodBuildVersionInformation:
|
|
11
|
+
branch: str = field(
|
|
12
|
+
default="",
|
|
13
|
+
metadata=wire("branch"),
|
|
14
|
+
)
|
|
15
|
+
build_number: int = field(
|
|
16
|
+
default=0,
|
|
17
|
+
metadata=wire("build_number"),
|
|
18
|
+
)
|
|
19
|
+
channel: str = field(
|
|
20
|
+
default="",
|
|
21
|
+
metadata=wire("channel"),
|
|
22
|
+
)
|
|
23
|
+
commit_hash: str = field(
|
|
24
|
+
default="",
|
|
25
|
+
metadata=wire("commit_hash"),
|
|
26
|
+
)
|
|
27
|
+
major: int = field(
|
|
28
|
+
default=0,
|
|
29
|
+
metadata=wire("major"),
|
|
30
|
+
)
|
|
31
|
+
minor: int = field(
|
|
32
|
+
default=0,
|
|
33
|
+
metadata=wire("minor"),
|
|
34
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
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 ._source_map import SourceMap
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(slots=True)
|
|
12
|
+
class CompileResponse:
|
|
13
|
+
hash_: str = field(
|
|
14
|
+
default="",
|
|
15
|
+
metadata=wire("hash"),
|
|
16
|
+
)
|
|
17
|
+
result: str = field(
|
|
18
|
+
default="",
|
|
19
|
+
metadata=wire("result"),
|
|
20
|
+
)
|
|
21
|
+
sourcemap: SourceMap | None = field(
|
|
22
|
+
default=None,
|
|
23
|
+
metadata=nested("sourcemap", lambda: SourceMap),
|
|
24
|
+
)
|
|
@@ -0,0 +1,22 @@
|
|
|
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 ErrorResponse:
|
|
11
|
+
"""
|
|
12
|
+
An error response with optional data field.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
message: str = field(
|
|
16
|
+
default="",
|
|
17
|
+
metadata=wire("message"),
|
|
18
|
+
)
|
|
19
|
+
data: dict[str, object] | None = field(
|
|
20
|
+
default=None,
|
|
21
|
+
metadata=wire("data"),
|
|
22
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._serde_helpers import decode_bytes_base64, encode_bytes_base64
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(slots=True)
|
|
12
|
+
class EvalDelta:
|
|
13
|
+
"""
|
|
14
|
+
Represents a TEAL value delta.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
action: int = field(
|
|
18
|
+
default=0,
|
|
19
|
+
metadata=wire("action"),
|
|
20
|
+
)
|
|
21
|
+
bytes_: bytes | None = field(
|
|
22
|
+
default=None,
|
|
23
|
+
metadata=wire(
|
|
24
|
+
"bytes",
|
|
25
|
+
encode=encode_bytes_base64,
|
|
26
|
+
decode=decode_bytes_base64,
|
|
27
|
+
),
|
|
28
|
+
)
|
|
29
|
+
uint: int | None = field(
|
|
30
|
+
default=None,
|
|
31
|
+
metadata=wire("uint"),
|
|
32
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
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 ._eval_delta import EvalDelta
|
|
9
|
+
from ._serde_helpers import decode_bytes_base64, encode_bytes_base64
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class EvalDeltaKeyValue:
|
|
14
|
+
"""
|
|
15
|
+
Key-value pairs for StateDelta.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
value: EvalDelta = field(
|
|
19
|
+
metadata=nested("value", lambda: EvalDelta, required=True),
|
|
20
|
+
)
|
|
21
|
+
key: bytes = field(
|
|
22
|
+
default=b"",
|
|
23
|
+
metadata=wire(
|
|
24
|
+
"key",
|
|
25
|
+
encode=encode_bytes_base64,
|
|
26
|
+
decode=decode_bytes_base64,
|
|
27
|
+
),
|
|
28
|
+
)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# AUTO-GENERATED: oas_generator
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass, field
|
|
5
|
+
|
|
6
|
+
from algokit_common.serde import wire
|
|
7
|
+
|
|
8
|
+
from ._allocations_for_genesis_file import AllocationsForGenesisFile
|
|
9
|
+
from ._serde_helpers import decode_model_sequence, encode_model_sequence
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass(slots=True)
|
|
13
|
+
class GenesisFileInJson:
|
|
14
|
+
alloc: list[AllocationsForGenesisFile] = field(
|
|
15
|
+
default_factory=list,
|
|
16
|
+
metadata=wire(
|
|
17
|
+
"alloc",
|
|
18
|
+
encode=encode_model_sequence,
|
|
19
|
+
decode=lambda raw: decode_model_sequence(lambda: AllocationsForGenesisFile, raw),
|
|
20
|
+
),
|
|
21
|
+
)
|
|
22
|
+
fees: str = field(
|
|
23
|
+
default="",
|
|
24
|
+
metadata=wire("fees"),
|
|
25
|
+
)
|
|
26
|
+
id_: str = field(
|
|
27
|
+
default="",
|
|
28
|
+
metadata=wire("id"),
|
|
29
|
+
)
|
|
30
|
+
network: str = field(
|
|
31
|
+
default="",
|
|
32
|
+
metadata=wire("network"),
|
|
33
|
+
)
|
|
34
|
+
proto: str = field(
|
|
35
|
+
default="",
|
|
36
|
+
metadata=wire("proto"),
|
|
37
|
+
)
|
|
38
|
+
rwd: str = field(
|
|
39
|
+
default="",
|
|
40
|
+
metadata=wire("rwd"),
|
|
41
|
+
)
|
|
42
|
+
comment: str | None = field(
|
|
43
|
+
default=None,
|
|
44
|
+
metadata=wire("comment"),
|
|
45
|
+
)
|
|
46
|
+
devmode: bool | None = field(
|
|
47
|
+
default=None,
|
|
48
|
+
metadata=wire("devmode"),
|
|
49
|
+
)
|
|
50
|
+
timestamp: int | None = field(
|
|
51
|
+
default=None,
|
|
52
|
+
metadata=wire("timestamp"),
|
|
53
|
+
)
|