@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-beta.2

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 -771
  175. package/types/algorand-client-transaction-creator.js +733 -732
  176. package/types/algorand-client-transaction-creator.js.map +1 -1
  177. package/types/algorand-client-transaction-creator.mjs +732 -730
  178. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  179. package/types/algorand-client-transaction-sender.d.ts +1090 -1360
  180. package/types/algorand-client-transaction-sender.js +930 -961
  181. package/types/algorand-client-transaction-sender.js.map +1 -1
  182. package/types/algorand-client-transaction-sender.mjs +927 -959
  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 -2009
  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 -932
  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 +304 -310
  215. package/types/app-manager.js +422 -475
  216. package/types/app-manager.js.map +1 -1
  217. package/types/app-manager.mjs +419 -473
  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 -1258
  248. package/types/composer.js +1436 -1498
  249. package/types/composer.js.map +1 -1
  250. package/types/composer.mjs +1430 -1493
  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,773 +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
- * rejectVersion: 1,
331
- *})
332
- * ```
333
- * @returns The application create transaction
334
- */
335
- appCreate: (params: {
336
- sender: string | algosdk.Address;
337
- maxFee?: import("./amount").AlgoAmount | undefined;
338
- note?: string | Uint8Array | undefined;
339
- args?: Uint8Array[] | undefined;
340
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
341
- onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
342
- rejectVersion?: number | undefined;
343
- lease?: string | Uint8Array | undefined;
344
- rekeyTo?: string | algosdk.Address | undefined;
345
- staticFee?: import("./amount").AlgoAmount | undefined;
346
- extraFee?: import("./amount").AlgoAmount | undefined;
347
- validityWindow?: number | bigint | undefined;
348
- firstValidRound?: bigint | undefined;
349
- lastValidRound?: bigint | undefined;
350
- accountReferences?: (string | algosdk.Address)[] | undefined;
351
- appReferences?: bigint[] | undefined;
352
- assetReferences?: bigint[] | undefined;
353
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
354
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
355
- approvalProgram: string | Uint8Array;
356
- clearStateProgram: string | Uint8Array;
357
- schema?: {
358
- globalInts: number;
359
- globalByteSlices: number;
360
- localInts: number;
361
- localByteSlices: number;
362
- } | undefined;
363
- extraProgramPages?: number | undefined;
364
- }) => Promise<Transaction>;
365
- /** Create an application update transaction.
366
- *
367
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
368
- *
369
- * @param params The parameters for the app update transaction
370
- * @example Basic example
371
- * ```typescript
372
- * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
373
- * ```
374
- * @example Advanced example
375
- * ```typescript
376
- * await algorand.createTransaction.appUpdate({
377
- * sender: 'CREATORADDRESS',
378
- * approvalProgram: "TEALCODE",
379
- * clearStateProgram: "TEALCODE",
380
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
381
- * args: [new Uint8Array(1, 2, 3, 4)]
382
- * accountReferences: ["ACCOUNT_1"]
383
- * appReferences: [123n, 1234n]
384
- * assetReferences: [12345n]
385
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
386
- * accessReferences: [{ appId: 1234n }]
387
- * lease: 'lease',
388
- * note: 'note',
389
- * // You wouldn't normally set this field
390
- * firstValidRound: 1000n,
391
- * validityWindow: 10,
392
- * extraFee: (1000).microAlgo(),
393
- * staticFee: (1000).microAlgo(),
394
- * // Max fee doesn't make sense with extraFee AND staticFee
395
- * // already specified, but here for completeness
396
- * maxFee: (3000).microAlgo(),
397
- * rejectVersion: 1,
398
- *})
399
- * ```
400
- * @returns The application update transaction
401
- */
402
- appUpdate: (params: {
403
- sender: string | algosdk.Address;
404
- signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
405
- rekeyTo?: string | algosdk.Address | undefined;
406
- note?: string | Uint8Array | undefined;
407
- lease?: string | Uint8Array | undefined;
408
- staticFee?: import("./amount").AlgoAmount | undefined;
409
- extraFee?: import("./amount").AlgoAmount | undefined;
410
- maxFee?: import("./amount").AlgoAmount | undefined;
411
- validityWindow?: number | bigint | undefined;
412
- firstValidRound?: bigint | undefined;
413
- lastValidRound?: bigint | undefined;
414
- appId: bigint;
415
- onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
416
- args?: Uint8Array[] | undefined;
417
- accountReferences?: (string | algosdk.Address)[] | undefined;
418
- appReferences?: bigint[] | undefined;
419
- assetReferences?: bigint[] | undefined;
420
- boxReferences?: (import("./app-manager").BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
421
- accessReferences?: import("./app-manager").ResourceReference[] | undefined;
422
- rejectVersion?: number | undefined;
423
- approvalProgram: string | Uint8Array;
424
- clearStateProgram: string | Uint8Array;
425
- }) => Promise<Transaction>;
426
- /** Create an application delete transaction.
427
- *
428
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
429
- *
430
- * @param params The parameters for the app deletion transaction
431
- * @example Basic example
432
- * ```typescript
433
- * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
434
- * ```
435
- * @example Advanced example
436
- * ```typescript
437
- * await algorand.createTransaction.appDelete({
438
- * sender: 'CREATORADDRESS',
439
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
440
- * args: [new Uint8Array(1, 2, 3, 4)]
441
- * accountReferences: ["ACCOUNT_1"]
442
- * appReferences: [123n, 1234n]
443
- * assetReferences: [12345n]
444
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
445
- * accessReferences: [{ appId: 1234n }]
446
- * lease: 'lease',
447
- * note: 'note',
448
- * // You wouldn't normally set this field
449
- * firstValidRound: 1000n,
450
- * validityWindow: 10,
451
- * extraFee: (1000).microAlgo(),
452
- * staticFee: (1000).microAlgo(),
453
- * // Max fee doesn't make sense with extraFee AND staticFee
454
- * // already specified, but here for completeness
455
- * maxFee: (3000).microAlgo(),
456
- * rejectVersion: 1,
457
- *})
458
- * ```
459
- * @returns The application delete transaction
460
- */
461
- appDelete: (params: import("./composer").AppDeleteParams) => Promise<Transaction>;
462
- /** Create an application call transaction.
463
- *
464
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
465
- *
466
- * @param params The parameters for the app call transaction
467
- * @example Basic example
468
- * ```typescript
469
- * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
470
- * ```
471
- * @example Advanced example
472
- * ```typescript
473
- * await algorand.createTransaction.appCall({
474
- * sender: 'CREATORADDRESS',
475
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
476
- * args: [new Uint8Array(1, 2, 3, 4)]
477
- * accountReferences: ["ACCOUNT_1"]
478
- * appReferences: [123n, 1234n]
479
- * assetReferences: [12345n]
480
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
481
- * accessReferences: [{ appId: 1234n }]
482
- * lease: 'lease',
483
- * note: 'note',
484
- * // You wouldn't normally set this field
485
- * firstValidRound: 1000n,
486
- * validityWindow: 10,
487
- * extraFee: (1000).microAlgo(),
488
- * staticFee: (1000).microAlgo(),
489
- * // Max fee doesn't make sense with extraFee AND staticFee
490
- * // already specified, but here for completeness
491
- * maxFee: (3000).microAlgo(),
492
- * rejectVersion: 1,
493
- *})
494
- * ```
495
- * @returns The application call transaction
496
- */
497
- appCall: (params: import("./composer").AppCallParams) => Promise<Transaction>;
498
- /** Create an application create call with ABI method call transaction.
499
- *
500
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
501
- *
502
- * @param params The parameters for the app creation transaction
503
- * @example Basic example
504
- * ```typescript
505
- * const method = new ABIMethod({
506
- * name: 'method',
507
- * args: [{ name: 'arg1', type: 'string' }],
508
- * returns: { type: 'string' },
509
- * })
510
- * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
511
- * ```
512
- * @example Advanced example
513
- * ```typescript
514
- * const method = new ABIMethod({
515
- * name: 'method',
516
- * args: [{ name: 'arg1', type: 'string' }],
517
- * returns: { type: 'string' },
518
- * })
519
- * await algorand.createTransaction.appCreateMethodCall({
520
- * sender: 'CREATORADDRESS',
521
- * method: method,
522
- * args: ["arg1_value"],
523
- * approvalProgram: "TEALCODE",
524
- * clearStateProgram: "TEALCODE",
525
- * schema: {
526
- * globalInts: 1,
527
- * globalByteSlices: 2,
528
- * localInts: 3,
529
- * localByteSlices: 4
530
- * },
531
- * extraProgramPages: 1,
532
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
533
- * args: [new Uint8Array(1, 2, 3, 4)]
534
- * accountReferences: ["ACCOUNT_1"]
535
- * appReferences: [123n, 1234n]
536
- * assetReferences: [12345n]
537
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
538
- * accessReferences: [{ appId: 1234n }]
539
- * lease: 'lease',
540
- * note: 'note',
541
- * // You wouldn't normally set this field
542
- * firstValidRound: 1000n,
543
- * validityWindow: 10,
544
- * extraFee: (1000).microAlgo(),
545
- * staticFee: (1000).microAlgo(),
546
- * // Max fee doesn't make sense with extraFee AND staticFee
547
- * // already specified, but here for completeness
548
- * maxFee: (3000).microAlgo(),
549
- * rejectVersion: 1,
550
- *})
551
- * ```
552
- * @returns The application ABI method create transaction
553
- */
554
- appCreateMethodCall: (params: import("./composer").AppCreateMethodCall) => Promise<Expand<BuiltTransactions>>;
555
- /** Create an application update call with ABI method call transaction.
556
- *
557
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
558
- *
559
- * @param params The parameters for the app update transaction
560
- * @example Basic example
561
- * ```typescript
562
- * const method = new ABIMethod({
563
- * name: 'method',
564
- * args: [{ name: 'arg1', type: 'string' }],
565
- * returns: { type: 'string' },
566
- * })
567
- * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
568
- * ```
569
- * @example Advanced example
570
- * ```typescript
571
- * const method = new ABIMethod({
572
- * name: 'method',
573
- * args: [{ name: 'arg1', type: 'string' }],
574
- * returns: { type: 'string' },
575
- * })
576
- * await algorand.createTransaction.appUpdateMethodCall({
577
- * sender: 'CREATORADDRESS',
578
- * method: method,
579
- * args: ["arg1_value"],
580
- * approvalProgram: "TEALCODE",
581
- * clearStateProgram: "TEALCODE",
582
- * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,
583
- * args: [new Uint8Array(1, 2, 3, 4)]
584
- * accountReferences: ["ACCOUNT_1"]
585
- * appReferences: [123n, 1234n]
586
- * assetReferences: [12345n]
587
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
588
- * accessReferences: [{ appId: 1234n }]
589
- * lease: 'lease',
590
- * note: 'note',
591
- * // You wouldn't normally set this field
592
- * firstValidRound: 1000n,
593
- * validityWindow: 10,
594
- * extraFee: (1000).microAlgo(),
595
- * staticFee: (1000).microAlgo(),
596
- * // Max fee doesn't make sense with extraFee AND staticFee
597
- * // already specified, but here for completeness
598
- * maxFee: (3000).microAlgo(),
599
- * rejectVersion: 1,
600
- *})
601
- * ```
602
- * @returns The application ABI method update transaction
603
- */
604
- appUpdateMethodCall: (params: import("./composer").AppUpdateMethodCall) => Promise<Expand<BuiltTransactions>>;
605
- /** Create an application delete call with ABI method call transaction.
606
- *
607
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
608
- *
609
- * @param params The parameters for the app deletion transaction
610
- * @example Basic example
611
- * ```typescript
612
- * const method = new ABIMethod({
613
- * name: 'method',
614
- * args: [{ name: 'arg1', type: 'string' }],
615
- * returns: { type: 'string' },
616
- * })
617
- * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
618
- * ```
619
- * @example Advanced 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.createTransaction.appDeleteMethodCall({
627
- * sender: 'CREATORADDRESS',
628
- * method: method,
629
- * args: ["arg1_value"],
630
- * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,
631
- * args: [new Uint8Array(1, 2, 3, 4)]
632
- * accountReferences: ["ACCOUNT_1"]
633
- * appReferences: [123n, 1234n]
634
- * assetReferences: [12345n]
635
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
636
- * accessReferences: [{ appId: 1234n }]
637
- * lease: 'lease',
638
- * note: 'note',
639
- * // You wouldn't normally set this field
640
- * firstValidRound: 1000n,
641
- * validityWindow: 10,
642
- * extraFee: (1000).microAlgo(),
643
- * staticFee: (1000).microAlgo(),
644
- * // Max fee doesn't make sense with extraFee AND staticFee
645
- * // already specified, but here for completeness
646
- * maxFee: (3000).microAlgo(),
647
- * rejectVersion: 1,
648
- *})
649
- * ```
650
- * @returns The application ABI method delete transaction
651
- */
652
- appDeleteMethodCall: (params: import("./composer").AppDeleteMethodCall) => Promise<Expand<BuiltTransactions>>;
653
- /** Create an application call with ABI method call transaction.
654
- *
655
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
656
- *
657
- * @param params The parameters for the app call transaction
658
- * @example Basic 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({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
666
- * ```
667
- * @example Advanced example
668
- * ```typescript
669
- * const method = new ABIMethod({
670
- * name: 'method',
671
- * args: [{ name: 'arg1', type: 'string' }],
672
- * returns: { type: 'string' },
673
- * })
674
- * await algorand.createTransaction.appCallMethodCall({
675
- * sender: 'CREATORADDRESS',
676
- * method: method,
677
- * args: ["arg1_value"],
678
- * onComplete: algosdk.OnApplicationComplete.OptInOC,
679
- * args: [new Uint8Array(1, 2, 3, 4)]
680
- * accountReferences: ["ACCOUNT_1"]
681
- * appReferences: [123n, 1234n]
682
- * assetReferences: [12345n]
683
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
684
- * accessReferences: [{ appId: 1234n }]
685
- * lease: 'lease',
686
- * note: 'note',
687
- * // You wouldn't normally set this field
688
- * firstValidRound: 1000n,
689
- * validityWindow: 10,
690
- * extraFee: (1000).microAlgo(),
691
- * staticFee: (1000).microAlgo(),
692
- * // Max fee doesn't make sense with extraFee AND staticFee
693
- * // already specified, but here for completeness
694
- * maxFee: (3000).microAlgo(),
695
- * rejectVersion: 1,
696
- *})
697
- * ```
698
- * @returns The application ABI method call transaction
699
- */
700
- appCallMethodCall: (params: import("./composer").AppCallMethodCall) => Promise<Expand<BuiltTransactions>>;
701
- /**
702
- * Create an online key registration transaction.
703
- * @param params The parameters for the key registration transaction
704
- * @example Basic example
705
- * ```typescript
706
- * await algorand.createTransaction.onlineKeyRegistration({
707
- * sender: 'SENDERADDRESS',
708
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
709
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
710
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
711
- * voteFirst: 1n,
712
- * voteLast: 1000n,
713
- * voteKeyDilution: 1n,
714
- * })
715
- * ```
716
- * @example Advanced example
717
- * ```typescript
718
- * await algorand.createTransaction.onlineKeyRegistration({
719
- * sender: 'SENDERADDRESS',
720
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
721
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
722
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
723
- * voteFirst: 1n,
724
- * voteLast: 1000n,
725
- * voteKeyDilution: 1n,
726
- * lease: 'lease',
727
- * note: 'note',
728
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
729
- * rekeyTo: 'REKEYTOADDRESS',
730
- * // You wouldn't normally set this field
731
- * firstValidRound: 1000n,
732
- * validityWindow: 10,
733
- * extraFee: (1000).microAlgo(),
734
- * staticFee: (1000).microAlgo(),
735
- * // Max fee doesn't make sense with extraFee AND staticFee
736
- * // already specified, but here for completeness
737
- * maxFee: (3000).microAlgo(),
738
- * })
739
- * ```
740
- * @returns The online key registration transaction
741
- */
742
- onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
743
- /**
744
- * Create an offline key registration transaction.
745
- * @param params The parameters for the key registration transaction
746
- * @example Basic example
747
- * ```typescript
748
- * await algorand.createTransaction.offlineKeyRegistration({
749
- * sender: 'SENDERADDRESS',
750
- * })
751
- * ```
752
- * @example Advanced example
753
- * ```typescript
754
- * await algorand.createTransaction.offlineKeyRegistration({
755
- * sender: 'SENDERADDRESS',
756
- * lease: 'lease',
757
- * note: 'note',
758
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
759
- * rekeyTo: 'REKEYTOADDRESS',
760
- * // You wouldn't normally set this field
761
- * firstValidRound: 1000n,
762
- * validityWindow: 10,
763
- * extraFee: (1000).microAlgo(),
764
- * staticFee: (1000).microAlgo(),
765
- * // Max fee doesn't make sense with extraFee AND staticFee
766
- * // already specified, but here for completeness
767
- * maxFee: (3000).microAlgo(),
768
- * })
769
- * ```
770
- * @returns The offline key registration transaction
771
- */
772
- 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
+ sender: string | algosdk.Address;
341
+ signer?: (algosdk.TransactionSigner | TransactionSignerAccount) | undefined;
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>;
773
777
  }
778
+ //#endregion
779
+ export { AlgorandClientTransactionCreator };
780
+ //# sourceMappingURL=algorand-client-transaction-creator.d.ts.map