@algorandfoundation/algokit-utils 9.2.0-beta.9 → 9.2.1-beta.1

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 (340) hide show
  1. package/_virtual/_rolldown/runtime.js +33 -0
  2. package/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/account/account.d.ts +25 -30
  4. package/account/account.js +151 -146
  5. package/account/account.js.map +1 -1
  6. package/account/account.mjs +149 -144
  7. package/account/account.mjs.map +1 -1
  8. package/account/get-account-config-from-environment.d.ts +7 -2
  9. package/account/get-account-config-from-environment.js +19 -21
  10. package/account/get-account-config-from-environment.js.map +1 -1
  11. package/account/get-account-config-from-environment.mjs +19 -19
  12. package/account/get-account-config-from-environment.mjs.map +1 -1
  13. package/account/get-account.d.ts +14 -12
  14. package/account/get-account.js +56 -59
  15. package/account/get-account.js.map +1 -1
  16. package/account/get-account.mjs +56 -57
  17. package/account/get-account.mjs.map +1 -1
  18. package/account/get-dispenser-account.d.ts +9 -5
  19. package/account/get-dispenser-account.js +20 -18
  20. package/account/get-dispenser-account.js.map +1 -1
  21. package/account/get-dispenser-account.mjs +20 -16
  22. package/account/get-dispenser-account.mjs.map +1 -1
  23. package/account/mnemonic-account.d.ts +7 -3
  24. package/account/mnemonic-account.js +17 -17
  25. package/account/mnemonic-account.js.map +1 -1
  26. package/account/mnemonic-account.mjs +15 -15
  27. package/account/mnemonic-account.mjs.map +1 -1
  28. package/amount.d.ts +40 -35
  29. package/amount.js +33 -34
  30. package/amount.js.map +1 -1
  31. package/amount.mjs +33 -32
  32. package/amount.mjs.map +1 -1
  33. package/app-client.d.ts +10 -6
  34. package/app-client.js +91 -86
  35. package/app-client.js.map +1 -1
  36. package/app-client.mjs +91 -84
  37. package/app-client.mjs.map +1 -1
  38. package/app-deploy.d.ts +26 -24
  39. package/app-deploy.js +235 -253
  40. package/app-deploy.js.map +1 -1
  41. package/app-deploy.mjs +233 -251
  42. package/app-deploy.mjs.map +1 -1
  43. package/app.d.ts +45 -46
  44. package/app.js +253 -271
  45. package/app.js.map +1 -1
  46. package/app.mjs +249 -267
  47. package/app.mjs.map +1 -1
  48. package/asset.d.ts +16 -12
  49. package/asset.js +116 -122
  50. package/asset.js.map +1 -1
  51. package/asset.mjs +116 -120
  52. package/asset.mjs.map +1 -1
  53. package/config.d.ts +7 -2
  54. package/config.js +5 -7
  55. package/config.js.map +1 -1
  56. package/config.mjs +5 -4
  57. package/config.mjs.map +1 -1
  58. package/debugging/debugging.d.ts +5 -1
  59. package/debugging/debugging.js +11 -11
  60. package/debugging/debugging.js.map +1 -1
  61. package/debugging/debugging.mjs +11 -9
  62. package/debugging/debugging.mjs.map +1 -1
  63. package/dispenser-client.d.ts +7 -2
  64. package/dispenser-client.js +23 -24
  65. package/dispenser-client.js.map +1 -1
  66. package/dispenser-client.mjs +23 -22
  67. package/dispenser-client.mjs.map +1 -1
  68. package/index.d.ts +27 -18
  69. package/index.js +140 -143
  70. package/index.mjs +27 -29
  71. package/indexer-lookup.d.ts +18 -11
  72. package/indexer-lookup.js +112 -120
  73. package/indexer-lookup.js.map +1 -1
  74. package/indexer-lookup.mjs +105 -118
  75. package/indexer-lookup.mjs.map +1 -1
  76. package/localnet/get-kmd-wallet-account.d.ts +9 -7
  77. package/localnet/get-kmd-wallet-account.js +28 -26
  78. package/localnet/get-kmd-wallet-account.js.map +1 -1
  79. package/localnet/get-kmd-wallet-account.mjs +28 -24
  80. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  81. package/localnet/get-localnet-dispenser-account.d.ts +7 -5
  82. package/localnet/get-localnet-dispenser-account.js +17 -15
  83. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  84. package/localnet/get-localnet-dispenser-account.mjs +17 -13
  85. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  86. package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
  87. package/localnet/get-or-create-kmd-wallet-account.js +28 -26
  88. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  89. package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
  90. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  91. package/localnet/is-localnet.d.ts +7 -3
  92. package/localnet/is-localnet.js +9 -10
  93. package/localnet/is-localnet.js.map +1 -1
  94. package/localnet/is-localnet.mjs +9 -8
  95. package/localnet/is-localnet.mjs.map +1 -1
  96. package/network-client.d.ts +17 -15
  97. package/network-client.js +115 -116
  98. package/network-client.js.map +1 -1
  99. package/network-client.mjs +115 -114
  100. package/network-client.mjs.map +1 -1
  101. package/package.json +12 -3
  102. package/testing/account.d.ts +11 -9
  103. package/testing/account.js +31 -33
  104. package/testing/account.js.map +1 -1
  105. package/testing/account.mjs +29 -31
  106. package/testing/account.mjs.map +1 -1
  107. package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
  108. package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
  109. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  110. package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
  111. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  112. package/testing/fixtures/algorand-fixture.d.ts +9 -4
  113. package/testing/fixtures/algorand-fixture.js +67 -62
  114. package/testing/fixtures/algorand-fixture.js.map +1 -1
  115. package/testing/fixtures/algorand-fixture.mjs +66 -59
  116. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  117. package/testing/index.d.ts +7 -5
  118. package/testing/index.js +13 -18
  119. package/testing/index.mjs +7 -7
  120. package/testing/indexer.d.ts +5 -1
  121. package/testing/indexer.js +28 -37
  122. package/testing/indexer.js.map +1 -1
  123. package/testing/indexer.mjs +28 -35
  124. package/testing/indexer.mjs.map +1 -1
  125. package/testing/test-logger.d.ts +41 -36
  126. package/testing/test-logger.js +71 -76
  127. package/testing/test-logger.js.map +1 -1
  128. package/testing/test-logger.mjs +71 -74
  129. package/testing/test-logger.mjs.map +1 -1
  130. package/testing/transaction-logger.d.ts +30 -27
  131. package/testing/transaction-logger.js +77 -93
  132. package/testing/transaction-logger.js.map +1 -1
  133. package/testing/transaction-logger.mjs +74 -90
  134. package/testing/transaction-logger.mjs.map +1 -1
  135. package/transaction/legacy-bridge.js +100 -111
  136. package/transaction/legacy-bridge.js.map +1 -1
  137. package/transaction/legacy-bridge.mjs +97 -108
  138. package/transaction/legacy-bridge.mjs.map +1 -1
  139. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
  140. package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
  141. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  142. package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
  143. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  144. package/transaction/transaction.d.ts +34 -35
  145. package/transaction/transaction.js +716 -914
  146. package/transaction/transaction.js.map +1 -1
  147. package/transaction/transaction.mjs +713 -911
  148. package/transaction/transaction.mjs.map +1 -1
  149. package/transfer/transfer-algos.d.ts +9 -5
  150. package/transfer/transfer-algos.js +26 -27
  151. package/transfer/transfer-algos.js.map +1 -1
  152. package/transfer/transfer-algos.mjs +26 -25
  153. package/transfer/transfer-algos.mjs.map +1 -1
  154. package/transfer/transfer.d.ts +11 -8
  155. package/transfer/transfer.js +94 -100
  156. package/transfer/transfer.js.map +1 -1
  157. package/transfer/transfer.mjs +94 -98
  158. package/transfer/transfer.mjs.map +1 -1
  159. package/types/account-manager.d.ts +432 -429
  160. package/types/account-manager.js +591 -602
  161. package/types/account-manager.js.map +1 -1
  162. package/types/account-manager.mjs +587 -599
  163. package/types/account-manager.mjs.map +1 -1
  164. package/types/account.d.ts +192 -202
  165. package/types/account.js +91 -88
  166. package/types/account.js.map +1 -1
  167. package/types/account.mjs +88 -86
  168. package/types/account.mjs.map +1 -1
  169. package/types/algo-http-client-with-retry.d.ts +15 -10
  170. package/types/algo-http-client-with-retry.js +70 -92
  171. package/types/algo-http-client-with-retry.js.map +1 -1
  172. package/types/algo-http-client-with-retry.mjs +69 -90
  173. package/types/algo-http-client-with-retry.mjs.map +1 -1
  174. package/types/algorand-client-transaction-creator.d.ts +778 -761
  175. package/types/algorand-client-transaction-creator.js +733 -724
  176. package/types/algorand-client-transaction-creator.js.map +1 -1
  177. package/types/algorand-client-transaction-creator.mjs +732 -722
  178. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  179. package/types/algorand-client-transaction-sender.d.ts +1090 -1268
  180. package/types/algorand-client-transaction-sender.js +930 -953
  181. package/types/algorand-client-transaction-sender.js.map +1 -1
  182. package/types/algorand-client-transaction-sender.mjs +927 -951
  183. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  184. package/types/algorand-client.d.ts +239 -236
  185. package/types/algorand-client.js +322 -320
  186. package/types/algorand-client.js.map +1 -1
  187. package/types/algorand-client.mjs +321 -318
  188. package/types/algorand-client.mjs.map +1 -1
  189. package/types/amount.d.ts +47 -43
  190. package/types/amount.js +66 -70
  191. package/types/amount.js.map +1 -1
  192. package/types/amount.mjs +63 -68
  193. package/types/amount.mjs.map +1 -1
  194. package/types/app-arc56.d.ts +235 -272
  195. package/types/app-arc56.js +124 -170
  196. package/types/app-arc56.js.map +1 -1
  197. package/types/app-arc56.mjs +121 -168
  198. package/types/app-arc56.mjs.map +1 -1
  199. package/types/app-client.d.ts +1128 -1972
  200. package/types/app-client.js +1633 -1791
  201. package/types/app-client.js.map +1 -1
  202. package/types/app-client.mjs +1624 -1783
  203. package/types/app-client.mjs.map +1 -1
  204. package/types/app-deployer.d.ts +139 -141
  205. package/types/app-deployer.js +344 -384
  206. package/types/app-deployer.js.map +1 -1
  207. package/types/app-deployer.mjs +341 -382
  208. package/types/app-deployer.mjs.map +1 -1
  209. package/types/app-factory.d.ts +762 -914
  210. package/types/app-factory.js +496 -488
  211. package/types/app-factory.js.map +1 -1
  212. package/types/app-factory.mjs +491 -484
  213. package/types/app-factory.mjs.map +1 -1
  214. package/types/app-manager.d.ts +307 -311
  215. package/types/app-manager.js +422 -474
  216. package/types/app-manager.js.map +1 -1
  217. package/types/app-manager.mjs +419 -472
  218. package/types/app-manager.mjs.map +1 -1
  219. package/types/app-spec.d.ts +118 -117
  220. package/types/app-spec.js +125 -135
  221. package/types/app-spec.js.map +1 -1
  222. package/types/app-spec.mjs +121 -132
  223. package/types/app-spec.mjs.map +1 -1
  224. package/types/app.d.ts +229 -241
  225. package/types/app.js +36 -28
  226. package/types/app.js.map +1 -1
  227. package/types/app.mjs +33 -26
  228. package/types/app.mjs.map +1 -1
  229. package/types/asset-manager.d.ts +204 -199
  230. package/types/asset-manager.js +165 -174
  231. package/types/asset-manager.js.map +1 -1
  232. package/types/asset-manager.mjs +164 -172
  233. package/types/asset-manager.mjs.map +1 -1
  234. package/types/asset.d.ts +95 -91
  235. package/types/asset.js +0 -3
  236. package/types/asset.mjs +0 -2
  237. package/types/async-event-emitter.d.ts +18 -13
  238. package/types/async-event-emitter.js +37 -49
  239. package/types/async-event-emitter.js.map +1 -1
  240. package/types/async-event-emitter.mjs +36 -47
  241. package/types/async-event-emitter.mjs.map +1 -1
  242. package/types/client-manager.d.ts +453 -451
  243. package/types/client-manager.js +602 -598
  244. package/types/client-manager.js.map +1 -1
  245. package/types/client-manager.mjs +597 -594
  246. package/types/client-manager.mjs.map +1 -1
  247. package/types/composer.d.ts +1211 -1248
  248. package/types/composer.js +1436 -1487
  249. package/types/composer.js.map +1 -1
  250. package/types/composer.mjs +1430 -1482
  251. package/types/composer.mjs.map +1 -1
  252. package/types/config.d.ts +53 -48
  253. package/types/config.js +78 -77
  254. package/types/config.js.map +1 -1
  255. package/types/config.mjs +77 -75
  256. package/types/config.mjs.map +1 -1
  257. package/types/debugging.d.ts +25 -23
  258. package/types/debugging.js +9 -11
  259. package/types/debugging.js.map +1 -1
  260. package/types/debugging.mjs +8 -9
  261. package/types/debugging.mjs.map +1 -1
  262. package/types/dispenser-client.d.ts +57 -52
  263. package/types/dispenser-client.js +120 -141
  264. package/types/dispenser-client.js.map +1 -1
  265. package/types/dispenser-client.mjs +119 -139
  266. package/types/dispenser-client.mjs.map +1 -1
  267. package/types/expand.d.ts +5 -3
  268. package/types/expand.js +0 -3
  269. package/types/expand.mjs +0 -2
  270. package/types/indexer.d.ts +104 -100
  271. package/types/indexer.js +36 -31
  272. package/types/indexer.js.map +1 -1
  273. package/types/indexer.mjs +32 -30
  274. package/types/indexer.mjs.map +1 -1
  275. package/types/instance-of.d.ts +5 -3
  276. package/types/instance-of.js +0 -3
  277. package/types/instance-of.mjs +0 -2
  278. package/types/kmd-account-manager.d.ts +75 -70
  279. package/types/kmd-account-manager.js +150 -184
  280. package/types/kmd-account-manager.js.map +1 -1
  281. package/types/kmd-account-manager.mjs +147 -182
  282. package/types/kmd-account-manager.mjs.map +1 -1
  283. package/types/lifecycle-events.d.ts +13 -8
  284. package/types/lifecycle-events.js +10 -7
  285. package/types/lifecycle-events.js.map +1 -1
  286. package/types/lifecycle-events.mjs +9 -7
  287. package/types/lifecycle-events.mjs.map +1 -1
  288. package/types/logging.d.ts +15 -11
  289. package/types/logging.js +30 -31
  290. package/types/logging.js.map +1 -1
  291. package/types/logging.mjs +29 -29
  292. package/types/logging.mjs.map +1 -1
  293. package/types/logic-error.d.ts +33 -29
  294. package/types/logic-error.js +50 -49
  295. package/types/logic-error.js.map +1 -1
  296. package/types/logic-error.mjs +49 -47
  297. package/types/logic-error.mjs.map +1 -1
  298. package/types/network-client.d.ts +32 -27
  299. package/types/network-client.js +10 -9
  300. package/types/network-client.js.map +1 -1
  301. package/types/network-client.mjs +9 -7
  302. package/types/network-client.mjs.map +1 -1
  303. package/types/testing.d.ts +131 -132
  304. package/types/testing.js +0 -3
  305. package/types/testing.mjs +0 -2
  306. package/types/transaction.d.ts +110 -110
  307. package/types/transaction.js +0 -3
  308. package/types/transaction.mjs +0 -2
  309. package/types/transfer.d.ts +70 -66
  310. package/types/transfer.js +0 -3
  311. package/types/transfer.mjs +0 -2
  312. package/util.js +73 -118
  313. package/util.js.map +1 -1
  314. package/util.mjs +73 -116
  315. package/util.mjs.map +1 -1
  316. package/account/index.d.ts +0 -5
  317. package/debugging/index.d.ts +0 -1
  318. package/index.js.map +0 -1
  319. package/index.mjs.map +0 -1
  320. package/localnet/index.d.ts +0 -4
  321. package/testing/_asset.d.ts +0 -3
  322. package/testing/fixtures/index.d.ts +0 -2
  323. package/testing/index.js.map +0 -1
  324. package/testing/index.mjs.map +0 -1
  325. package/transaction/index.d.ts +0 -2
  326. package/transaction/legacy-bridge.d.ts +0 -35
  327. package/transfer/index.d.ts +0 -2
  328. package/types/asset.js.map +0 -1
  329. package/types/asset.mjs.map +0 -1
  330. package/types/expand.js.map +0 -1
  331. package/types/expand.mjs.map +0 -1
  332. package/types/instance-of.js.map +0 -1
  333. package/types/instance-of.mjs.map +0 -1
  334. package/types/testing.js.map +0 -1
  335. package/types/testing.mjs.map +0 -1
  336. package/types/transaction.js.map +0 -1
  337. package/types/transaction.mjs.map +0 -1
  338. package/types/transfer.js.map +0 -1
  339. package/types/transfer.mjs.map +0 -1
  340. package/util.d.ts +0 -48
