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

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 (133) hide show
  1. package/README.md +1 -1
  2. package/account/account.d.ts +7 -7
  3. package/account/account.js +7 -7
  4. package/account/account.mjs +7 -7
  5. package/account/get-account.d.ts +2 -2
  6. package/account/get-account.js +1 -1
  7. package/account/get-account.mjs +1 -1
  8. package/account/get-dispenser-account.d.ts +1 -1
  9. package/account/get-dispenser-account.js +1 -1
  10. package/account/get-dispenser-account.mjs +1 -1
  11. package/account/mnemonic-account.d.ts +1 -1
  12. package/account/mnemonic-account.js +1 -1
  13. package/account/mnemonic-account.mjs +1 -1
  14. package/app-deploy.d.ts +18 -1
  15. package/app-deploy.d.ts.map +1 -1
  16. package/app-deploy.js +142 -333
  17. package/app-deploy.js.map +1 -1
  18. package/app-deploy.mjs +145 -336
  19. package/app-deploy.mjs.map +1 -1
  20. package/app.d.ts +38 -1
  21. package/app.d.ts.map +1 -1
  22. package/app.js +113 -370
  23. package/app.js.map +1 -1
  24. package/app.mjs +114 -371
  25. package/app.mjs.map +1 -1
  26. package/asset.d.ts +5 -5
  27. package/asset.js +5 -5
  28. package/asset.mjs +5 -5
  29. package/debugging/debugging.js +2 -2
  30. package/debugging/debugging.js.map +1 -1
  31. package/debugging/debugging.mjs +2 -2
  32. package/debugging/debugging.mjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.js +12 -12
  36. package/index.mjs +1 -1
  37. package/localnet/get-kmd-wallet-account.d.ts +1 -1
  38. package/localnet/get-kmd-wallet-account.js +1 -1
  39. package/localnet/get-kmd-wallet-account.mjs +1 -1
  40. package/localnet/get-localnet-dispenser-account.d.ts +1 -1
  41. package/localnet/get-localnet-dispenser-account.js +1 -1
  42. package/localnet/get-localnet-dispenser-account.mjs +1 -1
  43. package/localnet/get-or-create-kmd-wallet-account.d.ts +1 -1
  44. package/localnet/get-or-create-kmd-wallet-account.js +1 -1
  45. package/localnet/get-or-create-kmd-wallet-account.mjs +1 -1
  46. package/localnet/is-localnet.d.ts +1 -1
  47. package/localnet/is-localnet.js +1 -1
  48. package/localnet/is-localnet.mjs +1 -1
  49. package/network-client.d.ts +2 -2
  50. package/network-client.d.ts.map +1 -1
  51. package/network-client.js +2 -2
  52. package/network-client.mjs +2 -2
  53. package/package.json +1 -1
  54. package/testing/fixtures/algorand-fixture.js +12 -12
  55. package/testing/fixtures/algorand-fixture.js.map +1 -1
  56. package/testing/fixtures/algorand-fixture.mjs +12 -12
  57. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  58. package/transaction/legacy-bridge.d.ts +31 -5
  59. package/transaction/legacy-bridge.d.ts.map +1 -1
  60. package/transaction/legacy-bridge.js +99 -5
  61. package/transaction/legacy-bridge.js.map +1 -1
  62. package/transaction/legacy-bridge.mjs +98 -7
  63. package/transaction/legacy-bridge.mjs.map +1 -1
  64. package/transfer/transfer-algos.d.ts +1 -1
  65. package/transfer/transfer-algos.js +1 -1
  66. package/transfer/transfer-algos.mjs +1 -1
  67. package/transfer/transfer.d.ts +1 -1
  68. package/transfer/transfer.js +1 -1
  69. package/transfer/transfer.mjs +1 -1
  70. package/types/account-manager.d.ts +1 -1
  71. package/types/account-manager.d.ts.map +1 -1
  72. package/types/algorand-client-transaction-creator.d.ts +450 -20
  73. package/types/algorand-client-transaction-creator.d.ts.map +1 -1
  74. package/types/algorand-client-transaction-creator.js +406 -22
  75. package/types/algorand-client-transaction-creator.js.map +1 -1
  76. package/types/algorand-client-transaction-creator.mjs +406 -22
  77. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  78. package/types/algorand-client-transaction-sender.d.ts +750 -24
  79. package/types/algorand-client-transaction-sender.d.ts.map +1 -1
  80. package/types/algorand-client-transaction-sender.js +426 -12
  81. package/types/algorand-client-transaction-sender.js.map +1 -1
  82. package/types/algorand-client-transaction-sender.mjs +426 -12
  83. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  84. package/types/algorand-client.d.ts +8 -0
  85. package/types/algorand-client.d.ts.map +1 -1
  86. package/types/algorand-client.js +14 -1
  87. package/types/algorand-client.js.map +1 -1
  88. package/types/algorand-client.mjs +14 -1
  89. package/types/algorand-client.mjs.map +1 -1
  90. package/types/app-client.d.ts +13 -1
  91. package/types/app-client.d.ts.map +1 -1
  92. package/types/app-client.js +8 -5
  93. package/types/app-client.js.map +1 -1
  94. package/types/app-client.mjs +9 -6
  95. package/types/app-client.mjs.map +1 -1
  96. package/types/app-deployer.d.ts +121 -0
  97. package/types/app-deployer.d.ts.map +1 -0
  98. package/types/app-deployer.js +354 -0
  99. package/types/app-deployer.js.map +1 -0
  100. package/types/app-deployer.mjs +352 -0
  101. package/types/app-deployer.mjs.map +1 -0
  102. package/types/app-manager.d.ts +235 -0
  103. package/types/app-manager.d.ts.map +1 -0
  104. package/types/app-manager.js +336 -0
  105. package/types/app-manager.js.map +1 -0
  106. package/types/app-manager.mjs +334 -0
  107. package/types/app-manager.mjs.map +1 -0
  108. package/types/app.d.ts +42 -7
  109. package/types/app.d.ts.map +1 -1
  110. package/types/app.js +1 -1
  111. package/types/app.js.map +1 -1
  112. package/types/app.mjs +1 -1
  113. package/types/app.mjs.map +1 -1
  114. package/types/client-manager.d.ts +2 -0
  115. package/types/client-manager.d.ts.map +1 -1
  116. package/types/client-manager.js +4 -0
  117. package/types/client-manager.js.map +1 -1
  118. package/types/client-manager.mjs +4 -0
  119. package/types/client-manager.mjs.map +1 -1
  120. package/types/composer.d.ts +150 -39
  121. package/types/composer.d.ts.map +1 -1
  122. package/types/composer.js +218 -62
  123. package/types/composer.js.map +1 -1
  124. package/types/composer.mjs +218 -62
  125. package/types/composer.mjs.map +1 -1
  126. package/types/expand.d.ts +8 -0
  127. package/types/expand.d.ts.map +1 -0
  128. package/types/expand.js +3 -0
  129. package/types/expand.js.map +1 -0
  130. package/types/expand.mjs +2 -0
  131. package/types/expand.mjs.map +1 -0
  132. package/types/transaction.d.ts +3 -0
  133. package/types/transaction.d.ts.map +1 -1
