From 23352194bd0b2f8bc821bca729276b51eb340cc7 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 3 Jan 2025 17:24:19 -0500 Subject: [PATCH 01/38] fix: align AlgorandClientInterface with AlgorandClient (#355) --- src/types/algorand-client-interface.ts | 28 ++++---------------------- src/types/instance_of.ts | 4 ++++ 2 files changed, 8 insertions(+), 24 deletions(-) create mode 100644 src/types/instance_of.ts diff --git a/src/types/algorand-client-interface.ts b/src/types/algorand-client-interface.ts index 9ce0cea2..713d7782 100644 --- a/src/types/algorand-client-interface.ts +++ b/src/types/algorand-client-interface.ts @@ -1,29 +1,9 @@ -import algosdk from 'algosdk' -import { AlgorandClientTransactionCreator } from './algorand-client-transaction-creator' -import { AlgorandClientTransactionSender } from './algorand-client-transaction-sender' -import { AppDeployer } from './app-deployer' -import { AppManager } from './app-manager' -import { TransactionComposer } from './composer' -import { NetworkDetails } from './network-client' -import Algodv2 = algosdk.Algodv2 -import Indexer = algosdk.Indexer +import { AlgorandClient } from './algorand-client' +import { InterfaceOf } from './instance_of' + /** Interface for the bulk of the `AlgorandClient` functionality. * * Used to take a dependency on AlgorandClient without generating a circular dependency. */ -export interface AlgorandClientInterface { - app: AppManager - appDeployer: AppDeployer - send: AlgorandClientTransactionSender - createTransaction: AlgorandClientTransactionCreator - newGroup(): TransactionComposer - client: { - algod: Algodv2 - indexer?: Indexer - network(): Promise - isLocalNet(): Promise - isTestNet(): Promise - isMainNet(): Promise - } -} +export type AlgorandClientInterface = InterfaceOf diff --git a/src/types/instance_of.ts b/src/types/instance_of.ts new file mode 100644 index 00000000..7bf8e92f --- /dev/null +++ b/src/types/instance_of.ts @@ -0,0 +1,4 @@ +export type InterfaceOf = { + [Member in keyof ClassType]: ClassType[Member]; +}; + From 80709aacb298dccec54f8dfd80b3a43d0f1d539a Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 3 Jan 2025 17:26:44 -0500 Subject: [PATCH 02/38] remove implements AlgorandClientInterface for implementation --- src/types/algorand-client.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 240a764a..a2790d66 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -1,7 +1,6 @@ import algosdk, { Address } from 'algosdk' import { MultisigAccount, SigningAccount, TransactionSignerAccount } from './account' import { AccountManager } from './account-manager' -import { AlgorandClientInterface } from './algorand-client-interface' import { AlgorandClientTransactionCreator } from './algorand-client-transaction-creator' import { AlgorandClientTransactionSender } from './algorand-client-transaction-sender' import { AppDeployer } from './app-deployer' @@ -16,7 +15,7 @@ import LogicSigAccount = algosdk.LogicSigAccount /** * A client that brokers easy access to Algorand functionality. */ -export class AlgorandClient implements AlgorandClientInterface { +export class AlgorandClient { private _clientManager: ClientManager private _accountManager: AccountManager private _appManager: AppManager From 5271138352795e4001d5ad5bc4beabb4c924e0e6 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 3 Jan 2025 17:34:13 -0500 Subject: [PATCH 03/38] generate documentation --- docs/code/README.md | 1 + .../types_algorand_client.AlgorandClient.md | 94 ++++++---------- .../classes/types_app_client.AppClient.md | 10 +- .../classes/types_app_factory.AppFactory.md | 6 +- .../types_client_manager.ClientManager.md | 4 +- ...lient_interface.AlgorandClientInterface.md | 102 ------------------ .../types_app_client.AppClientParams.md | 2 +- .../types_app_factory.AppFactoryParams.md | 2 +- .../types_client_manager.TypedAppClient.md | 2 +- .../types_algorand_client_interface.md | 16 ++- docs/code/modules/types_instance_of.md | 25 +++++ src/types/algorand-client-interface.ts | 6 +- 12 files changed, 87 insertions(+), 183 deletions(-) delete mode 100644 docs/code/interfaces/types_algorand_client_interface.AlgorandClientInterface.md create mode 100644 docs/code/modules/types_instance_of.md diff --git a/docs/code/README.md b/docs/code/README.md index 214af3bb..0a1c8728 100644 --- a/docs/code/README.md +++ b/docs/code/README.md @@ -43,6 +43,7 @@ - [types/dispenser-client.spec](modules/types_dispenser_client_spec.md) - [types/expand](modules/types_expand.md) - [types/indexer](modules/types_indexer.md) +- [types/instance\_of](modules/types_instance_of.md) - [types/kmd-account-manager](modules/types_kmd_account_manager.md) - [types/lifecycle-events](modules/types_lifecycle_events.md) - [types/logging](modules/types_logging.md) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 245df169..611ac3d0 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -6,10 +6,6 @@ A client that brokers easy access to Algorand functionality. -## Implements - -- [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) - ## Table of contents ### Constructors @@ -75,7 +71,7 @@ A client that brokers easy access to Algorand functionality. #### Defined in -[src/types/algorand-client.ts:34](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L34) +[src/types/algorand-client.ts:33](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L33) ## Properties @@ -85,7 +81,7 @@ A client that brokers easy access to Algorand functionality. #### Defined in -[src/types/algorand-client.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L21) +[src/types/algorand-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L20) ___ @@ -95,7 +91,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:23](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L23) +[src/types/algorand-client.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L22) ___ @@ -105,7 +101,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L22) +[src/types/algorand-client.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L21) ___ @@ -115,7 +111,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24) +[src/types/algorand-client.ts:23](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L23) ___ @@ -125,7 +121,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L28) +[src/types/algorand-client.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L27) ___ @@ -135,7 +131,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L29) +[src/types/algorand-client.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L28) ___ @@ -145,7 +141,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:30](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L30) +[src/types/algorand-client.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L29) ___ @@ -155,7 +151,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L20) +[src/types/algorand-client.ts:19](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L19) ___ @@ -165,7 +161,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:32](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L32) +[src/types/algorand-client.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L31) ___ @@ -175,7 +171,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:26](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L26) +[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25) ___ @@ -185,7 +181,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25) +[src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24) ## Accessors @@ -201,7 +197,7 @@ Get or create accounts that can sign transactions. #### Defined in -[src/types/algorand-client.ts:141](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L141) +[src/types/algorand-client.ts:140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L140) ___ @@ -215,13 +211,9 @@ Methods for interacting with apps. [`AppManager`](types_app_manager.AppManager.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[app](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#app) - #### Defined in -[src/types/algorand-client.ts:151](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L151) +[src/types/algorand-client.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L150) ___ @@ -235,13 +227,9 @@ Methods for deploying apps and managing app deployment metadata. [`AppDeployer`](types_app_deployer.AppDeployer.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[appDeployer](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#appdeployer) - #### Defined in -[src/types/algorand-client.ts:156](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L156) +[src/types/algorand-client.ts:155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L155) ___ @@ -257,7 +245,7 @@ Methods for interacting with assets. #### Defined in -[src/types/algorand-client.ts:146](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L146) +[src/types/algorand-client.ts:145](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L145) ___ @@ -271,13 +259,9 @@ Get clients, including algosdk clients and app clients. [`ClientManager`](types_client_manager.ClientManager.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[client](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#client) - #### Defined in -[src/types/algorand-client.ts:136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L136) +[src/types/algorand-client.ts:135](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L135) ___ @@ -291,13 +275,9 @@ Methods for creating a transaction. [`AlgorandClientTransactionCreator`](types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[createTransaction](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#createtransaction) - #### Defined in -[src/types/algorand-client.ts:181](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L181) +[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) ___ @@ -311,13 +291,9 @@ Methods for sending a transaction. [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[send](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#send) - #### Defined in -[src/types/algorand-client.ts:174](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L174) +[src/types/algorand-client.ts:173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L173) ## Methods @@ -333,7 +309,7 @@ Get suggested params for a transaction (either cached or from algod if the cache #### Defined in -[src/types/algorand-client.ts:120](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L120) +[src/types/algorand-client.ts:119](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L119) ___ @@ -347,13 +323,9 @@ Start a new `TransactionComposer` transaction group [`TransactionComposer`](types_composer.TransactionComposer.md) -#### Implementation of - -[AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md).[newGroup](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md#newgroup) - #### Defined in -[src/types/algorand-client.ts:161](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L161) +[src/types/algorand-client.ts:160](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L160) ___ @@ -377,7 +349,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:59](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L59) +[src/types/algorand-client.ts:58](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L58) ___ @@ -401,7 +373,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:49](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L49) +[src/types/algorand-client.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L48) ___ @@ -426,7 +398,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:92](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L92) +[src/types/algorand-client.ts:91](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L91) ___ @@ -461,7 +433,7 @@ const accountManager = AlgorandClient.mainnet() #### Defined in -[src/types/algorand-client.ts:79](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L79) +[src/types/algorand-client.ts:78](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L78) ___ @@ -486,7 +458,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:103](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L103) +[src/types/algorand-client.ts:102](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L102) ___ @@ -510,7 +482,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:114](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L114) +[src/types/algorand-client.ts:113](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L113) ___ @@ -528,7 +500,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:191](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L191) +[src/types/algorand-client.ts:190](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L190) ___ @@ -552,7 +524,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:228](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L228) +[src/types/algorand-client.ts:227](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L227) ___ @@ -576,7 +548,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:258](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L258) +[src/types/algorand-client.ts:257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L257) ___ @@ -607,7 +579,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:249](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L249) +[src/types/algorand-client.ts:248](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L248) ___ @@ -625,7 +597,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:215](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L215) +[src/types/algorand-client.ts:214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L214) ___ @@ -643,4 +615,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:203](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L203) +[src/types/algorand-client.ts:202](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L202) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 4aa65a5d..2f4078d3 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -104,7 +104,7 @@ state for a specific deployed instance of an app (with a known app ID). ### \_algorand -• `Private` **\_algorand**: [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +• `Private` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> #### Defined in @@ -293,13 +293,13 @@ ___ ### algorand -• `get` **algorand**(): [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +• `get` **algorand**(): [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> A reference to the underlying `AlgorandClient` this app client is using. #### Returns -[`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +[`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> #### Defined in @@ -1273,7 +1273,7 @@ using AlgoKit app deployment semantics (i.e. looking for the app creation transa | Name | Type | Description | | :------ | :------ | :------ | | `params` | `Object` | The parameters to create the app client | -| `params.algorand` | [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) | An `AlgorandClient` instance | +| `params.algorand` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | An `AlgorandClient` instance | | `params.appLookupCache?` | [`AppLookup`](../interfaces/types_app_deployer.AppLookup.md) | An optional cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this `ClientManager` on construction. | | `params.appName?` | `string` | Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name | | `params.appSpec` | `string` \| [`Arc56Contract`](../interfaces/types_app_arc56.Arc56Contract.md) \| [`AppSpec`](../interfaces/types_app_spec.AppSpec.md) | The ARC-56 or ARC-32 application spec as either: * Parsed JSON ARC-56 `Contract` * Parsed JSON ARC-32 `AppSpec` * Raw JSON string (in either ARC-56 or ARC-32 format) | @@ -1308,7 +1308,7 @@ If no IDs are in the app spec or the network isn't recognised, an error is throw | Name | Type | Description | | :------ | :------ | :------ | | `params` | `Object` | The parameters to create the app client | -| `params.algorand` | [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) | An `AlgorandClient` instance | +| `params.algorand` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | An `AlgorandClient` instance | | `params.appName?` | `string` | Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name | | `params.appSpec` | `string` \| [`Arc56Contract`](../interfaces/types_app_arc56.Arc56Contract.md) \| [`AppSpec`](../interfaces/types_app_spec.AppSpec.md) | The ARC-56 or ARC-32 application spec as either: * Parsed JSON ARC-56 `Contract` * Parsed JSON ARC-32 `AppSpec` * Raw JSON string (in either ARC-56 or ARC-32 format) | | `params.approvalSourceMap?` | `ProgramSourceMap` | Optional source map for the approval program | diff --git a/docs/code/classes/types_app_factory.AppFactory.md b/docs/code/classes/types_app_factory.AppFactory.md index 4a74c864..67936e96 100644 --- a/docs/code/classes/types_app_factory.AppFactory.md +++ b/docs/code/classes/types_app_factory.AppFactory.md @@ -81,7 +81,7 @@ to interact with those (or other) app instances. ### \_algorand -• `Private` **\_algorand**: [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +• `Private` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> #### Defined in @@ -253,13 +253,13 @@ Send transactions to the current app ### algorand -• `get` **algorand**(): [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +• `get` **algorand**(): [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> Return the algorand client this factory is using. #### Returns -[`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +[`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> #### Defined in diff --git a/docs/code/classes/types_client_manager.ClientManager.md b/docs/code/classes/types_client_manager.ClientManager.md index 1faa95e0..312ebe82 100644 --- a/docs/code/classes/types_client_manager.ClientManager.md +++ b/docs/code/classes/types_client_manager.ClientManager.md @@ -69,7 +69,7 @@ algosdk clients or config for interacting with the official Algorand APIs. | Name | Type | Description | | :------ | :------ | :------ | | `clientsOrConfig` | [`AlgoConfig`](../interfaces/types_network_client.AlgoConfig.md) \| [`AlgoSdkClients`](../interfaces/types_client_manager.AlgoSdkClients.md) | The clients or config to use | -| `algorandClient?` | [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) | - | +| `algorandClient?` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | - | #### Returns @@ -117,7 +117,7 @@ ___ ### \_algorand -• `Private` `Optional` **\_algorand**: [`AlgorandClientInterface`](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +• `Private` `Optional` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> #### Defined in diff --git a/docs/code/interfaces/types_algorand_client_interface.AlgorandClientInterface.md b/docs/code/interfaces/types_algorand_client_interface.AlgorandClientInterface.md deleted file mode 100644 index 60113814..00000000 --- a/docs/code/interfaces/types_algorand_client_interface.AlgorandClientInterface.md +++ /dev/null @@ -1,102 +0,0 @@ -[@algorandfoundation/algokit-utils](../README.md) / [types/algorand-client-interface](../modules/types_algorand_client_interface.md) / AlgorandClientInterface - -# Interface: AlgorandClientInterface - -[types/algorand-client-interface](../modules/types_algorand_client_interface.md).AlgorandClientInterface - -Interface for the bulk of the `AlgorandClient` functionality. - -Used to take a dependency on AlgorandClient without generating a circular dependency. - -## Implemented by - -- [`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md) - -## Table of contents - -### Properties - -- [app](types_algorand_client_interface.AlgorandClientInterface.md#app) -- [appDeployer](types_algorand_client_interface.AlgorandClientInterface.md#appdeployer) -- [client](types_algorand_client_interface.AlgorandClientInterface.md#client) -- [createTransaction](types_algorand_client_interface.AlgorandClientInterface.md#createtransaction) -- [send](types_algorand_client_interface.AlgorandClientInterface.md#send) - -### Methods - -- [newGroup](types_algorand_client_interface.AlgorandClientInterface.md#newgroup) - -## Properties - -### app - -• **app**: [`AppManager`](../classes/types_app_manager.AppManager.md) - -#### Defined in - -[src/types/algorand-client-interface.ts:16](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L16) - -___ - -### appDeployer - -• **appDeployer**: [`AppDeployer`](../classes/types_app_deployer.AppDeployer.md) - -#### Defined in - -[src/types/algorand-client-interface.ts:17](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L17) - -___ - -### client - -• **client**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `algod` | `AlgodClient` | -| `indexer?` | `IndexerClient` | -| `isLocalNet` | () => `Promise`\<`boolean`\> | -| `isMainNet` | () => `Promise`\<`boolean`\> | -| `isTestNet` | () => `Promise`\<`boolean`\> | -| `network` | () => `Promise`\<[`NetworkDetails`](types_network_client.NetworkDetails.md)\> | - -#### Defined in - -[src/types/algorand-client-interface.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L21) - -___ - -### createTransaction - -• **createTransaction**: [`AlgorandClientTransactionCreator`](../classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) - -#### Defined in - -[src/types/algorand-client-interface.ts:19](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L19) - -___ - -### send - -• **send**: [`AlgorandClientTransactionSender`](../classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) - -#### Defined in - -[src/types/algorand-client-interface.ts:18](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L18) - -## Methods - -### newGroup - -▸ **newGroup**(): [`TransactionComposer`](../classes/types_composer.TransactionComposer.md) - -#### Returns - -[`TransactionComposer`](../classes/types_composer.TransactionComposer.md) - -#### Defined in - -[src/types/algorand-client-interface.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L20) diff --git a/docs/code/interfaces/types_app_client.AppClientParams.md b/docs/code/interfaces/types_app_client.AppClientParams.md index b2ccfa16..48d93a33 100644 --- a/docs/code/interfaces/types_app_client.AppClientParams.md +++ b/docs/code/interfaces/types_app_client.AppClientParams.md @@ -23,7 +23,7 @@ Parameters to create an app client ### algorand -• **algorand**: [`AlgorandClientInterface`](types_algorand_client_interface.AlgorandClientInterface.md) +• **algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> An `AlgorandClient` instance diff --git a/docs/code/interfaces/types_app_factory.AppFactoryParams.md b/docs/code/interfaces/types_app_factory.AppFactoryParams.md index 57ded411..efe1b4aa 100644 --- a/docs/code/interfaces/types_app_factory.AppFactoryParams.md +++ b/docs/code/interfaces/types_app_factory.AppFactoryParams.md @@ -24,7 +24,7 @@ Parameters to create an app client ### algorand -• **algorand**: [`AlgorandClientInterface`](types_algorand_client_interface.AlgorandClientInterface.md) +• **algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> `AlgorandClient` instance diff --git a/docs/code/interfaces/types_client_manager.TypedAppClient.md b/docs/code/interfaces/types_client_manager.TypedAppClient.md index 3db83624..bbb123da 100644 --- a/docs/code/interfaces/types_client_manager.TypedAppClient.md +++ b/docs/code/interfaces/types_client_manager.TypedAppClient.md @@ -53,7 +53,7 @@ Interface to identify a typed client that can be used to interact with an applic | Name | Type | | :------ | :------ | -| `params` | `Omit`\<\{ `algorand`: [`AlgorandClientInterface`](types_algorand_client_interface.AlgorandClientInterface.md) ; `appLookupCache?`: [`AppLookup`](types_app_deployer.AppLookup.md) ; `appName?`: `string` ; `appSpec`: `string` \| [`Arc56Contract`](types_app_arc56.Arc56Contract.md) \| [`AppSpec`](types_app_spec.AppSpec.md) ; `approvalSourceMap?`: `ProgramSourceMap` ; `clearSourceMap?`: `ProgramSourceMap` ; `creatorAddress`: `string` \| `Address` ; `defaultSender?`: `string` \| `Address` ; `defaultSigner?`: `TransactionSigner` ; `ignoreCache?`: `boolean` }, ``"appSpec"``\> | +| `params` | `Omit`\<\{ `algorand`: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> ; `appLookupCache?`: [`AppLookup`](types_app_deployer.AppLookup.md) ; `appName?`: `string` ; `appSpec`: `string` \| [`Arc56Contract`](types_app_arc56.Arc56Contract.md) \| [`AppSpec`](types_app_spec.AppSpec.md) ; `approvalSourceMap?`: `ProgramSourceMap` ; `clearSourceMap?`: `ProgramSourceMap` ; `creatorAddress`: `string` \| `Address` ; `defaultSender?`: `string` \| `Address` ; `defaultSigner?`: `TransactionSigner` ; `ignoreCache?`: `boolean` }, ``"appSpec"``\> | #### Returns diff --git a/docs/code/modules/types_algorand_client_interface.md b/docs/code/modules/types_algorand_client_interface.md index aa47e40d..4453f285 100644 --- a/docs/code/modules/types_algorand_client_interface.md +++ b/docs/code/modules/types_algorand_client_interface.md @@ -4,6 +4,18 @@ ## Table of contents -### Interfaces +### Type Aliases -- [AlgorandClientInterface](../interfaces/types_algorand_client_interface.AlgorandClientInterface.md) +- [AlgorandClientInterface](types_algorand_client_interface.md#algorandclientinterface) + +## Type Aliases + +### AlgorandClientInterface + +Ƭ **AlgorandClientInterface**: [`InterfaceOf`](types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> + +AlgorandClient interface used to eleminate circular dependencies + +#### Defined in + +[src/types/algorand-client-interface.ts:5](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L5) diff --git a/docs/code/modules/types_instance_of.md b/docs/code/modules/types_instance_of.md new file mode 100644 index 00000000..43e5eee5 --- /dev/null +++ b/docs/code/modules/types_instance_of.md @@ -0,0 +1,25 @@ +[@algorandfoundation/algokit-utils](../README.md) / types/instance\_of + +# Module: types/instance\_of + +## Table of contents + +### Type Aliases + +- [InterfaceOf](types_instance_of.md#interfaceof) + +## Type Aliases + +### InterfaceOf + +Ƭ **InterfaceOf**\<`ClassType`\>: \{ [Member in keyof ClassType]: ClassType[Member] } + +#### Type parameters + +| Name | +| :------ | +| `ClassType` | + +#### Defined in + +[src/types/instance_of.ts:1](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/instance_of.ts#L1) diff --git a/src/types/algorand-client-interface.ts b/src/types/algorand-client-interface.ts index 713d7782..17392fb4 100644 --- a/src/types/algorand-client-interface.ts +++ b/src/types/algorand-client-interface.ts @@ -1,9 +1,5 @@ import { AlgorandClient } from './algorand-client' import { InterfaceOf } from './instance_of' - -/** Interface for the bulk of the `AlgorandClient` functionality. - * - * Used to take a dependency on AlgorandClient without generating a circular dependency. - */ + /** AlgorandClient interface used to eleminate circular dependencies */ export type AlgorandClientInterface = InterfaceOf From 083e43764cee3abc4edb7c7f23c53c74c03bebd3 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 10:19:30 -0500 Subject: [PATCH 04/38] rename instance_of.ts to instance-of.ts --- docs/code/README.md | 2 +- docs/code/modules/types_instance_of.md | 6 +++--- src/types/algorand-client-interface.ts | 4 ++-- src/types/{instance_of.ts => instance-of.ts} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename src/types/{instance_of.ts => instance-of.ts} (100%) diff --git a/docs/code/README.md b/docs/code/README.md index 0a1c8728..8d571852 100644 --- a/docs/code/README.md +++ b/docs/code/README.md @@ -43,7 +43,7 @@ - [types/dispenser-client.spec](modules/types_dispenser_client_spec.md) - [types/expand](modules/types_expand.md) - [types/indexer](modules/types_indexer.md) -- [types/instance\_of](modules/types_instance_of.md) +- [types/instance-of](modules/types_instance_of.md) - [types/kmd-account-manager](modules/types_kmd_account_manager.md) - [types/lifecycle-events](modules/types_lifecycle_events.md) - [types/logging](modules/types_logging.md) diff --git a/docs/code/modules/types_instance_of.md b/docs/code/modules/types_instance_of.md index 43e5eee5..fbf49045 100644 --- a/docs/code/modules/types_instance_of.md +++ b/docs/code/modules/types_instance_of.md @@ -1,6 +1,6 @@ -[@algorandfoundation/algokit-utils](../README.md) / types/instance\_of +[@algorandfoundation/algokit-utils](../README.md) / types/instance-of -# Module: types/instance\_of +# Module: types/instance-of ## Table of contents @@ -22,4 +22,4 @@ #### Defined in -[src/types/instance_of.ts:1](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/instance_of.ts#L1) +src/types/instance-of.ts:1 diff --git a/src/types/algorand-client-interface.ts b/src/types/algorand-client-interface.ts index 17392fb4..3ca011e3 100644 --- a/src/types/algorand-client-interface.ts +++ b/src/types/algorand-client-interface.ts @@ -1,5 +1,5 @@ import { AlgorandClient } from './algorand-client' -import { InterfaceOf } from './instance_of' +import { InterfaceOf } from './instance-of' - /** AlgorandClient interface used to eleminate circular dependencies */ +/** AlgorandClient interface used to eleminate circular dependencies */ export type AlgorandClientInterface = InterfaceOf diff --git a/src/types/instance_of.ts b/src/types/instance-of.ts similarity index 100% rename from src/types/instance_of.ts rename to src/types/instance-of.ts From 141494cc2b56f6f8ad1bebdab636e08db2c44b3c Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 10:34:52 -0500 Subject: [PATCH 05/38] typedoc --- docs/code/modules/types_instance_of.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/code/modules/types_instance_of.md b/docs/code/modules/types_instance_of.md index fbf49045..e7513310 100644 --- a/docs/code/modules/types_instance_of.md +++ b/docs/code/modules/types_instance_of.md @@ -22,4 +22,4 @@ #### Defined in -src/types/instance-of.ts:1 +[src/types/instance-of.ts:1](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/instance-of.ts#L1) From b269dc02467fa63c30be7dc2daf116fb4ccd0b14 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 12:25:00 -0500 Subject: [PATCH 06/38] feat: add registerErrorCallback function to composer --- src/types/composer.spec.ts | 60 ++++++++++++++++++++++++++++++++++++++ src/types/composer.ts | 50 ++++++++++++++++++++++++------- 2 files changed, 100 insertions(+), 10 deletions(-) create mode 100644 src/types/composer.spec.ts diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts new file mode 100644 index 00000000..db9608fe --- /dev/null +++ b/src/types/composer.spec.ts @@ -0,0 +1,60 @@ +import { algorandFixture } from '../testing' +import { beforeAll, beforeEach, describe, expect, test } from 'vitest' + +const fixture = algorandFixture() +describe('TransactionComposer', () => { + beforeEach(async () => { + await fixture.beforeEach() + }) + + describe('error callbacks', () => { + const errorCallback = async (e: unknown) => { + let errorString: string + if (e instanceof Error) { + errorString = e.message + } else { + errorString = JSON.stringify(e) + } + + if (errorString.includes('missing from')) { + return new Error('ASSET MISSING!') + } + + return undefined + } + + test('error callback throws correct error from simulate', async () => { + const algorand = fixture.context.algorand + const sender = fixture.context.testAccount + const composer = algorand.newGroup() + + composer.addAssetTransfer({ + amount: 1n, + assetId: 1337n, + sender, + receiver: sender, + }) + + composer.registerErrorCallback(errorCallback) + + await expect(composer.simulate()).rejects.toThrow('ASSET MISSING!') + }) + + test('error callback throws correct error from send', async () => { + const algorand = fixture.context.algorand + const sender = fixture.context.testAccount + const composer = algorand.newGroup() + + composer.addAssetTransfer({ + amount: 1n, + assetId: 1337n, + sender, + receiver: sender, + }) + + composer.registerErrorCallback(errorCallback) + + await expect(composer.send()).rejects.toThrow('ASSET MISSING!') + }) + }) +}) diff --git a/src/types/composer.ts b/src/types/composer.ts index 02beba75..9634d90a 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -505,6 +505,8 @@ export interface BuiltTransactions { signers: Map } +export type ErrorCallback = (error: unknown) => Promise + /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { /** Signer used to represent a lack of signer */ @@ -536,6 +538,9 @@ export class TransactionComposer { private appManager: AppManager + // eslint-disable-next-line @typescript-eslint/no-explicit-any + errorCallbacks: ErrorCallback[] = [] + /** * Create a `TransactionComposer`. * @param params The configuration for this composer @@ -550,6 +555,13 @@ export class TransactionComposer { this.appManager = params.appManager ?? new AppManager(params.algod) } + /** + * Register a callback to use when an error is caught in simulate or execute + */ + registerErrorCallback(cb: ErrorCallback) { + this.errorCallbacks.push(cb) + } + /** * Add a pre-built transaction to the transaction group. * @param transaction The pre-built transaction @@ -1287,15 +1299,26 @@ export class TransactionComposer { waitRounds = Number(BigInt(lastRound) - BigInt(firstRound)) + 1 } - return await sendAtomicTransactionComposer( - { - atc: this.atc, - suppressLog: params?.suppressLog, - maxRoundsToWaitForConfirmation: waitRounds, - populateAppCallResources: params?.populateAppCallResources, - }, - this.algod, - ) + try { + return await sendAtomicTransactionComposer( + { + atc: this.atc, + suppressLog: params?.suppressLog, + maxRoundsToWaitForConfirmation: waitRounds, + populateAppCallResources: params?.populateAppCallResources, + }, + this.algod, + ) + } catch (e: unknown) { + for await (const cb of this.errorCallbacks) { + const callbackResult = await cb(e) + if (callbackResult !== undefined) { + throw callbackResult + } + } + + throw e + } } /** @@ -1363,12 +1386,19 @@ export class TransactionComposer { const failedGroup = simulateResponse?.txnGroups[0] if (failedGroup?.failureMessage) { const errorMessage = `Transaction failed at transaction(s) ${failedGroup.failedAt?.join(', ') || 'unknown'} in the group. ${failedGroup.failureMessage}` - const error = new Error(errorMessage) + let error = new Error(errorMessage) if (Config.debug) { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } + for await (const cb of this.errorCallbacks) { + const callbackResult = await cb(error) + if (callbackResult !== undefined) { + error = callbackResult + } + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(error as any).simulateResponse = simulateResponse throw error From 5401c134dfede0956a3240fc3b4ff4f6877f8913 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 12:38:27 -0500 Subject: [PATCH 07/38] adding registerErrorCallback to AlgorandClient --- src/types/algorand-client.ts | 14 +++++++++++++- src/types/composer.ts | 8 +++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 240a764a..ca6f3581 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -8,7 +8,7 @@ import { AppDeployer } from './app-deployer' import { AppManager } from './app-manager' import { AssetManager } from './asset-manager' import { AlgoSdkClients, ClientManager } from './client-manager' -import { TransactionComposer } from './composer' +import { ErrorCallback, TransactionComposer } from './composer' import { AlgoConfig } from './network-client' import Account = algosdk.Account import LogicSigAccount = algosdk.LogicSigAccount @@ -41,6 +41,9 @@ export class AlgorandClient implements AlgorandClientInterface { this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent) } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + errorCallbacks: ErrorCallback[] = [] + /** * Sets the default validity window for transactions. * @param validityWindow The number of rounds between the first and last valid rounds @@ -157,6 +160,14 @@ export class AlgorandClient implements AlgorandClientInterface { return this._appDeployer } + /** + * Register a callback to use when an error is caught when simulating or executing + * composed transaction groups made from `newGroup` + */ + public registerErrorCallback(cb: ErrorCallback) { + this.errorCallbacks.push(cb) + } + /** Start a new `TransactionComposer` transaction group */ public newGroup() { return new TransactionComposer({ @@ -165,6 +176,7 @@ export class AlgorandClient implements AlgorandClientInterface { getSuggestedParams: () => this.getSuggestedParams(), defaultValidityWindow: this._defaultValidityWindow, appManager: this._appManager, + errorCallbacks: this.errorCallbacks, }) } diff --git a/src/types/composer.ts b/src/types/composer.ts index 9634d90a..56b73310 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -493,6 +493,11 @@ export type TransactionComposerParams = { * If not specified than an ephemeral one will be created. */ appManager?: AppManager + /** + * An array of error callbacks to use when an error is caught in simulate or execute + * callbacks can later be registered with `registerErrorCallback` + */ + errorCallbacks?: ErrorCallback[] } /** Set of transactions built by `TransactionComposer`. */ @@ -539,7 +544,7 @@ export class TransactionComposer { private appManager: AppManager // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorCallbacks: ErrorCallback[] = [] + errorCallbacks: ErrorCallback[] /** * Create a `TransactionComposer`. @@ -553,6 +558,7 @@ export class TransactionComposer { this.defaultValidityWindow = params.defaultValidityWindow ?? this.defaultValidityWindow this.defaultValidityWindowIsExplicit = params.defaultValidityWindow !== undefined this.appManager = params.appManager ?? new AppManager(params.algod) + this.errorCallbacks = params.errorCallbacks ?? [] } /** From b3ab709fe785531929d576fccd0be02653740c22 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 15:28:13 -0500 Subject: [PATCH 08/38] register error map functions when an algorand client is used with a app client --- src/types/algorand-client.ts | 21 +++++++-- src/types/app-client.ts | 91 +++++++++++++++++------------------- src/types/composer.spec.ts | 14 +++--- src/types/composer.ts | 28 ++++++----- 4 files changed, 79 insertions(+), 75 deletions(-) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index e7e081a1..61b56357 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -7,7 +7,7 @@ import { AppDeployer } from './app-deployer' import { AppManager } from './app-manager' import { AssetManager } from './asset-manager' import { AlgoSdkClients, ClientManager } from './client-manager' -import { ErrorCallback, TransactionComposer } from './composer' +import { ErrorMapFunction, TransactionComposer } from './composer' import { AlgoConfig } from './network-client' import Account = algosdk.Account import LogicSigAccount = algosdk.LogicSigAccount @@ -41,7 +41,7 @@ export class AlgorandClient { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorCallbacks: ErrorCallback[] = [] + errorMapFunctions: Map> = new Map() /** * Sets the default validity window for transactions. @@ -159,12 +159,23 @@ export class AlgorandClient { return this._appDeployer } + /** The ID used when registering an error map function */ + private errorMapFunctionId = 0 + /** * Register a callback to use when an error is caught when simulating or executing * composed transaction groups made from `newGroup` */ - public registerErrorCallback(cb: ErrorCallback) { - this.errorCallbacks.push(cb) + public registerErrorMapFunction(cb: ErrorMapFunction) { + const id = this.errorMapFunctionId + this.errorMapFunctionId++ + this.errorMapFunctions.set(id, cb) + + return id + } + + public unregisterErrorMapFunction(id: number) { + this.errorMapFunctions.delete(id) } /** Start a new `TransactionComposer` transaction group */ @@ -175,7 +186,7 @@ export class AlgorandClient { getSuggestedParams: () => this.getSuggestedParams(), defaultValidityWindow: this._defaultValidityWindow, appManager: this._appManager, - errorCallbacks: this.errorCallbacks, + errorMapFunctions: [...this.errorMapFunctions.values()], }) } diff --git a/src/types/app-client.ts b/src/types/app-client.ts index fa37c077..d2c1dc66 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -504,6 +504,7 @@ export class AppClient { this._appSpec = AppClient.normaliseAppSpec(params.appSpec) this._appName = params.appName ?? this._appSpec.name this._algorand = params.algorand + this._algorand.registerErrorMapFunction(this.handleCallErrors) this._defaultSender = typeof params.defaultSender === 'string' ? Address.fromString(params.defaultSender) : params.defaultSender this._defaultSigner = params.defaultSigner @@ -1170,29 +1171,29 @@ export class AppClient { update: async (params?: AppClientBareCallParams & AppClientCompilationParams & SendParams) => { const compiled = await this.compile(params) return { - ...(await this.handleCallErrors(async () => this._algorand.send.appUpdate(await this.params.bare.update(params)))), + ...(await this._algorand.send.appUpdate(await this.params.bare.update(params))), ...(compiled as Partial), } }, /** Signs and sends an opt-in call */ optIn: (params?: AppClientBareCallParams & SendParams) => { - return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.optIn(params))) + return this._algorand.send.appCall(this.params.bare.optIn(params)) }, /** Signs and sends a delete call */ delete: (params?: AppClientBareCallParams & SendParams) => { - return this.handleCallErrors(() => this._algorand.send.appDelete(this.params.bare.delete(params))) + return this._algorand.send.appDelete(this.params.bare.delete(params)) }, /** Signs and sends a clear state call */ clearState: (params?: AppClientBareCallParams & SendParams) => { - return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.clearState(params))) + return this._algorand.send.appCall(this.params.bare.clearState(params)) }, /** Signs and sends a close out call */ closeOut: (params?: AppClientBareCallParams & SendParams) => { - return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.closeOut(params))) + return this._algorand.send.appCall(this.params.bare.closeOut(params)) }, /** Signs and sends a call (defaults to no-op) */ call: (params?: AppClientBareCallParams & CallOnComplete & SendParams) => { - return this.handleCallErrors(() => this._algorand.send.appCall(this.params.bare.call(params))) + return this._algorand.send.appCall(this.params.bare.call(params)) }, } } @@ -1249,11 +1250,9 @@ export class AppClient { update: async (params: AppClientMethodCallParams & AppClientCompilationParams & SendParams) => { const compiled = await this.compile(params) return { - ...(await this.handleCallErrors(async () => - this.processMethodCallReturn( - this._algorand.send.appUpdateMethodCall(await this.params.update({ ...params })), - getArc56Method(params.method, this._appSpec), - ), + ...(await this.processMethodCallReturn( + this._algorand.send.appUpdateMethodCall(await this.params.update({ ...params })), + getArc56Method(params.method, this._appSpec), )), ...(compiled as Partial), } @@ -1261,34 +1260,28 @@ export class AppClient { /** * Sign and send transactions for an opt-in ABI call */ - optIn: (params: AppClientMethodCallParams & SendParams) => { - return this.handleCallErrors(async () => - this.processMethodCallReturn( - this._algorand.send.appCallMethodCall(await this.params.optIn(params)), - getArc56Method(params.method, this._appSpec), - ), + optIn: async (params: AppClientMethodCallParams & SendParams) => { + return this.processMethodCallReturn( + this._algorand.send.appCallMethodCall(await this.params.optIn(params)), + getArc56Method(params.method, this._appSpec), ) }, /** * Sign and send transactions for a delete ABI call */ - delete: (params: AppClientMethodCallParams & SendParams) => { - return this.handleCallErrors(async () => - this.processMethodCallReturn( - this._algorand.send.appDeleteMethodCall(await this.params.delete(params)), - getArc56Method(params.method, this._appSpec), - ), + delete: async (params: AppClientMethodCallParams & SendParams) => { + return this.processMethodCallReturn( + this._algorand.send.appDeleteMethodCall(await this.params.delete(params)), + getArc56Method(params.method, this._appSpec), ) }, /** * Sign and send transactions for a close out ABI call */ - closeOut: (params: AppClientMethodCallParams & SendParams) => { - return this.handleCallErrors(async () => - this.processMethodCallReturn( - this._algorand.send.appCallMethodCall(await this.params.closeOut(params)), - getArc56Method(params.method, this._appSpec), - ), + closeOut: async (params: AppClientMethodCallParams & SendParams) => { + return this.processMethodCallReturn( + this._algorand.send.appCallMethodCall(await this.params.closeOut(params)), + getArc56Method(params.method, this._appSpec), ) }, /** @@ -1320,11 +1313,9 @@ export class AppClient { ) } - return this.handleCallErrors(async () => - this.processMethodCallReturn( - this._algorand.send.appCallMethodCall(await this.params.call(params)), - getArc56Method(params.method, this._appSpec), - ), + return this.processMethodCallReturn( + this._algorand.send.appCallMethodCall(await this.params.call(params)), + getArc56Method(params.method, this._appSpec), ) }, } @@ -1425,21 +1416,25 @@ export class AppClient { } /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */ - private async handleCallErrors(call: () => Promise) { - try { - return await call() - } catch (e) { - const logicError = await this.exposeLogicError(e as Error) - if (logicError instanceof LogicError) { - let currentLine = logicError.teal_line - logicError.lines - 1 - const stackWithLines = logicError.stack - ?.split('\n') - .map((line) => `${(currentLine += 1)}: ${line}`) - .join('\n') - Config.logger.error(`${logicError.message}\n\n${stackWithLines}`) - } - throw logicError + private handleCallErrors = async (e: unknown) => { + // Only handle errors for this app. + // Because the error type is unknown, we turn it into a string to parse app ID + const appIdString = `app=${this._appId.toString()}` + if (!`${e}`.includes(appIdString)) { + return e } + + const logicError = await this.exposeLogicError(e as Error) + if (logicError instanceof LogicError) { + let currentLine = logicError.teal_line - logicError.lines - 1 + const stackWithLines = logicError.stack + ?.split('\n') + .map((line) => `${(currentLine += 1)}: ${line}`) + .join('\n') + Config.logger.error(`${logicError.message}\n\n${stackWithLines}`) + } + + return logicError } private getBoxMethods() { diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index db9608fe..4c8d52e3 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -7,8 +7,8 @@ describe('TransactionComposer', () => { await fixture.beforeEach() }) - describe('error callbacks', () => { - const errorCallback = async (e: unknown) => { + describe('error map functions', () => { + const errorMapFunction = async (e: unknown) => { let errorString: string if (e instanceof Error) { errorString = e.message @@ -20,10 +20,10 @@ describe('TransactionComposer', () => { return new Error('ASSET MISSING!') } - return undefined + return e } - test('error callback throws correct error from simulate', async () => { + test('throws correct error from simulate', async () => { const algorand = fixture.context.algorand const sender = fixture.context.testAccount const composer = algorand.newGroup() @@ -35,12 +35,12 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorCallback(errorCallback) + composer.registerErrorMapFunction(errorMapFunction) await expect(composer.simulate()).rejects.toThrow('ASSET MISSING!') }) - test('error callback throws correct error from send', async () => { + test('throws correct error from send', async () => { const algorand = fixture.context.algorand const sender = fixture.context.testAccount const composer = algorand.newGroup() @@ -52,7 +52,7 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorCallback(errorCallback) + composer.registerErrorMapFunction(errorMapFunction) await expect(composer.send()).rejects.toThrow('ASSET MISSING!') }) diff --git a/src/types/composer.ts b/src/types/composer.ts index 56b73310..cb8ed217 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -495,9 +495,9 @@ export type TransactionComposerParams = { appManager?: AppManager /** * An array of error callbacks to use when an error is caught in simulate or execute - * callbacks can later be registered with `registerErrorCallback` + * callbacks can later be registered with `registerErrorMapFunction` */ - errorCallbacks?: ErrorCallback[] + errorMapFunctions?: ErrorMapFunction[] } /** Set of transactions built by `TransactionComposer`. */ @@ -510,7 +510,7 @@ export interface BuiltTransactions { signers: Map } -export type ErrorCallback = (error: unknown) => Promise +export type ErrorMapFunction = (error: unknown) => Promise /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { @@ -544,7 +544,7 @@ export class TransactionComposer { private appManager: AppManager // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorCallbacks: ErrorCallback[] + private errorMapFunctions: ErrorMapFunction[] /** * Create a `TransactionComposer`. @@ -558,14 +558,15 @@ export class TransactionComposer { this.defaultValidityWindow = params.defaultValidityWindow ?? this.defaultValidityWindow this.defaultValidityWindowIsExplicit = params.defaultValidityWindow !== undefined this.appManager = params.appManager ?? new AppManager(params.algod) - this.errorCallbacks = params.errorCallbacks ?? [] + this.errorMapFunctions = params.errorMapFunctions ?? [] } /** * Register a callback to use when an error is caught in simulate or execute */ - registerErrorCallback(cb: ErrorCallback) { - this.errorCallbacks.push(cb) + registerErrorMapFunction(cb: ErrorMapFunction) { + this.errorMapFunctions.push(cb) + return this } /** @@ -1316,14 +1317,11 @@ export class TransactionComposer { this.algod, ) } catch (e: unknown) { - for await (const cb of this.errorCallbacks) { - const callbackResult = await cb(e) - if (callbackResult !== undefined) { - throw callbackResult - } + let error = e + for await (const cb of this.errorMapFunctions) { + error = await cb(e) } - - throw e + throw error } } @@ -1398,7 +1396,7 @@ export class TransactionComposer { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - for await (const cb of this.errorCallbacks) { + for await (const cb of this.errorMapFunctions) { const callbackResult = await cb(error) if (callbackResult !== undefined) { error = callbackResult From c42bfd601e64438f33e2aa7d117a48e11950ed51 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 15:46:59 -0500 Subject: [PATCH 09/38] add test to ensure that AppClient registers the error map function --- src/types/app-factory-and-client.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/types/app-factory-and-client.spec.ts b/src/types/app-factory-and-client.spec.ts index fdbed46f..f7ca0e55 100644 --- a/src/types/app-factory-and-client.spec.ts +++ b/src/types/app-factory-and-client.spec.ts @@ -714,6 +714,28 @@ describe('ARC56: app-factory-and-app-client', () => { } }) + test('AppClient registers error map function to AlgorandClient', async () => { + const { testAccount } = localnet.context + const { appClient } = await factory.deploy({ + createParams: { + method: 'createApplication', + }, + deployTimeParams: { bytes64TmplVar: '0'.repeat(64), uint64TmplVar: 123, bytes32TmplVar: '0'.repeat(32), bytesTmplVar: 'foo' }, + }) + + try { + // Don't use the app client to call, but since we've instantiated one the error map function should be registered + await appClient.algorand + .newGroup() + .addAppCallMethodCall({ appId: appClient.appId, method: appClient.getABIMethod('throwError')!, sender: testAccount }) + .send() + invariant(false) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e: any) { + expect(JSON.stringify(e)).toMatch('this is an error') + } + }) + test('ARC56 undefined error message with dynamic template vars (cblock offset)', async () => { const appId = ( await factory.deploy({ From 75fedd7b2b2ca167137eb48cc20b4f0ffd594d5b Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 15:48:45 -0500 Subject: [PATCH 10/38] rm unused import, generate docs --- docs/code/README.md | 1 + .../types_algorand_client.AlgorandClient.md | 117 +++++++++++--- .../classes/types_app_client.AppClient.md | 98 ++++++------ .../types_app_client.ApplicationClient.md | 80 +++++----- .../types_composer.TransactionComposer.md | 148 +++++++++++------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 32 ++++ docs/code/modules/types_composer_spec.md | 3 + src/types/composer.spec.ts | 2 +- src/types/instance-of.ts | 5 +- 10 files changed, 318 insertions(+), 174 deletions(-) create mode 100644 docs/code/modules/types_composer_spec.md diff --git a/docs/code/README.md b/docs/code/README.md index 8d571852..0fb2fca2 100644 --- a/docs/code/README.md +++ b/docs/code/README.md @@ -37,6 +37,7 @@ - [types/client-manager](modules/types_client_manager.md) - [types/client-manager.spec](modules/types_client_manager_spec.md) - [types/composer](modules/types_composer.md) +- [types/composer.spec](modules/types_composer_spec.md) - [types/config](modules/types_config.md) - [types/debugging](modules/types_debugging.md) - [types/dispenser-client](modules/types_dispenser_client.md) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 611ac3d0..5a59c18e 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -25,6 +25,8 @@ A client that brokers easy access to Algorand functionality. - [\_defaultValidityWindow](types_algorand_client.AlgorandClient.md#_defaultvaliditywindow) - [\_transactionCreator](types_algorand_client.AlgorandClient.md#_transactioncreator) - [\_transactionSender](types_algorand_client.AlgorandClient.md#_transactionsender) +- [errorMapFunctionId](types_algorand_client.AlgorandClient.md#errormapfunctionid) +- [errorMapFunctions](types_algorand_client.AlgorandClient.md#errormapfunctions) ### Accessors @@ -40,12 +42,14 @@ A client that brokers easy access to Algorand functionality. - [getSuggestedParams](types_algorand_client.AlgorandClient.md#getsuggestedparams) - [newGroup](types_algorand_client.AlgorandClient.md#newgroup) +- [registerErrorMapFunction](types_algorand_client.AlgorandClient.md#registererrormapfunction) - [setDefaultSigner](types_algorand_client.AlgorandClient.md#setdefaultsigner) - [setDefaultValidityWindow](types_algorand_client.AlgorandClient.md#setdefaultvaliditywindow) - [setSigner](types_algorand_client.AlgorandClient.md#setsigner) - [setSignerFromAccount](types_algorand_client.AlgorandClient.md#setsignerfromaccount) - [setSuggestedParamsCache](types_algorand_client.AlgorandClient.md#setsuggestedparamscache) - [setSuggestedParamsCacheTimeout](types_algorand_client.AlgorandClient.md#setsuggestedparamscachetimeout) +- [unregisterErrorMapFunction](types_algorand_client.AlgorandClient.md#unregistererrormapfunction) - [defaultLocalNet](types_algorand_client.AlgorandClient.md#defaultlocalnet) - [fromClients](types_algorand_client.AlgorandClient.md#fromclients) - [fromConfig](types_algorand_client.AlgorandClient.md#fromconfig) @@ -183,6 +187,28 @@ ___ [src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24) +___ + +### errorMapFunctionId + +• `Private` **errorMapFunctionId**: `number` = `0` + +The ID used when registering an error map function + +#### Defined in + +[src/types/algorand-client.ts:163](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L163) + +___ + +### errorMapFunctions + +• **errorMapFunctions**: `Map`\<`number`, [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`any`\>\> + +#### Defined in + +[src/types/algorand-client.ts:44](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L44) + ## Accessors ### account @@ -197,7 +223,7 @@ Get or create accounts that can sign transactions. #### Defined in -[src/types/algorand-client.ts:140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L140) +[src/types/algorand-client.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L143) ___ @@ -213,7 +239,7 @@ Methods for interacting with apps. #### Defined in -[src/types/algorand-client.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L150) +[src/types/algorand-client.ts:153](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L153) ___ @@ -229,7 +255,7 @@ Methods for deploying apps and managing app deployment metadata. #### Defined in -[src/types/algorand-client.ts:155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L155) +[src/types/algorand-client.ts:158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L158) ___ @@ -245,7 +271,7 @@ Methods for interacting with assets. #### Defined in -[src/types/algorand-client.ts:145](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L145) +[src/types/algorand-client.ts:148](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L148) ___ @@ -261,7 +287,7 @@ Get clients, including algosdk clients and app clients. #### Defined in -[src/types/algorand-client.ts:135](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L135) +[src/types/algorand-client.ts:138](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L138) ___ @@ -277,7 +303,7 @@ Methods for creating a transaction. #### Defined in -[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) +[src/types/algorand-client.ts:203](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L203) ___ @@ -293,7 +319,7 @@ Methods for sending a transaction. #### Defined in -[src/types/algorand-client.ts:173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L173) +[src/types/algorand-client.ts:196](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L196) ## Methods @@ -309,7 +335,7 @@ Get suggested params for a transaction (either cached or from algod if the cache #### Defined in -[src/types/algorand-client.ts:119](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L119) +[src/types/algorand-client.ts:122](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L122) ___ @@ -325,7 +351,36 @@ Start a new `TransactionComposer` transaction group #### Defined in -[src/types/algorand-client.ts:160](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L160) +[src/types/algorand-client.ts:182](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L182) + +___ + +### registerErrorMapFunction + +▸ **registerErrorMapFunction**\<`ErrorType`\>(`cb`): `number` + +Register a callback to use when an error is caught when simulating or executing +composed transaction groups made from `newGroup` + +#### Type parameters + +| Name | +| :------ | +| `ErrorType` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `cb` | [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`ErrorType`\> | + +#### Returns + +`number` + +#### Defined in + +[src/types/algorand-client.ts:169](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L169) ___ @@ -349,7 +404,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:58](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L58) +[src/types/algorand-client.ts:61](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L61) ___ @@ -373,7 +428,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L48) +[src/types/algorand-client.ts:51](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L51) ___ @@ -398,7 +453,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:91](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L91) +[src/types/algorand-client.ts:94](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L94) ___ @@ -433,7 +488,7 @@ const accountManager = AlgorandClient.mainnet() #### Defined in -[src/types/algorand-client.ts:78](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L78) +[src/types/algorand-client.ts:81](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L81) ___ @@ -458,7 +513,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:102](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L102) +[src/types/algorand-client.ts:105](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L105) ___ @@ -482,7 +537,27 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:113](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L113) +[src/types/algorand-client.ts:116](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L116) + +___ + +### unregisterErrorMapFunction + +▸ **unregisterErrorMapFunction**(`id`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `number` | + +#### Returns + +`void` + +#### Defined in + +[src/types/algorand-client.ts:177](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L177) ___ @@ -500,7 +575,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:190](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L190) +[src/types/algorand-client.ts:213](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L213) ___ @@ -524,7 +599,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:227](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L227) +[src/types/algorand-client.ts:250](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L250) ___ @@ -548,7 +623,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L257) +[src/types/algorand-client.ts:280](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L280) ___ @@ -579,7 +654,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:248](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L248) +[src/types/algorand-client.ts:271](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L271) ___ @@ -597,7 +672,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L214) +[src/types/algorand-client.ts:237](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L237) ___ @@ -615,4 +690,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:202](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L202) +[src/types/algorand-client.ts:225](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L225) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 2f4078d3..f861c563 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -303,7 +303,7 @@ A reference to the underlying `AlgorandClient` this app client is using. #### Defined in -[src/types/app-client.ts:642](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L642) +[src/types/app-client.ts:643](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L643) ___ @@ -319,7 +319,7 @@ The app address of the app instance this client is linked to. #### Defined in -[src/types/app-client.ts:627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L627) +[src/types/app-client.ts:628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L628) ___ @@ -335,7 +335,7 @@ The ID of the app instance this client is linked to. #### Defined in -[src/types/app-client.ts:622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L622) +[src/types/app-client.ts:623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L623) ___ @@ -351,7 +351,7 @@ The name of the app (from the ARC-32 / ARC-56 app spec or override). #### Defined in -[src/types/app-client.ts:632](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L632) +[src/types/app-client.ts:633](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L633) ___ @@ -367,7 +367,7 @@ The ARC-56 app spec being used #### Defined in -[src/types/app-client.ts:637](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L637) +[src/types/app-client.ts:638](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L638) ___ @@ -383,7 +383,7 @@ Create transactions for the current app #### Defined in -[src/types/app-client.ts:666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L666) +[src/types/app-client.ts:667](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L667) ___ @@ -416,7 +416,7 @@ await appClient.send.call({method: 'my_method2', args: [myMethodCall]}) #### Defined in -[src/types/app-client.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L661) +[src/types/app-client.ts:662](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L662) ___ @@ -432,7 +432,7 @@ Send transactions to the current app #### Defined in -[src/types/app-client.ts:671](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L671) +[src/types/app-client.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L672) ___ @@ -462,7 +462,7 @@ Get state (local, global, box) from the current app #### Defined in -[src/types/app-client.ts:676](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L676) +[src/types/app-client.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L677) ## Methods @@ -492,7 +492,7 @@ A new app client with the altered params #### Defined in -[src/types/app-client.ts:550](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L550) +[src/types/app-client.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L551) ___ @@ -520,7 +520,7 @@ Will store any generated source maps for later use in debugging. #### Defined in -[src/types/app-client.ts:873](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L873) +[src/types/app-client.ts:874](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L874) ___ @@ -538,7 +538,7 @@ The source maps #### Defined in -[src/types/app-client.ts:814](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L814) +[src/types/app-client.ts:815](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L815) ___ @@ -564,7 +564,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:792](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L792) +[src/types/app-client.ts:793](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L793) ___ @@ -606,7 +606,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:701](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L701) +[src/types/app-client.ts:702](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L702) ___ @@ -633,7 +633,7 @@ It does this by replacing any `undefined` values with the equivalent default val #### Defined in -[src/types/app-client.ts:1029](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1029) +[src/types/app-client.ts:1030](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1030) ___ @@ -657,7 +657,7 @@ A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`] #### Defined in -[src/types/app-client.ts:842](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L842) +[src/types/app-client.ts:843](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L843) ___ @@ -685,7 +685,7 @@ ___ #### Defined in -[src/types/app-client.ts:1404](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1404) +[src/types/app-client.ts:1395](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1395) ___ @@ -708,7 +708,7 @@ ___ #### Defined in -[src/types/app-client.ts:1138](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1138) +[src/types/app-client.ts:1139](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1139) ___ @@ -736,7 +736,7 @@ ___ #### Defined in -[src/types/app-client.ts:1391](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1391) +[src/types/app-client.ts:1382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1382) ___ @@ -759,7 +759,7 @@ ___ #### Defined in -[src/types/app-client.ts:1103](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1103) +[src/types/app-client.ts:1104](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1104) ___ @@ -782,7 +782,7 @@ ___ #### Defined in -[src/types/app-client.ts:1167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1167) +[src/types/app-client.ts:1168](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1168) ___ @@ -803,7 +803,7 @@ ___ #### Defined in -[src/types/app-client.ts:1445](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1445) +[src/types/app-client.ts:1440](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1440) ___ @@ -821,7 +821,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:726](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L726) +[src/types/app-client.ts:727](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L727) ___ @@ -845,7 +845,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:735](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L735) +[src/types/app-client.ts:736](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L736) ___ @@ -870,7 +870,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:745](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L745) +[src/types/app-client.ts:746](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L746) ___ @@ -895,7 +895,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:759](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L759) +[src/types/app-client.ts:760](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L760) ___ @@ -921,7 +921,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:775](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L775) +[src/types/app-client.ts:776](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L776) ___ @@ -939,7 +939,7 @@ The global state #### Defined in -[src/types/app-client.ts:709](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L709) +[src/types/app-client.ts:710](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L710) ___ @@ -963,7 +963,7 @@ The local state #### Defined in -[src/types/app-client.ts:718](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L718) +[src/types/app-client.ts:719](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L719) ___ @@ -986,7 +986,7 @@ ___ #### Defined in -[src/types/app-client.ts:1333](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1333) +[src/types/app-client.ts:1324](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1324) ___ @@ -1009,7 +1009,7 @@ ___ #### Defined in -[src/types/app-client.ts:1200](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1200) +[src/types/app-client.ts:1201](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1201) ___ @@ -1032,7 +1032,7 @@ ___ #### Defined in -[src/types/app-client.ts:1240](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1240) +[src/types/app-client.ts:1241](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1241) ___ @@ -1055,7 +1055,7 @@ if none provided and throws an error if neither provided #### Defined in -[src/types/app-client.ts:1374](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1374) +[src/types/app-client.ts:1365](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1365) ___ @@ -1080,7 +1080,7 @@ or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) #### Defined in -[src/types/app-client.ts:1384](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1384) +[src/types/app-client.ts:1375](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1375) ___ @@ -1109,35 +1109,29 @@ ___ #### Defined in -[src/types/app-client.ts:1517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1517) +[src/types/app-client.ts:1512](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1512) ___ ### handleCallErrors -▸ **handleCallErrors**\<`TResult`\>(`call`): `Promise`\<`TResult`\> +▸ **handleCallErrors**(`e`): `Promise`\<`unknown`\> Make the given call and catch any errors, augmenting with debugging information before re-throwing. -#### Type parameters - -| Name | -| :------ | -| `TResult` | - #### Parameters | Name | Type | | :------ | :------ | -| `call` | () => `Promise`\<`TResult`\> | +| `e` | `unknown` | #### Returns -`Promise`\<`TResult`\> +`Promise`\<`unknown`\> #### Defined in -[src/types/app-client.ts:1428](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1428) +[src/types/app-client.ts:1419](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1419) ___ @@ -1159,7 +1153,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:831](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L831) +[src/types/app-client.ts:832](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L832) ___ @@ -1194,7 +1188,7 @@ The smart contract response with an updated return value #### Defined in -[src/types/app-client.ts:856](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L856) +[src/types/app-client.ts:857](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L857) ___ @@ -1224,7 +1218,7 @@ Will store any generated source maps for later use in debugging. #### Defined in -[src/types/app-client.ts:976](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L976) +[src/types/app-client.ts:977](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L977) ___ @@ -1257,7 +1251,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:894](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L894) +[src/types/app-client.ts:895](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L895) ___ @@ -1290,7 +1284,7 @@ using AlgoKit app deployment semantics (i.e. looking for the app creation transa #### Defined in -[src/types/app-client.ts:569](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L569) +[src/types/app-client.ts:570](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L570) ___ @@ -1322,7 +1316,7 @@ If no IDs are in the app spec or the network isn't recognised, an error is throw #### Defined in -[src/types/app-client.ts:591](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L591) +[src/types/app-client.ts:592](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L592) ___ @@ -1347,4 +1341,4 @@ The normalised ARC-56 contract object #### Defined in -[src/types/app-client.ts:615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L615) +[src/types/app-client.ts:616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L616) diff --git a/docs/code/classes/types_app_client.ApplicationClient.md b/docs/code/classes/types_app_client.ApplicationClient.md index b4f600a1..c7fc6e7a 100644 --- a/docs/code/classes/types_app_client.ApplicationClient.md +++ b/docs/code/classes/types_app_client.ApplicationClient.md @@ -92,7 +92,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1644](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1644) +[src/types/app-client.ts:1639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1639) ## Properties @@ -102,7 +102,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) +[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/types/app-client.ts:1626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1626) +[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[src/types/app-client.ts:1629](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1629) +[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[src/types/app-client.ts:1631](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1631) +[src/types/app-client.ts:1626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1626) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[src/types/app-client.ts:1632](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1632) +[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[src/types/app-client.ts:1628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1628) +[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) +[src/types/app-client.ts:1613](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1613) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) +[src/types/app-client.ts:1615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1615) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) +[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) +[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) +[src/types/app-client.ts:1614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1614) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) +[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) +[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) ## Methods @@ -250,7 +250,7 @@ Issues a no_op (normal) call to the app. #### Defined in -[src/types/app-client.ts:1967](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1967) +[src/types/app-client.ts:1962](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1962) ___ @@ -279,7 +279,7 @@ Issues a call to the app with the given call type. #### Defined in -[src/types/app-client.ts:2049](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2049) +[src/types/app-client.ts:2044](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2044) ___ @@ -307,7 +307,7 @@ Issues a clear_state call to the app. #### Defined in -[src/types/app-client.ts:2026](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2026) +[src/types/app-client.ts:2021](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2021) ___ @@ -335,7 +335,7 @@ Issues a close_out call to the app. #### Defined in -[src/types/app-client.ts:2015](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2015) +[src/types/app-client.ts:2010](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2010) ___ @@ -363,7 +363,7 @@ Compiles the approval and clear state programs and sets up the source map. #### Defined in -[src/types/app-client.ts:1683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1683) +[src/types/app-client.ts:1678](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1678) ___ @@ -391,7 +391,7 @@ Creates a smart contract app, returns the details of the created app. #### Defined in -[src/types/app-client.ts:1862](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1862) +[src/types/app-client.ts:1857](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1857) ___ @@ -419,7 +419,7 @@ Issues a delete_application call to the app. #### Defined in -[src/types/app-client.ts:2037](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2037) +[src/types/app-client.ts:2032](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2032) ___ @@ -453,7 +453,7 @@ To understand the architecture decisions behind this functionality please see ht #### Defined in -[src/types/app-client.ts:1751](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1751) +[src/types/app-client.ts:1746](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1746) ___ @@ -471,7 +471,7 @@ The source maps #### Defined in -[src/types/app-client.ts:1716](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1716) +[src/types/app-client.ts:1711](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1711) ___ @@ -498,7 +498,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:2371](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2371) +[src/types/app-client.ts:2366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2366) ___ @@ -522,7 +522,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:2088](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2088) +[src/types/app-client.ts:2083](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2083) ___ @@ -546,7 +546,7 @@ The ABI method for the given method #### Defined in -[src/types/app-client.ts:2329](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2329) +[src/types/app-client.ts:2324](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2324) ___ @@ -574,7 +574,7 @@ Returns the ABI Method parameters for the given method name string for the app r #### Defined in -[src/types/app-client.ts:2307](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2307) +[src/types/app-client.ts:2302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2302) ___ @@ -594,7 +594,7 @@ ___ #### Defined in -[src/types/app-client.ts:2387](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2387) +[src/types/app-client.ts:2382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2382) ___ @@ -617,7 +617,7 @@ Gets the reference information for the current application instance. #### Defined in -[src/types/app-client.ts:2341](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2341) +[src/types/app-client.ts:2336](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2336) ___ @@ -635,7 +635,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:2144](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2144) +[src/types/app-client.ts:2139](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2139) ___ @@ -659,7 +659,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2159](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2159) +[src/types/app-client.ts:2154](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2154) ___ @@ -684,7 +684,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2175](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2175) +[src/types/app-client.ts:2170](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2170) ___ @@ -709,7 +709,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:2191](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2191) +[src/types/app-client.ts:2186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2186) ___ @@ -735,7 +735,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:2213](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2213) +[src/types/app-client.ts:2208](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2208) ___ @@ -764,7 +764,7 @@ Returns the arguments for an app call for the given ABI method or raw method spe #### Defined in -[src/types/app-client.ts:2237](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2237) +[src/types/app-client.ts:2232](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2232) ___ @@ -782,7 +782,7 @@ The global state #### Defined in -[src/types/app-client.ts:2116](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2116) +[src/types/app-client.ts:2111](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2111) ___ @@ -806,7 +806,7 @@ The global state #### Defined in -[src/types/app-client.ts:2130](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2130) +[src/types/app-client.ts:2125](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2125) ___ @@ -828,7 +828,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:1733](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1733) +[src/types/app-client.ts:1728](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1728) ___ @@ -856,7 +856,7 @@ Issues a opt_in call to the app. #### Defined in -[src/types/app-client.ts:2004](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2004) +[src/types/app-client.ts:1999](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1999) ___ @@ -884,4 +884,4 @@ Updates the smart contract app. #### Defined in -[src/types/app-client.ts:1926](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1926) +[src/types/app-client.ts:1921](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1921) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 2d0b43fa..c2329694 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -19,6 +19,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [atc](types_composer.TransactionComposer.md#atc) - [defaultValidityWindow](types_composer.TransactionComposer.md#defaultvaliditywindow) - [defaultValidityWindowIsExplicit](types_composer.TransactionComposer.md#defaultvaliditywindowisexplicit) +- [errorMapFunctions](types_composer.TransactionComposer.md#errormapfunctions) - [getSigner](types_composer.TransactionComposer.md#getsigner) - [getSuggestedParams](types_composer.TransactionComposer.md#getsuggestedparams) - [txnMethodMap](types_composer.TransactionComposer.md#txnmethodmap) @@ -65,6 +66,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [count](types_composer.TransactionComposer.md#count) - [execute](types_composer.TransactionComposer.md#execute) - [rebuild](types_composer.TransactionComposer.md#rebuild) +- [registerErrorMapFunction](types_composer.TransactionComposer.md#registererrormapfunction) - [send](types_composer.TransactionComposer.md#send) - [simulate](types_composer.TransactionComposer.md#simulate) - [arc2Note](types_composer.TransactionComposer.md#arc2note) @@ -89,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:543](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L543) +[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) ## Properties @@ -101,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:523](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L523) +[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) ___ @@ -111,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:537](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L537) +[src/types/composer.ts:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) ___ @@ -123,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:514](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L514) +[src/types/composer.ts:521](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L521) ___ @@ -135,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:532](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L532) +[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) ___ @@ -147,7 +149,17 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:535](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L535) +[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) + +___ + +### errorMapFunctions + +• `Private` **errorMapFunctions**: [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`any`\>[] + +#### Defined in + +[src/types/composer.ts:547](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L547) ___ @@ -173,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:529](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L529) +[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) ___ @@ -193,7 +205,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:526](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L526) +[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) ___ @@ -205,7 +217,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L517) +[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) ___ @@ -217,7 +229,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:520](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L520) +[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) ___ @@ -229,7 +241,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:511](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L511) +[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) ## Methods @@ -257,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:705](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L705) +[src/types/composer.ts:724](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L724) ___ @@ -283,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:754](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L754) +[src/types/composer.ts:773](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L773) ___ @@ -334,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:664](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L664) +[src/types/composer.ts:683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L683) ___ @@ -360,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:718](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L718) +[src/types/composer.ts:737](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L737) ___ @@ -386,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:690](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L690) +[src/types/composer.ts:709](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L709) ___ @@ -412,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:742](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L742) +[src/types/composer.ts:761](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L761) ___ @@ -458,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L677) +[src/types/composer.ts:696](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L696) ___ @@ -484,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:730](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L730) +[src/types/composer.ts:749](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L749) ___ @@ -508,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:596](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L596) +[src/types/composer.ts:615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L615) ___ @@ -532,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:585](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L585) +[src/types/composer.ts:604](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L604) ___ @@ -556,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L618) +[src/types/composer.ts:637](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L637) ___ @@ -580,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:607](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L607) +[src/types/composer.ts:626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L626) ___ @@ -604,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:640](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L640) +[src/types/composer.ts:659](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L659) ___ @@ -628,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:651](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L651) +[src/types/composer.ts:670](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L670) ___ @@ -652,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:629](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L629) +[src/types/composer.ts:648](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L648) ___ @@ -676,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:786](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L786) +[src/types/composer.ts:805](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L805) ___ @@ -700,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:775](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L775) +[src/types/composer.ts:794](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L794) ___ @@ -724,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:764](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L764) +[src/types/composer.ts:783](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L783) ___ @@ -748,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L574) +[src/types/composer.ts:593](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L593) ___ @@ -773,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:559](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L559) +[src/types/composer.ts:578](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L578) ___ @@ -796,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1241](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1241) +[src/types/composer.ts:1260](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1260) ___ @@ -817,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1064](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1064) +[src/types/composer.ts:1083](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1083) ___ @@ -838,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1021](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1021) +[src/types/composer.ts:1040](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1040) ___ @@ -859,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1003](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1003) +[src/types/composer.ts:1022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1022) ___ @@ -880,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1034](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1034) +[src/types/composer.ts:1053](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1053) ___ @@ -901,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1042](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1042) +[src/types/composer.ts:1061](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1061) ___ @@ -922,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1052](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1052) +[src/types/composer.ts:1071](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1071) ___ @@ -944,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:792](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L792) +[src/types/composer.ts:811](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L811) ___ @@ -965,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1115](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1115) +[src/types/composer.ts:1134](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1134) ___ @@ -989,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:862](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L862) +[src/types/composer.ts:881](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L881) ___ @@ -1010,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:993](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L993) +[src/types/composer.ts:1012](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1012) ___ @@ -1028,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1188](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1188) +[src/types/composer.ts:1207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1207) ___ @@ -1051,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1138](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1138) +[src/types/composer.ts:1157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1157) ___ @@ -1072,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1165](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1165) +[src/types/composer.ts:1184](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1184) ___ @@ -1100,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:808](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L808) +[src/types/composer.ts:827](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L827) ___ @@ -1116,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1228](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1228) +[src/types/composer.ts:1247](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1247) ___ @@ -1146,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1310](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1310) +[src/types/composer.ts:1337](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1337) ___ @@ -1165,7 +1177,35 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1270](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1270) +[src/types/composer.ts:1289](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1289) + +___ + +### registerErrorMapFunction + +▸ **registerErrorMapFunction**\<`ErrorType`\>(`cb`): [`TransactionComposer`](types_composer.TransactionComposer.md) + +Register a callback to use when an error is caught in simulate or execute + +#### Type parameters + +| Name | +| :------ | +| `ErrorType` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `cb` | [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`ErrorType`\> | + +#### Returns + +[`TransactionComposer`](types_composer.TransactionComposer.md) + +#### Defined in + +[src/types/composer.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L567) ___ @@ -1189,7 +1229,7 @@ The execution result #### Defined in -[src/types/composer.ts:1280](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1280) +[src/types/composer.ts:1299](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1299) ___ @@ -1207,7 +1247,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1318](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1318) +[src/types/composer.ts:1345](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1345) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1229,7 +1269,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1319](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1319) +[src/types/composer.ts:1346](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1346) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1252,7 +1292,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1322](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1322) +[src/types/composer.ts:1349](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1349) ___ @@ -1278,4 +1318,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1399](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1399) +[src/types/composer.ts:1433](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1433) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 5e643622..900722d0 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:503](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L503) +[src/types/composer.ts:508](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L508) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:505](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L505) +[src/types/composer.ts:510](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L510) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:501](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L501) +[src/types/composer.ts:506](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L506) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 4d5d5a9b..8151022b 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -34,6 +34,7 @@ - [AssetTransferParams](types_composer.md#assettransferparams) - [CommonAppCallParams](types_composer.md#commonappcallparams) - [CommonTransactionParams](types_composer.md#commontransactionparams) +- [ErrorMapFunction](types_composer.md#errormapfunction) - [OfflineKeyRegistrationParams](types_composer.md#offlinekeyregistrationparams) - [OnlineKeyRegistrationParams](types_composer.md#onlinekeyregistrationparams) - [PaymentParams](types_composer.md#paymentparams) @@ -319,6 +320,36 @@ Common parameters for defining a transaction. ___ +### ErrorMapFunction + +Ƭ **ErrorMapFunction**\<`ErrorType`\>: (`error`: `unknown`) => `Promise`\<`ErrorType` \| `undefined`\> + +#### Type parameters + +| Name | +| :------ | +| `ErrorType` | + +#### Type declaration + +▸ (`error`): `Promise`\<`ErrorType` \| `undefined`\> + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `error` | `unknown` | + +##### Returns + +`Promise`\<`ErrorType` \| `undefined`\> + +#### Defined in + +[src/types/composer.ts:513](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L513) + +___ + ### OfflineKeyRegistrationParams Ƭ **OfflineKeyRegistrationParams**: [`CommonTransactionParams`](types_composer.md#commontransactionparams) & \{ `preventAccountFromEverParticipatingAgain?`: `boolean` } @@ -405,6 +436,7 @@ Parameters to create an `TransactionComposer`. | `algod` | `algosdk.Algodv2` | The algod client to use to get suggestedParams and send the transaction group | | `appManager?` | [`AppManager`](../classes/types_app_manager.AppManager.md) | An existing `AppManager` to use to manage app compilation and cache compilation results. If not specified than an ephemeral one will be created. | | `defaultValidityWindow?` | `bigint` | How many rounds a transaction should be valid for by default; if not specified then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet). | +| `errorMapFunctions?` | [`ErrorMapFunction`](types_composer.md#errormapfunction)\<`unknown`\>[] | An array of error callbacks to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorMapFunction` | | `getSigner` | (`address`: `string` \| `Address`) => `algosdk.TransactionSigner` | - | | `getSuggestedParams?` | () => `Promise`\<`algosdk.SuggestedParams`\> | - | diff --git a/docs/code/modules/types_composer_spec.md b/docs/code/modules/types_composer_spec.md new file mode 100644 index 00000000..ae6c02ca --- /dev/null +++ b/docs/code/modules/types_composer_spec.md @@ -0,0 +1,3 @@ +[@algorandfoundation/algokit-utils](../README.md) / types/composer.spec + +# Module: types/composer.spec diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index 4c8d52e3..dc42b8b1 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -1,5 +1,5 @@ import { algorandFixture } from '../testing' -import { beforeAll, beforeEach, describe, expect, test } from 'vitest' +import { beforeEach, describe, expect, test } from 'vitest' const fixture = algorandFixture() describe('TransactionComposer', () => { diff --git a/src/types/instance-of.ts b/src/types/instance-of.ts index 7bf8e92f..fed80343 100644 --- a/src/types/instance-of.ts +++ b/src/types/instance-of.ts @@ -1,4 +1,3 @@ export type InterfaceOf = { - [Member in keyof ClassType]: ClassType[Member]; -}; - + [Member in keyof ClassType]: ClassType[Member] +} From 63f0464f1d491a28ef094ee27a64fdab522d2fea Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 15:55:34 -0500 Subject: [PATCH 11/38] ErrorMapFunction -> ErrorTransformer --- .../types_algorand_client.AlgorandClient.md | 28 +++++++++---------- .../types_composer.TransactionComposer.md | 14 +++++----- docs/code/modules/types_composer.md | 8 +++--- src/types/algorand-client.ts | 22 +++++++-------- src/types/app-client.ts | 2 +- src/types/app-factory-and-client.spec.ts | 4 +-- src/types/composer.spec.ts | 10 +++---- src/types/composer.ts | 18 ++++++------ 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 5a59c18e..9a986c59 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -25,8 +25,8 @@ A client that brokers easy access to Algorand functionality. - [\_defaultValidityWindow](types_algorand_client.AlgorandClient.md#_defaultvaliditywindow) - [\_transactionCreator](types_algorand_client.AlgorandClient.md#_transactioncreator) - [\_transactionSender](types_algorand_client.AlgorandClient.md#_transactionsender) -- [errorMapFunctionId](types_algorand_client.AlgorandClient.md#errormapfunctionid) -- [errorMapFunctions](types_algorand_client.AlgorandClient.md#errormapfunctions) +- [errorTransformerId](types_algorand_client.AlgorandClient.md#errortransformerid) +- [errorTransformers](types_algorand_client.AlgorandClient.md#errortransformers) ### Accessors @@ -42,14 +42,14 @@ A client that brokers easy access to Algorand functionality. - [getSuggestedParams](types_algorand_client.AlgorandClient.md#getsuggestedparams) - [newGroup](types_algorand_client.AlgorandClient.md#newgroup) -- [registerErrorMapFunction](types_algorand_client.AlgorandClient.md#registererrormapfunction) +- [registerErrorTransformer](types_algorand_client.AlgorandClient.md#registererrortransformer) - [setDefaultSigner](types_algorand_client.AlgorandClient.md#setdefaultsigner) - [setDefaultValidityWindow](types_algorand_client.AlgorandClient.md#setdefaultvaliditywindow) - [setSigner](types_algorand_client.AlgorandClient.md#setsigner) - [setSignerFromAccount](types_algorand_client.AlgorandClient.md#setsignerfromaccount) - [setSuggestedParamsCache](types_algorand_client.AlgorandClient.md#setsuggestedparamscache) - [setSuggestedParamsCacheTimeout](types_algorand_client.AlgorandClient.md#setsuggestedparamscachetimeout) -- [unregisterErrorMapFunction](types_algorand_client.AlgorandClient.md#unregistererrormapfunction) +- [unregisterErrorTransformer](types_algorand_client.AlgorandClient.md#unregistererrortransformer) - [defaultLocalNet](types_algorand_client.AlgorandClient.md#defaultlocalnet) - [fromClients](types_algorand_client.AlgorandClient.md#fromclients) - [fromConfig](types_algorand_client.AlgorandClient.md#fromconfig) @@ -189,11 +189,11 @@ ___ ___ -### errorMapFunctionId +### errorTransformerId -• `Private` **errorMapFunctionId**: `number` = `0` +• `Private` **errorTransformerId**: `number` = `0` -The ID used when registering an error map function +The ID used when registering an error transformer #### Defined in @@ -201,9 +201,9 @@ The ID used when registering an error map function ___ -### errorMapFunctions +### errorTransformers -• **errorMapFunctions**: `Map`\<`number`, [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`any`\>\> +• **errorTransformers**: `Map`\<`number`, [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>\> #### Defined in @@ -355,9 +355,9 @@ Start a new `TransactionComposer` transaction group ___ -### registerErrorMapFunction +### registerErrorTransformer -▸ **registerErrorMapFunction**\<`ErrorType`\>(`cb`): `number` +▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): `number` Register a callback to use when an error is caught when simulating or executing composed transaction groups made from `newGroup` @@ -372,7 +372,7 @@ composed transaction groups made from `newGroup` | Name | Type | | :------ | :------ | -| `cb` | [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`ErrorType`\> | +| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`ErrorType`\> | #### Returns @@ -541,9 +541,9 @@ The `AlgorandClient` so method calls can be chained ___ -### unregisterErrorMapFunction +### unregisterErrorTransformer -▸ **unregisterErrorMapFunction**(`id`): `void` +▸ **unregisterErrorTransformer**(`id`): `void` #### Parameters diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index c2329694..04f02d34 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -19,7 +19,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [atc](types_composer.TransactionComposer.md#atc) - [defaultValidityWindow](types_composer.TransactionComposer.md#defaultvaliditywindow) - [defaultValidityWindowIsExplicit](types_composer.TransactionComposer.md#defaultvaliditywindowisexplicit) -- [errorMapFunctions](types_composer.TransactionComposer.md#errormapfunctions) +- [errorTransformers](types_composer.TransactionComposer.md#errortransformers) - [getSigner](types_composer.TransactionComposer.md#getsigner) - [getSuggestedParams](types_composer.TransactionComposer.md#getsuggestedparams) - [txnMethodMap](types_composer.TransactionComposer.md#txnmethodmap) @@ -66,7 +66,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [count](types_composer.TransactionComposer.md#count) - [execute](types_composer.TransactionComposer.md#execute) - [rebuild](types_composer.TransactionComposer.md#rebuild) -- [registerErrorMapFunction](types_composer.TransactionComposer.md#registererrormapfunction) +- [registerErrorTransformer](types_composer.TransactionComposer.md#registererrortransformer) - [send](types_composer.TransactionComposer.md#send) - [simulate](types_composer.TransactionComposer.md#simulate) - [arc2Note](types_composer.TransactionComposer.md#arc2note) @@ -153,9 +153,9 @@ Whether the validity window was explicitly set on construction ___ -### errorMapFunctions +### errorTransformers -• `Private` **errorMapFunctions**: [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`any`\>[] +• `Private` **errorTransformers**: [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>[] #### Defined in @@ -1181,9 +1181,9 @@ The newly built atomic transaction composer and the transactions ___ -### registerErrorMapFunction +### registerErrorTransformer -▸ **registerErrorMapFunction**\<`ErrorType`\>(`cb`): [`TransactionComposer`](types_composer.TransactionComposer.md) +▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): [`TransactionComposer`](types_composer.TransactionComposer.md) Register a callback to use when an error is caught in simulate or execute @@ -1197,7 +1197,7 @@ Register a callback to use when an error is caught in simulate or execute | Name | Type | | :------ | :------ | -| `cb` | [`ErrorMapFunction`](../modules/types_composer.md#errormapfunction)\<`ErrorType`\> | +| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`ErrorType`\> | #### Returns diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 8151022b..8a2583ca 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -34,7 +34,7 @@ - [AssetTransferParams](types_composer.md#assettransferparams) - [CommonAppCallParams](types_composer.md#commonappcallparams) - [CommonTransactionParams](types_composer.md#commontransactionparams) -- [ErrorMapFunction](types_composer.md#errormapfunction) +- [ErrorTransformer](types_composer.md#errortransformer) - [OfflineKeyRegistrationParams](types_composer.md#offlinekeyregistrationparams) - [OnlineKeyRegistrationParams](types_composer.md#onlinekeyregistrationparams) - [PaymentParams](types_composer.md#paymentparams) @@ -320,9 +320,9 @@ Common parameters for defining a transaction. ___ -### ErrorMapFunction +### ErrorTransformer -Ƭ **ErrorMapFunction**\<`ErrorType`\>: (`error`: `unknown`) => `Promise`\<`ErrorType` \| `undefined`\> +Ƭ **ErrorTransformer**\<`ErrorType`\>: (`error`: `unknown`) => `Promise`\<`ErrorType` \| `undefined`\> #### Type parameters @@ -436,7 +436,7 @@ Parameters to create an `TransactionComposer`. | `algod` | `algosdk.Algodv2` | The algod client to use to get suggestedParams and send the transaction group | | `appManager?` | [`AppManager`](../classes/types_app_manager.AppManager.md) | An existing `AppManager` to use to manage app compilation and cache compilation results. If not specified than an ephemeral one will be created. | | `defaultValidityWindow?` | `bigint` | How many rounds a transaction should be valid for by default; if not specified then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet). | -| `errorMapFunctions?` | [`ErrorMapFunction`](types_composer.md#errormapfunction)\<`unknown`\>[] | An array of error callbacks to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorMapFunction` | +| `errorTransformers?` | [`ErrorTransformer`](types_composer.md#errortransformer)\<`unknown`\>[] | An array of error callbacks to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorTransformer` | | `getSigner` | (`address`: `string` \| `Address`) => `algosdk.TransactionSigner` | - | | `getSuggestedParams?` | () => `Promise`\<`algosdk.SuggestedParams`\> | - | diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 61b56357..be413204 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -7,7 +7,7 @@ import { AppDeployer } from './app-deployer' import { AppManager } from './app-manager' import { AssetManager } from './asset-manager' import { AlgoSdkClients, ClientManager } from './client-manager' -import { ErrorMapFunction, TransactionComposer } from './composer' +import { ErrorTransformer, TransactionComposer } from './composer' import { AlgoConfig } from './network-client' import Account = algosdk.Account import LogicSigAccount = algosdk.LogicSigAccount @@ -41,7 +41,7 @@ export class AlgorandClient { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorMapFunctions: Map> = new Map() + errorTransformers: Map> = new Map() /** * Sets the default validity window for transactions. @@ -159,23 +159,23 @@ export class AlgorandClient { return this._appDeployer } - /** The ID used when registering an error map function */ - private errorMapFunctionId = 0 + /** The ID used when registering an error transformer */ + private errorTransformerId = 0 /** * Register a callback to use when an error is caught when simulating or executing * composed transaction groups made from `newGroup` */ - public registerErrorMapFunction(cb: ErrorMapFunction) { - const id = this.errorMapFunctionId - this.errorMapFunctionId++ - this.errorMapFunctions.set(id, cb) + public registerErrorTransformer(cb: ErrorTransformer) { + const id = this.errorTransformerId + this.errorTransformerId++ + this.errorTransformers.set(id, cb) return id } - public unregisterErrorMapFunction(id: number) { - this.errorMapFunctions.delete(id) + public unregisterErrorTransformer(id: number) { + this.errorTransformers.delete(id) } /** Start a new `TransactionComposer` transaction group */ @@ -186,7 +186,7 @@ export class AlgorandClient { getSuggestedParams: () => this.getSuggestedParams(), defaultValidityWindow: this._defaultValidityWindow, appManager: this._appManager, - errorMapFunctions: [...this.errorMapFunctions.values()], + errorTransformers: [...this.errorTransformers.values()], }) } diff --git a/src/types/app-client.ts b/src/types/app-client.ts index d2c1dc66..372a5a07 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -504,7 +504,7 @@ export class AppClient { this._appSpec = AppClient.normaliseAppSpec(params.appSpec) this._appName = params.appName ?? this._appSpec.name this._algorand = params.algorand - this._algorand.registerErrorMapFunction(this.handleCallErrors) + this._algorand.registerErrorTransformer(this.handleCallErrors) this._defaultSender = typeof params.defaultSender === 'string' ? Address.fromString(params.defaultSender) : params.defaultSender this._defaultSigner = params.defaultSigner diff --git a/src/types/app-factory-and-client.spec.ts b/src/types/app-factory-and-client.spec.ts index f7ca0e55..ad6a996c 100644 --- a/src/types/app-factory-and-client.spec.ts +++ b/src/types/app-factory-and-client.spec.ts @@ -714,7 +714,7 @@ describe('ARC56: app-factory-and-app-client', () => { } }) - test('AppClient registers error map function to AlgorandClient', async () => { + test('AppClient registers error transformer to AlgorandClient', async () => { const { testAccount } = localnet.context const { appClient } = await factory.deploy({ createParams: { @@ -724,7 +724,7 @@ describe('ARC56: app-factory-and-app-client', () => { }) try { - // Don't use the app client to call, but since we've instantiated one the error map function should be registered + // Don't use the app client to call, but since we've instantiated one the error transformer should be registered await appClient.algorand .newGroup() .addAppCallMethodCall({ appId: appClient.appId, method: appClient.getABIMethod('throwError')!, sender: testAccount }) diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index dc42b8b1..73ccad1d 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -1,5 +1,5 @@ -import { algorandFixture } from '../testing' import { beforeEach, describe, expect, test } from 'vitest' +import { algorandFixture } from '../testing' const fixture = algorandFixture() describe('TransactionComposer', () => { @@ -7,8 +7,8 @@ describe('TransactionComposer', () => { await fixture.beforeEach() }) - describe('error map functions', () => { - const errorMapFunction = async (e: unknown) => { + describe('error transformers', () => { + const errorTransformer = async (e: unknown) => { let errorString: string if (e instanceof Error) { errorString = e.message @@ -35,7 +35,7 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorMapFunction(errorMapFunction) + composer.registerErrorTransformer(errorTransformer) await expect(composer.simulate()).rejects.toThrow('ASSET MISSING!') }) @@ -52,7 +52,7 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorMapFunction(errorMapFunction) + composer.registerErrorTransformer(errorTransformer) await expect(composer.send()).rejects.toThrow('ASSET MISSING!') }) diff --git a/src/types/composer.ts b/src/types/composer.ts index cb8ed217..8d601f66 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -495,9 +495,9 @@ export type TransactionComposerParams = { appManager?: AppManager /** * An array of error callbacks to use when an error is caught in simulate or execute - * callbacks can later be registered with `registerErrorMapFunction` + * callbacks can later be registered with `registerErrorTransformer` */ - errorMapFunctions?: ErrorMapFunction[] + errorTransformers?: ErrorTransformer[] } /** Set of transactions built by `TransactionComposer`. */ @@ -510,7 +510,7 @@ export interface BuiltTransactions { signers: Map } -export type ErrorMapFunction = (error: unknown) => Promise +export type ErrorTransformer = (error: unknown) => Promise /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { @@ -544,7 +544,7 @@ export class TransactionComposer { private appManager: AppManager // eslint-disable-next-line @typescript-eslint/no-explicit-any - private errorMapFunctions: ErrorMapFunction[] + private errorTransformers: ErrorTransformer[] /** * Create a `TransactionComposer`. @@ -558,14 +558,14 @@ export class TransactionComposer { this.defaultValidityWindow = params.defaultValidityWindow ?? this.defaultValidityWindow this.defaultValidityWindowIsExplicit = params.defaultValidityWindow !== undefined this.appManager = params.appManager ?? new AppManager(params.algod) - this.errorMapFunctions = params.errorMapFunctions ?? [] + this.errorTransformers = params.errorTransformers ?? [] } /** * Register a callback to use when an error is caught in simulate or execute */ - registerErrorMapFunction(cb: ErrorMapFunction) { - this.errorMapFunctions.push(cb) + registerErrorTransformer(cb: ErrorTransformer) { + this.errorTransformers.push(cb) return this } @@ -1318,7 +1318,7 @@ export class TransactionComposer { ) } catch (e: unknown) { let error = e - for await (const cb of this.errorMapFunctions) { + for await (const cb of this.errorTransformers) { error = await cb(e) } throw error @@ -1396,7 +1396,7 @@ export class TransactionComposer { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - for await (const cb of this.errorMapFunctions) { + for await (const cb of this.errorTransformers) { const callbackResult = await cb(error) if (callbackResult !== undefined) { error = callbackResult From 7cb6e8b0946d752b167daf9fc38a97c4b8bf929f Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 15:58:36 -0500 Subject: [PATCH 12/38] update docstrings --- .../types_algorand_client.AlgorandClient.md | 27 +++--- .../types_composer.TransactionComposer.md | 92 ++++++++++--------- src/types/algorand-client.ts | 5 +- src/types/composer.ts | 4 +- 4 files changed, 69 insertions(+), 59 deletions(-) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 9a986c59..5e9c927c 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -303,7 +303,7 @@ Methods for creating a transaction. #### Defined in -[src/types/algorand-client.ts:203](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L203) +[src/types/algorand-client.ts:206](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L206) ___ @@ -319,7 +319,7 @@ Methods for sending a transaction. #### Defined in -[src/types/algorand-client.ts:196](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L196) +[src/types/algorand-client.ts:199](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L199) ## Methods @@ -351,7 +351,7 @@ Start a new `TransactionComposer` transaction group #### Defined in -[src/types/algorand-client.ts:182](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L182) +[src/types/algorand-client.ts:185](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L185) ___ @@ -359,7 +359,7 @@ ___ ▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): `number` -Register a callback to use when an error is caught when simulating or executing +Register a function that will be used to transform an error caught when simulating or executing composed transaction groups made from `newGroup` #### Type parameters @@ -378,9 +378,12 @@ composed transaction groups made from `newGroup` `number` +The ID used when registering the error transformer which can be used to unregister +the error transformer with `unregisterErrorTransformer` + #### Defined in -[src/types/algorand-client.ts:169](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L169) +[src/types/algorand-client.ts:172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L172) ___ @@ -557,7 +560,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:177](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L177) +[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) ___ @@ -575,7 +578,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:213](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L213) +[src/types/algorand-client.ts:216](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L216) ___ @@ -599,7 +602,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:250](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L250) +[src/types/algorand-client.ts:253](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L253) ___ @@ -623,7 +626,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:280](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L280) +[src/types/algorand-client.ts:283](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L283) ___ @@ -654,7 +657,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:271](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L271) +[src/types/algorand-client.ts:274](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L274) ___ @@ -672,7 +675,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:237](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L237) +[src/types/algorand-client.ts:240](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L240) ___ @@ -690,4 +693,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:225](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L225) +[src/types/algorand-client.ts:228](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L228) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 04f02d34..107783b0 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -269,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:724](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L724) +[src/types/composer.ts:726](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L726) ___ @@ -295,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:773](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L773) +[src/types/composer.ts:775](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L775) ___ @@ -346,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L683) +[src/types/composer.ts:685](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L685) ___ @@ -372,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:737](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L737) +[src/types/composer.ts:739](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L739) ___ @@ -398,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:709](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L709) +[src/types/composer.ts:711](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L711) ___ @@ -424,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:761](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L761) +[src/types/composer.ts:763](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L763) ___ @@ -470,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:696](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L696) +[src/types/composer.ts:698](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L698) ___ @@ -496,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:749](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L749) +[src/types/composer.ts:751](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L751) ___ @@ -520,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L615) +[src/types/composer.ts:617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L617) ___ @@ -544,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:604](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L604) +[src/types/composer.ts:606](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L606) ___ @@ -568,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:637](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L637) +[src/types/composer.ts:639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L639) ___ @@ -592,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L626) +[src/types/composer.ts:628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L628) ___ @@ -616,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:659](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L659) +[src/types/composer.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L661) ___ @@ -640,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:670](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L670) +[src/types/composer.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L672) ___ @@ -664,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:648](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L648) +[src/types/composer.ts:650](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L650) ___ @@ -688,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:805](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L805) +[src/types/composer.ts:807](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L807) ___ @@ -712,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:794](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L794) +[src/types/composer.ts:796](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L796) ___ @@ -736,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:783](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L783) +[src/types/composer.ts:785](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L785) ___ @@ -760,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:593](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L593) +[src/types/composer.ts:595](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L595) ___ @@ -785,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:578](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L578) +[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) ___ @@ -808,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1260](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1260) +[src/types/composer.ts:1262](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1262) ___ @@ -829,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1083](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1083) +[src/types/composer.ts:1085](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1085) ___ @@ -850,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1040](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1040) +[src/types/composer.ts:1042](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1042) ___ @@ -871,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1022) +[src/types/composer.ts:1024](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1024) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1053](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1053) +[src/types/composer.ts:1055](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1055) ___ @@ -913,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1061](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1061) +[src/types/composer.ts:1063](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1063) ___ @@ -934,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1071](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1071) +[src/types/composer.ts:1073](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1073) ___ @@ -956,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:811](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L811) +[src/types/composer.ts:813](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L813) ___ @@ -977,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1134](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1134) +[src/types/composer.ts:1136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1136) ___ @@ -1001,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:881](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L881) +[src/types/composer.ts:883](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L883) ___ @@ -1022,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:1012](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1012) +[src/types/composer.ts:1014](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1014) ___ @@ -1040,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1207) +[src/types/composer.ts:1209](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1209) ___ @@ -1063,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1157) +[src/types/composer.ts:1159](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1159) ___ @@ -1084,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1184](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1184) +[src/types/composer.ts:1186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1186) ___ @@ -1112,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:827](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L827) +[src/types/composer.ts:829](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L829) ___ @@ -1128,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1247](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1247) +[src/types/composer.ts:1249](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1249) ___ @@ -1158,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1337](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1337) +[src/types/composer.ts:1339](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1339) ___ @@ -1177,7 +1177,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1289](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1289) +[src/types/composer.ts:1291](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1291) ___ @@ -1185,7 +1185,7 @@ ___ ▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): [`TransactionComposer`](types_composer.TransactionComposer.md) -Register a callback to use when an error is caught in simulate or execute +Register a function that will be used to transform an error caught when simulating or executing #### Type parameters @@ -1203,9 +1203,11 @@ Register a callback to use when an error is caught in simulate or execute [`TransactionComposer`](types_composer.TransactionComposer.md) +The composer so you can chain method calls + #### Defined in -[src/types/composer.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L567) +[src/types/composer.ts:569](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L569) ___ @@ -1229,7 +1231,7 @@ The execution result #### Defined in -[src/types/composer.ts:1299](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1299) +[src/types/composer.ts:1301](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1301) ___ @@ -1247,7 +1249,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1345](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1345) +[src/types/composer.ts:1347](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1347) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1269,7 +1271,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1346](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1346) +[src/types/composer.ts:1348](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1348) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1292,7 +1294,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1349](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1349) +[src/types/composer.ts:1351](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1351) ___ @@ -1318,4 +1320,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1433](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1433) +[src/types/composer.ts:1435](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1435) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index be413204..28148697 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -163,8 +163,11 @@ export class AlgorandClient { private errorTransformerId = 0 /** - * Register a callback to use when an error is caught when simulating or executing + * Register a function that will be used to transform an error caught when simulating or executing * composed transaction groups made from `newGroup` + * + * @returns The ID used when registering the error transformer which can be used to unregister + * the error transformer with `unregisterErrorTransformer` */ public registerErrorTransformer(cb: ErrorTransformer) { const id = this.errorTransformerId diff --git a/src/types/composer.ts b/src/types/composer.ts index 8d601f66..47901c78 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -562,7 +562,9 @@ export class TransactionComposer { } /** - * Register a callback to use when an error is caught in simulate or execute + * Register a function that will be used to transform an error caught when simulating or executing + * + * @returns The composer so you can chain method calls */ registerErrorTransformer(cb: ErrorTransformer) { this.errorTransformers.push(cb) From 88815321109b94154f60f146419d7e49eee6d167 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:02:05 -0500 Subject: [PATCH 13/38] use object.assign to avoid any cast Co-authored-by: Tristan Menzel --- docs/code/classes/types_composer.TransactionComposer.md | 2 +- src/types/composer.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 107783b0..252e8e8b 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -1320,4 +1320,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1435](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1435) +[src/types/composer.ts:1434](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1434) diff --git a/src/types/composer.ts b/src/types/composer.ts index 47901c78..d91a4b3f 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -1405,8 +1405,7 @@ export class TransactionComposer { } } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(error as any).simulateResponse = simulateResponse + Object.assign(error, { simulateResponse }) throw error } From cb3833403b288c7974180e115fbe9cd664297df2 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:04:21 -0500 Subject: [PATCH 14/38] don't await sync iterable Co-authored-by: Tristan Menzel --- src/types/composer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index d91a4b3f..f5f573ab 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -1320,7 +1320,7 @@ export class TransactionComposer { ) } catch (e: unknown) { let error = e - for await (const cb of this.errorTransformers) { + for (const cb of this.errorTransformers) { error = await cb(e) } throw error @@ -1398,7 +1398,7 @@ export class TransactionComposer { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - for await (const cb of this.errorTransformers) { + for (const cb of this.errorTransformers) { const callbackResult = await cb(error) if (callbackResult !== undefined) { error = callbackResult From 37c68b745be19e9ed4341357c644015e0cde6189 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:11:57 -0500 Subject: [PATCH 15/38] check error message first before resorting to template literal --- src/types/app-client.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/app-client.ts b/src/types/app-client.ts index 372a5a07..8c2ab731 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -1420,7 +1420,10 @@ export class AppClient { // Only handle errors for this app. // Because the error type is unknown, we turn it into a string to parse app ID const appIdString = `app=${this._appId.toString()}` - if (!`${e}`.includes(appIdString)) { + + if (e instanceof Error && !e.message.includes(appIdString)) { + return e + } else if (!`${e}`.includes(appIdString)) { return e } From 94abe7bfff5d6fb3579f24addbdf50e39205638a Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:21:16 -0500 Subject: [PATCH 16/38] Check error instance before checking for match --- src/types/app-factory-and-client.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/types/app-factory-and-client.spec.ts b/src/types/app-factory-and-client.spec.ts index ad6a996c..7b338b84 100644 --- a/src/types/app-factory-and-client.spec.ts +++ b/src/types/app-factory-and-client.spec.ts @@ -710,7 +710,8 @@ describe('ARC56: app-factory-and-app-client', () => { invariant(false) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { - expect(JSON.stringify(e)).toMatch('this is an error') + expect(e).toBeInstanceOf(Error) + expect(e.message).toMatch('this is an error') } }) @@ -732,7 +733,8 @@ describe('ARC56: app-factory-and-app-client', () => { invariant(false) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { - expect(JSON.stringify(e)).toMatch('this is an error') + expect(e).toBeInstanceOf(Error) + expect(e.message).toMatch('this is an error') } }) From d7d4462b43351f99a24824919386781e77412f4f Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:21:33 -0500 Subject: [PATCH 17/38] typedoc --- .../classes/types_app_client.AppClient.md | 4 +- .../types_app_client.ApplicationClient.md | 80 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index f861c563..626eea9d 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -803,7 +803,7 @@ ___ #### Defined in -[src/types/app-client.ts:1440](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1440) +[src/types/app-client.ts:1443](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1443) ___ @@ -1109,7 +1109,7 @@ ___ #### Defined in -[src/types/app-client.ts:1512](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1512) +[src/types/app-client.ts:1515](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1515) ___ diff --git a/docs/code/classes/types_app_client.ApplicationClient.md b/docs/code/classes/types_app_client.ApplicationClient.md index c7fc6e7a..ba74e90b 100644 --- a/docs/code/classes/types_app_client.ApplicationClient.md +++ b/docs/code/classes/types_app_client.ApplicationClient.md @@ -92,7 +92,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1639) +[src/types/app-client.ts:1642](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1642) ## Properties @@ -102,7 +102,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) +[src/types/app-client.ts:1625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1625) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) +[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) +[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[src/types/app-client.ts:1626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1626) +[src/types/app-client.ts:1629](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1629) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) +[src/types/app-client.ts:1630](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1630) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) +[src/types/app-client.ts:1626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1626) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[src/types/app-client.ts:1613](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1613) +[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[src/types/app-client.ts:1615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1615) +[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) +[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) +[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[src/types/app-client.ts:1614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1614) +[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) +[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) +[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) ## Methods @@ -250,7 +250,7 @@ Issues a no_op (normal) call to the app. #### Defined in -[src/types/app-client.ts:1962](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1962) +[src/types/app-client.ts:1965](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1965) ___ @@ -279,7 +279,7 @@ Issues a call to the app with the given call type. #### Defined in -[src/types/app-client.ts:2044](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2044) +[src/types/app-client.ts:2047](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2047) ___ @@ -307,7 +307,7 @@ Issues a clear_state call to the app. #### Defined in -[src/types/app-client.ts:2021](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2021) +[src/types/app-client.ts:2024](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2024) ___ @@ -335,7 +335,7 @@ Issues a close_out call to the app. #### Defined in -[src/types/app-client.ts:2010](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2010) +[src/types/app-client.ts:2013](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2013) ___ @@ -363,7 +363,7 @@ Compiles the approval and clear state programs and sets up the source map. #### Defined in -[src/types/app-client.ts:1678](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1678) +[src/types/app-client.ts:1681](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1681) ___ @@ -391,7 +391,7 @@ Creates a smart contract app, returns the details of the created app. #### Defined in -[src/types/app-client.ts:1857](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1857) +[src/types/app-client.ts:1860](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1860) ___ @@ -419,7 +419,7 @@ Issues a delete_application call to the app. #### Defined in -[src/types/app-client.ts:2032](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2032) +[src/types/app-client.ts:2035](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2035) ___ @@ -453,7 +453,7 @@ To understand the architecture decisions behind this functionality please see ht #### Defined in -[src/types/app-client.ts:1746](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1746) +[src/types/app-client.ts:1749](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1749) ___ @@ -471,7 +471,7 @@ The source maps #### Defined in -[src/types/app-client.ts:1711](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1711) +[src/types/app-client.ts:1714](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1714) ___ @@ -498,7 +498,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:2366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2366) +[src/types/app-client.ts:2369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2369) ___ @@ -522,7 +522,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:2083](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2083) +[src/types/app-client.ts:2086](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2086) ___ @@ -546,7 +546,7 @@ The ABI method for the given method #### Defined in -[src/types/app-client.ts:2324](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2324) +[src/types/app-client.ts:2327](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2327) ___ @@ -574,7 +574,7 @@ Returns the ABI Method parameters for the given method name string for the app r #### Defined in -[src/types/app-client.ts:2302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2302) +[src/types/app-client.ts:2305](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2305) ___ @@ -594,7 +594,7 @@ ___ #### Defined in -[src/types/app-client.ts:2382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2382) +[src/types/app-client.ts:2385](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2385) ___ @@ -617,7 +617,7 @@ Gets the reference information for the current application instance. #### Defined in -[src/types/app-client.ts:2336](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2336) +[src/types/app-client.ts:2339](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2339) ___ @@ -635,7 +635,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:2139](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2139) +[src/types/app-client.ts:2142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2142) ___ @@ -659,7 +659,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2154](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2154) +[src/types/app-client.ts:2157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2157) ___ @@ -684,7 +684,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2170](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2170) +[src/types/app-client.ts:2173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2173) ___ @@ -709,7 +709,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:2186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2186) +[src/types/app-client.ts:2189](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2189) ___ @@ -735,7 +735,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:2208](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2208) +[src/types/app-client.ts:2211](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2211) ___ @@ -764,7 +764,7 @@ Returns the arguments for an app call for the given ABI method or raw method spe #### Defined in -[src/types/app-client.ts:2232](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2232) +[src/types/app-client.ts:2235](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2235) ___ @@ -782,7 +782,7 @@ The global state #### Defined in -[src/types/app-client.ts:2111](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2111) +[src/types/app-client.ts:2114](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2114) ___ @@ -806,7 +806,7 @@ The global state #### Defined in -[src/types/app-client.ts:2125](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2125) +[src/types/app-client.ts:2128](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2128) ___ @@ -828,7 +828,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:1728](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1728) +[src/types/app-client.ts:1731](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1731) ___ @@ -856,7 +856,7 @@ Issues a opt_in call to the app. #### Defined in -[src/types/app-client.ts:1999](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1999) +[src/types/app-client.ts:2002](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2002) ___ @@ -884,4 +884,4 @@ Updates the smart contract app. #### Defined in -[src/types/app-client.ts:1921](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1921) +[src/types/app-client.ts:1924](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1924) From 4eba5e2d75b10ee09b2a15600b259f6b58c903b6 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:23:47 -0500 Subject: [PATCH 18/38] fixture in describe block --- src/types/composer.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index 73ccad1d..7134662d 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -1,8 +1,9 @@ import { beforeEach, describe, expect, test } from 'vitest' import { algorandFixture } from '../testing' -const fixture = algorandFixture() describe('TransactionComposer', () => { + const fixture = algorandFixture() + beforeEach(async () => { await fixture.beforeEach() }) From 842a0d6e3636a0f22752d7b6cdfc81b88bf23fa8 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:34:51 -0500 Subject: [PATCH 19/38] use set instead of map --- .../types_algorand_client.AlgorandClient.md | 26 +++++++++---------- src/types/algorand-client.ts | 9 ++++--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 5e9c927c..adbbb12c 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -203,7 +203,7 @@ ___ ### errorTransformers -• **errorTransformers**: `Map`\<`number`, [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>\> +• **errorTransformers**: `Set`\<[`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>\> #### Defined in @@ -303,7 +303,7 @@ Methods for creating a transaction. #### Defined in -[src/types/algorand-client.ts:206](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L206) +[src/types/algorand-client.ts:207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L207) ___ @@ -319,7 +319,7 @@ Methods for sending a transaction. #### Defined in -[src/types/algorand-client.ts:199](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L199) +[src/types/algorand-client.ts:200](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L200) ## Methods @@ -351,7 +351,7 @@ Start a new `TransactionComposer` transaction group #### Defined in -[src/types/algorand-client.ts:185](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L185) +[src/types/algorand-client.ts:186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L186) ___ @@ -546,13 +546,13 @@ ___ ### unregisterErrorTransformer -▸ **unregisterErrorTransformer**(`id`): `void` +▸ **unregisterErrorTransformer**(`cb`): `void` #### Parameters | Name | Type | | :------ | :------ | -| `id` | `number` | +| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\> | #### Returns @@ -560,7 +560,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) +[src/types/algorand-client.ts:181](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L181) ___ @@ -578,7 +578,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:216](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L216) +[src/types/algorand-client.ts:217](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L217) ___ @@ -602,7 +602,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:253](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L253) +[src/types/algorand-client.ts:254](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L254) ___ @@ -626,7 +626,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:283](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L283) +[src/types/algorand-client.ts:284](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L284) ___ @@ -657,7 +657,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:274](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L274) +[src/types/algorand-client.ts:275](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L275) ___ @@ -675,7 +675,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:240](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L240) +[src/types/algorand-client.ts:241](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L241) ___ @@ -693,4 +693,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:228](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L228) +[src/types/algorand-client.ts:229](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L229) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 28148697..83c99ed8 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -41,7 +41,7 @@ export class AlgorandClient { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorTransformers: Map> = new Map() + errorTransformers: Set> = new Set() /** * Sets the default validity window for transactions. @@ -172,13 +172,14 @@ export class AlgorandClient { public registerErrorTransformer(cb: ErrorTransformer) { const id = this.errorTransformerId this.errorTransformerId++ - this.errorTransformers.set(id, cb) + this.errorTransformers.add(cb) return id } - public unregisterErrorTransformer(id: number) { - this.errorTransformers.delete(id) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + public unregisterErrorTransformer(cb: ErrorTransformer) { + this.errorTransformers.delete(cb) } /** Start a new `TransactionComposer` transaction group */ From 91903ea6eabd1d036f1aa0ea06b7f4f69946ee41 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:50:16 -0500 Subject: [PATCH 20/38] ErrorTransformer always returns unknown --- src/types/algorand-client.ts | 9 ++++----- src/types/composer.ts | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 83c99ed8..a35347c5 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -40,8 +40,7 @@ export class AlgorandClient { this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent) } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - errorTransformers: Set> = new Set() + errorTransformers: Set = new Set() /** * Sets the default validity window for transactions. @@ -169,7 +168,7 @@ export class AlgorandClient { * @returns The ID used when registering the error transformer which can be used to unregister * the error transformer with `unregisterErrorTransformer` */ - public registerErrorTransformer(cb: ErrorTransformer) { + public registerErrorTransformer(cb: ErrorTransformer) { const id = this.errorTransformerId this.errorTransformerId++ this.errorTransformers.add(cb) @@ -177,8 +176,8 @@ export class AlgorandClient { return id } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public unregisterErrorTransformer(cb: ErrorTransformer) { + + public unregisterErrorTransformer(cb: ErrorTransformer) { this.errorTransformers.delete(cb) } diff --git a/src/types/composer.ts b/src/types/composer.ts index f5f573ab..d753339e 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -497,7 +497,7 @@ export type TransactionComposerParams = { * An array of error callbacks to use when an error is caught in simulate or execute * callbacks can later be registered with `registerErrorTransformer` */ - errorTransformers?: ErrorTransformer[] + errorTransformers?: ErrorTransformer[] } /** Set of transactions built by `TransactionComposer`. */ @@ -510,7 +510,7 @@ export interface BuiltTransactions { signers: Map } -export type ErrorTransformer = (error: unknown) => Promise +export type ErrorTransformer = (error: unknown) => Promise /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { @@ -543,8 +543,7 @@ export class TransactionComposer { private appManager: AppManager - // eslint-disable-next-line @typescript-eslint/no-explicit-any - private errorTransformers: ErrorTransformer[] + private errorTransformers: ErrorTransformer[] /** * Create a `TransactionComposer`. @@ -566,7 +565,7 @@ export class TransactionComposer { * * @returns The composer so you can chain method calls */ - registerErrorTransformer(cb: ErrorTransformer) { + registerErrorTransformer(cb: ErrorTransformer) { this.errorTransformers.push(cb) return this } @@ -1392,21 +1391,24 @@ export class TransactionComposer { const failedGroup = simulateResponse?.txnGroups[0] if (failedGroup?.failureMessage) { const errorMessage = `Transaction failed at transaction(s) ${failedGroup.failedAt?.join(', ') || 'unknown'} in the group. ${failedGroup.failureMessage}` - let error = new Error(errorMessage) + const error = new Error(errorMessage) if (Config.debug) { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } + let transformedError: unknown = error for (const cb of this.errorTransformers) { const callbackResult = await cb(error) if (callbackResult !== undefined) { - error = callbackResult + transformedError = callbackResult } } - Object.assign(error, { simulateResponse }) - throw error + if (transformedError instanceof Error) { + Object.assign(transformedError, { simulateResponse }) + } + throw transformedError } if (Config.debug && Config.traceAll) { From 695d659ac3d62eb6ed95dab05478038dde9e0c4c Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 17:59:33 -0500 Subject: [PATCH 21/38] cleanup, renaming, comments, etc --- .../types_algorand_client.AlgorandClient.md | 102 ++++++-------- .../types_composer.TransactionComposer.md | 124 +++++++++--------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 20 +-- src/types/algorand-client.ts | 29 ++-- src/types/composer.ts | 17 ++- 6 files changed, 139 insertions(+), 159 deletions(-) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index adbbb12c..8c16eaa7 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -23,10 +23,9 @@ A client that brokers easy access to Algorand functionality. - [\_cachedSuggestedParamsTimeout](types_algorand_client.AlgorandClient.md#_cachedsuggestedparamstimeout) - [\_clientManager](types_algorand_client.AlgorandClient.md#_clientmanager) - [\_defaultValidityWindow](types_algorand_client.AlgorandClient.md#_defaultvaliditywindow) +- [\_errorTransformers](types_algorand_client.AlgorandClient.md#_errortransformers) - [\_transactionCreator](types_algorand_client.AlgorandClient.md#_transactioncreator) - [\_transactionSender](types_algorand_client.AlgorandClient.md#_transactionsender) -- [errorTransformerId](types_algorand_client.AlgorandClient.md#errortransformerid) -- [errorTransformers](types_algorand_client.AlgorandClient.md#errortransformers) ### Accessors @@ -75,7 +74,7 @@ A client that brokers easy access to Algorand functionality. #### Defined in -[src/types/algorand-client.ts:33](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L33) +[src/types/algorand-client.ts:40](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L40) ## Properties @@ -169,45 +168,37 @@ ___ ___ -### \_transactionCreator +### \_errorTransformers -• `Private` **\_transactionCreator**: [`AlgorandClientTransactionCreator`](types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) +• `Private` **\_errorTransformers**: `Set`\<[`ErrorTransformer`](../modules/types_composer.md#errortransformer)\> -#### Defined in - -[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25) - -___ - -### \_transactionSender - -• `Private` **\_transactionSender**: [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) +A set of error transformers to use when an error is caught in simulate or execute +`registerErrorTransformer` and `unregisterErrorTransformer` can be used to add and remove +error transformers from the set. #### Defined in -[src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24) +[src/types/algorand-client.ts:38](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L38) ___ -### errorTransformerId - -• `Private` **errorTransformerId**: `number` = `0` +### \_transactionCreator -The ID used when registering an error transformer +• `Private` **\_transactionCreator**: [`AlgorandClientTransactionCreator`](types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) #### Defined in -[src/types/algorand-client.ts:163](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L163) +[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25) ___ -### errorTransformers +### \_transactionSender -• **errorTransformers**: `Set`\<[`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>\> +• `Private` **\_transactionSender**: [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) #### Defined in -[src/types/algorand-client.ts:44](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L44) +[src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24) ## Accessors @@ -223,7 +214,7 @@ Get or create accounts that can sign transactions. #### Defined in -[src/types/algorand-client.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L143) +[src/types/algorand-client.ts:148](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L148) ___ @@ -239,7 +230,7 @@ Methods for interacting with apps. #### Defined in -[src/types/algorand-client.ts:153](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L153) +[src/types/algorand-client.ts:158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L158) ___ @@ -255,7 +246,7 @@ Methods for deploying apps and managing app deployment metadata. #### Defined in -[src/types/algorand-client.ts:158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L158) +[src/types/algorand-client.ts:163](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L163) ___ @@ -271,7 +262,7 @@ Methods for interacting with assets. #### Defined in -[src/types/algorand-client.ts:148](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L148) +[src/types/algorand-client.ts:153](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L153) ___ @@ -287,7 +278,7 @@ Get clients, including algosdk clients and app clients. #### Defined in -[src/types/algorand-client.ts:138](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L138) +[src/types/algorand-client.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L143) ___ @@ -303,7 +294,7 @@ Methods for creating a transaction. #### Defined in -[src/types/algorand-client.ts:207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L207) +[src/types/algorand-client.ts:201](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L201) ___ @@ -319,7 +310,7 @@ Methods for sending a transaction. #### Defined in -[src/types/algorand-client.ts:200](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L200) +[src/types/algorand-client.ts:194](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L194) ## Methods @@ -335,7 +326,7 @@ Get suggested params for a transaction (either cached or from algod if the cache #### Defined in -[src/types/algorand-client.ts:122](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L122) +[src/types/algorand-client.ts:127](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L127) ___ @@ -351,39 +342,30 @@ Start a new `TransactionComposer` transaction group #### Defined in -[src/types/algorand-client.ts:186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L186) +[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) ___ ### registerErrorTransformer -▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): `number` +▸ **registerErrorTransformer**(`transformer`): `void` Register a function that will be used to transform an error caught when simulating or executing composed transaction groups made from `newGroup` -#### Type parameters - -| Name | -| :------ | -| `ErrorType` | - #### Parameters | Name | Type | | :------ | :------ | -| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`ErrorType`\> | +| `transformer` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer) | #### Returns -`number` - -The ID used when registering the error transformer which can be used to unregister -the error transformer with `unregisterErrorTransformer` +`void` #### Defined in -[src/types/algorand-client.ts:172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L172) +[src/types/algorand-client.ts:171](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L171) ___ @@ -407,7 +389,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:61](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L61) +[src/types/algorand-client.ts:66](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L66) ___ @@ -431,7 +413,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:51](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L51) +[src/types/algorand-client.ts:56](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L56) ___ @@ -456,7 +438,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:94](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L94) +[src/types/algorand-client.ts:99](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L99) ___ @@ -491,7 +473,7 @@ const accountManager = AlgorandClient.mainnet() #### Defined in -[src/types/algorand-client.ts:81](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L81) +[src/types/algorand-client.ts:86](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L86) ___ @@ -516,7 +498,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:105](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L105) +[src/types/algorand-client.ts:110](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L110) ___ @@ -540,19 +522,19 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:116](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L116) +[src/types/algorand-client.ts:121](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L121) ___ ### unregisterErrorTransformer -▸ **unregisterErrorTransformer**(`cb`): `void` +▸ **unregisterErrorTransformer**(`transformer`): `void` #### Parameters | Name | Type | | :------ | :------ | -| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\> | +| `transformer` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer) | #### Returns @@ -560,7 +542,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:181](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L181) +[src/types/algorand-client.ts:175](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L175) ___ @@ -578,7 +560,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:217](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L217) +[src/types/algorand-client.ts:211](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L211) ___ @@ -602,7 +584,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:254](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L254) +[src/types/algorand-client.ts:248](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L248) ___ @@ -626,7 +608,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:284](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L284) +[src/types/algorand-client.ts:278](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L278) ___ @@ -657,7 +639,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:275](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L275) +[src/types/algorand-client.ts:269](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L269) ___ @@ -675,7 +657,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:241](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L241) +[src/types/algorand-client.ts:235](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L235) ___ @@ -693,4 +675,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:229](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L229) +[src/types/algorand-client.ts:223](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L223) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 252e8e8b..37dadf12 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -91,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) +[src/types/composer.ts:561](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L561) ## Properties @@ -103,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) +[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) +[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) ___ @@ -125,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:521](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L521) +[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) ___ @@ -137,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) +[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) ___ @@ -149,17 +149,17 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) +[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) ___ ### errorTransformers -• `Private` **errorTransformers**: [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`any`\>[] +• `Private` **errorTransformers**: [`ErrorTransformer`](../modules/types_composer.md#errortransformer)[] #### Defined in -[src/types/composer.ts:547](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L547) +[src/types/composer.ts:555](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L555) ___ @@ -185,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) +[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) ___ @@ -205,7 +205,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) +[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) ___ @@ -217,7 +217,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) +[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) ___ @@ -229,7 +229,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) +[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) ___ @@ -241,7 +241,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) +[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) ## Methods @@ -269,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:726](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L726) +[src/types/composer.ts:734](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L734) ___ @@ -295,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:775](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L775) +[src/types/composer.ts:783](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L783) ___ @@ -346,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:685](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L685) +[src/types/composer.ts:693](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L693) ___ @@ -372,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:739](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L739) +[src/types/composer.ts:747](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L747) ___ @@ -398,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:711](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L711) +[src/types/composer.ts:719](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L719) ___ @@ -424,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:763](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L763) +[src/types/composer.ts:771](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L771) ___ @@ -470,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:698](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L698) +[src/types/composer.ts:706](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L706) ___ @@ -496,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:751](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L751) +[src/types/composer.ts:759](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L759) ___ @@ -520,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L617) +[src/types/composer.ts:625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L625) ___ @@ -544,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:606](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L606) +[src/types/composer.ts:614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L614) ___ @@ -568,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L639) +[src/types/composer.ts:647](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L647) ___ @@ -592,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L628) +[src/types/composer.ts:636](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L636) ___ @@ -616,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L661) +[src/types/composer.ts:669](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L669) ___ @@ -640,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L672) +[src/types/composer.ts:680](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L680) ___ @@ -664,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:650](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L650) +[src/types/composer.ts:658](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L658) ___ @@ -688,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:807](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L807) +[src/types/composer.ts:815](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L815) ___ @@ -712,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:796](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L796) +[src/types/composer.ts:804](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L804) ___ @@ -736,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:785](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L785) +[src/types/composer.ts:793](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L793) ___ @@ -760,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:595](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L595) +[src/types/composer.ts:603](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L603) ___ @@ -785,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) +[src/types/composer.ts:588](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L588) ___ @@ -808,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1262](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1262) +[src/types/composer.ts:1270](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1270) ___ @@ -829,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1085](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1085) +[src/types/composer.ts:1093](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1093) ___ @@ -850,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1042](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1042) +[src/types/composer.ts:1050](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1050) ___ @@ -871,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1024](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1024) +[src/types/composer.ts:1032](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1032) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1055](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1055) +[src/types/composer.ts:1063](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1063) ___ @@ -913,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1063](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1063) +[src/types/composer.ts:1071](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1071) ___ @@ -934,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1073](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1073) +[src/types/composer.ts:1081](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1081) ___ @@ -956,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:813](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L813) +[src/types/composer.ts:821](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L821) ___ @@ -977,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1136) +[src/types/composer.ts:1144](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1144) ___ @@ -1001,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:883](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L883) +[src/types/composer.ts:891](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L891) ___ @@ -1022,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:1014](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1014) +[src/types/composer.ts:1022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1022) ___ @@ -1040,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1209](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1209) +[src/types/composer.ts:1217](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1217) ___ @@ -1063,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1159](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1159) +[src/types/composer.ts:1167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1167) ___ @@ -1084,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1186) +[src/types/composer.ts:1194](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1194) ___ @@ -1112,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:829](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L829) +[src/types/composer.ts:837](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L837) ___ @@ -1128,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1249](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1249) +[src/types/composer.ts:1257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1257) ___ @@ -1158,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1339](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1339) +[src/types/composer.ts:1347](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1347) ___ @@ -1177,27 +1177,21 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1291](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1291) +[src/types/composer.ts:1299](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1299) ___ ### registerErrorTransformer -▸ **registerErrorTransformer**\<`ErrorType`\>(`cb`): [`TransactionComposer`](types_composer.TransactionComposer.md) +▸ **registerErrorTransformer**(`transformer`): [`TransactionComposer`](types_composer.TransactionComposer.md) Register a function that will be used to transform an error caught when simulating or executing -#### Type parameters - -| Name | -| :------ | -| `ErrorType` | - #### Parameters | Name | Type | | :------ | :------ | -| `cb` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer)\<`ErrorType`\> | +| `transformer` | [`ErrorTransformer`](../modules/types_composer.md#errortransformer) | #### Returns @@ -1207,7 +1201,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:569](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L569) +[src/types/composer.ts:577](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L577) ___ @@ -1231,7 +1225,7 @@ The execution result #### Defined in -[src/types/composer.ts:1301](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1301) +[src/types/composer.ts:1309](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1309) ___ @@ -1249,7 +1243,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1347](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1347) +[src/types/composer.ts:1355](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1355) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1271,7 +1265,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1348](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1348) +[src/types/composer.ts:1356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1356) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1294,7 +1288,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1351](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1351) +[src/types/composer.ts:1359](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1359) ___ @@ -1320,4 +1314,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1434](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1434) +[src/types/composer.ts:1445](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1445) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 900722d0..d0db5f4d 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:508](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L508) +[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:510](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L510) +[src/types/composer.ts:520](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L520) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:506](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L506) +[src/types/composer.ts:516](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L516) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 8a2583ca..a538185d 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -322,17 +322,17 @@ ___ ### ErrorTransformer -Ƭ **ErrorTransformer**\<`ErrorType`\>: (`error`: `unknown`) => `Promise`\<`ErrorType` \| `undefined`\> +Ƭ **ErrorTransformer**: (`error`: `unknown`) => `Promise`\<`unknown`\> -#### Type parameters +A function that transform an error into a new error. -| Name | -| :------ | -| `ErrorType` | +ErrorTransformers should be pessimistic about the input, hence the unknown type. +In most cases, an ErrorTransformer should first check if it can or should transform the error +and return the input error if it cannot or should not transform it. #### Type declaration -▸ (`error`): `Promise`\<`ErrorType` \| `undefined`\> +▸ (`error`): `Promise`\<`unknown`\> ##### Parameters @@ -342,11 +342,11 @@ ___ ##### Returns -`Promise`\<`ErrorType` \| `undefined`\> +`Promise`\<`unknown`\> #### Defined in -[src/types/composer.ts:513](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L513) +[src/types/composer.ts:487](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L487) ___ @@ -436,13 +436,13 @@ Parameters to create an `TransactionComposer`. | `algod` | `algosdk.Algodv2` | The algod client to use to get suggestedParams and send the transaction group | | `appManager?` | [`AppManager`](../classes/types_app_manager.AppManager.md) | An existing `AppManager` to use to manage app compilation and cache compilation results. If not specified than an ephemeral one will be created. | | `defaultValidityWindow?` | `bigint` | How many rounds a transaction should be valid for by default; if not specified then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet). | -| `errorTransformers?` | [`ErrorTransformer`](types_composer.md#errortransformer)\<`unknown`\>[] | An array of error callbacks to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorTransformer` | +| `errorTransformers?` | [`ErrorTransformer`](types_composer.md#errortransformer)[] | An array of error transformers to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorTransformer` | | `getSigner` | (`address`: `string` \| `Address`) => `algosdk.TransactionSigner` | - | | `getSuggestedParams?` | () => `Promise`\<`algosdk.SuggestedParams`\> | - | #### Defined in -[src/types/composer.ts:480](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L480) +[src/types/composer.ts:490](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L490) ___ diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index a35347c5..85597c04 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -30,6 +30,13 @@ export class AlgorandClient { private _defaultValidityWindow: bigint | undefined = undefined + /** + * A set of error transformers to use when an error is caught in simulate or execute + * `registerErrorTransformer` and `unregisterErrorTransformer` can be used to add and remove + * error transformers from the set. + */ + private _errorTransformers: Set = new Set() + private constructor(config: AlgoConfig | AlgoSdkClients) { this._clientManager = new ClientManager(config, this) this._accountManager = new AccountManager(this._clientManager) @@ -40,7 +47,6 @@ export class AlgorandClient { this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent) } - errorTransformers: Set = new Set() /** * Sets the default validity window for transactions. @@ -158,27 +164,16 @@ export class AlgorandClient { return this._appDeployer } - /** The ID used when registering an error transformer */ - private errorTransformerId = 0 - /** * Register a function that will be used to transform an error caught when simulating or executing * composed transaction groups made from `newGroup` - * - * @returns The ID used when registering the error transformer which can be used to unregister - * the error transformer with `unregisterErrorTransformer` */ - public registerErrorTransformer(cb: ErrorTransformer) { - const id = this.errorTransformerId - this.errorTransformerId++ - this.errorTransformers.add(cb) - - return id + public registerErrorTransformer(transformer: ErrorTransformer) { + this._errorTransformers.add(transformer) } - - public unregisterErrorTransformer(cb: ErrorTransformer) { - this.errorTransformers.delete(cb) + public unregisterErrorTransformer(transformer: ErrorTransformer) { + this._errorTransformers.delete(transformer) } /** Start a new `TransactionComposer` transaction group */ @@ -189,7 +184,7 @@ export class AlgorandClient { getSuggestedParams: () => this.getSuggestedParams(), defaultValidityWindow: this._defaultValidityWindow, appManager: this._appManager, - errorTransformers: [...this.errorTransformers.values()], + errorTransformers: [...this._errorTransformers.values()], }) } diff --git a/src/types/composer.ts b/src/types/composer.ts index d753339e..3511beeb 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -476,6 +476,16 @@ export type Txn = | { atc: algosdk.AtomicTransactionComposer; type: 'atc' } | ((AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall) & { type: 'methodCall' }) + +/** + * A function that transform an error into a new error. + * + * ErrorTransformers should be pessimistic about the input, hence the unknown type. + * In most cases, an ErrorTransformer should first check if it can or should transform the error + * and return the input error if it cannot or should not transform it. + */ +export type ErrorTransformer = (error: unknown) => Promise + /** Parameters to create an `TransactionComposer`. */ export type TransactionComposerParams = { /** The algod client to use to get suggestedParams and send the transaction group */ @@ -494,7 +504,7 @@ export type TransactionComposerParams = { */ appManager?: AppManager /** - * An array of error callbacks to use when an error is caught in simulate or execute + * An array of error transformers to use when an error is caught in simulate or execute * callbacks can later be registered with `registerErrorTransformer` */ errorTransformers?: ErrorTransformer[] @@ -510,7 +520,6 @@ export interface BuiltTransactions { signers: Map } -export type ErrorTransformer = (error: unknown) => Promise /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { @@ -565,8 +574,8 @@ export class TransactionComposer { * * @returns The composer so you can chain method calls */ - registerErrorTransformer(cb: ErrorTransformer) { - this.errorTransformers.push(cb) + registerErrorTransformer(transformer: ErrorTransformer) { + this.errorTransformers.push(transformer) return this } From c915e9ca9a098f81e14fd139eaaf2547c94a6e9b Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 19:09:54 -0500 Subject: [PATCH 22/38] don't use toString to check for app-specific error --- .../classes/types_app_client.AppClient.md | 4 +- .../types_app_client.ApplicationClient.md | 80 +++++++++---------- src/types/app-client.ts | 14 ++-- 3 files changed, 48 insertions(+), 50 deletions(-) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 626eea9d..26482133 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -803,7 +803,7 @@ ___ #### Defined in -[src/types/app-client.ts:1443](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1443) +[src/types/app-client.ts:1441](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1441) ___ @@ -1109,7 +1109,7 @@ ___ #### Defined in -[src/types/app-client.ts:1515](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1515) +[src/types/app-client.ts:1513](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1513) ___ diff --git a/docs/code/classes/types_app_client.ApplicationClient.md b/docs/code/classes/types_app_client.ApplicationClient.md index ba74e90b..8d0605b0 100644 --- a/docs/code/classes/types_app_client.ApplicationClient.md +++ b/docs/code/classes/types_app_client.ApplicationClient.md @@ -92,7 +92,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1642](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1642) +[src/types/app-client.ts:1640](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1640) ## Properties @@ -102,7 +102,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1625) +[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) +[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) +[src/types/app-client.ts:1625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1625) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[src/types/app-client.ts:1629](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1629) +[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[src/types/app-client.ts:1630](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1630) +[src/types/app-client.ts:1628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1628) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[src/types/app-client.ts:1626](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1626) +[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) +[src/types/app-client.ts:1614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1614) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) +[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) +[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) +[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) +[src/types/app-client.ts:1615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1615) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) +[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) +[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) ## Methods @@ -250,7 +250,7 @@ Issues a no_op (normal) call to the app. #### Defined in -[src/types/app-client.ts:1965](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1965) +[src/types/app-client.ts:1963](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1963) ___ @@ -279,7 +279,7 @@ Issues a call to the app with the given call type. #### Defined in -[src/types/app-client.ts:2047](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2047) +[src/types/app-client.ts:2045](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2045) ___ @@ -307,7 +307,7 @@ Issues a clear_state call to the app. #### Defined in -[src/types/app-client.ts:2024](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2024) +[src/types/app-client.ts:2022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2022) ___ @@ -335,7 +335,7 @@ Issues a close_out call to the app. #### Defined in -[src/types/app-client.ts:2013](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2013) +[src/types/app-client.ts:2011](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2011) ___ @@ -363,7 +363,7 @@ Compiles the approval and clear state programs and sets up the source map. #### Defined in -[src/types/app-client.ts:1681](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1681) +[src/types/app-client.ts:1679](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1679) ___ @@ -391,7 +391,7 @@ Creates a smart contract app, returns the details of the created app. #### Defined in -[src/types/app-client.ts:1860](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1860) +[src/types/app-client.ts:1858](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1858) ___ @@ -419,7 +419,7 @@ Issues a delete_application call to the app. #### Defined in -[src/types/app-client.ts:2035](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2035) +[src/types/app-client.ts:2033](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2033) ___ @@ -453,7 +453,7 @@ To understand the architecture decisions behind this functionality please see ht #### Defined in -[src/types/app-client.ts:1749](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1749) +[src/types/app-client.ts:1747](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1747) ___ @@ -471,7 +471,7 @@ The source maps #### Defined in -[src/types/app-client.ts:1714](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1714) +[src/types/app-client.ts:1712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1712) ___ @@ -498,7 +498,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:2369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2369) +[src/types/app-client.ts:2367](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2367) ___ @@ -522,7 +522,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:2086](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2086) +[src/types/app-client.ts:2084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2084) ___ @@ -546,7 +546,7 @@ The ABI method for the given method #### Defined in -[src/types/app-client.ts:2327](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2327) +[src/types/app-client.ts:2325](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2325) ___ @@ -574,7 +574,7 @@ Returns the ABI Method parameters for the given method name string for the app r #### Defined in -[src/types/app-client.ts:2305](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2305) +[src/types/app-client.ts:2303](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2303) ___ @@ -594,7 +594,7 @@ ___ #### Defined in -[src/types/app-client.ts:2385](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2385) +[src/types/app-client.ts:2383](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2383) ___ @@ -617,7 +617,7 @@ Gets the reference information for the current application instance. #### Defined in -[src/types/app-client.ts:2339](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2339) +[src/types/app-client.ts:2337](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2337) ___ @@ -635,7 +635,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:2142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2142) +[src/types/app-client.ts:2140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2140) ___ @@ -659,7 +659,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2157) +[src/types/app-client.ts:2155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2155) ___ @@ -684,7 +684,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2173) +[src/types/app-client.ts:2171](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2171) ___ @@ -709,7 +709,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:2189](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2189) +[src/types/app-client.ts:2187](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2187) ___ @@ -735,7 +735,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:2211](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2211) +[src/types/app-client.ts:2209](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2209) ___ @@ -764,7 +764,7 @@ Returns the arguments for an app call for the given ABI method or raw method spe #### Defined in -[src/types/app-client.ts:2235](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2235) +[src/types/app-client.ts:2233](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2233) ___ @@ -782,7 +782,7 @@ The global state #### Defined in -[src/types/app-client.ts:2114](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2114) +[src/types/app-client.ts:2112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2112) ___ @@ -806,7 +806,7 @@ The global state #### Defined in -[src/types/app-client.ts:2128](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2128) +[src/types/app-client.ts:2126](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2126) ___ @@ -828,7 +828,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:1731](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1731) +[src/types/app-client.ts:1729](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1729) ___ @@ -856,7 +856,7 @@ Issues a opt_in call to the app. #### Defined in -[src/types/app-client.ts:2002](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2002) +[src/types/app-client.ts:2000](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2000) ___ @@ -884,4 +884,4 @@ Updates the smart contract app. #### Defined in -[src/types/app-client.ts:1924](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1924) +[src/types/app-client.ts:1922](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1922) diff --git a/src/types/app-client.ts b/src/types/app-client.ts index 8c2ab731..42c67ee4 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -1417,17 +1417,15 @@ export class AppClient { /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */ private handleCallErrors = async (e: unknown) => { + // The later calls are only useful with Error objects and there's no safe way to serialize an unknown object, + // so we will simply return the error as is if it's not an Error object. + if (!(e instanceof Error)) return e + // Only handle errors for this app. - // Because the error type is unknown, we turn it into a string to parse app ID const appIdString = `app=${this._appId.toString()}` + if (!e.message.includes(appIdString)) return e - if (e instanceof Error && !e.message.includes(appIdString)) { - return e - } else if (!`${e}`.includes(appIdString)) { - return e - } - - const logicError = await this.exposeLogicError(e as Error) + const logicError = await this.exposeLogicError(e) if (logicError instanceof LogicError) { let currentLine = logicError.teal_line - logicError.lines - 1 const stackWithLines = logicError.stack From f1fab2b35a4809e02c90ee5912a7783a8f9b7091 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 19:38:27 -0500 Subject: [PATCH 23/38] enforce TransformerError arg/return type as Error --- src/types/app-client.ts | 6 +----- src/types/composer.spec.ts | 25 +++++++++++++++---------- src/types/composer.ts | 22 +++++++++++----------- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/types/app-client.ts b/src/types/app-client.ts index 42c67ee4..7d25b3d0 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -1416,11 +1416,7 @@ export class AppClient { } /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */ - private handleCallErrors = async (e: unknown) => { - // The later calls are only useful with Error objects and there's no safe way to serialize an unknown object, - // so we will simply return the error as is if it's not an Error object. - if (!(e instanceof Error)) return e - + private handleCallErrors = async (e: Error) => { // Only handle errors for this app. const appIdString = `app=${this._appId.toString()}` if (!e.message.includes(appIdString)) return e diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index 7134662d..6e1ade96 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -9,20 +9,20 @@ describe('TransactionComposer', () => { }) describe('error transformers', () => { - const errorTransformer = async (e: unknown) => { - let errorString: string - if (e instanceof Error) { - errorString = e.message - } else { - errorString = JSON.stringify(e) + const errorTransformers = [async (e: Error) => { + if (e.message.includes('missing from')) { + return new Error('ASSET MISSING???') } - if (errorString.includes('missing from')) { + return e + }, + async (e: Error) => { + if (e.message == 'ASSET MISSING???') { return new Error('ASSET MISSING!') } return e - } + }] test('throws correct error from simulate', async () => { const algorand = fixture.context.algorand @@ -36,7 +36,9 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorTransformer(errorTransformer) + errorTransformers.forEach((errorTransformer) => { + composer.registerErrorTransformer(errorTransformer) + }) await expect(composer.simulate()).rejects.toThrow('ASSET MISSING!') }) @@ -53,7 +55,10 @@ describe('TransactionComposer', () => { receiver: sender, }) - composer.registerErrorTransformer(errorTransformer) + + errorTransformers.forEach((errorTransformer) => { + composer.registerErrorTransformer(errorTransformer) + }) await expect(composer.send()).rejects.toThrow('ASSET MISSING!') }) diff --git a/src/types/composer.ts b/src/types/composer.ts index 3511beeb..b59abe78 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -484,7 +484,7 @@ export type Txn = * In most cases, an ErrorTransformer should first check if it can or should transform the error * and return the input error if it cannot or should not transform it. */ -export type ErrorTransformer = (error: unknown) => Promise +export type ErrorTransformer = (error: Error) => Promise /** Parameters to create an `TransactionComposer`. */ export type TransactionComposerParams = { @@ -1329,8 +1329,12 @@ export class TransactionComposer { } catch (e: unknown) { let error = e for (const cb of this.errorTransformers) { - error = await cb(e) + if (!(error instanceof Error)) { + break + } + error = await cb(error) } + throw error } } @@ -1400,24 +1404,20 @@ export class TransactionComposer { const failedGroup = simulateResponse?.txnGroups[0] if (failedGroup?.failureMessage) { const errorMessage = `Transaction failed at transaction(s) ${failedGroup.failedAt?.join(', ') || 'unknown'} in the group. ${failedGroup.failureMessage}` - const error = new Error(errorMessage) + let error = new Error(errorMessage) if (Config.debug) { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - let transformedError: unknown = error for (const cb of this.errorTransformers) { - const callbackResult = await cb(error) - if (callbackResult !== undefined) { - transformedError = callbackResult + if (!(error instanceof Error)) { + break } + error = await cb(error) } - if (transformedError instanceof Error) { - Object.assign(transformedError, { simulateResponse }) - } - throw transformedError + throw error } if (Config.debug && Config.traceAll) { From 3497fc6daea26e1f2ace8ddd243136c6b3dee9bd Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 7 Jan 2025 19:43:23 -0500 Subject: [PATCH 24/38] pre-commit --- .../types_algorand_client.AlgorandClient.md | 46 +++---- .../classes/types_app_client.AppClient.md | 10 +- .../types_app_client.ApplicationClient.md | 80 ++++++------- .../types_composer.TransactionComposer.md | 112 +++++++++--------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 12 +- src/types/algorand-client.ts | 1 - src/types/composer.spec.ts | 27 +++-- src/types/composer.ts | 2 - 9 files changed, 147 insertions(+), 149 deletions(-) diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 8c16eaa7..f950e599 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -214,7 +214,7 @@ Get or create accounts that can sign transactions. #### Defined in -[src/types/algorand-client.ts:148](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L148) +[src/types/algorand-client.ts:147](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L147) ___ @@ -230,7 +230,7 @@ Methods for interacting with apps. #### Defined in -[src/types/algorand-client.ts:158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L158) +[src/types/algorand-client.ts:157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L157) ___ @@ -246,7 +246,7 @@ Methods for deploying apps and managing app deployment metadata. #### Defined in -[src/types/algorand-client.ts:163](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L163) +[src/types/algorand-client.ts:162](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L162) ___ @@ -262,7 +262,7 @@ Methods for interacting with assets. #### Defined in -[src/types/algorand-client.ts:153](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L153) +[src/types/algorand-client.ts:152](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L152) ___ @@ -278,7 +278,7 @@ Get clients, including algosdk clients and app clients. #### Defined in -[src/types/algorand-client.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L143) +[src/types/algorand-client.ts:142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L142) ___ @@ -294,7 +294,7 @@ Methods for creating a transaction. #### Defined in -[src/types/algorand-client.ts:201](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L201) +[src/types/algorand-client.ts:200](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L200) ___ @@ -310,7 +310,7 @@ Methods for sending a transaction. #### Defined in -[src/types/algorand-client.ts:194](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L194) +[src/types/algorand-client.ts:193](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L193) ## Methods @@ -326,7 +326,7 @@ Get suggested params for a transaction (either cached or from algod if the cache #### Defined in -[src/types/algorand-client.ts:127](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L127) +[src/types/algorand-client.ts:126](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L126) ___ @@ -342,7 +342,7 @@ Start a new `TransactionComposer` transaction group #### Defined in -[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180) +[src/types/algorand-client.ts:179](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L179) ___ @@ -365,7 +365,7 @@ composed transaction groups made from `newGroup` #### Defined in -[src/types/algorand-client.ts:171](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L171) +[src/types/algorand-client.ts:170](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L170) ___ @@ -389,7 +389,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:66](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L66) +[src/types/algorand-client.ts:65](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L65) ___ @@ -413,7 +413,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:56](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L56) +[src/types/algorand-client.ts:55](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L55) ___ @@ -438,7 +438,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:99](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L99) +[src/types/algorand-client.ts:98](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L98) ___ @@ -473,7 +473,7 @@ const accountManager = AlgorandClient.mainnet() #### Defined in -[src/types/algorand-client.ts:86](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L86) +[src/types/algorand-client.ts:85](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L85) ___ @@ -498,7 +498,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:110](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L110) +[src/types/algorand-client.ts:109](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L109) ___ @@ -522,7 +522,7 @@ The `AlgorandClient` so method calls can be chained #### Defined in -[src/types/algorand-client.ts:121](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L121) +[src/types/algorand-client.ts:120](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L120) ___ @@ -542,7 +542,7 @@ ___ #### Defined in -[src/types/algorand-client.ts:175](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L175) +[src/types/algorand-client.ts:174](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L174) ___ @@ -560,7 +560,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:211](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L211) +[src/types/algorand-client.ts:210](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L210) ___ @@ -584,7 +584,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:248](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L248) +[src/types/algorand-client.ts:247](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L247) ___ @@ -608,7 +608,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:278](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L278) +[src/types/algorand-client.ts:277](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L277) ___ @@ -639,7 +639,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:269](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L269) +[src/types/algorand-client.ts:268](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L268) ___ @@ -657,7 +657,7 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:235](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L235) +[src/types/algorand-client.ts:234](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L234) ___ @@ -675,4 +675,4 @@ The `AlgorandClient` #### Defined in -[src/types/algorand-client.ts:223](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L223) +[src/types/algorand-client.ts:222](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L222) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 26482133..429615c0 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -803,7 +803,7 @@ ___ #### Defined in -[src/types/app-client.ts:1441](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1441) +[src/types/app-client.ts:1437](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1437) ___ @@ -1109,13 +1109,13 @@ ___ #### Defined in -[src/types/app-client.ts:1513](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1513) +[src/types/app-client.ts:1509](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1509) ___ ### handleCallErrors -▸ **handleCallErrors**(`e`): `Promise`\<`unknown`\> +▸ **handleCallErrors**(`e`): `Promise`\<`Error`\> Make the given call and catch any errors, augmenting with debugging information before re-throwing. @@ -1123,11 +1123,11 @@ Make the given call and catch any errors, augmenting with debugging information | Name | Type | | :------ | :------ | -| `e` | `unknown` | +| `e` | `Error` | #### Returns -`Promise`\<`unknown`\> +`Promise`\<`Error`\> #### Defined in diff --git a/docs/code/classes/types_app_client.ApplicationClient.md b/docs/code/classes/types_app_client.ApplicationClient.md index 8d0605b0..4717d6f1 100644 --- a/docs/code/classes/types_app_client.ApplicationClient.md +++ b/docs/code/classes/types_app_client.ApplicationClient.md @@ -92,7 +92,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1640](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1640) +[src/types/app-client.ts:1636](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1636) ## Properties @@ -102,7 +102,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) +[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/types/app-client.ts:1622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1622) +[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[src/types/app-client.ts:1625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1625) +[src/types/app-client.ts:1621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1621) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[src/types/app-client.ts:1627](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1627) +[src/types/app-client.ts:1623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1623) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[src/types/app-client.ts:1628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1628) +[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[src/types/app-client.ts:1624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1624) +[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[src/types/app-client.ts:1614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1614) +[src/types/app-client.ts:1610](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1610) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) +[src/types/app-client.ts:1612](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1612) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[src/types/app-client.ts:1620](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1620) +[src/types/app-client.ts:1616](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1616) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[src/types/app-client.ts:1619](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1619) +[src/types/app-client.ts:1615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1615) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[src/types/app-client.ts:1615](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1615) +[src/types/app-client.ts:1611](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1611) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/app-client.ts:1618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1618) +[src/types/app-client.ts:1614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1614) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[src/types/app-client.ts:1617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1617) +[src/types/app-client.ts:1613](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1613) ## Methods @@ -250,7 +250,7 @@ Issues a no_op (normal) call to the app. #### Defined in -[src/types/app-client.ts:1963](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1963) +[src/types/app-client.ts:1959](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1959) ___ @@ -279,7 +279,7 @@ Issues a call to the app with the given call type. #### Defined in -[src/types/app-client.ts:2045](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2045) +[src/types/app-client.ts:2041](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2041) ___ @@ -307,7 +307,7 @@ Issues a clear_state call to the app. #### Defined in -[src/types/app-client.ts:2022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2022) +[src/types/app-client.ts:2018](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2018) ___ @@ -335,7 +335,7 @@ Issues a close_out call to the app. #### Defined in -[src/types/app-client.ts:2011](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2011) +[src/types/app-client.ts:2007](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2007) ___ @@ -363,7 +363,7 @@ Compiles the approval and clear state programs and sets up the source map. #### Defined in -[src/types/app-client.ts:1679](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1679) +[src/types/app-client.ts:1675](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1675) ___ @@ -391,7 +391,7 @@ Creates a smart contract app, returns the details of the created app. #### Defined in -[src/types/app-client.ts:1858](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1858) +[src/types/app-client.ts:1854](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1854) ___ @@ -419,7 +419,7 @@ Issues a delete_application call to the app. #### Defined in -[src/types/app-client.ts:2033](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2033) +[src/types/app-client.ts:2029](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2029) ___ @@ -453,7 +453,7 @@ To understand the architecture decisions behind this functionality please see ht #### Defined in -[src/types/app-client.ts:1747](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1747) +[src/types/app-client.ts:1743](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1743) ___ @@ -471,7 +471,7 @@ The source maps #### Defined in -[src/types/app-client.ts:1712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1712) +[src/types/app-client.ts:1708](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1708) ___ @@ -498,7 +498,7 @@ The new error, or if there was no logic error or source map then the wrapped err #### Defined in -[src/types/app-client.ts:2367](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2367) +[src/types/app-client.ts:2363](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2363) ___ @@ -522,7 +522,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:2084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2084) +[src/types/app-client.ts:2080](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2080) ___ @@ -546,7 +546,7 @@ The ABI method for the given method #### Defined in -[src/types/app-client.ts:2325](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2325) +[src/types/app-client.ts:2321](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2321) ___ @@ -574,7 +574,7 @@ Returns the ABI Method parameters for the given method name string for the app r #### Defined in -[src/types/app-client.ts:2303](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2303) +[src/types/app-client.ts:2299](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2299) ___ @@ -594,7 +594,7 @@ ___ #### Defined in -[src/types/app-client.ts:2383](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2383) +[src/types/app-client.ts:2379](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2379) ___ @@ -617,7 +617,7 @@ Gets the reference information for the current application instance. #### Defined in -[src/types/app-client.ts:2337](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2337) +[src/types/app-client.ts:2333](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2333) ___ @@ -635,7 +635,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:2140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2140) +[src/types/app-client.ts:2136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2136) ___ @@ -659,7 +659,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2155) +[src/types/app-client.ts:2151](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2151) ___ @@ -684,7 +684,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:2171](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2171) +[src/types/app-client.ts:2167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2167) ___ @@ -709,7 +709,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:2187](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2187) +[src/types/app-client.ts:2183](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2183) ___ @@ -735,7 +735,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:2209](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2209) +[src/types/app-client.ts:2205](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2205) ___ @@ -764,7 +764,7 @@ Returns the arguments for an app call for the given ABI method or raw method spe #### Defined in -[src/types/app-client.ts:2233](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2233) +[src/types/app-client.ts:2229](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2229) ___ @@ -782,7 +782,7 @@ The global state #### Defined in -[src/types/app-client.ts:2112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2112) +[src/types/app-client.ts:2108](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2108) ___ @@ -806,7 +806,7 @@ The global state #### Defined in -[src/types/app-client.ts:2126](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2126) +[src/types/app-client.ts:2122](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2122) ___ @@ -828,7 +828,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:1729](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1729) +[src/types/app-client.ts:1725](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1725) ___ @@ -856,7 +856,7 @@ Issues a opt_in call to the app. #### Defined in -[src/types/app-client.ts:2000](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2000) +[src/types/app-client.ts:1996](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1996) ___ @@ -884,4 +884,4 @@ Updates the smart contract app. #### Defined in -[src/types/app-client.ts:1922](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1922) +[src/types/app-client.ts:1918](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1918) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 37dadf12..4133928d 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -91,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:561](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L561) +[src/types/composer.ts:559](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L559) ## Properties @@ -103,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) +[src/types/composer.ts:537](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L537) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) +[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) ___ @@ -125,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) +[src/types/composer.ts:528](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L528) ___ @@ -137,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) +[src/types/composer.ts:546](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L546) ___ @@ -149,7 +149,7 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) +[src/types/composer.ts:549](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L549) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[src/types/composer.ts:555](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L555) +[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) ___ @@ -185,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) +[src/types/composer.ts:543](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L543) ___ @@ -205,7 +205,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) +[src/types/composer.ts:540](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L540) ___ @@ -217,7 +217,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) +[src/types/composer.ts:531](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L531) ___ @@ -229,7 +229,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) +[src/types/composer.ts:534](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L534) ___ @@ -241,7 +241,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) +[src/types/composer.ts:525](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L525) ## Methods @@ -269,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:734](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L734) +[src/types/composer.ts:732](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L732) ___ @@ -295,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:783](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L783) +[src/types/composer.ts:781](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L781) ___ @@ -346,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:693](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L693) +[src/types/composer.ts:691](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L691) ___ @@ -372,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:747](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L747) +[src/types/composer.ts:745](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L745) ___ @@ -398,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:719](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L719) +[src/types/composer.ts:717](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L717) ___ @@ -424,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:771](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L771) +[src/types/composer.ts:769](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L769) ___ @@ -470,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:706](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L706) +[src/types/composer.ts:704](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L704) ___ @@ -496,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:759](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L759) +[src/types/composer.ts:757](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L757) ___ @@ -520,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:625](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L625) +[src/types/composer.ts:623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L623) ___ @@ -544,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:614](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L614) +[src/types/composer.ts:612](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L612) ___ @@ -568,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:647](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L647) +[src/types/composer.ts:645](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L645) ___ @@ -592,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:636](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L636) +[src/types/composer.ts:634](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L634) ___ @@ -616,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:669](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L669) +[src/types/composer.ts:667](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L667) ___ @@ -640,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:680](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L680) +[src/types/composer.ts:678](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L678) ___ @@ -664,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:658](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L658) +[src/types/composer.ts:656](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L656) ___ @@ -688,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:815](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L815) +[src/types/composer.ts:813](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L813) ___ @@ -712,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:804](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L804) +[src/types/composer.ts:802](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L802) ___ @@ -736,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:793](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L793) +[src/types/composer.ts:791](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L791) ___ @@ -760,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:603](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L603) +[src/types/composer.ts:601](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L601) ___ @@ -785,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:588](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L588) +[src/types/composer.ts:586](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L586) ___ @@ -808,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1270](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1270) +[src/types/composer.ts:1268](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1268) ___ @@ -829,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1093](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1093) +[src/types/composer.ts:1091](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1091) ___ @@ -850,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1050](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1050) +[src/types/composer.ts:1048](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1048) ___ @@ -871,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1032](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1032) +[src/types/composer.ts:1030](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1030) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1063](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1063) +[src/types/composer.ts:1061](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1061) ___ @@ -913,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1071](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1071) +[src/types/composer.ts:1069](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1069) ___ @@ -934,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1081](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1081) +[src/types/composer.ts:1079](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1079) ___ @@ -956,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:821](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L821) +[src/types/composer.ts:819](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L819) ___ @@ -977,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1144](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1144) +[src/types/composer.ts:1142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1142) ___ @@ -1001,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:891](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L891) +[src/types/composer.ts:889](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L889) ___ @@ -1022,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:1022](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1022) +[src/types/composer.ts:1020](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1020) ___ @@ -1040,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1217](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1217) +[src/types/composer.ts:1215](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1215) ___ @@ -1063,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1167) +[src/types/composer.ts:1165](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1165) ___ @@ -1084,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1194](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1194) +[src/types/composer.ts:1192](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1192) ___ @@ -1112,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:837](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L837) +[src/types/composer.ts:835](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L835) ___ @@ -1128,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1257) +[src/types/composer.ts:1255](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1255) ___ @@ -1158,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1347](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1347) +[src/types/composer.ts:1349](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1349) ___ @@ -1177,7 +1177,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1299](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1299) +[src/types/composer.ts:1297](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1297) ___ @@ -1201,7 +1201,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:577](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L577) +[src/types/composer.ts:575](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L575) ___ @@ -1225,7 +1225,7 @@ The execution result #### Defined in -[src/types/composer.ts:1309](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1309) +[src/types/composer.ts:1307](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1307) ___ @@ -1243,7 +1243,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1355](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1355) +[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1265,7 +1265,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1356) +[src/types/composer.ts:1358](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1358) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1288,7 +1288,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1359](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1359) +[src/types/composer.ts:1361](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1361) ___ @@ -1314,4 +1314,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1445](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1445) +[src/types/composer.ts:1443](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1443) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index d0db5f4d..79856104 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) +[src/types/composer.ts:517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L517) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:520](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L520) +[src/types/composer.ts:519](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L519) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:516](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L516) +[src/types/composer.ts:515](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L515) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index a538185d..bf11ec82 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -322,7 +322,7 @@ ___ ### ErrorTransformer -Ƭ **ErrorTransformer**: (`error`: `unknown`) => `Promise`\<`unknown`\> +Ƭ **ErrorTransformer**: (`error`: `Error`) => `Promise`\<`Error`\> A function that transform an error into a new error. @@ -332,21 +332,21 @@ and return the input error if it cannot or should not transform it. #### Type declaration -▸ (`error`): `Promise`\<`unknown`\> +▸ (`error`): `Promise`\<`Error`\> ##### Parameters | Name | Type | | :------ | :------ | -| `error` | `unknown` | +| `error` | `Error` | ##### Returns -`Promise`\<`unknown`\> +`Promise`\<`Error`\> #### Defined in -[src/types/composer.ts:487](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L487) +[src/types/composer.ts:486](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L486) ___ @@ -442,7 +442,7 @@ Parameters to create an `TransactionComposer`. #### Defined in -[src/types/composer.ts:490](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L490) +[src/types/composer.ts:489](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L489) ___ diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 85597c04..b3d202a5 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -47,7 +47,6 @@ export class AlgorandClient { this._appDeployer = new AppDeployer(this._appManager, this._transactionSender, this._clientManager.indexerIfPresent) } - /** * Sets the default validity window for transactions. * @param validityWindow The number of rounds between the first and last valid rounds diff --git a/src/types/composer.spec.ts b/src/types/composer.spec.ts index 6e1ade96..2f3d1ba4 100644 --- a/src/types/composer.spec.ts +++ b/src/types/composer.spec.ts @@ -9,20 +9,22 @@ describe('TransactionComposer', () => { }) describe('error transformers', () => { - const errorTransformers = [async (e: Error) => { - if (e.message.includes('missing from')) { - return new Error('ASSET MISSING???') - } + const errorTransformers = [ + async (e: Error) => { + if (e.message.includes('missing from')) { + return new Error('ASSET MISSING???') + } - return e - }, - async (e: Error) => { - if (e.message == 'ASSET MISSING???') { - return new Error('ASSET MISSING!') - } + return e + }, + async (e: Error) => { + if (e.message == 'ASSET MISSING???') { + return new Error('ASSET MISSING!') + } - return e - }] + return e + }, + ] test('throws correct error from simulate', async () => { const algorand = fixture.context.algorand @@ -55,7 +57,6 @@ describe('TransactionComposer', () => { receiver: sender, }) - errorTransformers.forEach((errorTransformer) => { composer.registerErrorTransformer(errorTransformer) }) diff --git a/src/types/composer.ts b/src/types/composer.ts index b59abe78..a337d134 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -476,7 +476,6 @@ export type Txn = | { atc: algosdk.AtomicTransactionComposer; type: 'atc' } | ((AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall) & { type: 'methodCall' }) - /** * A function that transform an error into a new error. * @@ -520,7 +519,6 @@ export interface BuiltTransactions { signers: Map } - /** TransactionComposer helps you compose and execute transactions as a transaction group. */ export class TransactionComposer { /** Signer used to represent a lack of signer */ From 9ae5932c4359aafd8bc5a4d117b567a2a1fab8d0 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 07:48:40 -0500 Subject: [PATCH 25/38] const cb -> const transformer --- src/types/composer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index a337d134..deb17a60 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -1326,11 +1326,11 @@ export class TransactionComposer { ) } catch (e: unknown) { let error = e - for (const cb of this.errorTransformers) { + for (const transformer of this.errorTransformers) { if (!(error instanceof Error)) { break } - error = await cb(error) + error = await transformer(error) } throw error @@ -1408,11 +1408,11 @@ export class TransactionComposer { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - for (const cb of this.errorTransformers) { + for (const transformer of this.errorTransformers) { if (!(error instanceof Error)) { break } - error = await cb(error) + error = await transformer(error) } throw error From eac0ebc474a9416e90763e29c64002475e3bbe36 Mon Sep 17 00:00:00 2001 From: Joe Polny <50534337+joe-p@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:55:54 -0500 Subject: [PATCH 26/38] remove note about uknown type Co-authored-by: Tristan Menzel --- src/types/composer.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index deb17a60..e31017e6 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -479,7 +479,6 @@ export type Txn = /** * A function that transform an error into a new error. * - * ErrorTransformers should be pessimistic about the input, hence the unknown type. * In most cases, an ErrorTransformer should first check if it can or should transform the error * and return the input error if it cannot or should not transform it. */ From d8aff7e0028235b5da0176548feddfb42b4f188b Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 16:58:29 -0500 Subject: [PATCH 27/38] remove unnecessary Set.values() --- src/types/algorand-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index b3d202a5..bc560a2d 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -183,7 +183,7 @@ export class AlgorandClient { getSuggestedParams: () => this.getSuggestedParams(), defaultValidityWindow: this._defaultValidityWindow, appManager: this._appManager, - errorTransformers: [...this._errorTransformers.values()], + errorTransformers: [...this._errorTransformers], }) } From e54d18ef50d8fe307f1c7e07bd71f9d67de51de8 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 17:02:42 -0500 Subject: [PATCH 28/38] typedoc --- .../types_composer.TransactionComposer.md | 112 +++++++++--------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 5 +- 3 files changed, 61 insertions(+), 62 deletions(-) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 4133928d..ca8b73a2 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -91,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:559](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L559) +[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) ## Properties @@ -103,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:537](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L537) +[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) +[src/types/composer.ts:550](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L550) ___ @@ -125,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:528](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L528) +[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) ___ @@ -137,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:546](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L546) +[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) ___ @@ -149,7 +149,7 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:549](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L549) +[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) +[src/types/composer.ts:552](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L552) ___ @@ -185,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:543](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L543) +[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) ___ @@ -205,7 +205,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:540](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L540) +[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) ___ @@ -217,7 +217,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:531](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L531) +[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) ___ @@ -229,7 +229,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:534](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L534) +[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) ___ @@ -241,7 +241,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:525](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L525) +[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) ## Methods @@ -269,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:732](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L732) +[src/types/composer.ts:731](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L731) ___ @@ -295,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:781](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L781) +[src/types/composer.ts:780](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L780) ___ @@ -346,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:691](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L691) +[src/types/composer.ts:690](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L690) ___ @@ -372,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:745](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L745) +[src/types/composer.ts:744](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L744) ___ @@ -398,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:717](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L717) +[src/types/composer.ts:716](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L716) ___ @@ -424,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:769](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L769) +[src/types/composer.ts:768](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L768) ___ @@ -470,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:704](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L704) +[src/types/composer.ts:703](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L703) ___ @@ -496,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:757](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L757) +[src/types/composer.ts:756](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L756) ___ @@ -520,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:623](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L623) +[src/types/composer.ts:622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L622) ___ @@ -544,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:612](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L612) +[src/types/composer.ts:611](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L611) ___ @@ -568,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:645](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L645) +[src/types/composer.ts:644](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L644) ___ @@ -592,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:634](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L634) +[src/types/composer.ts:633](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L633) ___ @@ -616,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:667](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L667) +[src/types/composer.ts:666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L666) ___ @@ -640,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:678](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L678) +[src/types/composer.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L677) ___ @@ -664,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:656](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L656) +[src/types/composer.ts:655](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L655) ___ @@ -688,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:813](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L813) +[src/types/composer.ts:812](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L812) ___ @@ -712,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:802](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L802) +[src/types/composer.ts:801](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L801) ___ @@ -736,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:791](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L791) +[src/types/composer.ts:790](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L790) ___ @@ -760,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:601](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L601) +[src/types/composer.ts:600](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L600) ___ @@ -785,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:586](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L586) +[src/types/composer.ts:585](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L585) ___ @@ -808,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1268](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1268) +[src/types/composer.ts:1267](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1267) ___ @@ -829,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1091](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1091) +[src/types/composer.ts:1090](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1090) ___ @@ -850,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1048](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1048) +[src/types/composer.ts:1047](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1047) ___ @@ -871,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1030](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1030) +[src/types/composer.ts:1029](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1029) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1061](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1061) +[src/types/composer.ts:1060](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1060) ___ @@ -913,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1069](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1069) +[src/types/composer.ts:1068](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1068) ___ @@ -934,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1079](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1079) +[src/types/composer.ts:1078](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1078) ___ @@ -956,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:819](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L819) +[src/types/composer.ts:818](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L818) ___ @@ -977,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1142) +[src/types/composer.ts:1141](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1141) ___ @@ -1001,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:889](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L889) +[src/types/composer.ts:888](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L888) ___ @@ -1022,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:1020](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1020) +[src/types/composer.ts:1019](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1019) ___ @@ -1040,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1215](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1215) +[src/types/composer.ts:1214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1214) ___ @@ -1063,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1165](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1165) +[src/types/composer.ts:1164](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1164) ___ @@ -1084,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1192](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1192) +[src/types/composer.ts:1191](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1191) ___ @@ -1112,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:835](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L835) +[src/types/composer.ts:834](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L834) ___ @@ -1128,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1255](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1255) +[src/types/composer.ts:1254](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1254) ___ @@ -1158,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1349](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1349) +[src/types/composer.ts:1348](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1348) ___ @@ -1177,7 +1177,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1297](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1297) +[src/types/composer.ts:1296](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1296) ___ @@ -1201,7 +1201,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:575](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L575) +[src/types/composer.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L574) ___ @@ -1225,7 +1225,7 @@ The execution result #### Defined in -[src/types/composer.ts:1307](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1307) +[src/types/composer.ts:1306](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1306) ___ @@ -1243,7 +1243,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) +[src/types/composer.ts:1356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1356) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1265,7 +1265,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1358](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1358) +[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1288,7 +1288,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1361](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1361) +[src/types/composer.ts:1360](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1360) ___ @@ -1314,4 +1314,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1443](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1443) +[src/types/composer.ts:1442](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1442) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 79856104..8b563213 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L517) +[src/types/composer.ts:516](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L516) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:519](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L519) +[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:515](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L515) +[src/types/composer.ts:514](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L514) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index bf11ec82..618b5777 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -326,7 +326,6 @@ ___ A function that transform an error into a new error. -ErrorTransformers should be pessimistic about the input, hence the unknown type. In most cases, an ErrorTransformer should first check if it can or should transform the error and return the input error if it cannot or should not transform it. @@ -346,7 +345,7 @@ and return the input error if it cannot or should not transform it. #### Defined in -[src/types/composer.ts:486](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L486) +[src/types/composer.ts:485](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L485) ___ @@ -442,7 +441,7 @@ Parameters to create an `TransactionComposer`. #### Defined in -[src/types/composer.ts:489](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L489) +[src/types/composer.ts:488](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L488) ___ From b75ff87aeacdd11cbde514cb65d7296e7850247a Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 18:03:40 -0500 Subject: [PATCH 29/38] add BadTransformer Error --- src/types/composer.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index e31017e6..101563c1 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -484,6 +484,12 @@ export type Txn = */ export type ErrorTransformer = (error: Error) => Promise +class BadTransformer extends Error { + constructor(originalError: unknown) { + super(`An error transformer returned a non-error value. The original error before any transformation: ${originalError}`) + } +} + /** Parameters to create an `TransactionComposer`. */ export type TransactionComposerParams = { /** The algod client to use to get suggestedParams and send the transaction group */ @@ -1324,10 +1330,13 @@ export class TransactionComposer { this.algod, ) } catch (e: unknown) { + // Transformers expect an Error, so don't transform the exception if it's not an Error + if (!(e instanceof Error)) throw e + let error = e for (const transformer of this.errorTransformers) { if (!(error instanceof Error)) { - break + throw new BadTransformer(e) } error = await transformer(error) } From 7aee94aa3169d6f3665e03ec4d1a0b198c63d2bb Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 18:04:13 -0500 Subject: [PATCH 30/38] e -> originalError --- src/types/composer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index 101563c1..42382c05 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -1329,14 +1329,14 @@ export class TransactionComposer { }, this.algod, ) - } catch (e: unknown) { + } catch (originalError: unknown) { // Transformers expect an Error, so don't transform the exception if it's not an Error - if (!(e instanceof Error)) throw e + if (!(originalError instanceof Error)) throw originalError - let error = e + let error = originalError for (const transformer of this.errorTransformers) { if (!(error instanceof Error)) { - throw new BadTransformer(e) + throw new BadTransformer(originalError) } error = await transformer(error) } From 838ecbfbdfd70224b8b0ce32c36e02358622b0e3 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Wed, 8 Jan 2025 18:05:01 -0500 Subject: [PATCH 31/38] typedoc --- .../types_composer.TransactionComposer.md | 112 +++++++++--------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index ca8b73a2..242e2c62 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -91,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) +[src/types/composer.ts:564](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L564) ## Properties @@ -103,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) +[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:550](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L550) +[src/types/composer.ts:556](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L556) ___ @@ -125,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L527) +[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) ___ @@ -137,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) +[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) ___ @@ -149,7 +149,7 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) +[src/types/composer.ts:554](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L554) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[src/types/composer.ts:552](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L552) +[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) ___ @@ -185,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) +[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) ___ @@ -205,7 +205,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) +[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) ___ @@ -217,7 +217,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) +[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) ___ @@ -229,7 +229,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) +[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) ___ @@ -241,7 +241,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) +[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) ## Methods @@ -269,7 +269,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:731](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L731) +[src/types/composer.ts:737](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L737) ___ @@ -295,7 +295,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:780](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L780) +[src/types/composer.ts:786](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L786) ___ @@ -346,7 +346,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:690](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L690) +[src/types/composer.ts:696](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L696) ___ @@ -372,7 +372,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:744](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L744) +[src/types/composer.ts:750](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L750) ___ @@ -398,7 +398,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:716](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L716) +[src/types/composer.ts:722](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L722) ___ @@ -424,7 +424,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:768](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L768) +[src/types/composer.ts:774](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L774) ___ @@ -470,7 +470,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:703](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L703) +[src/types/composer.ts:709](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L709) ___ @@ -496,7 +496,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:756](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L756) +[src/types/composer.ts:762](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L762) ___ @@ -520,7 +520,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L622) +[src/types/composer.ts:628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L628) ___ @@ -544,7 +544,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:611](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L611) +[src/types/composer.ts:617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L617) ___ @@ -568,7 +568,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:644](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L644) +[src/types/composer.ts:650](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L650) ___ @@ -592,7 +592,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:633](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L633) +[src/types/composer.ts:639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L639) ___ @@ -616,7 +616,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L666) +[src/types/composer.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L672) ___ @@ -640,7 +640,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L677) +[src/types/composer.ts:683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L683) ___ @@ -664,7 +664,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:655](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L655) +[src/types/composer.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L661) ___ @@ -688,7 +688,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:812](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L812) +[src/types/composer.ts:818](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L818) ___ @@ -712,7 +712,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:801](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L801) +[src/types/composer.ts:807](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L807) ___ @@ -736,7 +736,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:790](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L790) +[src/types/composer.ts:796](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L796) ___ @@ -760,7 +760,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:600](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L600) +[src/types/composer.ts:606](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L606) ___ @@ -785,7 +785,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:585](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L585) +[src/types/composer.ts:591](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L591) ___ @@ -808,7 +808,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1267](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1267) +[src/types/composer.ts:1273](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1273) ___ @@ -829,7 +829,7 @@ ___ #### Defined in -[src/types/composer.ts:1090](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1090) +[src/types/composer.ts:1096](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1096) ___ @@ -850,7 +850,7 @@ ___ #### Defined in -[src/types/composer.ts:1047](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1047) +[src/types/composer.ts:1053](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1053) ___ @@ -871,7 +871,7 @@ ___ #### Defined in -[src/types/composer.ts:1029](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1029) +[src/types/composer.ts:1035](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1035) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[src/types/composer.ts:1060](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1060) +[src/types/composer.ts:1066](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1066) ___ @@ -913,7 +913,7 @@ ___ #### Defined in -[src/types/composer.ts:1068](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1068) +[src/types/composer.ts:1074](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1074) ___ @@ -934,7 +934,7 @@ ___ #### Defined in -[src/types/composer.ts:1078](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1078) +[src/types/composer.ts:1084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1084) ___ @@ -956,7 +956,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:818](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L818) +[src/types/composer.ts:824](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L824) ___ @@ -977,7 +977,7 @@ ___ #### Defined in -[src/types/composer.ts:1141](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1141) +[src/types/composer.ts:1147](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1147) ___ @@ -1001,7 +1001,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:888](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L888) +[src/types/composer.ts:894](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L894) ___ @@ -1022,7 +1022,7 @@ ___ #### Defined in -[src/types/composer.ts:1019](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1019) +[src/types/composer.ts:1025](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1025) ___ @@ -1040,7 +1040,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1214) +[src/types/composer.ts:1220](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1220) ___ @@ -1063,7 +1063,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1164](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1164) +[src/types/composer.ts:1170](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1170) ___ @@ -1084,7 +1084,7 @@ ___ #### Defined in -[src/types/composer.ts:1191](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1191) +[src/types/composer.ts:1197](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1197) ___ @@ -1112,7 +1112,7 @@ ___ #### Defined in -[src/types/composer.ts:834](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L834) +[src/types/composer.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L840) ___ @@ -1128,7 +1128,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1254](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1254) +[src/types/composer.ts:1260](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1260) ___ @@ -1158,7 +1158,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1348](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1348) +[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) ___ @@ -1177,7 +1177,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1296](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1296) +[src/types/composer.ts:1302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1302) ___ @@ -1201,7 +1201,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L574) +[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) ___ @@ -1225,7 +1225,7 @@ The execution result #### Defined in -[src/types/composer.ts:1306](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1306) +[src/types/composer.ts:1312](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1312) ___ @@ -1243,7 +1243,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1356) +[src/types/composer.ts:1365](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1365) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1265,7 +1265,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) +[src/types/composer.ts:1366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1366) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1288,7 +1288,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1360](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1360) +[src/types/composer.ts:1369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1369) ___ @@ -1314,4 +1314,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1442](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1442) +[src/types/composer.ts:1451](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1451) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 8b563213..489a7ba1 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:516](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L516) +[src/types/composer.ts:522](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L522) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:518](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L518) +[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:514](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L514) +[src/types/composer.ts:520](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L520) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 618b5777..12d70b0e 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -441,7 +441,7 @@ Parameters to create an `TransactionComposer`. #### Defined in -[src/types/composer.ts:488](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L488) +[src/types/composer.ts:494](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L494) ___ From 0ffca863bf360fd803c9ebaf9a4c15c029d0c4e3 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 24 Jan 2025 09:51:05 -0500 Subject: [PATCH 32/38] merge main --- docs/capabilities/algorand-client.md | 6 +- docs/capabilities/testing.md | 59 +- docs/capabilities/transaction-composer.md | 137 +++- docs/capabilities/transaction.md | 2 +- docs/code/README.md | 1 + ...reator.AlgorandClientTransactionCreator.md | 4 +- .../classes/types_app_client.AppClient.md | 37 +- .../classes/types_app_deployer.AppDeployer.md | 1 + .../classes/types_app_factory.AppFactory.md | 7 +- .../types_client_manager.ClientManager.md | 4 +- .../types_composer.TransactionComposer.md | 177 ++--- .../types_app_client.AppClientParams.md | 2 +- .../types_app_factory.AppFactoryParams.md | 2 +- .../types_client_manager.TypedAppClient.md | 2 +- .../types_composer.BuiltTransactions.md | 6 +- .../types_testing.AlgoKitLogCaptureFixture.md | 6 +- .../types_testing.AlgorandFixture.md | 72 +- .../types_testing.LogSnapshotConfig.md | 33 +- ...itionalAtomicTransactionComposerContext.md | 36 + ...saction.AtomicTransactionComposerToSend.md | 35 +- .../types_transaction.SendParams.md | 13 + docs/code/modules/index.md | 71 +- docs/code/modules/testing.md | 40 +- .../types_algorand_client_interface.md | 25 +- docs/code/modules/types_composer.md | 2 +- docs/code/modules/types_interface_of.md | 25 + docs/code/modules/types_transaction.md | 1 + src/app-deploy.spec.ts | 8 +- src/app.spec.ts | 2 +- src/indexer-lookup.spec.ts | 2 +- src/testing/fixtures/algorand-fixture.ts | 52 +- src/testing/test-logger.ts | 2 +- src/testing/transaction-logger.ts | 4 +- src/transaction/transaction.spec.ts | 537 +++++++++++++- src/transaction/transaction.ts | 672 +++++++++++------- src/types/account-manager.spec.ts | 2 +- src/types/algorand-client-interface.ts | 56 +- src/types/algorand-client.asset.spec.ts | 2 +- src/types/algorand-client.spec.ts | 2 +- src/types/algorand-client.transfer.spec.ts | 4 +- src/types/app-client.spec.ts | 4 +- src/types/app-client.ts | 2 +- src/types/app-deployer.ts | 2 +- src/types/app-factory-and-client.spec.ts | 4 +- src/types/composer.ts | 164 ++++- src/types/interface-of.ts | 3 + src/types/testing.ts | 49 +- src/types/transaction.ts | 17 + .../inner-fee/application.json | 202 ++++++ tests/example-contracts/inner-fee/contract.py | 49 ++ 50 files changed, 2123 insertions(+), 524 deletions(-) create mode 100644 docs/code/interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md create mode 100644 docs/code/modules/types_interface_of.md create mode 100644 src/types/interface-of.ts create mode 100644 tests/example-contracts/inner-fee/application.json create mode 100644 tests/example-contracts/inner-fee/contract.py diff --git a/docs/capabilities/algorand-client.md b/docs/capabilities/algorand-client.md index 51749271..e4a3b3d2 100644 --- a/docs/capabilities/algorand-client.md +++ b/docs/capabilities/algorand-client.md @@ -54,7 +54,7 @@ The `AlgorandClient` has a number of manager class instances that help you quick ### Creating transactions -You can compose a transaction via `algorand.createTransaction...`, which gives you an instance of the [`AlgorandClientTransactionCreator`](../code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) class. Intellisense will guide you on the different options. +You can compose a transaction via `algorand.createTransaction.`, which gives you an instance of the [`AlgorandClientTransactionCreator`](../code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) class. Intellisense will guide you on the different options. The signature for the calls to send a single transaction usually look like: @@ -147,8 +147,10 @@ There are two common base interfaces that get reused: - [`SendParams`](../code/interfaces/types_transaction.SendParams.md) - `maxRoundsToWaitForConfirmation?: number` - The number of rounds to wait for confirmation. By default until the latest lastValid has past. - `suppressLog?: boolean` - Whether to suppress log messages from transaction send, default: do not suppress. + - `populateAppCallResources?: boolean` - Whether to use simulate to automatically populate app call resources in the txn objects. Defaults to `Config.populateAppCallResources`. + - `coverAppCallInnerTransactionFees?: boolean` - Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee -Then on top of that the base type gets extended for the specific type of transaction you are issuing. These are all defined as part of [`TransactionComposer`](./transaction-composer.md). +Then on top of that the base type gets extended for the specific type of transaction you are issuing. These are all defined as part of [`TransactionComposer`](./transaction-composer.md) and we recommend reading these docs, especially when leveraging either `populateAppCallResources` or `coverAppCallInnerTransactionFees`. ### Transaction configuration diff --git a/docs/capabilities/testing.md b/docs/capabilities/testing.md index 38973ecc..076525bf 100644 --- a/docs/capabilities/testing.md +++ b/docs/capabilities/testing.md @@ -24,7 +24,9 @@ import { algorandFixture } from '@algorandfoundation/algokit-utils/testing' ### Using with Jest -To integrate with [Jest](https://jestjs.io/) you need to pass the `fixture.beforeEach` method into Jest's `beforeEach` method and then within each test you can access `fixture.context` to access per-test isolated fixture values. +To integrate with [Jest](https://jestjs.io/) you need to pass the `fixture.newScope` method into Jest's `beforeEach` method (for per test isolation) or `beforeAll` method (for test suite isolation) and then within each test you can access `fixture.context` to access the isolated fixture values. + +#### Per-test isolation ```typescript import { describe, test, beforeEach } from '@jest/globals' @@ -32,7 +34,27 @@ import { algorandFixture } from './testing' describe('MY MODULE', () => { const fixture = algorandFixture() - beforeEach(fixture.beforeEach, 10_000) + beforeEach(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + + test('MY TEST', async () => { + const { algorand, testAccount /* ... */ } = fixture.context + + // Test stuff! + }) +}) +``` + +Occasionally there may be a delay when first running the fixture setup so we add a 10s timeout to avoid intermittent test failures (`10_000`). + +#### Test suite isolation + +```typescript +import { describe, test, beforeAll } from '@jest/globals' +import { algorandFixture } from './testing' + +describe('MY MODULE', () => { + const fixture = algorandFixture() + beforeAll(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls test('MY TEST', async () => { const { algorand, testAccount /* ... */ } = fixture.context @@ -46,7 +68,9 @@ Occasionally there may be a delay when first running the fixture setup so we add ### Using with vitest -To integrate with [vitest](https://vitest.dev/) you need to pass the `fixture.beforeEach` method into vitest's `beforeEach` method and then within each test you can access `fixture.context` to access per-test isolated fixture values. +To integrate with [vitest](https://vitest.dev/) you need to pass the `fixture.beforeEach` method into vitest's `beforeEach` method (for per test isolation) or `beforeAll` method (for test suite isolation) and then within each test you can access `fixture.context` to access the isolated fixture values. + +#### Per-test isolation ```typescript import { describe, test, beforeEach } from 'vitest' @@ -54,7 +78,27 @@ import { algorandFixture } from './testing' describe('MY MODULE', () => { const fixture = algorandFixture() - beforeEach(fixture.beforeEach, 10_000) + beforeEach(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + + test('MY TEST', async () => { + const { algorand, testAccount /* ... */ } = fixture.context + + // Test stuff! + }) +}) +``` + +Occasionally there may be a delay when first running the fixture setup so we add a 10s timeout to avoid intermittent test failures (`10_000`). + +#### Test suite isolation + +```typescript +import { describe, test, beforeAll } from 'vitest' +import { algorandFixture } from './testing' + +describe('MY MODULE', () => { + const fixture = algorandFixture() + beforeAll(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls test('MY TEST', async () => { const { algorand, testAccount /* ... */ } = fixture.context @@ -64,6 +108,8 @@ describe('MY MODULE', () => { }) ``` +Occasionally there may be a delay when first running the fixture setup so we add a 10s timeout to avoid intermittent test failures (`10_000`). + ### Fixture configuration When calling `algorandFixture()` you can optionally pass in some fixture configuration, with any of these properties (all optional): @@ -72,6 +118,7 @@ When calling `algorandFixture()` you can optionally pass in some fixture configu - `indexer?: Indexer` - An optional indexer client, if not specified then it will create one against environment variables defined network (if present) or default LocalNet - `kmd?: Kmd` - An optional kmd client, if not specified then it will create one against environment variables defined network (if present) or default LocalNet - `testAccountFunding?: AlgoAmount` - The [amount](./amount.md) of funds to allocate to the default testing account, if not specified then it will get `10` ALGO +- `accountGetter?: (algod: Algodv2, kmd?: Kmd) => Promise` - Optional override for how to get an account; this allows you to retrieve test accounts from a known or cached list of accounts. ### Using the fixture context @@ -84,7 +131,7 @@ The `fixture.context` property is of type [`AlgorandTestAutomationContext`](../c - `transactionLogger: TransactionLogger` - Transaction logger that will log transaction IDs for all transactions issued by `algod` - `testAccount: Account` - Funded test account that is ephemerally created for each test - `generateAccount: (params: GetTestAccountParams) => Promise` - Generate and fund an additional ephemerally created account -- `waitForIndexer: () => Promise` - Wait for the indexer to catch up with all transactions logged by transactionLogger +- `waitForIndexer()` - Waits for indexer to catch up with the latest transaction that has been captured by the `transactionLogger` in the Algorand fixture - `waitForIndexerTransaction: (transactionId: string) => Promise` - Wait for the indexer to catch up with the given transaction ID ## Log capture fixture @@ -170,7 +217,7 @@ This means it's easy to create tests that are flaky and have intermittent test f The testing capability provides mechanisms for waiting for indexer to catch up, namely: - `algotesting.runWhenIndexerCaughtUp(run: () => Promise)` - Executes the given action every 200ms up to 20 times until there is no longer an error with a `status` property with `404` and then returns the result of the action; this will work for any call that calls indexer APIs expecting to return a single record -- `algorandFixture.waitForIndexer()` - Waits for indexer to catch up with all transactions that have been captured by the `transactionLogger` in the Algorand fixture +- `algorandFixture.waitForIndexer()` - Waits for indexer to catch up with the latest transaction that has been captured by the `transactionLogger` in the Algorand fixture - `algorandFixture.waitForIndexerTransaction(transactionId)` - Waits for indexer to catch up with the single transaction of the given ID ## Logging transactions diff --git a/docs/capabilities/transaction-composer.md b/docs/capabilities/transaction-composer.md index 7750843a..c7682fde 100644 --- a/docs/capabilities/transaction-composer.md +++ b/docs/capabilities/transaction-composer.md @@ -33,17 +33,152 @@ The [methods to construct a transaction](../code/classes/types_composer.default. For example: ```typescript +const myMethod = algosdk.ABIMethod.fromSignature('my_method()void') const result = algorand .newGroup() .addPayment({ sender: 'SENDER', receiver: 'RECEIVER', amount: (100).microAlgo() }) .addAppCallMethodCall({ sender: 'SENDER', appId: 123n, - method: abiMethod, + method: myMethod, args: [1, 2, 3], }) ``` +## Sending a transaction + +Once you have constructed all the required transactions, they can be sent by calling `send()` on the `TransactionComposer`. +Additionally `send()` takes a number of parameters which allow you to opt-in to some additional behaviours as part of sending the transaction or transaction group, mostly significantly `populateAppCallResources` and `coverAppCallInnerTransactionFees`. + +### Populating App Call Resource + +`populateAppCallResources` automatically updates the relevant app call transactions in the group to include the account, app, asset and box resources required for the transactions to execute successfully. It leverages the simulate endpoint to discover the accessed resources, which have not been explicitly specified. This setting only applies when you have constucted at least one app call transaction. You can read more about [resources and the reference arrays](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/?from_query=resources#reference-arrays) in the docs. + +For example: + +```typescript +const myMethod = algosdk.ABIMethod.fromSignature('my_method()void') +const result = algorand + .newGroup() + .addAppCallMethodCall({ + sender: 'SENDER', + appId: 123n, + method: myMethod, + args: [1, 2, 3], + }) + .send({ + populateAppCallResources: true, + }) +``` + +If `my_method` in the above example accesses any resources, they will be automatically discovered and added before sending the transaction to the network. + +### Covering App Call Inner Transaction Fees + +`coverAppCallInnerTransactionFees` automatically calculate the required fee for a parent app call transaction that sends inner transactions. It leverages the simulate endpoint to discover the inner transactions sent and calculates a fee delta to resolve the optimal fee. This feature also takes care of accounting for any surplus transaction fee at the various levels, so as to effectively minimise the fees needed to successfully handle complex scenarios. This setting only applies when you have constucted at least one app call transaction. + +For example: + +```typescript +const myMethod = algosdk.ABIMethod.fromSignature('my_method()void') +const result = algorand + .newGroup() + .addAppCallMethodCall({ + sender: 'SENDER', + appId: 123n, + method: myMethod, + args: [1, 2, 3], + maxFee: microAlgo(5000), // NOTE: a maxFee value is required when enabling coverAppCallInnerTransactionFees + }) + .send({ + coverAppCallInnerTransactionFees: true, + }) +``` + +Assuming the app account is not covering any of the inner transaction fees, if `my_method` in the above example sends 2 inner transactions, then the fee calculated for the parent transaction will be 3000 µALGO when the transaction is sent to the network. + +The above example also has a `maxFee` of 5000 µALGO specified. An exception will be thrown if the transaction fee execeeds that value, which allows you to set fee limits. The `maxFee` field is required when enabling `coverAppCallInnerTransactionFees`. + +Because `maxFee` is required and an `algosdk.Transaction` does not hold any max fee information, you cannot use the generic `addTransaction()` method on the composer with `coverAppCallInnerTransactionFees` enabled. Instead use the below, which provides a better overall experience: + +```typescript +const myMethod = algosdk.ABIMethod.fromSignature('my_method()void') + +// Does not work +const result = algorand + .newGroup() + .addTransaction((await localnet.algorand.createTransaction.appCallMethodCall({ + sender: 'SENDER', + appId: 123n, + method: myMethod, + args: [1, 2, 3], + maxFee: microAlgo(5000), // This is only used to create the algosdk.Transaction object and isn't made available to the composer. + })).transactions[0]), + .send({ + coverAppCallInnerTransactionFees: true, + }) + +// Works as expected +const result = algorand + .newGroup() + .addAppCallMethodCall({ + sender: 'SENDER', + appId: 123n, + method: myMethod, + args: [1, 2, 3], + maxFee: microAlgo(5000), + }) + .send({ + coverAppCallInnerTransactionFees: true, + }) +``` + +A more complex valid scenario which leverages an app client to send an ABI method call with ABI method call transactions argument is below: + +```typescript +const appFactory = algorand.client.getAppFactory({ + appSpec: 'APP_SPEC', + defaultSender: sender.addr, +}) + +const { appClient: appClient1 } = await appFactory.send.bare.create() +const { appClient: appClient2 } = await appFactory.send.bare.create() + +const paymentArg = algorand.createTransaction.payment({ + sender: sender.addr, + receiver: receiver.addr, + amount: microAlgo(1), +}) + +// Note the use of .params. here, this ensure that maxFee is still available to the composer +const appCallArg = await appClient2.params.call({ + method: 'my_other_method', + args: [], + maxFee: microAlgo(2000), +}) + +const result = await appClient1.algorand + .newGroup() + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'my_method', + args: [paymentArg, appCallArg], + maxFee: microAlgo(5000), + }), + ) + .send({ + coverAppCallInnerTransactionFees: true, + }) +``` + +This feature should efficiently calculate the minimum fee needed to execute an app call transaction with inners, however we always recommend testing your specific scenario behaves as expected before releasing. + +### Covering App Call Op Budget + +The high level Algorand contract authoring languages all have support for ensuring appropriate app op budget is available via `ensure_budget` in Algorand Python, `ensureBudget` in Algorand TypeScript and `increaseOpcodeBudget` in TEALScript. This is great, as it allows contract authors to ensure appropriate budget is available by automatically sending op-up inner transactions to increase the budget available. These op-up inner transactions require the fees to be covered by an account, which is generally the responsibility of the application consumer. + +Application consumers may not be immediately aware of the number of op-up inner transactions sent, so it can be difficult for them to determine the exact fees required to successfully execute an application call. Fortunately the `coverAppCallInnerTransactionFees` setting above can be leveraged to automatically cover the fees for any op-up inner transaction that an application sends. Additionally if a contract author decides to cover the fee for an op-up inner transaction, then the application consumer will not be charged a fee for that transaction. + ## Simulating a transaction Transactions can be simulated using the simulate endpoint in algod, which enables evaluating the transaction on the network without it actually being commited to a block. diff --git a/docs/capabilities/transaction.md b/docs/capabilities/transaction.md index 117a3238..4996aee5 100644 --- a/docs/capabilities/transaction.md +++ b/docs/capabilities/transaction.md @@ -20,4 +20,4 @@ There are various variations of the `ConfirmedTransactionResult` that are expose ## Further reading -To understand how to create, simulate and send transactions consult the [`AlgorandClient`](./algorand-client.md) and [`AlgorandClient`](./algokit-composer.md) documentation. +To understand how to create, simulate and send transactions consult the [`AlgorandClient`](./algorand-client.md) and [`TransactionComposer`](./transaction-composer.md) documentation. diff --git a/docs/code/README.md b/docs/code/README.md index 0fb2fca2..787925fd 100644 --- a/docs/code/README.md +++ b/docs/code/README.md @@ -45,6 +45,7 @@ - [types/expand](modules/types_expand.md) - [types/indexer](modules/types_indexer.md) - [types/instance-of](modules/types_instance_of.md) +- [types/interface-of](modules/types_interface_of.md) - [types/kmd-account-manager](modules/types_kmd_account_manager.md) - [types/lifecycle-events](modules/types_lifecycle_events.md) - [types/logging](modules/types_logging.md) diff --git a/docs/code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md b/docs/code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md index dd3740ed..bc1300ce 100644 --- a/docs/code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md +++ b/docs/code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md @@ -291,7 +291,7 @@ await algorand.createTransaction.appCreate({ | `params.assetReferences?` | `bigint`[] | The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). | | `params.boxReferences?` | ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] | Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). Either the name identifier (which will be set against app ID of `0` i.e. the current app), or a box identifier with the name identifier and app ID. | | `params.clearStateProgram` | `string` \| `Uint8Array` | The program to execute for ClearState OnComplete as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). | -| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `params.extraProgramPages?` | `number` | Number of extra pages required for the programs. Defaults to the number needed for the programs in this call if not specified. This is immutable once the app is created. | | `params.firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `params.lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | @@ -609,7 +609,7 @@ await algorand.createTransaction.appUpdate({ | `params.assetReferences?` | `bigint`[] | The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). | | `params.boxReferences?` | ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] | Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). Either the name identifier (which will be set against app ID of `0` i.e. the current app), or a box identifier with the name identifier and app ID. | | `params.clearStateProgram` | `string` \| `Uint8Array` | The program to execute for ClearState OnComplete as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) | -| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `params.firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `params.lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | | `params.lease?` | `string` \| `Uint8Array` | Prevent multiple transactions with the same lease being included within the validity window. A [lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios). | diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 429615c0..aff832b9 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -104,7 +104,7 @@ state for a specific deployed instance of an app (with a known app ID). ### \_algorand -• `Private` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +• `Private` **\_algorand**: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) #### Defined in @@ -193,7 +193,7 @@ ___ ### \_createTransactionsMethods -• `Private` **\_createTransactionsMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } +• `Private` **\_createTransactionsMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } #### Defined in @@ -273,7 +273,7 @@ ___ ### \_paramsMethods -• `Private` **\_paramsMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } +• `Private` **\_paramsMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } #### Defined in @@ -283,7 +283,7 @@ ___ ### \_sendMethods -• `Private` **\_sendMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } +• `Private` **\_sendMethods**: \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } #### Defined in @@ -293,13 +293,13 @@ ___ ### algorand -• `get` **algorand**(): [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +• `get` **algorand**(): [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) A reference to the underlying `AlgorandClient` this app client is using. #### Returns -[`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +[`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) #### Defined in @@ -373,13 +373,13 @@ ___ ### createTransaction -• `get` **createTransaction**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } +• `get` **createTransaction**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } Create transactions for the current app #### Returns -\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } +\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<`Transaction`\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<`Transaction`\> } } #### Defined in @@ -389,7 +389,7 @@ ___ ### params -• `get` **params**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } +• `get` **params**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } Get parameters to create transactions for the current app. @@ -397,7 +397,7 @@ A good mental model for this is that these parameters represent a deferred trans #### Returns -\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } +\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `extraProgramPages?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `schema?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... ; `appId`: ... ; `appReferences?`: ... ; `approvalProgram`: ... ; `args?`: ... ; `assetReferences?`: ... ; `boxReferences?`: ... ; `clearStateProgram`: ... ; `extraFee?`: ... ; `firstValidRound?`: ... ; `lastValidRound?`: ... ; `lease?`: ... ; `maxFee?`: ... ; `note?`: ... ; `onComplete?`: ... ; `rekeyTo?`: ... ; `sender`: ... ; `signer?`: ... ; `staticFee?`: ... ; `validityWindow?`: ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppDeleteParams`](../modules/types_composer.md#appdeleteparams) ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => [`AppCallParams`](../modules/types_composer.md#appcallparams) ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> } } **`Example`** @@ -422,13 +422,13 @@ ___ ### send -• `get` **send**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } +• `get` **send**(): \{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } Send transactions to the current app #### Returns -\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } +\{ `call`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `closeOut`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `delete`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `fundAppAccount`: (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> ; `update`: (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } & \{ `bare`: \{ `call`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `clearState`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `closeOut`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `delete`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `optIn`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> ; `update`: (`params?`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> } } #### Defined in @@ -583,7 +583,8 @@ An alias for `appClient.send.fundAppAccount(params)`. | `params` | `Object` | The parameters for the funding transaction | | `params.amount` | [`AlgoAmount`](types_amount.AlgoAmount.md) | Amount to send | | `params.closeRemainderTo?` | `string` \| `Address` | If given, close the sender account and send the remaining balance to this address *Warning:* Be careful with this parameter as it can lead to loss of funds if not used correctly. | -| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `params.coverAppCallInnerTransactionFees?` | `boolean` | Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee | +| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `params.firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `params.lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | | `params.lease?` | `string` \| `Uint8Array` | Prevent multiple transactions with the same lease being included within the validity window. A [lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios). | @@ -980,7 +981,7 @@ ___ | `call` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> | - | | `closeOut` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> | - | | `delete` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> | - | -| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> | - | +| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<`Transaction`\> | - | | `optIn` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> | - | | `update` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `methodCalls`: `Map`\<`number`, `ABIMethod`\> ; `signers`: `Map`\<`number`, `TransactionSigner`\> ; `transactions`: `Transaction`[] }\> | - | @@ -1003,7 +1004,7 @@ ___ | `call` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete)) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> | - | | `closeOut` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> | - | | `delete` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppDeleteMethodCall`](../modules/types_composer.md#appdeletemethodcall)\> | - | -| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } | - | +| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` }) => \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `receiver`: `Address` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `Address` ; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } | - | | `optIn` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }) => `Promise`\<[`AppCallMethodCall`](../modules/types_composer.md#appcallmethodcall)\> | - | | `update` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md)) => `Promise`\<\{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `Uint8Array` ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `Uint8Array` ; `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `deletable?`: `boolean` ; `deployTimeParams?`: [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `updatable?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & \{ `appId`: `bigint` ; `args`: `undefined` \| (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... \| ... ; `appReferences?`: ... \| ... ; `approvalProgram`: ... \| ... ; `args?`: ... \| ... ; `assetReferences?`: ... \| ... ; `boxReferences?`: ... \| ... ; `clearStateProgram`: ... \| ... ; `extraFee?`: ... \| ... ; `extraProgramPages?`: ... \| ... ; `firstValidRound?`: ... \| ... ; `lastValidRound?`: ... \| ... ; `lease?`: ... \| ... \| ... ; `maxFee?`: ... \| ... ; `note?`: ... \| ... \| ... ; `onComplete?`: ... \| ... \| ... \| ... \| ... \| ... ; `rekeyTo?`: ... \| ... \| ... ; `schema?`: ... \| ... ; `sender`: ... \| ... ; `signer?`: ... \| ... \| ... ; `staticFee?`: ... \| ... ; `validityWindow?`: ... \| ... \| ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: ... \| ... ; `appId`: `bigint` ; `appReferences?`: ... \| ... ; `approvalProgram`: ... \| ... ; `args?`: ... \| ... ; `assetReferences?`: ... \| ... ; `boxReferences?`: ... \| ... ; `clearStateProgram`: ... \| ... ; `extraFee?`: ... \| ... ; `firstValidRound?`: ... \| ... ; `lastValidRound?`: ... \| ... ; `lease?`: ... \| ... \| ... ; `maxFee?`: ... \| ... ; `note?`: ... \| ... \| ... ; `onComplete?`: ... \| ... ; `rekeyTo?`: ... \| ... \| ... ; `sender`: ... \| ... ; `signer?`: ... \| ... \| ... ; `staticFee?`: ... \| ... ; `validityWindow?`: ... \| ... \| ... }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `method`: [`Arc56Method`](types_app_arc56.Arc56Method.md) ; `onComplete`: `UpdateApplicationOC` ; `sender`: `Address` = sender; `signer`: `undefined` \| `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) }\> | - | @@ -1026,7 +1027,7 @@ ___ | `call` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`CallOnComplete`](../modules/types_app_client.md#calloncomplete) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> | - | | `closeOut` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> | - | | `delete` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> | - | -| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> | - | +| `fundAppAccount` | (`params`: \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` \| `Address` ; `coverAppCallInnerTransactionFees?`: `boolean` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `maxRoundsToWaitForConfirmation?`: `number` ; `note?`: `string` \| `Uint8Array` ; `populateAppCallResources?`: `boolean` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `suppressLog?`: `boolean` ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> | - | | `optIn` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<`Omit`\<\{ `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: [`ABIReturn`](../modules/types_app.md#abireturn) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }, ``"return"``\> & [`AppReturn`](../modules/types_app.md#appreturn)\<`undefined` \| `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct)\>\> | - | | `update` | (`params`: \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } & [`AppClientCompilationParams`](../interfaces/types_app_client.AppClientCompilationParams.md) & [`SendParams`](../interfaces/types_transaction.SendParams.md)) => `Promise`\<\{ `compiledApproval?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `compiledClear?`: [`CompiledTeal`](../interfaces/types_app.CompiledTeal.md) ; `confirmation`: `PendingTransactionResponse` ; `confirmations`: `PendingTransactionResponse`[] ; `groupId`: `string` ; `return?`: `ABIValue` \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct) ; `returns?`: [`ABIReturn`](../modules/types_app.md#abireturn)[] ; `transaction`: `Transaction` ; `transactions`: `Transaction`[] ; `txIds`: `string`[] }\> | - | @@ -1267,7 +1268,7 @@ using AlgoKit app deployment semantics (i.e. looking for the app creation transa | Name | Type | Description | | :------ | :------ | :------ | | `params` | `Object` | The parameters to create the app client | -| `params.algorand` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | An `AlgorandClient` instance | +| `params.algorand` | [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) | An `AlgorandClient` instance | | `params.appLookupCache?` | [`AppLookup`](../interfaces/types_app_deployer.AppLookup.md) | An optional cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this `ClientManager` on construction. | | `params.appName?` | `string` | Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name | | `params.appSpec` | `string` \| [`Arc56Contract`](../interfaces/types_app_arc56.Arc56Contract.md) \| [`AppSpec`](../interfaces/types_app_spec.AppSpec.md) | The ARC-56 or ARC-32 application spec as either: * Parsed JSON ARC-56 `Contract` * Parsed JSON ARC-32 `AppSpec` * Raw JSON string (in either ARC-56 or ARC-32 format) | @@ -1302,7 +1303,7 @@ If no IDs are in the app spec or the network isn't recognised, an error is throw | Name | Type | Description | | :------ | :------ | :------ | | `params` | `Object` | The parameters to create the app client | -| `params.algorand` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | An `AlgorandClient` instance | +| `params.algorand` | [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) | An `AlgorandClient` instance | | `params.appName?` | `string` | Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name | | `params.appSpec` | `string` \| [`Arc56Contract`](../interfaces/types_app_arc56.Arc56Contract.md) \| [`AppSpec`](../interfaces/types_app_spec.AppSpec.md) | The ARC-56 or ARC-32 application spec as either: * Parsed JSON ARC-56 `Contract` * Parsed JSON ARC-32 `AppSpec` * Raw JSON string (in either ARC-56 or ARC-32 format) | | `params.approvalSourceMap?` | `ProgramSourceMap` | Optional source map for the approval program | diff --git a/docs/code/classes/types_app_deployer.AppDeployer.md b/docs/code/classes/types_app_deployer.AppDeployer.md index 976e8c88..92c2129f 100644 --- a/docs/code/classes/types_app_deployer.AppDeployer.md +++ b/docs/code/classes/types_app_deployer.AppDeployer.md @@ -110,6 +110,7 @@ To understand the architecture decisions behind this functionality please see ht | Name | Type | Description | | :------ | :------ | :------ | | `deployment` | `Object` | The arguments to control the app deployment | +| `deployment.coverAppCallInnerTransactionFees?` | `boolean` | Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee | | `deployment.createParams` | \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `extraProgramPages?`: `number` ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `NoOpOC` \| `OptInOC` \| `CloseOutOC` \| `UpdateApplicationOC` \| `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalInts`: `number` ; `localByteSlices`: `number` ; `localInts`: `number` } ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } \| [`AppCreateMethodCall`](../modules/types_composer.md#appcreatemethodcall) | Create transaction parameters to use if a create needs to be issued as part of deployment | | `deployment.deleteParams` | \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } \| \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `Transaction` \| `ABIValue` \| `TransactionWithSigner` \| `Promise`\<`Transaction`\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: (... \| ...)[] ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: BoxIdentifier \| BoxReference[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `extraProgramPages?`: `number` ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `NoOpOC` \| `OptInOC` \| `CloseOutOC` \| `UpdateApplicationOC` \| `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalInts`: `number` ; `localByteSlices`: `number` ; `localInts`: `number` } ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<\{ `accountReferences?`: (... \| ...)[] ; `appId`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram`: `string` \| `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: BoxIdentifier \| BoxReference[] ; `clearStateProgram`: `string` \| `Uint8Array` ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `UpdateApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` }\> \| [`AppMethodCall`](../modules/types_composer.md#appmethodcall)\<[`AppMethodCallParams`](../modules/types_composer.md#appmethodcallparams)\>)[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `ABIMethod` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `sender`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } | Delete transaction parameters to use if a delete needs to be issued as part of deployment | | `deployment.deployTimeParams?` | [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) | Any deploy-time parameters to replace in the TEAL code before compiling it (used if teal code is passed in as a string) | diff --git a/docs/code/classes/types_app_factory.AppFactory.md b/docs/code/classes/types_app_factory.AppFactory.md index 67936e96..5d5cdadf 100644 --- a/docs/code/classes/types_app_factory.AppFactory.md +++ b/docs/code/classes/types_app_factory.AppFactory.md @@ -81,7 +81,7 @@ to interact with those (or other) app instances. ### \_algorand -• `Private` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +• `Private` **\_algorand**: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) #### Defined in @@ -253,13 +253,13 @@ Send transactions to the current app ### algorand -• `get` **algorand**(): [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +• `get` **algorand**(): [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) Return the algorand client this factory is using. #### Returns -[`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +[`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) #### Defined in @@ -388,6 +388,7 @@ Idempotently deploy (create if not exists, update if changed) an app against the | :------ | :------ | :------ | | `params` | `Object` | The arguments to control the app deployment | | `params.appName?` | `string` | Override the app name for this deployment | +| `params.coverAppCallInnerTransactionFees?` | `boolean` | Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee | | `params.createParams?` | \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `extraProgramPages?`: `number` ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `NoOpOC` \| `OptInOC` \| `CloseOutOC` \| `UpdateApplicationOC` \| `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalInts`: `number` ; `localByteSlices`: `number` ; `localInts`: `number` } ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } \| \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `extraProgramPages?`: `number` ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `NoOpOC` \| `OptInOC` \| `CloseOutOC` \| `UpdateApplicationOC` \| `DeleteApplicationOC` ; `rekeyTo?`: `string` \| `Address` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalInts`: `number` ; `localByteSlices`: `number` ; `localInts`: `number` } ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } | Create transaction parameters to use if a create needs to be issued as part of deployment | | `params.deletable?` | `boolean` | Whether or not the contract should have deploy-time permanence control set. `undefined` = use AppFactory constructor value if set or base it on the app spec. | | `params.deleteParams?` | \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `note?`: `string` \| `Uint8Array` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } \| \{ `accountReferences?`: (`string` \| `Address`)[] ; `appReferences?`: `bigint`[] ; `args?`: (`undefined` \| `ABIValue` \| [`AppMethodCallTransactionArgument`](../modules/types_composer.md#appmethodcalltransactionargument) \| [`ABIStruct`](../modules/types_app_arc56.md#abistruct))[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] ; `extraFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `firstValidRound?`: `bigint` ; `lastValidRound?`: `bigint` ; `lease?`: `string` \| `Uint8Array` ; `maxFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `method`: `string` ; `note?`: `string` \| `Uint8Array` ; `onComplete?`: `OnApplicationComplete` ; `rekeyTo?`: `string` \| `Address` ; `sender?`: `string` \| `Address` ; `signer?`: `TransactionSigner` \| [`TransactionSignerAccount`](../interfaces/types_account.TransactionSignerAccount.md) ; `staticFee?`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `validityWindow?`: `number` \| `bigint` } | Delete transaction parameters to use if a create needs to be issued as part of deployment | diff --git a/docs/code/classes/types_client_manager.ClientManager.md b/docs/code/classes/types_client_manager.ClientManager.md index 312ebe82..162db512 100644 --- a/docs/code/classes/types_client_manager.ClientManager.md +++ b/docs/code/classes/types_client_manager.ClientManager.md @@ -69,7 +69,7 @@ algosdk clients or config for interacting with the official Algorand APIs. | Name | Type | Description | | :------ | :------ | :------ | | `clientsOrConfig` | [`AlgoConfig`](../interfaces/types_network_client.AlgoConfig.md) \| [`AlgoSdkClients`](../interfaces/types_client_manager.AlgoSdkClients.md) | The clients or config to use | -| `algorandClient?` | [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> | - | +| `algorandClient?` | [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) | - | #### Returns @@ -117,7 +117,7 @@ ___ ### \_algorand -• `Private` `Optional` **\_algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](types_algorand_client.AlgorandClient.md)\> +• `Private` `Optional` **\_algorand**: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) #### Defined in diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 242e2c62..1960f59c 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -22,7 +22,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [errorTransformers](types_composer.TransactionComposer.md#errortransformers) - [getSigner](types_composer.TransactionComposer.md#getsigner) - [getSuggestedParams](types_composer.TransactionComposer.md#getsuggestedparams) -- [txnMethodMap](types_composer.TransactionComposer.md#txnmethodmap) +- [txnMaxFees](types_composer.TransactionComposer.md#txnmaxfees) - [txns](types_composer.TransactionComposer.md#txns) - [NULL\_SIGNER](types_composer.TransactionComposer.md#null_signer) @@ -91,7 +91,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:564](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L564) +[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) ## Properties @@ -103,7 +103,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) +[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) ___ @@ -113,7 +113,7 @@ ___ #### Defined in -[src/types/composer.ts:556](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L556) +[src/types/composer.ts:572](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L572) ___ @@ -125,7 +125,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:533](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L533) +[src/types/composer.ts:547](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L547) ___ @@ -137,7 +137,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L551) +[src/types/composer.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L567) ___ @@ -149,7 +149,7 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:554](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L554) +[src/types/composer.ts:570](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L570) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) +[src/types/composer.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L574) ___ @@ -185,7 +185,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:548](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L548) +[src/types/composer.ts:564](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L564) ___ @@ -205,19 +205,20 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:545](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L545) +[src/types/composer.ts:561](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L561) ___ -### txnMethodMap +### txnMaxFees -• `Private` **txnMethodMap**: `Map`\<`string`, `ABIMethod`\> +• `Private` **txnMaxFees**: `Map`\<`number`, [`AlgoAmount`](types_amount.AlgoAmount.md)\> -Map of txid to ABI method +Map of transaction index in the atc to a max logical fee. +This is set using the value of either maxFee or staticFee. #### Defined in -[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) +[src/types/composer.ts:552](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L552) ___ @@ -229,7 +230,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:539](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L539) +[src/types/composer.ts:555](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L555) ___ @@ -241,7 +242,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L530) +[src/types/composer.ts:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) ## Methods @@ -269,7 +270,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:737](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L737) +[src/types/composer.ts:753](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L753) ___ @@ -295,7 +296,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:786](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L786) +[src/types/composer.ts:802](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L802) ___ @@ -319,7 +320,7 @@ Note: we recommend using app clients to make it easier to make app calls. | `params.assetReferences?` | `bigint`[] | The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). | | `params.boxReferences?` | ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] | Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). Either the name identifier (which will be set against app ID of `0` i.e. the current app), or a box identifier with the name identifier and app ID. | | `params.clearStateProgram` | `string` \| `Uint8Array` | The program to execute for ClearState OnComplete as raw teal that will be compiled (string) or compiled teal (encoded as a byte array (Uint8Array)). | -| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `params.extraProgramPages?` | `number` | Number of extra pages required for the programs. Defaults to the number needed for the programs in this call if not specified. This is immutable once the app is created. | | `params.firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `params.lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | @@ -346,7 +347,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:696](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L696) +[src/types/composer.ts:712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L712) ___ @@ -372,7 +373,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:750](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L750) +[src/types/composer.ts:766](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L766) ___ @@ -398,7 +399,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:722](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L722) +[src/types/composer.ts:738](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L738) ___ @@ -424,7 +425,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:774](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L774) +[src/types/composer.ts:790](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L790) ___ @@ -449,7 +450,7 @@ Note: we recommend using app clients to make it easier to make app calls. | `params.assetReferences?` | `bigint`[] | The ID of any assets to load to the [foreign assets array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). | | `params.boxReferences?` | ([`BoxIdentifier`](../modules/types_app_manager.md#boxidentifier) \| [`BoxReference`](../interfaces/types_app_manager.BoxReference.md))[] | Any boxes to load to the [boxes array](https://developer.algorand.org/docs/get-details/dapps/smart-contracts/apps/#reference-arrays). Either the name identifier (which will be set against app ID of `0` i.e. the current app), or a box identifier with the name identifier and app ID. | | `params.clearStateProgram` | `string` \| `Uint8Array` | The program to execute for ClearState OnComplete as raw teal (string) or compiled teal (base 64 encoded as a byte array (Uint8Array)) | -| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `params.extraFee?` | [`AlgoAmount`](types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `params.firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `params.lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | | `params.lease?` | `string` \| `Uint8Array` | Prevent multiple transactions with the same lease being included within the validity window. A [lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios). | @@ -470,7 +471,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:709](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L709) +[src/types/composer.ts:725](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L725) ___ @@ -496,7 +497,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:762](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L762) +[src/types/composer.ts:778](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L778) ___ @@ -520,7 +521,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:628](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L628) +[src/types/composer.ts:644](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L644) ___ @@ -544,7 +545,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:617](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L617) +[src/types/composer.ts:633](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L633) ___ @@ -568,7 +569,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:650](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L650) +[src/types/composer.ts:666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L666) ___ @@ -592,7 +593,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:639](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L639) +[src/types/composer.ts:655](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L655) ___ @@ -616,7 +617,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L672) +[src/types/composer.ts:688](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L688) ___ @@ -640,7 +641,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L683) +[src/types/composer.ts:699](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L699) ___ @@ -664,7 +665,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L661) +[src/types/composer.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L677) ___ @@ -688,7 +689,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:818](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L818) +[src/types/composer.ts:834](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L834) ___ @@ -712,7 +713,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:807](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L807) +[src/types/composer.ts:823](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L823) ___ @@ -736,7 +737,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:796](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L796) +[src/types/composer.ts:812](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L812) ___ @@ -760,7 +761,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:606](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L606) +[src/types/composer.ts:622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L622) ___ @@ -785,7 +786,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:591](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L591) +[src/types/composer.ts:607](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L607) ___ @@ -808,13 +809,13 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1273](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1273) +[src/types/composer.ts:1354](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1354) ___ ### buildAppCall -▸ **buildAppCall**(`params`, `suggestedParams`): `Promise`\<`Transaction`\> +▸ **buildAppCall**(`params`, `suggestedParams`): `Promise`\<`TransactionWithContext`\> #### Parameters @@ -825,17 +826,17 @@ ___ #### Returns -`Promise`\<`Transaction`\> +`Promise`\<`TransactionWithContext`\> #### Defined in -[src/types/composer.ts:1096](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1096) +[src/types/composer.ts:1173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1173) ___ ### buildAssetConfig -▸ **buildAssetConfig**(`params`, `suggestedParams`): `Transaction` +▸ **buildAssetConfig**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -846,17 +847,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1053](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1053) +[src/types/composer.ts:1130](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1130) ___ ### buildAssetCreate -▸ **buildAssetCreate**(`params`, `suggestedParams`): `Transaction` +▸ **buildAssetCreate**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -867,17 +868,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1035](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1035) +[src/types/composer.ts:1112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1112) ___ ### buildAssetDestroy -▸ **buildAssetDestroy**(`params`, `suggestedParams`): `Transaction` +▸ **buildAssetDestroy**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -888,17 +889,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1066](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1066) +[src/types/composer.ts:1143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1143) ___ ### buildAssetFreeze -▸ **buildAssetFreeze**(`params`, `suggestedParams`): `Transaction` +▸ **buildAssetFreeze**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -909,17 +910,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1074](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1074) +[src/types/composer.ts:1151](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1151) ___ ### buildAssetTransfer -▸ **buildAssetTransfer**(`params`, `suggestedParams`): `Transaction` +▸ **buildAssetTransfer**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -930,17 +931,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1084) +[src/types/composer.ts:1161](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1161) ___ ### buildAtc -▸ **buildAtc**(`atc`): `TransactionWithSigner`[] +▸ **buildAtc**(`atc`): `TransactionWithSignerAndContext`[] Build an ATC and return transactions ready to be incorporated into a broader set of transactions this composer is composing @@ -952,17 +953,17 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Returns -`TransactionWithSigner`[] +`TransactionWithSignerAndContext`[] #### Defined in -[src/types/composer.ts:824](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L824) +[src/types/composer.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L840) ___ ### buildKeyReg -▸ **buildKeyReg**(`params`, `suggestedParams`): `Transaction` +▸ **buildKeyReg**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -973,17 +974,17 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1147](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1147) +[src/types/composer.ts:1224](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1224) ___ ### buildMethodCall -▸ **buildMethodCall**(`params`, `suggestedParams`, `includeSigner`): `Promise`\<`TransactionWithSigner`[]\> +▸ **buildMethodCall**(`params`, `suggestedParams`, `includeSigner`): `Promise`\<`TransactionWithSignerAndContext`[]\> Builds an ABI method call transaction and any other associated transactions represented in the ABI args. @@ -997,17 +998,17 @@ Builds an ABI method call transaction and any other associated transactions repr #### Returns -`Promise`\<`TransactionWithSigner`[]\> +`Promise`\<`TransactionWithSignerAndContext`[]\> #### Defined in -[src/types/composer.ts:894](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L894) +[src/types/composer.ts:920](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L920) ___ ### buildPayment -▸ **buildPayment**(`params`, `suggestedParams`): `Transaction` +▸ **buildPayment**(`params`, `suggestedParams`): `TransactionWithContext` #### Parameters @@ -1018,11 +1019,11 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:1025](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1025) +[src/types/composer.ts:1102](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1102) ___ @@ -1040,13 +1041,13 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1220](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1220) +[src/types/composer.ts:1302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1302) ___ ### buildTxn -▸ **buildTxn**(`txn`, `suggestedParams`): `Promise`\<`Transaction`[]\> +▸ **buildTxn**(`txn`, `suggestedParams`): `Promise`\<`TransactionWithContext`[]\> Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` since those ones can have custom signers that need to be retrieved. @@ -1059,17 +1060,17 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Returns -`Promise`\<`Transaction`[]\> +`Promise`\<`TransactionWithContext`[]\> #### Defined in -[src/types/composer.ts:1170](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1170) +[src/types/composer.ts:1247](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1247) ___ ### buildTxnWithSigner -▸ **buildTxnWithSigner**(`txn`, `suggestedParams`): `Promise`\<`TransactionWithSigner`[]\> +▸ **buildTxnWithSigner**(`txn`, `suggestedParams`): `Promise`\<`TransactionWithSignerAndContext`[]\> #### Parameters @@ -1080,17 +1081,17 @@ ___ #### Returns -`Promise`\<`TransactionWithSigner`[]\> +`Promise`\<`TransactionWithSignerAndContext`[]\> #### Defined in -[src/types/composer.ts:1197](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1197) +[src/types/composer.ts:1274](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1274) ___ ### commonTxnBuildStep -▸ **commonTxnBuildStep**\<`TParams`\>(`buildTxn`, `params`, `txnParams`): `Transaction` +▸ **commonTxnBuildStep**\<`TParams`\>(`buildTxn`, `params`, `txnParams`): `TransactionWithContext` #### Type parameters @@ -1108,11 +1109,11 @@ ___ #### Returns -`Transaction` +`TransactionWithContext` #### Defined in -[src/types/composer.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L840) +[src/types/composer.ts:862](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L862) ___ @@ -1128,7 +1129,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1260](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1260) +[src/types/composer.ts:1341](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1341) ___ @@ -1158,7 +1159,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1357) +[src/types/composer.ts:1455](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1455) ___ @@ -1177,7 +1178,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1302) +[src/types/composer.ts:1389](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1389) ___ @@ -1201,7 +1202,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) +[src/types/composer.ts:596](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L596) ___ @@ -1225,7 +1226,7 @@ The execution result #### Defined in -[src/types/composer.ts:1312](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1312) +[src/types/composer.ts:1399](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1399) ___ @@ -1243,7 +1244,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1365](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1365) +[src/types/composer.ts:1463](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1463) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1265,7 +1266,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1366) +[src/types/composer.ts:1464](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1464) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1288,7 +1289,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1369) +[src/types/composer.ts:1467](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1467) ___ @@ -1314,4 +1315,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1451](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1451) +[src/types/composer.ts:1549](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1549) diff --git a/docs/code/interfaces/types_app_client.AppClientParams.md b/docs/code/interfaces/types_app_client.AppClientParams.md index 48d93a33..077c518e 100644 --- a/docs/code/interfaces/types_app_client.AppClientParams.md +++ b/docs/code/interfaces/types_app_client.AppClientParams.md @@ -23,7 +23,7 @@ Parameters to create an app client ### algorand -• **algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> +• **algorand**: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) An `AlgorandClient` instance diff --git a/docs/code/interfaces/types_app_factory.AppFactoryParams.md b/docs/code/interfaces/types_app_factory.AppFactoryParams.md index efe1b4aa..80a75dbe 100644 --- a/docs/code/interfaces/types_app_factory.AppFactoryParams.md +++ b/docs/code/interfaces/types_app_factory.AppFactoryParams.md @@ -24,7 +24,7 @@ Parameters to create an app client ### algorand -• **algorand**: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> +• **algorand**: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) `AlgorandClient` instance diff --git a/docs/code/interfaces/types_client_manager.TypedAppClient.md b/docs/code/interfaces/types_client_manager.TypedAppClient.md index bbb123da..de421bc8 100644 --- a/docs/code/interfaces/types_client_manager.TypedAppClient.md +++ b/docs/code/interfaces/types_client_manager.TypedAppClient.md @@ -53,7 +53,7 @@ Interface to identify a typed client that can be used to interact with an applic | Name | Type | | :------ | :------ | -| `params` | `Omit`\<\{ `algorand`: [`InterfaceOf`](../modules/types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> ; `appLookupCache?`: [`AppLookup`](types_app_deployer.AppLookup.md) ; `appName?`: `string` ; `appSpec`: `string` \| [`Arc56Contract`](types_app_arc56.Arc56Contract.md) \| [`AppSpec`](types_app_spec.AppSpec.md) ; `approvalSourceMap?`: `ProgramSourceMap` ; `clearSourceMap?`: `ProgramSourceMap` ; `creatorAddress`: `string` \| `Address` ; `defaultSender?`: `string` \| `Address` ; `defaultSigner?`: `TransactionSigner` ; `ignoreCache?`: `boolean` }, ``"appSpec"``\> | +| `params` | `Omit`\<\{ `algorand`: [`AlgorandClientInterface`](../modules/types_algorand_client_interface.md#algorandclientinterface) ; `appLookupCache?`: [`AppLookup`](types_app_deployer.AppLookup.md) ; `appName?`: `string` ; `appSpec`: `string` \| [`Arc56Contract`](types_app_arc56.Arc56Contract.md) \| [`AppSpec`](types_app_spec.AppSpec.md) ; `approvalSourceMap?`: `ProgramSourceMap` ; `clearSourceMap?`: `ProgramSourceMap` ; `creatorAddress`: `string` \| `Address` ; `defaultSender?`: `string` \| `Address` ; `defaultSigner?`: `TransactionSigner` ; `ignoreCache?`: `boolean` }, ``"appSpec"``\> | #### Returns diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 489a7ba1..8931a491 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:522](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L522) +[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:524](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L524) +[src/types/composer.ts:538](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L538) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:520](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L520) +[src/types/composer.ts:534](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L534) diff --git a/docs/code/interfaces/types_testing.AlgoKitLogCaptureFixture.md b/docs/code/interfaces/types_testing.AlgoKitLogCaptureFixture.md index 2807d874..59c1303b 100644 --- a/docs/code/interfaces/types_testing.AlgoKitLogCaptureFixture.md +++ b/docs/code/interfaces/types_testing.AlgoKitLogCaptureFixture.md @@ -33,7 +33,7 @@ Testing framework agnostic handler method to run after each test to reset the lo #### Defined in -[src/types/testing.ts:113](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L113) +[src/types/testing.ts:158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L158) ___ @@ -53,7 +53,7 @@ Testing framework agnostic handler method to run before each test to prepare the #### Defined in -[src/types/testing.ts:109](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L109) +[src/types/testing.ts:154](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L154) ## Accessors @@ -69,4 +69,4 @@ The test logger instance for the current test #### Defined in -[src/types/testing.ts:105](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L105) +[src/types/testing.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L150) diff --git a/docs/code/interfaces/types_testing.AlgorandFixture.md b/docs/code/interfaces/types_testing.AlgorandFixture.md index 6ad5ee90..63f94401 100644 --- a/docs/code/interfaces/types_testing.AlgorandFixture.md +++ b/docs/code/interfaces/types_testing.AlgorandFixture.md @@ -11,6 +11,7 @@ An Algorand automated testing fixture ### Properties - [beforeEach](types_testing.AlgorandFixture.md#beforeeach) +- [newScope](types_testing.AlgorandFixture.md#newscope) ### Accessors @@ -23,7 +24,10 @@ An Algorand automated testing fixture • **beforeEach**: () => `Promise`\<`void`\> -Testing framework agnostic handler method to run before each test to prepare the `context` for that test. +**`Deprecated`** + +Use newScope instead. +Testing framework agnostic handler method to run before each test to prepare the `context` for that test with per test isolation. #### Type declaration @@ -35,7 +39,63 @@ Testing framework agnostic handler method to run before each test to prepare the #### Defined in -[src/types/testing.ts:87](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L87) +[src/types/testing.ts:90](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L90) + +___ + +### newScope + +• **newScope**: () => `Promise`\<`void`\> + +Creates a new isolated fixture scope (clean transaction logger, AlgorandClient, testAccount, etc.). + +You can call this from any testing framework specific hook method to control when you want a new scope. + +**`Example`** + +```typescript +describe('MY MODULE', () => { + const fixture = algorandFixture() + beforeEach(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + + test('MY TEST', async () => { + const { algorand, testAccount } = fixture.context + + // Test stuff! + }) +}) +``` + +**`Example`** + +```typescript +describe('MY MODULE', () => { + const fixture = algorandFixture() + beforeAll(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + + test('test1', async () => { + const { algorand, testAccount } = fixture.context + + // Test stuff! + }) + test('test2', async () => { + const { algorand, testAccount } = fixture.context + // algorand and testAccount are the same as in test1 + }) +}) +``` + +#### Type declaration + +▸ (): `Promise`\<`void`\> + +##### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/types/testing.ts:130](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L130) ## Accessors @@ -51,7 +111,7 @@ Retrieve an `AlgorandClient` loaded with the current context, including testAcco #### Defined in -[src/types/testing.ts:82](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L82) +[src/types/testing.ts:84](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L84) ___ @@ -62,6 +122,8 @@ ___ Retrieve the current context. Useful with destructuring. +If you haven't called `newScope` then this will throw an error. + #### Returns [`AlgorandTestAutomationContext`](types_testing.AlgorandTestAutomationContext.md) @@ -70,10 +132,10 @@ Useful with destructuring. ```typescript test('My test', () => { - const {algod, indexer, testAccount, ...} = algorand.context + const {algod, indexer, testAccount, ...} = fixture.context }) ``` #### Defined in -[src/types/testing.ts:77](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L77) +[src/types/testing.ts:79](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L79) diff --git a/docs/code/interfaces/types_testing.LogSnapshotConfig.md b/docs/code/interfaces/types_testing.LogSnapshotConfig.md index 5450914d..1b02fc57 100644 --- a/docs/code/interfaces/types_testing.LogSnapshotConfig.md +++ b/docs/code/interfaces/types_testing.LogSnapshotConfig.md @@ -14,6 +14,7 @@ This helps ensure that the provided configuration items won't appear - [accounts](types_testing.LogSnapshotConfig.md#accounts) - [apps](types_testing.LogSnapshotConfig.md#apps) +- [filterPredicate](types_testing.LogSnapshotConfig.md#filterpredicate) - [transactions](types_testing.LogSnapshotConfig.md#transactions) ## Properties @@ -26,7 +27,7 @@ Any accounts/addresses to replace the address for predictably #### Defined in -[src/types/testing.ts:98](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L98) +[src/types/testing.ts:141](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L141) ___ @@ -38,7 +39,33 @@ Any app IDs to replace predictably #### Defined in -[src/types/testing.ts:100](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L100) +[src/types/testing.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L143) + +___ + +### filterPredicate + +• `Optional` **filterPredicate**: (`log`: `string`) => `boolean` + +Optional filter predicate to filter out logs + +#### Type declaration + +▸ (`log`): `boolean` + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `log` | `string` | + +##### Returns + +`boolean` + +#### Defined in + +[src/types/testing.ts:145](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L145) ___ @@ -50,4 +77,4 @@ Any transaction IDs or transactions to replace the ID for predictably #### Defined in -[src/types/testing.ts:96](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L96) +[src/types/testing.ts:139](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/testing.ts#L139) diff --git a/docs/code/interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md b/docs/code/interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md new file mode 100644 index 00000000..d0f20124 --- /dev/null +++ b/docs/code/interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md @@ -0,0 +1,36 @@ +[@algorandfoundation/algokit-utils](../README.md) / [types/transaction](../modules/types_transaction.md) / AdditionalAtomicTransactionComposerContext + +# Interface: AdditionalAtomicTransactionComposerContext + +[types/transaction](../modules/types_transaction.md).AdditionalAtomicTransactionComposerContext + +Additional context about the `AtomicTransactionComposer`. + +## Table of contents + +### Properties + +- [maxFees](types_transaction.AdditionalAtomicTransactionComposerContext.md#maxfees) +- [suggestedParams](types_transaction.AdditionalAtomicTransactionComposerContext.md#suggestedparams) + +## Properties + +### maxFees + +• **maxFees**: `Map`\<`number`, [`AlgoAmount`](../classes/types_amount.AlgoAmount.md)\> + +A map of transaction index in the `AtomicTransactionComposer` to the max fee that can be calculated for a transaction in the group + +#### Defined in + +[src/types/transaction.ts:148](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L148) + +___ + +### suggestedParams + +• **suggestedParams**: `Pick`\<`SuggestedParams`, ``"fee"`` \| ``"minFee"``\> + +#### Defined in + +[src/types/transaction.ts:151](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L151) diff --git a/docs/code/interfaces/types_transaction.AtomicTransactionComposerToSend.md b/docs/code/interfaces/types_transaction.AtomicTransactionComposerToSend.md index 658b8946..85d472a8 100644 --- a/docs/code/interfaces/types_transaction.AtomicTransactionComposerToSend.md +++ b/docs/code/interfaces/types_transaction.AtomicTransactionComposerToSend.md @@ -16,7 +16,9 @@ An `AtomicTransactionComposer` with transactions to send. ### Properties +- [additionalAtcContext](types_transaction.AtomicTransactionComposerToSend.md#additionalatccontext) - [atc](types_transaction.AtomicTransactionComposerToSend.md#atc) +- [coverAppCallInnerTransactionFees](types_transaction.AtomicTransactionComposerToSend.md#coverappcallinnertransactionfees) - [maxRoundsToWaitForConfirmation](types_transaction.AtomicTransactionComposerToSend.md#maxroundstowaitforconfirmation) - [populateAppCallResources](types_transaction.AtomicTransactionComposerToSend.md#populateappcallresources) - [sendParams](types_transaction.AtomicTransactionComposerToSend.md#sendparams) @@ -24,6 +26,19 @@ An `AtomicTransactionComposer` with transactions to send. ## Properties +### additionalAtcContext + +• `Optional` **additionalAtcContext**: [`AdditionalAtomicTransactionComposerContext`](types_transaction.AdditionalAtomicTransactionComposerContext.md) + +Additional `AtomicTransactionComposer` context used when building the transaction group that is sent. +This additional context is used and must be supplied when coverAppCallInnerTransactionFees is set to true. + +#### Defined in + +[src/types/transaction.ts:167](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L167) + +___ + ### atc • **atc**: `AtomicTransactionComposer` @@ -32,7 +47,23 @@ The `AtomicTransactionComposer` with transactions loaded to send #### Defined in -[src/types/transaction.ts:146](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L146) +[src/types/transaction.ts:157](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L157) + +___ + +### coverAppCallInnerTransactionFees + +• `Optional` **coverAppCallInnerTransactionFees**: `boolean` + +Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee + +#### Inherited from + +[SendParams](types_transaction.SendParams.md).[coverAppCallInnerTransactionFees](types_transaction.SendParams.md#coverappcallinnertransactionfees) + +#### Defined in + +[src/types/transaction.ts:142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L142) ___ @@ -79,7 +110,7 @@ Any parameters to control the semantics of the send to the network #### Defined in -[src/types/transaction.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L150) +[src/types/transaction.ts:161](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L161) ___ diff --git a/docs/code/interfaces/types_transaction.SendParams.md b/docs/code/interfaces/types_transaction.SendParams.md index 8293432f..3ed53aec 100644 --- a/docs/code/interfaces/types_transaction.SendParams.md +++ b/docs/code/interfaces/types_transaction.SendParams.md @@ -16,12 +16,25 @@ Parameters to configure transaction sending. ### Properties +- [coverAppCallInnerTransactionFees](types_transaction.SendParams.md#coverappcallinnertransactionfees) - [maxRoundsToWaitForConfirmation](types_transaction.SendParams.md#maxroundstowaitforconfirmation) - [populateAppCallResources](types_transaction.SendParams.md#populateappcallresources) - [suppressLog](types_transaction.SendParams.md#suppresslog) ## Properties +### coverAppCallInnerTransactionFees + +• `Optional` **coverAppCallInnerTransactionFees**: `boolean` + +Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee + +#### Defined in + +[src/types/transaction.ts:142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/transaction.ts#L142) + +___ + ### maxRoundsToWaitForConfirmation • `Optional` **maxRoundsToWaitForConfirmation**: `number` diff --git a/docs/code/modules/index.md b/docs/code/modules/index.md index 275d4114..9f1c959f 100644 --- a/docs/code/modules/index.md +++ b/docs/code/modules/index.md @@ -119,6 +119,7 @@ - [performTemplateSubstitutionAndCompile](index.md#performtemplatesubstitutionandcompile) - [persistSourceMaps](index.md#persistsourcemaps) - [populateAppCallResources](index.md#populateappcallresources) +- [prepareGroupForSending](index.md#preparegroupforsending) - [randomAccount](index.md#randomaccount) - [rekeyAccount](index.md#rekeyaccount) - [rekeyedAccount](index.md#rekeyedaccount) @@ -303,7 +304,7 @@ ___ #### Defined in -[src/transaction/transaction.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L31) +[src/transaction/transaction.ts:33](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L33) ___ @@ -313,7 +314,7 @@ ___ #### Defined in -[src/transaction/transaction.ts:30](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L30) +[src/transaction/transaction.ts:32](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L32) ___ @@ -323,7 +324,7 @@ ___ #### Defined in -[src/transaction/transaction.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L29) +[src/transaction/transaction.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L31) ## Functions @@ -574,7 +575,7 @@ the estimated rate. #### Defined in -[src/transaction/transaction.ts:874](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L874) +[src/transaction/transaction.ts:1056](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1056) ___ @@ -638,7 +639,7 @@ Allows for control of fees on a `Transaction` or `SuggestedParams` object #### Defined in -[src/transaction/transaction.ts:901](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L901) +[src/transaction/transaction.ts:1083](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1083) ___ @@ -810,7 +811,7 @@ algokit.encodeLease(new Uint8Array([1, 2, 3])) #### Defined in -[src/transaction/transaction.ts:72](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L72) +[src/transaction/transaction.ts:74](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L74) ___ @@ -845,7 +846,7 @@ Encodes a transaction note into a byte array ready to be included in an Algorand #### Defined in -[src/transaction/transaction.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L48) +[src/transaction/transaction.ts:50](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L50) ___ @@ -965,7 +966,7 @@ Converts `bigint`'s for Uint's < 64 to `number` for easier use. #### Defined in -[src/transaction/transaction.ts:744](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L744) +[src/transaction/transaction.ts:926](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L926) ___ @@ -1941,7 +1942,7 @@ Returns the array of transactions currently present in the given `AtomicTransact #### Defined in -[src/transaction/transaction.ts:950](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L950) +[src/transaction/transaction.ts:1132](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1132) ___ @@ -2229,7 +2230,7 @@ Returns the public address of the given transaction sender. #### Defined in -[src/transaction/transaction.ts:108](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L108) +[src/transaction/transaction.ts:110](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L110) ___ @@ -2259,7 +2260,7 @@ This function has memoization, so will return the same transaction signer for a #### Defined in -[src/transaction/transaction.ts:166](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L166) +[src/transaction/transaction.ts:168](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L168) ___ @@ -2328,7 +2329,7 @@ Returns suggested transaction parameters from algod unless some are already prov #### Defined in -[src/transaction/transaction.ts:928](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L928) +[src/transaction/transaction.ts:1110](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1110) ___ @@ -2359,7 +2360,7 @@ AtomicTransactionComposer's addTransaction method. #### Defined in -[src/transaction/transaction.ts:125](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L125) +[src/transaction/transaction.ts:127](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L127) ___ @@ -2743,7 +2744,33 @@ ___ ▸ **populateAppCallResources**(`atc`, `algod`): `Promise`\<`AtomicTransactionComposer`\> Take an existing Atomic Transaction Composer and return a new one with the required - app call resources packed into it +app call resources populated into it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `atc` | `AtomicTransactionComposer` | The ATC containing the txn group | +| `algod` | `AlgodClient` | The algod client to use for the simulation | + +#### Returns + +`Promise`\<`AtomicTransactionComposer`\> + +A new ATC with the resources populated into the transactions + +#### Defined in + +[src/transaction/transaction.ts:383](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L383) + +___ + +### prepareGroupForSending + +▸ **prepareGroupForSending**(`atc`, `algod`, `sendParams`, `additionalAtcContext?`): `Promise`\<`AtomicTransactionComposer`\> + +Take an existing Atomic Transaction Composer and return a new one with changes applied to the transactions +based on the supplied sendParams to ensure the transaction group is ready for sending. #### Parameters @@ -2751,16 +2778,18 @@ Take an existing Atomic Transaction Composer and return a new one with the requi | :------ | :------ | :------ | | `atc` | `AtomicTransactionComposer` | The ATC containing the txn group | | `algod` | `AlgodClient` | The algod client to use for the simulation | +| `sendParams` | [`SendParams`](../interfaces/types_transaction.SendParams.md) | The send params for the transaction group | +| `additionalAtcContext?` | [`AdditionalAtomicTransactionComposerContext`](../interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md) | Additional ATC context used to determine how best to change the transactions in the group | #### Returns `Promise`\<`AtomicTransactionComposer`\> -A new ATC with the resources packed into the transactions +A new ATC with the changes applied #### Defined in -[src/transaction/transaction.ts:312](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L312) +[src/transaction/transaction.ts:401](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L401) ___ @@ -2910,7 +2939,7 @@ An object with transaction IDs, transactions, group transaction ID (`groupTransa #### Defined in -[src/transaction/transaction.ts:607](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L607) +[src/transaction/transaction.ts:776](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L776) ___ @@ -2939,7 +2968,7 @@ Signs and sends a group of [up to 16](https://developer.algorand.org/docs/get-de #### Defined in -[src/transaction/transaction.ts:773](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L773) +[src/transaction/transaction.ts:955](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L955) ___ @@ -2971,7 +3000,7 @@ Prepares a transaction for sending and then (if instructed) signs and sends the #### Defined in -[src/transaction/transaction.ts:207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L207) +[src/transaction/transaction.ts:209](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L209) ___ @@ -3002,7 +3031,7 @@ Signs a single transaction by the given signer. #### Defined in -[src/transaction/transaction.ts:184](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L184) +[src/transaction/transaction.ts:186](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L186) ___ @@ -3212,4 +3241,4 @@ Throws an error if the transaction is not confirmed or rejected in the next `tim #### Defined in -[src/transaction/transaction.ts:817](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L817) +[src/transaction/transaction.ts:999](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L999) diff --git a/docs/code/modules/testing.md b/docs/code/modules/testing.md index 38226b10..04738d4e 100644 --- a/docs/code/modules/testing.md +++ b/docs/code/modules/testing.md @@ -75,12 +75,12 @@ The fixture **`Example`** ```typescript -const algorand = algorandFixture() +const fixture = algorandFixture() -beforeEach(algorand.beforeEach, 10_000) +beforeEach(fixture.newScope, 10_000) test('My test', async () => { - const {algod, indexer, testAccount, ...} = algorand.context + const {algod, indexer, testAccount, ...} = fixture.context // test things... }) ``` @@ -88,22 +88,35 @@ test('My test', async () => { **`Example`** ```typescript -const algorand = algorandFixture({ +const fixture = algorandFixture() + +beforeAll(fixture.newScope, 10_000) + +test('My test', async () => { + const {algod, indexer, testAccount, ...} = fixture.context + // test things... +}) +``` + +**`Example`** + +```typescript +const fixture = algorandFixture({ algod: new Algodv2('localhost', 12345, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), // ... }) -beforeEach(algorand.beforeEach, 10_000) +beforeEach(fixture.newScope, 10_000) test('My test', async () => { - const {algod, indexer, testAccount, ...} = algorand.context + const {algod, indexer, testAccount, ...} = fixture.context // test things... }) ``` #### Defined in -[src/testing/fixtures/algorand-fixture.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/fixtures/algorand-fixture.ts#L48) +[src/testing/fixtures/algorand-fixture.ts:60](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/fixtures/algorand-fixture.ts#L60) ▸ **algorandFixture**(`fixtureConfig`, `config`): [`AlgorandFixture`](../interfaces/types_testing.AlgorandFixture.md) @@ -130,19 +143,6 @@ By default it tests against an environment variable specified client a default LocalNet instance, but you can pass in an algod, indexer and/or kmd if you want to test against an explicitly defined network. -**`Example`** - -```typescript -const algorand = algorandFixture(undefined, getConfigFromEnvOrDefaults()) - -beforeEach(algorand.beforeEach, 10_000) - -test('My test', async () => { - const {algod, indexer, testAccount, ...} = algorand.context - // test things... -}) -``` - #### Defined in [src/testing/fixtures/algorand-fixture.ts:75](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/fixtures/algorand-fixture.ts#L75) diff --git a/docs/code/modules/types_algorand_client_interface.md b/docs/code/modules/types_algorand_client_interface.md index 4453f285..086b2c94 100644 --- a/docs/code/modules/types_algorand_client_interface.md +++ b/docs/code/modules/types_algorand_client_interface.md @@ -12,10 +12,29 @@ ### AlgorandClientInterface -Ƭ **AlgorandClientInterface**: [`InterfaceOf`](types_instance_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\> +Ƭ **AlgorandClientInterface**: `OldAlgorandClientInterface` & `Partial`\<[`InterfaceOf`](types_interface_of.md#interfaceof)\<[`AlgorandClient`](../classes/types_algorand_client.AlgorandClient.md)\>\> -AlgorandClient interface used to eleminate circular dependencies +**`Deprecated`** + +Use `AlgorandClient` with `import type` instead since this interface +will get removed in the next major release + +This type is a solution to the problem raised in the PR below. +In summary, we needed to update the interface without making a breaking +change so this was the best option. This interface has some optional properties, +such as `account`, but unless you are using a custom implementation of AlgorandClient +(you probably aren't) you can be sure these will always be defined. + +**`Example`** + +```ts +algorand.account!.getInformation(addr); +``` + +**`See`** + +https://github.com/algorandfoundation/algokit-utils-ts/pull/365 #### Defined in -[src/types/algorand-client-interface.ts:5](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L5) +[src/types/algorand-client-interface.ts:53](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-interface.ts#L53) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 12d70b0e..e332de75 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -302,7 +302,7 @@ Common parameters for defining a transaction. | Name | Type | Description | | :------ | :------ | :------ | -| `extraFee?` | [`AlgoAmount`](../classes/types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. | +| `extraFee?` | [`AlgoAmount`](../classes/types_amount.AlgoAmount.md) | The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. | | `firstValidRound?` | `bigint` | Set the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future. | | `lastValidRound?` | `bigint` | The last round this transaction is valid. It is recommended to use `validityWindow` instead. | | `lease?` | `Uint8Array` \| `string` | Prevent multiple transactions with the same lease being included within the validity window. A [lease](https://developer.algorand.org/articles/leased-transactions-securing-advanced-smart-contract-design/) enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios). | diff --git a/docs/code/modules/types_interface_of.md b/docs/code/modules/types_interface_of.md new file mode 100644 index 00000000..534f9e98 --- /dev/null +++ b/docs/code/modules/types_interface_of.md @@ -0,0 +1,25 @@ +[@algorandfoundation/algokit-utils](../README.md) / types/interface-of + +# Module: types/interface-of + +## Table of contents + +### Type Aliases + +- [InterfaceOf](types_interface_of.md#interfaceof) + +## Type Aliases + +### InterfaceOf + +Ƭ **InterfaceOf**\<`ClassType`\>: \{ [Member in keyof ClassType]: ClassType[Member] } + +#### Type parameters + +| Name | +| :------ | +| `ClassType` | + +#### Defined in + +[src/types/interface-of.ts:1](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/interface-of.ts#L1) diff --git a/docs/code/modules/types_transaction.md b/docs/code/modules/types_transaction.md index f87cecb4..f10bdc91 100644 --- a/docs/code/modules/types_transaction.md +++ b/docs/code/modules/types_transaction.md @@ -6,6 +6,7 @@ ### Interfaces +- [AdditionalAtomicTransactionComposerContext](../interfaces/types_transaction.AdditionalAtomicTransactionComposerContext.md) - [AtomicTransactionComposerToSend](../interfaces/types_transaction.AtomicTransactionComposerToSend.md) - [ConfirmedTransactionResult](../interfaces/types_transaction.ConfirmedTransactionResult.md) - [ConfirmedTransactionResults](../interfaces/types_transaction.ConfirmedTransactionResults.md) diff --git a/src/app-deploy.spec.ts b/src/app-deploy.spec.ts index 4e72a171..fe636789 100644 --- a/src/app-deploy.spec.ts +++ b/src/app-deploy.spec.ts @@ -11,7 +11,7 @@ import { LogicError } from './types/logic-error' describe('deploy-app', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) const logging = algoKitLogCaptureFixture() beforeEach(logging.beforeEach) @@ -294,6 +294,7 @@ describe('deploy-app', () => { accounts: [testAccount], transactions: [result1.transaction, result2.transaction, result2.deleteResult.transaction], apps: [result1.appId, result2.appId], + filterPredicate: filterVerboseAndDebugLogs, }), ).toMatchSnapshot() }) @@ -331,6 +332,7 @@ describe('deploy-app', () => { accounts: [testAccount], transactions: [result1.transaction, logicError!.txId], apps: [result1.appId], + filterPredicate: filterVerboseAndDebugLogs, }), ).toMatchSnapshot() } @@ -374,6 +376,7 @@ describe('deploy-app', () => { accounts: [testAccount], transactions: [result1.transaction, result2.transaction, result2.deleteResult.transaction], apps: [result1.appId, result2.appId], + filterPredicate: filterVerboseAndDebugLogs, }), ).toMatchSnapshot() }) @@ -411,6 +414,7 @@ describe('deploy-app', () => { accounts: [testAccount], transactions: [result1.transaction, logicError!.txId], apps: [result1.appId], + filterPredicate: filterVerboseAndDebugLogs, }), ).toMatchSnapshot() } @@ -561,6 +565,8 @@ describe('deploy-app', () => { }), ).toMatchSnapshot() }) + + const filterVerboseAndDebugLogs = (log: string) => !log.startsWith('VERBOSE:') && !log.startsWith('DEBUG:') }) test('Strip comments remove comments without removing commands', async () => { diff --git a/src/app.spec.ts b/src/app.spec.ts index 6eff3be8..b56f4992 100644 --- a/src/app.spec.ts +++ b/src/app.spec.ts @@ -5,7 +5,7 @@ import { algoKitLogCaptureFixture, algorandFixture } from './testing' describe('app', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) const logging = algoKitLogCaptureFixture() beforeEach(logging.beforeEach) diff --git a/src/indexer-lookup.spec.ts b/src/indexer-lookup.spec.ts index 03c65de9..19479e24 100644 --- a/src/indexer-lookup.spec.ts +++ b/src/indexer-lookup.spec.ts @@ -7,7 +7,7 @@ import { AlgoAmount } from './types/amount' describe('indexer-lookup', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) const sendTestTransaction = async (amount?: AlgoAmount, from?: Address) => { return await localnet.context.algorand.send.payment({ diff --git a/src/testing/fixtures/algorand-fixture.ts b/src/testing/fixtures/algorand-fixture.ts index b57bacba..8149d832 100644 --- a/src/testing/fixtures/algorand-fixture.ts +++ b/src/testing/fixtures/algorand-fixture.ts @@ -15,29 +15,41 @@ import { TransactionLogger } from '../transaction-logger' * and/or kmd (or their respective config) if you want to test against * an explicitly defined network. * - * @example No config + * @example No config (per-test isolation) * ```typescript - * const algorand = algorandFixture() + * const fixture = algorandFixture() * - * beforeEach(algorand.beforeEach, 10_000) + * beforeEach(fixture.newScope, 10_000) * * test('My test', async () => { - * const {algod, indexer, testAccount, ...} = algorand.context + * const {algod, indexer, testAccount, ...} = fixture.context + * // test things... + * }) + * ``` + * + * @example No config (test suite isolation) + * ```typescript + * const fixture = algorandFixture() + * + * beforeAll(fixture.newScope, 10_000) + * + * test('My test', async () => { + * const {algod, indexer, testAccount, ...} = fixture.context * // test things... * }) * ``` * * @example With config * ```typescript - * const algorand = algorandFixture({ + * const fixture = algorandFixture({ * algod: new Algodv2('localhost', 12345, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), * // ... * }) * - * beforeEach(algorand.beforeEach, 10_000) + * beforeEach(fixture.newScope, 10_000) * * test('My test', async () => { - * const {algod, indexer, testAccount, ...} = algorand.context + * const {algod, indexer, testAccount, ...} = fixture.context * // test things... * }) * ``` @@ -56,18 +68,6 @@ export function algorandFixture(fixtureConfig?: AlgorandFixtureConfig): Algorand * a default LocalNet instance, but you can pass in an algod, indexer * and/or kmd if you want to test against an explicitly defined network. * - * @example - * ```typescript - * const algorand = algorandFixture(undefined, getConfigFromEnvOrDefaults()) - * - * beforeEach(algorand.beforeEach, 10_000) - * - * test('My test', async () => { - * const {algod, indexer, testAccount, ...} = algorand.context - * // test things... - * }) - * ``` - * * @param fixtureConfig The fixture configuration * @param config The fixture configuration * @returns The fixture @@ -86,19 +86,21 @@ export function algorandFixture(fixtureConfig?: AlgorandFixtureConfig, config?: let context: AlgorandTestAutomationContext let algorand: AlgorandClient - const beforeEach = async () => { + const newScope = async () => { Config.configure({ debug: true }) const transactionLogger = new TransactionLogger() const transactionLoggerAlgod = transactionLogger.capture(algod) - algorand = AlgorandClient.fromClients({ algod: transactionLoggerAlgod, indexer, kmd }) + + algorand = AlgorandClient.fromClients({ algod: transactionLoggerAlgod, indexer, kmd }).setSuggestedParamsCacheTimeout(0) + const testAccount = await getTestAccount({ initialFunds: fixtureConfig?.testAccountFunding ?? algos(10), suppressLog: true }, algorand) - algorand.setSignerFromAccount(testAccount).setSuggestedParamsCacheTimeout(0) + algorand.setSignerFromAccount(testAccount) + // If running against LocalNet we are likely in dev mode and we need to set a much higher validity window // otherwise we are more likely to get invalid transactions. if (await algorand.client.isLocalNet()) { algorand.setDefaultValidityWindow(1000) } - algorand.account.setSignerFromAccount(testAccount) context = { algorand, algod: transactionLoggerAlgod, @@ -118,11 +120,13 @@ export function algorandFixture(fixtureConfig?: AlgorandFixtureConfig, config?: return { get context() { + if (!context) throw new Error('Context not initialised; make sure to call fixture.newScope() before accessing context.') return context }, get algorand() { return algorand }, - beforeEach, + beforeEach: newScope, + newScope, } } diff --git a/src/testing/test-logger.ts b/src/testing/test-logger.ts index d7da6e01..9ec5578b 100644 --- a/src/testing/test-logger.ts +++ b/src/testing/test-logger.ts @@ -46,7 +46,7 @@ export class TestLogger implements Logger { */ getLogSnapshot(config?: LogSnapshotConfig) { const { transactions: transactionIds, accounts, apps } = config ?? {} - let snapshot = this.capturedLogs.join('\n') + let snapshot = this.capturedLogs.filter(config?.filterPredicate ?? (() => true)).join('\n') transactionIds?.forEach( (txn, id) => (snapshot = snapshot.replace(new RegExp(typeof txn === 'string' ? txn : txn.txID(), 'g'), `TXID_${id + 1}`)), ) diff --git a/src/testing/transaction-logger.ts b/src/testing/transaction-logger.ts index 2011b65d..9dade7e7 100644 --- a/src/testing/transaction-logger.ts +++ b/src/testing/transaction-logger.ts @@ -51,7 +51,9 @@ export class TransactionLogger { /** Wait until all logged transactions IDs appear in the given `Indexer`. */ async waitForIndexer(indexer: Indexer) { - await Promise.all(this._sentTransactionIds.map((txnId) => runWhenIndexerCaughtUp(() => indexer.lookupTransactionByID(txnId).do()))) + if (this._sentTransactionIds.length === 0) return + const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1] + await runWhenIndexerCaughtUp(() => indexer.lookupTransactionByID(lastTxId).do()) } } diff --git a/src/transaction/transaction.spec.ts b/src/transaction/transaction.spec.ts index d1aeb1af..8c1721ca 100644 --- a/src/transaction/transaction.spec.ts +++ b/src/transaction/transaction.spec.ts @@ -1,9 +1,12 @@ import algosdk, { ABIMethod, ABIType, Account, Address } from 'algosdk' import invariant from 'tiny-invariant' import { afterAll, beforeAll, beforeEach, describe, expect, test } from 'vitest' +import { APP_SPEC as nestedContractAppSpec } from '../../tests/example-contracts/client/TestContractClient' +import innerFeeContract from '../../tests/example-contracts/inner-fee/application.json' import externalARC32 from '../../tests/example-contracts/resource-packer/artifacts/ExternalApp.arc32.json' import v8ARC32 from '../../tests/example-contracts/resource-packer/artifacts/ResourcePackerv8.arc32.json' import v9ARC32 from '../../tests/example-contracts/resource-packer/artifacts/ResourcePackerv9.arc32.json' +import { algo, microAlgo } from '../amount' import { Config } from '../config' import { algorandFixture } from '../testing' import { AlgoAmount } from '../types/amount' @@ -14,7 +17,7 @@ import { getABIReturnValue, waitForConfirmation } from './transaction' describe('transaction', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) const getTestTransaction = (amount?: AlgoAmount, sender?: string) => { return { @@ -150,6 +153,514 @@ describe('transaction', () => { expect(e.traces[0].message).toMatch(messageRegex) } }) + + describe('Cover app call inner transaction fees', async () => { + let appClient1: AppClient + let appClient2: AppClient + let appClient3: AppClient + + beforeEach(async () => { + const { algorand, testAccount } = localnet.context + Config.configure({ populateAppCallResources: true }) + + const appFactory = algorand.client.getAppFactory({ + appSpec: JSON.stringify(innerFeeContract), + defaultSender: testAccount, + }) + + appClient1 = (await appFactory.send.bare.create({ note: 'app1' })).appClient + appClient2 = (await appFactory.send.bare.create({ note: 'app2' })).appClient + appClient3 = (await appFactory.send.bare.create({ note: 'app3' })).appClient + + await appClient1.fundAppAccount({ amount: algo(2) }) + await appClient2.fundAppAccount({ amount: algo(2) }) + await appClient3.fundAppAccount({ amount: algo(2) }) + }) + + test('throws when no max fee is supplied', async () => { + const params = { + method: 'no_op', + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + await expect(async () => await appClient1.send.call(params)).rejects.toThrow( + 'Please provide a maxFee for each app call transaction when coverAppCallInnerTransactionFees is enabled. Required for transaction 0', + ) + }) + + test('throws when inner transaction fees are not covered and coverAppCallInnerTransactionFees is disabled', async () => { + const expectedFee = 7000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: false, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + await expect(async () => await appClient1.send.call(params)).rejects.toThrow(/fee too small/) + }) + + test('does not alter fee when app call has no inners', async () => { + const expectedFee = 1000n + const params = { + method: 'no_op', + coverAppCallInnerTransactionFees: true, + maxFee: microAlgo(2000), + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('throws when max fee is too small to cover inner transaction fees', async () => { + const expectedFee = 7000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(expectedFee - 1n), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + await expect(async () => await appClient1.send.call(params)).rejects.toThrow( + 'Fees were too small to resolve execution info via simulate. You may need to increase an app call transaction maxFee.', + ) + }) + + test('throws when static fee is too small to cover inner transaction fees', async () => { + const expectedFee = 7000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + staticFee: microAlgo(expectedFee - 1n), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + await expect(async () => await appClient1.send.call(params)).rejects.toThrow( + 'Fees were too small to resolve execution info via simulate. You may need to increase an app call transaction maxFee.', + ) + }) + + test('alters fee, handling when no inner fees have been covered', async () => { + const expectedFee = 7000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling when all inner fees have been covered', async () => { + const expectedFee = 1000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [1000n, 1000n, 1000n, 1000n, [1000n, 1000n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling when some inner fees have been covered or partially covered', async () => { + const expectedFee = 5300n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [1000n, 0n, 200n, 0n, [500n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling when some inner fees have a surplus', async () => { + const expectedFee = 2000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 1000n, 5000n, 0n, [0n, 50n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling multiple app calls in a group that send inners with varying fees', async () => { + const txn1ExpectedFee = 5800n + const txn2ExpectedFee = 6000n + + const txn1Params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 1000n, 0n, 0n, [200n, 0n]]], + staticFee: microAlgo(txn1ExpectedFee), + note: 'txn1', + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + const txn2Params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [1000n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(txn2ExpectedFee), + note: 'txn2', + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + + const result = await appClient1.algorand + .newGroup() + .addAppCallMethodCall(await appClient1.params.call(txn1Params)) + .addAppCallMethodCall(await appClient1.params.call(txn2Params)) + .send({ + coverAppCallInnerTransactionFees: true, + }) + + expect(result.transactions[0].fee).toBe(txn1ExpectedFee) + await assertMinFee(appClient1, txn1Params, txn1ExpectedFee) + expect(result.transactions[1].fee).toBe(txn2ExpectedFee) + await assertMinFee(appClient1, txn2Params, txn2ExpectedFee) + }) + + test('does not alter a static fee with surplus', async () => { + const expectedFee = 6000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [1000n, 0n, 200n, 0n, [500n, 0n]]], + staticFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + }) + + test('alters fee, handling a large inner fee surplus pooling to lower siblings', async () => { + // Inner transaction fees only pool to lower sibling transactions + const expectedFee = 7_000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n, 20_000n, 0n, 0n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling a inner fee surplus pooling to some lower siblings', async () => { + // Inner transaction fees only pool to lower sibling transactions + const expectedFee = 6300n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 2200n, 0n, [0n, 0n, 2500n, 0n, 0n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling a large inner fee surplus with no pooling', async () => { + // Inner transaction fees only pool to lower sibling transactions + const expectedFee = 10_000n + const params = { + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n, 0n, 0n, 0n, 20_000n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('alters fee, handling multiple inner fee surplus poolings to lower siblings', async () => { + // Inner transaction fees only pool to lower sibling transactions + const expectedFee = 7100n + const params = { + method: 'send_inners_with_fees_2', + args: [appClient2.appId, appClient3.appId, [0n, 1200n, [0n, 0n, 4900n, 0n, 0n, 0n], 200n, 1100n, [0n, 0n, 2500n, 0n, 0n, 0n]]], + maxFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + await assertMinFee(appClient1, params, expectedFee) + }) + + test('does not alter fee when another transaction in the group covers the inner fees', async () => { + const { testAccount } = localnet.context + const expectedFee = 8000n + + const result = await appClient1.algorand + .newGroup() + .addPayment({ + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + staticFee: microAlgo(expectedFee), + }) + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(expectedFee), + }), + ) + .send({ + coverAppCallInnerTransactionFees: true, + }) + + expect(result.transactions[0].fee).toBe(expectedFee) + // We could technically reduce the below to 0, however it adds more complexity and is probably unlikely to be a common use case + expect(result.transactions[1].fee).toBe(1000n) + }) + + test('alters fee, allocating surplus fees to the most fee constrained transaction first', async () => { + const { testAccount } = localnet.context + const result = await appClient1.algorand + .newGroup() + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(2000n), + }), + ) + .addPayment({ + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + staticFee: microAlgo(7500), + }) + .addPayment({ + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + staticFee: microAlgo(0), + }) + .send({ + coverAppCallInnerTransactionFees: true, + }) + + expect(result.transactions[0].fee).toBe(1500n) + expect(result.transactions[1].fee).toBe(7500n) + expect(result.transactions[2].fee).toBe(0n) + }) + + test('alters fee, handling nested abi method calls', async () => { + const { algorand, testAccount } = localnet.context + + const appFactory = algorand.client.getAppFactory({ + appSpec: nestedContractAppSpec, + defaultSender: testAccount.addr, + }) + + const { appClient } = await appFactory.send.create({ + method: 'createApplication', + }) + + const txnArgCall = await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 2000n, 0n, [0n, 0n]]], + maxFee: microAlgo(4000), + }) + + const paymentParams = { + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + staticFee: microAlgo(1500), + } satisfies PaymentParams + + const expectedFee = 2000n + const params = { + method: 'nestedTxnArg', + args: [algorand.createTransaction.payment(paymentParams), txnArgCall], + staticFee: microAlgo(expectedFee), + coverAppCallInnerTransactionFees: true, + } + const result = await appClient.send.call(params) + + expect(result.transactions.length).toBe(3) + expect(result.transactions[0].fee).toBe(1500n) + expect(result.transactions[1].fee).toBe(3500n) + expect(result.transactions[2].fee).toBe(expectedFee) + await assertMinFee( + appClient, + { + ...params, + args: [algorand.createTransaction.payment(paymentParams), txnArgCall], + }, + expectedFee, + ) + }) + + test('throws when maxFee is below the calculated fee', async () => { + await expect( + async () => + await appClient1.algorand + .newGroup() + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + maxFee: microAlgo(1200), + }), + ) + // This transactions allow this state to be possible, without it the simulate call to get the execution info would fail + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'no_op', + maxFee: microAlgo(10_000), + }), + ) + .send({ + coverAppCallInnerTransactionFees: true, + }), + ).rejects.toThrow('Calculated transaction fee 7000 µALGO is greater than max of 1200 for transaction 0') + }) + + test('throws when nested maxFee is below the calculated fee', async () => { + const { algorand, testAccount } = localnet.context + + const appFactory = algorand.client.getAppFactory({ + appSpec: nestedContractAppSpec, + defaultSender: testAccount.addr, + }) + + const { appClient } = await appFactory.send.create({ + method: 'createApplication', + }) + + const txnArgCall = await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 2000n, 0n, [0n, 0n]]], + maxFee: microAlgo(2000), + }) + + await expect( + async () => + await appClient.send.call({ + method: 'nestedTxnArg', + args: [ + algorand.createTransaction.payment({ + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + }), + txnArgCall, + ], + coverAppCallInnerTransactionFees: true, + maxFee: microAlgo(10_000), + }), + ).rejects.toThrow('Calculated transaction fee 5000 µALGO is greater than max of 2000 for transaction 1') + }) + + test('throws when staticFee is below the calculated fee', async () => { + await expect( + async () => + await appClient1.algorand + .newGroup() + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + staticFee: microAlgo(5000), + }), + ) + // This transactions allow this state to be possible, without it the simulate call to get the execution info would fail + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'no_op', + maxFee: microAlgo(10_000), + }), + ) + .send({ + coverAppCallInnerTransactionFees: true, + }), + ).rejects.toThrow('Calculated transaction fee 7000 µALGO is greater than max of 5000 for transaction 0') + }) + + test('throws when staticFee for non app call transaction is too low', async () => { + const { testAccount } = localnet.context + await expect( + async () => + await appClient1.algorand + .newGroup() + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + staticFee: microAlgo(13_000n), + maxFee: microAlgo(14_000n), + }), + ) + .addAppCallMethodCall( + await appClient1.params.call({ + method: 'send_inners_with_fees', + args: [appClient2.appId, appClient3.appId, [0n, 0n, 0n, 0n, [0n, 0n]]], + staticFee: microAlgo(1000n), + }), + ) + .addPayment({ + sender: testAccount.addr, + receiver: testAccount.addr, + amount: microAlgo(0), + staticFee: microAlgo(500), + }) + .send({ + coverAppCallInnerTransactionFees: true, + }), + ).rejects.toThrow('An additional fee of 500 µALGO is required for non app call transaction 2') + }) + + test('alters fee, handling expensive abi method calls that use ensure_budget to op-up', async () => { + const expectedFee = 10_000n + const params = { + method: 'burn_ops', + args: [6200], + coverAppCallInnerTransactionFees: true, + maxFee: microAlgo(12_000), + } satisfies Parameters<(typeof appClient1)['send']['call']>[0] + const result = await appClient1.send.call(params) + + expect(result.transaction.fee).toBe(expectedFee) + expect(result.confirmation.innerTxns?.length).toBe(9) // Op up transactions sent by ensure_budget + await assertMinFee(appClient1, params, expectedFee) + }) + + const assertMinFee = async (appClient: AppClient, args: Parameters<(typeof appClient)['send']['call']>[0], fee: bigint) => { + if (fee === 1000n) { + return + } + + await expect( + async () => + await appClient.send.call({ + ...args, + coverAppCallInnerTransactionFees: false, + staticFee: microAlgo(fee - 1n), + extraFee: undefined, + suppressLog: true, + }), + ).rejects.toThrowError(/fee too small/) + } + }) }) describe('arc2 transaction note', () => { @@ -173,17 +684,17 @@ describe('arc2 transaction note', () => { }) }) -const tests = (version: 8 | 9) => () => { +const resourcePopulationTests = (version: 8 | 9) => () => { const fixture = algorandFixture() let appClient: AppClient let externalClient: AppClient - beforeEach(fixture.beforeEach) + beforeEach(fixture.newScope) beforeAll(async () => { Config.configure({ populateAppCallResources: true }) - await fixture.beforeEach() + await fixture.newScope() const { algorand, testAccount } = fixture.context const appFactory = algorand.client.getAppFactory({ @@ -332,20 +843,20 @@ const tests = (version: 8 | 9) => () => { }) } -describe('Resource Packer: AVM8', tests(8)) -describe('Resource Packer: AVM9', tests(9)) -describe('Resource Packer: Mixed', () => { +describe('Resource population: AVM8', resourcePopulationTests(8)) +describe('Resource population: AVM9', resourcePopulationTests(9)) +describe('Resource population: Mixed', () => { const fixture = algorandFixture() let v9Client: AppClient let v8Client: AppClient - beforeEach(fixture.beforeEach) + beforeEach(fixture.newScope) beforeAll(async () => { Config.configure({ populateAppCallResources: true }) - await fixture.beforeEach() + await fixture.newScope() const testAccount = fixture.context.testAccount @@ -415,15 +926,15 @@ describe('Resource Packer: Mixed', () => { }) }) -describe('Resource Packer: meta', () => { +describe('Resource population: meta', () => { const fixture = algorandFixture() let externalClient: AppClient - beforeEach(fixture.beforeEach) + beforeEach(fixture.newScope) beforeAll(async () => { - await fixture.beforeEach() + await fixture.newScope() const { algorand, testAccount } = fixture.context Config.configure({ populateAppCallResources: true }) @@ -446,7 +957,7 @@ describe('Resource Packer: meta', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { expect(e.stack).toMatch(`err <--- Error`) - expect(e.message).toMatch('Error during resource population simulation in transaction 0') + expect(e.message).toMatch('Error resolving execution info via simulate in transaction 0') } }) diff --git a/src/transaction/transaction.ts b/src/transaction/transaction.ts index df568c8a..cece5d5d 100644 --- a/src/transaction/transaction.ts +++ b/src/transaction/transaction.ts @@ -5,8 +5,10 @@ import { AlgoAmount } from '../types/amount' import { ABIReturn } from '../types/app' import { EventType } from '../types/lifecycle-events' import { + AdditionalAtomicTransactionComposerContext, AtomicTransactionComposerToSend, SendAtomicTransactionComposerResults, + SendParams, SendTransactionFrom, SendTransactionParams, SendTransactionResult, @@ -228,15 +230,15 @@ export const sendTransaction = async function ( let txnToSend = transaction - const populateResources = sendParams?.populateAppCallResources ?? Config.populateAppCallResources + const populateAppCallResources = sendParams?.populateAppCallResources ?? Config.populateAppCallResources - // Populate resources if the transaction is an appcall and populateAppCallResources wasn't explicitly set to false + // Populate resources if the transaction is an appcall and populateAppCallResources wasn't explicitly set to false // NOTE: Temporary false by default until this algod bug is fixed: https://github.com/algorand/go-algorand/issues/5914 - if (txnToSend.type === algosdk.TransactionType.appl && populateResources) { + if (txnToSend.type === algosdk.TransactionType.appl && populateAppCallResources) { const newAtc = new AtomicTransactionComposer() newAtc.addTransaction({ txn: txnToSend, signer: getSenderTransactionSigner(from) }) - const packed = await populateAppCallResources(newAtc, algod) - txnToSend = packed.buildGroup()[0].txn + const atc = await prepareGroupForSending(newAtc, algod, { ...sendParams, populateAppCallResources }) + txnToSend = atc.buildGroup()[0].txn } const signedTransaction = await signTransaction(txnToSend, from) @@ -254,13 +256,24 @@ export const sendTransaction = async function ( } /** - * Get all of the unamed resources used by the group in the given ATC + * Get the execution info of a transaction group for the given ATC + * The function uses the simulate endpoint and depending on the sendParams can return the following: + * - The unnamed resources accessed by the group + * - The unnamed resources accessed by each transaction in the group + * - The required fee delta for each transaction in the group. A positive value indicates a fee deficit, a negative value indicates a surplus. * - * @param algod The algod client to use for the simulation * @param atc The ATC containing the txn group - * @returns The unnamed resources accessed by the group and by each transaction in the group + * @param algod The algod client to use for the simulation + * @param sendParams The send params for the transaction group + * @param additionalAtcContext Additional ATC context used to determine how best to alter transactions in the group + * @returns The execution info for the group */ -async function getUnnamedAppCallResourcesAccessed(atc: algosdk.AtomicTransactionComposer, algod: algosdk.Algodv2) { +async function getGroupExecutionInfo( + atc: algosdk.AtomicTransactionComposer, + algod: algosdk.Algodv2, + sendParams: SendParams, + additionalAtcContext?: AdditionalAtomicTransactionComposerContext, +) { const simulateRequest = new algosdk.modelsv2.SimulateRequest({ txnGroups: [], allowUnnamedResources: true, @@ -271,34 +284,92 @@ async function getUnnamedAppCallResourcesAccessed(atc: algosdk.AtomicTransaction const nullSigner = algosdk.makeEmptyTransactionSigner() const emptySignerAtc = atc.clone() - emptySignerAtc['transactions'].forEach((t: algosdk.TransactionWithSigner) => { + + const appCallIndexesWithoutMaxFees: number[] = [] + emptySignerAtc['transactions'].forEach((t: algosdk.TransactionWithSigner, i: number) => { t.signer = nullSigner + + if (sendParams.coverAppCallInnerTransactionFees && t.txn.type === TransactionType.appl) { + if (!additionalAtcContext?.suggestedParams) { + throw Error(`Please provide additionalAtcContext.suggestedParams when coverAppCallInnerTransactionFees is enabled`) + } + + const maxFee = additionalAtcContext?.maxFees?.get(i)?.microAlgo + if (maxFee === undefined) { + appCallIndexesWithoutMaxFees.push(i) + } else { + t.txn.fee = maxFee + } + } }) + if (sendParams.coverAppCallInnerTransactionFees && appCallIndexesWithoutMaxFees.length > 0) { + throw Error( + `Please provide a maxFee for each app call transaction when coverAppCallInnerTransactionFees is enabled. Required for transaction ${appCallIndexesWithoutMaxFees.join(', ')}`, + ) + } + + const perByteTxnFee = BigInt(additionalAtcContext?.suggestedParams.fee ?? 0n) + const minTxnFee = BigInt(additionalAtcContext?.suggestedParams.minFee ?? 1000n) + const result = await emptySignerAtc.simulate(algod, simulateRequest) const groupResponse = result.simulateResponse.txnGroups[0] if (groupResponse.failureMessage) { - throw Error(`Error during resource population simulation in transaction ${groupResponse.failedAt}: ${groupResponse.failureMessage}`) + if (sendParams.coverAppCallInnerTransactionFees && groupResponse.failureMessage.match(/fee too small/)) { + throw Error(`Fees were too small to resolve execution info via simulate. You may need to increase an app call transaction maxFee.`) + } + + throw Error(`Error resolving execution info via simulate in transaction ${groupResponse.failedAt}: ${groupResponse.failureMessage}`) } return { - group: groupResponse.unnamedResourcesAccessed, - txns: groupResponse.txnResults.map( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (t: any) => t.unnamedResourcesAccessed, - ) as algosdk.modelsv2.SimulateUnnamedResourcesAccessed[], + groupUnnamedResourcesAccessed: sendParams.populateAppCallResources ? groupResponse.unnamedResourcesAccessed : undefined, + txns: groupResponse.txnResults.map((txn, i) => { + const originalTxn = atc['transactions'][i].txn as algosdk.Transaction + + let requiredFeeDelta = 0n + if (sendParams.coverAppCallInnerTransactionFees) { + // Min fee calc is lifted from algosdk https://github.com/algorand/js-algorand-sdk/blob/6973ff583b243ddb0632e91f4c0383021430a789/src/transaction.ts#L710 + // 75 is the number of bytes added to a txn after signing it + const parentPerByteFee = perByteTxnFee * BigInt(originalTxn.toByte().length + 75) + const parentMinFee = parentPerByteFee < minTxnFee ? minTxnFee : parentPerByteFee + const parentFeeDelta = parentMinFee - originalTxn.fee + if (originalTxn.type === TransactionType.appl) { + const calculateInnerFeeDelta = (itxns: algosdk.modelsv2.PendingTransactionResponse[], acc: bigint = 0n): bigint => { + // Surplus inner transaction fees do not pool up to the parent transaction. + // Additionally surplus inner transaction fees only pool from sibling transactions that are sent prior to a given inner transaction, hence why we iterate in reverse order. + return itxns.reverse().reduce((acc, itxn) => { + const currentFeeDelta = + (itxn.innerTxns && itxn.innerTxns.length > 0 ? calculateInnerFeeDelta(itxn.innerTxns, acc) : acc) + + (minTxnFee - itxn.txn.txn.fee) // Inner transactions don't require per byte fees + return currentFeeDelta < 0n ? 0n : currentFeeDelta + }, acc) + } + + const innerFeeDelta = calculateInnerFeeDelta(txn.txnResult.innerTxns ?? []) + requiredFeeDelta = innerFeeDelta + parentFeeDelta + } else { + requiredFeeDelta = parentFeeDelta + } + } + + return { + unnamedResourcesAccessed: sendParams.populateAppCallResources ? txn.unnamedResourcesAccessed : undefined, + requiredFeeDelta, + } + }), } } /** * Take an existing Atomic Transaction Composer and return a new one with the required - * app call resources packed into it + * app call resources populated into it * * @param algod The algod client to use for the simulation * @param atc The ATC containing the txn group - * @returns A new ATC with the resources packed into the transactions + * @returns A new ATC with the resources populated into the transactions * * @privateRemarks * @@ -310,279 +381,377 @@ async function getUnnamedAppCallResourcesAccessed(atc: algosdk.AtomicTransaction * */ export async function populateAppCallResources(atc: algosdk.AtomicTransactionComposer, algod: algosdk.Algodv2) { - const unnamedResourcesAccessed = await getUnnamedAppCallResourcesAccessed(atc, algod) + return await prepareGroupForSending(atc, algod, { populateAppCallResources: true }) +} + +/** + * Take an existing Atomic Transaction Composer and return a new one with changes applied to the transactions + * based on the supplied sendParams to ensure the transaction group is ready for sending. + * + * @param algod The algod client to use for the simulation + * @param atc The ATC containing the txn group + * @param sendParams The send params for the transaction group + * @param additionalAtcContext Additional ATC context used to determine how best to change the transactions in the group + * @returns A new ATC with the changes applied + * + * @privateRemarks + * Parts of this function will eventually be implemented in algod. Namely: + * - Simulate will return information on how to populate reference arrays, see https://github.com/algorand/go-algorand/pull/6015 + */ +export async function prepareGroupForSending( + atc: algosdk.AtomicTransactionComposer, + algod: algosdk.Algodv2, + sendParams: SendParams, + additionalAtcContext?: AdditionalAtomicTransactionComposerContext, +) { + const executionInfo = await getGroupExecutionInfo(atc, algod, sendParams, additionalAtcContext) const group = atc.buildGroup() - unnamedResourcesAccessed.txns.forEach((r, i) => { - if (r === undefined || group[i].txn.type !== TransactionType.appl) return - - if (r.boxes || r.extraBoxRefs) throw Error('Unexpected boxes at the transaction level') - if (r.appLocals) throw Error('Unexpected app local at the transaction level') - if (r.assetHoldings) - throw Error('Unexpected asset holding at the transaction level') - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(group[i].txn as any)['applicationCall'] = { - ...group[i].txn.applicationCall, - accounts: [...(group[i].txn?.applicationCall?.accounts ?? []), ...(r.accounts ?? [])], - foreignApps: [...(group[i].txn?.applicationCall?.foreignApps ?? []), ...(r.apps ?? [])], - foreignAssets: [...(group[i].txn?.applicationCall?.foreignAssets ?? []), ...(r.assets ?? [])], - boxes: [...(group[i].txn?.applicationCall?.boxes ?? []), ...(r.boxes ?? [])], - } satisfies Partial - - const accounts = group[i].txn.applicationCall?.accounts?.length ?? 0 - if (accounts > MAX_APP_CALL_ACCOUNT_REFERENCES) - throw Error(`Account reference limit of ${MAX_APP_CALL_ACCOUNT_REFERENCES} exceeded in transaction ${i}`) - const assets = group[i].txn.applicationCall?.foreignAssets?.length ?? 0 - const apps = group[i].txn.applicationCall?.foreignApps?.length ?? 0 - const boxes = group[i].txn.applicationCall?.boxes?.length ?? 0 - if (accounts + assets + apps + boxes > MAX_APP_CALL_FOREIGN_REFERENCES) { - throw Error(`Resource reference limit of ${MAX_APP_CALL_FOREIGN_REFERENCES} exceeded in transaction ${i}`) + const [_, additionalTransactionFees] = sendParams.coverAppCallInnerTransactionFees + ? executionInfo.txns + .map((txn, i) => { + const groupIndex = i + const txnInGroup = group[groupIndex].txn + const maxFee = additionalAtcContext?.maxFees?.get(i)?.microAlgo + const immutableFee = maxFee !== undefined && maxFee === txnInGroup.fee + // Because we don't alter non app call transaction, they take priority + const priorityMultiplier = + txn.requiredFeeDelta > 0n && (immutableFee || txnInGroup.type !== algosdk.TransactionType.appl) ? 1_000n : 1n + + return { + ...txn, + groupIndex, + // Measures the priority level of covering the transaction fee using the surplus group fees. The higher the number, the higher the priority. + surplusFeePriorityLevel: txn.requiredFeeDelta > 0n ? txn.requiredFeeDelta * priorityMultiplier : -1n, + } + }) + .sort((a, b) => { + return a.surplusFeePriorityLevel > b.surplusFeePriorityLevel ? -1 : a.surplusFeePriorityLevel < b.surplusFeePriorityLevel ? 1 : 0 + }) + .reduce( + (acc, { groupIndex, requiredFeeDelta }) => { + if (requiredFeeDelta > 0n) { + // There is a fee deficit on the transaction + let surplusGroupFees = acc[0] + const additionalTransactionFees = acc[1] + const additionalFeeDelta = requiredFeeDelta - surplusGroupFees + if (additionalFeeDelta <= 0n) { + // The surplus group fees fully cover the required fee delta + surplusGroupFees = -additionalFeeDelta + } else { + // The surplus group fees do not fully cover the required fee delta, use what is available + additionalTransactionFees.set(groupIndex, additionalFeeDelta) + surplusGroupFees = 0n + } + return [surplusGroupFees, additionalTransactionFees] as const + } + return acc + }, + [ + executionInfo.txns.reduce((acc, { requiredFeeDelta }) => { + if (requiredFeeDelta < 0n) { + return acc + -requiredFeeDelta + } + return acc + }, 0n), + new Map(), + ] as const, + ) + : [0n, new Map()] + + executionInfo.txns.forEach(({ unnamedResourcesAccessed: r }, i) => { + // Populate Transaction App Call Resources + if (sendParams.populateAppCallResources && r !== undefined && group[i].txn.type === TransactionType.appl) { + if (r.boxes || r.extraBoxRefs) throw Error('Unexpected boxes at the transaction level') + if (r.appLocals) throw Error('Unexpected app local at the transaction level') + if (r.assetHoldings) + throw Error('Unexpected asset holding at the transaction level') + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(group[i].txn as any)['applicationCall'] = { + ...group[i].txn.applicationCall, + accounts: [...(group[i].txn?.applicationCall?.accounts ?? []), ...(r.accounts ?? [])], + foreignApps: [...(group[i].txn?.applicationCall?.foreignApps ?? []), ...(r.apps ?? [])], + foreignAssets: [...(group[i].txn?.applicationCall?.foreignAssets ?? []), ...(r.assets ?? [])], + boxes: [...(group[i].txn?.applicationCall?.boxes ?? []), ...(r.boxes ?? [])], + } satisfies Partial + + const accounts = group[i].txn.applicationCall?.accounts?.length ?? 0 + if (accounts > MAX_APP_CALL_ACCOUNT_REFERENCES) + throw Error(`Account reference limit of ${MAX_APP_CALL_ACCOUNT_REFERENCES} exceeded in transaction ${i}`) + const assets = group[i].txn.applicationCall?.foreignAssets?.length ?? 0 + const apps = group[i].txn.applicationCall?.foreignApps?.length ?? 0 + const boxes = group[i].txn.applicationCall?.boxes?.length ?? 0 + if (accounts + assets + apps + boxes > MAX_APP_CALL_FOREIGN_REFERENCES) { + throw Error(`Resource reference limit of ${MAX_APP_CALL_FOREIGN_REFERENCES} exceeded in transaction ${i}`) + } } - }) - const populateGroupResource = ( - txns: algosdk.TransactionWithSigner[], - reference: - | string - | algosdk.modelsv2.BoxReference - | algosdk.modelsv2.ApplicationLocalReference - | algosdk.modelsv2.AssetHoldingReference - | bigint - | number - | Address, - type: 'account' | 'assetHolding' | 'appLocal' | 'app' | 'box' | 'asset', - ): void => { - const isApplBelowLimit = (t: algosdk.TransactionWithSigner) => { - if (t.txn.type !== algosdk.TransactionType.appl) return false - - const accounts = t.txn.applicationCall?.accounts?.length ?? 0 - const assets = t.txn.applicationCall?.foreignAssets?.length ?? 0 - const apps = t.txn.applicationCall?.foreignApps?.length ?? 0 - const boxes = t.txn.applicationCall?.boxes?.length ?? 0 - - return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES + // Cover App Call Inner Transaction Fees + if (sendParams.coverAppCallInnerTransactionFees) { + const additionalTransactionFee = additionalTransactionFees.get(i) + + if (additionalTransactionFee !== undefined) { + if (group[i].txn.type !== algosdk.TransactionType.appl) { + throw Error(`An additional fee of ${additionalTransactionFee} µALGO is required for non app call transaction ${i}`) + } + const transactionFee = group[i].txn.fee + additionalTransactionFee + const maxFee = additionalAtcContext?.maxFees?.get(i)?.microAlgo + if (maxFee === undefined || transactionFee > maxFee) { + throw Error( + `Calculated transaction fee ${transactionFee} µALGO is greater than max of ${maxFee ?? 'undefined'} for transaction ${i}`, + ) + } + group[i].txn.fee = transactionFee + } } + }) - // If this is a asset holding or app local, first try to find a transaction that already has the account available - if (type === 'assetHolding' || type === 'appLocal') { - const { account } = reference as algosdk.modelsv2.ApplicationLocalReference | algosdk.modelsv2.AssetHoldingReference - - let txnIndex = txns.findIndex((t) => { - if (!isApplBelowLimit(t)) return false - - return ( - // account is in the foreign accounts array - t.txn.applicationCall?.accounts?.map((a) => a.toString()).includes(account.toString()) || - // account is available as an app account - t.txn.applicationCall?.foreignApps?.map((a) => algosdk.getApplicationAddress(a).toString()).includes(account.toString()) || - // account is available since it's in one of the fields - Object.values(t.txn).some((f) => - stringifyJSON(f, (_, v) => (v instanceof Address ? v.toString() : v))?.includes(account.toString()), + // Populate Group App Call Resources + if (sendParams.populateAppCallResources) { + const populateGroupResource = ( + txns: algosdk.TransactionWithSigner[], + reference: + | string + | algosdk.modelsv2.BoxReference + | algosdk.modelsv2.ApplicationLocalReference + | algosdk.modelsv2.AssetHoldingReference + | bigint + | number + | Address, + type: 'account' | 'assetHolding' | 'appLocal' | 'app' | 'box' | 'asset', + ): void => { + const isApplBelowLimit = (t: algosdk.TransactionWithSigner) => { + if (t.txn.type !== algosdk.TransactionType.appl) return false + + const accounts = t.txn.applicationCall?.accounts?.length ?? 0 + const assets = t.txn.applicationCall?.foreignAssets?.length ?? 0 + const apps = t.txn.applicationCall?.foreignApps?.length ?? 0 + const boxes = t.txn.applicationCall?.boxes?.length ?? 0 + + return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES + } + + // If this is a asset holding or app local, first try to find a transaction that already has the account available + if (type === 'assetHolding' || type === 'appLocal') { + const { account } = reference as algosdk.modelsv2.ApplicationLocalReference | algosdk.modelsv2.AssetHoldingReference + + let txnIndex = txns.findIndex((t) => { + if (!isApplBelowLimit(t)) return false + + return ( + // account is in the foreign accounts array + t.txn.applicationCall?.accounts?.map((a) => a.toString()).includes(account.toString()) || + // account is available as an app account + t.txn.applicationCall?.foreignApps?.map((a) => algosdk.getApplicationAddress(a).toString()).includes(account.toString()) || + // account is available since it's in one of the fields + Object.values(t.txn).some((f) => + stringifyJSON(f, (_, v) => (v instanceof Address ? v.toString() : v))?.includes(account.toString()), + ) ) - ) - }) + }) + + if (txnIndex > -1) { + if (type === 'assetHolding') { + const { asset } = reference as algosdk.modelsv2.AssetHoldingReference + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignAssets: [...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), ...[asset]], + } satisfies Partial + } else { + const { app } = reference as algosdk.modelsv2.ApplicationLocalReference + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignApps: [...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), ...[app]], + } satisfies Partial + } + return + } + + // Now try to find a txn that already has that app or asset available + txnIndex = txns.findIndex((t) => { + if (!isApplBelowLimit(t)) return false + + // check if there is space in the accounts array + if ((t.txn.applicationCall?.accounts?.length ?? 0) >= MAX_APP_CALL_ACCOUNT_REFERENCES) return false + + if (type === 'assetHolding') { + const { asset } = reference as algosdk.modelsv2.AssetHoldingReference + return t.txn.applicationCall?.foreignAssets?.includes(asset) + } else { + const { app } = reference as algosdk.modelsv2.ApplicationLocalReference + return t.txn.applicationCall?.foreignApps?.includes(app) || t.txn.applicationCall?.appIndex === app + } + }) + + if (txnIndex > -1) { + const { account } = reference as algosdk.modelsv2.AssetHoldingReference | algosdk.modelsv2.ApplicationLocalReference - if (txnIndex > -1) { - if (type === 'assetHolding') { - const { asset } = reference as algosdk.modelsv2.AssetHoldingReference // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(txns[txnIndex].txn as any)['applicationCall'] = { ...txns[txnIndex].txn.applicationCall, - foreignAssets: [...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), ...[asset]], + accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], } satisfies Partial - } else { - const { app } = reference as algosdk.modelsv2.ApplicationLocalReference + + return + } + } + + // If this is a box, first try to find a transaction that already has the app available + if (type === 'box') { + const { app, name } = reference as algosdk.modelsv2.BoxReference + + const txnIndex = txns.findIndex((t) => { + if (!isApplBelowLimit(t)) return false + + // If the app is in the foreign array OR the app being called, then we know it's available + return t.txn.applicationCall?.foreignApps?.includes(app) || t.txn.applicationCall?.appIndex === app + }) + + if (txnIndex > -1) { // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(txns[txnIndex].txn as any)['applicationCall'] = { ...txns[txnIndex].txn.applicationCall, - foreignApps: [...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), ...[app]], + boxes: [...(txns[txnIndex].txn?.applicationCall?.boxes ?? []), ...[{ appIndex: app, name } satisfies TransactionBoxReference]], } satisfies Partial + + return } - return } - // Now try to find a txn that already has that app or asset available - txnIndex = txns.findIndex((t) => { - if (!isApplBelowLimit(t)) return false + // Find the txn index to put the reference(s) + const txnIndex = txns.findIndex((t) => { + if (t.txn.type !== algosdk.TransactionType.appl) return false - // check if there is space in the accounts array - if ((t.txn.applicationCall?.accounts?.length ?? 0) >= MAX_APP_CALL_ACCOUNT_REFERENCES) return false + const accounts = t.txn.applicationCall?.accounts?.length ?? 0 + if (type === 'account') return accounts < MAX_APP_CALL_ACCOUNT_REFERENCES - if (type === 'assetHolding') { - const { asset } = reference as algosdk.modelsv2.AssetHoldingReference - return t.txn.applicationCall?.foreignAssets?.includes(asset) - } else { - const { app } = reference as algosdk.modelsv2.ApplicationLocalReference - return t.txn.applicationCall?.foreignApps?.includes(app) || t.txn.applicationCall?.appIndex === app + const assets = t.txn.applicationCall?.foreignAssets?.length ?? 0 + const apps = t.txn.applicationCall?.foreignApps?.length ?? 0 + const boxes = t.txn.applicationCall?.boxes?.length ?? 0 + + // If we're adding local state or asset holding, we need space for the acocunt and the other reference + if (type === 'assetHolding' || type === 'appLocal') { + return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES - 1 && accounts < MAX_APP_CALL_ACCOUNT_REFERENCES + } + + // If we're adding a box, we need space for both the box ref and the app ref + if (type === 'box' && BigInt((reference as algosdk.modelsv2.BoxReference).app) !== BigInt(0)) { + return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES - 1 } + + return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES }) - if (txnIndex > -1) { - const { account } = reference as algosdk.modelsv2.AssetHoldingReference | algosdk.modelsv2.ApplicationLocalReference + if (txnIndex === -1) { + throw Error('No more transactions below reference limit. Add another app call to the group.') + } + if (type === 'account') { // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(txns[txnIndex].txn as any)['applicationCall'] = { ...txns[txnIndex].txn.applicationCall, - accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], + accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[reference as Address]], } satisfies Partial - - return - } - } - - // If this is a box, first try to find a transaction that already has the app available - if (type === 'box') { - const { app, name } = reference as algosdk.modelsv2.BoxReference - - const txnIndex = txns.findIndex((t) => { - if (!isApplBelowLimit(t)) return false - - // If the app is in the foreign array OR the app being called, then we know it's available - return t.txn.applicationCall?.foreignApps?.includes(app) || t.txn.applicationCall?.appIndex === app - }) - - if (txnIndex > -1) { + } else if (type === 'app') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignApps: [ + ...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), + ...[typeof reference === 'bigint' ? reference : BigInt(reference as number)], + ], + } satisfies Partial + } else if (type === 'box') { + const { app, name } = reference as algosdk.modelsv2.BoxReference // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(txns[txnIndex].txn as any)['applicationCall'] = { ...txns[txnIndex].txn.applicationCall, boxes: [...(txns[txnIndex].txn?.applicationCall?.boxes ?? []), ...[{ appIndex: app, name } satisfies TransactionBoxReference]], } satisfies Partial - return - } - } - - // Find the txn index to put the reference(s) - const txnIndex = txns.findIndex((t) => { - if (t.txn.type !== algosdk.TransactionType.appl) return false - - const accounts = t.txn.applicationCall?.accounts?.length ?? 0 - if (type === 'account') return accounts < MAX_APP_CALL_ACCOUNT_REFERENCES - - const assets = t.txn.applicationCall?.foreignAssets?.length ?? 0 - const apps = t.txn.applicationCall?.foreignApps?.length ?? 0 - const boxes = t.txn.applicationCall?.boxes?.length ?? 0 - - // If we're adding local state or asset holding, we need space for the acocunt and the other reference - if (type === 'assetHolding' || type === 'appLocal') { - return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES - 1 && accounts < MAX_APP_CALL_ACCOUNT_REFERENCES - } - - // If we're adding a box, we need space for both the box ref and the app ref - if (type === 'box' && BigInt((reference as algosdk.modelsv2.BoxReference).app) !== BigInt(0)) { - return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES - 1 - } - - return accounts + assets + apps + boxes < MAX_APP_CALL_FOREIGN_REFERENCES - }) - - if (txnIndex === -1) { - throw Error('No more transactions below reference limit. Add another app call to the group.') - } - - if (type === 'account') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[reference as Address]], - } satisfies Partial - } else if (type === 'app') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - foreignApps: [ - ...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), - ...[typeof reference === 'bigint' ? reference : BigInt(reference as number)], - ], - } satisfies Partial - } else if (type === 'box') { - const { app, name } = reference as algosdk.modelsv2.BoxReference - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - boxes: [...(txns[txnIndex].txn?.applicationCall?.boxes ?? []), ...[{ appIndex: app, name } satisfies TransactionBoxReference]], - } satisfies Partial - - if (app.toString() !== '0') { + if (app.toString() !== '0') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignApps: [...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), ...[app]], + } satisfies Partial + } + } else if (type === 'assetHolding') { + const { asset, account } = reference as algosdk.modelsv2.AssetHoldingReference + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignAssets: [...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), ...[asset]], + accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], + } satisfies Partial + } else if (type === 'appLocal') { + const { app, account } = reference as algosdk.modelsv2.ApplicationLocalReference // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(txns[txnIndex].txn as any)['applicationCall'] = { ...txns[txnIndex].txn.applicationCall, foreignApps: [...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), ...[app]], + accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], + } satisfies Partial + } else if (type === 'asset') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ;(txns[txnIndex].txn as any)['applicationCall'] = { + ...txns[txnIndex].txn.applicationCall, + foreignAssets: [ + ...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), + ...[typeof reference === 'bigint' ? reference : BigInt(reference as number)], + ], } satisfies Partial } - } else if (type === 'assetHolding') { - const { asset, account } = reference as algosdk.modelsv2.AssetHoldingReference - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - foreignAssets: [...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), ...[asset]], - accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], - } satisfies Partial - } else if (type === 'appLocal') { - const { app, account } = reference as algosdk.modelsv2.ApplicationLocalReference - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - foreignApps: [...(txns[txnIndex].txn?.applicationCall?.foreignApps ?? []), ...[app]], - accounts: [...(txns[txnIndex].txn?.applicationCall?.accounts ?? []), ...[account]], - } satisfies Partial - } else if (type === 'asset') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(txns[txnIndex].txn as any)['applicationCall'] = { - ...txns[txnIndex].txn.applicationCall, - foreignAssets: [ - ...(txns[txnIndex].txn?.applicationCall?.foreignAssets ?? []), - ...[typeof reference === 'bigint' ? reference : BigInt(reference as number)], - ], - } satisfies Partial } - } - const g = unnamedResourcesAccessed.group + const g = executionInfo.groupUnnamedResourcesAccessed - if (g) { - // Do cross-reference resources first because they are the most restrictive in terms - // of which transactions can be used - g.appLocals?.forEach((a) => { - populateGroupResource(group, a, 'appLocal') + if (g) { + // Do cross-reference resources first because they are the most restrictive in terms + // of which transactions can be used + g.appLocals?.forEach((a) => { + populateGroupResource(group, a, 'appLocal') - // Remove resources from the group if we're adding them here - g.accounts = g.accounts?.filter((acc) => acc !== a.account) - g.apps = g.apps?.filter((app) => BigInt(app) !== BigInt(a.app)) - }) + // Remove resources from the group if we're adding them here + g.accounts = g.accounts?.filter((acc) => acc !== a.account) + g.apps = g.apps?.filter((app) => BigInt(app) !== BigInt(a.app)) + }) - g.assetHoldings?.forEach((a) => { - populateGroupResource(group, a, 'assetHolding') + g.assetHoldings?.forEach((a) => { + populateGroupResource(group, a, 'assetHolding') - // Remove resources from the group if we're adding them here - g.accounts = g.accounts?.filter((acc) => acc !== a.account) - g.assets = g.assets?.filter((asset) => BigInt(asset) !== BigInt(a.asset)) - }) + // Remove resources from the group if we're adding them here + g.accounts = g.accounts?.filter((acc) => acc !== a.account) + g.assets = g.assets?.filter((asset) => BigInt(asset) !== BigInt(a.asset)) + }) - // Do accounts next because the account limit is 4 - g.accounts?.forEach((a) => { - populateGroupResource(group, a, 'account') - }) + // Do accounts next because the account limit is 4 + g.accounts?.forEach((a) => { + populateGroupResource(group, a, 'account') + }) - g.boxes?.forEach((b) => { - populateGroupResource(group, b, 'box') + g.boxes?.forEach((b) => { + populateGroupResource(group, b, 'box') - // Remove apps as resource from the group if we're adding it here - g.apps = g.apps?.filter((app) => BigInt(app) !== BigInt(b.app)) - }) + // Remove apps as resource from the group if we're adding it here + g.apps = g.apps?.filter((app) => BigInt(app) !== BigInt(b.app)) + }) - g.assets?.forEach((a) => { - populateGroupResource(group, a, 'asset') - }) + g.assets?.forEach((a) => { + populateGroupResource(group, a, 'asset') + }) - g.apps?.forEach((a) => { - populateGroupResource(group, a, 'app') - }) + g.apps?.forEach((a) => { + populateGroupResource(group, a, 'app') + }) - if (g.extraBoxRefs) { - for (let i = 0; i < g.extraBoxRefs; i += 1) { - const ref = new algosdk.modelsv2.BoxReference({ app: 0, name: new Uint8Array(0) }) - populateGroupResource(group, ref, 'box') + if (g.extraBoxRefs) { + for (let i = 0; i < g.extraBoxRefs; i += 1) { + const ref = new algosdk.modelsv2.BoxReference({ app: 0, name: new Uint8Array(0) }) + populateGroupResource(group, ref, 'box') + } } } } @@ -605,7 +774,7 @@ export async function populateAppCallResources(atc: algosdk.AtomicTransactionCom * @returns An object with transaction IDs, transactions, group transaction ID (`groupTransactionId`) if more than 1 transaction sent, and (if `skipWaiting` is `false` or unset) confirmation (`confirmation`) */ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTransactionComposerToSend, algod: Algodv2) { - const { atc: givenAtc, sendParams, ...executeParams } = atcSend + const { atc: givenAtc, sendParams, additionalAtcContext, ...executeParams } = atcSend let atc: AtomicTransactionComposer @@ -614,10 +783,20 @@ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTran const transactionsWithSigner = atc.buildGroup() // If populateAppCallResources is true OR if populateAppCallResources is undefined and there are app calls, then populate resources - const populateResources = + const populateAppCallResources = executeParams?.populateAppCallResources ?? sendParams?.populateAppCallResources ?? Config.populateAppCallResources - if (populateResources && transactionsWithSigner.map((t) => t.txn.type).includes(algosdk.TransactionType.appl)) { - atc = await populateAppCallResources(givenAtc, algod) + const coverAppCallInnerTransactionFees = executeParams?.coverAppCallInnerTransactionFees + + if ( + (populateAppCallResources || coverAppCallInnerTransactionFees) && + transactionsWithSigner.map((t) => t.txn.type).includes(algosdk.TransactionType.appl) + ) { + atc = await prepareGroupForSending( + givenAtc, + algod, + { ...executeParams, populateAppCallResources, coverAppCallInnerTransactionFees }, + additionalAtcContext, + ) } const transactionsToSend = transactionsWithSigner.map((t) => { @@ -640,7 +819,7 @@ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTran } if (Config.debug && Config.traceAll) { - // Dump the traces to a file for use with AlgoKit AVM debugger + // Emit the simulate response for use with AlgoKit AVM debugger const simulateResponse = await performAtomicTransactionComposerSimulate(atc, algod) await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse, @@ -690,7 +869,7 @@ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTran if (Config.debug && typeof e === 'object') { err.traces = [] - Config.logger.error( + Config.getLogger(executeParams?.suppressLog ?? sendParams?.suppressLog).error( 'Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information', err, ) @@ -714,7 +893,10 @@ export const sendAtomicTransactionComposer = async function (atcSend: AtomicTran } } } else { - Config.logger.error('Received error executing Atomic Transaction Composer, for more information enable the debug flag', err) + Config.getLogger(executeParams?.suppressLog ?? sendParams?.suppressLog).error( + 'Received error executing Atomic Transaction Composer, for more information enable the debug flag', + err, + ) } throw err } diff --git a/src/types/account-manager.spec.ts b/src/types/account-manager.spec.ts index 2c0f64f9..f2d62edf 100644 --- a/src/types/account-manager.spec.ts +++ b/src/types/account-manager.spec.ts @@ -7,7 +7,7 @@ import { algorandFixture } from '../testing' describe('AccountManager', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10e6) + beforeEach(localnet.newScope, 10e6) test('New account is retrieved and funded', async () => { const { algorand } = localnet.context diff --git a/src/types/algorand-client-interface.ts b/src/types/algorand-client-interface.ts index 3ca011e3..dc92c5d9 100644 --- a/src/types/algorand-client-interface.ts +++ b/src/types/algorand-client-interface.ts @@ -1,5 +1,53 @@ -import { AlgorandClient } from './algorand-client' -import { InterfaceOf } from './instance-of' +import algosdk from 'algosdk' +import { AlgorandClientTransactionCreator } from './algorand-client-transaction-creator' +import { AlgorandClientTransactionSender } from './algorand-client-transaction-sender' +import { AppDeployer } from './app-deployer' +import { AppManager } from './app-manager' +import { TransactionComposer } from './composer' +import { NetworkDetails } from './network-client' +import Algodv2 = algosdk.Algodv2 +import Indexer = algosdk.Indexer +import type { AlgorandClient } from './algorand-client' +import { InterfaceOf } from './interface-of' -/** AlgorandClient interface used to eleminate circular dependencies */ -export type AlgorandClientInterface = InterfaceOf +/** + * @deprecated Use `AlgorandClient` with `import type` instead since this + * interface does not implement the full interface for the AlgorandClient + * and will get removed in the next major release + * + * @see https://github.com/algorandfoundation/algokit-utils-ts/pull/365 + */ +interface OldAlgorandClientInterface { + app: AppManager + appDeployer: AppDeployer + send: AlgorandClientTransactionSender + createTransaction: AlgorandClientTransactionCreator + newGroup(): TransactionComposer + client: { + algod: Algodv2 + indexer?: Indexer + network(): Promise + isLocalNet(): Promise + isTestNet(): Promise + isMainNet(): Promise + } +} + +/** + * @deprecated Use `AlgorandClient` with `import type` instead since this interface + * will get removed in the next major release + * + * This type is a solution to the problem raised in the PR below. + * In summary, we needed to update the interface without making a breaking + * change so this was the best option. This interface has some optional properties, + * such as `account`, but unless you are using a custom implementation of AlgorandClient + * (you probably aren't) you can be sure these will always be defined. + * + * @example + * ```ts + * algorand.account!.getInformation(addr); + * ``` + * + * @see https://github.com/algorandfoundation/algokit-utils-ts/pull/365 + */ +export type AlgorandClientInterface = OldAlgorandClientInterface & Partial> diff --git a/src/types/algorand-client.asset.spec.ts b/src/types/algorand-client.asset.spec.ts index f273564f..79970a61 100644 --- a/src/types/algorand-client.asset.spec.ts +++ b/src/types/algorand-client.asset.spec.ts @@ -4,7 +4,7 @@ import { generateTestAsset } from '../testing/_asset' describe('Asset capability', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 100_000) + beforeEach(localnet.newScope, 100_000) test('Create an asset succeeds', async () => { const { testAccount, algorand } = localnet.context diff --git a/src/types/algorand-client.spec.ts b/src/types/algorand-client.spec.ts index 8028f6e9..3c177f07 100644 --- a/src/types/algorand-client.spec.ts +++ b/src/types/algorand-client.spec.ts @@ -23,7 +23,7 @@ describe('AlgorandClient', () => { const fixture = algorandFixture() beforeAll(async () => { - await fixture.beforeEach() + await fixture.newScope() alice = fixture.context.testAccount bob = await fixture.context.generateAccount({ initialFunds: AlgoAmount.MicroAlgo(100_000) }) diff --git a/src/types/algorand-client.transfer.spec.ts b/src/types/algorand-client.transfer.spec.ts index 1a68cf38..7a75c3ff 100644 --- a/src/types/algorand-client.transfer.spec.ts +++ b/src/types/algorand-client.transfer.spec.ts @@ -13,7 +13,7 @@ describe('Transfer capability', () => { beforeEach(async () => { vitest.resetModules() process.env = { ...env } - await localnet.beforeEach() + await localnet.newScope() }, 10_000) afterEach(() => { @@ -327,7 +327,7 @@ describe('rekey', () => { beforeEach(async () => { vitest.resetModules() process.env = { ...env } - await localnet.beforeEach() + await localnet.newScope() }, 10_000) afterEach(() => { diff --git a/src/types/app-client.spec.ts b/src/types/app-client.spec.ts index 184c808b..50e08b61 100644 --- a/src/types/app-client.spec.ts +++ b/src/types/app-client.spec.ts @@ -22,7 +22,7 @@ import { AppSpec } from './app-spec' describe('application-client', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) let appSpec: AppSpec beforeAll(async () => { @@ -870,7 +870,7 @@ describe('application-client', () => { describe('app-client', () => { const localnet = algorandFixture() - beforeEach(localnet.beforeEach, 10_000) + beforeEach(localnet.newScope, 10_000) let appSpec: AppSpec beforeAll(async () => { diff --git a/src/types/app-client.ts b/src/types/app-client.ts index 7d25b3d0..0f8dd5de 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -504,7 +504,7 @@ export class AppClient { this._appSpec = AppClient.normaliseAppSpec(params.appSpec) this._appName = params.appName ?? this._appSpec.name this._algorand = params.algorand - this._algorand.registerErrorTransformer(this.handleCallErrors) + this._algorand.registerErrorTransformer!(this.handleCallErrors) this._defaultSender = typeof params.defaultSender === 'string' ? Address.fromString(params.defaultSender) : params.defaultSender this._defaultSigner = params.defaultSigner diff --git a/src/types/app-deployer.ts b/src/types/app-deployer.ts index da7b95ce..92827d98 100644 --- a/src/types/app-deployer.ts +++ b/src/types/app-deployer.ts @@ -274,7 +274,7 @@ export class AppDeployer { } else { composer.addAppDelete({ appId: existingApp.appId, ...deleteParams }) } - const result = await composer.send({ ...sendParams, suppressLog: true }) + const result = await composer.send({ ...sendParams }) const confirmation = result.confirmations.at(createIndex - 1)! const transaction = result.transactions.at(createIndex - 1)! const deleteTransaction = result.transactions.at(-1)! diff --git a/src/types/app-factory-and-client.spec.ts b/src/types/app-factory-and-client.spec.ts index 7b338b84..cb8fb83a 100644 --- a/src/types/app-factory-and-client.spec.ts +++ b/src/types/app-factory-and-client.spec.ts @@ -14,7 +14,7 @@ import { AppSpec } from './app-spec' describe('ARC32: app-factory-and-app-client', () => { const localnet = algorandFixture() beforeEach(async () => { - await localnet.beforeEach() + await localnet.newScope() factory = await localnet.algorand.client.getAppFactory({ appSpec, defaultSender: localnet.context.testAccount }) }, 10_000) @@ -688,7 +688,7 @@ describe('ARC56: app-factory-and-app-client', () => { const localnet = algorandFixture() beforeEach(async () => { - await localnet.beforeEach() + await localnet.newScope() factory = localnet.algorand.client.getAppFactory({ // @ts-expect-error TODO: Fix this diff --git a/src/types/composer.ts b/src/types/composer.ts index 42382c05..15113cdc 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -66,7 +66,7 @@ export type CommonTransactionParams = { lease?: Uint8Array | string /** The static transaction fee. In most cases you want to use `extraFee` unless setting the fee to 0 to be covered by another transaction. */ staticFee?: AlgoAmount - /** The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees. */ + /** The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees. */ extraFee?: AlgoAmount /** Throw an error if the fee for the transaction is more than this amount; prevents overspending on fees during high congestion periods. */ maxFee?: AlgoAmount @@ -514,6 +514,20 @@ export type TransactionComposerParams = { errorTransformers?: ErrorTransformer[] } +/** Represents a Transaction with additional context that was used to build that transaction. */ +interface TransactionWithContext { + txn: Transaction + context: { + /* The logical max fee for the transaction, if one was supplied. */ + maxFee?: AlgoAmount + /* The ABI method, if the app call transaction is an ABI method call. */ + abiMethod?: algosdk.ABIMethod + } +} + +/** Represents a TransactionWithSigner with additional context that was used to build that transaction. */ +type TransactionWithSignerAndContext = algosdk.TransactionWithSigner & TransactionWithContext + /** Set of transactions built by `TransactionComposer`. */ export interface BuiltTransactions { /** The built transactions */ @@ -532,8 +546,10 @@ export class TransactionComposer { /** The ATC used to compose the group */ private atc = new algosdk.AtomicTransactionComposer() - /** Map of txid to ABI method */ - private txnMethodMap: Map = new Map() + /** Map of transaction index in the atc to a max logical fee. + * This is set using the value of either maxFee or staticFee. + */ + private txnMaxFees: Map = new Map() /** Transactions that have not yet been composed */ private txns: Txn[] = [] @@ -821,17 +837,23 @@ export class TransactionComposer { } /** Build an ATC and return transactions ready to be incorporated into a broader set of transactions this composer is composing */ - private buildAtc(atc: algosdk.AtomicTransactionComposer): algosdk.TransactionWithSigner[] { + private buildAtc(atc: algosdk.AtomicTransactionComposer): TransactionWithSignerAndContext[] { const group = atc.buildGroup() const txnWithSigners = group.map((ts, idx) => { // Remove underlying group ID from the transaction since it will be re-grouped when this TransactionComposer is built ts.txn.group = undefined - // If this was a method call stash the ABIMethod for later + // If this was a method call return the ABIMethod for later if (atc['methodCalls'].get(idx)) { - this.txnMethodMap.set(ts.txn.txID(), atc['methodCalls'].get(idx)) + return { + ...ts, + context: { abiMethod: atc['methodCalls'].get(idx) as algosdk.ABIMethod }, + } + } + return { + ...ts, + context: {}, } - return ts }) return txnWithSigners @@ -841,9 +863,10 @@ export class TransactionComposer { buildTxn: (params: TParams) => Transaction, params: CommonTransactionParams, txnParams: TParams, - ): Transaction { + ): TransactionWithContext { // We are going to mutate suggested params, let's create a clone first txnParams.suggestedParams = { ...txnParams.suggestedParams } + if (params.lease) txnParams.lease = encodeLease(params.lease)! satisfies algosdk.Transaction['lease'] if (params.rekeyTo) txnParams.rekeyTo = address(params.rekeyTo) satisfies algosdk.Transaction['rekeyTo'] const encoder = new TextEncoder() @@ -883,7 +906,10 @@ export class TransactionComposer { throw Error(`Transaction fee ${txn.fee} µALGO is greater than maxFee ${params.maxFee}`) } - return txn + const logicalMaxFee = + params.maxFee !== undefined && params.maxFee.microAlgo > (params.staticFee?.microAlgo ?? 0n) ? params.maxFee : params.staticFee + + return { txn, context: { maxFee: logicalMaxFee } } } /** @@ -895,9 +921,9 @@ export class TransactionComposer { params: AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall, suggestedParams: algosdk.SuggestedParams, includeSigner: boolean, - ): Promise { - const methodArgs: algosdk.ABIArgument[] = [] - const transactionsForGroup: TransactionWithSigner[] = [] + ): Promise { + const methodArgs: (algosdk.ABIArgument | TransactionWithSignerAndContext)[] = [] + const transactionsForGroup: TransactionWithSignerAndContext[] = [] const isAbiValue = (x: unknown): x is algosdk.ABIValue => { if (Array.isArray(x)) return x.length == 0 || x.every(isAbiValue) @@ -931,7 +957,6 @@ export class TransactionComposer { if ('method' in arg) { const tempTxnWithSigners = await this.buildMethodCall(arg, suggestedParams, includeSigner) - // If there is any transaction args, add to the atc // Everything else should be added as method args @@ -954,7 +979,40 @@ export class TransactionComposer { } const methodAtc = new algosdk.AtomicTransactionComposer() - transactionsForGroup.reverse().forEach((txn) => methodAtc.addTransaction(txn)) + const maxFees = new Map() + + transactionsForGroup.reverse().forEach(({ context, ...txnWithSigner }) => { + methodAtc.addTransaction(txnWithSigner) + const atcIndex = methodAtc.count() - 1 + if (context.abiMethod) { + methodAtc['methodCalls'].set(atcIndex, context.abiMethod) + } + if (context.maxFee !== undefined) { + maxFees.set(atcIndex, context.maxFee) + } + }) + + // If any of the args are method call transactions, add that info to the methodAtc + methodArgs + .filter((arg) => { + if (typeof arg === 'object' && 'context' in arg) { + const { context, ...txnWithSigner } = arg + return isTransactionWithSigner(txnWithSigner) + } + return isTransactionWithSigner(arg) + }) + .reverse() + .forEach((arg, idx) => { + if (typeof arg === 'object' && 'context' in arg && arg.context) { + const atcIndex = methodAtc.count() + idx + if (arg.context.abiMethod) { + methodAtc['methodCalls'].set(atcIndex, arg.context.abiMethod) + } + if (arg.context.maxFee !== undefined) { + maxFees.set(atcIndex, arg.context.maxFee) + } + } + }) const appId = Number('appId' in params ? params.appId : 0n) const approvalProgram = @@ -1001,7 +1059,15 @@ export class TransactionComposer { : params.signer : this.getSigner(params.sender) : TransactionComposer.NULL_SIGNER, - methodArgs: methodArgs.reverse(), + methodArgs: methodArgs + .map((arg) => { + if (typeof arg === 'object' && 'context' in arg) { + const { context, ...txnWithSigner } = arg + return txnWithSigner + } + return arg + }) + .reverse(), // note, lease, and rekeyTo are set in the common build step note: undefined, lease: undefined, @@ -1009,7 +1075,7 @@ export class TransactionComposer { } // Build the transaction - this.commonTxnBuildStep( + const result = this.commonTxnBuildStep( (txnParams) => { methodAtc.addMethodCall(txnParams) return methodAtc.buildGroup()[methodAtc.count() - 1].txn @@ -1019,7 +1085,18 @@ export class TransactionComposer { ) // Process the ATC to get a set of transactions ready for broader grouping - return this.buildAtc(methodAtc) + return this.buildAtc(methodAtc).map(({ context: _context, ...txnWithSigner }, idx) => { + const maxFee = idx === methodAtc.count() - 1 ? result.context.maxFee : maxFees.get(idx) + const context = { + ..._context, // Adds method context info + maxFee, + } + + return { + ...txnWithSigner, + context, + } + }) } private buildPayment(params: PaymentParams, suggestedParams: algosdk.SuggestedParams) { @@ -1167,7 +1244,7 @@ export class TransactionComposer { } /** Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` since those ones can have custom signers that need to be retrieved. */ - private async buildTxn(txn: Txn, suggestedParams: algosdk.SuggestedParams): Promise { + private async buildTxn(txn: Txn, suggestedParams: algosdk.SuggestedParams): Promise { switch (txn.type) { case 'pay': return [this.buildPayment(txn, suggestedParams)] @@ -1194,9 +1271,14 @@ export class TransactionComposer { } } - private async buildTxnWithSigner(txn: Txn, suggestedParams: algosdk.SuggestedParams): Promise { + private async buildTxnWithSigner(txn: Txn, suggestedParams: algosdk.SuggestedParams): Promise { if (txn.type === 'txnWithSigner') { - return [txn] + return [ + { + ...txn, + context: {}, + }, + ] } if (txn.type === 'atc') { @@ -1209,7 +1291,7 @@ export class TransactionComposer { const signer = txn.signer ? ('signer' in txn.signer ? txn.signer.signer : txn.signer) : this.getSigner(txn.sender) - return (await this.buildTxn(txn, suggestedParams)).map((txn) => ({ txn, signer })) + return (await this.buildTxn(txn, suggestedParams)).map(({ txn, context }) => ({ txn, signer, context })) } /** @@ -1226,7 +1308,7 @@ export class TransactionComposer { for (const txn of this.txns) { if (!['txnWithSigner', 'atc', 'methodCall'].includes(txn.type)) { - transactions.push(...(await this.buildTxn(txn, suggestedParams))) + transactions.push(...(await this.buildTxn(txn, suggestedParams)).map((txn) => txn.txn)) } else { const transactionsWithSigner = txn.type === 'txnWithSigner' @@ -1237,20 +1319,19 @@ export class TransactionComposer { ? await this.buildMethodCall(txn, suggestedParams, false) : [] - transactions.push(...transactionsWithSigner.map((ts) => ts.txn)) transactionsWithSigner.forEach((ts, idx) => { + transactions.push(ts.txn) + if (ts.signer && ts.signer !== TransactionComposer.NULL_SIGNER) { signers.set(idx, ts.signer) } + if ('context' in ts && ts.context.abiMethod) { + methodCalls.set(idx, ts.context.abiMethod) + } }) } } - for (let i = 0; i < transactions.length; i++) { - const method = this.txnMethodMap.get(transactions[i].txID()) - if (method) methodCalls.set(i, method) - } - return { transactions, methodCalls, signers } } @@ -1275,18 +1356,24 @@ export class TransactionComposer { const suggestedParams = await this.getSuggestedParams() // Build all of the transactions - const txnWithSigners: algosdk.TransactionWithSigner[] = [] + const txnWithSigners: TransactionWithSignerAndContext[] = [] for (const txn of this.txns) { txnWithSigners.push(...(await this.buildTxnWithSigner(txn, suggestedParams))) } // Add all of the transactions to the underlying ATC const methodCalls = new Map() - txnWithSigners.forEach((ts, idx) => { + txnWithSigners.forEach(({ context, ...ts }, idx) => { this.atc.addTransaction(ts) + // Populate consolidated set of all ABI method calls - const method = this.txnMethodMap.get(ts.txn.txID()) - if (method) methodCalls.set(idx, method) + if (context.abiMethod) { + methodCalls.set(idx, context.abiMethod) + } + + if (context.maxFee !== undefined) { + this.txnMaxFees.set(idx, context.maxFee) + } }) this.atc['methodCalls'] = methodCalls } @@ -1313,9 +1400,13 @@ export class TransactionComposer { const group = (await this.build()).transactions let waitRounds = params?.maxRoundsToWaitForConfirmation + + const suggestedParams = + waitRounds === undefined || params?.coverAppCallInnerTransactionFees ? await this.getSuggestedParams() : undefined + if (waitRounds === undefined) { const lastRound = group.reduce((max, txn) => (txn.txn.lastValid > max ? txn.txn.lastValid : BigInt(max)), 0n) - const { firstValid: firstRound } = await this.getSuggestedParams() + const { firstValid: firstRound } = suggestedParams! waitRounds = Number(BigInt(lastRound) - BigInt(firstRound)) + 1 } @@ -1326,6 +1417,13 @@ export class TransactionComposer { suppressLog: params?.suppressLog, maxRoundsToWaitForConfirmation: waitRounds, populateAppCallResources: params?.populateAppCallResources, + coverAppCallInnerTransactionFees: params?.coverAppCallInnerTransactionFees, + additionalAtcContext: params?.coverAppCallInnerTransactionFees + ? { + maxFees: this.txnMaxFees, + suggestedParams: suggestedParams!, + } + : undefined, }, this.algod, ) diff --git a/src/types/interface-of.ts b/src/types/interface-of.ts new file mode 100644 index 00000000..fed80343 --- /dev/null +++ b/src/types/interface-of.ts @@ -0,0 +1,3 @@ +export type InterfaceOf = { + [Member in keyof ClassType]: ClassType[Member] +} diff --git a/src/types/testing.ts b/src/types/testing.ts index 7631cf09..f7292dd3 100644 --- a/src/types/testing.ts +++ b/src/types/testing.ts @@ -67,10 +67,12 @@ export interface AlgorandFixture { /** * Retrieve the current context. * Useful with destructuring. + * + * If you haven't called `newScope` then this will throw an error. * @example * ```typescript * test('My test', () => { - * const {algod, indexer, testAccount, ...} = algorand.context + * const {algod, indexer, testAccount, ...} = fixture.context * }) * ``` */ @@ -82,9 +84,50 @@ export interface AlgorandFixture { get algorand(): AlgorandClient /** - * Testing framework agnostic handler method to run before each test to prepare the `context` for that test. + * @deprecated Use newScope instead. + * Testing framework agnostic handler method to run before each test to prepare the `context` for that test with per test isolation. */ beforeEach: () => Promise + + /** + * Creates a new isolated fixture scope (clean transaction logger, AlgorandClient, testAccount, etc.). + * + * You can call this from any testing framework specific hook method to control when you want a new scope. + * + * @example Jest / vitest - per test isolation (beforeEach) + * ```typescript + * describe('MY MODULE', () => { + * const fixture = algorandFixture() + * beforeEach(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + * + * test('MY TEST', async () => { + * const { algorand, testAccount } = fixture.context + * + * // Test stuff! + * }) + * }) + * ``` + * + * @example Jest / vitest - test suite isolation (beforeAll) + * ```typescript + * describe('MY MODULE', () => { + * const fixture = algorandFixture() + * beforeAll(fixture.newScope, 10_000) // Add a 10s timeout to cater for occasionally slow LocalNet calls + * + * test('test1', async () => { + * const { algorand, testAccount } = fixture.context + * + * // Test stuff! + * }) + * test('test2', async () => { + * const { algorand, testAccount } = fixture.context + * // algorand and testAccount are the same as in test1 + * }) + * }) + * ``` + * + */ + newScope: () => Promise } /** Configuration for preparing a captured log snapshot. @@ -98,6 +141,8 @@ export interface LogSnapshotConfig { accounts?: (string | Address | Account | SigningAccount | LogicSigAccount | MultisigAccount | TransactionSignerAccount)[] /** Any app IDs to replace predictably */ apps?: (string | number | bigint)[] + /** Optional filter predicate to filter out logs */ + filterPredicate?: (log: string) => boolean } export interface AlgoKitLogCaptureFixture { diff --git a/src/types/transaction.ts b/src/types/transaction.ts index 9c616baf..89a4e0d1 100644 --- a/src/types/transaction.ts +++ b/src/types/transaction.ts @@ -138,6 +138,17 @@ export interface SendParams { suppressLog?: boolean /** Whether to use simulate to automatically populate app call resources in the txn objects. Defaults to `Config.populateAppCallResources`. */ populateAppCallResources?: boolean + /** Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee */ + coverAppCallInnerTransactionFees?: boolean +} + +/** Additional context about the `AtomicTransactionComposer`. */ +export interface AdditionalAtomicTransactionComposerContext { + /** A map of transaction index in the `AtomicTransactionComposer` to the max fee that can be calculated for a transaction in the group */ + maxFees: Map + + /* The suggested params info relevant to transactions in the `AtomicTransactionComposer` */ + suggestedParams: Pick } /** An `AtomicTransactionComposer` with transactions to send. */ @@ -148,4 +159,10 @@ export interface AtomicTransactionComposerToSend extends SendParams { * @deprecated - set the parameters at the top level instead * Any parameters to control the semantics of the send to the network */ sendParams?: Omit + + /** + * Additional `AtomicTransactionComposer` context used when building the transaction group that is sent. + * This additional context is used and must be supplied when coverAppCallInnerTransactionFees is set to true. + **/ + additionalAtcContext?: AdditionalAtomicTransactionComposerContext } diff --git a/tests/example-contracts/inner-fee/application.json b/tests/example-contracts/inner-fee/application.json new file mode 100644 index 00000000..0cfa580f --- /dev/null +++ b/tests/example-contracts/inner-fee/application.json @@ -0,0 +1,202 @@ +{ + "name": "InnerFeeContract", + "structs": {}, + "methods": [ + { + "name": "burn_ops", + "args": [ + { + "type": "uint64", + "name": "op_budget" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "no_op", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "send_x_inners_with_fees", + "args": [ + { + "type": "uint64", + "name": "app_id" + }, + { + "type": "uint64[]", + "name": "fees" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "send_inners_with_fees", + "args": [ + { + "type": "uint64", + "name": "app_id_1" + }, + { + "type": "uint64", + "name": "app_id_2" + }, + { + "type": "(uint64,uint64,uint64,uint64,uint64[])", + "name": "fees" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "send_inners_with_fees_2", + "args": [ + { + "type": "uint64", + "name": "app_id_1" + }, + { + "type": "uint64", + "name": "app_id_2" + }, + { + "type": "(uint64,uint64,uint64[],uint64,uint64,uint64[])", + "name": "fees" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 75, + 91, + 100, + 119, + 142 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 170 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 78, + 94, + 103, + 122, + 145 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMudGVzdF9jb250cmFjdC5jb250cmFjdC5Jbm5lckZlZUNvbnRyYWN0LmFwcHJvdmFsX3Byb2dyYW06CiAgICBpbnRjYmxvY2sgMSA2IDAgOAogICAgYnl0ZWNibG9jayAweDc3MjllYjMyIDB4YzJjNDg5ZTUgMHgwNjgxMDEKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHNtYXJ0X2NvbnRyYWN0cy50ZXN0X2NvbnRyYWN0LmNvbnRyYWN0LklubmVyRmVlQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NAogICAgLy8gY2xhc3MgSW5uZXJGZWVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgcHJvdG8gMCAxCiAgICB0eG4gTnVtQXBwQXJncwogICAgYnogX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDkKICAgIHB1c2hieXRlcyAweGRkMzc4MjQ3IC8vIG1ldGhvZCAiYnVybl9vcHModWludDY0KXZvaWQiCiAgICBieXRlY18wIC8vIG1ldGhvZCAibm9fb3AoKXZvaWQiCiAgICBieXRlY18xIC8vIG1ldGhvZCAic2VuZF94X2lubmVyc193aXRoX2ZlZXModWludDY0LHVpbnQ2NFtdKXZvaWQiCiAgICBwdXNoYnl0ZXNzIDB4MzQzNjgyY2QgMHgxY2YyZjU5MCAvLyBtZXRob2QgInNlbmRfaW5uZXJzX3dpdGhfZmVlcyh1aW50NjQsdWludDY0LCh1aW50NjQsdWludDY0LHVpbnQ2NCx1aW50NjQsdWludDY0W10pKXZvaWQiLCBtZXRob2QgInNlbmRfaW5uZXJzX3dpdGhfZmVlc18yKHVpbnQ2NCx1aW50NjQsKHVpbnQ2NCx1aW50NjQsdWludDY0W10sdWludDY0LHVpbnQ2NCx1aW50NjRbXSkpdm9pZCIKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDAKICAgIG1hdGNoIF9fcHV5YV9hcmM0X3JvdXRlcl9fX2J1cm5fb3BzX3JvdXRlQDIgX19wdXlhX2FyYzRfcm91dGVyX19fbm9fb3Bfcm91dGVAMyBfX3B1eWFfYXJjNF9yb3V0ZXJfX19zZW5kX3hfaW5uZXJzX3dpdGhfZmVlc19yb3V0ZUA0IF9fcHV5YV9hcmM0X3JvdXRlcl9fX3NlbmRfaW5uZXJzX3dpdGhfZmVlc19yb3V0ZUA1IF9fcHV5YV9hcmM0X3JvdXRlcl9fX3NlbmRfaW5uZXJzX3dpdGhfZmVlc18yX3JvdXRlQDYKICAgIGludGNfMiAvLyAwCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2J1cm5fb3BzX3JvdXRlQDI6CiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weTo1CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgbm90IE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIG5vdCBjcmVhdGluZwogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NAogICAgLy8gY2xhc3MgSW5uZXJGZWVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgYnRvaQogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NQogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICBjYWxsc3ViIGJ1cm5fb3BzCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19ub19vcF9yb3V0ZUAzOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTQKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19zZW5kX3hfaW5uZXJzX3dpdGhfZmVlc19yb3V0ZUA0OgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTgKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weTo0CiAgICAvLyBjbGFzcyBJbm5lckZlZUNvbnRyYWN0KEFSQzRDb250cmFjdCk6CiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBidG9pCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weToxOAogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICBjYWxsc3ViIHNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19zZW5kX2lubmVyc193aXRoX2ZlZXNfcm91dGVANToKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjIzCiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgbm90IE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIG5vdCBjcmVhdGluZwogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NAogICAgLy8gY2xhc3MgSW5uZXJGZWVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgYnRvaQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgYnRvaQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MjMKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgY2FsbHN1YiBzZW5kX2lubmVyc193aXRoX2ZlZXMKICAgIGludGNfMCAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX3NlbmRfaW5uZXJzX3dpdGhfZmVlc18yX3JvdXRlQDY6CiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weTozNAogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIGlzIG5vdCBOb09wCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYXNzZXJ0IC8vIGNhbiBvbmx5IGNhbGwgd2hlbiBub3QgY3JlYXRpbmcKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjQKICAgIC8vIGNsYXNzIElubmVyRmVlQ29udHJhY3QoQVJDNENvbnRyYWN0KToKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGJ0b2kKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDIKICAgIGJ0b2kKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDMKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjM0CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIGNhbGxzdWIgc2VuZF9pbm5lcnNfd2l0aF9mZWVzXzIKICAgIGludGNfMCAvLyAxCiAgICByZXRzdWIKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A5OgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NAogICAgLy8gY2xhc3MgSW5uZXJGZWVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgdHhuIE9uQ29tcGxldGlvbgogICAgYm56IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VAMTMKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICBhc3NlcnQgLy8gY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBpbnRjXzAgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDEzOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NAogICAgLy8gY2xhc3MgSW5uZXJGZWVDb250cmFjdChBUkM0Q29udHJhY3QpOgogICAgaW50Y18yIC8vIDAKICAgIHJldHN1YgoKCi8vIHNtYXJ0X2NvbnRyYWN0cy50ZXN0X2NvbnRyYWN0LmNvbnRyYWN0LklubmVyRmVlQ29udHJhY3QuYnVybl9vcHMob3BfYnVkZ2V0OiB1aW50NjQpIC0+IHZvaWQ6CmJ1cm5fb3BzOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6NS02CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiBidXJuX29wcyhzZWxmLCBvcF9idWRnZXQ6IFVJbnQ2NCkgLT4gTm9uZToKICAgIHByb3RvIDEgMAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6Ny04CiAgICAvLyAjIFVzZXMgYXBwcm94IDYwIG9wIGJ1ZGdldCBwZXIgaXRlcmF0aW9uCiAgICAvLyBjb3VudCA9IG9wX2J1ZGdldCAvLyA2MAogICAgZnJhbWVfZGlnIC0xCiAgICBwdXNoaW50IDYwIC8vIDYwCiAgICAvCiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weTo5CiAgICAvLyBlbnN1cmVfYnVkZ2V0KG9wX2J1ZGdldCkKICAgIGZyYW1lX2RpZyAtMQogICAgaW50Y18yIC8vIDAKICAgIGNhbGxzdWIgZW5zdXJlX2J1ZGdldAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTAKICAgIC8vIGZvciBpIGluIHVyYW5nZShjb3VudCk6CiAgICBpbnRjXzIgLy8gMAoKYnVybl9vcHNfZm9yX2hlYWRlckAxOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTAKICAgIC8vIGZvciBpIGluIHVyYW5nZShjb3VudCk6CiAgICBmcmFtZV9kaWcgMQogICAgZnJhbWVfZGlnIDAKICAgIDwKICAgIGJ6IGJ1cm5fb3BzX2FmdGVyX2ZvckA0CiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weToxMQogICAgLy8gc3FydCA9IG9wLmJzcXJ0KEJpZ1VJbnQoaSkpCiAgICBmcmFtZV9kaWcgMQogICAgZHVwCiAgICBpdG9iCiAgICBic3FydAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTIKICAgIC8vIGFzc2VydChzcXJ0ID49IDApICMgUHJldmVudCBvcHRpbWlzZXIgcmVtb3ZpbmcgdGhlIHNxcnQKICAgIHB1c2hieXRlcyAweAogICAgYj49CiAgICBhc3NlcnQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjEwCiAgICAvLyBmb3IgaSBpbiB1cmFuZ2UoY291bnQpOgogICAgaW50Y18wIC8vIDEKICAgICsKICAgIGZyYW1lX2J1cnkgMQogICAgYiBidXJuX29wc19mb3JfaGVhZGVyQDEKCmJ1cm5fb3BzX2FmdGVyX2ZvckA0OgogICAgcmV0c3ViCgoKLy8gc21hcnRfY29udHJhY3RzLnRlc3RfY29udHJhY3QuY29udHJhY3QuSW5uZXJGZWVDb250cmFjdC5zZW5kX3hfaW5uZXJzX3dpdGhfZmVlcyhhcHBfaWQ6IHVpbnQ2NCwgZmVlczogYnl0ZXMpIC0+IHZvaWQ6CnNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzOgogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MTgtMTkKICAgIC8vIEBhcmM0LmFiaW1ldGhvZAogICAgLy8gZGVmIHNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzKHNlbGYsIGFwcF9pZDogVUludDY0LCBmZWVzOiBhcmM0LkR5bmFtaWNBcnJheVthcmM0LlVJbnQ2NF0pIC0+IE5vbmU6CiAgICBwcm90byAyIDAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjIwCiAgICAvLyBmb3IgZmVlIGluIGZlZXM6CiAgICBmcmFtZV9kaWcgLTEKICAgIGludGNfMiAvLyAwCiAgICBleHRyYWN0X3VpbnQxNgogICAgaW50Y18yIC8vIDAKCnNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzX2Zvcl9oZWFkZXJAMToKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjIwCiAgICAvLyBmb3IgZmVlIGluIGZlZXM6CiAgICBmcmFtZV9kaWcgMQogICAgZnJhbWVfZGlnIDAKICAgIDwKICAgIGJ6IHNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzX2FmdGVyX2ZvckA1CiAgICBmcmFtZV9kaWcgLTEKICAgIGV4dHJhY3QgMiAwCiAgICBmcmFtZV9kaWcgMQogICAgZHVwCiAgICBjb3ZlciAyCiAgICBpbnRjXzMgLy8gOAogICAgKgogICAgaW50Y18zIC8vIDgKICAgIGV4dHJhY3QzIC8vIG9uIGVycm9yOiBJbmRleCBhY2Nlc3MgaXMgb3V0IG9mIGJvdW5kcwogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MjEKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ25vX29wJywgYXBwX2lkPWFwcF9pZCwgZmVlPWZlZS5uYXRpdmUpCiAgICBpdHhuX2JlZ2luCiAgICBidG9pCiAgICBmcmFtZV9kaWcgLTIKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25JRAogICAgYnl0ZWNfMCAvLyBtZXRob2QgIm5vX29wKCl2b2lkIgogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbkFyZ3MKICAgIGludGNfMSAvLyBhcHBsCiAgICBpdHhuX2ZpZWxkIFR5cGVFbnVtCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgaXR4bl9zdWJtaXQKICAgIGludGNfMCAvLyAxCiAgICArCiAgICBmcmFtZV9idXJ5IDEKICAgIGIgc2VuZF94X2lubmVyc193aXRoX2ZlZXNfZm9yX2hlYWRlckAxCgpzZW5kX3hfaW5uZXJzX3dpdGhfZmVlc19hZnRlcl9mb3JANToKICAgIHJldHN1YgoKCi8vIHNtYXJ0X2NvbnRyYWN0cy50ZXN0X2NvbnRyYWN0LmNvbnRyYWN0LklubmVyRmVlQ29udHJhY3Quc2VuZF9pbm5lcnNfd2l0aF9mZWVzKGFwcF9pZF8xOiB1aW50NjQsIGFwcF9pZF8yOiB1aW50NjQsIGZlZXM6IGJ5dGVzKSAtPiB2b2lkOgpzZW5kX2lubmVyc193aXRoX2ZlZXM6CiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weToyMy0yNAogICAgLy8gQGFyYzQuYWJpbWV0aG9kCiAgICAvLyBkZWYgc2VuZF9pbm5lcnNfd2l0aF9mZWVzKHNlbGYsIGFwcF9pZF8xOiBVSW50NjQsIGFwcF9pZF8yOiBVSW50NjQsIGZlZXM6IGFyYzQuVHVwbGVbYXJjNC5VSW50NjQsIGFyYzQuVUludDY0LCBhcmM0LlVJbnQ2NCwgYXJjNC5VSW50NjQsIGFyYzQuRHluYW1pY0FycmF5W2FyYzQuVUludDY0XV0pIC0+IE5vbmU6CiAgICBwcm90byAzIDAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjI1CiAgICAvLyBhcmM0LmFiaV9jYWxsKCdub19vcCcsIGFwcF9pZD1hcHBfaWRfMSwgZmVlPWZlZXNbMF0ubmF0aXZlKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBleHRyYWN0IDAgOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGJ0b2kKICAgIGZyYW1lX2RpZyAtMwogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbklECiAgICBieXRlY18wIC8vIG1ldGhvZCAibm9fb3AoKXZvaWQiCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgaW50Y18xIC8vIGFwcGwKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGl0eG5fZmllbGQgRmVlCiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MjYKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ25vX29wJywgYXBwX2lkPWFwcF9pZF8xLCBmZWU9ZmVlc1sxXS5uYXRpdmUpCiAgICBpdHhuX2JlZ2luCiAgICBmcmFtZV9kaWcgLTEKICAgIGV4dHJhY3QgOCA4IC8vIG9uIGVycm9yOiBJbmRleCBhY2Nlc3MgaXMgb3V0IG9mIGJvdW5kcwogICAgYnRvaQogICAgZnJhbWVfZGlnIC0zCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uSUQKICAgIGJ5dGVjXzAgLy8gbWV0aG9kICJub19vcCgpdm9pZCIKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25BcmdzCiAgICBpbnRjXzEgLy8gYXBwbAogICAgaXR4bl9maWVsZCBUeXBlRW51bQogICAgaXR4bl9maWVsZCBGZWUKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weToyNy0zMQogICAgLy8gaXR4bi5QYXltZW50KAogICAgLy8gICAgIGFtb3VudD0wLAogICAgLy8gICAgIHJlY2VpdmVyPUdsb2JhbC5jdXJyZW50X2FwcGxpY2F0aW9uX2FkZHJlc3MsCiAgICAvLyAgICAgZmVlPWZlZXNbMl0ubmF0aXZlCiAgICAvLyApLnN1Ym1pdCgpCiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weTozMAogICAgLy8gZmVlPWZlZXNbMl0ubmF0aXZlCiAgICBmcmFtZV9kaWcgLTEKICAgIGV4dHJhY3QgMTYgOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGJ0b2kKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjI5CiAgICAvLyByZWNlaXZlcj1HbG9iYWwuY3VycmVudF9hcHBsaWNhdGlvbl9hZGRyZXNzLAogICAgZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKICAgIGl0eG5fZmllbGQgUmVjZWl2ZXIKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjI4CiAgICAvLyBhbW91bnQ9MCwKICAgIGludGNfMiAvLyAwCiAgICBpdHhuX2ZpZWxkIEFtb3VudAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MjcKICAgIC8vIGl0eG4uUGF5bWVudCgKICAgIGludGNfMCAvLyBwYXkKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGl0eG5fZmllbGQgRmVlCiAgICAvLyBzbWFydF9jb250cmFjdHMvdGVzdF9jb250cmFjdC9jb250cmFjdC5weToyNy0zMQogICAgLy8gaXR4bi5QYXltZW50KAogICAgLy8gICAgIGFtb3VudD0wLAogICAgLy8gICAgIHJlY2VpdmVyPUdsb2JhbC5jdXJyZW50X2FwcGxpY2F0aW9uX2FkZHJlc3MsCiAgICAvLyAgICAgZmVlPWZlZXNbMl0ubmF0aXZlCiAgICAvLyApLnN1Ym1pdCgpCiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MzIKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ3NlbmRfeF9pbm5lcnNfd2l0aF9mZWVzJywgYXBwX2lkXzIsIGZlZXNbNF0sIGFwcF9pZD1hcHBfaWRfMSwgZmVlPWZlZXNbM10ubmF0aXZlKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBleHRyYWN0IDI0IDggLy8gb24gZXJyb3I6IEluZGV4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBidG9pCiAgICBmcmFtZV9kaWcgLTIKICAgIGl0b2IKICAgIGZyYW1lX2RpZyAtMQogICAgcHVzaGludCAzMiAvLyAzMgogICAgZXh0cmFjdF91aW50MTYKICAgIGZyYW1lX2RpZyAtMQogICAgbGVuCiAgICBmcmFtZV9kaWcgLTEKICAgIGNvdmVyIDIKICAgIHN1YnN0cmluZzMKICAgIGZyYW1lX2RpZyAtMwogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbklECiAgICBieXRlY18xIC8vIG1ldGhvZCAic2VuZF94X2lubmVyc193aXRoX2ZlZXModWludDY0LHVpbnQ2NFtdKXZvaWQiCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgc3dhcAogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbkFyZ3MKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25BcmdzCiAgICBpbnRjXzEgLy8gYXBwbAogICAgaXR4bl9maWVsZCBUeXBlRW51bQogICAgaXR4bl9maWVsZCBGZWUKICAgIGl0eG5fc3VibWl0CiAgICByZXRzdWIKCgovLyBzbWFydF9jb250cmFjdHMudGVzdF9jb250cmFjdC5jb250cmFjdC5Jbm5lckZlZUNvbnRyYWN0LnNlbmRfaW5uZXJzX3dpdGhfZmVlc18yKGFwcF9pZF8xOiB1aW50NjQsIGFwcF9pZF8yOiB1aW50NjQsIGZlZXM6IGJ5dGVzKSAtPiB2b2lkOgpzZW5kX2lubmVyc193aXRoX2ZlZXNfMjoKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjM0LTM1CiAgICAvLyBAYXJjNC5hYmltZXRob2QKICAgIC8vIGRlZiBzZW5kX2lubmVyc193aXRoX2ZlZXNfMihzZWxmLCBhcHBfaWRfMTogVUludDY0LCBhcHBfaWRfMjogVUludDY0LCBmZWVzOiBhcmM0LlR1cGxlW2FyYzQuVUludDY0LCBhcmM0LlVJbnQ2NCwgYXJjNC5EeW5hbWljQXJyYXlbYXJjNC5VSW50NjRdLCBhcmM0LlVJbnQ2NCwgYXJjNC5VSW50NjQsIGFyYzQuRHluYW1pY0FycmF5W2FyYzQuVUludDY0XV0pIC0+IE5vbmU6CiAgICBwcm90byAzIDAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy90ZXN0X2NvbnRyYWN0L2NvbnRyYWN0LnB5OjM2CiAgICAvLyBhcmM0LmFiaV9jYWxsKCdub19vcCcsIGFwcF9pZD1hcHBfaWRfMSwgZmVlPWZlZXNbMF0ubmF0aXZlKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBleHRyYWN0IDAgOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGJ0b2kKICAgIGZyYW1lX2RpZyAtMwogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbklECiAgICBieXRlY18wIC8vIG1ldGhvZCAibm9fb3AoKXZvaWQiCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgaW50Y18xIC8vIGFwcGwKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGl0eG5fZmllbGQgRmVlCiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MzcKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ3NlbmRfeF9pbm5lcnNfd2l0aF9mZWVzJywgYXBwX2lkXzIsIGZlZXNbMl0sIGFwcF9pZD1hcHBfaWRfMSwgZmVlPWZlZXNbMV0ubmF0aXZlKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBleHRyYWN0IDggOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGJ0b2kKICAgIGZyYW1lX2RpZyAtMgogICAgaXRvYgogICAgZnJhbWVfZGlnIC0xCiAgICBwdXNoaW50IDE2IC8vIDE2CiAgICBleHRyYWN0X3VpbnQxNgogICAgZnJhbWVfZGlnIC0xCiAgICBwdXNoaW50IDM0IC8vIDM0CiAgICBleHRyYWN0X3VpbnQxNgogICAgZnJhbWVfZGlnIC0xCiAgICB1bmNvdmVyIDIKICAgIGRpZyAyCiAgICBzdWJzdHJpbmczCiAgICBmcmFtZV9kaWcgLTMKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25JRAogICAgYnl0ZWNfMSAvLyBtZXRob2QgInNlbmRfeF9pbm5lcnNfd2l0aF9mZWVzKHVpbnQ2NCx1aW50NjRbXSl2b2lkIgogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbkFyZ3MKICAgIGRpZyAyCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbkFyZ3MKICAgIGludGNfMSAvLyBhcHBsCiAgICBpdHhuX2ZpZWxkIFR5cGVFbnVtCiAgICB1bmNvdmVyIDIKICAgIGl0eG5fZmllbGQgRmVlCiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MzgKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ25vX29wJywgYXBwX2lkPWFwcF9pZF8xLCBmZWU9ZmVlc1szXS5uYXRpdmUpCiAgICBpdHhuX2JlZ2luCiAgICBmcmFtZV9kaWcgLTEKICAgIGV4dHJhY3QgMTggOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGJ0b2kKICAgIGZyYW1lX2RpZyAtMwogICAgaXR4bl9maWVsZCBBcHBsaWNhdGlvbklECiAgICBieXRlY18wIC8vIG1ldGhvZCAibm9fb3AoKXZvaWQiCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgaW50Y18xIC8vIGFwcGwKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGl0eG5fZmllbGQgRmVlCiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL3Rlc3RfY29udHJhY3QvY29udHJhY3QucHk6MzkKICAgIC8vIGFyYzQuYWJpX2NhbGwoJ3NlbmRfeF9pbm5lcnNfd2l0aF9mZWVzJywgYXBwX2lkXzIsIGZlZXNbNV0sIGFwcF9pZD1hcHBfaWRfMSwgZmVlPWZlZXNbNF0ubmF0aXZlKQogICAgaXR4bl9iZWdpbgogICAgZnJhbWVfZGlnIC0xCiAgICBleHRyYWN0IDI2IDggLy8gb24gZXJyb3I6IEluZGV4IGFjY2VzcyBpcyBvdXQgb2YgYm91bmRzCiAgICBidG9pCiAgICBmcmFtZV9kaWcgLTEKICAgIGxlbgogICAgZnJhbWVfZGlnIC0xCiAgICB1bmNvdmVyIDMKICAgIHVuY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgZnJhbWVfZGlnIC0zCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uSUQKICAgIGJ5dGVjXzEgLy8gbWV0aG9kICJzZW5kX3hfaW5uZXJzX3dpdGhfZmVlcyh1aW50NjQsdWludDY0W10pdm9pZCIKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25BcmdzCiAgICB1bmNvdmVyIDIKICAgIGl0eG5fZmllbGQgQXBwbGljYXRpb25BcmdzCiAgICBpdHhuX2ZpZWxkIEFwcGxpY2F0aW9uQXJncwogICAgaW50Y18xIC8vIGFwcGwKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGl0eG5fZmllbGQgRmVlCiAgICBpdHhuX3N1Ym1pdAogICAgcmV0c3ViCgoKLy8gX3B1eWFfbGliLnV0aWwuZW5zdXJlX2J1ZGdldChyZXF1aXJlZF9idWRnZXQ6IHVpbnQ2NCwgZmVlX3NvdXJjZTogdWludDY0KSAtPiB2b2lkOgplbnN1cmVfYnVkZ2V0OgogICAgcHJvdG8gMiAwCiAgICBmcmFtZV9kaWcgLTIKICAgIHB1c2hpbnQgMTAgLy8gMTAKICAgICsKCmVuc3VyZV9idWRnZXRfd2hpbGVfdG9wQDE6CiAgICBmcmFtZV9kaWcgMAogICAgZ2xvYmFsIE9wY29kZUJ1ZGdldAogICAgPgogICAgYnogZW5zdXJlX2J1ZGdldF9hZnRlcl93aGlsZUA3CiAgICBpdHhuX2JlZ2luCiAgICBpbnRjXzEgLy8gYXBwbAogICAgaXR4bl9maWVsZCBUeXBlRW51bQogICAgcHVzaGludCA1IC8vIERlbGV0ZUFwcGxpY2F0aW9uCiAgICBpdHhuX2ZpZWxkIE9uQ29tcGxldGlvbgogICAgYnl0ZWNfMiAvLyAweDA2ODEwMQogICAgaXR4bl9maWVsZCBBcHByb3ZhbFByb2dyYW0KICAgIGJ5dGVjXzIgLy8gMHgwNjgxMDEKICAgIGl0eG5fZmllbGQgQ2xlYXJTdGF0ZVByb2dyYW0KICAgIGZyYW1lX2RpZyAtMQogICAgc3dpdGNoIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfMEAzIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfMUA0CiAgICBiIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2CgplbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlXzBAMzoKICAgIGludGNfMiAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgYiBlbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlX25leHRANgoKZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV8xQDQ6CiAgICBnbG9iYWwgTWluVHhuRmVlCiAgICBpdHhuX2ZpZWxkIEZlZQoKZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV9uZXh0QDY6CiAgICBpdHhuX3N1Ym1pdAogICAgYiBlbnN1cmVfYnVkZ2V0X3doaWxlX3RvcEAxCgplbnN1cmVfYnVkZ2V0X2FmdGVyX3doaWxlQDc6CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgpzbWFydF9jb250cmFjdHMudGVzdF9jb250cmFjdC5jb250cmFjdC5Jbm5lckZlZUNvbnRyYWN0LmNsZWFyX3N0YXRlX3Byb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/example-contracts/inner-fee/contract.py b/tests/example-contracts/inner-fee/contract.py new file mode 100644 index 00000000..c57cbeda --- /dev/null +++ b/tests/example-contracts/inner-fee/contract.py @@ -0,0 +1,49 @@ +from algopy import ( + ARC4Contract, + BigUInt, + Global, + UInt64, + arc4, + ensure_budget, + itxn, + op, + urange, +) + + +class InnerFeeContract(ARC4Contract): + @arc4.abimethod + def burn_ops(self, op_budget: UInt64) -> None: + # Uses approx 60 op budget per iteration + count = op_budget // 60 + ensure_budget(op_budget) + for i in urange(count): + sqrt = op.bsqrt(BigUInt(i)) + assert(sqrt >= 0) # Prevent optimiser removing the sqrt + + @arc4.abimethod + def no_op(self) -> None: + pass + + @arc4.abimethod + def send_x_inners_with_fees(self, app_id: UInt64, fees: arc4.DynamicArray[arc4.UInt64]) -> None: + for fee in fees: + arc4.abi_call('no_op', app_id=app_id, fee=fee.native) + + @arc4.abimethod + def send_inners_with_fees(self, app_id_1: UInt64, app_id_2: UInt64, fees: arc4.Tuple[arc4.UInt64, arc4.UInt64, arc4.UInt64, arc4.UInt64, arc4.DynamicArray[arc4.UInt64]]) -> None: + arc4.abi_call('no_op', app_id=app_id_1, fee=fees[0].native) + arc4.abi_call('no_op', app_id=app_id_1, fee=fees[1].native) + itxn.Payment( + amount=0, + receiver=Global.current_application_address, + fee=fees[2].native + ).submit() + arc4.abi_call('send_x_inners_with_fees', app_id_2, fees[4], app_id=app_id_1, fee=fees[3].native) + + @arc4.abimethod + def send_inners_with_fees_2(self, app_id_1: UInt64, app_id_2: UInt64, fees: arc4.Tuple[arc4.UInt64, arc4.UInt64, arc4.DynamicArray[arc4.UInt64], arc4.UInt64, arc4.UInt64, arc4.DynamicArray[arc4.UInt64]]) -> None: + arc4.abi_call('no_op', app_id=app_id_1, fee=fees[0].native) + arc4.abi_call('send_x_inners_with_fees', app_id_2, fees[2], app_id=app_id_1, fee=fees[1].native) + arc4.abi_call('no_op', app_id=app_id_1, fee=fees[3].native) + arc4.abi_call('send_x_inners_with_fees', app_id_2, fees[5], app_id=app_id_1, fee=fees[4].native) From 68674c02c7e83171bf00ad97a2cc51243b6f5994 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 24 Jan 2025 16:53:59 -0500 Subject: [PATCH 33/38] ErrorTransformerError and minor touch-ups --- .../types_composer.TransactionComposer.md | 133 ++++++++++-------- .../types_composer.BuiltTransactions.md | 6 +- docs/code/modules/types_composer.md | 2 +- src/types/composer.ts | 58 ++++---- 4 files changed, 115 insertions(+), 84 deletions(-) diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index 1960f59c..7a35faf3 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -69,6 +69,7 @@ TransactionComposer helps you compose and execute transactions as a transaction - [registerErrorTransformer](types_composer.TransactionComposer.md#registererrortransformer) - [send](types_composer.TransactionComposer.md#send) - [simulate](types_composer.TransactionComposer.md#simulate) +- [transformError](types_composer.TransactionComposer.md#transformerror) - [arc2Note](types_composer.TransactionComposer.md#arc2note) ## Constructors @@ -91,7 +92,7 @@ Create a `TransactionComposer`. #### Defined in -[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) +[src/types/composer.ts:608](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L608) ## Properties @@ -103,7 +104,7 @@ The algod client used by the composer. #### Defined in -[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) +[src/types/composer.ts:564](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L564) ___ @@ -113,7 +114,7 @@ ___ #### Defined in -[src/types/composer.ts:572](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L572) +[src/types/composer.ts:578](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L578) ___ @@ -125,7 +126,7 @@ The ATC used to compose the group #### Defined in -[src/types/composer.ts:547](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L547) +[src/types/composer.ts:553](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L553) ___ @@ -137,7 +138,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L567) +[src/types/composer.ts:573](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L573) ___ @@ -149,7 +150,7 @@ Whether the validity window was explicitly set on construction #### Defined in -[src/types/composer.ts:570](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L570) +[src/types/composer.ts:576](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L576) ___ @@ -159,7 +160,7 @@ ___ #### Defined in -[src/types/composer.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L574) +[src/types/composer.ts:580](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L580) ___ @@ -185,7 +186,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:564](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L564) +[src/types/composer.ts:570](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L570) ___ @@ -205,7 +206,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:561](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L561) +[src/types/composer.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L567) ___ @@ -218,7 +219,7 @@ This is set using the value of either maxFee or staticFee. #### Defined in -[src/types/composer.ts:552](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L552) +[src/types/composer.ts:558](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L558) ___ @@ -230,7 +231,7 @@ Transactions that have not yet been composed #### Defined in -[src/types/composer.ts:555](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L555) +[src/types/composer.ts:561](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L561) ___ @@ -242,7 +243,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) +[src/types/composer.ts:550](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L550) ## Methods @@ -270,7 +271,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:753](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L753) +[src/types/composer.ts:781](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L781) ___ @@ -296,7 +297,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:802](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L802) +[src/types/composer.ts:830](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L830) ___ @@ -347,7 +348,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L712) +[src/types/composer.ts:740](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L740) ___ @@ -373,7 +374,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:766](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L766) +[src/types/composer.ts:794](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L794) ___ @@ -399,7 +400,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:738](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L738) +[src/types/composer.ts:766](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L766) ___ @@ -425,7 +426,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:790](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L790) +[src/types/composer.ts:818](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L818) ___ @@ -471,7 +472,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:725](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L725) +[src/types/composer.ts:753](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L753) ___ @@ -497,7 +498,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:778](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L778) +[src/types/composer.ts:806](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L806) ___ @@ -521,7 +522,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:644](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L644) +[src/types/composer.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L672) ___ @@ -545,7 +546,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:633](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L633) +[src/types/composer.ts:661](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L661) ___ @@ -569,7 +570,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L666) +[src/types/composer.ts:694](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L694) ___ @@ -593,7 +594,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:655](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L655) +[src/types/composer.ts:683](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L683) ___ @@ -617,7 +618,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:688](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L688) +[src/types/composer.ts:716](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L716) ___ @@ -641,7 +642,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:699](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L699) +[src/types/composer.ts:727](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L727) ___ @@ -665,7 +666,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L677) +[src/types/composer.ts:705](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L705) ___ @@ -689,7 +690,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:834](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L834) +[src/types/composer.ts:862](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L862) ___ @@ -713,7 +714,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:823](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L823) +[src/types/composer.ts:851](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L851) ___ @@ -737,7 +738,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:812](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L812) +[src/types/composer.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L840) ___ @@ -761,7 +762,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:622](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L622) +[src/types/composer.ts:650](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L650) ___ @@ -786,7 +787,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:607](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L607) +[src/types/composer.ts:635](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L635) ___ @@ -809,7 +810,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1354](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1354) +[src/types/composer.ts:1382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1382) ___ @@ -830,7 +831,7 @@ ___ #### Defined in -[src/types/composer.ts:1173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1173) +[src/types/composer.ts:1201](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1201) ___ @@ -851,7 +852,7 @@ ___ #### Defined in -[src/types/composer.ts:1130](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1130) +[src/types/composer.ts:1158](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1158) ___ @@ -872,7 +873,7 @@ ___ #### Defined in -[src/types/composer.ts:1112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1112) +[src/types/composer.ts:1140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1140) ___ @@ -893,7 +894,7 @@ ___ #### Defined in -[src/types/composer.ts:1143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1143) +[src/types/composer.ts:1171](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1171) ___ @@ -914,7 +915,7 @@ ___ #### Defined in -[src/types/composer.ts:1151](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1151) +[src/types/composer.ts:1179](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1179) ___ @@ -935,7 +936,7 @@ ___ #### Defined in -[src/types/composer.ts:1161](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1161) +[src/types/composer.ts:1189](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1189) ___ @@ -957,7 +958,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### Defined in -[src/types/composer.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L840) +[src/types/composer.ts:868](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L868) ___ @@ -978,7 +979,7 @@ ___ #### Defined in -[src/types/composer.ts:1224](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1224) +[src/types/composer.ts:1252](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1252) ___ @@ -1002,7 +1003,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### Defined in -[src/types/composer.ts:920](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L920) +[src/types/composer.ts:948](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L948) ___ @@ -1023,7 +1024,7 @@ ___ #### Defined in -[src/types/composer.ts:1102](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1102) +[src/types/composer.ts:1130](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1130) ___ @@ -1041,7 +1042,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1302) +[src/types/composer.ts:1330](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1330) ___ @@ -1064,7 +1065,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### Defined in -[src/types/composer.ts:1247](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1247) +[src/types/composer.ts:1275](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1275) ___ @@ -1085,7 +1086,7 @@ ___ #### Defined in -[src/types/composer.ts:1274](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1274) +[src/types/composer.ts:1302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1302) ___ @@ -1113,7 +1114,7 @@ ___ #### Defined in -[src/types/composer.ts:862](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L862) +[src/types/composer.ts:890](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L890) ___ @@ -1129,7 +1130,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1341](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1341) +[src/types/composer.ts:1369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1369) ___ @@ -1159,7 +1160,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1455](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1455) +[src/types/composer.ts:1472](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1472) ___ @@ -1178,7 +1179,7 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1389](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1389) +[src/types/composer.ts:1417](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1417) ___ @@ -1202,7 +1203,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:596](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L596) +[src/types/composer.ts:624](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L624) ___ @@ -1226,7 +1227,7 @@ The execution result #### Defined in -[src/types/composer.ts:1399](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1399) +[src/types/composer.ts:1427](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1427) ___ @@ -1244,7 +1245,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1463](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1463) +[src/types/composer.ts:1480](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1480) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1266,7 +1267,7 @@ The simulation result #### Defined in -[src/types/composer.ts:1464](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1464) +[src/types/composer.ts:1481](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1481) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1289,7 +1290,27 @@ The simulation result #### Defined in -[src/types/composer.ts:1467](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1467) +[src/types/composer.ts:1484](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1484) + +___ + +### transformError + +▸ **transformError**(`originalError`): `Promise`\<`unknown`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `originalError` | `unknown` | + +#### Returns + +`Promise`\<`unknown`\> + +#### Defined in + +[src/types/composer.ts:582](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L582) ___ @@ -1315,4 +1336,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:1549](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1549) +[src/types/composer.ts:1559](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1559) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 8931a491..cb8f03b9 100644 --- a/docs/code/interfaces/types_composer.BuiltTransactions.md +++ b/docs/code/interfaces/types_composer.BuiltTransactions.md @@ -24,7 +24,7 @@ Any `ABIMethod` objects associated with any of the transactions in a map keyed b #### Defined in -[src/types/composer.ts:536](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L536) +[src/types/composer.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L542) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:538](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L538) +[src/types/composer.ts:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:534](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L534) +[src/types/composer.ts:540](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L540) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index e332de75..f591d760 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -441,7 +441,7 @@ Parameters to create an `TransactionComposer`. #### Defined in -[src/types/composer.ts:494](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L494) +[src/types/composer.ts:500](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L500) ___ diff --git a/src/types/composer.ts b/src/types/composer.ts index 15113cdc..ddc0ac30 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -484,9 +484,15 @@ export type Txn = */ export type ErrorTransformer = (error: Error) => Promise -class BadTransformer extends Error { - constructor(originalError: unknown) { - super(`An error transformer returned a non-error value. The original error before any transformation: ${originalError}`) +class NonErrorTransformer extends Error { + constructor(originalError: unknown, value: unknown) { + super(`An error transformer returned a non-error value: ${value}. The original error before any transformation: ${originalError}`) + } +} + +class ErrorTransformerError extends Error { + constructor(originalError: Error, cause: unknown) { + super(`An error transformer threw an error: ${cause}. The original error before any transformation: ${originalError} `, { cause }) } } @@ -573,6 +579,28 @@ export class TransactionComposer { private errorTransformers: ErrorTransformer[] + private async transformError(originalError: unknown): Promise { + // Transformers only work with Error instances, so immediately return anything else + if (!(originalError instanceof Error)) { + return originalError + } + + let transformedError = originalError + + for (const transformer of this.errorTransformers) { + try { + transformedError = await transformer(transformedError) + if (!(transformedError instanceof Error)) { + return new NonErrorTransformer(originalError, transformedError) + } + } catch (errorFromTransformer) { + return new ErrorTransformerError(originalError, errorFromTransformer) + } + } + + return transformedError + } + /** * Create a `TransactionComposer`. * @param params The configuration for this composer @@ -1428,18 +1456,7 @@ export class TransactionComposer { this.algod, ) } catch (originalError: unknown) { - // Transformers expect an Error, so don't transform the exception if it's not an Error - if (!(originalError instanceof Error)) throw originalError - - let error = originalError - for (const transformer of this.errorTransformers) { - if (!(error instanceof Error)) { - throw new BadTransformer(originalError) - } - error = await transformer(error) - } - - throw error + throw await this.transformError(originalError) } } @@ -1508,20 +1525,13 @@ export class TransactionComposer { const failedGroup = simulateResponse?.txnGroups[0] if (failedGroup?.failureMessage) { const errorMessage = `Transaction failed at transaction(s) ${failedGroup.failedAt?.join(', ') || 'unknown'} in the group. ${failedGroup.failureMessage}` - let error = new Error(errorMessage) + const error = new Error(errorMessage) if (Config.debug) { await Config.events.emitAsync(EventType.TxnGroupSimulated, { simulateResponse }) } - for (const transformer of this.errorTransformers) { - if (!(error instanceof Error)) { - break - } - error = await transformer(error) - } - - throw error + throw await this.transformError(error) } if (Config.debug && Config.traceAll) { From e6238f72bb2672f2f9a3f7935a7f6f28f96d782e Mon Sep 17 00:00:00 2001 From: Joe Polny <50534337+joe-p@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:27:46 -0500 Subject: [PATCH 34/38] fix typos Co-authored-by: Tristan Menzel --- src/types/composer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index 7d87f8a7..6d1d1241 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -477,7 +477,7 @@ export type Txn = | ((AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall) & { type: 'methodCall' }) /** - * A function that transform an error into a new error. + * A function that transforms an error into a new error. * * In most cases, an ErrorTransformer should first check if it can or should transform the error * and return the input error if it cannot or should not transform it. @@ -510,7 +510,7 @@ export type TransactionComposerParams = { defaultValidityWindow?: bigint /** An existing `AppManager` to use to manage app compilation and cache compilation results. * - * If not specified than an ephemeral one will be created. + * If not specified then an ephemeral one will be created. */ appManager?: AppManager /** From 6b1a8dc10b84ad069f5772a42b3c78a771961477 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Mon, 3 Feb 2025 13:30:35 -0500 Subject: [PATCH 35/38] rename InvalidErrorTransformerValue --- src/types/composer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/composer.ts b/src/types/composer.ts index 6d1d1241..75f1b08a 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -484,7 +484,7 @@ export type Txn = */ export type ErrorTransformer = (error: Error) => Promise -class NonErrorTransformer extends Error { +class InvalidErrorTransformerValue extends Error { constructor(originalError: unknown, value: unknown) { super(`An error transformer returned a non-error value: ${value}. The original error before any transformation: ${originalError}`) } @@ -591,7 +591,7 @@ export class TransactionComposer { try { transformedError = await transformer(transformedError) if (!(transformedError instanceof Error)) { - return new NonErrorTransformer(originalError, transformedError) + return new InvalidErrorTransformerValue(originalError, transformedError) } } catch (errorFromTransformer) { return new ErrorTransformerError(originalError, errorFromTransformer) From bf9dc0442072c688f8312455ee37c8b6f34931a2 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Mon, 3 Feb 2025 13:31:52 -0500 Subject: [PATCH 36/38] add docstring to InterfaceOf --- src/types/instance-of.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types/instance-of.ts b/src/types/instance-of.ts index fed80343..cbede7bc 100644 --- a/src/types/instance-of.ts +++ b/src/types/instance-of.ts @@ -1,3 +1,6 @@ +/** + * A type that represents the interface of the class given as the generic parameter + */ export type InterfaceOf = { [Member in keyof ClassType]: ClassType[Member] } From 0740e85a6301d4494e3b7328b49db56e77acd4f0 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Mon, 3 Feb 2025 13:32:09 -0500 Subject: [PATCH 37/38] typedoc --- docs/code/modules/types_composer.md | 4 ++-- docs/code/modules/types_instance_of.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index f591d760..de64ceae 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -324,7 +324,7 @@ ___ Ƭ **ErrorTransformer**: (`error`: `Error`) => `Promise`\<`Error`\> -A function that transform an error into a new error. +A function that transforms an error into a new error. In most cases, an ErrorTransformer should first check if it can or should transform the error and return the input error if it cannot or should not transform it. @@ -433,7 +433,7 @@ Parameters to create an `TransactionComposer`. | Name | Type | Description | | :------ | :------ | :------ | | `algod` | `algosdk.Algodv2` | The algod client to use to get suggestedParams and send the transaction group | -| `appManager?` | [`AppManager`](../classes/types_app_manager.AppManager.md) | An existing `AppManager` to use to manage app compilation and cache compilation results. If not specified than an ephemeral one will be created. | +| `appManager?` | [`AppManager`](../classes/types_app_manager.AppManager.md) | An existing `AppManager` to use to manage app compilation and cache compilation results. If not specified then an ephemeral one will be created. | | `defaultValidityWindow?` | `bigint` | How many rounds a transaction should be valid for by default; if not specified then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet). | | `errorTransformers?` | [`ErrorTransformer`](types_composer.md#errortransformer)[] | An array of error transformers to use when an error is caught in simulate or execute callbacks can later be registered with `registerErrorTransformer` | | `getSigner` | (`address`: `string` \| `Address`) => `algosdk.TransactionSigner` | - | diff --git a/docs/code/modules/types_instance_of.md b/docs/code/modules/types_instance_of.md index e7513310..6375dfe8 100644 --- a/docs/code/modules/types_instance_of.md +++ b/docs/code/modules/types_instance_of.md @@ -14,6 +14,8 @@ Ƭ **InterfaceOf**\<`ClassType`\>: \{ [Member in keyof ClassType]: ClassType[Member] } +A type that represents the interface of the class given as the generic parameter + #### Type parameters | Name | @@ -22,4 +24,4 @@ #### Defined in -[src/types/instance-of.ts:1](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/instance-of.ts#L1) +[src/types/instance-of.ts:4](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/instance-of.ts#L4) From 1b1f6a3a1ac83cac1a15c9568025fcc5f7c4f655 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Fri, 9 May 2025 07:17:14 -0400 Subject: [PATCH 38/38] chore: npx audit fix --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e498790..045449c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12276,9 +12276,9 @@ } }, "node_modules/vite": { - "version": "5.4.18", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.18.tgz", - "integrity": "sha512-1oDcnEp3lVyHCuQ2YFelM4Alm2o91xNoMncRm1U7S+JdYfYOvbiGZ3/CxGttrOu2M/KcGz7cRC2DoNUA6urmMA==", + "version": "5.4.19", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", + "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d3ae73ba..7dd773e5 100644 --- a/package.json +++ b/package.json @@ -171,4 +171,4 @@ "@semantic-release/github" ] } -} \ No newline at end of file +}