Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/check-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: Check types with mypy
run: poetry run mypy

- name: Check docstrings are up to date
run: poetry run poe docstrings-check

# TODO: Restore before prod release of v3
# - name: Check docs are up to date
# run: |
Expand Down
368 changes: 174 additions & 194 deletions docs/markdown/autoapi/algokit_utils/accounts/account_manager/index.md

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions docs/markdown/autoapi/algokit_utils/assets/asset_manager/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,21 @@ Information about an Algorand Standard Asset (ASA).
* **decimals** – The amount of decimal places the asset was created with
* **default_frozen** – Whether the asset was frozen by default for all accounts, defaults to None
* **manager** – The address of the optional account that can manage the configuration of the asset and destroy it,

defaults to None
:ivar reserve: The address of the optional account that holds the reserve (uncirculated supply) units of the asset,
defaults to None
:ivar freeze: The address of the optional account that can be used to freeze or unfreeze holdings of this asset,
defaults to None
:ivar clawback: The address of the optional account that can clawback holdings of this asset from any account,
defaults to None
:ivar unit_name: The optional name of the unit of this asset (e.g. ticker name), defaults to None
:ivar unit_name_b64: The optional name of the unit of this asset as bytes, defaults to None
:ivar asset_name: The optional name of the asset, defaults to None
:ivar asset_name_b64: The optional name of the asset as bytes, defaults to None
:ivar url: Optional URL where more information about the asset can be retrieved, defaults to None
:ivar url_b64: Optional URL where more information about the asset can be retrieved as bytes, defaults to None
:ivar metadata_hash: 32-byte hash of some metadata that is relevant to the asset and/or asset holders,
defaults to None
defaults to None
* **reserve** – The address of the optional account that holds the reserve (uncirculated supply) units of the asset,
defaults to None
* **freeze** – The address of the optional account that can be used to freeze or unfreeze holdings of this asset,
defaults to None
* **clawback** – The address of the optional account that can clawback holdings of this asset from any account,
defaults to None
* **unit_name** – The optional name of the unit of this asset (e.g. ticker name), defaults to None
* **unit_name_b64** – The optional name of the unit of this asset as bytes, defaults to None
* **asset_name** – The optional name of the asset, defaults to None
* **asset_name_b64** – The optional name of the asset as bytes, defaults to None
* **url** – Optional URL where more information about the asset can be retrieved, defaults to None
* **url_b64** – Optional URL where more information about the asset can be retrieved as bytes, defaults to None
* **metadata_hash** – 32-byte hash of some metadata that is relevant to the asset and/or asset holders,
defaults to None

#### asset_id *: int*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Get an application client by creator address and name.
* **Returns:**
Application client instance

#### *static* get_algod_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig) | None = None) → algosdk.v2client.algod.AlgodClient
#### *static* get_algod_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig)) → algosdk.v2client.algod.AlgodClient

Get an Algod client from config or environment.

Expand All @@ -204,7 +204,7 @@ Get an Algod client from environment variables.
* **Returns:**
Algod client instance

#### *static* get_kmd_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig) | None = None) → algosdk.kmd.KMDClient
#### *static* get_kmd_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig)) → algosdk.kmd.KMDClient

Get a KMD client from config or environment.

Expand All @@ -220,7 +220,7 @@ Get a KMD client from environment variables.
* **Returns:**
KMD client instance

#### *static* get_indexer_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig) | None = None) → algosdk.v2client.indexer.IndexerClient
#### *static* get_indexer_client(config: [algokit_utils.models.network.AlgoClientNetworkConfig](../../models/network/index.md#algokit_utils.models.network.AlgoClientNetworkConfig)) → algosdk.v2client.indexer.IndexerClient

Get an Indexer client from config or environment.

Expand Down
85 changes: 16 additions & 69 deletions docs/markdown/autoapi/algokit_utils/models/amount/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,19 @@

## Module Contents

### *class* algokit_utils.models.amount.AlgoAmount(\*, micro_algos: int)

### *class* algokit_utils.models.amount.AlgoAmount(\*, micro_algo: int)

### *class* algokit_utils.models.amount.AlgoAmount(\*, algos: int | decimal.Decimal)

