@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,1103 +1,10 @@
1
- import { ReadableAddress } from "../packages/common/src/address.js";
2
- import { Expand } from "../packages/common/src/expand.js";
3
- import { ABIValue } from "../packages/abi/src/abi-value.js";
4
- import { ABIMethod } from "../packages/abi/src/abi-method.js";
5
- import { OnApplicationComplete, ResourceReference } from "../packages/transact/src/transactions/app-call.js";
6
- import { Transaction } from "../packages/transact/src/transactions/transaction.js";
7
- import { AddressWithTransactionSigner, SendingAddress, TransactionSigner } from "../packages/transact/src/signer.js";
8
- import { AlgoAmount } from "./amount.js";
9
- import { BoxIdentifier, BoxReference } from "./app-manager.js";
10
- import { AppCallParams, AppDeleteParams, AppMethodCallParams } from "../transactions/app-call.js";
11
- import { AssetOptInParams, AssetOptOutParams, AssetTransferParams } from "../transactions/asset-transfer.js";
12
- import { AssetConfigParams, AssetCreateParams, AssetDestroyParams, AssetFreezeParams } from "../transactions/asset-config.js";
13
- import { OfflineKeyRegistrationParams, OnlineKeyRegistrationParams } from "../transactions/key-registration.js";
14
- import { AppMethodCall } from "../transactions/method-call.js";
15
- import { PaymentParams } from "../transactions/payment.js";
16
- import { BuiltTransactions, TransactionComposer, TransactionComposerConfig } from "./composer.js";
17
- import { TransactionWithSigner } from "../transaction/transaction.js";
1
+ import { AlgorandClientTransactionCreator as AlgorandClientTransactionCreator$1 } from "../algorand-client-transaction-creator.js";
18
2
 
19
3
  //#region src/types/algorand-client-transaction-creator.d.ts
