Skip to content

Releases: algorandfoundation/algokit-utils-ts

v7.0.0-beta.10

06 Oct 13:10
ee8338a
Compare
Choose a tag to compare
v7.0.0-beta.10 Pre-release
Pre-release

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

  • Convert ABI return values that are uint<53 to number rather than bigint (#322) (ee8338a)
  • When simulating a readonly call, populate app call resources by default

v7.0.0-beta.9

05 Oct 04:24
9c3897e
Compare
Choose a tag to compare
v7.0.0-beta.9 Pre-release
Pre-release

7.0.0-beta.9 (2024-10-05)

⚠ BREAKING CHANGES

  • AppClient.compile (and appClient.compile, and appFactory.compile) return compiledApproval and compiledClear 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 to AppClient and AppFactory
  • feat: AppClient now has an algorand property so you don't need to pass AlgorandClient around everywhere if you have a client
  • feat: AppFactory now has an algorand property so you don't need to pass AlgorandClient around everywhere if you have a factory
  • feat: AppFactory now has appName and appSpec properties so if you want this information it's exposed rather than private
  • feat: appFactory.deploy now allows you to override appName so if you want to create multiple contracts from a factory with different names you can

v7.0.0-beta.8

01 Oct 18:41
ced7cb8
Compare
Choose a tag to compare
v7.0.0-beta.8 Pre-release
Pre-release

7.0.0-beta.8 (2024-10-01)

Bug Fixes

  • Solving problem with populate resources not working for readonly calls (#319) (ced7cb8)

v7.0.0-beta.7

29 Sep 16:03
Compare
Choose a tag to compare
v7.0.0-beta.7 Pre-release
Pre-release

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 extends SendParams now
  • algorand.transactions. is now algorand.createTransaction.
  • appClient.transactions. is now appClient.createTransaction.
  • appFactory.create/deploy now returns the app client in an appClient property rather than an app property
  • appFactory.create is now appFactory.send.create and appFactory.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 on AccountManager so you can copy signers from one AccountManager to another
  • Added transaction creation to app factory
  • Rename execute on AlgoKitComposer to send 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

27 Sep 15:18
ca4554c
Compare
Choose a tag to compare
v7.0.0-beta.6 Pre-release
Pre-release

7.0.0-beta.6 (2024-09-27)

v7.0.0-beta.5

27 Sep 02:34
7c1fabb
Compare
Choose a tag to compare
v7.0.0-beta.5 Pre-release
Pre-release

7.0.0-beta.5 (2024-09-27)

Bug Fixes

v7.0.0-beta.4

19 Sep 02:32
0cd0743
Compare
Choose a tag to compare
v7.0.0-beta.4 Pre-release
Pre-release

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 in params input to appDeployer.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 takes appManager rather than client
  • microAlgos property in AlgoAmount instances now returns a bigint rather than a number

Deprecations

  • getAppClient -> algorand.client.getAppClientById, algorand.client.getAppClientByCreatorAndName or algorand.client.getAppFactory (for create or deploy)
  • getAppClientById -> algorand.client.getAppClientById or algorand.client.getAppFactory (for create or deploy)
  • getAppClientByCreatorAndName -> algorand.client.getAppClientByCreatorAndName or algorand.client.getAppFactory (for create or deploy)
  • encodeTransactionNote -> AlgoKitComposer.arc2Note for ARC-2 and let devs convert to string or Uint8Array themselves otherwise
  • getSenderAddress -> Use algorand.client to interact with accounts, and use .addr to get the address and/or move from using SendTransactionFrom to TransactionSignerAccount and use .addr instead.
  • getTransactionWithSigner -> Use AlgorandClient / AlgoKitComposer to construct transactions instead or construct an algosdk.TransactionWithSigner manually instead.
  • getSenderTransactionSigner -> Use TransactionSignerAccount instead of SendTransactionFrom or use algosdk.makeBasicAccountTransactionSigner / algosdk.makeLogicSigAccountTransactionSigner.
  • signTransaction -> Use AlgorandClient / AlgoKitComposer to sign transactions or use the relevant underlying account.signTxn / algosdk.signLogicSigTransactionObject / multiSigAccount.sign / TransactionSigner methods directly.
  • sendTransaction -> Use AlgorandClient / AlgoKitComposer to send transactions.
  • sendParams property in the input to sendAtomicTransactionComposer -> new executeParams property
  • performAtomicTransactionComposerDryrun (deprecated Algorand feature)
  • sendGroupOfTransactions -> Use AlgoKitComposer (algorand.newGroup()) or AtomicTransactionComposer to construct and send group transactions instead.
  • capTransactionFee -> Use AlgoKitComposer and the maxFee field in the transaction params instead.
  • controlFees -> Use AlgoKitComposer and the maxFee and staticFee fields in the transaction params instead.
  • getTransactionParams -> Use suggestedParams ? { ...suggestedParams } : await algod.getTransactionParams().do() instead (AlgoKitComposer takes care of this for you so not likely to be needed anymore)
  • getAtomicTransactionComposerTransactions -> Use atc.clone().buildGroup() instead.
  • ApplicationClient -> AppClient and AppFactory
  • algorand.client.getAppClientByCreatorAndName returns an AppClient rather than an ApplicationClient
  • algorand.client.getAppClientById returns an AppClient rather than an ApplicationClient

New features

  • Added appManager.getGlobalState
  • Added AlgorandClientInterface type to decouple taking a dependency on AlgorandClient with creation of a circular dependency loop
  • Added current draft ARC-56 types to /types/app-arc56 with the root type being Arc56Contract
  • Added getABIEncodedValue, getABIDecodedValue, and getTupleType 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 and AppClient classes and added algorand.client.getAppFactory and algorand.client.getAppClientByNetwork methods (and changed algorand.client.getAppId and algorand.client.getAppClientByCreatorAndName now return AppClient)
  • Added arc32ToArc56 method to /types/app-spec to allow conversion from ARC-32 to ARC-56 for backwards compatibility
  • Added addTransaction to AlgoKitComposer so you can add a transaction (with optional signer) to the transaction group
  • Added simulate to AlgoKitComposer 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

Driven by app client deprecation (#311) (0cd0743)

v7.0.0-beta.3

18 Sep 03:22
5e63c0e
Compare
Choose a tag to compare
v7.0.0-beta.3 Pre-release
Pre-release

7.0.0-beta.3 (2024-09-18)

Bug Fixes

v7.0.0-beta.2

04 Sep 16:14
41d8df1
Compare
Choose a tag to compare
v7.0.0-beta.2 Pre-release
Pre-release

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 on AlgoKitComposer now returns ABI method call objects for transactions that had them so you can resolve ABI return values

New functionality

  • AppManager class and algorand.app
  • AppDeployer class and algorand.appDeployer
  • AlgoKitComposer.arc2Note to allow constructing an ARC-2 transaction note
  • count method in AlgoKitComposer to support retrieving current number of transactions
  • buildTransactions method in AlgoKitComposer to support building transactions without needing a signer present and switched to using that from algorand.transactions
  • Added support for populateAppCallResources to AlgoKitComposer
  • algorand.client.indexerIfPresent so you can optionally retrieve indexer if it's present
  • algorand.send/transactions.{appMethods} for the following methods: appCreate, appCreateMethodCall, appUpdate, appUpdateMethodCall, appDelete, appDeleteMethodCall, appCall, appCallMethodCall and corresponding addX methods in AlgoKitComposer / algorand.newGroup()
  • TEAL compilation caching (within AppManager instance)
  • AppLookup caching (within AppDeployer instance)

⚠ BREAKING CHANGES

  • Renamed clearProgram to clearStateProgram and extraPages to extraProgramPages in AlgoKitComposer to match algod api

  • App deprecation (#310) (41d8df1), closes #310

v7.0.0-beta.1

28 Aug 11:12
Compare
Choose a tag to compare
v7.0.0-beta.1 Pre-release
Pre-release

7.0.0-beta.1 (2024-08-28)

⚠ BREAKING CHANGES

  • Renamed AlgokitComposer to AlgoKitComposer 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 be rekeyed(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 an AlgoAmount, renamed amount to balance and round to validAsOfRound (which is now a bigint for broader consistency)
  • Renamed algorand.account.getAssetInformation to algorand.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 and algorand.asset.getById(), algorand.asset.bulkOptIn, and algorand.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 to AlgoKitComposer so you can build transactions without needing to register a signer
    • Added .algo and .microAlgo methods/properties in place of the plural version for AlgoAmount to reflect the current guidance on how to represent Algo amounts, kept previous versions of those methods for now to avoid the breaking change
  • 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