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

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 (98) 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 +101 -78
  61. package/types/app-client.js +145 -84
  62. package/types/app-client.js.map +1 -1
  63. package/types/app-client.mjs +145 -84
  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 +141 -86
  71. package/types/app-factory.js +106 -34
  72. package/types/app-factory.js.map +1 -1
  73. package/types/app-factory.mjs +107 -35
  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/asset-manager.d.ts +3 -3
  80. package/types/asset-manager.js +2 -2
  81. package/types/asset-manager.js.map +1 -1
  82. package/types/asset-manager.mjs +2 -2
  83. package/types/asset-manager.mjs.map +1 -1
  84. package/types/client-manager.d.ts +30 -8
  85. package/types/client-manager.js +6 -0
  86. package/types/client-manager.js.map +1 -1
  87. package/types/client-manager.mjs +6 -0
  88. package/types/client-manager.mjs.map +1 -1
  89. package/types/composer.d.ts +29 -4
  90. package/types/composer.js +24 -7
  91. package/types/composer.js.map +1 -1
  92. package/types/composer.mjs +24 -7
  93. package/types/composer.mjs.map +1 -1
  94. package/types/kmd-account-manager.js +1 -1
  95. package/types/kmd-account-manager.js.map +1 -1
  96. package/types/kmd-account-manager.mjs +1 -1
  97. package/types/kmd-account-manager.mjs.map +1 -1
  98. package/types/transaction.d.ts +4 -6
@@ -1,6 +1,4 @@
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
4
  import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
@@ -10,7 +8,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;
@@ -207,12 +205,12 @@ export type CallOnComplete = {
207
205
  /** On-complete of the call; defaults to no-op */
208
206
  onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
209
207
  };
210
- /** AppClient parameters for a bare app call */
208
+ /** AppClient common parameters for a bare app call */
211
209
  export type AppClientBareCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'onComplete'> & {
212
210
  /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
213
211
  sender?: string;
214
212
  }>;
215
- /** AppClient parameters for an ABI method call */
213
+ /** AppClient common parameters for an ABI method call */
216
214
  export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args'> & {
217
215
  /** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
218
216
  sender?: string;
@@ -228,13 +226,13 @@ export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId'
228
226
  * * An ARC-56 struct
229
227
  * * A transaction with explicit signer
230
228
  * * A transaction (where the signer will be automatically assigned)
231
- * * An unawaited transaction (e.g. from algorand.transactions.transactionType())
229
+ * * An unawaited transaction (e.g. from algorand.createTransaction.transactionType())
232
230
  * * Another method call (via method call params object)
233
231
  */
234
232
  args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
235
233
  }>;
236
234
  /** Parameters for funding an app account */
237
- export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & ExecuteParams & {
235
+ export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & SendParams & {
238
236
  /** The optional sender to send the transaction from, will use the application client's default sender by default if specified */
239
237
  sender?: string;
240
238
  }>;
@@ -249,6 +247,8 @@ export type ResolveAppClientByCreatorAndName = Expand<Omit<AppClientParams, 'app
249
247
  /** Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value */
250
248
  ignoreCache?: boolean;
251
249
  }>;
250
+ /** Resolve an app client instance by looking up the current network. */
251
+ export type ResolveAppClientByNetwork = Expand<Omit<AppClientParams, 'appId'>>;
252
252
  /** ARC-56/ARC-32 application client that allows you to manage calls and
253
253
  * state for a specific deployed instance of an app (with a known app ID). */
