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