@algorandfoundation/algokit-utils 7.0.0-beta.6 → 7.0.0-beta.8

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 (101) hide show
  1. package/app.d.ts +6 -6
  2. package/app.js +6 -6
  3. package/app.js.map +1 -1
  4. package/app.mjs +6 -6
  5. package/app.mjs.map +1 -1
  6. package/asset.d.ts +3 -3
  7. package/asset.js +3 -3
  8. package/asset.js.map +1 -1
  9. package/asset.mjs +3 -3
  10. package/asset.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/testing/fixtures/algorand-fixture.js +1 -1
  13. package/testing/fixtures/algorand-fixture.js.map +1 -1
  14. package/testing/fixtures/algorand-fixture.mjs +1 -1
  15. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  16. package/transaction/legacy-bridge.d.ts +3 -3
  17. package/transaction/legacy-bridge.js.map +1 -1
  18. package/transaction/legacy-bridge.mjs.map +1 -1
  19. package/transaction/transaction.d.ts +1 -3
  20. package/transaction/transaction.js +17 -11
  21. package/transaction/transaction.js.map +1 -1
  22. package/transaction/transaction.mjs +17 -11
  23. package/transaction/transaction.mjs.map +1 -1
  24. package/transfer/transfer-algos.d.ts +1 -1
  25. package/transfer/transfer-algos.js +1 -1
  26. package/transfer/transfer-algos.js.map +1 -1
  27. package/transfer/transfer-algos.mjs +1 -1
  28. package/transfer/transfer-algos.mjs.map +1 -1
  29. package/transfer/transfer.d.ts +1 -1
  30. package/transfer/transfer.js +1 -1
  31. package/transfer/transfer.js.map +1 -1
  32. package/transfer/transfer.mjs +1 -1
  33. package/transfer/transfer.mjs.map +1 -1
  34. package/types/account-manager.d.ts +13 -4
  35. package/types/account-manager.js +17 -3
  36. package/types/account-manager.js.map +1 -1
  37. package/types/account-manager.mjs +17 -3
  38. package/types/account-manager.mjs.map +1 -1
  39. package/types/algorand-client-interface.d.ts +1 -1
  40. package/types/algorand-client-transaction-creator.d.ts +30 -30
  41. package/types/algorand-client-transaction-creator.js +30 -30
  42. package/types/algorand-client-transaction-creator.js.map +1 -1
  43. package/types/algorand-client-transaction-creator.mjs +30 -30
  44. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  45. package/types/algorand-client-transaction-sender.d.ts +18 -18
  46. package/types/algorand-client-transaction-sender.js +1 -1
  47. package/types/algorand-client-transaction-sender.js.map +1 -1
  48. package/types/algorand-client-transaction-sender.mjs +1 -1
  49. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  50. package/types/algorand-client.d.ts +8 -8
  51. package/types/algorand-client.js +8 -8
  52. package/types/algorand-client.js.map +1 -1
  53. package/types/algorand-client.mjs +8 -8
  54. package/types/algorand-client.mjs.map +1 -1
  55. package/types/app-arc56.d.ts +60 -37
  56. package/types/app-arc56.js +37 -16
  57. package/types/app-arc56.js.map +1 -1
  58. package/types/app-arc56.mjs +37 -16
  59. package/types/app-arc56.mjs.map +1 -1
  60. package/types/app-client.d.ts +123 -132
  61. package/types/app-client.js +165 -94
  62. package/types/app-client.js.map +1 -1
  63. package/types/app-client.mjs +165 -94
  64. package/types/app-client.mjs.map +1 -1
  65. package/types/app-deployer.d.ts +2 -2
  66. package/types/app-deployer.js +24 -24
  67. package/types/app-deployer.js.map +1 -1
  68. package/types/app-deployer.mjs +24 -24
  69. package/types/app-deployer.mjs.map +1 -1
  70. package/types/app-factory.d.ts +116 -246
  71. package/types/app-factory.js +120 -39
  72. package/types/app-factory.js.map +1 -1
  73. package/types/app-factory.mjs +121 -40
  74. package/types/app-factory.mjs.map +1 -1
  75. package/types/app-spec.js +15 -9
  76. package/types/app-spec.js.map +1 -1
  77. package/types/app-spec.mjs +15 -9
  78. package/types/app-spec.mjs.map +1 -1
  79. package/types/app.d.ts +1 -1
  80. package/types/app.js.map +1 -1
  81. package/types/app.mjs.map +1 -1
  82. package/types/asset-manager.d.ts +3 -3
  83. package/types/asset-manager.js +2 -2
  84. package/types/asset-manager.js.map +1 -1
  85. package/types/asset-manager.mjs +2 -2
  86. package/types/asset-manager.mjs.map +1 -1
  87. package/types/client-manager.d.ts +30 -8
  88. package/types/client-manager.js +6 -0
  89. package/types/client-manager.js.map +1 -1
  90. package/types/client-manager.mjs +6 -0
  91. package/types/client-manager.mjs.map +1 -1
  92. package/types/composer.d.ts +29 -4
  93. package/types/composer.js +24 -7
  94. package/types/composer.js.map +1 -1
  95. package/types/composer.mjs +24 -7
  96. package/types/composer.mjs.map +1 -1
  97. package/types/kmd-account-manager.js +1 -1
  98. package/types/kmd-account-manager.js.map +1 -1
  99. package/types/kmd-account-manager.mjs +1 -1
  100. package/types/kmd-account-manager.mjs.map +1 -1
  101. package/types/transaction.d.ts +4 -6
