algokit-utils 3.0.0b6__py3-none-any.whl → 3.0.0b8__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.
Potentially problematic release.
This version of algokit-utils might be problematic. Click here for more details.
- algokit_utils/accounts/account_manager.py +1 -2
- algokit_utils/applications/abi.py +3 -0
- algokit_utils/clients/client_manager.py +1 -0
- algokit_utils/config.py +0 -9
- algokit_utils/models/account.py +27 -7
- algokit_utils/transactions/transaction_composer.py +12 -6
- {algokit_utils-3.0.0b6.dist-info → algokit_utils-3.0.0b8.dist-info}/METADATA +2 -2
- {algokit_utils-3.0.0b6.dist-info → algokit_utils-3.0.0b8.dist-info}/RECORD +10 -10
- {algokit_utils-3.0.0b6.dist-info → algokit_utils-3.0.0b8.dist-info}/LICENSE +0 -0
- {algokit_utils-3.0.0b6.dist-info → algokit_utils-3.0.0b8.dist-info}/WHEEL +0 -0
|
@@ -7,7 +7,6 @@ import algosdk
|
|
|
7
7
|
from algosdk import mnemonic
|
|
8
8
|
from algosdk.atomic_transaction_composer import TransactionSigner
|
|
9
9
|
from algosdk.mnemonic import to_private_key
|
|
10
|
-
from algosdk.transaction import LogicSigAccount as AlgosdkLogicSigAccount
|
|
11
10
|
from algosdk.transaction import SuggestedParams
|
|
12
11
|
from typing_extensions import Self
|
|
13
12
|
|
|
@@ -313,7 +312,7 @@ class AccountManager:
|
|
|
313
312
|
:param args: The (binary) arguments to pass into the logic signature
|
|
314
313
|
:returns: The registered AlgosdkLogicSigAccount instance
|
|
315
314
|
"""
|
|
316
|
-
logic_sig = LogicSigAccount(
|
|
315
|
+
logic_sig = LogicSigAccount(program, args)
|
|
317
316
|
self._accounts[logic_sig.address] = logic_sig
|
|
318
317
|
return logic_sig
|
|
319
318
|
|
|
@@ -51,12 +51,14 @@ class ABIReturn:
|
|
|
51
51
|
:ivar value: The decoded return value from the method call
|
|
52
52
|
:ivar method: The ABI method definition
|
|
53
53
|
:ivar decode_error: The exception that occurred during decoding, if any
|
|
54
|
+
:ivar tx_info: The transaction info for the method call from raw algosdk `ABIResult`
|
|
54
55
|
"""
|
|
55
56
|
|
|
56
57
|
raw_value: bytes | None = None
|
|
57
58
|
value: ABIValue | None = None
|
|
58
59
|
method: AlgorandABIMethod | None = None
|
|
59
60
|
decode_error: Exception | None = None
|
|
61
|
+
tx_info: dict[str, Any] | None = None
|
|
60
62
|
|
|
61
63
|
def __init__(self, result: ABIResult) -> None:
|
|
62
64
|
self.decode_error = result.decode_error
|
|
@@ -64,6 +66,7 @@ class ABIReturn:
|
|
|
64
66
|
self.raw_value = result.raw_value
|
|
65
67
|
self.value = result.return_value
|
|
66
68
|
self.method = result.method
|
|
69
|
+
self.tx_info = result.tx_info
|
|
67
70
|
|
|
68
71
|
@property
|
|
69
72
|
def is_success(self) -> bool:
|
algokit_utils/config.py
CHANGED
|
@@ -11,15 +11,6 @@ ALGOKIT_CONFIG_FILENAME = ".algokit.toml"
|
|
|
11
11
|
class AlgoKitLogger(logging.Logger):
|
|
12
12
|
def __init__(self, name: str = "algokit-utils-py", level: int = logging.NOTSET):
|
|
13
13
|
super().__init__(name, level)
|
|
14
|
-
self._setup_handler()
|
|
15
|
-
|
|
16
|
-
def _setup_handler(self) -> None:
|
|
17
|
-
# Only add the handler if no handlers are already set.
|
|
18
|
-
if not self.handlers:
|
|
19
|
-
formatter = logging.Formatter("%(levelname)s: %(message)s")
|
|
20
|
-
handler = logging.StreamHandler()
|
|
21
|
-
handler.setFormatter(formatter)
|
|
22
|
-
self.addHandler(handler)
|
|
23
14
|
|
|
24
15
|
def _log(self, level: int, msg: object, args, exc_info=None, extra=None, stack_info=False, stacklevel=1) -> None: # type: ignore[no-untyped-def] # noqa: FBT002, ANN001
|
|
25
16
|
"""
|
algokit_utils/models/account.py
CHANGED
|
@@ -9,6 +9,7 @@ from typing_extensions import deprecated
|
|
|
9
9
|
|
|
10
10
|
__all__ = [
|
|
11
11
|
"DISPENSER_ACCOUNT_NAME",
|
|
12
|
+
"LogicSigAccount",
|
|
12
13
|
"MultiSigAccount",
|
|
13
14
|
"MultisigMetadata",
|
|
14
15
|
"SigningAccount",
|
|
@@ -118,6 +119,14 @@ class MultiSigAccount:
|
|
|
118
119
|
[account.private_key for account in signing_accounts],
|
|
119
120
|
)
|
|
120
121
|
|
|
122
|
+
@property
|
|
123
|
+
def multisig(self) -> Multisig:
|
|
124
|
+
"""Get the underlying `algosdk.transaction.Multisig` object instance.
|
|
125
|
+
|
|
126
|
+
:return: The `algosdk.transaction.Multisig` object instance
|
|
127
|
+
"""
|
|
128
|
+
return self._multisig
|
|
129
|
+
|
|
121
130
|
@property
|
|
122
131
|
def params(self) -> MultisigMetadata:
|
|
123
132
|
"""Get the parameters for the multisig account.
|
|
@@ -173,20 +182,31 @@ class LogicSigAccount:
|
|
|
173
182
|
Provides functionality to manage and sign transactions for a logic sig account.
|
|
174
183
|
"""
|
|
175
184
|
|
|
176
|
-
_account: AlgosdkLogicSigAccount
|
|
177
185
|
_signer: LogicSigTransactionSigner
|
|
178
186
|
|
|
179
|
-
def __init__(self,
|
|
180
|
-
self.
|
|
181
|
-
|
|
187
|
+
def __init__(self, program: bytes, args: list[bytes] | None) -> None:
|
|
188
|
+
self._signer = LogicSigTransactionSigner(AlgosdkLogicSigAccount(program, args))
|
|
189
|
+
|
|
190
|
+
@property
|
|
191
|
+
def lsig(self) -> AlgosdkLogicSigAccount:
|
|
192
|
+
"""Get the underlying `algosdk.transaction.LogicSigAccount` object instance.
|
|
193
|
+
|
|
194
|
+
:return: The `algosdk.transaction.LogicSigAccount` object instance
|
|
195
|
+
"""
|
|
196
|
+
return self._signer.lsig
|
|
182
197
|
|
|
183
198
|
@property
|
|
184
199
|
def address(self) -> str:
|
|
185
|
-
"""Get the address of the
|
|
200
|
+
"""Get the address of the logic sig account.
|
|
186
201
|
|
|
187
|
-
|
|
202
|
+
If the LogicSig is delegated to another account, this will return the address of that account.
|
|
203
|
+
|
|
204
|
+
If the LogicSig is not delegated to another account, this will return an escrow address that is the hash of
|
|
205
|
+
the LogicSig's program code.
|
|
206
|
+
|
|
207
|
+
:return: The logic sig account address
|
|
188
208
|
"""
|
|
189
|
-
return self.
|
|
209
|
+
return self._signer.lsig.address()
|
|
190
210
|
|
|
191
211
|
@property
|
|
192
212
|
def signer(self) -> LogicSigTransactionSigner:
|
|
@@ -2111,18 +2111,24 @@ class TransactionComposer:
|
|
|
2111
2111
|
if not sdk_params["approval_program"] or not sdk_params["clear_program"]:
|
|
2112
2112
|
raise ValueError("approval_program and clear_program are required for application creation")
|
|
2113
2113
|
|
|
2114
|
-
|
|
2115
|
-
|
|
2114
|
+
schema = params.schema
|
|
2115
|
+
if not schema:
|
|
2116
|
+
schema = AppCreateSchema(
|
|
2117
|
+
global_ints=0,
|
|
2118
|
+
global_byte_slices=0,
|
|
2119
|
+
local_ints=0,
|
|
2120
|
+
local_byte_slices=0,
|
|
2121
|
+
)
|
|
2116
2122
|
|
|
2117
2123
|
txn_params = {
|
|
2118
2124
|
**txn_params,
|
|
2119
2125
|
"global_schema": algosdk.transaction.StateSchema(
|
|
2120
|
-
num_uints=
|
|
2121
|
-
num_byte_slices=
|
|
2126
|
+
num_uints=schema["global_ints"],
|
|
2127
|
+
num_byte_slices=schema["global_byte_slices"],
|
|
2122
2128
|
),
|
|
2123
2129
|
"local_schema": algosdk.transaction.StateSchema(
|
|
2124
|
-
num_uints=
|
|
2125
|
-
num_byte_slices=
|
|
2130
|
+
num_uints=schema["local_ints"],
|
|
2131
|
+
num_byte_slices=schema["local_byte_slices"],
|
|
2126
2132
|
),
|
|
2127
2133
|
"extra_pages": params.extra_program_pages
|
|
2128
2134
|
or calculate_extra_program_pages(approval_program, clear_program),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: algokit-utils
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.0b8
|
|
4
4
|
Summary: Utilities for Algorand development for use by AlgoKit
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Algorand Foundation
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: httpx (>=0.
|
|
15
|
+
Requires-Dist: httpx (>=0.23.1,<0.24.0)
|
|
16
16
|
Requires-Dist: py-algorand-sdk (>=2.4.0,<3.0.0)
|
|
17
17
|
Requires-Dist: typing-extensions (>=4.6.0)
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
@@ -14,13 +14,13 @@ algokit_utils/_legacy_v2/models.py,sha256=hH7aO50E4po4EgxXI9zdX5HTthn1HLfSLvkuPf
|
|
|
14
14
|
algokit_utils/_legacy_v2/network_clients.py,sha256=5nqC-47hreWvMxR-PQWs_QP44wJDAGhtS1MQv8JQ82o,5660
|
|
15
15
|
algokit_utils/account.py,sha256=gyGrBSoafUh8WV677IzYGkYoxtzzElsgxGMp4SgA4pk,410
|
|
16
16
|
algokit_utils/accounts/__init__.py,sha256=_LyY0se6TaQOes7vAcmbpt6pmG4VKlzfTt37-IjwimA,138
|
|
17
|
-
algokit_utils/accounts/account_manager.py,sha256
|
|
17
|
+
algokit_utils/accounts/account_manager.py,sha256=-yjs3ep_FpPHS8wHRmaYCnZdq_aSK6iAYuahxr0uPHY,39665
|
|
18
18
|
algokit_utils/accounts/kmd_account_manager.py,sha256=0flsU5T11JciyL0YvOKDHPVSm-ghV0RjJAbtm8JwrhU,6476
|
|
19
19
|
algokit_utils/algorand.py,sha256=Gtx3vspZmSxUrNWmh09NFQB24G4v4CEogYuRX_9o5Xw,10554
|
|
20
20
|
algokit_utils/application_client.py,sha256=5UIxXIBjukjRyjZPCeXmaNlAftbb3TziV7EfBolW79k,337
|
|
21
21
|
algokit_utils/application_specification.py,sha256=-ZM13Qv-AcLmwudJCq8xGPoWLvAvKBICgAdHeFozKbY,1416
|
|
22
22
|
algokit_utils/applications/__init__.py,sha256=NGjhpBeExsQZOAYCT2QUFag1xuKoFiX-Ux5SR2GNzd8,452
|
|
23
|
-
algokit_utils/applications/abi.py,sha256=
|
|
23
|
+
algokit_utils/applications/abi.py,sha256=IhrEUdg2kDzR4iU5_FzUDjlMIHO7Rfe-ibJ6z9CMUq8,10260
|
|
24
24
|
algokit_utils/applications/app_client.py,sha256=oAwe9_6-ETWJIdXNScDvUiVYN8JNP4kplSnr3qCQPVY,84979
|
|
25
25
|
algokit_utils/applications/app_deployer.py,sha256=MD7RIvh6Z6dFr9sx8dP5nP1DzSEbwz-vX-Exz_CwoN4,24740
|
|
26
26
|
algokit_utils/applications/app_factory.py,sha256=wljyXuXWaMc3KJkDeACJ5XVEfIsVxeSXqdGTJ9p3tJQ,33425
|
|
@@ -38,17 +38,17 @@ algokit_utils/beta/algorand_client.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_R
|
|
|
38
38
|
algokit_utils/beta/client_manager.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_RWXjc3vnE,213
|
|
39
39
|
algokit_utils/beta/composer.py,sha256=xDFvsMSha0Ki42BGvKvfScQWT_W9y4GeP_RWXjc3vnE,213
|
|
40
40
|
algokit_utils/clients/__init__.py,sha256=qUuKBvfLnw4z6ZU9x7mc-mLjfnnXC9UcvtoeU33ZLJ8,136
|
|
41
|
-
algokit_utils/clients/client_manager.py,sha256=
|
|
41
|
+
algokit_utils/clients/client_manager.py,sha256=zRbDDQMo1QocTvtgDVQnDXT8sPPwwcdM8rhJ5k27FZM,25581
|
|
42
42
|
algokit_utils/clients/dispenser_api_client.py,sha256=lx6II3beCt7YiKO2TrW6UbsRVirf3NoWMJi8HD_W5nI,6045
|
|
43
43
|
algokit_utils/common.py,sha256=5wl83vWw91RYdEC4hTTufqaptKiFtgjKLIyONDmRSH0,300
|
|
44
|
-
algokit_utils/config.py,sha256=
|
|
44
|
+
algokit_utils/config.py,sha256=SFqfR_JKlx-pCOps1xF646oZqtIcRS2AtasiYne63E4,6051
|
|
45
45
|
algokit_utils/deploy.py,sha256=UUtSDI6JcBUuto62FuirhUlDcjZwQyLkiERgDMx8P7A,330
|
|
46
46
|
algokit_utils/dispenser_api.py,sha256=-EO4Dq3q_v4kSMey43kXJfoX8uCBPJpjEMTlLI7xn_I,324
|
|
47
47
|
algokit_utils/errors/__init__.py,sha256=CmuiLVjzMAOYxPaIIwmYCNArsso_RtS2ssFoNdp5CMs,61
|
|
48
48
|
algokit_utils/errors/logic_error.py,sha256=uxqUOU9-D1R5TrKturCbmmWRVlB024Ca4CfVi8x_sgo,4104
|
|
49
49
|
algokit_utils/logic_error.py,sha256=3duw-l6tBr-DeapO0e0tYHoa9rOxP-QZZ6QWmN8L9tc,305
|
|
50
50
|
algokit_utils/models/__init__.py,sha256=0aB_c5pnkqKl1Z0hkxM9qbKn2qVdizZE2DvziN9ObqM,465
|
|
51
|
-
algokit_utils/models/account.py,sha256=
|
|
51
|
+
algokit_utils/models/account.py,sha256=eqGJvExzd7gDm3--DBDaIq6pJarxMPHZ-UySxZ9Qznk,6778
|
|
52
52
|
algokit_utils/models/amount.py,sha256=PcjzqRY5ThcUuSYHk1yeYgUooos1j2-54hBIJJcipd4,7567
|
|
53
53
|
algokit_utils/models/application.py,sha256=lM2_g5kZ18k_zyVzcbGvkvqHzksfb2sgRqowJ3pvUgo,1288
|
|
54
54
|
algokit_utils/models/network.py,sha256=3QNcZ9jVmckv3CCxrD2Y1jiwBdBGdaaziiRgOpsqhwI,904
|
|
@@ -61,10 +61,10 @@ algokit_utils/protocols/account.py,sha256=CowaVY7ErBP84TWBHNvBjkZy18whPb8HIlMZtJ
|
|
|
61
61
|
algokit_utils/protocols/typed_clients.py,sha256=UrQrHbN2SvS8pEFJ8JQodvouoWeBrQOQGZGyBQx1KLM,3322
|
|
62
62
|
algokit_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
algokit_utils/transactions/__init__.py,sha256=7fYF3m6DyOGzbV36MT5svo0wSkj9AIz496kWgIWSAlk,225
|
|
64
|
-
algokit_utils/transactions/transaction_composer.py,sha256=
|
|
64
|
+
algokit_utils/transactions/transaction_composer.py,sha256=kxoBy4DcFT8GCKrCIntUSOXMyJJgJ1RZGX0QdB7YAXQ,95287
|
|
65
65
|
algokit_utils/transactions/transaction_creator.py,sha256=A1YHeGC2EkR2V0HPYJiXVOAEIrfjBW2KVyYgi3exm4E,6167
|
|
66
66
|
algokit_utils/transactions/transaction_sender.py,sha256=uQmHElJgUIxLXfdklMNoabjQQzUku8CFP82wwhfr44E,22769
|
|
67
|
-
algokit_utils-3.0.
|
|
68
|
-
algokit_utils-3.0.
|
|
69
|
-
algokit_utils-3.0.
|
|
70
|
-
algokit_utils-3.0.
|
|
67
|
+
algokit_utils-3.0.0b8.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
|
|
68
|
+
algokit_utils-3.0.0b8.dist-info/METADATA,sha256=OqVqX28jUqd4GFWWSzHzJRNzbmUtD4rCiSuJNwh1IS8,2420
|
|
69
|
+
algokit_utils-3.0.0b8.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
70
|
+
algokit_utils-3.0.0b8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|