Releases: algorandfoundation/algokit-utils-ts
Releases · algorandfoundation/algokit-utils-ts
v7.0.0-beta.10
7.0.0-beta.10 (2024-10-06)
⚠ BREAKING CHANGES
- Technically this is a breaking change, but typed generator
was incorrectly classing them as number and otherwise people were using ABIValue
which doesn't specify the type so detection is ideally needed anyway so impact is likely low.
Features
v7.0.0-beta.9
7.0.0-beta.9 (2024-10-05)
⚠ BREAKING CHANGES
- AppClient.compile (and appClient.compile, and appFactory.compile) return
compiledApproval
andcompiledClear
again
This reverted the last commit after a reflection that the more explicit naming was actually confusing since it meant
the return of this method different from the return from create/update calls and consistency was better. The fact there is now jsdoc
comments means that the property names from the compile method are able to be quickly understood.
Features
- Readonly calls from app client now don't invoke signing (#321) (9c3897e)
- feat: AlgoKitComposer.simulate() now has a
skipSignatures
option to opt-out of signing for the simulate call - feat: Added a
defaultSigner
toAppClient
andAppFactory
- feat:
AppClient
now has analgorand
property so you don't need to passAlgorandClient
around everywhere if you have a client - feat:
AppFactory
now has analgorand
property so you don't need to passAlgorandClient
around everywhere if you have a factory - feat:
AppFactory
now hasappName
andappSpec
properties so if you want this information it's exposed rather than private - feat:
appFactory.deploy
now allows you to overrideappName
so if you want to create multiple contracts from a factory with different names you can
v7.0.0-beta.8
7.0.0-beta.8 (2024-10-01)
Bug Fixes
v7.0.0-beta.7
7.0.0-beta.7 (2024-09-29)
⚠ BREAKING CHANGES
Various breaking changes since initial v7 beta
ExecuteParams
->SendParams
sendAtomicTransactionComposer
takes a params object that extendsSendParams
nowalgorand.transactions.
is nowalgorand.createTransaction.
appClient.transactions.
is nowappClient.createTransaction.
appFactory.create/deploy
now returns the app client in anappClient
property rather than anapp
propertyappFactory.create
is nowappFactory.send.create
andappFactory.send.bare.create
Features
- Renamed app client and algorand client properties for more obvious and consistent naming
- Make the compile method public in app factory and app client
- Improving error stack trace propagation from sendAtomicTransactionComposer
- Added
setSigners
onAccountManager
so you can copy signers from oneAccountManager
to another - Added transaction creation to app factory
- Rename
execute
onAlgoKitComposer
tosend
for consistency - Removing use of Expand<> inline in method calls since it results in a sub-par experience in the npm consumed package
- Updated to latest ARC-56 spec
- Updated docs for v7
v7.0.0-beta.6
7.0.0-beta.6 (2024-09-27)
v7.0.0-beta.5
v7.0.0-beta.4
7.0.0-beta.4 (2024-09-19)
AlgorandClient
deprecation pass of app-client, transaction and debugging modules (last ones left!) and associated documentation changes. Also added a v7 migration guide.
⚠ BREAKING CHANGES
- Moved
ExecuteParams
type from/types/composer
to/types/transaction
executeParams
inparams
input toappDeployer.deploy
collapsed into the params object itself (not a breaking change from v6 since this is a new feature from last pull request)persistSourceMaps
now takesappManager
rather thanclient
microAlgos
property inAlgoAmount
instances now returns abigint
rather than anumber
Deprecations
getAppClient
->algorand.client.getAppClientById
,algorand.client.getAppClientByCreatorAndName
oralgorand.client.getAppFactory
(for create or deploy)getAppClientById
->algorand.client.getAppClientById
oralgorand.client.getAppFactory
(for create or deploy)getAppClientByCreatorAndName
->algorand.client.getAppClientByCreatorAndName
oralgorand.client.getAppFactory
(for create or deploy)encodeTransactionNote
->AlgoKitComposer.arc2Note
for ARC-2 and let devs convert tostring
orUint8Array
themselves otherwisegetSenderAddress
-> Usealgorand.client
to interact with accounts, and use.addr
to get the address and/or move from usingSendTransactionFrom
toTransactionSignerAccount
and use.addr
instead.getTransactionWithSigner
-> UseAlgorandClient
/AlgoKitComposer
to construct transactions instead or construct analgosdk.TransactionWithSigner
manually instead.getSenderTransactionSigner
-> UseTransactionSignerAccount
instead ofSendTransactionFrom
or usealgosdk.makeBasicAccountTransactionSigner
/algosdk.makeLogicSigAccountTransactionSigner
.signTransaction
-> UseAlgorandClient
/AlgoKitComposer
to sign transactions or use the relevant underlyingaccount.signTxn
/algosdk.signLogicSigTransactionObject
/multiSigAccount.sign
/TransactionSigner
methods directly.sendTransaction
-> UseAlgorandClient
/AlgoKitComposer
to send transactions.sendParams
property in the input tosendAtomicTransactionComposer
-> newexecuteParams
propertyperformAtomicTransactionComposerDryrun
(deprecated Algorand feature)sendGroupOfTransactions
-> UseAlgoKitComposer
(algorand.newGroup()
) orAtomicTransactionComposer
to construct and send group transactions instead.capTransactionFee
-> UseAlgoKitComposer
and themaxFee
field in the transaction params instead.controlFees
-> UseAlgoKitComposer
and themaxFee
andstaticFee
fields in the transaction params instead.getTransactionParams
-> UsesuggestedParams ? { ...suggestedParams } : await algod.getTransactionParams().do()
instead (AlgoKitComposer
takes care of this for you so not likely to be needed anymore)getAtomicTransactionComposerTransactions
-> Useatc.clone().buildGroup()
instead.ApplicationClient
->AppClient
andAppFactory
algorand.client.getAppClientByCreatorAndName
returns anAppClient
rather than anApplicationClient
algorand.client.getAppClientById
returns anAppClient
rather than anApplicationClient
New features
- Added
appManager.getGlobalState
- Added
AlgorandClientInterface
type to decouple taking a dependency onAlgorandClient
with creation of a circular dependency loop - Added current draft ARC-56 types to
/types/app-arc56
with the root type beingArc56Contract
- Added
getABIEncodedValue
,getABIDecodedValue
, andgetTupleType
methods to/types/app-arc56
that allow you to encode and decode ABI values that use ARC-56 type strings (may reference structs, which can be nested) - Added
AppFactory
andAppClient
classes and addedalgorand.client.getAppFactory
andalgorand.client.getAppClientByNetwork
methods (and changedalgorand.client.getAppId
andalgorand.client.getAppClientByCreatorAndName
now returnAppClient
) - Added
arc32ToArc56
method to/types/app-spec
to allow conversion from ARC-32 to ARC-56 for backwards compatibility - Added
addTransaction
toAlgoKitComposer
so you can add a transaction (with optional signer) to the transaction group - Added
simulate
toAlgoKitComposer
so you can simulate a transaction group - Added
AlgoKitComposer.arc2Note
method to get an ARC-2 transaction note
Migration guide
A migration guide has been created for v7
v7.0.0-beta.3
v7.0.0-beta.2
7.0.0-beta.2 (2024-09-04)
Deprecations
createApp
->algorand.send.appCreate()
/algorand.transactions.appCreate()
/algorand.send.appCreateMethodCall()
/algorand.transactions.appCreateMethodCall()
updateApp
->algorand.send.appUpdate()
/algorand.transactions.appUpdate()
/algorand.send.appUpdateMethodCall()
/algorand.transactions.appUpdateMethodCall()
callApp
->algorand.send.appUpdate()
/algorand.transactions.appUpdate()
/algorand.send.appUpdateMethodCall()
/algorand.transactions.appUpdateMethodCall()
deployApp
->algorand.appDeployer.deploy
getCreatorAppsByName
->algorand.appDeployer.getCreatorAppsByName
getABIReturn
->AppManager.getABIReturn
getAppGlobalState
->(await appManager.getById(appId)).globalState
getAppLocalState
->algorand.app.getLocalState
getAppBoxNames
->algorand.app.getBoxNames
getAppBoxValue
->algorand.app.getBoxValue
getAppBoxValues
->algorand.app.getBoxValues
getAppBoxValueFromABIType
->algorand.app.getAppBoxValueFromABIType
getBoxValueFromABIType
->algorand.app.getAppBoxValuesFromABIType
decodeAppState
->AppManager.decodeAppState
getBoxReference
->AppManager.getBoxReference
getAppById
->algorand.app.getById
compileTeal
->algorand.app.compileTeal
performTemplateSubstitutionAndCompile
->algorand.appManager.compileTealTemplate
replaceDeployTimeControlParams
->AppManager.replaceTealTemplateDeployTimeControlParams
performTemplateSubstitution
->AppManager.replaceTealTemplateParams
stripTealComments
->AppManager.stripTealComments
getAppOnCompleteAction
->algosdk.OnApplicationComplete
getABIMethodSignature
->abiMethod.getSignature()
/new ABIMethod(abiMethodParams).getSignature()
getAppArgsForTransaction
getAppArgsForABICall
isSchemaIsBroken
getAppDeploymentTransactionNote
Updates
- Fixed numerous bugs in
AlgoKitComposer
related to handling app call transactions build
onAlgoKitComposer
now returns ABI method call objects for transactions that had them so you can resolve ABI return values
New functionality
AppManager
class andalgorand.app
AppDeployer
class andalgorand.appDeployer
AlgoKitComposer.arc2Note
to allow constructing an ARC-2 transaction notecount
method inAlgoKitComposer
to support retrieving current number of transactionsbuildTransactions
method inAlgoKitComposer
to support building transactions without needing a signer present and switched to using that fromalgorand.transactions
- Added support for
populateAppCallResources
toAlgoKitComposer
algorand.client.indexerIfPresent
so you can optionally retrieve indexer if it's presentalgorand.send/transactions.{appMethods}
for the following methods:appCreate
,appCreateMethodCall
,appUpdate
,appUpdateMethodCall
,appDelete
,appDeleteMethodCall
,appCall
,appCallMethodCall
and correspondingaddX
methods inAlgoKitComposer
/algorand.newGroup()
- TEAL compilation caching (within
AppManager
instance) - AppLookup caching (within
AppDeployer
instance)
⚠ BREAKING CHANGES
v7.0.0-beta.1
7.0.0-beta.1 (2024-08-28)
⚠ BREAKING CHANGES
- Renamed
AlgokitComposer
toAlgoKitComposer
to match AlgoKit naming conventions - Collapsed the second object in algorand.send.type(params, executeOptions) to combine into params and make it easier to use based on devrel feedback
- Order of
algorand.account.rekeyed()
parameters to berekeyed(sender, signer)
since it conceptually makes more sense (the sender is rekeyed so should come first) - All microAlgo return values from
algorand.account.getInformation()
now return anAlgoAmount
, renamedamount
tobalance
andround
tovalidAsOfRound
(which is now abigint
for broader consistency) - Renamed
algorand.account.getAssetInformation
toalgorand.asset.getAccountInformation
Features
- Deprecate transfer and asset modules (#291) (b2c0f91)
- Added:
- Return value of
algorand.send.assetCreate
now includes{ assetId: bigint }
- Up to date documentation for rekeyAccount, AlgorandClient, asset, dispenser client, indexer, testing, transfer
- Up to date documentation for how to refer to an Algo amount (Algo (not plural) in general and ALGO (not plural) when referring to a specific amount)
AssetManager
class andalgorand.asset.getById()
,algorand.asset.bulkOptIn
, andalgorand.asset.bulkOptOut
indexer
export off of@algorandfoundation/algokit-utils
as the future home of all indexer methods- Added
algorand.client.getTestNetDispenserFromEnvironment
- Added
algorand.account.assetBulkOptIn
- Added
algorand.account.assetBulkOptOut
- Added
algorand.account.ensureFunded
- Added
algorand.account.ensureFundedFromEnvironment
- Added
algorand.account.ensureFundedFromTestNetDispenserApi
- Added
algorand.account.rekeyAccount
- Added
algorand.send/transaction.assetOptOut
- Added
buildTransactions
method toAlgoKitComposer
so you can build transactions without needing to register a signer - Added
.algo
and.microAlgo
methods/properties in place of the plural version forAlgoAmount
to reflect the current guidance on how to represent Algo amounts, kept previous versions of those methods for now to avoid the breaking change
- Return value of
- Deprecated the following in favour of AlgorandClient functionality:
algokit.createAsset
algokit.assetOptIn
algokit.assetOptOut
algokit.assetBulkOptIn
algokit.assetBulkOptOut
algokit.ensureFunded
algokit.transferAsset
algokit.rekeyAccount
algokit.transferAlgos