@algorandfoundation/algokit-utils 10.0.0-alpha.31 → 10.0.0-alpha.32

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