@@ -1,16 +1,14 @@
1
- /// <reference types="node" />
2
1
  import algosdk from 'algosdk';
3
- import { Buffer } from 'buffer';
4
2
  import { AlgorandClientInterface } from './algorand-client-interface';
5
3
  import { AlgoAmount } from './amount';
6
- import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
4
+ import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, CompiledTeal, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
7
5
  import { ABIStruct, Arc56Contract, Arc56Method } from './app-arc56';
8
6
  import { AppLookup } from './app-deployer';
9
7
  import { AppManager, BoxIdentifier } from './app-manager';
10
8
  import { AppSpec } from './app-spec';
11
9
  import AlgoKitComposer, { AppCallMethodCall, AppCallParams, AppDeleteMethodCall, AppDeleteParams, AppMethodCall, AppMethodCallTransactionArgument, CommonAppCallParams, PaymentParams } from './composer';
12
10
  import { Expand } from './expand';
13
- import { ExecuteParams, SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
11
+ import { SendParams, SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
14
12
  import ABIMethod = algosdk.ABIMethod;
15
13
  import ABIMethodParams = algosdk.ABIMethodParams;
16
14
  import ABIType = algosdk.ABIType;
@@ -178,6 +176,19 @@ export interface SourceMapExport {
178
176
  names: string[];
179
177
  mappings: string;
180
178
  }
179
+ /**
180
+ * The result of asking an `AppClient` to compile a program.
181
+ */
182
+ export interface AppClientCompilationResult {
183
+ /** The compiled bytecode of the approval program, ready to deploy to algod */
184
+ approvalProgram: Uint8Array;
185
+ /** The compiled bytecode of the clear state program, ready to deploy to algod */
186
+ clearStateProgram: Uint8Array;
187
+ /** The result of compilation of the approval program, including source map, if TEAL code was compiled */
188
+ approvalProgramCompilationResult?: CompiledTeal;
189
+ /** The result of compilation of the clear state program, including source map, if TEAL code was compiled */
190
+ clearStateProgramCompilationResult?: CompiledTeal;
191
+ }
181
192
  /** Parameters to create an app client */
182
193
  export interface AppClientParams {
183
194
  /** The ID of the app instance this client should make calls against. */
@@ -207,12 +218,12 @@ export type CallOnComplete = {
207
218
  /** On-complete of the call; defaults to no-op */
208
219
  onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
209
220
  };
210
- /** AppClient parameters for a bare app call */
221
+ /** AppClient common parameters for a bare app call */
211
222
  export type AppClientBareCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'onComplete'> & {
212
223
  /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
213
224
  sender?: string;
214
225
  }>;
215
- /** AppClient parameters for an ABI method call */
226
+ /** AppClient common parameters for an ABI method call */
216
227
  export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args'> & {
217
228
  /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
218
229
  sender?: string;
@@ -228,13 +239,13 @@ export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId'
228
239
  * * An ARC-56 struct
229
240
  * * A transaction with explicit signer
230
241
  * * A transaction (where the signer will be automatically assigned)
231
- * * An unawaited transaction (e.g. from algorand.transactions.transactionType())
242
+ * * An unawaited transaction (e.g. from algorand.createTransaction.transactionType())
232
243
  * * Another method call (via method call params object)
233
244
  */
234
245
  args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
235
246
  }>;
236
247
  /** Parameters for funding an app account */
237
- export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & ExecuteParams & {
248
+ export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & SendParams & {
238
249
  /** The optional sender to send the transaction from, will use the application client's default sender by default if specified */
239
250
  sender?: string;
240
251
  }>;
@@ -249,6 +260,8 @@ export type ResolveAppClientByCreatorAndName = Expand<Omit<AppClientParams, 'app
249
260
  /** Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value */
250
261
  ignoreCache?: boolean;
251
262
  }>;
263
+ /** Resolve an app client instance by looking up the current network. */
264
+ export type ResolveAppClientByNetwork = Expand<Omit<AppClientParams, 'appId'>>;
252
265
  /** ARC-56/ARC-32 application client that allows you to manage calls and
253
266
  * state for a specific deployed instance of an app (with a known app ID). */
254
267
  export declare class AppClient {
@@ -264,7 +277,7 @@ export declare class AppClient {
264
277
  private _globalStateMethods;
265
278
  private _boxStateMethods;
266
279
  private _paramsMethods;
267
- private _transactionsMethods;
280
+ private _createTransactionsMethods;
268
281
  private _sendMethods;
269
282
  constructor(params: AppClientParams);
270
283
  /** Start a new `AlgoKitComposer` transaction group */
@@ -274,7 +287,7 @@ export declare class AppClient {
274
287
  * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
275
288
  * @param params The parameters to create the app client
276
289
  */
277
- static fromCreatorAndName(params: Expand<ResolveAppClientByCreatorAndName>): Promise<AppClient>;
290
+ static fromCreatorAndName(params: ResolveAppClientByCreatorAndName): Promise<AppClient>;
278
291
  /**
279
292
  * Returns an `AppClient` instance for the current network based on
280
293
  * pre-determined network-specific app IDs specified in the ARC-56 app spec.
@@ -282,7 +295,7 @@ export declare class AppClient {
282
295
  * If no IDs are in the app spec or the network isn't recognised, an error is thrown.
283
296
  * @param params The parameters to create the app client
284
297
  */
285
- static fromNetwork(params: Expand<Omit<AppClientParams, 'appId'>>): Promise<AppClient>;
298
+ static fromNetwork(params: ResolveAppClientByNetwork): Promise<AppClient>;
286
299
  /**
287
300
  * Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and
288
301
  * normalises it into a parsed ARC-56 contract object.
@@ -298,7 +311,21 @@ export declare class AppClient {
298
311
  get appName(): string;
299
312
  /** The ARC-56 app spec being used */
300
313
  get appSpec(): Arc56Contract;
301
- /** Get parameters to define transactions to the current app */
314
+ /** Get parameters to create transactions for the current app.
315
+ *
316
+ * A good mental model for this is that these parameters represent a deferred transaction creation.
317
+ * @example Create a transaction in the future using Algorand Client
318
+ * ```typescript
319
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
320
+ * // ...
321
+ * await algorand.send.AppMethodCall(myMethodCall)
322
+ * ```
323
+ * @example Define a nested transaction as an ABI argument
324
+ * ```typescript
325
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
326
+ * await appClient.send.call({method: 'my_method2', args: [myMethodCall]})
327
+ * ```
328
+ */
302
329
  get params(): {
303
330
  /** Return params for a payment transaction to fund the app account */
304
331
  fundAppAccount: (params: {
@@ -357,40 +384,15 @@ export declare class AppClient {
357
384
  sender?: string | undefined;
358
385
  method: string;
359
386
  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
- } | {
387
+ } & AppClientCompilationParams) => Promise<{
388
+ /** The compiled bytecode of the approval program, ready to deploy to algod */
390
389
  approvalProgram: Uint8Array;
391
- compiledApproval: import("./app").CompiledTeal;
390
+ /** The compiled bytecode of the clear state program, ready to deploy to algod */
392
391
  clearStateProgram: Uint8Array;
393
- compiledClear: import("./app").CompiledTeal;
392
+ /** The result of compilation of the approval program, including source map, if TEAL code was compiled */
393
+ approvalProgramCompilationResult?: CompiledTeal | undefined;
394
+ /** The result of compilation of the clear state program, including source map, if TEAL code was compiled */
395
+ clearStateProgramCompilationResult?: CompiledTeal | undefined;
394
396
  lease?: string | Uint8Array | undefined;
395
397
  note?: string | Uint8Array | undefined;
396
398
  maxFee?: AlgoAmount | undefined;
@@ -415,7 +417,7 @@ export declare class AppClient {
415
417
  updatable?: boolean | undefined;
416
418
  /** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
417
419
  deletable?: boolean | undefined;
418
- }) & {
420
+ } & {
419
421
  appId: bigint;
420
422
  sender: string;
421
423
  method: Arc56Method;
@@ -490,7 +492,7 @@ export declare class AppClient {
490
492
  sender?: string | undefined;
491
493
  method: string;
492
494
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
493
- }) => AppCallMethodCall;
495
+ }) => Promise<AppCallMethodCall>;
494
496
  /** Return params for an delete ABI call */
495
497
  delete: (params: {
496
498
  lease?: string | Uint8Array | undefined;
@@ -511,7 +513,7 @@ export declare class AppClient {
511
513
  sender?: string | undefined;
512
514
  method: string;
513
515
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
514
- }) => AppDeleteMethodCall;
516
+ }) => Promise<AppDeleteMethodCall>;
515
517
  /** Return params for an close out ABI call */
516
518
  closeOut: (params: {
517
519
  lease?: string | Uint8Array | undefined;
@@ -532,7 +534,7 @@ export declare class AppClient {
532
534
  sender?: string | undefined;
533
535
  method: string;
534
536
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
535
- }) => AppCallMethodCall;
537
+ }) => Promise<AppCallMethodCall>;
536
538
  /** Return params for an ABI call */
537
539
  call: (params: {
538
540
  lease?: string | Uint8Array | undefined;
@@ -553,9 +555,9 @@ export declare class AppClient {
553
555
  sender?: string | undefined;
554
556
  method: string;
555
557
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
556
- } & CallOnComplete) => AppCallMethodCall;
558
+ } & CallOnComplete) => Promise<AppCallMethodCall>;
557
559
  } & {
558
- /** Interact with bare (non-ABI) call parameters */ bare: {
560
+ /** Interact with bare (raw) call parameters */ bare: {
559
561
  /** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */
560
562
  update: (params?: ({
561
563
  lease?: string | Uint8Array | undefined;
@@ -693,8 +695,8 @@ export declare class AppClient {
693
695
  } & CallOnComplete) | undefined) => AppCallParams;
694
696
  };
695
697
  };
696
- /** Get transactions for the current app */
697
- get transactions(): {
698
+ /** Create transactions for the current app */
699
+ get createTransaction(): {
698
700
  /** Return transaction for a payment transaction to fund the app account */
699
701
  fundAppAccount: (params: {
700
702
  lease?: string | Uint8Array | undefined;
@@ -850,7 +852,7 @@ export declare class AppClient {
850
852
  signers: Map<number, algosdk.TransactionSigner>;
851
853
  }>;
852
854
  } & {
853
- /** Interact with bare (non-ABI) call transactions */ bare: {
855
+ /** Interact with bare (raw) call transactions */ bare: {
854
856
  /** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */
855
857
  update: (params?: ({
856
858
  lease?: string | Uint8Array | undefined;
@@ -967,7 +969,7 @@ export declare class AppClient {
967
969
  } & CallOnComplete) | undefined) => Promise<algosdk.Transaction>;
968
970
  };
969
971
  };
970
- /** Send calls to the current app */
972
+ /** Send transactions to the current app */
971
973
  get send(): {
972
974
  /** Sign and send transactions for a payment transaction to fund the app account */
973
975
  fundAppAccount: (params: {
@@ -987,7 +989,7 @@ export declare class AppClient {
987
989
  suppressLog?: boolean | undefined;
988
990
  populateAppCallResources?: boolean | undefined;
989
991
  sender?: string | undefined;
990
- } & ExecuteParams) => Promise<{
992
+ } & SendParams) => Promise<{
991
993
  groupId: string;
992
994
  txIds: string[];
993
995
  returns?: ABIReturn[] | undefined;
@@ -1018,9 +1020,9 @@ export declare class AppClient {
1018
1020
  sender?: string | undefined;
1019
1021
  method: string;
1020
1022
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1021
- } & AppClientCompilationParams & ExecuteParams) => Promise<{
1022
- compiledApproval?: import("./app").CompiledTeal | undefined;
1023
- compiledClear?: import("./app").CompiledTeal | undefined;
1023
+ } & AppClientCompilationParams & SendParams) => Promise<{
1024
+ compiledApproval?: CompiledTeal | undefined;
1025
+ compiledClear?: CompiledTeal | undefined;
1024
1026
  groupId: string;
1025
1027
  txIds: string[];
1026
1028
  returns?: ABIReturn[] | undefined;
@@ -1052,7 +1054,7 @@ export declare class AppClient {
1052
1054
  sender?: string | undefined;
1053
1055
  method: string;
1054
1056
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1055
- } & ExecuteParams) => Promise<{
1057
+ } & SendParams) => Promise<Omit<{
1056
1058
  groupId: string;
1057
1059
  txIds: string[];
1058
1060
  returns?: ABIReturn[] | undefined;
@@ -1060,8 +1062,8 @@ export declare class AppClient {
1060
1062
  transactions: algosdk.Transaction[];
1061
1063
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1062
1064
  transaction: algosdk.Transaction;
1063
- return?: algosdk.ABIValue | ABIStruct | undefined;
1064
- }>;
1065
+ return?: ABIReturn | undefined;
1066
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1065
1067
  /**
1066
1068
  * Sign and send transactions for a delete ABI call
1067
1069
  */
@@ -1084,7 +1086,7 @@ export declare class AppClient {
1084
1086
  sender?: string | undefined;
1085
1087
  method: string;
1086
1088
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1087
- } & ExecuteParams) => Promise<{
1089
+ } & SendParams) => Promise<Omit<{
1088
1090
  groupId: string;
1089
1091
  txIds: string[];
1090
1092
  returns?: ABIReturn[] | undefined;
@@ -1092,8 +1094,8 @@ export declare class AppClient {
1092
1094
  transactions: algosdk.Transaction[];
1093
1095
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1094
1096
  transaction: algosdk.Transaction;
1095
- return?: algosdk.ABIValue | ABIStruct | undefined;
1096
- }>;
1097
+ return?: ABIReturn | undefined;
1098
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1097
1099
  /**
1098
1100
  * Sign and send transactions for a close out ABI call
1099
1101
  */
@@ -1116,7 +1118,7 @@ export declare class AppClient {
1116
1118
  sender?: string | undefined;
1117
1119
  method: string;
1118
1120
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1119
- } & ExecuteParams) => Promise<{
1121
+ } & SendParams) => Promise<Omit<{
1120
1122
  groupId: string;
1121
1123
  txIds: string[];
1122
1124
  returns?: ABIReturn[] | undefined;
@@ -1124,8 +1126,8 @@ export declare class AppClient {
1124
1126
  transactions: algosdk.Transaction[];
1125
1127
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1126
1128
  transaction: algosdk.Transaction;
1127
- return?: algosdk.ABIValue | ABIStruct | undefined;
1128
- }>;
1129
+ return?: ABIReturn | undefined;
1130
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1129
1131
  /**
1130
1132
  * Sign and send transactions for a call (defaults to no-op)
1131
1133
  */
@@ -1148,7 +1150,7 @@ export declare class AppClient {
1148
1150
  sender?: string | undefined;
1149
1151
  method: string;
1150
1152
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1151
- } & CallOnComplete & ExecuteParams) => Promise<{
1153
+ } & CallOnComplete & SendParams) => Promise<Omit<{
1152
1154
  groupId: string;
1153
1155
  txIds: string[];
1154
1156
  returns?: ABIReturn[] | undefined;
@@ -1156,10 +1158,10 @@ export declare class AppClient {
1156
1158
  transactions: algosdk.Transaction[];
1157
1159
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1158
1160
  transaction: algosdk.Transaction;
1159
- return?: algosdk.ABIValue | ABIStruct | undefined;
1160
- }>;
1161
+ return?: ABIReturn | undefined;
1162
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1161
1163
  } & {
1162
- /** Interact with bare (non-ABI) calls */ bare: {
1164
+ /** Interact with bare (raw) calls */ bare: {
1163
1165
  /** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */
1164
1166
  update: (params?: ({
1165
1167
  lease?: string | Uint8Array | undefined;
@@ -1178,7 +1180,9 @@ export declare class AppClient {
1178
1180
  assetReferences?: bigint[] | undefined;
1179
1181
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1180
1182
  sender?: string | undefined;
1181
- } & AppClientCompilationParams & ExecuteParams) | undefined) => Promise<{
1183
+ } & AppClientCompilationParams & SendParams) | undefined) => Promise<{
1184
+ compiledApproval?: CompiledTeal | undefined;
1185
+ compiledClear?: CompiledTeal | undefined;
1182
1186
  groupId: string;
1183
1187
  txIds: string[];
1184
1188
  returns?: ABIReturn[] | undefined;
@@ -1187,8 +1191,6 @@ export declare class AppClient {
1187
1191
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1188
1192
  transaction: algosdk.Transaction;
1189
1193
  return?: ABIReturn | undefined;
1190
- compiledApproval?: import("./app").CompiledTeal | undefined;
1191
- compiledClear?: import("./app").CompiledTeal | undefined;
1192
1194
  }>;
1193
1195
  /** Signs and sends an opt-in call */
1194
1196
  optIn: (params?: ({
@@ -1208,7 +1210,7 @@ export declare class AppClient {
1208
1210
  assetReferences?: bigint[] | undefined;
1209
1211
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1210
1212
  sender?: string | undefined;
1211
- } & ExecuteParams) | undefined) => Promise<{
1213
+ } & SendParams) | undefined) => Promise<{
1212
1214
  groupId: string;
1213
1215
  txIds: string[];
1214
1216
  returns?: ABIReturn[] | undefined;
@@ -1236,7 +1238,7 @@ export declare class AppClient {
1236
1238
  assetReferences?: bigint[] | undefined;
1237
1239
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1238
1240
  sender?: string | undefined;
1239
- } & ExecuteParams) | undefined) => Promise<{
1241
+ } & SendParams) | undefined) => Promise<{
1240
1242
  groupId: string;
1241
1243
  txIds: string[];
1242
1244
  returns?: ABIReturn[] | undefined;
@@ -1264,7 +1266,7 @@ export declare class AppClient {
1264
1266
  assetReferences?: bigint[] | undefined;
1265
1267
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1266
1268
  sender?: string | undefined;
1267
- } & ExecuteParams) | undefined) => Promise<{
1269
+ } & SendParams) | undefined) => Promise<{
1268
1270
  groupId: string;
1269
1271
  txIds: string[];
1270
1272
  returns?: ABIReturn[] | undefined;
@@ -1292,7 +1294,7 @@ export declare class AppClient {
1292
1294
  assetReferences?: bigint[] | undefined;
1293
1295
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1294
1296
  sender?: string | undefined;
1295
- } & ExecuteParams) | undefined) => Promise<{
1297
+ } & SendParams) | undefined) => Promise<{
1296
1298
  groupId: string;
1297
1299
  txIds: string[];
1298
1300
  returns?: ABIReturn[] | undefined;
@@ -1320,7 +1322,7 @@ export declare class AppClient {
1320
1322
  assetReferences?: bigint[] | undefined;
1321
1323
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1322
1324
  sender?: string | undefined;
1323
- } & CallOnComplete & ExecuteParams) | undefined) => Promise<{
1325
+ } & CallOnComplete & SendParams) | undefined) => Promise<{
1324
1326
  groupId: string;
1325
1327
  txIds: string[];
1326
1328
  returns?: ABIReturn[] | undefined;
@@ -1332,6 +1334,7 @@ export declare class AppClient {
1332
1334
  }>;
1333
1335
  };