@@ -1,5 +1,6 @@
1
1
  import algosdk from 'algosdk';
2
- import AlgoKitComposer, { MethodCallParams } from './composer';
2
+ import AlgoKitComposer, { BuiltTransactions } from './composer';
3
+ import { Expand } from './expand';
3
4
  import Transaction = algosdk.Transaction;
4
5
  /** Orchestrates creating transactions for `AlgorandClient`. */
5
6
  export declare class AlgorandClientTransactionCreator {
@@ -10,12 +11,13 @@ export declare class AlgorandClientTransactionCreator {
10
11
  */
11
12
  constructor(newGroup: () => AlgoKitComposer);
12
13
  private _transaction;
14
+ private _transactions;
13
15
  /**
14
16
  * Create a payment transaction to transfer Algo between accounts.
15
17
  * @param params The parameters for the payment transaction
16
18
  * @example Basic example
17
19
  * ```typescript
18
- * const result = await algorandClient.send.payment({
20
+ * const result = await algorand.send.payment({
19
21
  * sender: 'SENDERADDRESS',
20
22
  * receiver: 'RECEIVERADDRESS',
21
23
  * amount: (4).algo(),
@@ -23,7 +25,7 @@ export declare class AlgorandClientTransactionCreator {
23
25
  * ```
24
26
  * @example Advanced example
25
27
  * ```typescript
26
- * const result = await algorandClient.send.payment({
28
+ * const result = await algorand.send.payment({
27
29
  * amount: (4).algo(),
28
30
  * receiver: 'RECEIVERADDRESS',
29
31
  * sender: 'SENDERADDRESS',
@@ -55,11 +57,11 @@ export declare class AlgorandClientTransactionCreator {
55
57
  *
56
58
  * @example Basic example
57
59
  * ```typescript
58
- * await algorand.transaction.assetCreate({sender: "CREATORADDRESS", total: 100n})
60
+ * await algorand.transactions.assetCreate({sender: "CREATORADDRESS", total: 100n})
59
61
  * ```
60
62
  * @example Advanced example
61
63
  * ```typescript
62
- * await algorand.transaction.assetCreate({
64
+ * await algorand.transactions.assetCreate({
63
65
  * sender: 'CREATORADDRESS',
64
66
  * total: 100n,
65
67
  * decimals: 2,
@@ -97,11 +99,11 @@ export declare class AlgorandClientTransactionCreator {
97
99
  *
98
100
  * @example Basic example
99
101
  * ```typescript
100
- * await algorand.transaction.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
102
+ * await algorand.transactions.assetConfig({sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
101
103
  * ```
102
104
  * @example Advanced example
103
105
  * ```typescript
104
- * await algorand.transaction.assetConfig({
106
+ * await algorand.transactions.assetConfig({
105
107
  * sender: 'MANAGERADDRESS',
106
108
  * assetId: 123456n,
107
109
  * manager: 'MANAGERADDRESS',
@@ -129,11 +131,11 @@ export declare class AlgorandClientTransactionCreator {
129
131
  *
130
132
  * @example Basic example
131
133
  * ```typescript
132
- * await algorand.transaction.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
134
+ * await algorand.transactions.assetFreeze({sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
133
135
  * ```
134
136
  * @example Advanced example
135
137
  * ```typescript
136
- * await algorand.transaction.assetFreeze({
138
+ * await algorand.transactions.assetFreeze({
137
139
  * sender: 'MANAGERADDRESS',
138
140
  * assetId: 123456n,
139
141
  * account: 'ACCOUNTADDRESS',
@@ -163,11 +165,11 @@ export declare class AlgorandClientTransactionCreator {
163
165
  *
164
166
  * @example Basic example
165
167
  * ```typescript
166
- * await algorand.transaction.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
168
+ * await algorand.transactions.assetDestroy({sender: "MANAGERADDRESS", assetId: 123456n })
167
169
  * ```
168
170
  * @example Advanced example
169
171
  * ```typescript
170
- * await algorand.transaction.assetDestroy({
172
+ * await algorand.transactions.assetDestroy({
171
173
  * sender: 'MANAGERADDRESS',
172
174
  * assetId: 123456n,
173
175
  * lease: 'lease',
@@ -191,11 +193,11 @@ export declare class AlgorandClientTransactionCreator {
191
193
  *
192
194
  * @example Basic example
193
195
  * ```typescript
194
- * await algorand.transaction.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
196
+ * await algorand.transactions.assetTransfer({sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
195
197
  * ```
196
198
  * @example Advanced example (with clawback)
197
199
  * ```typescript
198
- * await algorand.transaction.assetTransfer({
200
+ * await algorand.transactions.assetTransfer({
199
201
  * sender: 'CLAWBACKADDRESS',
200
202
  * assetId: 123456n,
201
203
  * amount: 1n,
@@ -224,11 +226,11 @@ export declare class AlgorandClientTransactionCreator {
224
226
  *
225
227
  * @example Basic example
226
228
  * ```typescript
227
- * await algorand.transaction.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
229
+ * await algorand.transactions.assetOptIn({sender: "SENDERADDRESS", assetId: 123456n })
228
230
  * ```
229
231
  * @example Advanced example
230
232
  * ```typescript
231
- * await algorand.transaction.assetOptIn({
233
+ * await algorand.transactions.assetOptIn({
232
234
  * sender: 'SENDERADDRESS',
233
235
  * assetId: 123456n,
234
236
  * lease: 'lease',
@@ -255,11 +257,11 @@ export declare class AlgorandClientTransactionCreator {
255
257
  *
256
258
  * @example Basic example
257
259
  * ```typescript
258
- * await algorand.transaction.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
260
+ * await algorand.transactions.assetOptOut({sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n })
259
261
  * ```
260
262
  * @example Advanced example
261
263
  * ```typescript
262
- * await algorand.transaction.assetOptIn({
264
+ * await algorand.transactions.assetOptIn({
263
265
  * sender: 'SENDERADDRESS',
264
266
  * assetId: 123456n,
265
267
  * creator: 'CREATORADDRESS',
@@ -279,10 +281,438 @@ export declare class AlgorandClientTransactionCreator {
279
281
  * @returns The asset opt-out transaction
280
282
  */
281
283
  assetOptOut: (params: import("./composer").AssetOptOutParams) => Promise<Transaction>;
282
- /** Create an application call transaction. */
284
+ /** Create an application create transaction.
285
+ *
286
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
287
+ *
288
+ * @param params The parameters for the app creation transaction
289
+ * @example Basic example
290
+ * ```typescript
291
+ * const result = await algorand.transactions.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
292
+ * const createdAppId = result.appId
293
+ * ```
294
+ * @example Advanced example
295
+ * ```typescript
296
+ * await algorand.transactions.appCreate({
297
+ * sender: 'CREATORADDRESS',
298
+ * approvalProgram: "TEALCODE",
299
+ * clearStateProgram: "TEALCODE",
300
+ * schema: {
301
+ * globalInts: 1,
302
+ * globalByteSlices: 2,
303
+ * localInts: 3,
304
+ * localByteSlices: 4
305
+ * },
306
+ * extraProgramPages: 1,
307
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
308
+ * args: [new Uint8Array(1, 2, 3, 4)]
309
+ * accountReferences: ["ACCOUNT_1"]
310
+ * appReferences: [123n, 1234n]
311
+ * assetReferences: [12345n]
312
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
313
+ * lease: 'lease',
314
+ * note: 'note',
315
+ * // You wouldn't normally set this field
316
+ * firstValidRound: 1000n,
317
+ * validityWindow: 10,
318
+ * extraFee: (1000).microAlgo(),
319
+ * staticFee: (1000).microAlgo(),
320
+ * // Max fee doesn't make sense with extraFee AND staticFee
321
+ * // already specified, but here for completeness
322
+ * maxFee: (3000).microAlgo(),
323
+ * // Signer only needed if you want to provide one,
324
+ * // generally you'd register it with AlgorandClient
325
+ * // against the sender and not need to pass it in
326
+ * signer: transactionSigner,
327
+ * maxRoundsToWaitForConfirmation: 5,
328
+ * suppressLog: true,
329
+ *})
330
+ * ```
331
+ */
332
+ appCreate: (params: {
333
+ lease?: string | Uint8Array | undefined;
334
+ note?: string | Uint8Array | undefined;
335
+ maxFee?: import("./amount").AlgoAmount | undefined;
336
+ args?: Uint8Array[] | undefined;
337
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
338
+ sender: string;
339
+ rekeyTo?: string | undefined;
340
+ staticFee?: import("./amount").AlgoAmount | undefined;
341
+ extraFee?: import("./amount").AlgoAmount | undefined;
342
+ validityWindow?: number | undefined;
343
+ firstValidRound?: bigint | undefined;
344
+ lastValidRound?: bigint | undefined;
345
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
346
+ accountReferences?: string[] | undefined;
347
+ appReferences?: bigint[] | undefined;
348
+ assetReferences?: bigint[] | undefined;
349
+ boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
350
+ approvalProgram: string | Uint8Array;
351
+ clearStateProgram: string | Uint8Array;
352
+ schema?: {
353
+ globalInts: number;
354
+ globalByteSlices: number;
355
+ localInts: number;
356
+ localByteSlices: number;
357
+ } | undefined;
358
+ extraProgramPages?: number | undefined;
359
+ }) => Promise<Transaction>;
360
+ /** Create an application update transaction.
361
+ *
362
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
363
+ *
364
+ * @param params The parameters for the app update transaction
365
+ * @example Basic example
366
+ * ```typescript
367
+ * await algorand.transactions.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
368
+ * ```
369
+ * @example Advanced example
370
+ * ```typescript
371
+ * await algorand.transactions.appUpdate({
372
+ * sender: 'CREATORADDRESS',
373
+ * approvalProgram: "TEALCODE",
374
+ * clearStateProgram: "TEALCODE",
375
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
376
+ * args: [new Uint8Array(1, 2, 3, 4)]
377
+ * accountReferences: ["ACCOUNT_1"]
378
+ * appReferences: [123n, 1234n]
379
+ * assetReferences: [12345n]
380
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
381
+ * lease: 'lease',
382
+ * note: 'note',
383
+ * // You wouldn't normally set this field
384
+ * firstValidRound: 1000n,
385
+ * validityWindow: 10,
386
+ * extraFee: (1000).microAlgo(),
387
+ * staticFee: (1000).microAlgo(),
388
+ * // Max fee doesn't make sense with extraFee AND staticFee
389
+ * // already specified, but here for completeness
390
+ * maxFee: (3000).microAlgo(),
391
+ * // Signer only needed if you want to provide one,
392
+ * // generally you'd register it with AlgorandClient
393
+ * // against the sender and not need to pass it in
394
+ * signer: transactionSigner,
395
+ * maxRoundsToWaitForConfirmation: 5,
396
+ * suppressLog: true,
397
+ *})
398
+ * ```
399
+ */
400
+ appUpdate: (params: {
401
+ sender: string;
402
+ signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
403
+ rekeyTo?: string | undefined;
404
+ note?: string | Uint8Array | undefined;
405
+ lease?: string | Uint8Array | undefined;
406
+ staticFee?: import("./amount").AlgoAmount | undefined;
407
+ extraFee?: import("./amount").AlgoAmount | undefined;
408
+ maxFee?: import("./amount").AlgoAmount | undefined;
409
+ validityWindow?: number | undefined;
410
+ firstValidRound?: bigint | undefined;
411
+ lastValidRound?: bigint | undefined;
412
+ appId: bigint;
413
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
414
+ args?: Uint8Array[] | undefined;
415
+ accountReferences?: string[] | undefined;
416
+ appReferences?: bigint[] | undefined;
417
+ assetReferences?: bigint[] | undefined;
418
+ boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
419
+ approvalProgram: string | Uint8Array;
420
+ clearStateProgram: string | Uint8Array;
421
+ }) => Promise<Transaction>;
422
+ /** Create an application delete transaction.
423
+ *
424
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
425
+ *
426
+ * @param params The parameters for the app deletion transaction
427
+ * @example Basic example
428
+ * ```typescript
429
+ * await algorand.transactions.appDelete({ sender: 'CREATORADDRESS' })
430
+ * ```
431
+ * @example Advanced example
432
+ * ```typescript
433
+ * await algorand.transactions.appDelete({
434
+ * sender: 'CREATORADDRESS',
435
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
436
+ * args: [new Uint8Array(1, 2, 3, 4)]
437
+ * accountReferences: ["ACCOUNT_1"]
438
+ * appReferences: [123n, 1234n]
439
+ * assetReferences: [12345n]
440
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
441
+ * lease: 'lease',
442
+ * note: 'note',
443
+ * // You wouldn't normally set this field
444
+ * firstValidRound: 1000n,
445
+ * validityWindow: 10,
446
+ * extraFee: (1000).microAlgo(),
447
+ * staticFee: (1000).microAlgo(),
448
+ * // Max fee doesn't make sense with extraFee AND staticFee
449
+ * // already specified, but here for completeness
450
+ * maxFee: (3000).microAlgo(),
451
+ * // Signer only needed if you want to provide one,
452
+ * // generally you'd register it with AlgorandClient
453
+ * // against the sender and not need to pass it in
454
+ * signer: transactionSigner,
455
+ * maxRoundsToWaitForConfirmation: 5,
456
+ * suppressLog: true,
457
+ *})
458
+ * ```
459
+ */
460
+ appDelete: (params: import("./composer").AppDeleteParams) => Promise<Transaction>;
461
+ /** Create an application call transaction.
462
+ *
463
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
464
+ *
465
+ * @param params The parameters for the app call transaction
466
+ * @example Basic example
467
+ * ```typescript
468
+ * await algorand.transactions.appCall({ sender: 'CREATORADDRESS' })
469
+ * ```
470
+ * @example Advanced example
471
+ * ```typescript
472
+ * await algorand.transactions.appCall({
473
+ * sender: 'CREATORADDRESS',
474
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
475
+ * args: [new Uint8Array(1, 2, 3, 4)]
476
+ * accountReferences: ["ACCOUNT_1"]
477
+ * appReferences: [123n, 1234n]
478
+ * assetReferences: [12345n]
479
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
480
+ * lease: 'lease',
481
+ * note: 'note',
482
+ * // You wouldn't normally set this field
483
+ * firstValidRound: 1000n,
484
+ * validityWindow: 10,
485
+ * extraFee: (1000).microAlgo(),
486
+ * staticFee: (1000).microAlgo(),
487
+ * // Max fee doesn't make sense with extraFee AND staticFee
488
+ * // already specified, but here for completeness
489
+ * maxFee: (3000).microAlgo(),
490
+ * // Signer only needed if you want to provide one,
491
+ * // generally you'd register it with AlgorandClient
492
+ * // against the sender and not need to pass it in
493
+ * signer: transactionSigner,
494
+ * maxRoundsToWaitForConfirmation: 5,
495
+ * suppressLog: true,
496
+ *})
497
+ * ```
498
+ */
283
499
  appCall: (params: import("./composer").AppCallParams) => Promise<Transaction>;
284
- /** Create an application call with ABI method call transaction. */
285
- methodCall: (params: MethodCallParams) => Promise<algosdk.Transaction[]>;
500
+ /** Create an application create call with ABI method call transaction.
501
+ *
502
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
503
+ *
504
+ * @param params The parameters for the app creation transaction
505
+ * @example Basic example
506
+ * ```typescript
507
+ * const method = new ABIMethod({
508
+ * name: 'method',
509
+ * args: [{ name: 'arg1', type: 'string' }],
510
+ * returns: { type: 'string' },
511
+ * })
512
+ * const result = await algorand.transactions.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
513
+ * const createdAppId = result.appId
514
+ * ```
515
+ * @example Advanced example
516
+ * ```typescript
517
+ * const method = new ABIMethod({
518
+ * name: 'method',
519
+ * args: [{ name: 'arg1', type: 'string' }],
520
+ * returns: { type: 'string' },
521
+ * })
522
+ * await algorand.transactions.appCreate({
523
+ * sender: 'CREATORADDRESS',
524
+ * method: method,
525
+ * args: ["arg1_value"],
526
+ * approvalProgram: "TEALCODE",
527
+ * clearStateProgram: "TEALCODE",
528
+ * schema: {
529
+ * globalInts: 1,
530
+ * globalByteSlices: 2,
531
+ * localInts: 3,
532
+ * localByteSlices: 4
533
+ * },
534
+ * extraProgramPages: 1,
535
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
536
+ * args: [new Uint8Array(1, 2, 3, 4)]
537
+ * accountReferences: ["ACCOUNT_1"]
538
+ * appReferences: [123n, 1234n]
539
+ * assetReferences: [12345n]
540
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
541
+ * lease: 'lease',
542
+ * note: 'note',
543
+ * // You wouldn't normally set this field
544
+ * firstValidRound: 1000n,
545
+ * validityWindow: 10,
546
+ * extraFee: (1000).microAlgo(),
547
+ * staticFee: (1000).microAlgo(),
548
+ * // Max fee doesn't make sense with extraFee AND staticFee
549
+ * // already specified, but here for completeness
550
+ * maxFee: (3000).microAlgo(),
551
+ * // Signer only needed if you want to provide one,
552
+ * // generally you'd register it with AlgorandClient
553
+ * // against the sender and not need to pass it in
554
+ * signer: transactionSigner,
555
+ * maxRoundsToWaitForConfirmation: 5,
556
+ * suppressLog: true,
557
+ *})
558
+ * ```
559
+ */
560
+ appCreateMethodCall: (params: import("./composer").AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
561
+ /** Create an application update call with ABI method call transaction.
562
+ *
563
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
564
+ *
565
+ * @param params The parameters for the app update transaction
566
+ * @example Basic example
567
+ * ```typescript
568
+ * const method = new ABIMethod({
569
+ * name: 'method',
570
+ * args: [{ name: 'arg1', type: 'string' }],
571
+ * returns: { type: 'string' },
572
+ * })
573
+ * await algorand.transactions.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
574
+ * ```
575
+ * @example Advanced example
576
+ * ```typescript
577
+ * const method = new ABIMethod({
578
+ * name: 'method',
579
+ * args: [{ name: 'arg1', type: 'string' }],
580
+ * returns: { type: 'string' },
581
+ * })
582
+ * await algorand.transactions.appUpdateMethodCall({
583
+ * sender: 'CREATORADDRESS',
584
+ * method: method,
585
+ * args: ["arg1_value"],
586
+ * approvalProgram: "TEALCODE",
587
+ * clearStateProgram: "TEALCODE",
588
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
589
+ * args: [new Uint8Array(1, 2, 3, 4)]
590
+ * accountReferences: ["ACCOUNT_1"]
591
+ * appReferences: [123n, 1234n]
592
+ * assetReferences: [12345n]
593
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
594
+ * lease: 'lease',
595
+ * note: 'note',
596
+ * // You wouldn't normally set this field
597
+ * firstValidRound: 1000n,
598
+ * validityWindow: 10,
599
+ * extraFee: (1000).microAlgo(),
600
+ * staticFee: (1000).microAlgo(),
601
+ * // Max fee doesn't make sense with extraFee AND staticFee
602
+ * // already specified, but here for completeness
603
+ * maxFee: (3000).microAlgo(),
604
+ * // Signer only needed if you want to provide one,
605
+ * // generally you'd register it with AlgorandClient
606
+ * // against the sender and not need to pass it in
607
+ * signer: transactionSigner,
608
+ * maxRoundsToWaitForConfirmation: 5,
609
+ * suppressLog: true,
610
+ *})
611
+ * ```
612
+ */
613
+ appUpdateMethodCall: (params: import("./composer").AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
614
+ /** Create an application delete call with ABI method call transaction.
615
+ *
616
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
617
+ *
618
+ * @param params The parameters for the app deletion transaction
619
+ * @example Basic example
620
+ * ```typescript
621
+ * const method = new ABIMethod({
622
+ * name: 'method',
623
+ * args: [{ name: 'arg1', type: 'string' }],
624
+ * returns: { type: 'string' },
625
+ * })
626
+ * await algorand.transactions.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
627
+ * ```
628
+ * @example Advanced example
629
+ * ```typescript
630
+ * const method = new ABIMethod({
631
+ * name: 'method',
632
+ * args: [{ name: 'arg1', type: 'string' }],
633
+ * returns: { type: 'string' },
634
+ * })
635
+ * await algorand.transactions.appDeleteMethodCall({
636
+ * sender: 'CREATORADDRESS',
637
+ * method: method,
638
+ * args: ["arg1_value"],
639
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
640
+ * args: [new Uint8Array(1, 2, 3, 4)]
641
+ * accountReferences: ["ACCOUNT_1"]
642
+ * appReferences: [123n, 1234n]
643
+ * assetReferences: [12345n]
644
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
645
+ * lease: 'lease',
646
+ * note: 'note',
647
+ * // You wouldn't normally set this field
648
+ * firstValidRound: 1000n,
649
+ * validityWindow: 10,
650
+ * extraFee: (1000).microAlgo(),
651
+ * staticFee: (1000).microAlgo(),
652
+ * // Max fee doesn't make sense with extraFee AND staticFee
653
+ * // already specified, but here for completeness
654
+ * maxFee: (3000).microAlgo(),
655
+ * // Signer only needed if you want to provide one,
656
+ * // generally you'd register it with AlgorandClient
657
+ * // against the sender and not need to pass it in
658
+ * signer: transactionSigner,
659
+ * maxRoundsToWaitForConfirmation: 5,
660
+ * suppressLog: true,
661
+ *})
662
+ * ```
663
+ */
664
+ appDeleteMethodCall: (params: import("./composer").AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
665
+ /** Create an application call with ABI method call transaction.
666
+ *
667
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
668
+ *
669
+ * @param params The parameters for the app call transaction
670
+ * @example Basic example
671
+ * ```typescript
672
+ * const method = new ABIMethod({
673
+ * name: 'method',
674
+ * args: [{ name: 'arg1', type: 'string' }],
675
+ * returns: { type: 'string' },
676
+ * })
677
+ * await algorand.transactions.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
678
+ * ```
679
+ * @example Advanced example
680
+ * ```typescript
681
+ * const method = new ABIMethod({
682
+ * name: 'method',
683
+ * args: [{ name: 'arg1', type: 'string' }],
684
+ * returns: { type: 'string' },
685
+ * })
686
+ * await algorand.transactions.appCallMethodCall({
687
+ * sender: 'CREATORADDRESS',
688
+ * method: method,
689
+ * args: ["arg1_value"],
690
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
691
+ * args: [new Uint8Array(1, 2, 3, 4)]
692
+ * accountReferences: ["ACCOUNT_1"]
693
+ * appReferences: [123n, 1234n]
694
+ * assetReferences: [12345n]
695
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
696
+ * lease: 'lease',
697
+ * note: 'note',
698
+ * // You wouldn't normally set this field
699
+ * firstValidRound: 1000n,
700
+ * validityWindow: 10,
701
+ * extraFee: (1000).microAlgo(),
702
+ * staticFee: (1000).microAlgo(),
703
+ * // Max fee doesn't make sense with extraFee AND staticFee
704
+ * // already specified, but here for completeness
705
+ * maxFee: (3000).microAlgo(),
706
+ * // Signer only needed if you want to provide one,
707
+ * // generally you'd register it with AlgorandClient
708
+ * // against the sender and not need to pass it in
709
+ * signer: transactionSigner,
710
+ * maxRoundsToWaitForConfirmation: 5,
711
+ * suppressLog: true,
712
+ *})
713
+ * ```
714
+ */
715
+ appCallMethodCall: (params: import("./composer").AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
286
716
  /** Create an online key registration transaction. */
287
717
  onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
288
718
  }
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client-transaction-creator.d.ts","sourceRoot":"","sources":["../../src/types/algorand-client-transaction-creator.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,eAAe,EAAE,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE9D,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAExC,+DAA+D;AAC/D,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC;;;OAGG;gBACS,QAAQ,EAAE,MAAM,eAAe;IAI3C,OAAO,CAAC,YAAY;IAQpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,OAAO,kDA3C4F,QAAQ,WAAW,CAAC,CA2CvE;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,WAAW,sDApFwF,QAAQ,WAAW,CAAC,CAoF/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,WAAW,sDAxHwF,QAAQ,WAAW,CAAC,CAwH/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,WAAW,sDAtJwF,QAAQ,WAAW,CAAC,CAsJ/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,YAAY,uDAtLuF,QAAQ,WAAW,CAAC,CAsL7D;IAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,wDAvNsF,QAAQ,WAAW,CAAC,CAuN3D;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,UAAU,qDAnPyF,QAAQ,WAAW,CAAC,CAmPjE;IACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,WAAW,sDApRwF,QAAQ,WAAW,CAAC,CAoR/D;IACxD,8CAA8C;IAC9C,OAAO,kDAtR4F,QAAQ,WAAW,CAAC,CAsRvE;IAChD,mEAAmE;IACnE,UAAU,WAAkB,gBAAgB,oCAE3C;IACD,qDAAqD;IACrD,qBAAqB,gEA5R8E,QAAQ,WAAW,CAAC,CA4R3C;CAC7E"}
1
+ {"version":3,"file":"algorand-client-transaction-creator.d.ts","sourceRoot":"","sources":["../../src/types/algorand-client-transaction-creator.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,eAAe,EAAE,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAExC,+DAA+D;AAC/D,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC;;;OAGG;gBACS,QAAQ,EAAE,MAAM,eAAe;IAI3C,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,aAAa;IAOrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,OAAO,kDAlD4F,QAAQ,WAAW,CAAC,CAkDvE;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,WAAW,sDA3FwF,QAAQ,WAAW,CAAC,CA2F/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,WAAW,sDA/HwF,QAAQ,WAAW,CAAC,CA+H/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,WAAW,sDA7JwF,QAAQ,WAAW,CAAC,CA6J/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,YAAY,uDA7LuF,QAAQ,WAAW,CAAC,CA6L7D;IAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,aAAa,wDA9NsF,QAAQ,WAAW,CAAC,CA8N3D;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,UAAU,qDA1PyF,QAAQ,WAAW,CAAC,CA0PjE;IACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,WAAW,sDA3RwF,QAAQ,WAAW,CAAC,CA2R/D;IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;UA5U0F,QAAQ,WAAW,CAAC,CA4UnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,SAAS;;;;;;;;;;;;;;;;;;;;;UArX0F,QAAQ,WAAW,CAAC,CAqXnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,SAAS,oDA5Z0F,QAAQ,WAAW,CAAC,CA4ZnE;IACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,OAAO,kDAnc4F,QAAQ,WAAW,CAAC,CAmcvE;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,mBAAmB,wDAxfiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAwf7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,mBAAmB,wDA7iBiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CA6iB7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,mBAAmB,wDAhmBiF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAgmB7D;IACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,iBAAiB,sDAnpBmF,QAAQ,OAAO,iBAAiB,CAAC,CAAC,CAmpBjE;IACrE,qDAAqD;IACrD,qBAAqB,gEA7pB8E,QAAQ,WAAW,CAAC,CA6pB3C;CAC7E"}