254
254
  export declare class AppClient {
@@ -264,7 +264,7 @@ export declare class AppClient {
264
264
  private _globalStateMethods;
265
265
  private _boxStateMethods;
266
266
  private _paramsMethods;
267
- private _transactionsMethods;
267
+ private _createTransactionsMethods;
268
268
  private _sendMethods;
269
269
  constructor(params: AppClientParams);
270
270
  /** Start a new `AlgoKitComposer` transaction group */
@@ -274,7 +274,7 @@ export declare class AppClient {
274
274
  * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
275
275
  * @param params The parameters to create the app client
276
276
  */
277
- static fromCreatorAndName(params: Expand<ResolveAppClientByCreatorAndName>): Promise<AppClient>;
277
+ static fromCreatorAndName(params: ResolveAppClientByCreatorAndName): Promise<AppClient>;
278
278
  /**
279
279
  * Returns an `AppClient` instance for the current network based on
280
280
  * pre-determined network-specific app IDs specified in the ARC-56 app spec.
@@ -282,7 +282,7 @@ export declare class AppClient {
282
282
  * If no IDs are in the app spec or the network isn't recognised, an error is thrown.
283
283
  * @param params The parameters to create the app client
284
284
  */
285
- static fromNetwork(params: Expand<Omit<AppClientParams, 'appId'>>): Promise<AppClient>;
285
+ static fromNetwork(params: ResolveAppClientByNetwork): Promise<AppClient>;
286
286
  /**
287
287
  * Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and
288
288
  * normalises it into a parsed ARC-56 contract object.
@@ -298,7 +298,21 @@ export declare class AppClient {
298
298
  get appName(): string;
299
299
  /** The ARC-56 app spec being used */
300
300
  get appSpec(): Arc56Contract;
301
- /** Get parameters to define transactions to the current app */
301
+ /** Get parameters to create transactions for the current app.
302
+ *
303
+ * A good mental model for this is that these parameters represent a deferred transaction creation.
304
+ * @example Create a transaction in the future using Algorand Client
305
+ * ```typescript
306
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
307
+ * // ...
308
+ * await algorand.send.AppMethodCall(myMethodCall)
309
+ * ```
310
+ * @example Define a nested transaction as an ABI argument
311
+ * ```typescript
312
+ * const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
313
+ * await appClient.send.call({method: 'my_method2', args: [myMethodCall]})
314
+ * ```
315
+ */
302
316
  get params(): {
303
317
  /** Return params for a payment transaction to fund the app account */
304
318
  fundAppAccount: (params: {
@@ -358,10 +372,10 @@ export declare class AppClient {
358
372
  method: string;
359
373
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
360
374
  } & AppClientCompilationParams) => Promise<({
361
- approvalProgram: Buffer;
362
- clearStateProgram: Buffer;
363
- compiledApproval?: undefined;
364
- compiledClear?: undefined;
375
+ approvalProgram: Uint8Array;
376
+ compiledApproval: undefined;
377
+ clearStateProgram: Uint8Array;
378
+ compiledClear: undefined;
365
379
  lease?: string | Uint8Array | undefined;
366
380
  note?: string | Uint8Array | undefined;
367
381
  maxFee?: AlgoAmount | undefined;
@@ -490,7 +504,7 @@ export declare class AppClient {
490
504
  sender?: string | undefined;
491
505
  method: string;
492
506
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
493
- }) => AppCallMethodCall;
507
+ }) => Promise<AppCallMethodCall>;
494
508
  /** Return params for an delete ABI call */
495
509
  delete: (params: {
496
510
  lease?: string | Uint8Array | undefined;
@@ -511,7 +525,7 @@ export declare class AppClient {
511
525
  sender?: string | undefined;
512
526
  method: string;
513
527
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
514
- }) => AppDeleteMethodCall;
528
+ }) => Promise<AppDeleteMethodCall>;
515
529
  /** Return params for an close out ABI call */
516
530
  closeOut: (params: {
517
531
  lease?: string | Uint8Array | undefined;
@@ -532,7 +546,7 @@ export declare class AppClient {
532
546
  sender?: string | undefined;
533
547
  method: string;
534
548
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
535
- }) => AppCallMethodCall;
549
+ }) => Promise<AppCallMethodCall>;
536
550
  /** Return params for an ABI call */
537
551
  call: (params: {
538
552
  lease?: string | Uint8Array | undefined;
@@ -553,9 +567,9 @@ export declare class AppClient {
553
567
  sender?: string | undefined;
554
568
  method: string;
555
569
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
556
- } & CallOnComplete) => AppCallMethodCall;
570
+ } & CallOnComplete) => Promise<AppCallMethodCall>;
557
571
  } & {
558
- /** Interact with bare (non-ABI) call parameters */ bare: {
572
+ /** Interact with bare (raw) call parameters */ bare: {
559
573
  /** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */
560
574
  update: (params?: ({
561
575
  lease?: string | Uint8Array | undefined;
@@ -693,8 +707,8 @@ export declare class AppClient {
693
707
  } & CallOnComplete) | undefined) => AppCallParams;
694
708
  };
695
709
  };
696
- /** Get transactions for the current app */
697
- get transactions(): {
710
+ /** Create transactions for the current app */
711
+ get createTransaction(): {
698
712
  /** Return transaction for a payment transaction to fund the app account */
699
713
  fundAppAccount: (params: {
700
714
  lease?: string | Uint8Array | undefined;
@@ -850,7 +864,7 @@ export declare class AppClient {
850
864
  signers: Map<number, algosdk.TransactionSigner>;
851
865
  }>;
852
866
  } & {
853
- /** Interact with bare (non-ABI) call transactions */ bare: {
867
+ /** Interact with bare (raw) call transactions */ bare: {
854
868
  /** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */
855
869
  update: (params?: ({
856
870
  lease?: string | Uint8Array | undefined;
@@ -967,7 +981,7 @@ export declare class AppClient {
967
981
  } & CallOnComplete) | undefined) => Promise<algosdk.Transaction>;
968
982
  };
969
983
  };
970
- /** Send calls to the current app */
984
+ /** Send transactions to the current app */
971
985
  get send(): {
972
986
  /** Sign and send transactions for a payment transaction to fund the app account */
973
987
  fundAppAccount: (params: {
@@ -987,7 +1001,7 @@ export declare class AppClient {
987
1001
  suppressLog?: boolean | undefined;
988
1002
  populateAppCallResources?: boolean | undefined;
989
1003
  sender?: string | undefined;
990
- } & ExecuteParams) => Promise<{
1004
+ } & SendParams) => Promise<{
991
1005
  groupId: string;
992
1006
  txIds: string[];
993
1007
  returns?: ABIReturn[] | undefined;
@@ -1018,7 +1032,7 @@ export declare class AppClient {
1018
1032
  sender?: string | undefined;
1019
1033
  method: string;
1020
1034
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1021
- } & AppClientCompilationParams & ExecuteParams) => Promise<{
1035
+ } & AppClientCompilationParams & SendParams) => Promise<{
1022
1036
  compiledApproval?: import("./app").CompiledTeal | undefined;
1023
1037
  compiledClear?: import("./app").CompiledTeal | undefined;
1024
1038
  groupId: string;
@@ -1052,7 +1066,7 @@ export declare class AppClient {
1052
1066
  sender?: string | undefined;
1053
1067
  method: string;
1054
1068
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1055
- } & ExecuteParams) => Promise<{
1069
+ } & SendParams) => Promise<Omit<{
1056
1070
  groupId: string;
1057
1071
  txIds: string[];
1058
1072
  returns?: ABIReturn[] | undefined;
@@ -1060,8 +1074,8 @@ export declare class AppClient {
1060
1074
  transactions: algosdk.Transaction[];
1061
1075
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1062
1076
  transaction: algosdk.Transaction;
1063
- return?: algosdk.ABIValue | ABIStruct | undefined;
1064
- }>;
1077
+ return?: ABIReturn | undefined;
1078
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1065
1079
  /**
1066
1080
  * Sign and send transactions for a delete ABI call
1067
1081
  */
@@ -1084,7 +1098,7 @@ export declare class AppClient {
1084
1098
  sender?: string | undefined;
1085
1099
  method: string;
1086
1100
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1087
- } & ExecuteParams) => Promise<{
1101
+ } & SendParams) => Promise<Omit<{
1088
1102
  groupId: string;
1089
1103
  txIds: string[];
1090
1104
  returns?: ABIReturn[] | undefined;
@@ -1092,8 +1106,8 @@ export declare class AppClient {
1092
1106
  transactions: algosdk.Transaction[];
1093
1107
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1094
1108
  transaction: algosdk.Transaction;
1095
- return?: algosdk.ABIValue | ABIStruct | undefined;
1096
- }>;
1109
+ return?: ABIReturn | undefined;
1110
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1097
1111
  /**
1098
1112
  * Sign and send transactions for a close out ABI call
1099
1113
  */
@@ -1116,7 +1130,7 @@ export declare class AppClient {
1116
1130
  sender?: string | undefined;
1117
1131
  method: string;
1118
1132
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1119
- } & ExecuteParams) => Promise<{
1133
+ } & SendParams) => Promise<Omit<{
1120
1134
  groupId: string;
1121
1135
  txIds: string[];
1122
1136
  returns?: ABIReturn[] | undefined;
@@ -1124,8 +1138,8 @@ export declare class AppClient {
1124
1138
  transactions: algosdk.Transaction[];
1125
1139
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1126
1140
  transaction: algosdk.Transaction;
1127
- return?: algosdk.ABIValue | ABIStruct | undefined;
1128
- }>;
1141
+ return?: ABIReturn | undefined;
1142
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1129
1143
  /**
1130
1144
  * Sign and send transactions for a call (defaults to no-op)
1131
1145
  */
@@ -1148,7 +1162,7 @@ export declare class AppClient {
1148
1162
  sender?: string | undefined;
1149
1163
  method: string;
1150
1164
  args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
1151
- } & CallOnComplete & ExecuteParams) => Promise<{
1165
+ } & CallOnComplete & SendParams) => Promise<Omit<{
1152
1166
  groupId: string;
1153
1167
  txIds: string[];
1154
1168
  returns?: ABIReturn[] | undefined;
@@ -1156,10 +1170,10 @@ export declare class AppClient {
1156
1170
  transactions: algosdk.Transaction[];
1157
1171
  confirmation: algosdk.modelsv2.PendingTransactionResponse;
1158
1172
  transaction: algosdk.Transaction;
1159
- return?: algosdk.ABIValue | ABIStruct | undefined;
1160
- }>;
1173
+ return?: ABIReturn | undefined;
1174
+ }, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
1161
1175
  } & {
1162
- /** Interact with bare (non-ABI) calls */ bare: {
1176
+ /** Interact with bare (raw) calls */ bare: {
1163
1177
  /** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */
1164
1178
  update: (params?: ({
1165
1179
  lease?: string | Uint8Array | undefined;
@@ -1178,7 +1192,7 @@ export declare class AppClient {
1178
1192
  assetReferences?: bigint[] | undefined;
1179
1193
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1180
1194
  sender?: string | undefined;
1181
- } & AppClientCompilationParams & ExecuteParams) | undefined) => Promise<{
1195
+ } & AppClientCompilationParams & SendParams) | undefined) => Promise<{
1182
1196
  groupId: string;
1183
1197
  txIds: string[];
1184
1198
  returns?: ABIReturn[] | undefined;
@@ -1208,7 +1222,7 @@ export declare class AppClient {
1208
1222
  assetReferences?: bigint[] | undefined;
1209
1223
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1210
1224
  sender?: string | undefined;
1211
- } & ExecuteParams) | undefined) => Promise<{
1225
+ } & SendParams) | undefined) => Promise<{
1212
1226
  groupId: string;
1213
1227
  txIds: string[];
1214
1228
  returns?: ABIReturn[] | undefined;
@@ -1236,7 +1250,7 @@ export declare class AppClient {
1236
1250
  assetReferences?: bigint[] | undefined;
1237
1251
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1238
1252
  sender?: string | undefined;
1239
- } & ExecuteParams) | undefined) => Promise<{
1253
+ } & SendParams) | undefined) => Promise<{
1240
1254
  groupId: string;
1241
1255
  txIds: string[];
1242
1256
  returns?: ABIReturn[] | undefined;
@@ -1264,7 +1278,7 @@ export declare class AppClient {
1264
1278
  assetReferences?: bigint[] | undefined;
1265
1279
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1266
1280
  sender?: string | undefined;
1267
- } & ExecuteParams) | undefined) => Promise<{
1281
+ } & SendParams) | undefined) => Promise<{
1268
1282
  groupId: string;
1269
1283
  txIds: string[];
1270
1284
  returns?: ABIReturn[] | undefined;
@@ -1292,7 +1306,7 @@ export declare class AppClient {
1292
1306
  assetReferences?: bigint[] | undefined;
1293
1307
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1294
1308
  sender?: string | undefined;
1295
- } & ExecuteParams) | undefined) => Promise<{
1309
+ } & SendParams) | undefined) => Promise<{
1296
1310
  groupId: string;
1297
1311
  txIds: string[];
1298
1312
  returns?: ABIReturn[] | undefined;
@@ -1320,7 +1334,7 @@ export declare class AppClient {
1320
1334
  assetReferences?: bigint[] | undefined;
1321
1335
  boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
1322
1336
  sender?: string | undefined;
1323
- } & CallOnComplete & ExecuteParams) | undefined) => Promise<{
1337
+ } & CallOnComplete & SendParams) | undefined) => Promise<{
1324
1338
  groupId: string;
1325
1339
  txIds: string[];
1326
1340
  returns?: ABIReturn[] | undefined;
@@ -1332,6 +1346,7 @@ export declare class AppClient {
1332
1346
  }>;
1333
1347
  };