@@ -1,763 +1,780 @@
1
- import algosdk from 'algosdk';
2
- import { BuiltTransactions, TransactionComposer } from './composer';
3
- import { Expand } from './expand';
4
- import Transaction = algosdk.Transaction;
1
+ import { AlgoAmount } from "./amount.js";
2
+ import { TransactionSignerAccount } from "./account.js";
3
+ import { Expand } from "./expand.js";
4
+ import { BoxIdentifier, BoxReference, ResourceReference } from "./app-manager.js";
5
+ import { AppCallMethodCall, AppCallParams, AppCreateMethodCall, AppDeleteMethodCall, AppDeleteParams, AppUpdateMethodCall, AssetConfigParams, AssetCreateParams, AssetDestroyParams, AssetFreezeParams, AssetOptInParams, AssetOptOutParams, AssetTransferParams, BuiltTransactions, OfflineKeyRegistrationParams, OnlineKeyRegistrationParams, PaymentParams, TransactionComposer } from "./composer.js";
6
+ import algosdk from "algosdk";
7
+
8
+ //#region src/types/algorand-client-transaction-creator.d.ts
5
9
  /** Orchestrates creating transactions for `AlgorandClient`. */
6
- export declare class AlgorandClientTransactionCreator {
7
- private _newGroup;
8
- /**
9
- * Creates a new `AlgorandClientTransactionCreator`
10
- * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
11
- * @example
12
- * ```typescript
13
- * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())
14
- * ```
15
- */
16
- constructor(newGroup: () => TransactionComposer);
17
- private _transaction;
18
- private _transactions;
19
- /**
20
- * Create a payment transaction to transfer Algo between accounts.
21
- * @param params The parameters for the payment transaction
22
- * @example Basic example
23
- * ```typescript
24
- * await algorand.createTransaction.payment({
25
- * sender: 'SENDERADDRESS',
26
- * receiver: 'RECEIVERADDRESS',
27
- * amount: (4).algo(),
28
- * })
29
- * ```
30
- * @example Advanced example
31
- * ```typescript
32
- * await algorand.createTransaction.payment({
33
- * amount: (4).algo(),
34
- * receiver: 'RECEIVERADDRESS',
35
- * sender: 'SENDERADDRESS',
36
- * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
37
- * lease: 'lease',
38
- * note: 'note',
39
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
40
- * rekeyTo: 'REKEYTOADDRESS',
41
- * // You wouldn't normally set this field
42
- * firstValidRound: 1000n,
43
- * validityWindow: 10,
44
- * extraFee: (1000).microAlgo(),
45
- * staticFee: (1000).microAlgo(),
46
- * // Max fee doesn't make sense with extraFee AND staticFee
47
- * // already specified, but here for completeness
48
- * maxFee: (3000).microAlgo(),
49
- * })
50
- * ```
51
- * @returns The payment transaction
52
- */
53
- payment: (params: import("./composer").PaymentParams) => Promise<Transaction>;
54
- /** Create a create Algorand Standard Asset transaction.
55
- *
56
- * The account that sends this transaction will automatically be
57
- * opted in to the asset and will hold all units after creation.
58
- *
59
- * @param params The parameters for the asset creation transaction
60
- *
61
- * @example Basic example
62
- * ```typescript
63
- * await algorand.createTransaction.assetCreate({ sender: "CREATORADDRESS", total: 100n})
64
- * ```
65
- * @example Advanced example
66
- * ```typescript
67
- * await algorand.createTransaction.assetCreate({
68
- * sender: 'CREATORADDRESS',
69
- * total: 100n,
70
- * decimals: 2,
71
- * assetName: 'asset',
72
- * unitName: 'unit',
73
- * url: 'url',
74
- * metadataHash: 'metadataHash',
75
- * defaultFrozen: false,
76
- * manager: 'MANAGERADDRESS',
77
- * reserve: 'RESERVEADDRESS',
78
- * freeze: 'FREEZEADDRESS',
79
- * clawback: 'CLAWBACKADDRESS',
80
- * lease: 'lease',
81
- * note: 'note',
82
- * // You wouldn't normally set this field
83
- * firstValidRound: 1000n,
84
- * validityWindow: 10,
85
- * extraFee: (1000).microAlgo(),
86
- * staticFee: (1000).microAlgo(),
87
- * // Max fee doesn't make sense with extraFee AND staticFee
88
- * // already specified, but here for completeness
89
- * maxFee: (3000).microAlgo(),
90
- * })
91
- * ```
92
- * @returns The asset create transaction
93
- */
94
- assetCreate: (params: import("./composer").AssetCreateParams) => Promise<Transaction>;
95
- /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
96
- *
97
- * **Note:** The manager, reserve, freeze, and clawback addresses
98
- * are immutably empty if they are not set. If manager is not set then
99
- * all fields are immutable from that point forward.
100
- *
101
- * @param params The parameters for the asset config transaction
102
- *
103
- * @example Basic example
104
- * ```typescript
105
- * await algorand.createTransaction.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
106
- * ```
107
- * @example Advanced example
108
- * ```typescript
109
- * await algorand.createTransaction.assetConfig({
110
- * sender: 'MANAGERADDRESS',
111
- * assetId: 123456n,
112
- * manager: 'MANAGERADDRESS',
113
- * reserve: 'RESERVEADDRESS',
114
- * freeze: 'FREEZEADDRESS',
115
- * clawback: 'CLAWBACKADDRESS',
116
- * lease: 'lease',
117
- * note: 'note',
118
- * // You wouldn't normally set this field
119
- * firstValidRound: 1000n,
120
- * validityWindow: 10,
121
- * extraFee: (1000).microAlgo(),
122
- * staticFee: (1000).microAlgo(),
123
- * // Max fee doesn't make sense with extraFee AND staticFee
124
- * // already specified, but here for completeness
125
- * maxFee: (3000).microAlgo(),
126
- * })
127
- * ```
128
- * @returns The asset config transaction
129
- */
130
- assetConfig: (params: import("./composer").AssetConfigParams) => Promise<Transaction>;
131
- /** Create an Algorand Standard Asset freeze transaction.
132
- *
133
- * @param params The parameters for the asset freeze transaction
134
- *
135
- * @example Basic example
136
- * ```typescript
137
- * await algorand.createTransaction.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
138
- * ```
139
- * @example Advanced example
140
- * ```typescript
141
- * await algorand.createTransaction.assetFreeze({
142
- * sender: 'MANAGERADDRESS',
143
- * assetId: 123456n,
144
- * account: 'ACCOUNTADDRESS',
145
- * frozen: true,
146
- * lease: 'lease',
147
- * note: 'note',
148
- * // You wouldn't normally set this field
149
- * firstValidRound: 1000n,
150
- * validityWindow: 10,
151
- * extraFee: (1000).microAlgo(),
152
- * staticFee: (1000).microAlgo(),
153
- * // Max fee doesn't make sense with extraFee AND staticFee
154
- * // already specified, but here for completeness
155
- * maxFee: (3000).microAlgo(),
156
- * })
157
- * ```
158
- * @returns The asset freeze transaction
159
- */
160
- assetFreeze: (params: import("./composer").AssetFreezeParams) => Promise<Transaction>;
161
- /** Create an Algorand Standard Asset destroy transaction.
162
- *
163
- * Created assets can be destroyed only by the asset manager account.
164
- * All of the assets must be owned by the creator of the asset before
165
- * the asset can be deleted.
166
- *
167
- * @param params The parameters for the asset destroy transaction
168
- *
169
- * @example Basic example
170
- * ```typescript
171
- * await algorand.createTransaction.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
172
- * ```
173
- * @example Advanced example
174
- * ```typescript
175
- * await algorand.createTransaction.assetDestroy({
176
- * sender: 'MANAGERADDRESS',
177
- * assetId: 123456n,
178
- * lease: 'lease',
179
- * note: 'note',
180
- * // You wouldn't normally set this field
181
- * firstValidRound: 1000n,
182
- * validityWindow: 10,
183
- * extraFee: (1000).microAlgo(),
184
- * staticFee: (1000).microAlgo(),
185
- * // Max fee doesn't make sense with extraFee AND staticFee
186
- * // already specified, but here for completeness
187
- * maxFee: (3000).microAlgo(),
188
- * })
189
- * ```
190
- * @returns The asset destroy transaction
191
- */
192
- assetDestroy: (params: import("./composer").AssetDestroyParams) => Promise<Transaction>;
193
- /** Create an Algorand Standard Asset transfer transaction.
194
- *
195
- * @param params The parameters for the asset transfer transaction
196
- *
197
- * @example Basic example
198
- * ```typescript
199
- * await algorand.createTransaction.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
200
- * ```
201
- * @example Advanced example (with clawback)
202
- * ```typescript
203
- * await algorand.createTransaction.assetTransfer({
204
- * sender: 'CLAWBACKADDRESS',
205
- * assetId: 123456n,
206
- * amount: 1n,
207
- * receiver: 'RECEIVERADDRESS',
208
- * clawbackTarget: 'HOLDERADDRESS',
209
- * // This field needs to be used with caution
210
- * closeAssetTo: 'ADDRESSTOCLOSETO'
211
- * lease: 'lease',
212
- * note: 'note',
213
- * // You wouldn't normally set this field
214
- * firstValidRound: 1000n,
215
- * validityWindow: 10,
216
- * extraFee: (1000).microAlgo(),
217
- * staticFee: (1000).microAlgo(),
218
- * // Max fee doesn't make sense with extraFee AND staticFee
219
- * // already specified, but here for completeness
220
- * maxFee: (3000).microAlgo(),
221
- * })
222
- * ```
223
- * @returns The result of the asset transfer transaction
224
- */
225
- assetTransfer: (params: import("./composer").AssetTransferParams) => Promise<Transaction>;
226
- /** Create an Algorand Standard Asset opt-in transaction.
227
- *
228
- * @param params The parameters for the asset opt-in transaction
229
- *
230
- * @example Basic example
231
- * ```typescript
232
- * await algorand.createTransaction.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
233
- * ```
234
- * @example Advanced example
235
- * ```typescript
236
- * await algorand.createTransaction.assetOptIn({
237
- * sender: 'SENDERADDRESS',
238
- * assetId: 123456n,
239
- * lease: 'lease',
240
- * note: 'note',
241
- * // You wouldn't normally set this field
242
- * firstValidRound: 1000n,
243
- * validityWindow: 10,
244
- * extraFee: (1000).microAlgo(),
245
- * staticFee: (1000).microAlgo(),
246
- * // Max fee doesn't make sense with extraFee AND staticFee
247
- * // already specified, but here for completeness
248
- * maxFee: (3000).microAlgo(),
249
- * })
250
- * ```
251
- * @returns The asset opt-in transaction
252
- */
253
- assetOptIn: (params: import("./composer").AssetOptInParams) => Promise<Transaction>;
254
- /** Create an asset opt-out transaction.
255
- *
256
- * *Note:* If the account has a balance of the asset,
257
- * it will lose those assets
258
- *
259
- * @param params The parameters for the asset opt-out transaction
260
- *
261
- * @example Basic example (without creator, will be retrieved from algod)
262
- * ```typescript
263
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
264
- * ```
265
- * @example Basic example (with creator)
266
- * ```typescript
267
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
268
- * ```
269
- * @example Advanced example
270
- * ```typescript
271
- * await algorand.createTransaction.assetOptOut({
272
- * sender: 'SENDERADDRESS',
273
- * assetId: 123456n,
274
- * creator: 'CREATORADDRESS',
275
- * ensureZeroBalance: true,
276
- * lease: 'lease',
277
- * note: 'note',
278
- * // You wouldn't normally set this field
279
- * firstValidRound: 1000n,
280
- * validityWindow: 10,
281
- * extraFee: (1000).microAlgo(),
282
- * staticFee: (1000).microAlgo(),
283
- * // Max fee doesn't make sense with extraFee AND staticFee
284
- * // already specified, but here for completeness
285
- * maxFee: (3000).microAlgo(),
286
- * })
287
- * ```
288
- * @returns The asset opt-out transaction
289
- */
290
- assetOptOut: (params: import("./composer").AssetOptOutParams) => Promise<Transaction>;
291
- /** Create an application create transaction.
292
- *
293
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
294
- *
295
- * @param params The parameters for the app creation transaction
296
- * @example Basic example
297
- * ```typescript
298
- * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
299
- * ```
300
- * @example Advanced example
301
- * ```typescript
302
- * await algorand.createTransaction.appCreate({
303
- * sender: 'CREATORADDRESS',
304
- * approvalProgram: "TEALCODE",
305
- * clearStateProgram: "TEALCODE",
306
- * schema: {
307
- * globalInts: 1,
308
- * globalByteSlices: 2,
309
- * localInts: 3,
310
- * localByteSlices: 4
311
- * },
312
- * extraProgramPages: 1,
313
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
314
- * args: [new Uint8Array(1, 2, 3, 4)]
315
- * accountReferences: ["ACCOUNT_1"]
316
- * appReferences: [123n, 1234n]
317
- * assetReferences: [12345n]
318
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
319
- * accessReferences: [{ appId: 1234n }]
320
- * lease: 'lease',
321
- * note: 'note',
322
- * // You wouldn't normally set this field
323
- * firstValidRound: 1000n,
324
- * validityWindow: 10,
325
- * extraFee: (1000).microAlgo(),
326
- * staticFee: (1000).microAlgo(),
327
- * // Max fee doesn't make sense with extraFee AND staticFee
328
- * // already specified, but here for completeness
329
- * maxFee: (3000).microAlgo(),
330
- *})
331
- * ```
332
- * @returns The application create transaction
333
- */
334
- appCreate: (params: {
335
- sender: string | algosdk.Address;
336
- maxFee?: import("./amount").AlgoAmount | undefined;
337
- note?: string | Uint8Array | undefined;
338
- args?: Uint8Array[] | undefined;
339
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
340
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
341
- lease?: string | Uint8Array | undefined;
342
- rekeyTo?: string | algosdk.Address | undefined;
343
- staticFee?: import("./amount").AlgoAmount | undefined;
344
- extraFee?: import("./amount").AlgoAmount | undefined;
345
- validityWindow?: number | bigint | undefined;
346
- firstValidRound?: bigint | undefined;
347
- lastValidRound?: bigint | undefined;
348
- accountReferences?: (string | algosdk.Address)[] | undefined;
349
- appReferences?: bigint[] | undefined;
350
- assetReferences?: bigint[] | undefined;
351
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
352
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
353
- approvalProgram: string | Uint8Array;
354
- clearStateProgram: string | Uint8Array;
355
- schema?: {
356
- globalInts: number;
357
- globalByteSlices: number;
358
- localInts: number;
359
- localByteSlices: number;
360
- } | undefined;
361
- extraProgramPages?: number | undefined;
362
- }) => Promise<Transaction>;
363
- /** Create an application update transaction.
364
- *
365
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
366
- *
367
- * @param params The parameters for the app update transaction
368
- * @example Basic example
369
- * ```typescript
370
- * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
371
- * ```
372
- * @example Advanced example
373
- * ```typescript
374
- * await algorand.createTransaction.appUpdate({
375
- * sender: 'CREATORADDRESS',
376
- * approvalProgram: "TEALCODE",
377
- * clearStateProgram: "TEALCODE",
378
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
379
- * args: [new Uint8Array(1, 2, 3, 4)]
380
- * accountReferences: ["ACCOUNT_1"]
381
- * appReferences: [123n, 1234n]
382
- * assetReferences: [12345n]
383
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
384
- * accessReferences: [{ appId: 1234n }]
385
- * lease: 'lease',
386
- * note: 'note',
387
- * // You wouldn't normally set this field
388
- * firstValidRound: 1000n,
389
- * validityWindow: 10,
390
- * extraFee: (1000).microAlgo(),
391
- * staticFee: (1000).microAlgo(),
392
- * // Max fee doesn't make sense with extraFee AND staticFee
393
- * // already specified, but here for completeness
394
- * maxFee: (3000).microAlgo(),
395
- *})
396
- * ```
397
- * @returns The application update transaction
398
- */
399
- appUpdate: (params: {
400
- sender: string | algosdk.Address;
401
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
402
- rekeyTo?: string | algosdk.Address | undefined;
403
- note?: string | Uint8Array | undefined;
404
- lease?: string | Uint8Array | undefined;
405
- staticFee?: import("./amount").AlgoAmount | undefined;
406
- extraFee?: import("./amount").AlgoAmount | undefined;
407
- maxFee?: import("./amount").AlgoAmount | undefined;
408
- validityWindow?: number | bigint | undefined;
409
- firstValidRound?: bigint | undefined;
410
- lastValidRound?: bigint | undefined;
411
- appId: bigint;
412
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
413
- args?: Uint8Array[] | undefined;
414
- accountReferences?: (string | algosdk.Address)[] | undefined;
415
- appReferences?: bigint[] | undefined;
416
- assetReferences?: bigint[] | undefined;
417
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
418
- accessReferences?: import("./app-manager").ResourceReference[] | 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.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
430
- * ```
431
- * @example Advanced example
432
- * ```typescript
433
- * await algorand.createTransaction.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
- * accessReferences: [{ appId: 1234n }]
442
- * lease: 'lease',
443
- * note: 'note',
444
- * // You wouldn't normally set this field
445
- * firstValidRound: 1000n,
446
- * validityWindow: 10,
447
- * extraFee: (1000).microAlgo(),
448
- * staticFee: (1000).microAlgo(),
449
- * // Max fee doesn't make sense with extraFee AND staticFee
450
- * // already specified, but here for completeness
451
- * maxFee: (3000).microAlgo(),
452
- *})
453
- * ```
454
- * @returns The application delete transaction
455
- */
456
- appDelete: (params: import("./composer").AppDeleteParams) => Promise<Transaction>;
457
- /** Create an application call transaction.
458
- *
459
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
460
- *
461
- * @param params The parameters for the app call transaction
462
- * @example Basic example
463
- * ```typescript
464
- * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
465
- * ```
466
- * @example Advanced example
467
- * ```typescript
468
- * await algorand.createTransaction.appCall({
469
- * sender: 'CREATORADDRESS',
470
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
471
- * args: [new Uint8Array(1, 2, 3, 4)]
472
- * accountReferences: ["ACCOUNT_1"]
473
- * appReferences: [123n, 1234n]
474
- * assetReferences: [12345n]
475
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
476
- * accessReferences: [{ appId: 1234n }]
477
- * lease: 'lease',
478
- * note: 'note',
479
- * // You wouldn't normally set this field
480
- * firstValidRound: 1000n,
481
- * validityWindow: 10,
482
- * extraFee: (1000).microAlgo(),
483
- * staticFee: (1000).microAlgo(),
484
- * // Max fee doesn't make sense with extraFee AND staticFee
485
- * // already specified, but here for completeness
486
- * maxFee: (3000).microAlgo(),
487
- *})
488
- * ```
489
- * @returns The application call transaction
490
- */
491
- appCall: (params: import("./composer").AppCallParams) => Promise<Transaction>;
492
- /** Create an application create call with ABI method call transaction.
493
- *
494
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
495
- *
496
- * @param params The parameters for the app creation transaction
497
- * @example Basic example
498
- * ```typescript
499
- * const method = new ABIMethod({
500
- * name: 'method',
501
- * args: [{ name: 'arg1', type: 'string' }],
502
- * returns: { type: 'string' },
503
- * })
504
- * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
505
- * ```
506
- * @example Advanced example
507
- * ```typescript
508
- * const method = new ABIMethod({
509
- * name: 'method',
510
- * args: [{ name: 'arg1', type: 'string' }],
511
- * returns: { type: 'string' },
512
- * })
513
- * await algorand.createTransaction.appCreateMethodCall({
514
- * sender: 'CREATORADDRESS',
515
- * method: method,
516
- * args: ["arg1_value"],
517
- * approvalProgram: "TEALCODE",
518
- * clearStateProgram: "TEALCODE",
519
- * schema: {
520
- * globalInts: 1,
521
- * globalByteSlices: 2,
522
- * localInts: 3,
523
- * localByteSlices: 4
524
- * },
525
- * extraProgramPages: 1,
526
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
527
- * args: [new Uint8Array(1, 2, 3, 4)]
528
- * accountReferences: ["ACCOUNT_1"]
529
- * appReferences: [123n, 1234n]
530
- * assetReferences: [12345n]
531
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
532
- * accessReferences: [{ appId: 1234n }]
533
- * lease: 'lease',
534
- * note: 'note',
535
- * // You wouldn't normally set this field
536
- * firstValidRound: 1000n,
537
- * validityWindow: 10,
538
- * extraFee: (1000).microAlgo(),
539
- * staticFee: (1000).microAlgo(),
540
- * // Max fee doesn't make sense with extraFee AND staticFee
541
- * // already specified, but here for completeness
542
- * maxFee: (3000).microAlgo(),
543
- *})
544
- * ```
545
- * @returns The application ABI method create transaction
546
- */
547
- appCreateMethodCall: (params: import("./composer").AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
548
- /** Create an application update call with ABI method call transaction.
549
- *
550
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
551
- *
552
- * @param params The parameters for the app update transaction
553
- * @example Basic example
554
- * ```typescript
555
- * const method = new ABIMethod({
556
- * name: 'method',
557
- * args: [{ name: 'arg1', type: 'string' }],
558
- * returns: { type: 'string' },
559
- * })
560
- * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
561
- * ```
562
- * @example Advanced example
563
- * ```typescript
564
- * const method = new ABIMethod({
565
- * name: 'method',
566
- * args: [{ name: 'arg1', type: 'string' }],
567
- * returns: { type: 'string' },
568
- * })
569
- * await algorand.createTransaction.appUpdateMethodCall({
570
- * sender: 'CREATORADDRESS',
571
- * method: method,
572
- * args: ["arg1_value"],
573
- * approvalProgram: "TEALCODE",
574
- * clearStateProgram: "TEALCODE",
575
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
576
- * args: [new Uint8Array(1, 2, 3, 4)]
577
- * accountReferences: ["ACCOUNT_1"]
578
- * appReferences: [123n, 1234n]
579
- * assetReferences: [12345n]
580
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
581
- * accessReferences: [{ appId: 1234n }]
582
- * lease: 'lease',
583
- * note: 'note',
584
- * // You wouldn't normally set this field
585
- * firstValidRound: 1000n,
586
- * validityWindow: 10,
587
- * extraFee: (1000).microAlgo(),
588
- * staticFee: (1000).microAlgo(),
589
- * // Max fee doesn't make sense with extraFee AND staticFee
590
- * // already specified, but here for completeness
591
- * maxFee: (3000).microAlgo(),
592
- *})
593
- * ```
594
- * @returns The application ABI method update transaction
595
- */
596
- appUpdateMethodCall: (params: import("./composer").AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
597
- /** Create an application delete call with ABI method call transaction.
598
- *
599
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
600
- *
601
- * @param params The parameters for the app deletion transaction
602
- * @example Basic example
603
- * ```typescript
604
- * const method = new ABIMethod({
605
- * name: 'method',
606
- * args: [{ name: 'arg1', type: 'string' }],
607
- * returns: { type: 'string' },
608
- * })
609
- * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
610
- * ```
611
- * @example Advanced example
612
- * ```typescript
613
- * const method = new ABIMethod({
614
- * name: 'method',
615
- * args: [{ name: 'arg1', type: 'string' }],
616
- * returns: { type: 'string' },
617
- * })
618
- * await algorand.createTransaction.appDeleteMethodCall({
619
- * sender: 'CREATORADDRESS',
620
- * method: method,
621
- * args: ["arg1_value"],
622
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
623
- * args: [new Uint8Array(1, 2, 3, 4)]
624
- * accountReferences: ["ACCOUNT_1"]
625
- * appReferences: [123n, 1234n]
626
- * assetReferences: [12345n]
627
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
628
- * accessReferences: [{ appId: 1234n }]
629
- * lease: 'lease',
630
- * note: 'note',
631
- * // You wouldn't normally set this field
632
- * firstValidRound: 1000n,
633
- * validityWindow: 10,
634
- * extraFee: (1000).microAlgo(),
635
- * staticFee: (1000).microAlgo(),
636
- * // Max fee doesn't make sense with extraFee AND staticFee
637
- * // already specified, but here for completeness
638
- * maxFee: (3000).microAlgo(),
639
- *})
640
- * ```
641
- * @returns The application ABI method delete transaction
642
- */
643
- appDeleteMethodCall: (params: import("./composer").AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
644
- /** Create an application call with ABI method call transaction.
645
- *
646
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
647
- *
648
- * @param params The parameters for the app call transaction
649
- * @example Basic example
650
- * ```typescript
651
- * const method = new ABIMethod({
652
- * name: 'method',
653
- * args: [{ name: 'arg1', type: 'string' }],
654
- * returns: { type: 'string' },
655
- * })
656
- * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
657
- * ```
658
- * @example Advanced example
659
- * ```typescript
660
- * const method = new ABIMethod({
661
- * name: 'method',
662
- * args: [{ name: 'arg1', type: 'string' }],
663
- * returns: { type: 'string' },
664
- * })
665
- * await algorand.createTransaction.appCallMethodCall({
666
- * sender: 'CREATORADDRESS',
667
- * method: method,
668
- * args: ["arg1_value"],
669
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
670
- * args: [new Uint8Array(1, 2, 3, 4)]
671
- * accountReferences: ["ACCOUNT_1"]
672
- * appReferences: [123n, 1234n]
673
- * assetReferences: [12345n]
674
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
675
- * accessReferences: [{ appId: 1234n }]
676
- * lease: 'lease',
677
- * note: 'note',
678
- * // You wouldn't normally set this field
679
- * firstValidRound: 1000n,
680
- * validityWindow: 10,
681
- * extraFee: (1000).microAlgo(),
682
- * staticFee: (1000).microAlgo(),
683
- * // Max fee doesn't make sense with extraFee AND staticFee
684
- * // already specified, but here for completeness
685
- * maxFee: (3000).microAlgo(),
686
- *})
687
- * ```
688
- * @returns The application ABI method call transaction
689
- */
690
- appCallMethodCall: (params: import("./composer").AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
691
- /**
692
- * Create an online key registration transaction.
693
- * @param params The parameters for the key registration transaction
694
- * @example Basic example
695
- * ```typescript
696
- * await algorand.createTransaction.onlineKeyRegistration({
697
- * sender: 'SENDERADDRESS',
698
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
699
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
700
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
701
- * voteFirst: 1n,
702
- * voteLast: 1000n,
703
- * voteKeyDilution: 1n,
704
- * })
705
- * ```
706
- * @example Advanced example
707
- * ```typescript
708
- * await algorand.createTransaction.onlineKeyRegistration({
709
- * sender: 'SENDERADDRESS',
710
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
711
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
712
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
713
- * voteFirst: 1n,
714
- * voteLast: 1000n,
715
- * voteKeyDilution: 1n,
716
- * lease: 'lease',
717
- * note: 'note',
718
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
719
- * rekeyTo: 'REKEYTOADDRESS',
720
- * // You wouldn't normally set this field
721
- * firstValidRound: 1000n,
722
- * validityWindow: 10,
723
- * extraFee: (1000).microAlgo(),
724
- * staticFee: (1000).microAlgo(),
725
- * // Max fee doesn't make sense with extraFee AND staticFee
726
- * // already specified, but here for completeness
727
- * maxFee: (3000).microAlgo(),
728
- * })
729
- * ```
730
- * @returns The online key registration transaction
731
- */
732
- onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
733
- /**
734
- * Create an offline key registration transaction.
735
- * @param params The parameters for the key registration transaction
736
- * @example Basic example
737
- * ```typescript
738
- * await algorand.createTransaction.offlineKeyRegistration({
739
- * sender: 'SENDERADDRESS',
740
- * })
741
- * ```
742
- * @example Advanced example
743
- * ```typescript
744
- * await algorand.createTransaction.offlineKeyRegistration({
745
- * sender: 'SENDERADDRESS',
746
- * lease: 'lease',
747
- * note: 'note',
748
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
749
- * rekeyTo: 'REKEYTOADDRESS',
750
- * // You wouldn't normally set this field
751
- * firstValidRound: 1000n,
752
- * validityWindow: 10,
753
- * extraFee: (1000).microAlgo(),
754
- * staticFee: (1000).microAlgo(),
755
- * // Max fee doesn't make sense with extraFee AND staticFee
756
- * // already specified, but here for completeness
757
- * maxFee: (3000).microAlgo(),
758
- * })
759
- * ```
760
- * @returns The offline key registration transaction
761
- */
762
- offlineKeyRegistration: (params: import("./composer").OfflineKeyRegistrationParams) => Promise<Transaction>;
10
+ declare class AlgorandClientTransactionCreator {
11
+ private _newGroup;
12
+ /**
13
+ * Creates a new `AlgorandClientTransactionCreator`
14
+ * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
15
+ * @example
16
+ * ```typescript
17
+ * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())
18
+ * ```
19
+ */
20
+ constructor(newGroup: () => TransactionComposer);
21
+ private _transaction;
22
+ private _transactions;
23
+ /**
24
+ * Create a payment transaction to transfer Algo between accounts.
25
+ * @param params The parameters for the payment transaction
26
+ * @example Basic example
27
+ * ```typescript
28
+ * await algorand.createTransaction.payment({
29
+ * sender: 'SENDERADDRESS',
30
+ * receiver: 'RECEIVERADDRESS',
31
+ * amount: (4).algo(),
32
+ * })
33
+ * ```
34
+ * @example Advanced example
35
+ * ```typescript
36
+ * await algorand.createTransaction.payment({
37
+ * amount: (4).algo(),
38
+ * receiver: 'RECEIVERADDRESS',
39
+ * sender: 'SENDERADDRESS',
40
+ * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
41
+ * lease: 'lease',
42
+ * note: 'note',
43
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
44
+ * rekeyTo: 'REKEYTOADDRESS',
45
+ * // You wouldn't normally set this field
46
+ * firstValidRound: 1000n,
47
+ * validityWindow: 10,
48
+ * extraFee: (1000).microAlgo(),
49
+ * staticFee: (1000).microAlgo(),
50
+ * // Max fee doesn't make sense with extraFee AND staticFee
51
+ * // already specified, but here for completeness
52
+ * maxFee: (3000).microAlgo(),
53
+ * })
54
+ * ```
55
+ * @returns The payment transaction
56
+ */
57
+ payment: (params: PaymentParams) => Promise<Transaction>;
58
+ /** Create a create Algorand Standard Asset transaction.
59
+ *
60
+ * The account that sends this transaction will automatically be
61
+ * opted in to the asset and will hold all units after creation.
62
+ *
63
+ * @param params The parameters for the asset creation transaction
64
+ *
65
+ * @example Basic example
66
+ * ```typescript
67
+ * await algorand.createTransaction.assetCreate({ sender: "CREATORADDRESS", total: 100n})
68
+ * ```
69
+ * @example Advanced example
70
+ * ```typescript
71
+ * await algorand.createTransaction.assetCreate({
72
+ * sender: 'CREATORADDRESS',
73
+ * total: 100n,
74
+ * decimals: 2,
75
+ * assetName: 'asset',
76
+ * unitName: 'unit',
77
+ * url: 'url',
78
+ * metadataHash: 'metadataHash',
79
+ * defaultFrozen: false,
80
+ * manager: 'MANAGERADDRESS',
81
+ * reserve: 'RESERVEADDRESS',
82
+ * freeze: 'FREEZEADDRESS',
83
+ * clawback: 'CLAWBACKADDRESS',
84
+ * lease: 'lease',
85
+ * note: 'note',
86
+ * // You wouldn't normally set this field
87
+ * firstValidRound: 1000n,
88
+ * validityWindow: 10,
89
+ * extraFee: (1000).microAlgo(),
90
+ * staticFee: (1000).microAlgo(),
91
+ * // Max fee doesn't make sense with extraFee AND staticFee
92
+ * // already specified, but here for completeness
93
+ * maxFee: (3000).microAlgo(),
94
+ * })
95
+ * ```
96
+ * @returns The asset create transaction
97
+ */
98
+ assetCreate: (params: AssetCreateParams) => Promise<Transaction>;
99
+ /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
100
+ *
101
+ * **Note:** The manager, reserve, freeze, and clawback addresses
102
+ * are immutably empty if they are not set. If manager is not set then
103
+ * all fields are immutable from that point forward.
104
+ *
105
+ * @param params The parameters for the asset config transaction
106
+ *
107
+ * @example Basic example
108
+ * ```typescript
109
+ * await algorand.createTransaction.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
110
+ * ```
111
+ * @example Advanced example
112
+ * ```typescript
113
+ * await algorand.createTransaction.assetConfig({
114
+ * sender: 'MANAGERADDRESS',
115
+ * assetId: 123456n,
116
+ * manager: 'MANAGERADDRESS',
117
+ * reserve: 'RESERVEADDRESS',
118
+ * freeze: 'FREEZEADDRESS',
119
+ * clawback: 'CLAWBACKADDRESS',
120
+ * lease: 'lease',
121
+ * note: 'note',
122
+ * // You wouldn't normally set this field
123
+ * firstValidRound: 1000n,
124
+ * validityWindow: 10,
125
+ * extraFee: (1000).microAlgo(),
126
+ * staticFee: (1000).microAlgo(),
127
+ * // Max fee doesn't make sense with extraFee AND staticFee
128
+ * // already specified, but here for completeness
129
+ * maxFee: (3000).microAlgo(),
130
+ * })
131
+ * ```
132
+ * @returns The asset config transaction
133
+ */
134
+ assetConfig: (params: AssetConfigParams) => Promise<Transaction>;
135
+ /** Create an Algorand Standard Asset freeze transaction.
136
+ *
137
+ * @param params The parameters for the asset freeze transaction
138
+ *
139
+ * @example Basic example
140
+ * ```typescript
141
+ * await algorand.createTransaction.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
142
+ * ```
143
+ * @example Advanced example
144
+ * ```typescript
145
+ * await algorand.createTransaction.assetFreeze({
146
+ * sender: 'MANAGERADDRESS',
147
+ * assetId: 123456n,
148
+ * account: 'ACCOUNTADDRESS',
149
+ * frozen: true,
150
+ * lease: 'lease',
151
+ * note: 'note',
152
+ * // You wouldn't normally set this field
153
+ * firstValidRound: 1000n,
154
+ * validityWindow: 10,
155
+ * extraFee: (1000).microAlgo(),
156
+ * staticFee: (1000).microAlgo(),
157
+ * // Max fee doesn't make sense with extraFee AND staticFee
158
+ * // already specified, but here for completeness
159
+ * maxFee: (3000).microAlgo(),
160
+ * })
161
+ * ```
162
+ * @returns The asset freeze transaction
163
+ */
164
+ assetFreeze: (params: AssetFreezeParams) => Promise<Transaction>;
165
+ /** Create an Algorand Standard Asset destroy transaction.
166
+ *
167
+ * Created assets can be destroyed only by the asset manager account.
168
+ * All of the assets must be owned by the creator of the asset before
169
+ * the asset can be deleted.
170
+ *
171
+ * @param params The parameters for the asset destroy transaction
172
+ *
173
+ * @example Basic example
174
+ * ```typescript
175
+ * await algorand.createTransaction.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
176
+ * ```
177
+ * @example Advanced example
178
+ * ```typescript
179
+ * await algorand.createTransaction.assetDestroy({
180
+ * sender: 'MANAGERADDRESS',
181
+ * assetId: 123456n,
182
+ * lease: 'lease',
183
+ * note: 'note',
184
+ * // You wouldn't normally set this field
185
+ * firstValidRound: 1000n,
186
+ * validityWindow: 10,
187
+ * extraFee: (1000).microAlgo(),
188
+ * staticFee: (1000).microAlgo(),
189
+ * // Max fee doesn't make sense with extraFee AND staticFee
190
+ * // already specified, but here for completeness
191
+ * maxFee: (3000).microAlgo(),
192
+ * })
193
+ * ```
194
+ * @returns The asset destroy transaction
195
+ */
196
+ assetDestroy: (params: AssetDestroyParams) => Promise<Transaction>;
197
+ /** Create an Algorand Standard Asset transfer transaction.
198
+ *
199
+ * @param params The parameters for the asset transfer transaction
200
+ *
201
+ * @example Basic example
202
+ * ```typescript
203
+ * await algorand.createTransaction.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
204
+ * ```
205
+ * @example Advanced example (with clawback)
206
+ * ```typescript
207
+ * await algorand.createTransaction.assetTransfer({
208
+ * sender: 'CLAWBACKADDRESS',
209
+ * assetId: 123456n,
210
+ * amount: 1n,
211
+ * receiver: 'RECEIVERADDRESS',
212
+ * clawbackTarget: 'HOLDERADDRESS',
213
+ * // This field needs to be used with caution
214
+ * closeAssetTo: 'ADDRESSTOCLOSETO'
215
+ * lease: 'lease',
216
+ * note: 'note',
217
+ * // You wouldn't normally set this field
218
+ * firstValidRound: 1000n,
219
+ * validityWindow: 10,
220
+ * extraFee: (1000).microAlgo(),
221
+ * staticFee: (1000).microAlgo(),
222
+ * // Max fee doesn't make sense with extraFee AND staticFee
223
+ * // already specified, but here for completeness
224
+ * maxFee: (3000).microAlgo(),
225
+ * })
226
+ * ```
227
+ * @returns The result of the asset transfer transaction
228
+ */
229
+ assetTransfer: (params: AssetTransferParams) => Promise<Transaction>;
230
+ /** Create an Algorand Standard Asset opt-in transaction.
231
+ *
232
+ * @param params The parameters for the asset opt-in transaction
233
+ *
234
+ * @example Basic example
235
+ * ```typescript
236
+ * await algorand.createTransaction.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
237
+ * ```
238
+ * @example Advanced example
239
+ * ```typescript
240
+ * await algorand.createTransaction.assetOptIn({
241
+ * sender: 'SENDERADDRESS',
242
+ * assetId: 123456n,
243
+ * lease: 'lease',
244
+ * note: 'note',
245
+ * // You wouldn't normally set this field
246
+ * firstValidRound: 1000n,
247
+ * validityWindow: 10,
248
+ * extraFee: (1000).microAlgo(),
249
+ * staticFee: (1000).microAlgo(),
250
+ * // Max fee doesn't make sense with extraFee AND staticFee
251
+ * // already specified, but here for completeness
252
+ * maxFee: (3000).microAlgo(),
253
+ * })
254
+ * ```
255
+ * @returns The asset opt-in transaction
256
+ */
257
+ assetOptIn: (params: AssetOptInParams) => Promise<Transaction>;
258
+ /** Create an asset opt-out transaction.
259
+ *
260
+ * *Note:* If the account has a balance of the asset,
261
+ * it will lose those assets
262
+ *
263
+ * @param params The parameters for the asset opt-out transaction
264
+ *
265
+ * @example Basic example (without creator, will be retrieved from algod)
266
+ * ```typescript
267
+ * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
268
+ * ```
269
+ * @example Basic example (with creator)
270
+ * ```typescript
271
+ * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
272
+ * ```
273
+ * @example Advanced example
274
+ * ```typescript
275
+ * await algorand.createTransaction.assetOptOut({
276
+ * sender: 'SENDERADDRESS',
277
+ * assetId: 123456n,
278
+ * creator: 'CREATORADDRESS',
279
+ * ensureZeroBalance: true,
280
+ * lease: 'lease',
281
+ * note: 'note',
282
+ * // You wouldn't normally set this field
283
+ * firstValidRound: 1000n,
284
+ * validityWindow: 10,
285
+ * extraFee: (1000).microAlgo(),
286
+ * staticFee: (1000).microAlgo(),
287
+ * // Max fee doesn't make sense with extraFee AND staticFee
288
+ * // already specified, but here for completeness
289
+ * maxFee: (3000).microAlgo(),
290
+ * })
291
+ * ```
292
+ * @returns The asset opt-out transaction
293
+ */
294
+ assetOptOut: (params: AssetOptOutParams) => Promise<Transaction>;
295
+ /** Create an application create transaction.
296
+ *
297
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
298
+ *
299
+ * @param params The parameters for the app creation transaction
300
+ * @example Basic example
301
+ * ```typescript
302
+ * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
303
+ * ```
304
+ * @example Advanced example
305
+ * ```typescript
306
+ * await algorand.createTransaction.appCreate({
307
+ * sender: 'CREATORADDRESS',
308
+ * approvalProgram: "TEALCODE",
309
+ * clearStateProgram: "TEALCODE",
310
+ * schema: {
311
+ * globalInts: 1,
312
+ * globalByteSlices: 2,
313
+ * localInts: 3,
314
+ * localByteSlices: 4
315
+ * },
316
+ * extraProgramPages: 1,
317
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
318
+ * args: [new Uint8Array(1, 2, 3, 4)]
319
+ * accountReferences: ["ACCOUNT_1"]
320
+ * appReferences: [123n, 1234n]
321
+ * assetReferences: [12345n]
322
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
323
+ * accessReferences: [{ appId: 1234n }]
324
+ * lease: 'lease',
325
+ * note: 'note',
326
+ * // You wouldn't normally set this field
327
+ * firstValidRound: 1000n,
328
+ * validityWindow: 10,
329
+ * extraFee: (1000).microAlgo(),
330
+ * staticFee: (1000).microAlgo(),
331
+ * // Max fee doesn't make sense with extraFee AND staticFee
332
+ * // already specified, but here for completeness
333
+ * maxFee: (3000).microAlgo(),
334
+ * rejectVersion: 1,
335
+ *})
336
+ * ```
337
+ * @returns The application create transaction
338
+ */
339
+ appCreate: (params: {
340
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
341
+ sender: string | algosdk.Address;
342
+ rekeyTo?: (string | algosdk.Address) | undefined;
343
+ note?: (Uint8Array | string) | undefined;
344
+ lease?: (Uint8Array | string) | undefined;
345
+ staticFee?: AlgoAmount | undefined;
346
+ extraFee?: AlgoAmount | undefined;
347
+ maxFee?: AlgoAmount | undefined;
348
+ validityWindow?: number | bigint | undefined;
349
+ firstValidRound?: bigint | undefined;
350
+ lastValidRound?: bigint | undefined;
351
+ onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
352
+ args?: Uint8Array[] | undefined;
353
+ accountReferences?: (string | algosdk.Address)[] | undefined;
354
+ appReferences?: bigint[] | undefined;
355
+ assetReferences?: bigint[] | undefined;
356
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
357
+ accessReferences?: ResourceReference[] | undefined;
358
+ rejectVersion?: number | undefined;
359
+ approvalProgram: string | Uint8Array;
360
+ clearStateProgram: string | Uint8Array;
361
+ schema?: {
362
+ globalInts: number;
363
+ globalByteSlices: number;
364
+ localInts: number;
365
+ localByteSlices: number;
366
+ } | undefined;
367
+ extraProgramPages?: number | undefined;
368
+ }) => Promise<Transaction>;
369
+ /** Create an application update transaction.
370
+ *
371
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
372
+ *
373
+ * @param params The parameters for the app update transaction
374
+ * @example Basic example
375
+ * ```typescript
376
+ * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
377
+ * ```
378
+ * @example Advanced example
379
+ * ```typescript
380
+ * await algorand.createTransaction.appUpdate({
381
+ * sender: 'CREATORADDRESS',
382
+ * approvalProgram: "TEALCODE",
383
+ * clearStateProgram: "TEALCODE",
384
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
385
+ * args: [new Uint8Array(1, 2, 3, 4)]
386
+ * accountReferences: ["ACCOUNT_1"]
387
+ * appReferences: [123n, 1234n]
388
+ * assetReferences: [12345n]
389
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
390
+ * accessReferences: [{ appId: 1234n }]
391
+ * lease: 'lease',
392
+ * note: 'note',
393
+ * // You wouldn't normally set this field
394
+ * firstValidRound: 1000n,
395
+ * validityWindow: 10,
396
+ * extraFee: (1000).microAlgo(),
397
+ * staticFee: (1000).microAlgo(),
398
+ * // Max fee doesn't make sense with extraFee AND staticFee
399
+ * // already specified, but here for completeness
400
+ * maxFee: (3000).microAlgo(),
401
+ * rejectVersion: 1,
402
+ *})
403
+ * ```
404
+ * @returns The application update transaction
405
+ */
406
+ appUpdate: (params: {
407
+ sender: string | algosdk.Address;
408
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
409
+ rekeyTo?: (string | algosdk.Address) | undefined;
410
+ note?: (Uint8Array | string) | undefined;
411
+ lease?: (Uint8Array | string) | undefined;
412
+ staticFee?: AlgoAmount | undefined;
413
+ extraFee?: AlgoAmount | undefined;
414
+ maxFee?: AlgoAmount | undefined;
415
+ validityWindow?: number | bigint | undefined;
416
+ firstValidRound?: bigint | undefined;
417
+ lastValidRound?: bigint | undefined;
418
+ appId: bigint;
419
+ onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
420
+ args?: Uint8Array[] | undefined;
421
+ accountReferences?: (string | algosdk.Address)[] | undefined;
422
+ appReferences?: bigint[] | undefined;
423
+ assetReferences?: bigint[] | undefined;
424
+ boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
425
+ accessReferences?: ResourceReference[] | undefined;
426
+ rejectVersion?: number | undefined;
427
+ approvalProgram: string | Uint8Array;
428
+ clearStateProgram: string | Uint8Array;
429
+ }) => Promise<Transaction>;
430
+ /** Create an application delete transaction.
431
+ *
432
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
433
+ *
434
+ * @param params The parameters for the app deletion transaction
435
+ * @example Basic example
436
+ * ```typescript
437
+ * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
438
+ * ```
439
+ * @example Advanced example
440
+ * ```typescript
441
+ * await algorand.createTransaction.appDelete({
442
+ * sender: 'CREATORADDRESS',
443
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
444
+ * args: [new Uint8Array(1, 2, 3, 4)]
445
+ * accountReferences: ["ACCOUNT_1"]
446
+ * appReferences: [123n, 1234n]
447
+ * assetReferences: [12345n]
448
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
449
+ * accessReferences: [{ appId: 1234n }]
450
+ * lease: 'lease',
451
+ * note: 'note',
452
+ * // You wouldn't normally set this field
453
+ * firstValidRound: 1000n,
454
+ * validityWindow: 10,
455
+ * extraFee: (1000).microAlgo(),
456
+ * staticFee: (1000).microAlgo(),
457
+ * // Max fee doesn't make sense with extraFee AND staticFee
458
+ * // already specified, but here for completeness
459
+ * maxFee: (3000).microAlgo(),
460
+ * rejectVersion: 1,
461
+ *})
462
+ * ```
463
+ * @returns The application delete transaction
464
+ */
465
+ appDelete: (params: AppDeleteParams) => Promise<Transaction>;
466
+ /** Create an application call transaction.
467
+ *
468
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
469
+ *
470
+ * @param params The parameters for the app call transaction
471
+ * @example Basic example
472
+ * ```typescript
473
+ * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
474
+ * ```
475
+ * @example Advanced example
476
+ * ```typescript
477
+ * await algorand.createTransaction.appCall({
478
+ * sender: 'CREATORADDRESS',
479
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
480
+ * args: [new Uint8Array(1, 2, 3, 4)]
481
+ * accountReferences: ["ACCOUNT_1"]
482
+ * appReferences: [123n, 1234n]
483
+ * assetReferences: [12345n]
484
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
485
+ * accessReferences: [{ appId: 1234n }]
486
+ * lease: 'lease',
487
+ * note: 'note',
488
+ * // You wouldn't normally set this field
489
+ * firstValidRound: 1000n,
490
+ * validityWindow: 10,
491
+ * extraFee: (1000).microAlgo(),
492
+ * staticFee: (1000).microAlgo(),
493
+ * // Max fee doesn't make sense with extraFee AND staticFee
494
+ * // already specified, but here for completeness
495
+ * maxFee: (3000).microAlgo(),
496
+ * rejectVersion: 1,
497
+ *})
498
+ * ```
499
+ * @returns The application call transaction
500
+ */
501
+ appCall: (params: AppCallParams) => Promise<Transaction>;
502
+ /** Create an application create call with ABI method call transaction.
503
+ *
504
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
505
+ *
506
+ * @param params The parameters for the app creation transaction
507
+ * @example Basic example
508
+ * ```typescript
509
+ * const method = new ABIMethod({
510
+ * name: 'method',
511
+ * args: [{ name: 'arg1', type: 'string' }],
512
+ * returns: { type: 'string' },
513
+ * })
514
+ * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
515
+ * ```
516
+ * @example Advanced example
517
+ * ```typescript
518
+ * const method = new ABIMethod({
519
+ * name: 'method',
520
+ * args: [{ name: 'arg1', type: 'string' }],
521
+ * returns: { type: 'string' },
522
+ * })
523
+ * await algorand.createTransaction.appCreateMethodCall({
524
+ * sender: 'CREATORADDRESS',
525
+ * method: method,
526
+ * args: ["arg1_value"],
527
+ * approvalProgram: "TEALCODE",
528
+ * clearStateProgram: "TEALCODE",
529
+ * schema: {
530
+ * globalInts: 1,
531
+ * globalByteSlices: 2,
532
+ * localInts: 3,
533
+ * localByteSlices: 4
534
+ * },
535
+ * extraProgramPages: 1,
536
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
537
+ * args: [new Uint8Array(1, 2, 3, 4)]
538
+ * accountReferences: ["ACCOUNT_1"]
539
+ * appReferences: [123n, 1234n]
540
+ * assetReferences: [12345n]
541
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
542
+ * accessReferences: [{ appId: 1234n }]
543
+ * lease: 'lease',
544
+ * note: 'note',
545
+ * // You wouldn't normally set this field
546
+ * firstValidRound: 1000n,
547
+ * validityWindow: 10,
548
+ * extraFee: (1000).microAlgo(),
549
+ * staticFee: (1000).microAlgo(),
550
+ * // Max fee doesn't make sense with extraFee AND staticFee
551
+ * // already specified, but here for completeness
552
+ * maxFee: (3000).microAlgo(),
553
+ * rejectVersion: 1,
554
+ *})
555
+ * ```
556
+ * @returns The application ABI method create transaction
557
+ */
558
+ appCreateMethodCall: (params: AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
559
+ /** Create an application update call with ABI method call transaction.
560
+ *
561
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
562
+ *
563
+ * @param params The parameters for the app update transaction
564
+ * @example Basic example
565
+ * ```typescript
566
+ * const method = new ABIMethod({
567
+ * name: 'method',
568
+ * args: [{ name: 'arg1', type: 'string' }],
569
+ * returns: { type: 'string' },
570
+ * })
571
+ * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
572
+ * ```
573
+ * @example Advanced example
574
+ * ```typescript
575
+ * const method = new ABIMethod({
576
+ * name: 'method',
577
+ * args: [{ name: 'arg1', type: 'string' }],
578
+ * returns: { type: 'string' },
579
+ * })
580
+ * await algorand.createTransaction.appUpdateMethodCall({
581
+ * sender: 'CREATORADDRESS',
582
+ * method: method,
583
+ * args: ["arg1_value"],
584
+ * approvalProgram: "TEALCODE",
585
+ * clearStateProgram: "TEALCODE",
586
+ * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
587
+ * args: [new Uint8Array(1, 2, 3, 4)]
588
+ * accountReferences: ["ACCOUNT_1"]
589
+ * appReferences: [123n, 1234n]
590
+ * assetReferences: [12345n]
591
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
592
+ * accessReferences: [{ appId: 1234n }]
593
+ * lease: 'lease',
594
+ * note: 'note',
595
+ * // You wouldn't normally set this field
596
+ * firstValidRound: 1000n,
597
+ * validityWindow: 10,
598
+ * extraFee: (1000).microAlgo(),
599
+ * staticFee: (1000).microAlgo(),
600
+ * // Max fee doesn't make sense with extraFee AND staticFee
601
+ * // already specified, but here for completeness
602
+ * maxFee: (3000).microAlgo(),
603
+ * rejectVersion: 1,
604
+ *})
605
+ * ```
606
+ * @returns The application ABI method update transaction
607
+ */
608
+ appUpdateMethodCall: (params: AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
609
+ /** Create an application delete call with ABI method call transaction.
610
+ *
611
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
612
+ *
613
+ * @param params The parameters for the app deletion transaction
614
+ * @example Basic example
615
+ * ```typescript
616
+ * const method = new ABIMethod({
617
+ * name: 'method',
618
+ * args: [{ name: 'arg1', type: 'string' }],
619
+ * returns: { type: 'string' },
620
+ * })
621
+ * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
622
+ * ```
623
+ * @example Advanced example
624
+ * ```typescript
625
+ * const method = new ABIMethod({
626
+ * name: 'method',
627
+ * args: [{ name: 'arg1', type: 'string' }],
628
+ * returns: { type: 'string' },
629
+ * })
630
+ * await algorand.createTransaction.appDeleteMethodCall({
631
+ * sender: 'CREATORADDRESS',
632
+ * method: method,
633
+ * args: ["arg1_value"],
634
+ * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
635
+ * args: [new Uint8Array(1, 2, 3, 4)]
636
+ * accountReferences: ["ACCOUNT_1"]
637
+ * appReferences: [123n, 1234n]
638
+ * assetReferences: [12345n]
639
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
640
+ * accessReferences: [{ appId: 1234n }]
641
+ * lease: 'lease',
642
+ * note: 'note',
643
+ * // You wouldn't normally set this field
644
+ * firstValidRound: 1000n,
645
+ * validityWindow: 10,
646
+ * extraFee: (1000).microAlgo(),
647
+ * staticFee: (1000).microAlgo(),
648
+ * // Max fee doesn't make sense with extraFee AND staticFee
649
+ * // already specified, but here for completeness
650
+ * maxFee: (3000).microAlgo(),
651
+ * rejectVersion: 1,
652
+ *})
653
+ * ```
654
+ * @returns The application ABI method delete transaction
655
+ */
656
+ appDeleteMethodCall: (params: AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
657
+ /** Create an application call with ABI method call transaction.
658
+ *
659
+ * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
660
+ *
661
+ * @param params The parameters for the app call transaction
662
+ * @example Basic example
663
+ * ```typescript
664
+ * const method = new ABIMethod({
665
+ * name: 'method',
666
+ * args: [{ name: 'arg1', type: 'string' }],
667
+ * returns: { type: 'string' },
668
+ * })
669
+ * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
670
+ * ```
671
+ * @example Advanced example
672
+ * ```typescript
673
+ * const method = new ABIMethod({
674
+ * name: 'method',
675
+ * args: [{ name: 'arg1', type: 'string' }],
676
+ * returns: { type: 'string' },
677
+ * })
678
+ * await algorand.createTransaction.appCallMethodCall({
679
+ * sender: 'CREATORADDRESS',
680
+ * method: method,
681
+ * args: ["arg1_value"],
682
+ * onComplete: algosdk.OnApplicationComplete.OptInOC,
683
+ * args: [new Uint8Array(1, 2, 3, 4)]
684
+ * accountReferences: ["ACCOUNT_1"]
685
+ * appReferences: [123n, 1234n]
686
+ * assetReferences: [12345n]
687
+ * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
688
+ * accessReferences: [{ appId: 1234n }]
689
+ * lease: 'lease',
690
+ * note: 'note',
691
+ * // You wouldn't normally set this field
692
+ * firstValidRound: 1000n,
693
+ * validityWindow: 10,
694
+ * extraFee: (1000).microAlgo(),
695
+ * staticFee: (1000).microAlgo(),
696
+ * // Max fee doesn't make sense with extraFee AND staticFee
697
+ * // already specified, but here for completeness
698
+ * maxFee: (3000).microAlgo(),
699
+ * rejectVersion: 1,
700
+ *})
701
+ * ```
702
+ * @returns The application ABI method call transaction
703
+ */
704
+ appCallMethodCall: (params: AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
705
+ /**
706
+ * Create an online key registration transaction.
707
+ * @param params The parameters for the key registration transaction
708
+ * @example Basic example
709
+ * ```typescript
710
+ * await algorand.createTransaction.onlineKeyRegistration({
711
+ * sender: 'SENDERADDRESS',
712
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
713
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
714
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
715
+ * voteFirst: 1n,
716
+ * voteLast: 1000n,
717
+ * voteKeyDilution: 1n,
718
+ * })
719
+ * ```
720
+ * @example Advanced example
721
+ * ```typescript
722
+ * await algorand.createTransaction.onlineKeyRegistration({
723
+ * sender: 'SENDERADDRESS',
724
+ * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
725
+ * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
726
+ * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
727
+ * voteFirst: 1n,
728
+ * voteLast: 1000n,
729
+ * voteKeyDilution: 1n,
730
+ * lease: 'lease',
731
+ * note: 'note',
732
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
733
+ * rekeyTo: 'REKEYTOADDRESS',
734
+ * // You wouldn't normally set this field
735
+ * firstValidRound: 1000n,
736
+ * validityWindow: 10,
737
+ * extraFee: (1000).microAlgo(),
738
+ * staticFee: (1000).microAlgo(),
739
+ * // Max fee doesn't make sense with extraFee AND staticFee
740
+ * // already specified, but here for completeness
741
+ * maxFee: (3000).microAlgo(),
742
+ * })
743
+ * ```
744
+ * @returns The online key registration transaction
745
+ */
746
+ onlineKeyRegistration: (params: OnlineKeyRegistrationParams) => Promise<Transaction>;
747
+ /**
748
+ * Create an offline key registration transaction.
749
+ * @param params The parameters for the key registration transaction
750
+ * @example Basic example
751
+ * ```typescript
752
+ * await algorand.createTransaction.offlineKeyRegistration({
753
+ * sender: 'SENDERADDRESS',
754
+ * })
755
+ * ```
756
+ * @example Advanced example
757
+ * ```typescript
758
+ * await algorand.createTransaction.offlineKeyRegistration({
759
+ * sender: 'SENDERADDRESS',
760
+ * lease: 'lease',
761
+ * note: 'note',
762
+ * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
763
+ * rekeyTo: 'REKEYTOADDRESS',
764
+ * // You wouldn't normally set this field
765
+ * firstValidRound: 1000n,
766
+ * validityWindow: 10,
767
+ * extraFee: (1000).microAlgo(),
768
+ * staticFee: (1000).microAlgo(),
769
+ * // Max fee doesn't make sense with extraFee AND staticFee
770
+ * // already specified, but here for completeness
771
+ * maxFee: (3000).microAlgo(),
772
+ * })
773
+ * ```
774
+ * @returns The offline key registration transaction
775
+ */
776
+ offlineKeyRegistration: (params: OfflineKeyRegistrationParams) => Promise<Transaction>;
763
777
  }
778
+ //#endregion
779
+ export { AlgorandClientTransactionCreator };
780
+ //# sourceMappingURL=algorand-client-transaction-creator.d.ts.map