20
- /** Orchestrates creating transactions for `AlgorandClient`. */
21
- declare class AlgorandClientTransactionCreator {
22
- private _newGroup;
23
- /**
24
- * Creates a new `AlgorandClientTransactionCreator`
25
- * @param newGroup A lambda that starts a new `TransactionComposer` transaction group
26
- * @example
27
- * ```typescript
28
- * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())
29
- * ```
30
- */
31
- constructor(newGroup: (config?: TransactionComposerConfig) => TransactionComposer);
32
- private _transaction;
33
- private _transactions;
34
- /**
35
- * Create a payment transaction to transfer Algo between accounts.
36
- * @param params The parameters for the payment transaction
37
- * @example Basic example
38
- * ```typescript
39
- * await algorand.createTransaction.payment({
40
- * sender: 'SENDERADDRESS',
41
- * receiver: 'RECEIVERADDRESS',
42
- * amount: (4).algo(),
43
- * })
44
- * ```
45
- * @example Advanced example
46
- * ```typescript
47
- * await algorand.createTransaction.payment({
48
- * amount: (4).algo(),
49
- * receiver: 'RECEIVERADDRESS',
50
- * sender: 'SENDERADDRESS',
51
- * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',
52
- * lease: 'lease',
53
- * note: 'note',
54
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
55
- * rekeyTo: 'REKEYTOADDRESS',
56
- * // You wouldn't normally set this field
57
- * firstValidRound: 1000n,
58
- * validityWindow: 10,
59
- * extraFee: (1000).microAlgo(),
60
- * staticFee: (1000).microAlgo(),
61
- * // Max fee doesn't make sense with extraFee AND staticFee
62
- * // already specified, but here for completeness
63
- * maxFee: (3000).microAlgo(),
64
- * })
65
- * ```
66
- * @returns The payment transaction
67
- */
68
- payment: (params: PaymentParams) => Promise<Transaction>;
69
- /** Create a create Algorand Standard Asset transaction.
70
- *
71
- * The account that sends this transaction will automatically be
72
- * opted in to the asset and will hold all units after creation.
73
- *
74
- * @param params The parameters for the asset creation transaction
75
- *
76
- * @example Basic example
77
- * ```typescript
78
- * await algorand.createTransaction.assetCreate({ sender: "CREATORADDRESS", total: 100n})
79
- * ```
80
- * @example Advanced example
81
- * ```typescript
82
- * await algorand.createTransaction.assetCreate({
83
- * sender: 'CREATORADDRESS',
84
- * total: 100n,
85
- * decimals: 2,
86
- * assetName: 'asset',
87
- * unitName: 'unit',
88
- * url: 'url',
89
- * metadataHash: 'metadataHash',
90
- * defaultFrozen: false,
91
- * manager: 'MANAGERADDRESS',
92
- * reserve: 'RESERVEADDRESS',
93
- * freeze: 'FREEZEADDRESS',
94
- * clawback: 'CLAWBACKADDRESS',
95
- * lease: 'lease',
96
- * note: 'note',
97
- * // You wouldn't normally set this field
98
- * firstValidRound: 1000n,
99
- * validityWindow: 10,
100
- * extraFee: (1000).microAlgo(),
101
- * staticFee: (1000).microAlgo(),
102
- * // Max fee doesn't make sense with extraFee AND staticFee
103
- * // already specified, but here for completeness
104
- * maxFee: (3000).microAlgo(),
105
- * })
106
- * ```
107
- * @returns The asset create transaction
108
- */
109
- assetCreate: (params: AssetCreateParams) => Promise<Transaction>;
110
- /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.
111
- *
112
- * **Note:** The manager, reserve, freeze, and clawback addresses
113
- * are immutably empty if they are not set. If manager is not set then
114
- * all fields are immutable from that point forward.
115
- *
116
- * @param params The parameters for the asset config transaction
117
- *
118
- * @example Basic example
119
- * ```typescript
120
- * await algorand.createTransaction.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
121
- * ```
122
- * @example Advanced example
123
- * ```typescript
124
- * await algorand.createTransaction.assetConfig({
125
- * sender: 'MANAGERADDRESS',
126
- * assetId: 123456n,
127
- * manager: 'MANAGERADDRESS',
128
- * reserve: 'RESERVEADDRESS',
129
- * freeze: 'FREEZEADDRESS',
130
- * clawback: 'CLAWBACKADDRESS',
131
- * lease: 'lease',
132
- * note: 'note',
133
- * // You wouldn't normally set this field
134
- * firstValidRound: 1000n,
135
- * validityWindow: 10,
136
- * extraFee: (1000).microAlgo(),
137
- * staticFee: (1000).microAlgo(),
138
- * // Max fee doesn't make sense with extraFee AND staticFee
139
- * // already specified, but here for completeness
140
- * maxFee: (3000).microAlgo(),
141
- * })
142
- * ```
143
- * @returns The asset config transaction
144
- */
145
- assetConfig: (params: AssetConfigParams) => Promise<Transaction>;
146
- /** Create an Algorand Standard Asset freeze transaction.
147
- *
148
- * @param params The parameters for the asset freeze transaction
149
- *
150
- * @example Basic example
151
- * ```typescript
152
- * await algorand.createTransaction.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
153
- * ```
154
- * @example Advanced example
155
- * ```typescript
156
- * await algorand.createTransaction.assetFreeze({
157
- * sender: 'MANAGERADDRESS',
158
- * assetId: 123456n,
159
- * account: 'ACCOUNTADDRESS',
160
- * frozen: true,
161
- * lease: 'lease',
162
- * note: 'note',
163
- * // You wouldn't normally set this field
164
- * firstValidRound: 1000n,
165
- * validityWindow: 10,
166
- * extraFee: (1000).microAlgo(),
167
- * staticFee: (1000).microAlgo(),
168
- * // Max fee doesn't make sense with extraFee AND staticFee
169
- * // already specified, but here for completeness
170
- * maxFee: (3000).microAlgo(),
171
- * })
172
- * ```
173
- * @returns The asset freeze transaction
174
- */
175
- assetFreeze: (params: AssetFreezeParams) => Promise<Transaction>;
176
- /** Create an Algorand Standard Asset destroy transaction.
177
- *
178
- * Created assets can be destroyed only by the asset manager account.
179
- * All of the assets must be owned by the creator of the asset before
180
- * the asset can be deleted.
181
- *
182
- * @param params The parameters for the asset destroy transaction
183
- *
184
- * @example Basic example
185
- * ```typescript
186
- * await algorand.createTransaction.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
187
- * ```
188
- * @example Advanced example
189
- * ```typescript
190
- * await algorand.createTransaction.assetDestroy({
191
- * sender: 'MANAGERADDRESS',
192
- * assetId: 123456n,
193
- * lease: 'lease',
194
- * note: 'note',
195
- * // You wouldn't normally set this field
196
- * firstValidRound: 1000n,
197
- * validityWindow: 10,
198
- * extraFee: (1000).microAlgo(),
199
- * staticFee: (1000).microAlgo(),
200
- * // Max fee doesn't make sense with extraFee AND staticFee
201
- * // already specified, but here for completeness
202
- * maxFee: (3000).microAlgo(),
203
- * })
204
- * ```
205
- * @returns The asset destroy transaction
206
- */
207
- assetDestroy: (params: AssetDestroyParams) => Promise<Transaction>;
208
- /** Create an Algorand Standard Asset transfer transaction.
209
- *
210
- * @param params The parameters for the asset transfer transaction
211
- *
212
- * @example Basic example
213
- * ```typescript
214
- * await algorand.createTransaction.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
215
- * ```
216
- * @example Advanced example (with clawback)
217
- * ```typescript
218
- * await algorand.createTransaction.assetTransfer({
219
- * sender: 'CLAWBACKADDRESS',
220
- * assetId: 123456n,
221
- * amount: 1n,
222
- * receiver: 'RECEIVERADDRESS',
223
- * clawbackTarget: 'HOLDERADDRESS',
224
- * // This field needs to be used with caution
225
- * closeAssetTo: 'ADDRESSTOCLOSETO'
226
- * lease: 'lease',
227
- * note: 'note',
228
- * // You wouldn't normally set this field
229
- * firstValidRound: 1000n,
230
- * validityWindow: 10,
231
- * extraFee: (1000).microAlgo(),
232
- * staticFee: (1000).microAlgo(),
233
- * // Max fee doesn't make sense with extraFee AND staticFee
234
- * // already specified, but here for completeness
235
- * maxFee: (3000).microAlgo(),
236
- * })
237
- * ```
238
- * @returns The result of the asset transfer transaction
239
- */
240
- assetTransfer: (params: AssetTransferParams) => Promise<Transaction>;
241
- /** Create an Algorand Standard Asset opt-in transaction.
242
- *
243
- * @param params The parameters for the asset opt-in transaction
244
- *
245
- * @example Basic example
246
- * ```typescript
247
- * await algorand.createTransaction.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
248
- * ```
249
- * @example Advanced example
250
- * ```typescript
251
- * await algorand.createTransaction.assetOptIn({
252
- * sender: 'SENDERADDRESS',
253
- * assetId: 123456n,
254
- * lease: 'lease',
255
- * note: 'note',
256
- * // You wouldn't normally set this field
257
- * firstValidRound: 1000n,
258
- * validityWindow: 10,
259
- * extraFee: (1000).microAlgo(),
260
- * staticFee: (1000).microAlgo(),
261
- * // Max fee doesn't make sense with extraFee AND staticFee
262
- * // already specified, but here for completeness
263
- * maxFee: (3000).microAlgo(),
264
- * })
265
- * ```
266
- * @returns The asset opt-in transaction
267
- */
268
- assetOptIn: (params: AssetOptInParams) => Promise<Transaction>;
269
- /** Create an asset opt-out transaction.
270
- *
271
- * *Note:* If the account has a balance of the asset,
272
- * it will lose those assets
273
- *
274
- * @param params The parameters for the asset opt-out transaction
275
- *
276
- * @example Basic example (without creator, will be retrieved from algod)
277
- * ```typescript
278
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
279
- * ```
280
- * @example Basic example (with creator)
281
- * ```typescript
282
- * await algorand.createTransaction.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
283
- * ```
284
- * @example Advanced example
285
- * ```typescript
286
- * await algorand.createTransaction.assetOptOut({
287
- * sender: 'SENDERADDRESS',
288
- * assetId: 123456n,
289
- * creator: 'CREATORADDRESS',
290
- * ensureZeroBalance: true,
291
- * lease: 'lease',
292
- * note: 'note',
293
- * // You wouldn't normally set this field
294
- * firstValidRound: 1000n,
295
- * validityWindow: 10,
296
- * extraFee: (1000).microAlgo(),
297
- * staticFee: (1000).microAlgo(),
298
- * // Max fee doesn't make sense with extraFee AND staticFee
299
- * // already specified, but here for completeness
300
- * maxFee: (3000).microAlgo(),
301
- * })
302
- * ```
303
- * @returns The asset opt-out transaction
304
- */
305
- assetOptOut: (params: AssetOptOutParams) => Promise<Transaction>;
306
- /** Create an application create transaction.
307
- *
308
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
309
- *
310
- * @param params The parameters for the app creation transaction
311
- * @example Basic example
312
- * ```typescript
313
- * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
314
- * ```
315
- * @example Advanced example
316
- * ```typescript
317
- * await algorand.createTransaction.appCreate({
318
- * sender: 'CREATORADDRESS',
319
- * approvalProgram: "TEALCODE",
320
- * clearStateProgram: "TEALCODE",
321
- * schema: {
322
- * globalInts: 1,
323
- * globalByteSlices: 2,
324
- * localInts: 3,
325
- * localByteSlices: 4
326
- * },
327
- * extraProgramPages: 1,
328
- * onComplete: OnApplicationComplete.OptIn,
329
- * args: [new Uint8Array(1, 2, 3, 4)]
330
- * accountReferences: ["ACCOUNT_1"]
331
- * appReferences: [123n, 1234n]
332
- * assetReferences: [12345n]
333
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
334
- * accessReferences: [{ appId: 1234n }]
335
- * lease: 'lease',
336
- * note: 'note',
337
- * // You wouldn't normally set this field
338
- * firstValidRound: 1000n,
339
- * validityWindow: 10,
340
- * extraFee: (1000).microAlgo(),
341
- * staticFee: (1000).microAlgo(),
342
- * // Max fee doesn't make sense with extraFee AND staticFee
343
- * // already specified, but here for completeness
344
- * maxFee: (3000).microAlgo(),
345
- * rejectVersion: 1,
346
- *})
347
- * ```
348
- * @returns The application create transaction
349
- */
350
- appCreate: (params: {
351
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
352
- sender: SendingAddress;
353
- rekeyTo?: ReadableAddress | undefined;
354
- note?: string | Uint8Array | undefined;
355
- lease?: string | Uint8Array | undefined;
356
- staticFee?: AlgoAmount | undefined;
357
- extraFee?: AlgoAmount | undefined;
358
- maxFee?: AlgoAmount | undefined;
359
- validityWindow?: number | bigint | undefined;
360
- firstValidRound?: bigint | undefined;
361
- lastValidRound?: bigint | undefined;
362
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
363
- args?: Uint8Array[] | undefined;
364
- accountReferences?: ReadableAddress[] | undefined;
365
- appReferences?: bigint[] | undefined;
366
- assetReferences?: bigint[] | undefined;
367
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
368
- accessReferences?: ResourceReference[] | undefined;
369
- rejectVersion?: number | undefined;
370
- appId?: 0 | undefined;
371
- approvalProgram: string | Uint8Array;
372
- clearStateProgram: string | Uint8Array;
373
- schema?: {
374
- globalInts: number;
375
- globalByteSlices: number;
376
- localInts: number;
377
- localByteSlices: number;
378
- } | undefined;
379
- extraProgramPages?: number | undefined;
380
- }) => Promise<Transaction>;
381
- /** Create an application update transaction.
382
- *
383
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
384
- *
385
- * @param params The parameters for the app update transaction
386
- * @example Basic example
387
- * ```typescript
388
- * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
389
- * ```
390
- * @example Advanced example
391
- * ```typescript
392
- * await algorand.createTransaction.appUpdate({
393
- * sender: 'CREATORADDRESS',
394
- * approvalProgram: "TEALCODE",
395
- * clearStateProgram: "TEALCODE",
396
- * onComplete: OnApplicationComplete.UpdateApplication,
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 update transaction
417
- */
418
- appUpdate: (params: {
419
- sender: SendingAddress;
420
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
421
- rekeyTo?: ReadableAddress | undefined;
422
- note?: string | Uint8Array | undefined;
423
- lease?: string | Uint8Array | undefined;
424
- staticFee?: AlgoAmount | undefined;
425
- extraFee?: AlgoAmount | undefined;
426
- maxFee?: AlgoAmount | undefined;
427
- validityWindow?: number | bigint | undefined;
428
- firstValidRound?: bigint | undefined;
429
- lastValidRound?: bigint | undefined;
430
- appId: bigint;
431
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
432
- args?: Uint8Array[] | undefined;
433
- accountReferences?: ReadableAddress[] | undefined;
434
- appReferences?: bigint[] | undefined;
435
- assetReferences?: bigint[] | undefined;
436
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
437
- accessReferences?: ResourceReference[] | undefined;
438
- rejectVersion?: number | undefined;
439
- approvalProgram: string | Uint8Array;
440
- clearStateProgram: string | Uint8Array;
441
- }) => Promise<Transaction>;
442
- /** Create an application delete transaction.
443
- *
444
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
445
- *
446
- * @param params The parameters for the app deletion transaction
447
- * @example Basic example
448
- * ```typescript
449
- * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })
450
- * ```
451
- * @example Advanced example
452
- * ```typescript
453
- * await algorand.createTransaction.appDelete({
454
- * sender: 'CREATORADDRESS',
455
- * onComplete: OnApplicationComplete.DeleteApplication,
456
- * args: [new Uint8Array(1, 2, 3, 4)]
457
- * accountReferences: ["ACCOUNT_1"]
458
- * appReferences: [123n, 1234n]
459
- * assetReferences: [12345n]
460
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
461
- * accessReferences: [{ appId: 1234n }]
462
- * lease: 'lease',
463
- * note: 'note',
464
- * // You wouldn't normally set this field
465
- * firstValidRound: 1000n,
466
- * validityWindow: 10,
467
- * extraFee: (1000).microAlgo(),
468
- * staticFee: (1000).microAlgo(),
469
- * // Max fee doesn't make sense with extraFee AND staticFee
470
- * // already specified, but here for completeness
471
- * maxFee: (3000).microAlgo(),
472
- * rejectVersion: 1,
473
- *})
474
- * ```
475
- * @returns The application delete transaction
476
- */
477
- appDelete: (params: AppDeleteParams) => Promise<Transaction>;
478
- /** Create an application call transaction.
479
- *
480
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
481
- *
482
- * @param params The parameters for the app call transaction
483
- * @example Basic example
484
- * ```typescript
485
- * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })
486
- * ```
487
- * @example Advanced example
488
- * ```typescript
489
- * await algorand.createTransaction.appCall({
490
- * sender: 'CREATORADDRESS',
491
- * onComplete: OnApplicationComplete.OptIn,
492
- * args: [new Uint8Array(1, 2, 3, 4)]
493
- * accountReferences: ["ACCOUNT_1"]
494
- * appReferences: [123n, 1234n]
495
- * assetReferences: [12345n]
496
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
497
- * accessReferences: [{ appId: 1234n }]
498
- * lease: 'lease',
499
- * note: 'note',
500
- * // You wouldn't normally set this field
501
- * firstValidRound: 1000n,
502
- * validityWindow: 10,
503
- * extraFee: (1000).microAlgo(),
504
- * staticFee: (1000).microAlgo(),
505
- * // Max fee doesn't make sense with extraFee AND staticFee
506
- * // already specified, but here for completeness
507
- * maxFee: (3000).microAlgo(),
508
- * rejectVersion: 1,
509
- *})
510
- * ```
511
- * @returns The application call transaction
512
- */
513
- appCall: (params: AppCallParams) => Promise<Transaction>;
514
- /** Create an application create call with ABI method call transaction.
515
- *
516
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
517
- *
518
- * @param params The parameters for the app creation transaction
519
- * @example Basic example
520
- * ```typescript
521
- * const method = new ABIMethod({
522
- * name: 'method',
523
- * args: [{ name: 'arg1', type: 'string' }],
524
- * returns: { type: 'string' },
525
- * })
526
- * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
527
- * ```
528
- * @example Advanced example
529
- * ```typescript
530
- * const method = new ABIMethod({
531
- * name: 'method',
532
- * args: [{ name: 'arg1', type: 'string' }],
533
- * returns: { type: 'string' },
534
- * })
535
- * await algorand.createTransaction.appCreateMethodCall({
536
- * sender: 'CREATORADDRESS',
537
- * method: method,
538
- * args: ["arg1_value"],
539
- * approvalProgram: "TEALCODE",
540
- * clearStateProgram: "TEALCODE",
541
- * schema: {
542
- * globalInts: 1,
543
- * globalByteSlices: 2,
544
- * localInts: 3,
545
- * localByteSlices: 4
546
- * },
547
- * extraProgramPages: 1,
548
- * onComplete: OnApplicationComplete.OptIn,
549
- * args: [new Uint8Array(1, 2, 3, 4)]
550
- * accountReferences: ["ACCOUNT_1"]
551
- * appReferences: [123n, 1234n]
552
- * assetReferences: [12345n]
553
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
554
- * accessReferences: [{ appId: 1234n }]
555
- * lease: 'lease',
556
- * note: 'note',
557
- * // You wouldn't normally set this field
558
- * firstValidRound: 1000n,
559
- * validityWindow: 10,
560
- * extraFee: (1000).microAlgo(),
561
- * staticFee: (1000).microAlgo(),
562
- * // Max fee doesn't make sense with extraFee AND staticFee
563
- * // already specified, but here for completeness
564
- * maxFee: (3000).microAlgo(),
565
- * rejectVersion: 1,
566
- *})
567
- * ```
568
- * @returns The application ABI method create transaction
569
- */
570
- appCreateMethodCall: (params: {
571
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
572
- sender: SendingAddress;
573
- rekeyTo?: ReadableAddress | undefined;
574
- note?: string | Uint8Array | undefined;
575
- lease?: string | Uint8Array | undefined;
576
- staticFee?: AlgoAmount | undefined;
577
- extraFee?: AlgoAmount | undefined;
578
- maxFee?: AlgoAmount | undefined;
579
- validityWindow?: number | bigint | undefined;
580
- firstValidRound?: bigint | undefined;
581
- lastValidRound?: bigint | undefined;
582
- appId?: 0 | undefined;
583
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
584
- accountReferences?: ReadableAddress[] | undefined;
585
- appReferences?: bigint[] | undefined;
586
- assetReferences?: bigint[] | undefined;
587
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
588
- accessReferences?: ResourceReference[] | undefined;
589
- rejectVersion?: number | undefined;
590
- approvalProgram: string | Uint8Array;
591
- clearStateProgram: string | Uint8Array;
592
- schema?: {
593
- globalInts: number;
594
- globalByteSlices: number;
595
- localInts: number;
596
- localByteSlices: number;
597
- } | undefined;
598
- extraProgramPages?: number | undefined;
599
- method: ABIMethod;
600
- args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
601
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
602
- sender: SendingAddress;
603
- rekeyTo?: ReadableAddress | undefined;
604
- note?: string | Uint8Array | undefined;
605
- lease?: string | Uint8Array | undefined;
606
- staticFee?: AlgoAmount | undefined;
607
- extraFee?: AlgoAmount | undefined;
608
- maxFee?: AlgoAmount | undefined;
609
- validityWindow?: number | bigint | undefined;
610
- firstValidRound?: bigint | undefined;
611
- lastValidRound?: bigint | undefined;
612
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
613
- args?: Uint8Array[] | undefined;
614
- accountReferences?: ReadableAddress[] | undefined;
615
- appReferences?: bigint[] | undefined;
616
- assetReferences?: bigint[] | undefined;
617
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
618
- accessReferences?: ResourceReference[] | undefined;
619
- rejectVersion?: number | undefined;
620
- appId?: 0 | undefined;
621
- approvalProgram: string | Uint8Array;
622
- clearStateProgram: string | Uint8Array;
623
- schema?: {
624
- globalInts: number;
625
- globalByteSlices: number;
626
- localInts: number;
627
- localByteSlices: number;
628
- } | undefined;
629
- extraProgramPages?: number | undefined;
630
- }> | AppMethodCall<{
631
- sender: SendingAddress;
632
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
633
- rekeyTo?: ReadableAddress | undefined;
634
- note?: string | Uint8Array | undefined;
635
- lease?: string | Uint8Array | undefined;
636
- staticFee?: AlgoAmount | undefined;
637
- extraFee?: AlgoAmount | undefined;
638
- maxFee?: AlgoAmount | undefined;
639
- validityWindow?: number | bigint | undefined;
640
- firstValidRound?: bigint | undefined;
641
- lastValidRound?: bigint | undefined;
642
- appId: bigint;
643
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
644
- args?: Uint8Array[] | undefined;
645
- accountReferences?: ReadableAddress[] | undefined;
646
- appReferences?: bigint[] | undefined;
647
- assetReferences?: bigint[] | undefined;
648
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
649
- accessReferences?: ResourceReference[] | undefined;
650
- rejectVersion?: number | undefined;
651
- approvalProgram: string | Uint8Array;
652
- clearStateProgram: string | Uint8Array;
653
- }> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
654
- }) => Promise<Expand<BuiltTransactions>>;
655
- /** Create an application update call with ABI method call transaction.
656
- *
657
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
658
- *
659
- * @param params The parameters for the app update transaction
660
- * @example Basic example
661
- * ```typescript
662
- * const method = new ABIMethod({
663
- * name: 'method',
664
- * args: [{ name: 'arg1', type: 'string' }],
665
- * returns: { type: 'string' },
666
- * })
667
- * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ["arg1_value"] })
668
- * ```
669
- * @example Advanced example
670
- * ```typescript
671
- * const method = new ABIMethod({
672
- * name: 'method',
673
- * args: [{ name: 'arg1', type: 'string' }],
674
- * returns: { type: 'string' },
675
- * })
676
- * await algorand.createTransaction.appUpdateMethodCall({
677
- * sender: 'CREATORADDRESS',
678
- * method: method,
679
- * args: ["arg1_value"],
680
- * approvalProgram: "TEALCODE",
681
- * clearStateProgram: "TEALCODE",
682
- * onComplete: OnApplicationComplete.UpdateApplication,
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 update transaction
703
- */
704
- appUpdateMethodCall: (params: {
705
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
706
- sender: SendingAddress;
707
- rekeyTo?: ReadableAddress | undefined;
708
- note?: string | Uint8Array | undefined;
709
- lease?: string | Uint8Array | undefined;
710
- staticFee?: AlgoAmount | undefined;
711
- extraFee?: AlgoAmount | undefined;
712
- maxFee?: AlgoAmount | undefined;
713
- validityWindow?: number | bigint | undefined;
714
- firstValidRound?: bigint | undefined;
715
- lastValidRound?: bigint | undefined;
716
- appId: bigint;
717
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
718
- accountReferences?: ReadableAddress[] | undefined;
719
- appReferences?: bigint[] | undefined;
720
- assetReferences?: bigint[] | undefined;
721
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
722
- accessReferences?: ResourceReference[] | undefined;
723
- rejectVersion?: number | undefined;
724
- approvalProgram: string | Uint8Array;
725
- clearStateProgram: string | Uint8Array;
726
- method: ABIMethod;
727
- args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
728
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
729
- sender: SendingAddress;
730
- rekeyTo?: ReadableAddress | undefined;
731
- note?: string | Uint8Array | undefined;
732
- lease?: string | Uint8Array | undefined;
733
- staticFee?: AlgoAmount | undefined;
734
- extraFee?: AlgoAmount | undefined;
735
- maxFee?: AlgoAmount | undefined;
736
- validityWindow?: number | bigint | undefined;
737
- firstValidRound?: bigint | undefined;
738
- lastValidRound?: bigint | undefined;
739
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
740
- args?: Uint8Array[] | undefined;
741
- accountReferences?: ReadableAddress[] | undefined;
742
- appReferences?: bigint[] | undefined;
743
- assetReferences?: bigint[] | undefined;
744
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
745
- accessReferences?: ResourceReference[] | undefined;
746
- rejectVersion?: number | undefined;
747
- appId?: 0 | undefined;
748
- approvalProgram: string | Uint8Array;
749
- clearStateProgram: string | Uint8Array;
750
- schema?: {
751
- globalInts: number;
752
- globalByteSlices: number;
753
- localInts: number;
754
- localByteSlices: number;
755
- } | undefined;
756
- extraProgramPages?: number | undefined;
757
- }> | AppMethodCall<{
758
- sender: SendingAddress;
759
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
760
- rekeyTo?: ReadableAddress | undefined;
761
- note?: string | Uint8Array | undefined;
762
- lease?: string | Uint8Array | undefined;
763
- staticFee?: AlgoAmount | undefined;
764
- extraFee?: AlgoAmount | undefined;
765
- maxFee?: AlgoAmount | undefined;
766
- validityWindow?: number | bigint | undefined;
767
- firstValidRound?: bigint | undefined;
768
- lastValidRound?: bigint | undefined;
769
- appId: bigint;
770
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
771
- args?: Uint8Array[] | undefined;
772
- accountReferences?: ReadableAddress[] | undefined;
773
- appReferences?: bigint[] | undefined;
774
- assetReferences?: bigint[] | undefined;
775
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
776
- accessReferences?: ResourceReference[] | undefined;
777
- rejectVersion?: number | undefined;
778
- approvalProgram: string | Uint8Array;
779
- clearStateProgram: string | Uint8Array;
780
- }> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
781
- }) => Promise<Expand<BuiltTransactions>>;
782
- /** Create an application delete call with ABI method call transaction.
783
- *
784
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
785
- *
786
- * @param params The parameters for the app deletion transaction
787
- * @example Basic example
788
- * ```typescript
789
- * const method = new ABIMethod({
790
- * name: 'method',
791
- * args: [{ name: 'arg1', type: 'string' }],
792
- * returns: { type: 'string' },
793
- * })
794
- * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
795
- * ```
796
- * @example Advanced example
797
- * ```typescript
798
- * const method = new ABIMethod({
799
- * name: 'method',
800
- * args: [{ name: 'arg1', type: 'string' }],
801
- * returns: { type: 'string' },
802
- * })
803
- * await algorand.createTransaction.appDeleteMethodCall({
804
- * sender: 'CREATORADDRESS',
805
- * method: method,
806
- * args: ["arg1_value"],
807
- * onComplete: OnApplicationComplete.DeleteApplication,
808
- * args: [new Uint8Array(1, 2, 3, 4)]
809
- * accountReferences: ["ACCOUNT_1"]
810
- * appReferences: [123n, 1234n]
811
- * assetReferences: [12345n]
812
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
813
- * accessReferences: [{ appId: 1234n }]
814
- * lease: 'lease',
815
- * note: 'note',
816
- * // You wouldn't normally set this field
817
- * firstValidRound: 1000n,
818
- * validityWindow: 10,
819
- * extraFee: (1000).microAlgo(),
820
- * staticFee: (1000).microAlgo(),
821
- * // Max fee doesn't make sense with extraFee AND staticFee
822
- * // already specified, but here for completeness
823
- * maxFee: (3000).microAlgo(),
824
- * rejectVersion: 1,
825
- *})
826
- * ```
827
- * @returns The application ABI method delete transaction
828
- */
829
- appDeleteMethodCall: (params: {
830
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
831
- sender: SendingAddress;
832
- rekeyTo?: ReadableAddress | undefined;
833
- note?: string | Uint8Array | undefined;
834
- lease?: string | Uint8Array | undefined;
835
- staticFee?: AlgoAmount | undefined;
836
- extraFee?: AlgoAmount | undefined;
837
- maxFee?: AlgoAmount | undefined;
838
- validityWindow?: number | bigint | undefined;
839
- firstValidRound?: bigint | undefined;
840
- lastValidRound?: bigint | undefined;
841
- appId: bigint;
842
- onComplete?: OnApplicationComplete.DeleteApplication | undefined;
843
- accountReferences?: ReadableAddress[] | undefined;
844
- appReferences?: bigint[] | undefined;
845
- assetReferences?: bigint[] | undefined;
846
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
847
- accessReferences?: ResourceReference[] | undefined;
848
- rejectVersion?: number | undefined;
849
- method: ABIMethod;
850
- args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
851
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
852
- sender: SendingAddress;
853
- rekeyTo?: ReadableAddress | undefined;
854
- note?: string | Uint8Array | undefined;
855
- lease?: string | Uint8Array | undefined;
856
- staticFee?: AlgoAmount | undefined;
857
- extraFee?: AlgoAmount | undefined;
858
- maxFee?: AlgoAmount | undefined;
859
- validityWindow?: number | bigint | undefined;
860
- firstValidRound?: bigint | undefined;
861
- lastValidRound?: bigint | undefined;
862
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
863
- args?: Uint8Array[] | undefined;
864
- accountReferences?: ReadableAddress[] | undefined;
865
- appReferences?: bigint[] | undefined;
866
- assetReferences?: bigint[] | undefined;
867
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
868
- accessReferences?: ResourceReference[] | undefined;
869
- rejectVersion?: number | undefined;
870
- appId?: 0 | undefined;
871
- approvalProgram: string | Uint8Array;
872
- clearStateProgram: string | Uint8Array;
873
- schema?: {
874
- globalInts: number;
875
- globalByteSlices: number;
876
- localInts: number;
877
- localByteSlices: number;
878
- } | undefined;
879
- extraProgramPages?: number | undefined;
880
- }> | AppMethodCall<{
881
- sender: SendingAddress;
882
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
883
- rekeyTo?: ReadableAddress | undefined;
884
- note?: string | Uint8Array | undefined;
885
- lease?: string | Uint8Array | undefined;
886
- staticFee?: AlgoAmount | undefined;
887
- extraFee?: AlgoAmount | undefined;
888
- maxFee?: AlgoAmount | undefined;
889
- validityWindow?: number | bigint | undefined;
890
- firstValidRound?: bigint | undefined;
891
- lastValidRound?: bigint | undefined;
892
- appId: bigint;
893
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
894
- args?: Uint8Array[] | undefined;
895
- accountReferences?: ReadableAddress[] | undefined;
896
- appReferences?: bigint[] | undefined;
897
- assetReferences?: bigint[] | undefined;
898
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
899
- accessReferences?: ResourceReference[] | undefined;
900
- rejectVersion?: number | undefined;
901
- approvalProgram: string | Uint8Array;
902
- clearStateProgram: string | Uint8Array;
903
- }> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
904
- }) => Promise<Expand<BuiltTransactions>>;
905
- /** Create an application call with ABI method call transaction.
906
- *
907
- * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.
908
- *
909
- * @param params The parameters for the app call transaction
910
- * @example Basic example
911
- * ```typescript
912
- * const method = new ABIMethod({
913
- * name: 'method',
914
- * args: [{ name: 'arg1', type: 'string' }],
915
- * returns: { type: 'string' },
916
- * })
917
- * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"] })
918
- * ```
919
- * @example Advanced example
920
- * ```typescript
921
- * const method = new ABIMethod({
922
- * name: 'method',
923
- * args: [{ name: 'arg1', type: 'string' }],
924
- * returns: { type: 'string' },
925
- * })
926
- * await algorand.createTransaction.appCallMethodCall({
927
- * sender: 'CREATORADDRESS',
928
- * method: method,
929
- * args: ["arg1_value"],
930
- * onComplete: OnApplicationComplete.OptIn,
931
- * args: [new Uint8Array(1, 2, 3, 4)]
932
- * accountReferences: ["ACCOUNT_1"]
933
- * appReferences: [123n, 1234n]
934
- * assetReferences: [12345n]
935
- * boxReferences: ["box1", {appId: 1234n, name: "box2"}]
936
- * accessReferences: [{ appId: 1234n }]
937
- * lease: 'lease',
938
- * note: 'note',
939
- * // You wouldn't normally set this field
940
- * firstValidRound: 1000n,
941
- * validityWindow: 10,
942
- * extraFee: (1000).microAlgo(),
943
- * staticFee: (1000).microAlgo(),
944
- * // Max fee doesn't make sense with extraFee AND staticFee
945
- * // already specified, but here for completeness
946
- * maxFee: (3000).microAlgo(),
947
- * rejectVersion: 1,
948
- *})
949
- * ```
950
- * @returns The application ABI method call transaction
951
- */
952
- appCallMethodCall: (params: {
953
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
954
- sender: SendingAddress;
955
- rekeyTo?: ReadableAddress | undefined;
956
- note?: string | Uint8Array | undefined;
957
- lease?: string | Uint8Array | undefined;
958
- staticFee?: AlgoAmount | undefined;
959
- extraFee?: AlgoAmount | undefined;
960
- maxFee?: AlgoAmount | undefined;
961
- validityWindow?: number | bigint | undefined;
962
- firstValidRound?: bigint | undefined;
963
- lastValidRound?: bigint | undefined;
964
- appId: bigint;
965
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.DeleteApplication | undefined;
966
- accountReferences?: ReadableAddress[] | undefined;
967
- appReferences?: bigint[] | undefined;
968
- assetReferences?: bigint[] | undefined;
969
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
970
- accessReferences?: ResourceReference[] | undefined;
971
- rejectVersion?: number | undefined;
972
- method: ABIMethod;
973
- args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
974
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
975
- sender: SendingAddress;
976
- rekeyTo?: ReadableAddress | undefined;
977
- note?: string | Uint8Array | undefined;
978
- lease?: string | Uint8Array | undefined;
979
- staticFee?: AlgoAmount | undefined;
980
- extraFee?: AlgoAmount | undefined;
981
- maxFee?: AlgoAmount | undefined;
982
- validityWindow?: number | bigint | undefined;
983
- firstValidRound?: bigint | undefined;
984
- lastValidRound?: bigint | undefined;
985
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
986
- args?: Uint8Array[] | undefined;
987
- accountReferences?: ReadableAddress[] | undefined;
988
- appReferences?: bigint[] | undefined;
989
- assetReferences?: bigint[] | undefined;
990
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
991
- accessReferences?: ResourceReference[] | undefined;
992
- rejectVersion?: number | undefined;
993
- appId?: 0 | undefined;
994
- approvalProgram: string | Uint8Array;
995
- clearStateProgram: string | Uint8Array;
996
- schema?: {
997
- globalInts: number;
998
- globalByteSlices: number;
999
- localInts: number;
1000
- localByteSlices: number;
1001
- } | undefined;
1002
- extraProgramPages?: number | undefined;
1003
- }> | AppMethodCall<{
1004
- sender: SendingAddress;
1005
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
1006
- rekeyTo?: ReadableAddress | undefined;
1007
- note?: string | Uint8Array | undefined;
1008
- lease?: string | Uint8Array | undefined;
1009
- staticFee?: AlgoAmount | undefined;
1010
- extraFee?: AlgoAmount | undefined;
1011
- maxFee?: AlgoAmount | undefined;
1012
- validityWindow?: number | bigint | undefined;
1013
- firstValidRound?: bigint | undefined;
1014
- lastValidRound?: bigint | undefined;
1015
- appId: bigint;
1016
- onComplete?: OnApplicationComplete.UpdateApplication | undefined;
1017
- args?: Uint8Array[] | undefined;
1018
- accountReferences?: ReadableAddress[] | undefined;
1019
- appReferences?: bigint[] | undefined;
1020
- assetReferences?: bigint[] | undefined;
1021
- boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
1022
- accessReferences?: ResourceReference[] | undefined;
1023
- rejectVersion?: number | undefined;
1024
- approvalProgram: string | Uint8Array;
1025
- clearStateProgram: string | Uint8Array;
1026
- }> | AppMethodCall<AppMethodCallParams> | undefined)[] | undefined;
1027
- }) => Promise<Expand<BuiltTransactions>>;
1028
- /**
1029
- * Create an online key registration transaction.
1030
- * @param params The parameters for the key registration transaction
1031
- * @example Basic example
1032
- * ```typescript
1033
- * await algorand.createTransaction.onlineKeyRegistration({
1034
- * sender: 'SENDERADDRESS',
1035
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1036
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1037
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1038
- * voteFirst: 1n,
1039
- * voteLast: 1000n,
1040
- * voteKeyDilution: 1n,
1041
- * })
1042
- * ```
1043
- * @example Advanced example
1044
- * ```typescript
1045
- * await algorand.createTransaction.onlineKeyRegistration({
1046
- * sender: 'SENDERADDRESS',
1047
- * voteKey: Uint8Array.from(Buffer.from("voteKeyBase64", 'base64')),
1048
- * selectionKey: Uint8Array.from(Buffer.from("selectionKeyBase64", 'base64')),
1049
- * stateProofKey: Uint8Array.from(Buffer.from("stateProofKeyBase64", 'base64')),
1050
- * voteFirst: 1n,
1051
- * voteLast: 1000n,
1052
- * voteKeyDilution: 1n,
1053
- * lease: 'lease',
1054
- * note: 'note',
1055
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1056
- * rekeyTo: 'REKEYTOADDRESS',
1057
- * // You wouldn't normally set this field
1058
- * firstValidRound: 1000n,
1059
- * validityWindow: 10,
1060
- * extraFee: (1000).microAlgo(),
1061
- * staticFee: (1000).microAlgo(),
1062
- * // Max fee doesn't make sense with extraFee AND staticFee
1063
- * // already specified, but here for completeness
1064
- * maxFee: (3000).microAlgo(),
1065
- * })
1066
- * ```
1067
- * @returns The online key registration transaction
1068
- */
1069
- onlineKeyRegistration: (params: OnlineKeyRegistrationParams) => Promise<Transaction>;
1070
- /**
1071
- * Create an offline key registration transaction.
1072
- * @param params The parameters for the key registration transaction
1073
- * @example Basic example
1074
- * ```typescript
1075
- * await algorand.createTransaction.offlineKeyRegistration({
1076
- * sender: 'SENDERADDRESS',
1077
- * })
1078
- * ```
1079
- * @example Advanced example
1080
- * ```typescript
1081
- * await algorand.createTransaction.offlineKeyRegistration({
1082
- * sender: 'SENDERADDRESS',
1083
- * lease: 'lease',
1084
- * note: 'note',
1085
- * // Use this with caution, it's generally better to use algorand.account.rekeyAccount
1086
- * rekeyTo: 'REKEYTOADDRESS',
1087
- * // You wouldn't normally set this field
1088
- * firstValidRound: 1000n,
1089
- * validityWindow: 10,
1090
- * extraFee: (1000).microAlgo(),
1091
- * staticFee: (1000).microAlgo(),
1092
- * // Max fee doesn't make sense with extraFee AND staticFee
1093
- * // already specified, but here for completeness
1094
- * maxFee: (3000).microAlgo(),
1095
- * })
1096
- * ```
1097
- * @returns The offline key registration transaction
1098
- */
1099
- offlineKeyRegistration: (params: OfflineKeyRegistrationParams) => Promise<Transaction>;
1100
- }
4
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/algorand-client-transaction-creator` instead */
5
+ declare const AlgorandClientTransactionCreator: typeof AlgorandClientTransactionCreator$1;
6
+ /** @deprecated Import from `@algorandfoundation/algokit-utils/algorand-client-transaction-creator` instead */
7
+ type AlgorandClientTransactionCreator = AlgorandClientTransactionCreator$1;
1101
8
  //#endregion
1102
9
  export { AlgorandClientTransactionCreator };
1103
10
  //# sourceMappingURL=algorand-client-transaction-creator.d.ts.map