### *class* algokit_utils.models.amount.AlgoAmount(\*, algo: int | decimal.Decimal)

Wrapper class to ensure safe, explicit conversion between µAlgo, Algo and numbers.

* **Example:**

```pycon
>>> amount = AlgoAmount(algos=1)
>>> amount = AlgoAmount(algo=1)
>>> amount = AlgoAmount.from_algos(1)
>>> amount = AlgoAmount.from_algo(1)
>>> amount = AlgoAmount(micro_algos=1_000_000)
>>> amount = AlgoAmount(micro_algo=1_000_000)
>>> amount = AlgoAmount.from_micro_algos(1_000_000)
>>> amount = AlgoAmount.from_micro_algo(1_000_000)
```

#### *property* micro_algos *: int*

Return the amount as a number in µAlgo.

* **Returns:**
The amount in µAlgo.
```pycon
>>> amount = AlgoAmount(algo=1)
>>> amount = AlgoAmount.from_algo(1)
>>> amount = AlgoAmount(micro_algo=1_000_000)
>>> amount = AlgoAmount.from_micro_algo(1_000_000)
```

#### *property* micro_algo *: int*

Expand All @@ -56,34 +40,13 @@ Return the amount as a number in µAlgo.
* **Returns:**
The amount in µAlgo.

#### *property* algos *: decimal.Decimal*

Return the amount as a number in Algo.

* **Returns:**
The amount in Algo.

#### *property* algo *: decimal.Decimal*

Return the amount as a number in Algo.

* **Returns:**
The amount in Algo.

#### *static* from_algos(amount: int | decimal.Decimal) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Create an AlgoAmount object representing the given number of Algo.

* **Parameters:**
**amount** – The amount in Algo.
* **Returns:**
An AlgoAmount instance.
* **Example:**

```pycon
>>> amount = AlgoAmount.from_algos(1)
```

#### *static* from_algo(amount: int | decimal.Decimal) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Create an AlgoAmount object representing the given number of Algo.
Expand All @@ -93,24 +56,9 @@ Create an AlgoAmount object representing the given number of Algo.
* **Returns:**
An AlgoAmount instance.
* **Example:**

```pycon
>>> amount = AlgoAmount.from_algo(1)
```

#### *static* from_micro_algos(amount: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Create an AlgoAmount object representing the given number of µAlgo.

* **Parameters:**
**amount** – The amount in µAlgo.
* **Returns:**
An AlgoAmount instance.
* **Example:**

```pycon
>>> amount = AlgoAmount.from_micro_algos(1_000_000)
```
```pycon
>>> amount = AlgoAmount.from_algo(1)
```

#### *static* from_micro_algo(amount: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Expand All @@ -121,26 +69,25 @@ Create an AlgoAmount object representing the given number of µAlgo.
* **Returns:**
An AlgoAmount instance.
* **Example:**
```pycon
>>> amount = AlgoAmount.from_micro_algo(1_000_000)
```

```pycon
>>> amount = AlgoAmount.from_micro_algo(1_000_000)
```

### algokit_utils.models.amount.algo(algos: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)
### algokit_utils.models.amount.algo(algo: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Create an AlgoAmount object representing the given number of Algo.

* **Parameters:**
**algos** – The number of Algo to create an AlgoAmount object for.
**algo** – The number of Algo to create an AlgoAmount object for.
* **Returns:**
An AlgoAmount object representing the given number of Algo.

### algokit_utils.models.amount.micro_algo(microalgos: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)
### algokit_utils.models.amount.micro_algo(micro_algo: int) → [AlgoAmount](#algokit_utils.models.amount.AlgoAmount)

Create an AlgoAmount object representing the given number of µAlgo.

* **Parameters:**
**microalgos** – The number of µAlgo to create an AlgoAmount object for.
**micro_algo** – The number of µAlgo to create an AlgoAmount object for.
* **Returns:**
An AlgoAmount object representing the given number of µAlgo.