1334
1336
  };
1337
+ /** Get state (local, global, box) from the current app */
1335
1338
  get state(): {
1336
1339
  /**
1337
1340
  * Methods to access local state for the current app
@@ -1433,6 +1436,8 @@ export declare class AppClient {
1433
1436
  };
1434
1437
  /**
1435
1438
  * Funds Algo into the app account for this app.
1439
+ *
1440
+ * An alias for `appClient.send.fundAppAccount(params)`.
1436
1441
  * @param params The parameters for the funding transaction
1437
1442
  * @returns The result of the funding
1438
1443
  */
@@ -1514,7 +1519,7 @@ export declare class AppClient {
1514
1519
  */
1515
1520
  importSourceMaps(sourceMaps: AppSourceMaps): void;
1516
1521
  /**
1517
- * Returns the ABI Method for the given method name string for the app represented by this application client instance
1522
+ * Returns the ABI Method spec for the given method string for the app represented by this application client instance
1518
1523
  * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1519
1524
  * e.g. `my_method` or `my_method(unit64,string)bytes`
1520
1525
  * @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]
@@ -1522,15 +1527,25 @@ export declare class AppClient {
1522
1527
  getABIMethod(methodNameOrSignature: string): Arc56Method;
1523
1528
  /**
1524
1529
  * Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
1525
- * on the ARC-56 method.
1530
+ * on the ARC-56 method, replacing the `return` property with the decoded type.
1526
1531
  *
1527
- * If the return type is a struct then the struct will be returned.
1532
+ * If the return type is an ARC-56 struct then the struct will be returned.
1528
1533
  *
1529
1534
  * @param result The SendAppTransactionResult to be mapped
1530
1535
  * @param method The method that was called
1531
1536
  * @returns The smart contract response with an updated return value
1532
1537
  */
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>>>;
1538
+ processMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
1539
+ /**
1540
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1541
+ * performing any provided deploy-time parameter replacement and stores
1542
+ * the source maps.
1543
+ *
1544
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1545
+ *
1546
+ * Will store any generated source maps for later use in debugging.
1547
+ */
1548
+ compile(compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
1534
1549
  /**
1535
1550
  * Takes an error that may include a logic error from a call to the current app and re-exposes the
1536
1551
  * error to include source code information via the source map and ARC-56 spec.
@@ -1555,17 +1570,7 @@ export declare class AppClient {
1555
1570
  * @param appSpec The app spec for the app
1556
1571
  * @param compilation Any compilation parameters to use
1557
1572
  */
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
- }>;
1573
+ static compile(appSpec: Arc56Contract, appManager: AppManager, compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
1569
1574
  /**
1570
1575
  * Returns ABI method arguments ready for a method call params object with default values populated
1571
1576
  * and structs replaced with tuples.
@@ -1574,25 +1579,14 @@ export declare class AppClient {
1574
1579
  * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1575
1580
  * e.g. `my_method` or `my_method(unit64,string)bytes`
1576
1581
  * @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
1582
  */
1579
- static getABIArgsWithDefaultValues(methodNameOrSignature: string, args: AppClientMethodCallParams['args'] | undefined, appSpec: Arc56Contract): AppMethodCall<CommonAppCallParams>['args'];
1583
+ private getABIArgsWithDefaultValues;
1580
1584
  private getBareParamsMethods;
1581
- private getBareTransactionsMethods;
1585
+ private getBareCreateTransactionMethods;
1582
1586
  private getBareSendMethods;
1583
1587
  private getMethodCallParamsMethods;
1584
1588
  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;
1589
+ private getMethodCallCreateTransactionMethods;
1596
1590
  /** Returns the sender for a call, using the `defaultSender`
1597
1591
  * if none provided and throws an error if neither provided */
1598
1592
  private getSender;
@@ -1643,8 +1637,8 @@ export declare class ApplicationClient {
1643
1637
  * @returns The compiled approval and clear state programs
1644
1638
  */
1645
1639
  compile(compilation?: AppClientCompilationParams): Promise<{
1646
- approvalCompiled: import("./app").CompiledTeal;
1647
- clearCompiled: import("./app").CompiledTeal;
1640
+ approvalCompiled: CompiledTeal;
1641
+ clearCompiled: CompiledTeal;
1648
1642
  }>;
1649
1643
  /**
1650
1644
  * Export the current source maps for the app.
@@ -1672,8 +1666,8 @@ export declare class ApplicationClient {
1672
1666
  deploy(deploy?: AppClientDeployParams): Promise<(Partial<AppCompilationResult> & AppMetadata & {
1673
1667
  operationPerformed: "nothing";
1674
1668
  }) | {
1675
- compiledApproval: import("./app").CompiledTeal;
1676
- compiledClear: import("./app").CompiledTeal;
1669
+ compiledApproval: CompiledTeal;
1670
+ compiledClear: CompiledTeal;
1677
1671
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1678
1672
  confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1679
1673
  transaction: algosdk.Transaction;
@@ -1681,7 +1675,7 @@ export declare class ApplicationClient {
1681
1675
  createdRound: number;
1682
1676
  updatedRound: number;
1683
1677
  createdMetadata: import("./app").AppDeployMetadata;
1684
- deleted: boolean;
1678
+ deleted: boolean; /** Any overrides for the storage schema to request for the created app; by default the schema indicated by the app spec is used. */
1685
1679
  appId: number | bigint;
1686
1680
  appAddress: string;
1687
1681
  name: string;
@@ -1691,8 +1685,8 @@ export declare class ApplicationClient {
1691
1685
  return?: ABIReturn | undefined;
1692
1686
  operationPerformed: "update" | "create";
1693
1687
  } | {
1694
- compiledApproval: import("./app").CompiledTeal;
1695
- compiledClear: import("./app").CompiledTeal;
1688
+ compiledApproval: CompiledTeal;
1689
+ compiledClear: CompiledTeal;
1696
1690
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1697
1691
  confirmations: algosdk.modelsv2.PendingTransactionResponse[];
1698
1692
  transaction: algosdk.Transaction;
@@ -1700,20 +1694,17 @@ export declare class ApplicationClient {
1700
1694
  createdRound: number;
1701
1695
  updatedRound: number;
1702
1696
  createdMetadata: import("./app").AppDeployMetadata;
1703
- deleted: boolean;
1697
+ deleted: boolean; /** Any overrides for the storage schema to request for the created app; by default the schema indicated by the app spec is used. */
1704
1698
  appId: number | bigint;
1705
1699
  appAddress: string;
1706
1700
  name: string;
1707
1701
  version: string;
1708
1702
  deletable?: boolean | undefined;
1709
1703
  updatable?: boolean | undefined;
1710
- return?: ABIReturn | undefined;
1704
+ return?: ABIReturn | undefined; /** The optional name override to resolve the app by within the creator account (default: uses the name in the ABI contract) */
1711
1705
  deleteReturn?: ABIReturn | undefined;
1712
1706
  deleteResult: import("./transaction").ConfirmedTransactionResult;
1713
- operationPerformed: "replace"; /** The mechanism to find an existing app instance metadata for the given creator and name; either:
1714
- * * An indexer instance to search the creator account apps; or
1715
- * * The cached value of the existing apps for the given creator from `getCreatorAppsByName`
1716
- */
1707
+ operationPerformed: "replace";
1717
1708
  }>;
1718
1709
  /**
1719
1710
  * @deprecated Use `create` from an `AppFactory` instance instead.
@@ -1723,8 +1714,8 @@ export declare class ApplicationClient {
1723
1714
  * @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result
1724
1715
  */
1725
1716
  create(create?: AppClientCreateParams): Promise<{
1726
- compiledApproval: import("./app").CompiledTeal;
1727
- compiledClear: import("./app").CompiledTeal;
1717
+ compiledApproval: CompiledTeal;
1718
+ compiledClear: CompiledTeal;
1728
1719
  return?: ABIReturn | undefined;
1729
1720
  transactions: algosdk.Transaction[];
1730
1721
  confirmations?: algosdk.modelsv2.PendingTransactionResponse[] | undefined;
@@ -1734,15 +1725,15 @@ export declare class ApplicationClient {
1734
1725
  appAddress: string;
1735
1726
  }>;
1736
1727
  /**
1737
- * @deprecated Use `appClient.send.update` or `appClient.transactions.update` from an `AppClient` instance instead.
1728
+ * @deprecated Use `appClient.send.update` or `appClient.createTransaction.update` from an `AppClient` instance instead.
1738
1729
  *
1739
1730
  * Updates the smart contract app.
1740
1731
  * @param update The parameters to update the app with
1741
1732
  * @returns The transaction send result and the compilation result
1742
1733
  */
1743
1734
  update(update?: AppClientUpdateParams): Promise<{
1744
- compiledApproval: import("./app").CompiledTeal;
1745
- compiledClear: import("./app").CompiledTeal;
1735
+ compiledApproval: CompiledTeal;
1736
+ compiledClear: CompiledTeal;
1746
1737
  return?: ABIReturn | undefined;
1747
1738
  transactions: algosdk.Transaction[];
1748
1739
  confirmations?: algosdk.modelsv2.PendingTransactionResponse[] | undefined;
@@ -1750,7 +1741,7 @@ export declare class ApplicationClient {
1750
1741
  confirmation?: algosdk.modelsv2.PendingTransactionResponse | undefined;
1751
1742
  }>;
1752
1743
  /**
1753
- * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1744
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1754
1745
  *
1755
1746
  * Issues a no_op (normal) call to the app.
1756
1747
  * @param call The call details.
@@ -1758,7 +1749,7 @@ export declare class ApplicationClient {
1758
1749
  */
1759
1750
  call(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1760
1751
  /**
1761
- * @deprecated Use `appClient.send.optIn` or `appClient.transactions.optIn` from an `AppClient` instance instead.
1752
+ * @deprecated Use `appClient.send.optIn` or `appClient.createTransaction.optIn` from an `AppClient` instance instead.
1762
1753
  *
1763
1754
  * Issues a opt_in call to the app.
1764
1755
  * @param call The call details.
@@ -1766,7 +1757,7 @@ export declare class ApplicationClient {
1766
1757
  */
1767
1758
  optIn(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1768
1759
  /**
1769
- * @deprecated Use `appClient.send.closeOut` or `appClient.transactions.closeOut` from an `AppClient` instance instead.
1760
+ * @deprecated Use `appClient.send.closeOut` or `appClient.createTransaction.closeOut` from an `AppClient` instance instead.
1770
1761
  *
1771
1762
  * Issues a close_out call to the app.
1772
1763
  * @param call The call details.
@@ -1774,7 +1765,7 @@ export declare class ApplicationClient {
1774
1765
  */
1775
1766
  closeOut(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1776
1767
  /**
1777
- * @deprecated Use `appClient.send.clearState` or `appClient.transactions.clearState` from an `AppClient` instance instead.
1768
+ * @deprecated Use `appClient.send.clearState` or `appClient.createTransaction.clearState` from an `AppClient` instance instead.
1778
1769
  *
1779
1770
  * Issues a clear_state call to the app.
1780
1771
  * @param call The call details.
@@ -1782,7 +1773,7 @@ export declare class ApplicationClient {
1782
1773
  */
1783
1774
  clearState(call?: AppClientClearStateParams): Promise<AppCallTransactionResult>;
1784
1775
  /**
1785
- * @deprecated Use `appClient.send.delete` or `appClient.transactions.delete` from an `AppClient` instance instead.
1776
+ * @deprecated Use `appClient.send.delete` or `appClient.createTransaction.delete` from an `AppClient` instance instead.
1786
1777
  *
1787
1778
  * Issues a delete_application call to the app.
1788
1779
  * @param call The call details.
@@ -1790,7 +1781,7 @@ export declare class ApplicationClient {
1790
1781
  */
1791
1782
  delete(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1792
1783
  /**
1793
- * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1784
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1794
1785
  *
1795
1786
  * Issues a call to the app with the given call type.
1796
1787
  * @param call The call details.