Skip to content

v7.0.0-beta.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 19 Sep 02:32
0cd0743

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)