Expand Down
8 changes: 6 additions & 2 deletions docs/markdown/autoapi/algokit_utils/models/network/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ Connection details for connecting to an {py:class}\`algosdk.v2client.algod.Algod

#### server *: str*

URL for the service e.g. http://localhost:4001 or https://testnet-api.algonode.cloud
URL for the service e.g. http://localhost or https://testnet-api.algonode.cloud

#### token *: str | None* *= None*

API Token to authenticate with the service
API Token to authenticate with the service e.g ‘4001’ or ‘8980’

#### port *: str | int | None* *= None*

#### full_url() → str

Returns the full URL for the service

### *class* algokit_utils.models.network.AlgoClientConfigs

#### algod_config *: [AlgoClientNetworkConfig](#algokit_utils.models.network.AlgoClientNetworkConfig)*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@

## Functions

| [`send_atomic_transaction_composer`](#algokit_utils.transactions.transaction_composer.send_atomic_transaction_composer)(...) | Send an AtomicTransactionComposer transaction group. |
|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [`populate_app_call_resources`](#algokit_utils.transactions.transaction_composer.populate_app_call_resources)(...) | Populate application call resources based on simulation results. |
|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| [`prepare_group_for_sending`](#algokit_utils.transactions.transaction_composer.prepare_group_for_sending)(...) | Prepare a transaction group for sending by handling execution info and resources. |
| [`send_atomic_transaction_composer`](#algokit_utils.transactions.transaction_composer.send_atomic_transaction_composer)(...) | Send an AtomicTransactionComposer transaction group. |

## Module Contents

Expand All @@ -51,8 +53,7 @@ Parameters for a payment transaction.
* **receiver** – The account that will receive the ALGO
* **amount** – Amount to send
* **close_remainder_to** – If given, close the sender account and send the remaining balance to this address,

defaults to None
defaults to None

#### receiver *: str*

Expand Down Expand Up @@ -317,19 +318,18 @@ Bases: `_CommonTxnParams`
Parameters for creating an application.

* **Variables:**
**approval_program** – The program to execute for all OnCompletes other than ClearState as raw teal (string)

or compiled teal (bytes)
:ivar clear_state_program: The program to execute for ClearState OnComplete as raw teal (string)
or compiled teal (bytes)
:ivar schema: The state schema for the app. This is immutable, defaults to None
:ivar on_complete: The OnComplete action (cannot be ClearState), defaults to None
:ivar args: Application arguments, defaults to None
:ivar account_references: Account references, defaults to None
:ivar app_references: App references, defaults to None
:ivar asset_references: Asset references, defaults to None
:ivar box_references: Box references, defaults to None
:ivar extra_program_pages: Number of extra pages required for the programs, defaults to None
* **approval_program** – The program to execute for all OnCompletes other than ClearState as raw teal (string)
or compiled teal (bytes)
* **clear_state_program** – The program to execute for ClearState OnComplete as raw teal (string)
or compiled teal (bytes)
* **schema** – The state schema for the app. This is immutable, defaults to None
* **on_complete** – The OnComplete action (cannot be ClearState), defaults to None
* **args** – Application arguments, defaults to None
* **account_references** – Account references, defaults to None
* **app_references** – App references, defaults to None
* **asset_references** – Asset references, defaults to None
* **box_references** – Box references, defaults to None
* **extra_program_pages** – Number of extra pages required for the programs, defaults to None

#### approval_program *: str | bytes*

Expand Down Expand Up @@ -360,16 +360,15 @@ Parameters for updating an application.
* **Variables:**
* **app_id** – ID of the application
* **approval_program** – The program to execute for all OnCompletes other than ClearState as raw teal (string)

or compiled teal (bytes)
:ivar clear_state_program: The program to execute for ClearState OnComplete as raw teal (string)
or compiled teal (bytes)
:ivar args: Application arguments, defaults to None
:ivar account_references: Account references, defaults to None
:ivar app_references: App references, defaults to None
:ivar asset_references: Asset references, defaults to None
:ivar box_references: Box references, defaults to None
:ivar on_complete: The OnComplete action, defaults to None
or compiled teal (bytes)
* **clear_state_program** – The program to execute for ClearState OnComplete as raw teal (string)
or compiled teal (bytes)
* **args** – Application arguments, defaults to None
* **account_references** – Account references, defaults to None
* **app_references** – App references, defaults to None
* **asset_references** – Asset references, defaults to None
* **box_references** – Box references, defaults to None
* **on_complete** – The OnComplete action, defaults to None

#### app_id *: int*

Expand Down Expand Up @@ -428,9 +427,8 @@ Parameters for a regular ABI method call.
* **app_id** – ID of the application
* **method** – The ABI method to call
* **args** – Arguments to the ABI method, either an ABI value, transaction with explicit signer,

transaction, another method call, or None
:ivar on_complete: The OnComplete action (cannot be UpdateApplication or ClearState), defaults to None
transaction, another method call, or None
* **on_complete** – The OnComplete action (cannot be UpdateApplication or ClearState), defaults to None

#### app_id *: int*

Expand Down Expand Up @@ -553,6 +551,29 @@ Results from sending an AtomicTransactionComposer transaction group.

#### simulate_response *: dict[str, Any] | None* *= None*

### algokit_utils.transactions.transaction_composer.populate_app_call_resources(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient) → algosdk.atomic_transaction_composer.AtomicTransactionComposer

Populate application call resources based on simulation results.

* **Parameters:**
* **atc** – The AtomicTransactionComposer containing transactions
* **algod** – Algod client for simulation
* **Returns:**
Modified AtomicTransactionComposer with populated resources

### algokit_utils.transactions.transaction_composer.prepare_group_for_sending(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient, populate_app_call_resources: bool | None = None, cover_app_call_inner_transaction_fees: bool | None = None, additional_atc_context: AdditionalAtcContext | None = None) → algosdk.atomic_transaction_composer.AtomicTransactionComposer

Prepare a transaction group for sending by handling execution info and resources.

* **Parameters:**
* **atc** – The AtomicTransactionComposer containing transactions
* **algod** – Algod client for simulation
* **populate_app_call_resources** – Whether to populate app call resources
* **cover_app_call_inner_transaction_fees** – Whether to cover inner txn fees
* **additional_atc_context** – Additional context for the AtomicTransactionComposer
* **Returns:**
Modified AtomicTransactionComposer ready for sending

### algokit_utils.transactions.transaction_composer.send_atomic_transaction_composer(atc: algosdk.atomic_transaction_composer.AtomicTransactionComposer, algod: algosdk.v2client.algod.AlgodClient, \*, max_rounds_to_wait: int | None = 5, skip_waiting: bool = False, suppress_log: bool | None = None, populate_app_call_resources: bool | None = None, cover_app_call_inner_transaction_fees: bool | None = None, additional_atc_context: AdditionalAtcContext | None = None) → [SendAtomicTransactionComposerResults](#algokit_utils.transactions.transaction_composer.SendAtomicTransactionComposerResults)

Send an AtomicTransactionComposer transaction group.
Expand Down Expand Up @@ -585,10 +606,9 @@ Supports various transaction types including payments, asset operations, applica
* **algod** – An instance of AlgodClient used to get suggested params and send transactions
* **get_signer** – A function that takes an address and returns a TransactionSigner for that address
* **get_suggested_params** – Optional function to get suggested transaction parameters,

defaults to using algod.suggested_params()
:param default_validity_window: Optional default validity window for transactions in rounds, defaults to 10
:param app_manager: Optional AppManager instance for compiling TEAL programs, defaults to None
defaults to using algod.suggested_params()
* **default_validity_window** – Optional default validity window for transactions in rounds, defaults to 10
* **app_manager** – Optional AppManager instance for compiling TEAL programs, defaults to None

#### add_transaction(transaction: algosdk.transaction.Transaction, signer: algosdk.atomic_transaction_composer.TransactionSigner | None = None) → [TransactionComposer](#algokit_utils.transactions.transaction_composer.TransactionComposer)

Expand Down Expand Up @@ -819,7 +839,7 @@ Simulate transaction group execution with configurable validation rules.
* **Parameters:**
* **allow_more_logs** – Whether to allow more logs than the standard limit
* **allow_empty_signatures** – Whether to allow transactions with empty signatures
* **allow_unnamed_resources** – Whether to allow unnamed resources
* **allow_unnamed_resources** – Whether to allow unnamed resources.
* **extra_opcode_budget** – Additional opcode budget to allocate
* **exec_trace_config** – Configuration for execution tracing
* **simulation_round** – Round number to simulate at
Expand Down
Loading
Loading