@algorandfoundation/algokit-utils 7.0.0-beta.3 → 7.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/amount.d.ts +14 -4
  2. package/amount.d.ts.map +1 -1
  3. package/amount.js +6 -0
  4. package/amount.js.map +1 -1
  5. package/amount.mjs +6 -0
  6. package/amount.mjs.map +1 -1
  7. package/app-client.d.ts +15 -0
  8. package/app-client.d.ts.map +1 -1
  9. package/app-client.js +15 -0
  10. package/app-client.js.map +1 -1
  11. package/app-client.mjs +15 -0
  12. package/app-client.mjs.map +1 -1
  13. package/app-deploy.d.ts.map +1 -1
  14. package/app-deploy.js +4 -6
  15. package/app-deploy.js.map +1 -1
  16. package/app-deploy.mjs +5 -7
  17. package/app-deploy.mjs.map +1 -1
  18. package/app.d.ts +2 -2
  19. package/app.d.ts.map +1 -1
  20. package/app.js +7 -3
  21. package/app.js.map +1 -1
  22. package/app.mjs +7 -3
  23. package/app.mjs.map +1 -1
  24. package/asset.d.ts.map +1 -1
  25. package/asset.js +0 -3
  26. package/asset.js.map +1 -1
  27. package/asset.mjs +0 -3
  28. package/asset.mjs.map +1 -1
  29. package/debugging/debugging.d.ts +1 -1
  30. package/debugging/debugging.d.ts.map +1 -1
  31. package/debugging/debugging.js +4 -5
  32. package/debugging/debugging.js.map +1 -1
  33. package/debugging/debugging.mjs +4 -5
  34. package/debugging/debugging.mjs.map +1 -1
  35. package/index.d.ts +4 -4
  36. package/index.d.ts.map +1 -1
  37. package/index.js +37 -37
  38. package/index.mjs +5 -5
  39. package/package.json +1 -1
  40. package/testing/test-logger.d.ts.map +1 -1
  41. package/testing/test-logger.js +1 -3
  42. package/testing/test-logger.js.map +1 -1
  43. package/testing/test-logger.mjs +1 -3
  44. package/testing/test-logger.mjs.map +1 -1
  45. package/transaction/legacy-bridge.d.ts +3 -3
  46. package/transaction/legacy-bridge.d.ts.map +1 -1
  47. package/transaction/legacy-bridge.js +1 -1
  48. package/transaction/legacy-bridge.js.map +1 -1
  49. package/transaction/legacy-bridge.mjs +2 -2
  50. package/transaction/legacy-bridge.mjs.map +1 -1
  51. package/transaction/transaction.d.ts +34 -3
  52. package/transaction/transaction.d.ts.map +1 -1
  53. package/transaction/transaction.js +42 -11
  54. package/transaction/transaction.js.map +1 -1
  55. package/transaction/transaction.mjs +42 -11
  56. package/transaction/transaction.mjs.map +1 -1
  57. package/transfer/transfer.js +2 -2
  58. package/transfer/transfer.js.map +1 -1
  59. package/transfer/transfer.mjs +2 -2
  60. package/transfer/transfer.mjs.map +1 -1
  61. package/types/account-manager.d.ts +2 -2
  62. package/types/account-manager.d.ts.map +1 -1
  63. package/types/account-manager.js +1 -1
  64. package/types/account-manager.js.map +1 -1
  65. package/types/account-manager.mjs +1 -1
  66. package/types/account-manager.mjs.map +1 -1
  67. package/types/algorand-client-interface.d.ts +29 -0
  68. package/types/algorand-client-interface.d.ts.map +1 -0
  69. package/types/algorand-client-interface.js +3 -0
  70. package/types/algorand-client-interface.js.map +1 -0
  71. package/types/algorand-client-interface.mjs +2 -0
  72. package/types/algorand-client-interface.mjs.map +1 -0
  73. package/types/algorand-client-transaction-sender.d.ts +12 -12
  74. package/types/algorand-client-transaction-sender.d.ts.map +1 -1
  75. package/types/algorand-client-transaction-sender.js +22 -6
  76. package/types/algorand-client-transaction-sender.js.map +1 -1
  77. package/types/algorand-client-transaction-sender.mjs +22 -6
  78. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  79. package/types/algorand-client.d.ts +2 -1
  80. package/types/algorand-client.d.ts.map +1 -1
  81. package/types/algorand-client.js +1 -1
  82. package/types/algorand-client.js.map +1 -1
  83. package/types/algorand-client.mjs +1 -1
  84. package/types/algorand-client.mjs.map +1 -1
  85. package/types/amount.d.ts +10 -10
  86. package/types/amount.d.ts.map +1 -1
  87. package/types/amount.js +7 -7
  88. package/types/amount.js.map +1 -1
  89. package/types/amount.mjs +7 -7
  90. package/types/amount.mjs.map +1 -1
  91. package/types/app-arc56.d.ts +326 -0
  92. package/types/app-arc56.d.ts.map +1 -0
  93. package/types/app-arc56.js +163 -0
  94. package/types/app-arc56.js.map +1 -0
  95. package/types/app-arc56.mjs +154 -0
  96. package/types/app-arc56.mjs.map +1 -0
  97. package/types/app-client.d.ts +1479 -7
  98. package/types/app-client.d.ts.map +1 -1
  99. package/types/app-client.js +814 -8
  100. package/types/app-client.js.map +1 -1
  101. package/types/app-client.mjs +814 -9
  102. package/types/app-client.mjs.map +1 -1
  103. package/types/app-deployer.d.ts +19 -13
  104. package/types/app-deployer.d.ts.map +1 -1
  105. package/types/app-deployer.js +2 -2
  106. package/types/app-deployer.js.map +1 -1
  107. package/types/app-deployer.mjs +2 -2
  108. package/types/app-deployer.mjs.map +1 -1
  109. package/types/app-factory.d.ts +967 -0
  110. package/types/app-factory.d.ts.map +1 -0
  111. package/types/app-factory.js +322 -0
  112. package/types/app-factory.js.map +1 -0
  113. package/types/app-factory.mjs +320 -0
  114. package/types/app-factory.mjs.map +1 -0
  115. package/types/app-manager.d.ts +12 -2
  116. package/types/app-manager.d.ts.map +1 -1
  117. package/types/app-manager.js +10 -1
  118. package/types/app-manager.js.map +1 -1
  119. package/types/app-manager.mjs +10 -1
  120. package/types/app-manager.mjs.map +1 -1
  121. package/types/app-spec.d.ts +2 -0
  122. package/types/app-spec.d.ts.map +1 -1
  123. package/types/app-spec.js +115 -0
  124. package/types/app-spec.js.map +1 -1
  125. package/types/app-spec.mjs +114 -0
  126. package/types/app-spec.mjs.map +1 -1
  127. package/types/app.d.ts +6 -2
  128. package/types/app.d.ts.map +1 -1
  129. package/types/asset-manager.d.ts +2 -1
  130. package/types/asset-manager.d.ts.map +1 -1
  131. package/types/asset-manager.js +0 -1
  132. package/types/asset-manager.js.map +1 -1
  133. package/types/asset-manager.mjs +0 -1
  134. package/types/asset-manager.mjs.map +1 -1
  135. package/types/client-manager.d.ts +109 -50
  136. package/types/client-manager.d.ts.map +1 -1
  137. package/types/client-manager.js +137 -23
  138. package/types/client-manager.js.map +1 -1
  139. package/types/client-manager.mjs +138 -24
  140. package/types/client-manager.mjs.map +1 -1
  141. package/types/composer.d.ts +31 -14
  142. package/types/composer.d.ts.map +1 -1
  143. package/types/composer.js +61 -6
  144. package/types/composer.js.map +1 -1
  145. package/types/composer.mjs +62 -7
  146. package/types/composer.mjs.map +1 -1
  147. package/types/debugging.d.ts +3 -2
  148. package/types/debugging.d.ts.map +1 -1
  149. package/types/debugging.js.map +1 -1
  150. package/types/debugging.mjs.map +1 -1
  151. package/types/dispenser-client.d.ts +1 -1
  152. package/types/dispenser-client.d.ts.map +1 -1
  153. package/types/dispenser-client.js +1 -1
  154. package/types/dispenser-client.js.map +1 -1
  155. package/types/dispenser-client.mjs +1 -1
  156. package/types/dispenser-client.mjs.map +1 -1
  157. package/types/network-client.d.ts +13 -0
  158. package/types/network-client.d.ts.map +1 -1
  159. package/types/network-client.js.map +1 -1
  160. package/types/network-client.mjs.map +1 -1
  161. package/types/testing.d.ts +3 -3
  162. package/types/testing.d.ts.map +1 -1
  163. package/types/transaction.d.ts +14 -1
  164. package/types/transaction.d.ts.map +1 -1
  165. package/util.d.ts +2 -1
  166. package/util.d.ts.map +1 -1
  167. package/util.js +11 -1
  168. package/util.js.map +1 -1
  169. package/util.mjs +11 -2
  170. package/util.mjs.map +1 -1
@@ -1,8 +1,16 @@
1
+ /// <reference types="node" />
1
2
  import algosdk from 'algosdk';
3
+ import { Buffer } from 'buffer';
4
+ import { AlgorandClientInterface } from './algorand-client-interface';
2
5
  import { AlgoAmount } from './amount';
3
- import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppLookup, AppMetadata, AppReference, AppState, AppStorageSchema, BoxName, OnSchemaBreak, OnUpdate, RawAppCallArgs, TealTemplateParams } from './app';
6
+ import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
7
+ import { ABIStruct, Arc56Contract, Arc56Method } from './app-arc56';
8
+ import { AppLookup } from './app-deployer';
9
+ import { AppManager, BoxIdentifier } from './app-manager';
4
10
  import { AppSpec } from './app-spec';
