diff --git a/docs/capabilities/typed-app-clients.md b/docs/capabilities/typed-app-clients.md index a2c8b73e..7e899274 100644 --- a/docs/capabilities/typed-app-clients.md +++ b/docs/capabilities/typed-app-clients.md @@ -39,7 +39,7 @@ const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractCl }) const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, { creatorAddress: 'CREATORADDRESS', - // Override the name (by default uses the name in the ARC-32 app spec) + // Override the name (by default uses the name in the ARC-32 / ARC-56 app spec) name: 'contract-name', }) diff --git a/docs/code/classes/types_app_client.AppClient.md b/docs/code/classes/types_app_client.AppClient.md index 35cc8349..8ec1a62f 100644 --- a/docs/code/classes/types_app_client.AppClient.md +++ b/docs/code/classes/types_app_client.AppClient.md @@ -68,6 +68,7 @@ state for a specific deployed instance of an app (with a known app ID). - [getStateMethods](types_app_client.AppClient.md#getstatemethods) - [handleCallErrors](types_app_client.AppClient.md#handlecallerrors) - [importSourceMaps](types_app_client.AppClient.md#importsourcemaps) +- [newGroup](types_app_client.AppClient.md#newgroup) - [parseMethodCallReturn](types_app_client.AppClient.md#parsemethodcallreturn) - [compile](types_app_client.AppClient.md#compile-1) - [exposeLogicError](types_app_client.AppClient.md#exposelogicerror-1) @@ -289,7 +290,7 @@ The app address of the app instance this client is linked to. #### Defined in -[src/types/app-client.ts:517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L517) +[src/types/app-client.ts:522](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L522) ___ @@ -305,7 +306,7 @@ The ID of the app instance this client is linked to. #### Defined in -[src/types/app-client.ts:512](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L512) +[src/types/app-client.ts:517](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L517) ___ @@ -321,7 +322,7 @@ The name of the app (from the ARC-32 / ARC-56 app spec). #### Defined in -[src/types/app-client.ts:522](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L522) +[src/types/app-client.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L527) ___ @@ -337,7 +338,7 @@ The ARC-56 app spec being used #### Defined in -[src/types/app-client.ts:527](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L527) +[src/types/app-client.ts:532](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L532) ___ @@ -353,7 +354,7 @@ Get parameters to define transactions to the current app #### Defined in -[src/types/app-client.ts:532](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L532) +[src/types/app-client.ts:537](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L537) ___ @@ -369,7 +370,7 @@ Send calls to the current app #### Defined in -[src/types/app-client.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L542) +[src/types/app-client.ts:547](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L547) ___ @@ -397,7 +398,7 @@ ___ #### Defined in -[src/types/app-client.ts:546](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L546) +[src/types/app-client.ts:551](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L551) ___ @@ -413,7 +414,7 @@ Get transactions for the current app #### Defined in -[src/types/app-client.ts:537](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L537) +[src/types/app-client.ts:542](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L542) ## Methods @@ -441,7 +442,7 @@ Will store any generated source maps for later use in debugging. #### Defined in -[src/types/app-client.ts:1122](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1122) +[src/types/app-client.ts:1127](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1127) ___ @@ -459,7 +460,7 @@ The source maps #### Defined in -[src/types/app-client.ts:672](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L672) +[src/types/app-client.ts:677](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L677) ___ @@ -485,7 +486,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:660](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L660) +[src/types/app-client.ts:665](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L665) ___ @@ -525,7 +526,7 @@ The result of the funding #### 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:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L574) ___ @@ -549,7 +550,7 @@ A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`] #### Defined in -[src/types/app-client.ts:700](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L700) +[src/types/app-client.ts:705](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L705) ___ @@ -577,7 +578,7 @@ ___ #### Defined in -[src/types/app-client.ts:1156](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1156) +[src/types/app-client.ts:1161](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1161) ___ @@ -605,7 +606,7 @@ ___ #### Defined in -[src/types/app-client.ts:1144](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1144) +[src/types/app-client.ts:1149](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1149) ___ @@ -628,7 +629,7 @@ ___ #### 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:861](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L861) ___ @@ -651,7 +652,7 @@ ___ #### Defined in -[src/types/app-client.ts:920](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L920) +[src/types/app-client.ts:925](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L925) ___ @@ -674,7 +675,7 @@ ___ #### Defined in -[src/types/app-client.ts:891](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L891) +[src/types/app-client.ts:896](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L896) ___ @@ -695,7 +696,7 @@ ___ #### Defined in -[src/types/app-client.ts:1180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1180) +[src/types/app-client.ts:1185](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1185) ___ @@ -713,7 +714,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:594](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L594) +[src/types/app-client.ts:599](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L599) ___ @@ -737,7 +738,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:603](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L603) +[src/types/app-client.ts:608](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L608) ___ @@ -762,7 +763,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:613](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L613) +[src/types/app-client.ts:618](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L618) ___ @@ -787,7 +788,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### 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:632](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L632) ___ @@ -813,7 +814,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:643](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L643) +[src/types/app-client.ts:648](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L648) ___ @@ -831,7 +832,7 @@ The global state #### Defined in -[src/types/app-client.ts:577](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L577) +[src/types/app-client.ts:582](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L582) ___ @@ -855,7 +856,7 @@ The local state #### Defined in -[src/types/app-client.ts:586](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L586) +[src/types/app-client.ts:591](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L591) ___ @@ -878,7 +879,7 @@ ___ #### Defined in -[src/types/app-client.ts:949](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L949) +[src/types/app-client.ts:954](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L954) ___ @@ -901,7 +902,7 @@ ___ #### Defined in -[src/types/app-client.ts:988](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L988) +[src/types/app-client.ts:993](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L993) ___ @@ -924,7 +925,7 @@ ___ #### Defined in -[src/types/app-client.ts:1074](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1074) +[src/types/app-client.ts:1079](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1079) ___ @@ -947,7 +948,7 @@ if none provided and throws an error if neither provided #### Defined in -[src/types/app-client.ts:1137](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1137) +[src/types/app-client.ts:1142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1142) ___ @@ -976,7 +977,7 @@ ___ #### Defined in -[src/types/app-client.ts:1252](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1252) +[src/types/app-client.ts:1257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1257) ___ @@ -1004,7 +1005,7 @@ Make the given call and catch any errors, augmenting with debugging information #### Defined in -[src/types/app-client.ts:1172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1172) +[src/types/app-client.ts:1177](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1177) ___ @@ -1026,7 +1027,23 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:689](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L689) +[src/types/app-client.ts:694](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L694) + +___ + +### newGroup + +▸ **newGroup**(): [`default`](types_composer.default.md) + +Start a new `AlgoKitComposer` transaction group + +#### Returns + +[`default`](types_composer.default.md) + +#### Defined in + +[src/types/app-client.ts:452](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L452) ___ @@ -1061,7 +1078,7 @@ The smart contract response with an updated return value #### Defined in -[src/types/app-client.ts:714](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L714) +[src/types/app-client.ts:719](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L719) ___ @@ -1091,7 +1108,7 @@ Will store any generated source maps for later use in debugging. #### Defined in -[src/types/app-client.ts:782](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L782) +[src/types/app-client.ts:787](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L787) ___ @@ -1121,7 +1138,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:732](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L732) +[src/types/app-client.ts:737](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L737) ___ @@ -1153,7 +1170,7 @@ using AlgoKit app deployment semantics (i.e. looking for the app creation transa #### Defined in -[src/types/app-client.ts:456](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L456) +[src/types/app-client.ts:461](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L461) ___ @@ -1185,7 +1202,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:478](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L478) +[src/types/app-client.ts:483](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L483) ___ @@ -1212,7 +1229,7 @@ It does this by replacing any `undefined` values with the equivalent default val #### Defined in -[src/types/app-client.ts:835](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L835) +[src/types/app-client.ts:840](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L840) ___ @@ -1237,4 +1254,4 @@ The normalised ARC-56 contract object #### Defined in -[src/types/app-client.ts:505](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L505) +[src/types/app-client.ts:510](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L510) diff --git a/docs/code/classes/types_app_client.ApplicationClient.md b/docs/code/classes/types_app_client.ApplicationClient.md index e09eb224..79049bac 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:1379](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1379) +[src/types/app-client.ts:1384](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1384) ## Properties @@ -102,7 +102,7 @@ Create a new ApplicationClient instance #### Defined in -[src/types/app-client.ts:1362](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1362) +[src/types/app-client.ts:1367](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1367) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/types/app-client.ts:1361](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1361) +[src/types/app-client.ts:1366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1366) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[src/types/app-client.ts:1364](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1364) +[src/types/app-client.ts:1369](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1369) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[src/types/app-client.ts:1366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1366) +[src/types/app-client.ts:1371](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1371) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[src/types/app-client.ts:1367](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1367) +[src/types/app-client.ts:1372](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1372) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[src/types/app-client.ts:1363](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1363) +[src/types/app-client.ts:1368](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1368) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[src/types/app-client.ts:1353](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1353) +[src/types/app-client.ts:1358](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1358) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[src/types/app-client.ts:1355](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1355) +[src/types/app-client.ts:1360](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1360) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[src/types/app-client.ts:1359](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1359) +[src/types/app-client.ts:1364](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1364) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[src/types/app-client.ts:1358](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1358) +[src/types/app-client.ts:1363](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1363) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[src/types/app-client.ts:1354](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1354) +[src/types/app-client.ts:1359](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1359) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[src/types/app-client.ts:1357](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1357) +[src/types/app-client.ts:1362](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1362) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[src/types/app-client.ts:1356](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1356) +[src/types/app-client.ts:1361](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1361) ## Methods @@ -250,7 +250,7 @@ Issues a no_op (normal) call to the app. #### Defined in -[src/types/app-client.ts:1707](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1707) +[src/types/app-client.ts:1712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1712) ___ @@ -279,7 +279,7 @@ Issues a call to the app with the given call type. #### Defined in -[src/types/app-client.ts:1790](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1790) +[src/types/app-client.ts:1795](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1795) ___ @@ -307,7 +307,7 @@ Issues a clear_state call to the app. #### Defined in -[src/types/app-client.ts:1767](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1767) +[src/types/app-client.ts:1772](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1772) ___ @@ -335,7 +335,7 @@ Issues a close_out call to the app. #### Defined in -[src/types/app-client.ts:1756](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1756) +[src/types/app-client.ts:1761](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1761) ___ @@ -363,7 +363,7 @@ Compiles the approval and clear programs and sets up the source map. #### Defined in -[src/types/app-client.ts:1418](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1418) +[src/types/app-client.ts:1423](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1423) ___ @@ -391,7 +391,7 @@ Creates a smart contract app, returns the details of the created app. #### Defined in -[src/types/app-client.ts:1601](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1601) +[src/types/app-client.ts:1606](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1606) ___ @@ -419,7 +419,7 @@ Issues a delete_application call to the app. #### Defined in -[src/types/app-client.ts:1778](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1778) +[src/types/app-client.ts:1783](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1783) ___ @@ -453,7 +453,7 @@ To understand the architecture decisions behind this functionality please see ht #### Defined in -[src/types/app-client.ts:1489](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1489) +[src/types/app-client.ts:1494](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1494) ___ @@ -471,7 +471,7 @@ The source maps #### Defined in -[src/types/app-client.ts:1454](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1454) +[src/types/app-client.ts:1459](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1459) ___ @@ -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:2114](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2114) +[src/types/app-client.ts:2119](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2119) ___ @@ -522,7 +522,7 @@ The result of the funding #### Defined in -[src/types/app-client.ts:1830](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1830) +[src/types/app-client.ts:1835](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1835) ___ @@ -546,7 +546,7 @@ The ABI method for the given method #### Defined in -[src/types/app-client.ts:2071](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2071) +[src/types/app-client.ts:2076](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2076) ___ @@ -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:2049](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2049) +[src/types/app-client.ts:2054](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2054) ___ @@ -594,7 +594,7 @@ ___ #### Defined in -[src/types/app-client.ts:2131](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2131) +[src/types/app-client.ts:2136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2136) ___ @@ -617,7 +617,7 @@ Gets the reference information for the current application instance. #### 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:2088](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L2088) ___ @@ -635,7 +635,7 @@ The names of the boxes #### Defined in -[src/types/app-client.ts:1886](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1886) +[src/types/app-client.ts:1891](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1891) ___ @@ -659,7 +659,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:1901](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1901) +[src/types/app-client.ts:1906](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1906) ___ @@ -684,7 +684,7 @@ The current box value as a byte array #### Defined in -[src/types/app-client.ts:1917](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1917) +[src/types/app-client.ts:1922](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1922) ___ @@ -709,7 +709,7 @@ The (name, value) pair of the boxes with values as raw byte arrays #### Defined in -[src/types/app-client.ts:1933](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1933) +[src/types/app-client.ts:1938](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1938) ___ @@ -735,7 +735,7 @@ The (name, value) pair of the boxes with values as the ABI Value #### Defined in -[src/types/app-client.ts:1955](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1955) +[src/types/app-client.ts:1960](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1960) ___ @@ -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:1979](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1979) +[src/types/app-client.ts:1984](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1984) ___ @@ -782,7 +782,7 @@ The global state #### 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:1863](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1863) ___ @@ -806,7 +806,7 @@ The global state #### Defined in -[src/types/app-client.ts:1872](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1872) +[src/types/app-client.ts:1877](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1877) ___ @@ -828,7 +828,7 @@ Import source maps for the app. #### Defined in -[src/types/app-client.ts:1471](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1471) +[src/types/app-client.ts:1476](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1476) ___ @@ -856,7 +856,7 @@ Issues a opt_in call to the app. #### Defined in -[src/types/app-client.ts:1745](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1745) +[src/types/app-client.ts:1750](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1750) ___ @@ -884,4 +884,4 @@ Updates the smart contract app. #### Defined in -[src/types/app-client.ts:1666](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1666) +[src/types/app-client.ts:1671](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L1671) diff --git a/docs/code/classes/types_client_manager.ClientManager.md b/docs/code/classes/types_client_manager.ClientManager.md index 5e884df2..27451a6e 100644 --- a/docs/code/classes/types_client_manager.ClientManager.md +++ b/docs/code/classes/types_client_manager.ClientManager.md @@ -37,6 +37,7 @@ Exposes access to various API clients. - [getTestNetDispenserFromEnvironment](types_client_manager.ClientManager.md#gettestnetdispenserfromenvironment) - [getTypedAppClientByCreatorAndName](types_client_manager.ClientManager.md#gettypedappclientbycreatorandname) - [getTypedAppClientById](types_client_manager.ClientManager.md#gettypedappclientbyid) +- [getTypedAppFactory](types_client_manager.ClientManager.md#gettypedappfactory) - [isLocalNet](types_client_manager.ClientManager.md#islocalnet) - [isMainNet](types_client_manager.ClientManager.md#ismainnet) - [isTestNet](types_client_manager.ClientManager.md#istestnet) @@ -99,7 +100,7 @@ const clientManager = new ClientManager({ algodConfig, indexerConfig, kmdConfig #### Defined in -[src/types/client-manager.ts:61](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L61) +[src/types/client-manager.ts:52](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L52) ## Properties @@ -109,7 +110,7 @@ const clientManager = new ClientManager({ algodConfig, indexerConfig, kmdConfig #### Defined in -[src/types/client-manager.ts:36](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L36) +[src/types/client-manager.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L27) ___ @@ -119,7 +120,7 @@ ___ #### Defined in -[src/types/client-manager.ts:39](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L39) +[src/types/client-manager.ts:30](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L30) ___ @@ -129,7 +130,7 @@ ___ #### Defined in -[src/types/client-manager.ts:98](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L98) +[src/types/client-manager.ts:89](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L89) ___ @@ -139,7 +140,7 @@ ___ #### Defined in -[src/types/client-manager.ts:37](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L37) +[src/types/client-manager.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L28) ___ @@ -149,7 +150,7 @@ ___ #### Defined in -[src/types/client-manager.ts:38](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L38) +[src/types/client-manager.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L29) ## Accessors @@ -165,7 +166,7 @@ Returns an algosdk Algod API client. #### Defined in -[src/types/client-manager.ts:77](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L77) +[src/types/client-manager.ts:68](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L68) ___ @@ -181,7 +182,7 @@ Returns an algosdk Indexer API client or throws an error if it's not been provid #### Defined in -[src/types/client-manager.ts:82](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L82) +[src/types/client-manager.ts:73](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L73) ___ @@ -197,7 +198,7 @@ Returns an algosdk Indexer API client or `undefined` if it's not been provided. #### Defined in -[src/types/client-manager.ts:88](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L88) +[src/types/client-manager.ts:79](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L79) ___ @@ -213,7 +214,7 @@ Returns an algosdk KMD API client or throws an error if it's not been provided. #### Defined in -[src/types/client-manager.ts:93](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L93) +[src/types/client-manager.ts:84](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L84) ## Methods @@ -258,7 +259,7 @@ const appClient = algorand.client.getAppClientByCreatorAndName({ #### Defined in -[src/types/client-manager.ts:237](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L237) +[src/types/client-manager.ts:228](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L228) ___ @@ -298,7 +299,7 @@ const appClient = algorand.client.getAppClientByCreatorAndName({ #### Defined in -[src/types/client-manager.ts:258](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L258) +[src/types/client-manager.ts:249](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L249) ___ @@ -341,7 +342,7 @@ const appClient = algorand.client.getAppClientByCreatorAndName({ #### Defined in -[src/types/client-manager.ts:279](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L279) +[src/types/client-manager.ts:270](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L270) ___ @@ -392,7 +393,7 @@ const factory = algorand.client.getAppFactory({ #### Defined in -[src/types/client-manager.ts:216](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L216) +[src/types/client-manager.ts:207](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L207) ___ @@ -429,7 +430,7 @@ const client = clientManager.getTestNetDispenser( #### Defined in -[src/types/client-manager.ts:172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L172) +[src/types/client-manager.ts:163](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L163) ___ @@ -465,13 +466,13 @@ const client = clientManager.getTestNetDispenserFromEnvironment( #### Defined in -[src/types/client-manager.ts:191](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L191) +[src/types/client-manager.ts:182](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L182) ___ ### getTypedAppClientByCreatorAndName -▸ **getTypedAppClientByCreatorAndName**\<`TClient`\>(`typedClient`, `details`, `cachedAppLookup?`): `TClient` +▸ **getTypedAppClientByCreatorAndName**\<`TClient`\>(`typedClient`, `params`): `Promise`\<`TClient`\> Returns a new typed client, resolving the app by creator address and name. @@ -486,12 +487,18 @@ Returns a new typed client, resolving the app by creator address and name. | Name | Type | Description | | :------ | :------ | :------ | | `typedClient` | [`TypedAppClient`](../interfaces/types_client_manager.TypedAppClient.md)\<`TClient`\> | The typed client type to use | -| `details` | [`TypedAppClientByCreatorAndNameDetails`](../modules/types_client_manager.md#typedappclientbycreatorandnamedetails) | The details to resolve the app by creator address and name | -| `cachedAppLookup?` | [`AppLookup`](../interfaces/types_app.AppLookup.md) | A 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 manager on construction. | +| `params` | `Object` | The params to resolve the app by creator address and name | +| `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.approvalSourceMap?` | `SourceMap` | Optional source map for the approval program | +| `params.clearSourceMap?` | `SourceMap` | Optional source map for the clear state program | +| `params.creatorAddress` | `string` | The address of the creator account for the app | +| `params.defaultSender?` | `string` | Optional address to use for the account to use as the default sender for calls. | +| `params.ignoreCache?` | `boolean` | Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value | #### Returns -`TClient` +`Promise`\<`TClient`\> The typed client instance @@ -516,13 +523,13 @@ const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractCl #### Defined in -[src/types/client-manager.ts:308](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L308) +[src/types/client-manager.ts:298](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L298) ___ ### getTypedAppClientById -▸ **getTypedAppClientById**\<`TClient`\>(`typedClient`, `details`): `TClient` +▸ **getTypedAppClientById**\<`TClient`\>(`typedClient`, `params`): `TClient` Returns a new typed client, resolving the app by app ID. @@ -537,7 +544,12 @@ Returns a new typed client, resolving the app by app ID. | Name | Type | Description | | :------ | :------ | :------ | | `typedClient` | [`TypedAppClient`](../interfaces/types_client_manager.TypedAppClient.md)\<`TClient`\> | The typed client type to use | -| `details` | [`TypedAppClientByIdDetails`](../modules/types_client_manager.md#typedappclientbyiddetails) | The details to resolve the app by ID | +| `params` | `Object` | The params to resolve the app by ID | +| `params.appId` | `bigint` | The ID of the app instance this client should make calls against. | +| `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.approvalSourceMap?` | `SourceMap` | Optional source map for the approval program | +| `params.clearSourceMap?` | `SourceMap` | Optional source map for the clear state program | +| `params.defaultSender?` | `string` | Optional address to use for the account to use as the default sender for calls. | #### Returns @@ -549,14 +561,59 @@ The typed client instance ```typescript const appClient = algorand.client.getTypedAppClientById(MyContractClient, { - id: 12345, + appId: 12345n, + sender: alice, +}) +``` + +#### Defined in + +[src/types/client-manager.ts:323](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L323) + +___ + +### getTypedAppFactory + +▸ **getTypedAppFactory**\<`TClient`\>(`typedFactory`, `params`): `TClient` + +Returns a new typed app factory. + +#### Type parameters + +| Name | +| :------ | +| `TClient` | + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `typedFactory` | [`TypedAppFactory`](../interfaces/types_client_manager.TypedAppFactory.md)\<`TClient`\> | The typed factory type to use | +| `params` | `Object` | The params to resolve the factory by | +| `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.defaultSender?` | `string` | Optional address to use for the account to use as the default sender for calls. | +| `params.deletable?` | `boolean` | Whether or not the contract should have deploy-time permanence control set, undefined = ignore. If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls. Useful if you want to vend multiple contracts from the same factory without specifying this value for each call. | +| `params.deployTimeParams?` | [`TealTemplateParams`](../interfaces/types_app.TealTemplateParams.md) | Optional deploy-time TEAL template replacement parameters. If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls. Useful if you want to vend multiple contracts from the same factory without specifying this value for each call. | +| `params.updatable?` | `boolean` | Whether or not the contract should have deploy-time immutability control set, undefined = ignore. If specified here will get used in calls to `deploy` and `create` calls unless overridden in those calls. Useful if you want to vend multiple contracts from the same factory without specifying this value for each call. | +| `params.version?` | `string` | The version of app that is / will be deployed; defaults to 1.0 | + +#### Returns + +`TClient` + +The typed client instance + +**`Example`** + +```typescript +const appFactory = algorand.client.getTypedAppFactory(MyContractClient, { sender: alice, }) ``` #### Defined in -[src/types/client-manager.ts:329](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L329) +[src/types/client-manager.ts:346](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L346) ___ @@ -574,7 +631,7 @@ True if the current network is LocalNet. #### Defined in -[src/types/client-manager.ts:136](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L136) +[src/types/client-manager.ts:127](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L127) ___ @@ -592,7 +649,7 @@ True if the current network is MainNet. #### Defined in -[src/types/client-manager.ts:152](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L152) +[src/types/client-manager.ts:143](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L143) ___ @@ -610,7 +667,7 @@ True if the current network is TestNet. #### Defined in -[src/types/client-manager.ts:144](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L144) +[src/types/client-manager.ts:135](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L135) ___ @@ -635,7 +692,7 @@ const genesisId = network.genesisId #### Defined in -[src/types/client-manager.ts:108](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L108) +[src/types/client-manager.ts:99](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L99) ___ @@ -659,7 +716,7 @@ Whether the given genesis ID is associated with a LocalNet network #### Defined in -[src/types/client-manager.ts:128](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L128) +[src/types/client-manager.ts:119](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L119) ___ @@ -682,7 +739,7 @@ Returns the Algorand configuration to point to the free tier of the AlgoNode ser #### Defined in -[src/types/client-manager.ts:421](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L421) +[src/types/client-manager.ts:445](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L445) ___ @@ -725,7 +782,7 @@ Returns an algod SDK client that automatically retries on idempotent calls. #### Defined in -[src/types/client-manager.ts:460](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L460) +[src/types/client-manager.ts:484](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L484) ___ @@ -749,7 +806,7 @@ Returns an algod SDK client that automatically retries on idempotent calls loade #### Defined in -[src/types/client-manager.ts:477](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L477) +[src/types/client-manager.ts:501](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L501) ___ @@ -767,7 +824,7 @@ Expects `process.env.ALGOD_SERVER` to be defined, and you can also specify `proc #### Defined in -[src/types/client-manager.ts:379](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L379) +[src/types/client-manager.ts:403](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L403) ___ @@ -800,7 +857,7 @@ const config = ClientManager.getConfigFromEnvironmentOrLocalNet() #### Defined in -[src/types/client-manager.ts:350](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L350) +[src/types/client-manager.ts:374](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L374) ___ @@ -822,7 +879,7 @@ Returns the Algorand configuration to point to the default LocalNet. #### Defined in -[src/types/client-manager.ts:432](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L432) +[src/types/client-manager.ts:456](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L456) ___ @@ -872,7 +929,7 @@ Returns an indexer SDK client that automatically retries on idempotent calls #### Defined in -[src/types/client-manager.ts:506](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L506) +[src/types/client-manager.ts:530](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L530) ___ @@ -902,7 +959,7 @@ Returns an indexer SDK client that automatically retries on idempotent calls loa #### Defined in -[src/types/client-manager.ts:528](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L528) +[src/types/client-manager.ts:552](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L552) ___ @@ -920,7 +977,7 @@ Expects `process.env.INDEXER_SERVER` to be defined, and you can also specify `pr #### Defined in -[src/types/client-manager.ts:400](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L400) +[src/types/client-manager.ts:424](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L424) ___ @@ -950,7 +1007,7 @@ KMD client allows you to export private keys, which is useful to (for instance) #### Defined in -[src/types/client-manager.ts:543](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L543) +[src/types/client-manager.ts:567](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L567) ___ @@ -973,4 +1030,4 @@ Returns a KMD SDK client that automatically retries on idempotent calls loaded f #### Defined in -[src/types/client-manager.ts:557](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L557) +[src/types/client-manager.ts:581](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L581) diff --git a/docs/code/classes/types_composer.default.md b/docs/code/classes/types_composer.default.md index 6c25ebf4..c60bb5ea 100644 --- a/docs/code/classes/types_composer.default.md +++ b/docs/code/classes/types_composer.default.md @@ -87,7 +87,7 @@ Create an `AlgoKitComposer`. #### Defined in -[src/types/composer.ts:509](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L509) +[src/types/composer.ts:513](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L513) ## Properties @@ -99,7 +99,7 @@ The algod client used by the composer. #### 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:493](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L493) ___ @@ -109,7 +109,7 @@ ___ #### 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:507](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L507) ___ @@ -121,7 +121,7 @@ The ATC used to compose the group #### 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:484](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L484) ___ @@ -133,7 +133,7 @@ The default transaction validity window #### Defined in -[src/types/composer.ts:498](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L498) +[src/types/composer.ts:502](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L502) ___ @@ -145,7 +145,7 @@ Whether the validity window was explicitly set on construction #### 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:505](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L505) ___ @@ -171,7 +171,7 @@ A function that takes in an address and return a signer function for that addres #### Defined in -[src/types/composer.ts:495](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L495) +[src/types/composer.ts:499](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L499) ___ @@ -191,7 +191,7 @@ An async function that will return suggested params for the transaction. #### Defined in -[src/types/composer.ts:492](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L492) +[src/types/composer.ts:496](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L496) ___ @@ -203,7 +203,7 @@ Map of txid to ABI method #### Defined in -[src/types/composer.ts:483](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L483) +[src/types/composer.ts:487](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L487) ___ @@ -215,7 +215,7 @@ Transactions that have not yet been composed #### 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:490](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L490) ___ @@ -227,7 +227,7 @@ Signer used to represent a lack of signer #### Defined in -[src/types/composer.ts:477](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L477) +[src/types/composer.ts:481](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L481) ## Methods @@ -255,7 +255,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:671](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L671) +[src/types/composer.ts:675](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L675) ___ @@ -281,7 +281,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:720](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L720) +[src/types/composer.ts:724](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L724) ___ @@ -332,7 +332,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:630](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L630) +[src/types/composer.ts:634](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L634) ___ @@ -358,7 +358,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:684](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L684) +[src/types/composer.ts:688](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L688) ___ @@ -384,7 +384,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:660](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L660) ___ @@ -410,7 +410,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:708](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L708) +[src/types/composer.ts:712](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L712) ___ @@ -456,7 +456,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:643](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L643) +[src/types/composer.ts:647](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L647) ___ @@ -482,7 +482,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:700](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L700) ___ @@ -506,7 +506,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:562](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L562) +[src/types/composer.ts:566](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L566) ___ @@ -530,7 +530,7 @@ The composer so you can chain method calls #### 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:555](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L555) ___ @@ -554,7 +554,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:584](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L584) +[src/types/composer.ts:588](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L588) ___ @@ -578,7 +578,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:573](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L573) +[src/types/composer.ts:577](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L577) ___ @@ -602,7 +602,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:610](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L610) ___ @@ -626,7 +626,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:621](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L621) ___ @@ -650,7 +650,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:599](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L599) ___ @@ -674,7 +674,7 @@ The composer so you can chain method calls #### Defined in -[src/types/composer.ts:741](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L741) +[src/types/composer.ts:745](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L745) ___ @@ -698,7 +698,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:734](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L734) ___ @@ -722,7 +722,7 @@ The composer so you can chain method calls #### 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:544](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L544) ___ @@ -747,7 +747,7 @@ The composer so you can chain method calls #### 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:529](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L529) ___ @@ -770,7 +770,7 @@ The built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1181](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1181) +[src/types/composer.ts:1185](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1185) ___ @@ -791,7 +791,7 @@ ___ #### Defined in -[src/types/composer.ts:1004](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1004) +[src/types/composer.ts:1008](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1008) ___ @@ -812,7 +812,7 @@ ___ #### Defined in -[src/types/composer.ts:953](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L953) +[src/types/composer.ts:957](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L957) ___ @@ -833,7 +833,7 @@ ___ #### Defined in -[src/types/composer.ts:933](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L933) +[src/types/composer.ts:937](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L937) ___ @@ -854,7 +854,7 @@ ___ #### Defined in -[src/types/composer.ts:968](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L968) +[src/types/composer.ts:972](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L972) ___ @@ -875,7 +875,7 @@ ___ #### Defined in -[src/types/composer.ts:978](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L978) +[src/types/composer.ts:982](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L982) ___ @@ -896,7 +896,7 @@ ___ #### Defined in -[src/types/composer.ts:990](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L990) +[src/types/composer.ts:994](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L994) ___ @@ -919,7 +919,7 @@ Build an ATC and return transactions ready to be incorporated into a broader set #### 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:751](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L751) ___ @@ -940,7 +940,7 @@ ___ #### Defined in -[src/types/composer.ts:1059](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1059) +[src/types/composer.ts:1063](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1063) ___ @@ -964,7 +964,7 @@ Builds an ABI method call transaction and any other associated transactions repr #### 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:817](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L817) ___ @@ -985,7 +985,7 @@ ___ #### Defined in -[src/types/composer.ts:921](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L921) +[src/types/composer.ts:925](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L925) ___ @@ -1003,7 +1003,7 @@ The array of built transactions and any corresponding method calls #### Defined in -[src/types/composer.ts:1128](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1128) +[src/types/composer.ts:1132](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1132) ___ @@ -1026,7 +1026,7 @@ Builds all transaction types apart from `txnWithSigner`, `atc` and `methodCall` #### 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:1082](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1082) ___ @@ -1047,7 +1047,7 @@ ___ #### Defined in -[src/types/composer.ts:1105](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1105) +[src/types/composer.ts:1109](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1109) ___ @@ -1069,7 +1069,7 @@ ___ #### 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:772](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L772) ___ @@ -1085,7 +1085,7 @@ Get the number of transactions currently added to this composer. #### Defined in -[src/types/composer.ts:1168](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1168) +[src/types/composer.ts:1172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1172) ___ @@ -1109,7 +1109,7 @@ The execution result #### 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:1224](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1224) ___ @@ -1128,16 +1128,28 @@ The newly built atomic transaction composer and the transactions #### Defined in -[src/types/composer.ts:1210](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1210) +[src/types/composer.ts:1214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1214) ___ ### simulate -▸ **simulate**(): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> +▸ **simulate**(`options?`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> Compose the atomic transaction group and simulate sending it to the network +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `Object` | +| `options.allowEmptySignatures?` | `boolean` | +| `options.allowMoreLogging?` | `boolean` | +| `options.allowUnnamedResources?` | `boolean` | +| `options.execTraceConfig?` | `SimulateTraceConfig` | +| `options.extraOpcodeBudget?` | `number` \| `bigint` | +| `options.round?` | `number` \| `bigint` | + #### Returns `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1146,7 +1158,7 @@ The simulation result #### 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:1251](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1251) ___ @@ -1166,4 +1178,4 @@ ___ #### Defined in -[src/types/composer.ts:1284](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1284) +[src/types/composer.ts:1291](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1291) diff --git a/docs/code/interfaces/types_app.AppState.md b/docs/code/interfaces/types_app.AppState.md index 4ae331e6..f92066be 100644 --- a/docs/code/interfaces/types_app.AppState.md +++ b/docs/code/interfaces/types_app.AppState.md @@ -8,4 +8,4 @@ Object holding app state values ## Indexable -▪ [key: `string`]: \{ `keyBase64`: `string` ; `keyRaw`: `Uint8Array` ; `value`: `number` \| `bigint` } \| \{ `keyBase64`: `string` ; `keyRaw`: `Uint8Array` ; `value`: `string` ; `valueBase64`: `string` ; `valueRaw`: `Uint8Array` } +▪ [key: `string`]: \{ `keyBase64`: `string` ; `keyRaw`: `Uint8Array` ; `value`: `bigint` } \| \{ `keyBase64`: `string` ; `keyRaw`: `Uint8Array` ; `value`: `string` ; `valueBase64`: `string` ; `valueRaw`: `Uint8Array` } diff --git a/docs/code/interfaces/types_client_manager.AlgoSdkClients.md b/docs/code/interfaces/types_client_manager.AlgoSdkClients.md index 0fc01336..bd2f3af9 100644 --- a/docs/code/interfaces/types_client_manager.AlgoSdkClients.md +++ b/docs/code/interfaces/types_client_manager.AlgoSdkClients.md @@ -24,7 +24,7 @@ Algod client, see https://developer.algorand.org/docs/rest-apis/algod/ #### Defined in -[src/types/client-manager.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L27) +[src/types/client-manager.ts:18](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L18) ___ @@ -36,7 +36,7 @@ Optional indexer client, see https://developer.algorand.org/docs/rest-apis/index #### Defined in -[src/types/client-manager.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L29) +[src/types/client-manager.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L20) ___ @@ -48,4 +48,4 @@ Optional KMD client, see https://developer.algorand.org/docs/rest-apis/kmd/ #### Defined in -[src/types/client-manager.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L31) +[src/types/client-manager.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L22) diff --git a/docs/code/interfaces/types_client_manager.TypedAppClient.md b/docs/code/interfaces/types_client_manager.TypedAppClient.md index db6fbaea..ae82d28c 100644 --- a/docs/code/interfaces/types_client_manager.TypedAppClient.md +++ b/docs/code/interfaces/types_client_manager.TypedAppClient.md @@ -22,14 +22,13 @@ Interface to identify a typed client that can be used to interact with an applic ### constructor -• **new TypedAppClient**(`details`, `algod`): `TClient` +• **new TypedAppClient**(`params`): `TClient` #### Parameters | Name | Type | | :------ | :------ | -| `details` | [`AppDetails`](../modules/types_app_client.md#appdetails) | -| `algod` | `default` | +| `params` | `Omit`\<[`AppClientParams`](types_app_client.AppClientParams.md), ``"appSpec"``\> | #### Returns @@ -37,4 +36,4 @@ Interface to identify a typed client that can be used to interact with an applic #### Defined in -[src/types/client-manager.ts:568](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L568) +[src/types/client-manager.ts:592](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L592) diff --git a/docs/code/interfaces/types_client_manager.TypedAppFactory.md b/docs/code/interfaces/types_client_manager.TypedAppFactory.md new file mode 100644 index 00000000..61bd3a12 --- /dev/null +++ b/docs/code/interfaces/types_client_manager.TypedAppFactory.md @@ -0,0 +1,39 @@ +[@algorandfoundation/algokit-utils](../README.md) / [types/client-manager](../modules/types_client_manager.md) / TypedAppFactory + +# Interface: TypedAppFactory\ + +[types/client-manager](../modules/types_client_manager.md).TypedAppFactory + +Interface to identify a typed factory that can be used to create and deploy an application. + +## Type parameters + +| Name | +| :------ | +| `TClient` | + +## Table of contents + +### Constructors + +- [constructor](types_client_manager.TypedAppFactory.md#constructor) + +## Constructors + +### constructor + +• **new TypedAppFactory**(`params`): `TClient` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `params` | `Omit`\<[`AppFactoryParams`](types_app_factory.AppFactoryParams.md), ``"appSpec"``\> | + +#### Returns + +`TClient` + +#### Defined in + +[src/types/client-manager.ts:599](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L599) diff --git a/docs/code/interfaces/types_composer.BuiltTransactions.md b/docs/code/interfaces/types_composer.BuiltTransactions.md index 8481d567..103acea1 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:469](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L469) +[src/types/composer.ts:473](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L473) ___ @@ -36,7 +36,7 @@ Any `TransactionSigner` objects associated with any of the transactions in a map #### Defined in -[src/types/composer.ts:471](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L471) +[src/types/composer.ts:475](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L475) ___ @@ -48,4 +48,4 @@ The built transactions #### Defined in -[src/types/composer.ts:467](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L467) +[src/types/composer.ts:471](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L471) diff --git a/docs/code/modules/types_client_manager.md b/docs/code/modules/types_client_manager.md index 55c7102e..9982b119 100644 --- a/docs/code/modules/types_client_manager.md +++ b/docs/code/modules/types_client_manager.md @@ -12,32 +12,4 @@ - [AlgoSdkClients](../interfaces/types_client_manager.AlgoSdkClients.md) - [TypedAppClient](../interfaces/types_client_manager.TypedAppClient.md) - -### Type Aliases - -- [TypedAppClientByCreatorAndNameDetails](types_client_manager.md#typedappclientbycreatorandnamedetails) -- [TypedAppClientByIdDetails](types_client_manager.md#typedappclientbyiddetails) - -## Type Aliases - -### TypedAppClientByCreatorAndNameDetails - -Ƭ **TypedAppClientByCreatorAndNameDetails**: [`AppDetailsBase`](types_app_client.md#appdetailsbase) & `Omit`\<[`ResolveAppByCreatorAndNameBase`](types_app_client.md#resolveappbycreatorandnamebase), ``"findExistingUsing"``\> - -Details to resolve a typed app creator address and name. - -#### Defined in - -[src/types/client-manager.ts:574](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L574) - -___ - -### TypedAppClientByIdDetails - -Ƭ **TypedAppClientByIdDetails**: [`AppDetailsBase`](types_app_client.md#appdetailsbase) & [`ResolveAppByIdBase`](../interfaces/types_app_client.ResolveAppByIdBase.md) - -Details to resolve a typed app by app ID. - -#### Defined in - -[src/types/client-manager.ts:579](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/client-manager.ts#L579) +- [TypedAppFactory](../interfaces/types_client_manager.TypedAppFactory.md) diff --git a/docs/code/modules/types_composer.md b/docs/code/modules/types_composer.md index 7ee1f499..32b400ef 100644 --- a/docs/code/modules/types_composer.md +++ b/docs/code/modules/types_composer.md @@ -37,6 +37,7 @@ - [CommonTransactionParams](types_composer.md#commontransactionparams) - [OnlineKeyRegistrationParams](types_composer.md#onlinekeyregistrationparams) - [PaymentParams](types_composer.md#paymentparams) +- [SimulateOptions](types_composer.md#simulateoptions) ### Variables @@ -62,7 +63,7 @@ Parameters to create an `AlgoKitComposer`. #### Defined in -[src/types/composer.ts:446](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L446) +[src/types/composer.ts:450](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L450) ___ @@ -72,7 +73,7 @@ ___ #### Defined in -[src/types/composer.ts:397](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L397) +[src/types/composer.ts:401](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L401) ___ @@ -84,7 +85,7 @@ Parameters to define an application call transaction. #### Defined in -[src/types/composer.ts:377](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L377) +[src/types/composer.ts:381](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L381) ___ @@ -94,7 +95,7 @@ ___ #### Defined in -[src/types/composer.ts:394](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L394) +[src/types/composer.ts:398](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L398) ___ @@ -104,7 +105,7 @@ ___ #### Defined in -[src/types/composer.ts:341](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L341) +[src/types/composer.ts:345](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L345) ___ @@ -114,7 +115,7 @@ ___ #### Defined in -[src/types/composer.ts:396](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L396) +[src/types/composer.ts:400](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L400) ___ @@ -126,7 +127,7 @@ Parameters to define an application delete call transaction. #### Defined in -[src/types/composer.ts:390](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L390) +[src/types/composer.ts:394](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L394) ___ @@ -142,7 +143,7 @@ ___ #### Defined in -[src/types/composer.ts:408](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L408) +[src/types/composer.ts:412](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L412) ___ @@ -154,7 +155,7 @@ Parameters to define a method call transaction. #### Defined in -[src/types/composer.ts:382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L382) +[src/types/composer.ts:386](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L386) ___ @@ -164,7 +165,7 @@ ___ #### Defined in -[src/types/composer.ts:399](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L399) +[src/types/composer.ts:403](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L403) ___ @@ -174,7 +175,7 @@ ___ #### Defined in -[src/types/composer.ts:395](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L395) +[src/types/composer.ts:399](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L399) ___ @@ -184,7 +185,7 @@ ___ #### Defined in -[src/types/composer.ts:366](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L366) +[src/types/composer.ts:370](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L370) ___ @@ -200,7 +201,7 @@ all fields are immutable from that point forward. #### Defined in -[src/types/composer.ts:195](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L195) +[src/types/composer.ts:199](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L199) ___ @@ -214,7 +215,7 @@ The account that sends this transaction will automatically be opted in to the as #### Defined in -[src/types/composer.ts:79](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L79) +[src/types/composer.ts:83](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L83) ___ @@ -228,7 +229,7 @@ Created assets can be destroyed only by the asset manager account. All of the as #### Defined in -[src/types/composer.ts:253](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L253) +[src/types/composer.ts:257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L257) ___ @@ -240,7 +241,7 @@ Parameters to define an asset freeze transaction. #### Defined in -[src/types/composer.ts:240](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L240) +[src/types/composer.ts:244](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L244) ___ @@ -252,7 +253,7 @@ Parameters to define an asset opt-in transaction. #### Defined in -[src/types/composer.ts:281](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L281) +[src/types/composer.ts:285](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L285) ___ @@ -264,7 +265,7 @@ Parameters to define an asset opt-out transaction. #### Defined in -[src/types/composer.ts:287](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L287) +[src/types/composer.ts:291](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L291) ___ @@ -276,7 +277,7 @@ Parameters to define an asset transfer transaction. #### Defined in -[src/types/composer.ts:259](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L259) +[src/types/composer.ts:263](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L263) ___ @@ -288,7 +289,7 @@ Common parameters for defining an application call transaction. #### Defined in -[src/types/composer.ts:320](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L320) +[src/types/composer.ts:324](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L324) ___ @@ -316,7 +317,7 @@ Common parameters for defining a transaction. #### Defined in -[src/types/composer.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L22) +[src/types/composer.ts:26](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L26) ___ @@ -328,7 +329,7 @@ Parameters to define an online key registration transaction. #### Defined in -[src/types/composer.ts:298](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L298) +[src/types/composer.ts:302](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L302) ___ @@ -340,7 +341,19 @@ Parameters to define a payment transaction. #### Defined in -[src/types/composer.ts:63](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L63) +[src/types/composer.ts:67](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L67) + +___ + +### SimulateOptions + +Ƭ **SimulateOptions**: [`Expand`](types_expand.md#expand)\<`Omit`\<`ConstructorParameters`\[``0``], ``"txnGroups"``\>\> + +Options to control a simulate request + +#### Defined in + +[src/types/composer.ts:23](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L23) ## Variables @@ -350,4 +363,4 @@ Parameters to define a payment transaction. #### Defined in -[src/types/composer.ts:19](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L19) +[src/types/composer.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L20) diff --git a/src/types/algorand-client.spec.ts b/src/types/algorand-client.spec.ts index c3bfbdab..bbdf7681 100644 --- a/src/types/algorand-client.spec.ts +++ b/src/types/algorand-client.spec.ts @@ -30,10 +30,14 @@ describe('AlgorandClient', () => { bob = await fixture.context.generateAccount({ initialFunds: AlgoAmount.MicroAlgo(100_000) }) algorand = fixture.algorand - appClient = algorand.client.getTypedAppClientById(TestContractClient, { - id: 0, - sender: alice, - }) + appClient = new TestContractClient( + { + sender: alice, + resolveBy: 'id', + id: 0, + }, + algorand.client.algod, + ) const app = await appClient.create.createApplication({}) appId = BigInt(app.appId) diff --git a/src/types/app-client.spec.ts b/src/types/app-client.spec.ts index c6a92711..a87ff6a2 100644 --- a/src/types/app-client.spec.ts +++ b/src/types/app-client.spec.ts @@ -754,8 +754,8 @@ describe('application-client', () => { invariant(globalState.bytes2) invariant('valueRaw' in globalState.bytes2) expect(Object.keys(globalState).sort()).toEqual(['bytes1', 'bytes2', 'int1', 'int2', 'value']) - expect(globalState.int1.value).toBe(1) - expect(globalState.int2.value).toBe(2) + expect(globalState.int1.value).toBe(1n) + expect(globalState.int2.value).toBe(2n) expect(globalState.bytes1.value).toBe('asdf') expect(globalState.bytes2.valueRaw).toEqual(new Uint8Array([1, 2, 3, 4])) @@ -769,8 +769,8 @@ describe('application-client', () => { invariant(localState.local_bytes2) invariant('valueRaw' in localState.local_bytes2) expect(Object.keys(localState).sort()).toEqual(['local_bytes1', 'local_bytes2', 'local_int1', 'local_int2']) - expect(localState.local_int1.value).toBe(1) - expect(localState.local_int2.value).toBe(2) + expect(localState.local_int1.value).toBe(1n) + expect(localState.local_int2.value).toBe(2n) expect(localState.local_bytes1.value).toBe('asdf') expect(localState.local_bytes2.valueRaw).toEqual(new Uint8Array([1, 2, 3, 4])) diff --git a/src/types/app-client.ts b/src/types/app-client.ts index a33d0a02..509bafb0 100644 --- a/src/types/app-client.ts +++ b/src/types/app-client.ts @@ -57,7 +57,7 @@ import { import { AppLookup } from './app-deployer' import { AppManager, BoxIdentifier } from './app-manager' import { AppSpec, arc32ToArc56 } from './app-spec' -import { +import AlgoKitComposer, { AppCallMethodCall, AppCallParams, AppDeleteMethodCall, @@ -448,6 +448,11 @@ export class AppClient { this._sendMethods = { ...this.getMethodCallSendMethods(), bare: this.getBareSendMethods() } } + /** Start a new `AlgoKitComposer` transaction group */ + newGroup(): AlgoKitComposer { + return this._algorand.newGroup() + } + /** * Returns a new `AppClient` client, resolving the app by creator address and name * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note). diff --git a/src/types/app-factory-and-client.spec.ts b/src/types/app-factory-and-client.spec.ts index 4ed09941..6585d341 100644 --- a/src/types/app-factory-and-client.spec.ts +++ b/src/types/app-factory-and-client.spec.ts @@ -568,8 +568,8 @@ describe('ARC32: app-factory-and-app-client', () => { invariant(globalState.bytes2) invariant('valueRaw' in globalState.bytes2) expect(Object.keys(globalState).sort()).toEqual(['bytes1', 'bytes2', 'int1', 'int2', 'value']) - expect(globalState.int1.value).toBe(1) - expect(globalState.int2.value).toBe(2) + expect(globalState.int1.value).toBe(1n) + expect(globalState.int2.value).toBe(2n) expect(globalState.bytes1.value).toBe('asdf') expect(globalState.bytes2.valueRaw).toEqual(new Uint8Array([1, 2, 3, 4])) @@ -583,8 +583,8 @@ describe('ARC32: app-factory-and-app-client', () => { invariant(localState.local_bytes2) invariant('valueRaw' in localState.local_bytes2) expect(Object.keys(localState).sort()).toEqual(['local_bytes1', 'local_bytes2', 'local_int1', 'local_int2']) - expect(localState.local_int1.value).toBe(1) - expect(localState.local_int2.value).toBe(2) + expect(localState.local_int1.value).toBe(1n) + expect(localState.local_int2.value).toBe(2n) expect(localState.local_bytes1.value).toBe('asdf') expect(localState.local_bytes2.valueRaw).toEqual(new Uint8Array([1, 2, 3, 4])) diff --git a/src/types/app-manager.ts b/src/types/app-manager.ts index ef9528a1..b1f77132 100644 --- a/src/types/app-manager.ts +++ b/src/types/app-manager.ts @@ -345,7 +345,7 @@ export class AppManager { stateValues[key] = { keyRaw, keyBase64, - value, + value: BigInt(value), } break } diff --git a/src/types/app.ts b/src/types/app.ts index 55793c31..7aefc61a 100644 --- a/src/types/app.ts +++ b/src/types/app.ts @@ -367,7 +367,7 @@ export type SendAppCreateTransactionResult = Expand< export interface AppState { [key: string]: | { - value: number | bigint + value: bigint keyRaw: Uint8Array keyBase64: string } diff --git a/src/types/client-manager.ts b/src/types/client-manager.ts index 2d9e7bbd..15f68012 100644 --- a/src/types/client-manager.ts +++ b/src/types/client-manager.ts @@ -2,16 +2,7 @@ import algosdk from 'algosdk' import { SuggestedParamsWithMinFee } from 'algosdk/dist/types/types/transactions/base' import { AlgoHttpClientWithRetry } from './algo-http-client-with-retry' import { AlgorandClientInterface } from './algorand-client-interface' -import { AppLookup as LegacyAppLookup } from './app' -import { - AppClient, - AppClientParams, - AppDetails, - AppDetailsBase, - ResolveAppByCreatorAndNameBase, - ResolveAppByIdBase, - ResolveAppClientByCreatorAndName, -} from './app-client' +import { AppClient, AppClientParams, ResolveAppClientByCreatorAndName } from './app-client' import { AppFactory, AppFactoryParams } from './app-factory' import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './dispenser-client' import { Expand } from './expand' @@ -286,9 +277,8 @@ export class ClientManager { /** * Returns a new typed client, resolving the app by creator address and name. * @param typedClient The typed client type to use - * @param details The details to resolve the app by creator address and name - * @param cachedAppLookup A 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 manager on construction. - * @example Use name in ARC-32 app spec + * @param params The params to resolve the app by creator address and name + * @example Use name in ARC-32 / ARC-56 app spec * ```typescript * const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, { * creatorAddress: "CREATORADDRESS", @@ -305,29 +295,63 @@ export class ClientManager { * ``` * @returns The typed client instance */ - public getTypedAppClientByCreatorAndName( + public async getTypedAppClientByCreatorAndName( typedClient: TypedAppClient, - details: TypedAppClientByCreatorAndNameDetails, - cachedAppLookup?: LegacyAppLookup, + params: Expand>, ) { - return new typedClient({ ...details, resolveBy: 'creatorAndName', findExistingUsing: cachedAppLookup ?? this.indexer }, this._algod) + if (!this._algorand) { + throw new Error('Attempt to get app client from a ClientManager without an Algorand client') + } + + const tempClient = await this.getAppClientByCreatorAndName({ ...params, appSpec: '{}' }) + return new typedClient({ ...params, appId: tempClient.appId, algorand: this._algorand }) } /** * Returns a new typed client, resolving the app by app ID. * @param typedClient The typed client type to use - * @param details The details to resolve the app by ID + * @param params The params to resolve the app by ID * @example * ```typescript * const appClient = algorand.client.getTypedAppClientById(MyContractClient, { - * id: 12345, + * appId: 12345n, + * sender: alice, + * }) + * ``` + * @returns The typed client instance + */ + public getTypedAppClientById( + typedClient: TypedAppClient, + params: Expand>, + ) { + if (!this._algorand) { + throw new Error('Attempt to get app client from a ClientManager without an Algorand client') + } + + return new typedClient({ ...params, algorand: this._algorand }) + } + + /** + * Returns a new typed app factory. + * @param typedFactory The typed factory type to use + * @param params The params to resolve the factory by + * @example + * ```typescript + * const appFactory = algorand.client.getTypedAppFactory(MyContractClient, { * sender: alice, * }) * ``` * @returns The typed client instance */ - public getTypedAppClientById(typedClient: TypedAppClient, details: TypedAppClientByIdDetails) { - return new typedClient({ ...details, resolveBy: 'id' }, this._algod) + public getTypedAppFactory( + typedFactory: TypedAppFactory, + params: Expand>, + ) { + if (!this._algorand) { + throw new Error('Attempt to get app factory from a ClientManager without an Algorand client') + } + + return new typedFactory({ ...params, algorand: this._algorand }) } /** @@ -565,15 +589,12 @@ export class ClientManager { * Interface to identify a typed client that can be used to interact with an application. */ export interface TypedAppClient { - new (details: AppDetails, algod: algosdk.Algodv2): TClient + new (params: Omit): TClient } /** - * Details to resolve a typed app creator address and name. + * Interface to identify a typed factory that can be used to create and deploy an application. */ -export type TypedAppClientByCreatorAndNameDetails = AppDetailsBase & Omit - -/** - * Details to resolve a typed app by app ID. - */ -export type TypedAppClientByIdDetails = AppDetailsBase & ResolveAppByIdBase +export interface TypedAppFactory { + new (params: Omit): TClient +} diff --git a/src/types/composer.ts b/src/types/composer.ts index ce974d83..e5fe2a86 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -15,9 +15,13 @@ import TransactionWithSigner = algosdk.TransactionWithSigner import isTransactionWithSigner = algosdk.isTransactionWithSigner import encodeAddress = algosdk.encodeAddress import SimulateResponse = algosdk.modelsv2.SimulateResponse +import modelsv2 = algosdk.modelsv2 export const MAX_TRANSACTION_GROUP_SIZE = 16 +/** Options to control a simulate request */ +export type SimulateOptions = Expand[0], 'txnGroups'>> + /** Common parameters for defining a transaction. */ export type CommonTransactionParams = { /** The address of the account sending the transaction. */ @@ -1244,7 +1248,7 @@ export default class AlgoKitComposer { * Compose the atomic transaction group and simulate sending it to the network * @returns The simulation result */ - async simulate(): Promise { + async simulate(options?: SimulateOptions): Promise { await this.build() if (Config.debug && Config.projectRoot && !Config.traceAll) { @@ -1259,7 +1263,10 @@ export default class AlgoKitComposer { }) } - const { methodResults, simulateResponse } = await this.atc.simulate(this.algod) + const { methodResults, simulateResponse } = await this.atc.simulate( + this.algod, + new modelsv2.SimulateRequest({ txnGroups: [], ...options }), + ) if (simulateResponse && simulateResponse.txnGroups[0].failedAt) { const error = new Error(