1334
1348
  };
1349
+ /** Get state (local, global, box) from the current app */
1335
1350
  get state(): {
1336
1351
  /**
1337
1352
  * Methods to access local state for the current app
@@ -1433,6 +1448,8 @@ export declare class AppClient {
1433
1448
  };
1434
1449
  /**
1435
1450
  * Funds Algo into the app account for this app.
1451
+ *
1452
+ * An alias for `appClient.send.fundAppAccount(params)`.
1436
1453
  * @param params The parameters for the funding transaction
1437
1454
  * @returns The result of the funding
1438
1455
  */
@@ -1514,7 +1531,7 @@ export declare class AppClient {
1514
1531
  */
1515
1532
  importSourceMaps(sourceMaps: AppSourceMaps): void;
1516
1533
  /**
1517
- * Returns the ABI Method for the given method name string for the app represented by this application client instance
1534
+ * Returns the ABI Method spec for the given method string for the app represented by this application client instance
1518
1535
  * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1519
1536
  * e.g. `my_method` or `my_method(unit64,string)bytes`
1520
1537
  * @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]
@@ -1522,15 +1539,35 @@ export declare class AppClient {
1522
1539
  getABIMethod(methodNameOrSignature: string): Arc56Method;
1523
1540
  /**
1524
1541
  * Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
1525
- * on the ARC-56 method.
1542
+ * on the ARC-56 method, replacing the `return` property with the decoded type.
1526
1543
  *
1527
- * If the return type is a struct then the struct will be returned.
1544
+ * If the return type is an ARC-56 struct then the struct will be returned.
1528
1545
  *
1529
1546
  * @param result The SendAppTransactionResult to be mapped
1530
1547
  * @param method The method that was called
1531
1548
  * @returns The smart contract response with an updated return value
1532
1549
  */
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>>>;
1550
+ processMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
1551
+ /**
1552
+ * Compiles the approval and clear state programs (if TEAL templates provided),
1553
+ * performing any provided deploy-time parameter replacement and stores
1554
+ * the source maps.
1555
+ *
1556
+ * If no TEAL templates provided it will use any byte code provided in the app spec.
1557
+ *
1558
+ * Will store any generated source maps for later use in debugging.
1559
+ */
1560
+ compile(compilation?: AppClientCompilationParams): Promise<{
1561
+ approvalProgram: Uint8Array;
1562
+ compiledApproval: undefined;
1563
+ clearStateProgram: Uint8Array;
1564
+ compiledClear: undefined;
1565
+ } | {
1566
+ approvalProgram: Uint8Array;
1567
+ compiledApproval: import("./app").CompiledTeal;
1568
+ clearStateProgram: Uint8Array;
1569
+ compiledClear: import("./app").CompiledTeal;
1570
+ }>;
1534
1571
  /**
1535
1572
  * Takes an error that may include a logic error from a call to the current app and re-exposes the
1536
1573
  * error to include source code information via the source map and ARC-56 spec.
@@ -1556,10 +1593,10 @@ export declare class AppClient {
1556
1593
  * @param compilation Any compilation parameters to use
1557
1594
  */
1558
1595
  static compile(appSpec: Arc56Contract, appManager: AppManager, compilation?: AppClientCompilationParams): Promise<{
1559
- approvalProgram: Buffer;
1560
- clearStateProgram: Buffer;
1561
- compiledApproval?: undefined;
1562
- compiledClear?: undefined;
1596
+ approvalProgram: Uint8Array;
1597
+ compiledApproval: undefined;
1598
+ clearStateProgram: Uint8Array;
1599
+ compiledClear: undefined;
1563
1600
  } | {
1564
1601
  approvalProgram: Uint8Array;
1565
1602
  compiledApproval: import("./app").CompiledTeal;
@@ -1574,25 +1611,14 @@ export declare class AppClient {
1574
1611
  * @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
1575
1612
  * e.g. `my_method` or `my_method(unit64,string)bytes`
1576
1613
  * @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
1614
  */
1579
- static getABIArgsWithDefaultValues(methodNameOrSignature: string, args: AppClientMethodCallParams['args'] | undefined, appSpec: Arc56Contract): AppMethodCall<CommonAppCallParams>['args'];
1615
+ private getABIArgsWithDefaultValues;
1580
1616
  private getBareParamsMethods;
1581
- private getBareTransactionsMethods;
1617
+ private getBareCreateTransactionMethods;
1582
1618
  private getBareSendMethods;
1583
1619
  private getMethodCallParamsMethods;
1584
1620
  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;
1621
+ private getMethodCallCreateTransactionMethods;
1596
1622
  /** Returns the sender for a call, using the `defaultSender`
1597
1623
  * if none provided and throws an error if neither provided */
1598
1624
  private getSender;
@@ -1710,10 +1736,7 @@ export declare class ApplicationClient {
1710
1736
  return?: ABIReturn | undefined;
1711
1737
  deleteReturn?: ABIReturn | undefined;
1712
1738
  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
- */
1739
+ operationPerformed: "replace";
1717
1740
  }>;
1718
1741
  /**
1719
1742
  * @deprecated Use `create` from an `AppFactory` instance instead.
@@ -1734,7 +1757,7 @@ export declare class ApplicationClient {
1734
1757
  appAddress: string;
1735
1758
  }>;
1736
1759
  /**
1737
- * @deprecated Use `appClient.send.update` or `appClient.transactions.update` from an `AppClient` instance instead.
1760
+ * @deprecated Use `appClient.send.update` or `appClient.createTransaction.update` from an `AppClient` instance instead.
1738
1761
  *
1739
1762
  * Updates the smart contract app.
1740
1763
  * @param update The parameters to update the app with
@@ -1750,7 +1773,7 @@ export declare class ApplicationClient {
1750
1773
  confirmation?: algosdk.modelsv2.PendingTransactionResponse | undefined;
1751
1774
  }>;
1752
1775
  /**
1753
- * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1776
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1754
1777
  *
1755
1778
  * Issues a no_op (normal) call to the app.
1756
1779
  * @param call The call details.
@@ -1758,7 +1781,7 @@ export declare class ApplicationClient {
1758
1781
  */
1759
1782
  call(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1760
1783
  /**
1761
- * @deprecated Use `appClient.send.optIn` or `appClient.transactions.optIn` from an `AppClient` instance instead.
1784
+ * @deprecated Use `appClient.send.optIn` or `appClient.createTransaction.optIn` from an `AppClient` instance instead.
1762
1785
  *
1763
1786
  * Issues a opt_in call to the app.
1764
1787
  * @param call The call details.
@@ -1766,7 +1789,7 @@ export declare class ApplicationClient {
1766
1789
  */
1767
1790
  optIn(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1768
1791
  /**
1769
- * @deprecated Use `appClient.send.closeOut` or `appClient.transactions.closeOut` from an `AppClient` instance instead.
1792
+ * @deprecated Use `appClient.send.closeOut` or `appClient.createTransaction.closeOut` from an `AppClient` instance instead.
1770
1793
  *
1771
1794
  * Issues a close_out call to the app.
1772
1795
  * @param call The call details.
@@ -1774,7 +1797,7 @@ export declare class ApplicationClient {
1774
1797
  */
1775
1798
  closeOut(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1776
1799
  /**
1777
- * @deprecated Use `appClient.send.clearState` or `appClient.transactions.clearState` from an `AppClient` instance instead.
1800
+ * @deprecated Use `appClient.send.clearState` or `appClient.createTransaction.clearState` from an `AppClient` instance instead.
1778
1801
  *
1779
1802
  * Issues a clear_state call to the app.
1780
1803
  * @param call The call details.
@@ -1782,7 +1805,7 @@ export declare class ApplicationClient {
1782
1805
  */
1783
1806
  clearState(call?: AppClientClearStateParams): Promise<AppCallTransactionResult>;
1784
1807
  /**
1785
- * @deprecated Use `appClient.send.delete` or `appClient.transactions.delete` from an `AppClient` instance instead.
1808
+ * @deprecated Use `appClient.send.delete` or `appClient.createTransaction.delete` from an `AppClient` instance instead.
1786
1809
  *
1787
1810
  * Issues a delete_application call to the app.
1788
1811
  * @param call The call details.
@@ -1790,7 +1813,7 @@ export declare class ApplicationClient {
1790
1813
  */
1791
1814
  delete(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
1792
1815
  /**
1793
- * @deprecated Use `appClient.send.call` or `appClient.transactions.call` from an `AppClient` instance instead.
1816
+ * @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
1794
1817
  *
1795
1818
  * Issues a call to the app with the given call type.
1796
1819
  * @param call The call details.