5
- import { SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
11
+ import AlgoKitComposer, { AppCallMethodCall, AppCallParams, AppDeleteMethodCall, AppDeleteParams, AppMethodCall, AppMethodCallTransactionArgument, CommonAppCallParams, PaymentParams } from './composer';
12
+ import { Expand } from './expand';
13
+ import { ExecuteParams, SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
6
14
  import ABIMethod = algosdk.ABIMethod;
7
15
  import ABIMethodParams = algosdk.ABIMethodParams;
8
16
  import ABIType = algosdk.ABIType;
@@ -10,6 +18,7 @@ import ABIValue = algosdk.ABIValue;
10
18
  import Algodv2 = algosdk.Algodv2;
11
19
  import Indexer = algosdk.Indexer;
12
20
  import OnApplicationComplete = algosdk.OnApplicationComplete;
21
+ import SourceMap = algosdk.SourceMap;
13
22
  import SuggestedParams = algosdk.SuggestedParams;
14
23
  /** Configuration to resolve app by creator and name `getCreatorAppsByName` */
15
24
  export type ResolveAppByCreatorAndNameBase = {
@@ -21,7 +30,7 @@ export type ResolveAppByCreatorAndNameBase = {
21
30
  * * An indexer instance to search the creator account apps; or
22
31
  * * The cached value of the existing apps for the given creator from `getCreatorAppsByName`
23
32
  */
24
- findExistingUsing: Indexer | AppLookup;
33
+ findExistingUsing: Indexer | LegacyAppLookup;
25
34
  };
26
35
  /** Configuration to resolve app by creator and name `getCreatorAppsByName` */
27
36
  export type ResolveAppByCreatorAndName = ResolveAppByCreatorAndNameBase & {
@@ -129,7 +138,9 @@ export type AppClientClearStateParams = AppClientCallRawArgs & AppClientCallCore
129
138
  export interface AppClientCompilationParams {
130
139
  /** Any deploy-time parameters to replace in the TEAL code */
131
140
  deployTimeParams?: TealTemplateParams;
141
+ /** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
132
142
  updatable?: boolean;
143
+ /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
133
144
  deletable?: boolean;
134
145
  }
135
146
  /** On-complete action parameter for creating a contract using ApplicationClient */
@@ -167,7 +178,1438 @@ export interface SourceMapExport {
167
178
  names: string[];
168
179
  mappings: string;
169
180
  }
170
- /** Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */
181
+ /** Parameters to create an app client */
182
+ export interface AppClientParams {
183
+ /** The ID of the app instance this client should make calls against. */
184
+ appId: bigint;
185
+ /** The ARC-56 or ARC-32 application spec as either:
186
+ * * Parsed JSON ARC-56 `Contract`
187
+ * * Parsed JSON ARC-32 `AppSpec`
188
+ * * Raw JSON string (in either ARC-56 or ARC-32 format)
189
+ */
190
+ appSpec: Arc56Contract | AppSpec | string;
191
+ /** An `AlgorandClient` instance */
192
+ algorand: AlgorandClientInterface;
193
+ /**
194
+ * Optional override for the app name; used for on-chain metadata and lookups.
195
+ * Defaults to the ARC-32/ARC-56 app spec name
196
+ */
197
+ appName?: string;
198
+ /** Optional address to use for the account to use as the default sender for calls. */
199
+ defaultSender?: string;
200
+ /** Optional source map for the approval program */
201
+ approvalSourceMap?: SourceMap;
202
+ /** Optional source map for the clear state program */
203
+ clearSourceMap?: SourceMap;
204
+ }
205
+ /** onComplete parameter for a non-update app call */
206
+ export type CallOnComplete = {
207
+ /** On-complete of the call; defaults to no-op */
208
+ onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
209
+ };
210
+ /** AppClient parameters for a bare app call */
211
+ export type AppClientBareCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'onComplete'> & {
212
+ /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
213
+ sender?: string;
214
+ }>;
215
+ /** AppClient parameters for an ABI method call */
216
+ export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args'> & {
217
+ /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
218
+ sender?: string;
219
+ /** The method name or method signature to call if an ABI call is being emitted
220
+ * @example Method name
221
+ * `my_method`
222
+ * @example Method signature
223
+ * `my_method(unit64,string)bytes`
224
+ */
225
+ method: string;
226
+ /** Arguments to the ABI method, either:
227
+ * * An ABI value
228
+ * * An ARC-56 struct
229
+ * * A transaction with explicit signer
230
+ * * A transaction (where the signer will be automatically assigned)
231
+ * * An unawaited transaction (e.g. from algorand.transactions.transactionType())
232
+ * * Another method call (via method call params object)
233
+ */
234
+ args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
235
+ }>;
236
+ /** Parameters for funding an app account */
237
+ export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & ExecuteParams & {
238
+ /** The optional sender to send the transaction from, will use the application client's default sender by default if specified */
239
+ sender?: string;
240
+ }>;
241
+ /** Resolve an app client instance by looking up an app created by the given creator with the given name */
242
+ export type ResolveAppClientByCreatorAndName = Expand<Omit<AppClientParams, 'appId'> & {
243
+ /** The address of the creator account for the app */
244
+ creatorAddress: string;
245
+ /** An optional cached app lookup that matches a name to on-chain details;
246
+ * either this is needed or indexer is required to be passed in to this `ClientManager` on construction.
247
+ */
248
+ appLookupCache?: AppLookup;
249
+ /** Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value */
250
+ ignoreCache?: boolean;
251
+ }>;
252
+ /** ARC-56/ARC-32 application client that allows you to manage calls and
253
+ * state for a specific deployed instance of an app (with a known app ID). */
254
+ export declare class AppClient {
255
+ private _appId;
256
+ private _appAddress;
257
+ private _appName;
258
+ private _appSpec;
259
+ private _algorand;
260
+ private _defaultSender?;
261
+ private _approvalSourceMap;
262
+ private _clearSourceMap;
263
+ private _localStateMethods;
264
+ private _globalStateMethods;
265
+ private _boxStateMethods;
266
+ private _paramsMethods;
267
+ private _transactionsMethods;
268
+ private _sendMethods;
269
+ constructor(params: AppClientParams);
270
+ /** Start a new `AlgoKitComposer` transaction group */
271
+ newGroup(): AlgoKitComposer;
272
+ /**
273
+ * Returns a new `AppClient` client, resolving the app by creator address and name
274
+ * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
275
+ * @param params The parameters to create the app client
276
+ */
277
+ static fromCreatorAndName(params: Expand<ResolveAppClientByCreatorAndName>): Promise<AppClient>;
278
+ /**
279
+ * Returns an `AppClient` instance for the current network based on
280
+ * pre-determined network-specific app IDs specified in the ARC-56 app spec.
281
+ *
282
+ * If no IDs are in the app spec or the network isn't recognised, an error is thrown.
283
+ * @param params The parameters to create the app client
284
+ */
285
+ static fromNetwork(params: Expand<Omit<AppClientParams, 'appId'>>): Promise<AppClient>;
286
+ /**
287
+ * Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and
288
+ * normalises it into a parsed ARC-56 contract object.
289
+ * @param spec The spec to normalise
290
+ * @returns The normalised ARC-56 contract object
291
+ */
292
+ static normaliseAppSpec(spec: Arc56Contract | AppSpec | string): Arc56Contract;
293
+ /** The ID of the app instance this client is linked to. */
294
+ get appId(): bigint;
295
+ /** The app address of the app instance this client is linked to. */
296
+ get appAddress(): string;
297
+ /** The name of the app (from the ARC-32 / ARC-56 app spec). */
298
+ get appName(): string;
299
+ /** The ARC-56 app spec being used */
300
+ get appSpec(): Arc56Contract;
301
+ /** Get parameters to define transactions to the current app */
302
+ get params(): {
303
+ /** Return params for a payment transaction to fund the app account */
304
+ fundAppAccount: (params: {
305
+ lease?: string | Uint8Array | undefined;
306
+ note?: string | Uint8Array | undefined;
307
+ amount: AlgoAmount;
308
+ closeRemainderTo?: string | undefined;
309
+ maxFee?: AlgoAmount | undefined;
310
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
311
+ rekeyTo?: string | undefined;
312
+ staticFee?: AlgoAmount | undefined;
313
+ extraFee?: AlgoAmount | undefined;
314
+ validityWindow?: number | undefined;
315
+ firstValidRound?: bigint | undefined;
316
+ lastValidRound?: bigint | undefined;
317
+ maxRoundsToWaitForConfirmation?: number | undefined;
318
+ suppressLog?: boolean | undefined;
319
+ populateAppCallResources?: boolean | undefined;
320
+ sender?: string | undefined;
321
+ }) => {
322
+ sender: string;
323
+ receiver: string;
324
+ lease?: string | Uint8Array | undefined;
325
+ note?: string | Uint8Array | undefined;
326
+ amount: AlgoAmount;
327
+ closeRemainderTo?: string | undefined;
328
+ maxFee?: AlgoAmount | undefined;
329
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
330
+ rekeyTo?: string | undefined;
331
+ staticFee?: AlgoAmount | undefined;
332
+ extraFee?: AlgoAmount | undefined;
333
+ validityWindow?: number | undefined;
334
+ firstValidRound?: bigint | undefined;
335
+ lastValidRound?: bigint | undefined;
336
+ maxRoundsToWaitForConfirmation?: number | undefined;
337
+ suppressLog?: boolean | undefined;
338
+ populateAppCallResources?: boolean | undefined;
339
+ };
340
+ /** Return params for an update ABI call, including deploy-time TEAL template replacements and compilation if provided */
341
+ update: (params: {
342
+ lease?: string | Uint8Array | undefined;
343
+ note?: string | Uint8Array | undefined;
344
+ maxFee?: AlgoAmount | undefined;
345
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
346
+ rekeyTo?: string | undefined;
347
+ staticFee?: AlgoAmount | undefined;
348
+ extraFee?: AlgoAmount | undefined;
349
+ validityWindow?: number | undefined;
350
+ firstValidRound?: bigint | undefined;
351
+ lastValidRound?: bigint | undefined;
352
+ onComplete?: algosdk.OnApplicationComplete | undefined;
353
+ accountReferences?: string[] | undefined;
354
+ appReferences?: bigint[] | undefined;
355
+ assetReferences?: bigint[] | undefined;
356
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
357
+ sender?: string | undefined;
358
+ method: string;
359
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
360
+ } & AppClientCompilationParams) => Promise<({
361
+ approvalProgram: Buffer;
362
+ clearStateProgram: Buffer;
363
+ compiledApproval?: undefined;
364
+ compiledClear?: undefined;
365
+ lease?: string | Uint8Array | undefined;
366
+ note?: string | Uint8Array | undefined;
367
+ maxFee?: AlgoAmount | undefined;
368
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
369
+ rekeyTo?: string | undefined;
370
+ staticFee?: AlgoAmount | undefined;
371
+ extraFee?: AlgoAmount | undefined;
372
+ validityWindow?: number | undefined;
373
+ firstValidRound?: bigint | undefined;
374
+ lastValidRound?: bigint | undefined;
375
+ onComplete?: algosdk.OnApplicationComplete | undefined;
376
+ accountReferences?: string[] | undefined;
377
+ appReferences?: bigint[] | undefined;
378
+ assetReferences?: bigint[] | undefined;
379
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
380
+ sender?: string | undefined;
381
+ method: string;
382
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
383
+ /** Any deploy-time parameters to replace in the TEAL code */
384
+ deployTimeParams?: TealTemplateParams | undefined;
385
+ /** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
386
+ updatable?: boolean | undefined;
387
+ /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
388
+ deletable?: boolean | undefined;
389
+ } | {
390
+ approvalProgram: Uint8Array;
391
+ compiledApproval: import("./app").CompiledTeal;
392
+ clearStateProgram: Uint8Array;
393
+ compiledClear: import("./app").CompiledTeal;
394
+ lease?: string | Uint8Array | undefined;
395
+ note?: string | Uint8Array | undefined;
396
+ maxFee?: AlgoAmount | undefined;
397
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
398
+ rekeyTo?: string | undefined;
399
+ staticFee?: AlgoAmount | undefined;
400
+ extraFee?: AlgoAmount | undefined;
401
+ validityWindow?: number | undefined;
402
+ firstValidRound?: bigint | undefined;
403
+ lastValidRound?: bigint | undefined;
404
+ onComplete?: algosdk.OnApplicationComplete | undefined;
405
+ accountReferences?: string[] | undefined;
406
+ appReferences?: bigint[] | undefined;
407
+ assetReferences?: bigint[] | undefined;
408
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
409
+ sender?: string | undefined;
410
+ method: string;
411
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
412
+ /** Any deploy-time parameters to replace in the TEAL code */
413
+ deployTimeParams?: TealTemplateParams | undefined;
414
+ /** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
415
+ updatable?: boolean | undefined;
416
+ /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
417
+ deletable?: boolean | undefined;
418
+ }) & {
419
+ appId: bigint;
420
+ sender: string;
421
+ method: Arc56Method;
422
+ onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
423
+ args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
424
+ lease?: string | Uint8Array | undefined;
425
+ note?: string | Uint8Array | undefined;
426
+ maxFee?: AlgoAmount | undefined;
427
+ args?: Uint8Array[] | undefined;
428
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
429
+ sender: string;
430
+ rekeyTo?: string | undefined;
431
+ staticFee?: AlgoAmount | undefined;
432
+ extraFee?: AlgoAmount | undefined;
433
+ validityWindow?: number | undefined;
434
+ firstValidRound?: bigint | undefined;
435
+ lastValidRound?: bigint | undefined;
436
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
437
+ accountReferences?: string[] | undefined;
438
+ appReferences?: bigint[] | undefined;
439
+ assetReferences?: bigint[] | undefined;
440
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
441
+ approvalProgram: string | Uint8Array;
442
+ clearStateProgram: string | Uint8Array;
443
+ schema?: {
444
+ globalInts: number;
445
+ globalByteSlices: number;
446
+ localInts: number;
447
+ localByteSlices: number;
448
+ } | undefined;
449
+ extraProgramPages?: number | undefined;
450
+ }> | AppMethodCall<{
451
+ sender: string;
452
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
453
+ rekeyTo?: string | undefined;
454
+ note?: string | Uint8Array | undefined;
455
+ lease?: string | Uint8Array | undefined;
456
+ staticFee?: AlgoAmount | undefined;
457
+ extraFee?: AlgoAmount | undefined;
458
+ maxFee?: AlgoAmount | undefined;
459
+ validityWindow?: number | undefined;
460
+ firstValidRound?: bigint | undefined;
461
+ lastValidRound?: bigint | undefined;
462
+ appId: bigint;
463
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
464
+ args?: Uint8Array[] | undefined;
465
+ accountReferences?: string[] | undefined;
466
+ appReferences?: bigint[] | undefined;
467
+ assetReferences?: bigint[] | undefined;
468
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
469
+ approvalProgram: string | Uint8Array;
470
+ clearStateProgram: string | Uint8Array;
471
+ }> | AppMethodCall<import("./composer").AppMethodCallParams>)[] | undefined;
472
+ }>;
473
+ /** Return params for an opt-in ABI call */
474
+ optIn: (params: {
475
+ lease?: string | Uint8Array | undefined;
476
+ note?: string | Uint8Array | undefined;
477
+ maxFee?: AlgoAmount | undefined;
478
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
479
+ rekeyTo?: string | undefined;
480
+ staticFee?: AlgoAmount | undefined;
481
+ extraFee?: AlgoAmount | undefined;
482
+ validityWindow?: number | undefined;
483
+ firstValidRound?: bigint | undefined;
484
+ lastValidRound?: bigint | undefined;
485
+ onComplete?: algosdk.OnApplicationComplete | undefined;
486
+ accountReferences?: string[] | undefined;
487
+ appReferences?: bigint[] | undefined;
488
+ assetReferences?: bigint[] | undefined;
489
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
490
+ sender?: string | undefined;
491
+ method: string;
492
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
493
+ }) => AppCallMethodCall;
494
+ /** Return params for an delete ABI call */
495
+ delete: (params: {
496
+ lease?: string | Uint8Array | undefined;
497
+ note?: string | Uint8Array | undefined;
498
+ maxFee?: AlgoAmount | undefined;
499
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
500
+ rekeyTo?: string | undefined;
501
+ staticFee?: AlgoAmount | undefined;
502
+ extraFee?: AlgoAmount | undefined;
503
+ validityWindow?: number | undefined;
504
+ firstValidRound?: bigint | undefined;
505
+ lastValidRound?: bigint | undefined;
506
+ onComplete?: algosdk.OnApplicationComplete | undefined;
507
+ accountReferences?: string[] | undefined;
508
+ appReferences?: bigint[] | undefined;
509
+ assetReferences?: bigint[] | undefined;
510
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
511
+ sender?: string | undefined;
512
+ method: string;
513
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
514
+ }) => AppDeleteMethodCall;
515
+ /** Return params for an close out ABI call */
516
+ closeOut: (params: {
517
+ lease?: string | Uint8Array | undefined;
518
+ note?: string | Uint8Array | undefined;
519
+ maxFee?: AlgoAmount | undefined;
520
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
521
+ rekeyTo?: string | undefined;
522
+ staticFee?: AlgoAmount | undefined;
523
+ extraFee?: AlgoAmount | undefined;
524
+ validityWindow?: number | undefined;
525
+ firstValidRound?: bigint | undefined;
526
+ lastValidRound?: bigint | undefined;
527
+ onComplete?: algosdk.OnApplicationComplete | undefined;
528
+ accountReferences?: string[] | undefined;
529
+ appReferences?: bigint[] | undefined;
530
+ assetReferences?: bigint[] | undefined;
531
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
532
+ sender?: string | undefined;
533
+ method: string;
534
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
535
+ }) => AppCallMethodCall;
536
+ /** Return params for an ABI call */
537
+ call: (params: {
538
+ lease?: string | Uint8Array | undefined;
539
+ note?: string | Uint8Array | undefined;
540
+ maxFee?: AlgoAmount | undefined;
541
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
542
+ rekeyTo?: string | undefined;
543
+ staticFee?: AlgoAmount | undefined;
544
+ extraFee?: AlgoAmount | undefined;
545
+ validityWindow?: number | undefined;
546
+ firstValidRound?: bigint | undefined;
547
+ lastValidRound?: bigint | undefined;
548
+ onComplete?: algosdk.OnApplicationComplete | undefined;
549
+ accountReferences?: string[] | undefined;
550
+ appReferences?: bigint[] | undefined;
551
+ assetReferences?: bigint[] | undefined;
552
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
553
+ sender?: string | undefined;
554
+ method: string;
555
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
556
+ } & CallOnComplete) => AppCallMethodCall;
557
+ } & {
558
+ /** Interact with bare (non-ABI) call parameters */ bare: {
559
+ /** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */
560
+ update: (params?: ({
561
+ lease?: string | Uint8Array | undefined;
562
+ note?: string | Uint8Array | undefined;
563
+ maxFee?: AlgoAmount | undefined;
564
+ args?: Uint8Array[] | undefined;
565
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
566
+ rekeyTo?: string | undefined;
567
+ staticFee?: AlgoAmount | undefined;
568
+ extraFee?: AlgoAmount | undefined;
569
+ validityWindow?: number | undefined;
570
+ firstValidRound?: bigint | undefined;
571
+ lastValidRound?: bigint | undefined;
572
+ accountReferences?: string[] | undefined;
573
+ appReferences?: bigint[] | undefined;
574
+ assetReferences?: bigint[] | undefined;
575
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
576
+ sender?: string | undefined;
577
+ } & AppClientCompilationParams) | undefined) => Promise<{
578
+ sender: string;
579
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
580
+ rekeyTo?: string | undefined;
581
+ note?: string | Uint8Array | undefined;
582
+ lease?: string | Uint8Array | undefined;
583
+ staticFee?: AlgoAmount | undefined;
584
+ extraFee?: AlgoAmount | undefined;
585
+ maxFee?: AlgoAmount | undefined;
586
+ validityWindow?: number | undefined;
587
+ firstValidRound?: bigint | undefined;
588
+ lastValidRound?: bigint | undefined;
589
+ appId: bigint;
590
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
591
+ args?: Uint8Array[] | undefined;
592
+ accountReferences?: string[] | undefined;
593
+ appReferences?: bigint[] | undefined;
594
+ assetReferences?: bigint[] | undefined;
595
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
596
+ approvalProgram: string | Uint8Array;
597
+ clearStateProgram: string | Uint8Array;
598
+ }>;
599
+ /** Return params for an opt-in call */
600
+ optIn: (params?: {
601
+ lease?: string | Uint8Array | undefined;
602
+ note?: string | Uint8Array | undefined;
603
+ maxFee?: AlgoAmount | undefined;
604
+ args?: Uint8Array[] | undefined;
605
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
606
+ rekeyTo?: string | undefined;
607
+ staticFee?: AlgoAmount | undefined;
608
+ extraFee?: AlgoAmount | undefined;
609
+ validityWindow?: number | undefined;
610
+ firstValidRound?: bigint | undefined;
611
+ lastValidRound?: bigint | undefined;
612
+ accountReferences?: string[] | undefined;
613
+ appReferences?: bigint[] | undefined;
614
+ assetReferences?: bigint[] | undefined;
615
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
616
+ sender?: string | undefined;
617
+ } | undefined) => AppCallParams;
618
+ /** Return params for a delete call */
619
+ delete: (params?: {
620
+ lease?: string | Uint8Array | undefined;
621
+ note?: string | Uint8Array | undefined;
622
+ maxFee?: AlgoAmount | undefined;
623
+ args?: Uint8Array[] | undefined;
624
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
625
+ rekeyTo?: string | undefined;
626
+ staticFee?: AlgoAmount | undefined;
627
+ extraFee?: AlgoAmount | undefined;
628
+ validityWindow?: number | undefined;
629
+ firstValidRound?: bigint | undefined;
630
+ lastValidRound?: bigint | undefined;
631
+ accountReferences?: string[] | undefined;
632
+ appReferences?: bigint[] | undefined;
633
+ assetReferences?: bigint[] | undefined;
634
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
635
+ sender?: string | undefined;
636
+ } | undefined) => AppDeleteParams;
637
+ /** Return params for a clear state call */
638
+ clearState: (params?: {
639
+ lease?: string | Uint8Array | undefined;
640
+ note?: string | Uint8Array | undefined;
641
+ maxFee?: AlgoAmount | undefined;
642
+ args?: Uint8Array[] | undefined;
643
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
644
+ rekeyTo?: string | undefined;
645
+ staticFee?: AlgoAmount | undefined;
646
+ extraFee?: AlgoAmount | undefined;
647
+ validityWindow?: number | undefined;
648
+ firstValidRound?: bigint | undefined;
649
+ lastValidRound?: bigint | undefined;
650
+ accountReferences?: string[] | undefined;
651
+ appReferences?: bigint[] | undefined;
652
+ assetReferences?: bigint[] | undefined;
653
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
654
+ sender?: string | undefined;
655
+ } | undefined) => AppCallParams;
656
+ /** Return params for a close out call */
657
+ closeOut: (params?: {
658
+ lease?: string | Uint8Array | undefined;
659
+ note?: string | Uint8Array | undefined;
660
+ maxFee?: AlgoAmount | undefined;
661
+ args?: Uint8Array[] | undefined;
662
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
663
+ rekeyTo?: string | undefined;
664
+ staticFee?: AlgoAmount | undefined;
665
+ extraFee?: AlgoAmount | undefined;
666
+ validityWindow?: number | undefined;
667
+ firstValidRound?: bigint | undefined;
668
+ lastValidRound?: bigint | undefined;
669
+ accountReferences?: string[] | undefined;
670
+ appReferences?: bigint[] | undefined;
671
+ assetReferences?: bigint[] | undefined;
672
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
673
+ sender?: string | undefined;
674
+ } | undefined) => AppCallParams;
675
+ /** Return params for a call (defaults to no-op) */
676
+ call: (params?: ({
677
+ lease?: string | Uint8Array | undefined;
678
+ note?: string | Uint8Array | undefined;
679
+ maxFee?: AlgoAmount | undefined;
680
+ args?: Uint8Array[] | undefined;
681
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
682
+ rekeyTo?: string | undefined;
683
+ staticFee?: AlgoAmount | undefined;
684
+ extraFee?: AlgoAmount | undefined;
685
+ validityWindow?: number | undefined;
686
+ firstValidRound?: bigint | undefined;
687
+ lastValidRound?: bigint | undefined;
688
+ accountReferences?: string[] | undefined;
689
+ appReferences?: bigint[] | undefined;
690
+ assetReferences?: bigint[] | undefined;
691
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
692
+ sender?: string | undefined;
693
+ } & CallOnComplete) | undefined) => AppCallParams;
694
+ };
695
+ };
696
+ /** Get transactions for the current app */
697
+ get transactions(): {
698
+ /** Return transaction for a payment transaction to fund the app account */
699
+ fundAppAccount: (params: {
700
+ lease?: string | Uint8Array | undefined;
701
+ note?: string | Uint8Array | undefined;
702
+ amount: AlgoAmount;
703
+ closeRemainderTo?: string | undefined;
704
+ maxFee?: AlgoAmount | undefined;
705
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
706
+ rekeyTo?: string | undefined;
707
+ staticFee?: AlgoAmount | undefined;
708
+ extraFee?: AlgoAmount | undefined;
709
+ validityWindow?: number | undefined;
710
+ firstValidRound?: bigint | undefined;
711
+ lastValidRound?: bigint | undefined;
712
+ maxRoundsToWaitForConfirmation?: number | undefined;
713
+ suppressLog?: boolean | undefined;
714
+ populateAppCallResources?: boolean | undefined;
715
+ sender?: string | undefined;
716
+ }) => Promise<algosdk.Transaction>;
717
+ /**
718
+ * Return transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
719
+ */
720
+ update: (params: {
721
+ lease?: string | Uint8Array | undefined;
722
+ note?: string | Uint8Array | undefined;
723
+ maxFee?: AlgoAmount | undefined;
724
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
725
+ rekeyTo?: string | undefined;
726
+ staticFee?: AlgoAmount | undefined;
727
+ extraFee?: AlgoAmount | undefined;
728
+ validityWindow?: number | undefined;
729
+ firstValidRound?: bigint | undefined;
730
+ lastValidRound?: bigint | undefined;
731
+ onComplete?: algosdk.OnApplicationComplete | undefined;
732
+ accountReferences?: string[] | undefined;
733
+ appReferences?: bigint[] | undefined;
734
+ assetReferences?: bigint[] | undefined;
735
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
736
+ sender?: string | undefined;
737
+ method: string;
738
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
739
+ } & AppClientCompilationParams) => Promise<{
740
+ transactions: algosdk.Transaction[];
741
+ methodCalls: Map<number, algosdk.ABIMethod>;
742
+ signers: Map<number, algosdk.TransactionSigner>;
743
+ }>;
744
+ /**
745
+ * Return transactions for an opt-in ABI call
746
+ */
747
+ optIn: (params: {
748
+ lease?: string | Uint8Array | undefined;
749
+ note?: string | Uint8Array | undefined;
750
+ maxFee?: AlgoAmount | undefined;
751
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
752
+ rekeyTo?: string | undefined;
753
+ staticFee?: AlgoAmount | undefined;
754
+ extraFee?: AlgoAmount | undefined;
755
+ validityWindow?: number | undefined;
756
+ firstValidRound?: bigint | undefined;
757
+ lastValidRound?: bigint | undefined;
758
+ onComplete?: algosdk.OnApplicationComplete | undefined;
759
+ accountReferences?: string[] | undefined;
760
+ appReferences?: bigint[] | undefined;
761
+ assetReferences?: bigint[] | undefined;
762
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
763
+ sender?: string | undefined;
764
+ method: string;
765
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
766
+ }) => Promise<{
767
+ transactions: algosdk.Transaction[];
768
+ methodCalls: Map<number, algosdk.ABIMethod>;
769
+ signers: Map<number, algosdk.TransactionSigner>;
770
+ }>;
771
+ /**
772
+ * Return transactions for a delete ABI call
773
+ */
774
+ delete: (params: {
775
+ lease?: string | Uint8Array | undefined;
776
+ note?: string | Uint8Array | undefined;
777
+ maxFee?: AlgoAmount | undefined;
778
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
779
+ rekeyTo?: string | undefined;
780
+ staticFee?: AlgoAmount | undefined;
781
+ extraFee?: AlgoAmount | undefined;
782
+ validityWindow?: number | undefined;
783
+ firstValidRound?: bigint | undefined;
784
+ lastValidRound?: bigint | undefined;
785
+ onComplete?: algosdk.OnApplicationComplete | undefined;
786
+ accountReferences?: string[] | undefined;
787
+ appReferences?: bigint[] | undefined;
788
+ assetReferences?: bigint[] | undefined;
789
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
790
+ sender?: string | undefined;
791
+ method: string;
792
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
793
+ }) => Promise<{
794
+ transactions: algosdk.Transaction[];
795
+ methodCalls: Map<number, algosdk.ABIMethod>;
796
+ signers: Map<number, algosdk.TransactionSigner>;
797
+ }>;
798
+ /**
799
+ * Return transactions for a close out ABI call
800
+ */
801
+ closeOut: (params: {
802
+ lease?: string | Uint8Array | undefined;
803
+ note?: string | Uint8Array | undefined;
804
+ maxFee?: AlgoAmount | undefined;
805
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
806
+ rekeyTo?: string | undefined;
807
+ staticFee?: AlgoAmount | undefined;
808
+ extraFee?: AlgoAmount | undefined;
809
+ validityWindow?: number | undefined;
810
+ firstValidRound?: bigint | undefined;
811
+ lastValidRound?: bigint | undefined;
812
+ onComplete?: algosdk.OnApplicationComplete | undefined;
813
+ accountReferences?: string[] | undefined;
814
+ appReferences?: bigint[] | undefined;
815
+ assetReferences?: bigint[] | undefined;
816
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
817
+ sender?: string | undefined;
818
+ method: string;
819
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
820
+ }) => Promise<{
821
+ transactions: algosdk.Transaction[];
822
+ methodCalls: Map<number, algosdk.ABIMethod>;
823
+ signers: Map<number, algosdk.TransactionSigner>;
824
+ }>;
825
+ /**
826
+ * Return transactions for an ABI call (defaults to no-op)
827
+ */
828
+ call: (params: {
829
+ lease?: string | Uint8Array | undefined;
830
+ note?: string | Uint8Array | undefined;
831
+ maxFee?: AlgoAmount | undefined;
832
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
833
+ rekeyTo?: string | undefined;
834
+ staticFee?: AlgoAmount | undefined;
835
+ extraFee?: AlgoAmount | undefined;
836
+ validityWindow?: number | undefined;
837
+ firstValidRound?: bigint | undefined;
838
+ lastValidRound?: bigint | undefined;
839
+ onComplete?: algosdk.OnApplicationComplete | undefined;
840
+ accountReferences?: string[] | undefined;
841
+ appReferences?: bigint[] | undefined;
842
+ assetReferences?: bigint[] | undefined;
843
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
844
+ sender?: string | undefined;
845
+ method: string;
846
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
847
+ } & CallOnComplete) => Promise<{
848
+ transactions: algosdk.Transaction[];
849
+ methodCalls: Map<number, algosdk.ABIMethod>;
850
+ signers: Map<number, algosdk.TransactionSigner>;
851
+ }>;
852
+ } & {
853
+ /** Interact with bare (non-ABI) call transactions */ bare: {
854
+ /** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */
855
+ update: (params?: ({
856
+ lease?: string | Uint8Array | undefined;
857
+ note?: string | Uint8Array | undefined;
858
+ maxFee?: AlgoAmount | undefined;
859
+ args?: Uint8Array[] | undefined;
860
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
861
+ rekeyTo?: string | undefined;
862
+ staticFee?: AlgoAmount | undefined;
863
+ extraFee?: AlgoAmount | undefined;
864
+ validityWindow?: number | undefined;
865
+ firstValidRound?: bigint | undefined;
866
+ lastValidRound?: bigint | undefined;
867
+ accountReferences?: string[] | undefined;
868
+ appReferences?: bigint[] | undefined;
869
+ assetReferences?: bigint[] | undefined;
870
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
871
+ sender?: string | undefined;
872
+ } & AppClientCompilationParams) | undefined) => Promise<algosdk.Transaction>;
873
+ /** Returns a transaction for an opt-in call */
874
+ optIn: (params?: {
875
+ lease?: string | Uint8Array | undefined;
876
+ note?: string | Uint8Array | undefined;
877
+ maxFee?: AlgoAmount | undefined;
878
+ args?: Uint8Array[] | undefined;
879
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
880
+ rekeyTo?: string | undefined;
881
+ staticFee?: AlgoAmount | undefined;
882
+ extraFee?: AlgoAmount | undefined;
883
+ validityWindow?: number | undefined;
884
+ firstValidRound?: bigint | undefined;
885
+ lastValidRound?: bigint | undefined;
886
+ accountReferences?: string[] | undefined;
887
+ appReferences?: bigint[] | undefined;
888
+ assetReferences?: bigint[] | undefined;
889
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
890
+ sender?: string | undefined;
891
+ } | undefined) => Promise<algosdk.Transaction>;
892
+ /** Returns a transaction for a delete call */
893
+ delete: (params?: {
894
+ lease?: string | Uint8Array | undefined;
895
+ note?: string | Uint8Array | undefined;
896
+ maxFee?: AlgoAmount | undefined;
897
+ args?: Uint8Array[] | undefined;
898
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
899
+ rekeyTo?: string | undefined;
900
+ staticFee?: AlgoAmount | undefined;
901
+ extraFee?: AlgoAmount | undefined;
902
+ validityWindow?: number | undefined;
903
+ firstValidRound?: bigint | undefined;
904
+ lastValidRound?: bigint | undefined;
905
+ accountReferences?: string[] | undefined;
906
+ appReferences?: bigint[] | undefined;
907
+ assetReferences?: bigint[] | undefined;
908
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
909
+ sender?: string | undefined;
910
+ } | undefined) => Promise<algosdk.Transaction>;
911
+ /** Returns a transaction for a clear state call */
912
+ clearState: (params?: {
913
+ lease?: string | Uint8Array | undefined;
914
+ note?: string | Uint8Array | undefined;
915
+ maxFee?: AlgoAmount | undefined;
916
+ args?: Uint8Array[] | undefined;
917
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
918
+ rekeyTo?: string | undefined;
919
+ staticFee?: AlgoAmount | undefined;
920
+ extraFee?: AlgoAmount | undefined;
921
+ validityWindow?: number | undefined;
922
+ firstValidRound?: bigint | undefined;
923
+ lastValidRound?: bigint | undefined;
924
+ accountReferences?: string[] | undefined;
925
+ appReferences?: bigint[] | undefined;
926
+ assetReferences?: bigint[] | undefined;
927
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
928
+ sender?: string | undefined;
929
+ } | undefined) => Promise<algosdk.Transaction>;
930
+ /** Returns a transaction for a close out call */
931
+ closeOut: (params?: {
932
+ lease?: string | Uint8Array | undefined;
933
+ note?: string | Uint8Array | undefined;
934
+ maxFee?: AlgoAmount | undefined;
935
+ args?: Uint8Array[] | undefined;
936
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
937
+ rekeyTo?: string | undefined;
938
+ staticFee?: AlgoAmount | undefined;
939
+ extraFee?: AlgoAmount | undefined;
940
+ validityWindow?: number | undefined;
941
+ firstValidRound?: bigint | undefined;
942
+ lastValidRound?: bigint | undefined;
943
+ accountReferences?: string[] | undefined;
944
+ appReferences?: bigint[] | undefined;
945
+ assetReferences?: bigint[] | undefined;
946
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
947
+ sender?: string | undefined;
948
+ } | undefined) => Promise<algosdk.Transaction>;
949
+ /** Returns a transaction for a call (defaults to no-op) */
950
+ call: (params?: ({
951
+ lease?: string | Uint8Array | undefined;
952
+ note?: string | Uint8Array | undefined;
953
+ maxFee?: AlgoAmount | undefined;
954
+ args?: Uint8Array[] | undefined;
955
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
956
+ rekeyTo?: string | undefined;
957
+ staticFee?: AlgoAmount | undefined;
958
+ extraFee?: AlgoAmount | undefined;
959
+ validityWindow?: number | undefined;
960
+ firstValidRound?: bigint | undefined;
961
+ lastValidRound?: bigint | undefined;
962
+ accountReferences?: string[] | undefined;
963
+ appReferences?: bigint[] | undefined;
964
+ assetReferences?: bigint[] | undefined;
965
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
966
+ sender?: string | undefined;
967
+ } & CallOnComplete) | undefined) => Promise<algosdk.Transaction>;
968
+ };
969
+ };
970
+ /** Send calls to the current app */
971
+ get send(): {
972
+ /** Sign and send transactions for a payment transaction to fund the app account */
973
+ fundAppAccount: (params: {
974
+ lease?: string | Uint8Array | undefined;
975
+ note?: string | Uint8Array | undefined;
976
+ amount: AlgoAmount;
977
+ closeRemainderTo?: string | undefined;
978
+ maxFee?: AlgoAmount | undefined;
979
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
980
+ rekeyTo?: string | undefined;
981
+ staticFee?: AlgoAmount | undefined;
982
+ extraFee?: AlgoAmount | undefined;
983
+ validityWindow?: number | undefined;
984
+ firstValidRound?: bigint | undefined;
985
+ lastValidRound?: bigint | undefined;
986
+ maxRoundsToWaitForConfirmation?: number | undefined;
987
+ suppressLog?: boolean | undefined;
988
+ populateAppCallResources?: boolean | undefined;
989
+ sender?: string | undefined;
990
+ } & ExecuteParams) => Promise<{
991
+ groupId: string;
992
+ txIds: string[];
993
+ returns?: ABIReturn[] | undefined;
994
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
995
+ transactions: algosdk.Transaction[];
996
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
997
+ transaction: algosdk.Transaction;
998
+ }>;
999
+ /**
1000
+ * Sign and send transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
1001
+ */
1002
+ update: (params: {
1003
+ lease?: string | Uint8Array | undefined;
1004
+ note?: string | Uint8Array | undefined;
1005
+ maxFee?: AlgoAmount | undefined;
1006
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1007
+ rekeyTo?: string | undefined;
1008
+ staticFee?: AlgoAmount | undefined;
1009
+ extraFee?: AlgoAmount | undefined;
1010
+ validityWindow?: number | undefined;
1011
+ firstValidRound?: bigint | undefined;
1012
+ lastValidRound?: bigint | undefined;
1013
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1014
+ accountReferences?: string[] | undefined;
1015
+ appReferences?: bigint[] | undefined;
1016
+ assetReferences?: bigint[] | undefined;
1017
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1018
+ sender?: string | undefined;
1019
+ method: string;
1020
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1021
+ } & AppClientCompilationParams & ExecuteParams) => Promise<{
1022
+ compiledApproval?: import("./app").CompiledTeal | undefined;
1023
+ compiledClear?: import("./app").CompiledTeal | undefined;
1024
+ groupId: string;
1025
+ txIds: string[];
1026
+ returns?: ABIReturn[] | undefined;
1027
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1028
+ transactions: algosdk.Transaction[];
1029
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1030
+ transaction: algosdk.Transaction;
1031
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1032
+ }>;
1033
+ /**
1034
+ * Sign and send transactions for an opt-in ABI call
1035
+ */
1036
+ optIn: (params: {
1037
+ lease?: string | Uint8Array | undefined;
1038
+ note?: string | Uint8Array | undefined;
1039
+ maxFee?: AlgoAmount | undefined;
1040
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1041
+ rekeyTo?: string | undefined;
1042
+ staticFee?: AlgoAmount | undefined;
1043
+ extraFee?: AlgoAmount | undefined;
1044
+ validityWindow?: number | undefined;
1045
+ firstValidRound?: bigint | undefined;
1046
+ lastValidRound?: bigint | undefined;
1047
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1048
+ accountReferences?: string[] | undefined;
1049
+ appReferences?: bigint[] | undefined;
1050
+ assetReferences?: bigint[] | undefined;
1051
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1052
+ sender?: string | undefined;
1053
+ method: string;
1054
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1055
+ } & ExecuteParams) => Promise<{
1056
+ groupId: string;
1057
+ txIds: string[];
1058
+ returns?: ABIReturn[] | undefined;
1059
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1060
+ transactions: algosdk.Transaction[];
1061
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1062
+ transaction: algosdk.Transaction;
1063
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1064
+ }>;
1065
+ /**
1066
+ * Sign and send transactions for a delete ABI call
1067
+ */
1068
+ delete: (params: {
1069
+ lease?: string | Uint8Array | undefined;
1070
+ note?: string | Uint8Array | undefined;
1071
+ maxFee?: AlgoAmount | undefined;
1072
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1073
+ rekeyTo?: string | undefined;
1074
+ staticFee?: AlgoAmount | undefined;
1075
+ extraFee?: AlgoAmount | undefined;
1076
+ validityWindow?: number | undefined;
1077
+ firstValidRound?: bigint | undefined;
1078
+ lastValidRound?: bigint | undefined;
1079
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1080
+ accountReferences?: string[] | undefined;
1081
+ appReferences?: bigint[] | undefined;
1082
+ assetReferences?: bigint[] | undefined;
1083
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1084
+ sender?: string | undefined;
1085
+ method: string;
1086
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1087
+ } & ExecuteParams) => Promise<{
1088
+ groupId: string;
1089
+ txIds: string[];
1090
+ returns?: ABIReturn[] | undefined;
1091
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1092
+ transactions: algosdk.Transaction[];
1093
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1094
+ transaction: algosdk.Transaction;
1095
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1096
+ }>;
1097
+ /**
1098
+ * Sign and send transactions for a close out ABI call
1099
+ */
1100
+ closeOut: (params: {
1101
+ lease?: string | Uint8Array | undefined;
1102
+ note?: string | Uint8Array | undefined;
1103
+ maxFee?: AlgoAmount | undefined;
1104
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1105
+ rekeyTo?: string | undefined;
1106
+ staticFee?: AlgoAmount | undefined;
1107
+ extraFee?: AlgoAmount | undefined;
1108
+ validityWindow?: number | undefined;
1109
+ firstValidRound?: bigint | undefined;
1110
+ lastValidRound?: bigint | undefined;
1111
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1112
+ accountReferences?: string[] | undefined;
1113
+ appReferences?: bigint[] | undefined;
1114
+ assetReferences?: bigint[] | undefined;
1115
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1116
+ sender?: string | undefined;
1117
+ method: string;
1118
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1119
+ } & ExecuteParams) => Promise<{
1120
+ groupId: string;
1121
+ txIds: string[];
1122
+ returns?: ABIReturn[] | undefined;
1123
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1124
+ transactions: algosdk.Transaction[];
1125
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1126
+ transaction: algosdk.Transaction;
1127
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1128
+ }>;
1129
+ /**
1130
+ * Sign and send transactions for a call (defaults to no-op)
1131
+ */
1132
+ call: (params: {
1133
+ lease?: string | Uint8Array | undefined;
1134
+ note?: string | Uint8Array | undefined;
1135
+ maxFee?: AlgoAmount | undefined;
1136
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1137
+ rekeyTo?: string | undefined;
1138
+ staticFee?: AlgoAmount | undefined;
1139
+ extraFee?: AlgoAmount | undefined;
1140
+ validityWindow?: number | undefined;
1141
+ firstValidRound?: bigint | undefined;
1142
+ lastValidRound?: bigint | undefined;
1143
+ onComplete?: algosdk.OnApplicationComplete | undefined;
1144
+ accountReferences?: string[] | undefined;
1145
+ appReferences?: bigint[] | undefined;
1146
+ assetReferences?: bigint[] | undefined;
1147
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1148
+ sender?: string | undefined;
1149
+ method: string;
1150
+ args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1151
+ } & CallOnComplete & ExecuteParams) => Promise<{
1152
+ groupId: string;
1153
+ txIds: string[];
1154
+ returns?: ABIReturn[] | undefined;
1155
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1156
+ transactions: algosdk.Transaction[];
1157
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1158
+ transaction: algosdk.Transaction;
1159
+ return?: algosdk.ABIValue | ABIStruct | undefined;
1160
+ }>;
1161
+ } & {
1162
+ /** Interact with bare (non-ABI) calls */ bare: {
1163
+ /** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */
1164
+ update: (params?: ({
1165
+ lease?: string | Uint8Array | undefined;
1166
+ note?: string | Uint8Array | undefined;
1167
+ maxFee?: AlgoAmount | undefined;
1168
+ args?: Uint8Array[] | undefined;
1169
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1170
+ rekeyTo?: string | undefined;
1171
+ staticFee?: AlgoAmount | undefined;
1172
+ extraFee?: AlgoAmount | undefined;
1173
+ validityWindow?: number | undefined;
1174
+ firstValidRound?: bigint | undefined;
1175
+ lastValidRound?: bigint | undefined;
1176
+ accountReferences?: string[] | undefined;
1177
+ appReferences?: bigint[] | undefined;
1178
+ assetReferences?: bigint[] | undefined;
1179
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1180
+ sender?: string | undefined;
1181
+ } & AppClientCompilationParams & ExecuteParams) | undefined) => Promise<{
1182
+ groupId: string;
1183
+ txIds: string[];
1184
+ returns?: ABIReturn[] | undefined;
1185
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1186
+ transactions: algosdk.Transaction[];
1187
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1188
+ transaction: algosdk.Transaction;
1189
+ return?: ABIReturn | undefined;
1190
+ compiledApproval?: import("./app").CompiledTeal | undefined;
1191
+ compiledClear?: import("./app").CompiledTeal | undefined;
1192
+ }>;
1193
+ /** Signs and sends an opt-in call */
1194
+ optIn: (params?: ({
1195
+ lease?: string | Uint8Array | undefined;
1196
+ note?: string | Uint8Array | undefined;
1197
+ maxFee?: AlgoAmount | undefined;
1198
+ args?: Uint8Array[] | undefined;
1199
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1200
+ rekeyTo?: string | undefined;
1201
+ staticFee?: AlgoAmount | undefined;
1202
+ extraFee?: AlgoAmount | undefined;
1203
+ validityWindow?: number | undefined;
1204
+ firstValidRound?: bigint | undefined;
1205
+ lastValidRound?: bigint | undefined;
1206
+ accountReferences?: string[] | undefined;
1207
+ appReferences?: bigint[] | undefined;
1208
+ assetReferences?: bigint[] | undefined;
1209
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1210
+ sender?: string | undefined;
1211
+ } & ExecuteParams) | undefined) => Promise<{
1212
+ groupId: string;
1213
+ txIds: string[];
1214
+ returns?: ABIReturn[] | undefined;
1215
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1216
+ transactions: algosdk.Transaction[];
1217
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1218
+ transaction: algosdk.Transaction;
1219
+ return?: ABIReturn | undefined;
1220
+ }>;
1221
+ /** Signs and sends a delete call */
1222
+ delete: (params?: ({
1223
+ lease?: string | Uint8Array | undefined;
1224
+ note?: string | Uint8Array | undefined;
1225
+ maxFee?: AlgoAmount | undefined;
1226
+ args?: Uint8Array[] | undefined;
1227
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1228
+ rekeyTo?: string | undefined;
1229
+ staticFee?: AlgoAmount | undefined;
1230
+ extraFee?: AlgoAmount | undefined;
1231
+ validityWindow?: number | undefined;
1232
+ firstValidRound?: bigint | undefined;
1233
+ lastValidRound?: bigint | undefined;
1234
+ accountReferences?: string[] | undefined;
1235
+ appReferences?: bigint[] | undefined;
1236
+ assetReferences?: bigint[] | undefined;
1237
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1238
+ sender?: string | undefined;
1239
+ } & ExecuteParams) | undefined) => Promise<{
1240
+ groupId: string;
1241
+ txIds: string[];
1242
+ returns?: ABIReturn[] | undefined;
1243
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1244
+ transactions: algosdk.Transaction[];
1245
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1246
+ transaction: algosdk.Transaction;
1247
+ return?: ABIReturn | undefined;
1248
+ }>;
1249
+ /** Signs and sends a clear state call */
1250
+ clearState: (params?: ({
1251
+ lease?: string | Uint8Array | undefined;
1252
+ note?: string | Uint8Array | undefined;
1253
+ maxFee?: AlgoAmount | undefined;
1254
+ args?: Uint8Array[] | undefined;
1255
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1256
+ rekeyTo?: string | undefined;
1257
+ staticFee?: AlgoAmount | undefined;
1258
+ extraFee?: AlgoAmount | undefined;
1259
+ validityWindow?: number | undefined;
1260
+ firstValidRound?: bigint | undefined;
1261
+ lastValidRound?: bigint | undefined;
1262
+ accountReferences?: string[] | undefined;
1263
+ appReferences?: bigint[] | undefined;
1264
+ assetReferences?: bigint[] | undefined;
1265
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1266
+ sender?: string | undefined;
1267
+ } & ExecuteParams) | undefined) => Promise<{
1268
+ groupId: string;
1269
+ txIds: string[];
1270
+ returns?: ABIReturn[] | undefined;
1271
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1272
+ transactions: algosdk.Transaction[];
1273
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1274
+ transaction: algosdk.Transaction;
1275
+ return?: ABIReturn | undefined;
1276
+ }>;
1277
+ /** Signs and sends a close out call */
1278
+ closeOut: (params?: ({
1279
+ lease?: string | Uint8Array | undefined;
1280
+ note?: string | Uint8Array | undefined;
1281
+ maxFee?: AlgoAmount | undefined;
1282
+ args?: Uint8Array[] | undefined;
1283
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1284
+ rekeyTo?: string | undefined;
1285
+ staticFee?: AlgoAmount | undefined;
1286
+ extraFee?: AlgoAmount | undefined;
1287
+ validityWindow?: number | undefined;
1288
+ firstValidRound?: bigint | undefined;
1289
+ lastValidRound?: bigint | undefined;
1290
+ accountReferences?: string[] | undefined;
1291
+ appReferences?: bigint[] | undefined;
1292
+ assetReferences?: bigint[] | undefined;
1293
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1294
+ sender?: string | undefined;
1295
+ } & ExecuteParams) | undefined) => Promise<{
1296
+ groupId: string;
1297
+ txIds: string[];
1298
+ returns?: ABIReturn[] | undefined;
1299
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1300
+ transactions: algosdk.Transaction[];
1301
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1302
+ transaction: algosdk.Transaction;
1303
+ return?: ABIReturn | undefined;
1304
+ }>;
1305
+ /** Signs and sends a call (defaults to no-op) */
1306
+ call: (params?: ({
1307
+ lease?: string | Uint8Array | undefined;
1308
+ note?: string | Uint8Array | undefined;
1309
+ maxFee?: AlgoAmount | undefined;
1310
+ args?: Uint8Array[] | undefined;
1311
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
1312
+ rekeyTo?: string | undefined;
1313
+ staticFee?: AlgoAmount | undefined;
1314
+ extraFee?: AlgoAmount | undefined;
1315
+ validityWindow?: number | undefined;
1316
+ firstValidRound?: bigint | undefined;
1317
+ lastValidRound?: bigint | undefined;
1318
+ accountReferences?: string[] | undefined;
1319
+ appReferences?: bigint[] | undefined;
1320
+ assetReferences?: bigint[] | undefined;
1321
+ boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1322
+ sender?: string | undefined;
1323
+ } & CallOnComplete & ExecuteParams) | undefined) => Promise<{
1324
+ groupId: string;
1325
+ txIds: string[];
1326
+ returns?: ABIReturn[] | undefined;
1327
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1328
+ transactions: algosdk.Transaction[];
1329
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1330
+ transaction: algosdk.Transaction;
1331
+ return?: ABIReturn | undefined;
1332
+ }>;
1333
+ };
1334
+ };
1335
+ get state(): {
1336
+ /**
1337
+ * Methods to access local state for the current app
1338
+ * @param address The address of the account to get the local state for
1339
+ */
1340
+ local: (address: string) => {
1341
+ /**
1342
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1343
+ */
1344
+ getAll: () => Promise<Record<string, any>>;
1345
+ /**
1346
+ * Returns a single state value for the current app with the value a decoded ABI value.
1347
+ * @param name The name of the state value to retrieve the value for
1348
+ * @param appState Optional cached value of the current state
1349
+ * @returns
1350
+ */
1351
+ getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1352
+ /**
1353
+ * Returns a single value from the given map for the current app with the value a decoded ABI value.
1354
+ * @param mapName The name of the map to read from
1355
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1356
+ * that will be converted to bytes by encoding it using the specified ABI key type
1357
+ * in the ARC-56 spec
1358
+ * @param appState Optional cached value of the current state
1359
+ */
1360
+ getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1361
+ /**
1362
+ * Returns all map values for the given map.
1363
+ * @param mapName The name of the map to read from
1364
+ * @param appState Optional cached value of the current state
1365
+ * @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
1366
+ */
1367
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1368
+ };
1369
+ /**
1370
+ * Methods to access global state for the current app
1371
+ */
1372
+ global: {
1373
+ /**
1374
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1375
+ */
1376
+ getAll: () => Promise<Record<string, any>>;
1377
+ /**
1378
+ * Returns a single state value for the current app with the value a decoded ABI value.
1379
+ * @param name The name of the state value to retrieve the value for
1380
+ * @param appState Optional cached value of the current state
1381
+ * @returns
1382
+ */
1383
+ getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1384
+ /**
1385
+ * Returns a single value from the given map for the current app with the value a decoded ABI value.
1386
+ * @param mapName The name of the map to read from
1387
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1388
+ * that will be converted to bytes by encoding it using the specified ABI key type
1389
+ * in the ARC-56 spec
1390
+ * @param appState Optional cached value of the current state
1391
+ */
1392
+ getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
1393
+ /**
1394
+ * Returns all map values for the given map.
1395
+ * @param mapName The name of the map to read from
1396
+ * @param appState Optional cached value of the current state
1397
+ * @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
1398
+ */
1399
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1400
+ };
1401
+ /**
1402
+ * Methods to access box storage for the current app
1403
+ */
1404
+ box: {
1405
+ /**
1406
+ * Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
1407
+ */
1408
+ getAll: () => Promise<Record<string, any>>;
1409
+ /**
1410
+ * Returns a single state value for the current app with the value a decoded ABI value.
1411
+ * @param name The name of the state value to retrieve the value for
1412
+ * @returns
1413
+ */
1414
+ getValue: (name: string) => Promise<algosdk.ABIValue | ABIStruct>;
1415
+ /**
1416
+ *
1417
+ * @param mapName The name of the map to read from
1418
+ * @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
1419
+ * that will be converted to bytes by encoding it using the specified ABI key type
1420
+ * in the ARC-56 spec
1421
+ */
1422
+ getMapValue: (mapName: string, key: any) => Promise<algosdk.ABIValue | ABIStruct>;
1423
+ /**
1424
+ *
1425
+ * @param mapName The name of the map to read from
1426
+ * @param key The key within the map as either a Buffer with the bytes or a value
1427
+ * that will be converted to bytes by encoding it using the specified ABI key type
1428
+ * in the ARC-56 spec
1429
+ * @param appState
1430
+ */
1431
+ getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
1432
+ };
1433
+ };
1434
+ /**
1435
+ * Funds Algo into the app account for this app.
1436
+ * @param params The parameters for the funding transaction
1437
+ * @returns The result of the funding
1438
+ */
1439
+ fundAppAccount(params: FundAppParams): Promise<{
1440
+ groupId: string;
1441
+ txIds: string[];
1442
+ returns?: ABIReturn[] | undefined;
1443
+ confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1444
+ transactions: algosdk.Transaction[];
1445
+ confirmation: algosdk.modelsv2.PendingTransactionResponse;
1446
+ transaction: algosdk.Transaction;
1447
+ }>;
1448
+ /**
1449
+ * Returns raw global state for the current app.
1450
+ * @returns The global state
1451
+ */
1452
+ getGlobalState(): Promise<AppState>;
1453
+ /**
1454
+ * Returns raw local state for the given account address.
1455
+ * @param address The address of the account to get the local state for
1456
+ * @returns The local state
1457
+ */
1458
+ getLocalState(address: string): Promise<AppState>;
1459
+ /**
1460
+ * Returns the names of all current boxes for the current app.
1461
+ * @returns The names of the boxes
1462
+ */
1463
+ getBoxNames(): Promise<BoxName[]>;
1464
+ /**
1465
+ * Returns the value of the given box for the current app.
1466
+ * @param name The identifier of the box to return
1467
+ * @returns The current box value as a byte array
1468
+ */
1469
+ getBoxValue(name: BoxIdentifier): Promise<Uint8Array>;
1470
+ /**
1471
+ * Returns the value of the given box for the current app.
1472
+ * @param name The identifier of the box to return
1473
+ * @param type
1474
+ * @returns The current box value as a byte array
1475
+ */
1476
+ getBoxValueFromABIType(name: BoxIdentifier, type: ABIType): Promise<ABIValue>;
1477
+ /**
1478
+ * Returns the values of all current boxes for the current app.
1479
+ * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
1480
+ * @param filter Optional filter to filter which boxes' values are returned
1481
+ * @returns The (name, value) pair of the boxes with values as raw byte arrays
1482
+ */
1483
+ getBoxValues(filter?: (name: BoxName) => boolean): Promise<{
1484
+ name: BoxName;
1485
+ value: Uint8Array;
1486
+ }[]>;
1487
+ /**
1488
+ * Returns the values of all current boxes for the current app decoded using an ABI Type.
1489
+ * Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
1490
+ * @param type The ABI type to decode the values with
1491
+ * @param filter Optional filter to filter which boxes' values are returned
1492
+ * @returns The (name, value) pair of the boxes with values as the ABI Value
1493
+ */
1494
+ getBoxValuesFromABIType(type: ABIType, filter?: (name: BoxName) => boolean): Promise<{
1495
+ name: BoxName;
1496
+ value: ABIValue;
1497
+ }[]>;
1498
+ /**
1499
+ * Takes an error that may include a logic error from a call to the current app and re-exposes the
1500
+ * error to include source code information via the source map and ARC-56 spec.
1501
+ * @param e The error to parse
1502
+ * @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
1503
+ * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
1504
+ */
1505
+ exposeLogicError(e: Error, isClearStateProgram?: boolean): Error;
1506
+ /**
1507
+ * Export the current source maps for the app.
1508
+ * @returns The source maps
1509
+ */
1510
+ exportSourceMaps(): AppSourceMaps;
1511
+ /**
1512
+ * Import source maps for the app.
1513
+ * @param sourceMaps The source maps to import
1514
+ */
1515
+ importSourceMaps(sourceMaps: AppSourceMaps): void;
1516
+ /**
1517
+ * Returns the ABI Method for the given method name string for the app represented by this application client instance
1518
+ * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1519
+ * e.g. `my_method` or `my_method(unit64,string)bytes`
1520
+ * @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]
1521
+ */
1522
+ getABIMethod(methodNameOrSignature: string): Arc56Method;
1523
+ /**
1524
+ * Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
1525
+ * on the ARC-56 method.
1526
+ *
1527
+ * If the return type is a struct then the struct will be returned.
1528
+ *
1529
+ * @param result The SendAppTransactionResult to be mapped
1530
+ * @param method The method that was called
1531
+ * @returns The smart contract response with an updated return value
1532
+ */
1533
+ parseMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Expand<Omit<TResult, 'return'> & AppReturn<TReturn>>>;
1534
+ /**
1535
+ * Takes an error that may include a logic error from a call to the current app and re-exposes the
1536
+ * error to include source code information via the source map and ARC-56 spec.
1537
+ * @param e The error to parse
1538
+ * @param appSpec The app spec for the app
1539
+ * @param details Additional information to inform the error
1540
+ * @returns The new error, or if there was no logic error or source map then the wrapped error with source details
1541
+ */
1542
+ static exposeLogicError(e: Error, appSpec: Arc56Contract, details: {
1543
+ /** Whether or not the code was running the clear state program (defaults to approval program) */ isClearStateProgram?: boolean;
1544
+ /** Approval program source map */ approvalSourceMap?: SourceMap;
1545
+ /** Clear state program source map */ clearSourceMap?: SourceMap;
1546
+ }): Error;
1547
+ /**
1548
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1549
+ * performing any provided deploy-time parameter replacement and returns
1550
+ * the compiled code and any compilation results (including source maps).
1551
+ *
1552
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1553
+ *
1554
+ * Will store any generated source maps for later use in debugging.
1555
+ * @param appSpec The app spec for the app
1556
+ * @param compilation Any compilation parameters to use
1557
+ */
1558
+ static compile(appSpec: Arc56Contract, appManager: AppManager, compilation?: AppClientCompilationParams): Promise<{
1559
+ approvalProgram: Buffer;
1560
+ clearStateProgram: Buffer;
1561
+ compiledApproval?: undefined;
1562
+ compiledClear?: undefined;
1563
+ } | {
1564
+ approvalProgram: Uint8Array;
1565
+ compiledApproval: import("./app").CompiledTeal;
1566
+ clearStateProgram: Uint8Array;
1567
+ compiledClear: import("./app").CompiledTeal;
1568
+ }>;
1569
+ /**
1570
+ * Returns ABI method arguments ready for a method call params object with default values populated
1571
+ * and structs replaced with tuples.
1572
+ *
1573
+ * It does this by replacing any `undefined` values with the equivalent default value from the given ARC-56 app spec.
1574
+ * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1575
+ * e.g. `my_method` or `my_method(unit64,string)bytes`
1576
+ * @param args The arguments to the method with `undefined` for any that should be populated with a default value
1577
+ * @param appSpec The app spec for the app
1578
+ */
1579
+ static getABIArgsWithDefaultValues(methodNameOrSignature: string, args: AppClientMethodCallParams['args'] | undefined, appSpec: Arc56Contract): AppMethodCall<CommonAppCallParams>['args'];
1580
+ private getBareParamsMethods;
1581
+ private getBareTransactionsMethods;
1582
+ private getBareSendMethods;
1583
+ private getMethodCallParamsMethods;
1584
+ private getMethodCallSendMethods;
1585
+ private getMethodCallTransactionsMethods;
1586
+ /**
1587
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1588
+ * performing any provided deploy-time parameter replacement and stores
1589
+ * the source maps.
1590
+ *
1591
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1592
+ *
1593
+ * Will store any generated source maps for later use in debugging.
1594
+ */
1595
+ private compile;
1596
+ /** Returns the sender for a call, using the `defaultSender`
1597
+ * if none provided and throws an error if neither provided */
1598
+ private getSender;
1599
+ private getBareParams;
1600
+ private getABIParams;
1601
+ /** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
1602
+ private handleCallErrors;
1603
+ private getBoxMethods;
1604
+ private getStateMethods;
1605
+ }
1606
+ /**
1607
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
1608
+ * `algorand.client.getAppClientByCreatorAndName`.
1609
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
1610
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
1611
+ *
1612
+ * Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */
171
1613
  export declare class ApplicationClient {
172
1614
  private algod;
173
1615
  private indexer?;
@@ -183,15 +1625,22 @@ export declare class ApplicationClient {
183
1625
  private _approvalSourceMap;
184
1626
  private _clearSourceMap;
185
1627
  /**
1628
+ * @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
1629
+ * `algorand.client.getAppClientByCreatorAndName`.
1630
+ * If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
1631
+ * which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
1632
+ *
186
1633
  * Create a new ApplicationClient instance
187
1634
  * @param appDetails The details of the app
188
1635
  * @param algod An algod instance
189
1636
  */
190
1637
  constructor(appDetails: AppSpecAppDetails, algod: Algodv2);
191
1638
  /**
192
- * Compiles the approval and clear programs and sets up the source map.
1639
+ * @deprecated Use `AppClient.compile()` instead.
1640
+ *
1641
+ * Compiles the approval and clear state programs and sets up the source map.
193
1642
  * @param compilation The deploy-time parameters for the compilation
194
- * @returns The compiled approval and clear programs
1643
+ * @returns The compiled approval and clear state programs
195
1644
  */
196
1645
  compile(compilation?: AppClientCompilationParams): Promise<{
197
1646
  approvalCompiled: import("./app").CompiledTeal;
@@ -208,6 +1657,8 @@ export declare class ApplicationClient {
208
1657
  */
209
1658
  importSourceMaps(sourceMaps: AppSourceMaps): void;
210
1659
  /**
1660
+ * @deprecated Use `deploy` from an `AppFactory` instance instead.
1661
+ *
211
1662
  * Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
212
1663
  *
213
1664
  * To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
@@ -262,6 +1713,8 @@ export declare class ApplicationClient {
262
1713
  operationPerformed: "replace";
263
1714
  }>;
264
1715
  /**
1716
+ * @deprecated Use `create` from an `AppFactory` instance instead.
1717
+ *
265
1718
  * Creates a smart contract app, returns the details of the created app.
266
1719
  * @param create The parameters to create the app with
267
1720
  * @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result
@@ -278,6 +1731,8 @@ export declare class ApplicationClient {
278
1731
  appAddress: string;
279
1732
  }>;
280
1733
  /**
1734
+ * @deprecated Use `appClient.send.update` or `appClient.transactions.update` from an `AppClient` instance instead.
1735
+ *
281
1736
  * Updates the smart contract app.
282
1737
  * @param update The parameters to update the app with
283
1738
  * @returns The transaction send result and the compilation result
@@ -292,36 +1747,48 @@ export declare class ApplicationClient {
292
1747
  confirmation?: algosdk.modelsv2.PendingTransactionResponse | undefined;
293
1748
  }>;
294
1749
  /**
1750
+ * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1751
+ *
295
1752
  * Issues a no_op (normal) call to the app.
296
1753
  * @param call The call details.
297
1754
  * @returns The result of the call
298
1755
  */
299
1756
  call(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
300
1757
  /**
1758
+ * @deprecated Use `appClient.send.optIn` or `appClient.transactions.optIn` from an `AppClient` instance instead.
1759
+ *
301
1760
  * Issues a opt_in call to the app.
302
1761
  * @param call The call details.
303
1762
  * @returns The result of the call
304
1763
  */
305
1764
  optIn(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
306
1765
  /**
1766
+ * @deprecated Use `appClient.send.closeOut` or `appClient.transactions.closeOut` from an `AppClient` instance instead.
1767
+ *
307
1768
  * Issues a close_out call to the app.
308
1769
  * @param call The call details.
309
1770
  * @returns The result of the call
310
1771
  */
311
1772
  closeOut(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
312
1773
  /**
1774
+ * @deprecated Use `appClient.send.clearState` or `appClient.transactions.clearState` from an `AppClient` instance instead.
1775
+ *
313
1776
  * Issues a clear_state call to the app.
314
1777
  * @param call The call details.
315
1778
  * @returns The result of the call
316
1779
  */
317
1780
  clearState(call?: AppClientClearStateParams): Promise<AppCallTransactionResult>;
318
1781
  /**
1782
+ * @deprecated Use `appClient.send.delete` or `appClient.transactions.delete` from an `AppClient` instance instead.
1783
+ *
319
1784
  * Issues a delete_application call to the app.
320
1785
  * @param call The call details.
321
1786
  * @returns The result of the call
322
1787
  */
323
1788
  delete(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
324
1789
  /**
1790
+ * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1791
+ *
325
1792
  * Issues a call to the app with the given call type.
326
1793
  * @param call The call details.
327
1794
  * @param callType The call type
@@ -342,7 +1809,6 @@ export declare class ApplicationClient {
342
1809
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
343
1810
  transaction: algosdk.Transaction;
344
1811
  }) & {
345
- /** The address of the app creator account to resolve the app by */
346
1812
  transactions: algosdk.Transaction[];
347
1813
  }>;
348
1814
  /**
@@ -395,6 +1861,8 @@ export declare class ApplicationClient {
395
1861
  value: ABIValue;
396
1862
  }[]>;
397
1863
  /**
1864
+ * @deprecated Use `appClient.params.*` from an `AppClient` instance instead.
1865
+ *
398
1866
  * Returns the arguments for an app call for the given ABI method or raw method specification.
399
1867
  * @param args The call args specific to this application client
400
1868
  * @param sender The sender of this call. Will be used to fetch any default argument values if applicable
@@ -402,6 +1870,8 @@ export declare class ApplicationClient {
402
1870
  */
403
1871
  getCallArgs(args: AppClientCallArgs | undefined, sender: SendTransactionFrom): Promise<AppCallArgs | undefined>;
404
1872
  /**
1873
+ * @deprecated Use `appClient.getABIMethod` instead.
1874
+ *
405
1875
  * Returns the ABI Method parameters for the given method name string for the app represented by this application client instance
406
1876
  * @param method Either the name of the method or the ABI method spec definition string
407
1877
  * @returns The ABI method params for the given method
@@ -414,6 +1884,8 @@ export declare class ApplicationClient {
414
1884
  */
415
1885
  getABIMethod(method: string): ABIMethod | undefined;
416
1886
  /**
1887
+ * @deprecated Use `appClient.appId` and `appClient.appAddress` from an `AppClient` instance instead.
1888
+ *
417
1889
  * Gets the reference information for the current application instance.
418
1890
  * `appId` will be 0 if it can't find an app.
419
1891
  * @returns The app reference, or if deployed using the `deploy` method, the app metadata too