algokit-utils 3.0.0b7__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.

@@ -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(AlgosdkLogicSigAccount(program, args))
315
+ logic_sig = LogicSigAccount(program, args)
317
316
  self._accounts[logic_sig.address] = logic_sig
318
317
  return logic_sig
319
318
 
@@ -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, account: AlgosdkLogicSigAccount) -> None:
180
- self._account = account
181
- self._signer = LogicSigTransactionSigner(account)
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 multisig account.
200
+ """Get the address of the logic sig account.
186
201
 
187
- :return: The multisig account address
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._account.address()
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
- if not params.schema:
2115
- raise ValueError("schema is required for application creation")
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=params.schema.get("global_ints", 0),
2121
- num_byte_slices=params.schema.get("global_byte_slices", 0),
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=params.schema.get("local_ints", 0),
2125
- num_byte_slices=params.schema.get("local_byte_slices", 0),
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.0b7
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
@@ -14,7 +14,7 @@ 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=zr8NV6k9L8xESzsmbFK06T-DOmVEvHWcoHgIIX5SDcQ,39763
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
@@ -48,7 +48,7 @@ algokit_utils/errors/__init__.py,sha256=CmuiLVjzMAOYxPaIIwmYCNArsso_RtS2ssFoNdp5
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=TdeKjhYkppD8g0DYRGbnCsi8zfPz3zU74DaZte_CYJw,6014
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=QA5j3l-UhnaCoohN9Pri8t_bPJrOrZh3ogYQf4FwDm0,95183
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.0b7.dist-info/LICENSE,sha256=J5i7U1Q9Q2c7saUzlvFRmrCCFhQyXb5Juz_LO5omNUw,1076
68
- algokit_utils-3.0.0b7.dist-info/METADATA,sha256=3dnyhhb2GQYO2_jC_wNVrmbHWoCQBIk2wxyEb5F34r0,2420
69
- algokit_utils-3.0.0b7.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
70
- algokit_utils-3.0.0b7.dist-info/RECORD,,
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,,