algokit_utils.models
Classes
ABIReturnSubroutine | Base class for protocol classes. |
---|---|
ABITransactionResponse | Response for an ABI call |
Account | Holds the private_key and address for an account |
CommonCallParameters | Deprecated, use TransactionParameters instead |
CommonCallParametersDict | Deprecated, use TransactionParametersDict instead |
CreateCallParameters | Additional parameters that can be included in a transaction when using the ApplicationClient.create/compose_create methods |
CreateCallParametersDict | Additional parameters that can be included in a transaction when using the ApplicationClient.create/compose_create methods |
CreateTransactionParameters | Additional parameters that can be included in a transaction when calling a create method |
OnCompleteCallParameters | Additional parameters that can be included in a transaction when using the ApplicationClient.call/compose_call methods |
OnCompleteCallParametersDict | Additional parameters that can be included in a transaction when using the ApplicationClient.call/compose_call methods |
RawTransactionParameters | Deprecated, use TransactionParameters instead |
TransactionParameters | Additional parameters that can be included in a transaction |
TransactionParametersDict | Additional parameters that can be included in a transaction |
TransactionResponse | Response for a non ABI call |
API
class algokit_utils.models.ABIReturnSubroutine
ABIReturnSubroutine
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example::
class C: def meth(self) -> int: return 0
def func(x: Proto) -> int: return x.meth()
func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::
class GenProto[T](Protocol): def meth(self) -> T: ...
class algokit_utils.models.ABITransactionResponse
ABITransactionResponse
Response for an ABI call
confirmed_round
confirmed_round : int | None
None
Round transaction was confirmed, None
if call was a from a dry-run
decode_error
decode_error : Exception | None
None
Details of error that occurred when attempting to decode raw_value
static from_atr
from_atr(result: algosdk.atomic_transaction_composer.AtomicTransactionResponse | algosdk.atomic_transaction_composer.SimulateAtomicTransactionResponse, transaction_index: int = -1) → algokit_utils.models.TransactionResponse
Returns either an ABITransactionResponse or a TransactionResponse based on the type of the transaction referred to by transaction_index :param AtomicTransactionResponse result: Result containing one or more transactions :param int transaction_index: Which transaction in the result to return, defaults to -1 (the last transaction)
method
method : algosdk.abi.Method
None
ABI method used to make call
raw_value
raw_value : bytes
None
The raw response before ABI decoding
return_value
return_value : algokit_utils.models.ReturnType
None
Decoded ABI result
tx_id
tx_id : str
None
Transaction Id
tx_info
tx_info : dict
None
Details of transaction
class algokit_utils.models.Account
Account
Holds the private_key and address for an account
address
address : str
‘field(…)’
Address for this account
private_key
private_key : str
None
Base64 encoded private key
property public_key
public_key : bytes
The public key for this account
property signer
signer : algosdk.atomic_transaction_composer.AccountTransactionSigner
An AccountTransactionSigner for this account
class algokit_utils.models.CommonCallParameters
CommonCallParameters
Deprecated, use TransactionParameters instead
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.CommonCallParametersDict
CommonCallParametersDict
Deprecated, use TransactionParametersDict instead
Initialization
Initialize self. See help(type(self)) for accurate signature.
__contains__
contains()
True if the dictionary has the specified key, else False.
__delattr__
delattr()
Implement delattr(self, name).
__delitem__
delitem()
Delete self[key].
__dir__
dir()
Default dir() implementation.
__eq__
eq()
Return self==value.
__format__
format()
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
__ge__
ge()
Return self>=value.
__getattribute__
getattribute()
Return getattr(self, name).
__getitem__
getitem()
Return self[key].
__getstate__
getstate()
Helper for pickle.
__gt__
gt()
Return self>value.
__ior__
ior()
Return self|=value.
__iter__
iter()
Implement iter(self).
__le__
le()
Return self<=value.
__len__
len()
Return len(self).
__lt__
lt()
Return self<value.
__ne__
ne()
Return self!=value.
__new__
new()
Create and return a new object. See help(type) for accurate signature.
__or__
or()
Return self|value.
__reduce__
reduce()
Helper for pickle.
__reduce_ex__
reduce_ex()
Helper for pickle.
__repr__
repr()
Return repr(self).
__reversed__
reversed()
Return a reverse iterator over the dict keys.
__ror__
ror()
Return value|self.
__setattr__
setattr()
Implement setattr(self, name, value).
__setitem__
setitem()
Set self[key] to value.
__sizeof__
sizeof()
D.sizeof() -> size of D in memory, in bytes
__str__
str()
Return str(self).
accounts
accounts : list[str]
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]]
None
Box references to include in transaction. A sequence of (app id, box key) tuples
clear
clear()
D.clear() -> None. Remove all items from D.
copy
copy()
D.copy() -> a shallow copy of D
foreign_apps
foreign_apps : list[int]
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int]
None
List of foreign assets (by asset id) to include in transaction
get
get()
Return the value for key if key is in the dictionary, else default.
items
items()
D.items() -> a set-like object providing a view on D’s items
keys
keys()
D.keys() -> a set-like object providing a view on D’s keys
lease
lease : bytes | str
None
Lease value for this transaction
note
note : bytes | str
None
Note for this transaction
pop
pop()
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
rekey_to
rekey_to : str
None
Address to rekey to
sender
sender : str
None
Sender of this transaction
setdefault
setdefault()
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams
None
SuggestedParams to use for this transaction
update
update()
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
values()
D.values() -> an object providing a view on D’s values
class algokit_utils.models.CreateCallParameters
CreateCallParameters
Additional parameters that can be included in a transaction when using the ApplicationClient.create/compose_create methods
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.CreateCallParametersDict
CreateCallParametersDict
Additional parameters that can be included in a transaction when using the ApplicationClient.create/compose_create methods
Initialization
Initialize self. See help(type(self)) for accurate signature.
__contains__
contains()
True if the dictionary has the specified key, else False.
__delattr__
delattr()
Implement delattr(self, name).
__delitem__
delitem()
Delete self[key].
__dir__
dir()
Default dir() implementation.
__eq__
eq()
Return self==value.
__format__
format()
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
__ge__
ge()
Return self>=value.
__getattribute__
getattribute()
Return getattr(self, name).
__getitem__
getitem()
Return self[key].
__getstate__
getstate()
Helper for pickle.
__gt__
gt()
Return self>value.
__ior__
ior()
Return self|=value.
__iter__
iter()
Implement iter(self).
__le__
le()
Return self<=value.
__len__
len()
Return len(self).
__lt__
lt()
Return self<value.
__ne__
ne()
Return self!=value.
__new__
new()
Create and return a new object. See help(type) for accurate signature.
__or__
or()
Return self|value.
__reduce__
reduce()
Helper for pickle.
__reduce_ex__
reduce_ex()
Helper for pickle.
__repr__
repr()
Return repr(self).
__reversed__
reversed()
Return a reverse iterator over the dict keys.
__ror__
ror()
Return value|self.
__setattr__
setattr()
Implement setattr(self, name, value).
__setitem__
setitem()
Set self[key] to value.
__sizeof__
sizeof()
D.sizeof() -> size of D in memory, in bytes
__str__
str()
Return str(self).
accounts
accounts : list[str]
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]]
None
Box references to include in transaction. A sequence of (app id, box key) tuples
clear
clear()
D.clear() -> None. Remove all items from D.
copy
copy()
D.copy() -> a shallow copy of D
foreign_apps
foreign_apps : list[int]
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int]
None
List of foreign assets (by asset id) to include in transaction
get
get()
Return the value for key if key is in the dictionary, else default.
items
items()
D.items() -> a set-like object providing a view on D’s items
keys
keys()
D.keys() -> a set-like object providing a view on D’s keys
lease
lease : bytes | str
None
Lease value for this transaction
note
note : bytes | str
None
Note for this transaction
pop
pop()
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
rekey_to
rekey_to : str
None
Address to rekey to
sender
sender : str
None
Sender of this transaction
setdefault
setdefault()
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams
None
SuggestedParams to use for this transaction
update
update()
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
values()
D.values() -> an object providing a view on D’s values
class algokit_utils.models.CreateTransactionParameters
CreateTransactionParameters
Additional parameters that can be included in a transaction when calling a create method
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.OnCompleteCallParameters
OnCompleteCallParameters
Additional parameters that can be included in a transaction when using the ApplicationClient.call/compose_call methods
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.OnCompleteCallParametersDict
OnCompleteCallParametersDict
Additional parameters that can be included in a transaction when using the ApplicationClient.call/compose_call methods
Initialization
Initialize self. See help(type(self)) for accurate signature.
__contains__
contains()
True if the dictionary has the specified key, else False.
__delattr__
delattr()
Implement delattr(self, name).
__delitem__
delitem()
Delete self[key].
__dir__
dir()
Default dir() implementation.
__eq__
eq()
Return self==value.
__format__
format()
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
__ge__
ge()
Return self>=value.
__getattribute__
getattribute()
Return getattr(self, name).
__getitem__
getitem()
Return self[key].
__getstate__
getstate()
Helper for pickle.
__gt__
gt()
Return self>value.
__ior__
ior()
Return self|=value.
__iter__
iter()
Implement iter(self).
__le__
le()
Return self<=value.
__len__
len()
Return len(self).
__lt__
lt()
Return self<value.
__ne__
ne()
Return self!=value.
__new__
new()
Create and return a new object. See help(type) for accurate signature.
__or__
or()
Return self|value.
__reduce__
reduce()
Helper for pickle.
__reduce_ex__
reduce_ex()
Helper for pickle.
__repr__
repr()
Return repr(self).
__reversed__
reversed()
Return a reverse iterator over the dict keys.
__ror__
ror()
Return value|self.
__setattr__
setattr()
Implement setattr(self, name, value).
__setitem__
setitem()
Set self[key] to value.
__sizeof__
sizeof()
D.sizeof() -> size of D in memory, in bytes
__str__
str()
Return str(self).
accounts
accounts : list[str]
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]]
None
Box references to include in transaction. A sequence of (app id, box key) tuples
clear
clear()
D.clear() -> None. Remove all items from D.
copy
copy()
D.copy() -> a shallow copy of D
foreign_apps
foreign_apps : list[int]
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int]
None
List of foreign assets (by asset id) to include in transaction
get
get()
Return the value for key if key is in the dictionary, else default.
items
items()
D.items() -> a set-like object providing a view on D’s items
keys
keys()
D.keys() -> a set-like object providing a view on D’s keys
lease
lease : bytes | str
None
Lease value for this transaction
note
note : bytes | str
None
Note for this transaction
pop
pop()
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
rekey_to
rekey_to : str
None
Address to rekey to
sender
sender : str
None
Sender of this transaction
setdefault
setdefault()
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams
None
SuggestedParams to use for this transaction
update
update()
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
values()
D.values() -> an object providing a view on D’s values
class algokit_utils.models.RawTransactionParameters
RawTransactionParameters
Deprecated, use TransactionParameters instead
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.TransactionParameters
TransactionParameters
Additional parameters that can be included in a transaction
accounts
accounts : list[str] | None
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]] | None
None
Box references to include in transaction. A sequence of (app id, box key) tuples
foreign_apps
foreign_apps : list[int] | None
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int] | None
None
List of foreign assets (by asset id) to include in transaction
lease
lease : bytes | str | None
None
Lease value for this transaction
note
note : bytes | str | None
None
Note for this transaction
rekey_to
rekey_to : str | None
None
Address to rekey to
sender
sender : str | None
None
Sender of this transaction
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner | None
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams | None
None
SuggestedParams to use for this transaction
class algokit_utils.models.TransactionParametersDict
TransactionParametersDict
Additional parameters that can be included in a transaction
Initialization
Initialize self. See help(type(self)) for accurate signature.
__contains__
contains()
True if the dictionary has the specified key, else False.
__delattr__
delattr()
Implement delattr(self, name).
__delitem__
delitem()
Delete self[key].
__dir__
dir()
Default dir() implementation.
__eq__
eq()
Return self==value.
__format__
format()
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
__ge__
ge()
Return self>=value.
__getattribute__
getattribute()
Return getattr(self, name).
__getitem__
getitem()
Return self[key].
__getstate__
getstate()
Helper for pickle.
__gt__
gt()
Return self>value.
__ior__
ior()
Return self|=value.
__iter__
iter()
Implement iter(self).
__le__
le()
Return self<=value.
__len__
len()
Return len(self).
__lt__
lt()
Return self<value.
__ne__
ne()
Return self!=value.
__new__
new()
Create and return a new object. See help(type) for accurate signature.
__or__
or()
Return self|value.
__reduce__
reduce()
Helper for pickle.
__reduce_ex__
reduce_ex()
Helper for pickle.
__repr__
repr()
Return repr(self).
__reversed__
reversed()
Return a reverse iterator over the dict keys.
__ror__
ror()
Return value|self.
__setattr__
setattr()
Implement setattr(self, name, value).
__setitem__
setitem()
Set self[key] to value.
__sizeof__
sizeof()
D.sizeof() -> size of D in memory, in bytes
__str__
str()
Return str(self).
accounts
accounts : list[str]
None
Accounts to include in transaction
boxes
boxes : collections.abc.Sequence[tuple[int, bytes | bytearray | str | int]]
None
Box references to include in transaction. A sequence of (app id, box key) tuples
clear
clear()
D.clear() -> None. Remove all items from D.
copy
copy()
D.copy() -> a shallow copy of D
foreign_apps
foreign_apps : list[int]
None
List of foreign apps (by app id) to include in transaction
foreign_assets
foreign_assets : list[int]
None
List of foreign assets (by asset id) to include in transaction
get
get()
Return the value for key if key is in the dictionary, else default.
items
items()
D.items() -> a set-like object providing a view on D’s items
keys
keys()
D.keys() -> a set-like object providing a view on D’s keys
lease
lease : bytes | str
None
Lease value for this transaction
note
note : bytes | str
None
Note for this transaction
pop
pop()
D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
rekey_to
rekey_to : str
None
Address to rekey to
sender
sender : str
None
Sender of this transaction
setdefault
setdefault()
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
signer
signer : algosdk.atomic_transaction_composer.TransactionSigner
None
Signer to use when signing this transaction
suggested_params
suggested_params : algosdk.transaction.SuggestedParams
None
SuggestedParams to use for this transaction
update
update()
D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
values()
D.values() -> an object providing a view on D’s values
class algokit_utils.models.TransactionResponse
TransactionResponse
Response for a non ABI call
confirmed_round
confirmed_round : int | None
None
Round transaction was confirmed, None
if call was a from a dry-run
static from_atr
from_atr(result: algosdk.atomic_transaction_composer.AtomicTransactionResponse | algosdk.atomic_transaction_composer.SimulateAtomicTransactionResponse, transaction_index: int = -1) → algokit_utils.models.TransactionResponse
Returns either an ABITransactionResponse or a TransactionResponse based on the type of the transaction referred to by transaction_index :param AtomicTransactionResponse result: Result containing one or more transactions :param int transaction_index: Which transaction in the result to return, defaults to -1 (the last transaction)
tx_id
tx_id : str
None
Transaction Id