@algorandfoundation/algokit-utils 7.0.0-beta.4 → 7.0.0-beta.6

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 (298) hide show
  1. package/README.md +2 -24
  2. package/account/account.d.ts +1 -2
  3. package/account/account.js.map +1 -1
  4. package/account/account.mjs.map +1 -1
  5. package/account/get-account-config-from-environment.d.ts +0 -1
  6. package/account/get-account-config-from-environment.js.map +1 -1
  7. package/account/get-account-config-from-environment.mjs.map +1 -1
  8. package/account/get-account.d.ts +0 -1
  9. package/account/get-account.js.map +1 -1
  10. package/account/get-account.mjs.map +1 -1
  11. package/account/get-dispenser-account.d.ts +0 -1
  12. package/account/get-dispenser-account.js.map +1 -1
  13. package/account/get-dispenser-account.mjs.map +1 -1
  14. package/account/index.d.ts +0 -1
  15. package/account/mnemonic-account.d.ts +0 -1
  16. package/account/mnemonic-account.js.map +1 -1
  17. package/account/mnemonic-account.mjs.map +1 -1
  18. package/amount.d.ts +0 -1
  19. package/amount.js.map +1 -1
  20. package/amount.mjs.map +1 -1
  21. package/app-client.d.ts +0 -1
  22. package/app-client.js.map +1 -1
  23. package/app-client.mjs.map +1 -1
  24. package/app-deploy.d.ts +0 -1
  25. package/app-deploy.js.map +1 -1
  26. package/app-deploy.mjs.map +1 -1
  27. package/app.d.ts +0 -1
  28. package/app.js.map +1 -1
  29. package/app.mjs.map +1 -1
  30. package/asset.d.ts +0 -1
  31. package/asset.js.map +1 -1
  32. package/asset.mjs.map +1 -1
  33. package/config.d.ts +0 -1
  34. package/config.js.map +1 -1
  35. package/config.mjs.map +1 -1
  36. package/debugging/debugging.d.ts +3 -5
  37. package/debugging/debugging.js +4 -127
  38. package/debugging/debugging.js.map +1 -1
  39. package/debugging/debugging.mjs +4 -108
  40. package/debugging/debugging.mjs.map +1 -1
  41. package/debugging/index.d.ts +0 -2
  42. package/dispenser-client.d.ts +0 -1
  43. package/dispenser-client.js.map +1 -1
  44. package/dispenser-client.mjs.map +1 -1
  45. package/index.d.ts +1 -1
  46. package/index.js +6 -2
  47. package/index.js.map +1 -1
  48. package/index.mjs +1 -1
  49. package/indexer-lookup.d.ts +0 -1
  50. package/indexer-lookup.js.map +1 -1
  51. package/indexer-lookup.mjs.map +1 -1
  52. package/localnet/get-kmd-wallet-account.d.ts +0 -1
  53. package/localnet/get-kmd-wallet-account.js.map +1 -1
  54. package/localnet/get-kmd-wallet-account.mjs.map +1 -1
  55. package/localnet/get-localnet-dispenser-account.d.ts +0 -1
  56. package/localnet/get-localnet-dispenser-account.js.map +1 -1
  57. package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
  58. package/localnet/get-or-create-kmd-wallet-account.d.ts +0 -1
  59. package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
  60. package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
  61. package/localnet/index.d.ts +0 -1
  62. package/localnet/is-localnet.d.ts +0 -1
  63. package/localnet/is-localnet.js.map +1 -1
  64. package/localnet/is-localnet.mjs.map +1 -1
  65. package/network-client.d.ts +0 -1
  66. package/network-client.js.map +1 -1
  67. package/network-client.mjs.map +1 -1
  68. package/package.json +1 -1
  69. package/testing/_asset.d.ts +0 -1
  70. package/testing/account.d.ts +0 -1
  71. package/testing/account.js.map +1 -1
  72. package/testing/account.mjs.map +1 -1
  73. package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
  74. package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
  75. package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
  76. package/testing/fixtures/algorand-fixture.d.ts +0 -1
  77. package/testing/fixtures/algorand-fixture.js.map +1 -1
  78. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  79. package/testing/fixtures/index.d.ts +0 -1
  80. package/testing/index.d.ts +0 -1
  81. package/testing/indexer.d.ts +0 -1
  82. package/testing/indexer.js.map +1 -1
  83. package/testing/indexer.mjs.map +1 -1
  84. package/testing/test-logger.d.ts +0 -1
  85. package/testing/test-logger.js.map +1 -1
  86. package/testing/test-logger.mjs.map +1 -1
  87. package/testing/transaction-logger.d.ts +0 -1
  88. package/testing/transaction-logger.js.map +1 -1
  89. package/testing/transaction-logger.mjs.map +1 -1
  90. package/transaction/index.d.ts +0 -1
  91. package/transaction/legacy-bridge.d.ts +0 -1
  92. package/transaction/legacy-bridge.js.map +1 -1
  93. package/transaction/legacy-bridge.mjs.map +1 -1
  94. package/transaction/perform-atomic-transaction-composer-simulate.d.ts +0 -1
  95. package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
  96. package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
  97. package/transaction/transaction.d.ts +0 -1
  98. package/transaction/transaction.js +9 -20
  99. package/transaction/transaction.js.map +1 -1
  100. package/transaction/transaction.mjs +9 -20
  101. package/transaction/transaction.mjs.map +1 -1
  102. package/transfer/index.d.ts +0 -1
  103. package/transfer/transfer-algos.d.ts +0 -1
  104. package/transfer/transfer-algos.js.map +1 -1
  105. package/transfer/transfer-algos.mjs.map +1 -1
  106. package/transfer/transfer.d.ts +0 -1
  107. package/transfer/transfer.js.map +1 -1
  108. package/transfer/transfer.mjs.map +1 -1
  109. package/types/account-manager.d.ts +0 -1
  110. package/types/account-manager.js.map +1 -1
  111. package/types/account-manager.mjs.map +1 -1
  112. package/types/account.d.ts +0 -1
  113. package/types/account.js.map +1 -1
  114. package/types/account.mjs.map +1 -1
  115. package/types/algo-http-client-with-retry.d.ts +0 -1
  116. package/types/algo-http-client-with-retry.js.map +1 -1
  117. package/types/algo-http-client-with-retry.mjs.map +1 -1
  118. package/types/algorand-client-interface.d.ts +0 -1
  119. package/types/algorand-client-transaction-creator.d.ts +0 -1
  120. package/types/algorand-client-transaction-creator.js.map +1 -1
  121. package/types/algorand-client-transaction-creator.mjs.map +1 -1
  122. package/types/algorand-client-transaction-sender.d.ts +1 -2
  123. package/types/algorand-client-transaction-sender.js +1 -1
  124. package/types/algorand-client-transaction-sender.js.map +1 -1
  125. package/types/algorand-client-transaction-sender.mjs +1 -1
  126. package/types/algorand-client-transaction-sender.mjs.map +1 -1
  127. package/types/algorand-client.d.ts +0 -1
  128. package/types/algorand-client.js.map +1 -1
  129. package/types/algorand-client.mjs.map +1 -1
  130. package/types/amount.d.ts +0 -1
  131. package/types/amount.js.map +1 -1
  132. package/types/amount.mjs.map +1 -1
  133. package/types/app-arc56.d.ts +0 -1
  134. package/types/app-arc56.js.map +1 -1
  135. package/types/app-arc56.mjs.map +1 -1
  136. package/types/app-client.d.ts +4 -2
  137. package/types/app-client.js +9 -17
  138. package/types/app-client.js.map +1 -1
  139. package/types/app-client.mjs +9 -17
  140. package/types/app-client.mjs.map +1 -1
  141. package/types/app-deployer.d.ts +0 -1
  142. package/types/app-deployer.js.map +1 -1
  143. package/types/app-deployer.mjs.map +1 -1
  144. package/types/app-factory.d.ts +0 -1
  145. package/types/app-factory.js.map +1 -1
  146. package/types/app-factory.mjs.map +1 -1
  147. package/types/app-manager.d.ts +0 -1
  148. package/types/app-manager.js.map +1 -1
  149. package/types/app-manager.mjs.map +1 -1
  150. package/types/app-spec.d.ts +0 -1
  151. package/types/app-spec.js.map +1 -1
  152. package/types/app-spec.mjs.map +1 -1
  153. package/types/app.d.ts +0 -1
  154. package/types/app.js.map +1 -1
  155. package/types/app.mjs.map +1 -1
  156. package/types/asset-manager.d.ts +0 -1
  157. package/types/asset-manager.js +1 -1
  158. package/types/asset-manager.js.map +1 -1
  159. package/types/asset-manager.mjs +1 -1
  160. package/types/asset-manager.mjs.map +1 -1
  161. package/types/asset.d.ts +0 -1
  162. package/types/async-event-emitter.d.ts +23 -0
  163. package/types/async-event-emitter.js +55 -0
  164. package/types/async-event-emitter.js.map +1 -0
  165. package/types/async-event-emitter.mjs +53 -0
  166. package/types/async-event-emitter.mjs.map +1 -0
  167. package/types/client-manager.d.ts +0 -1
  168. package/types/client-manager.js.map +1 -1
  169. package/types/client-manager.mjs.map +1 -1
  170. package/types/composer.d.ts +28 -1
  171. package/types/composer.js +10 -11
  172. package/types/composer.js.map +1 -1
  173. package/types/composer.mjs +10 -11
  174. package/types/composer.mjs.map +1 -1
  175. package/types/config.d.ts +3 -6
  176. package/types/config.js +5 -44
  177. package/types/config.js.map +1 -1
  178. package/types/config.mjs +5 -27
  179. package/types/config.mjs.map +1 -1
  180. package/types/debugging.d.ts +29 -102
  181. package/types/debugging.js +16 -109
  182. package/types/debugging.js.map +1 -1
  183. package/types/debugging.mjs +12 -107
  184. package/types/debugging.mjs.map +1 -1
  185. package/types/dispenser-client.d.ts +0 -1
  186. package/types/dispenser-client.js +5 -4
  187. package/types/dispenser-client.js.map +1 -1
  188. package/types/dispenser-client.mjs +5 -4
  189. package/types/dispenser-client.mjs.map +1 -1
  190. package/types/expand.d.ts +0 -1
  191. package/types/indexer.d.ts +0 -1
  192. package/types/indexer.js.map +1 -1
  193. package/types/indexer.mjs.map +1 -1
  194. package/types/kmd-account-manager.d.ts +0 -1
  195. package/types/kmd-account-manager.js +1 -1
  196. package/types/kmd-account-manager.js.map +1 -1
  197. package/types/kmd-account-manager.mjs +1 -1
  198. package/types/kmd-account-manager.mjs.map +1 -1
  199. package/types/logging.d.ts +0 -1
  200. package/types/logging.js.map +1 -1
  201. package/types/logging.mjs.map +1 -1
  202. package/types/logic-error.d.ts +0 -1
  203. package/types/logic-error.js.map +1 -1
  204. package/types/logic-error.mjs.map +1 -1
  205. package/types/network-client.d.ts +0 -1
  206. package/types/network-client.js.map +1 -1
  207. package/types/network-client.mjs.map +1 -1
  208. package/types/testing.d.ts +0 -1
  209. package/types/transaction.d.ts +0 -1
  210. package/types/transfer.d.ts +0 -1
  211. package/types/urlTokenBaseHTTPClient.d.ts +0 -1
  212. package/types/urlTokenBaseHTTPClient.js +1 -1
  213. package/types/urlTokenBaseHTTPClient.js.map +1 -1
  214. package/types/urlTokenBaseHTTPClient.mjs +1 -1
  215. package/types/urlTokenBaseHTTPClient.mjs.map +1 -1
  216. package/util.d.ts +0 -1
  217. package/util.js +0 -9
  218. package/util.js.map +1 -1
  219. package/util.mjs +1 -9
  220. package/util.mjs.map +1 -1
  221. package/account/account.d.ts.map +0 -1
  222. package/account/get-account-config-from-environment.d.ts.map +0 -1
  223. package/account/get-account.d.ts.map +0 -1
  224. package/account/get-dispenser-account.d.ts.map +0 -1
  225. package/account/index.d.ts.map +0 -1
  226. package/account/mnemonic-account.d.ts.map +0 -1
  227. package/amount.d.ts.map +0 -1
  228. package/app-client.d.ts.map +0 -1
  229. package/app-deploy.d.ts.map +0 -1
  230. package/app.d.ts.map +0 -1
  231. package/asset.d.ts.map +0 -1
  232. package/config.d.ts.map +0 -1
  233. package/debugging/debugging.d.ts.map +0 -1
  234. package/debugging/index.d.ts.map +0 -1
  235. package/debugging/simulate-and-persist-response.d.ts +0 -20
  236. package/debugging/simulate-and-persist-response.d.ts.map +0 -1
  237. package/debugging/simulate-and-persist-response.js +0 -108
  238. package/debugging/simulate-and-persist-response.js.map +0 -1
  239. package/debugging/simulate-and-persist-response.mjs +0 -89
  240. package/debugging/simulate-and-persist-response.mjs.map +0 -1
  241. package/dispenser-client.d.ts.map +0 -1
  242. package/index.d.ts.map +0 -1
  243. package/indexer-lookup.d.ts.map +0 -1
  244. package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
  245. package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
  246. package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
  247. package/localnet/index.d.ts.map +0 -1
  248. package/localnet/is-localnet.d.ts.map +0 -1
  249. package/network-client.d.ts.map +0 -1
  250. package/testing/_asset.d.ts.map +0 -1
  251. package/testing/account.d.ts.map +0 -1
  252. package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
  253. package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
  254. package/testing/fixtures/index.d.ts.map +0 -1
  255. package/testing/index.d.ts.map +0 -1
  256. package/testing/indexer.d.ts.map +0 -1
  257. package/testing/test-logger.d.ts.map +0 -1
  258. package/testing/transaction-logger.d.ts.map +0 -1
  259. package/transaction/index.d.ts.map +0 -1
  260. package/transaction/legacy-bridge.d.ts.map +0 -1
  261. package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
  262. package/transaction/transaction.d.ts.map +0 -1
  263. package/transfer/index.d.ts.map +0 -1
  264. package/transfer/transfer-algos.d.ts.map +0 -1
  265. package/transfer/transfer.d.ts.map +0 -1
  266. package/types/account-manager.d.ts.map +0 -1
  267. package/types/account.d.ts.map +0 -1
  268. package/types/algo-http-client-with-retry.d.ts.map +0 -1
  269. package/types/algorand-client-interface.d.ts.map +0 -1
  270. package/types/algorand-client-transaction-creator.d.ts.map +0 -1
  271. package/types/algorand-client-transaction-sender.d.ts.map +0 -1
  272. package/types/algorand-client.d.ts.map +0 -1
  273. package/types/amount.d.ts.map +0 -1
  274. package/types/app-arc56.d.ts.map +0 -1
  275. package/types/app-client.d.ts.map +0 -1
  276. package/types/app-deployer.d.ts.map +0 -1
  277. package/types/app-factory.d.ts.map +0 -1
  278. package/types/app-manager.d.ts.map +0 -1
  279. package/types/app-spec.d.ts.map +0 -1
  280. package/types/app.d.ts.map +0 -1
  281. package/types/asset-manager.d.ts.map +0 -1
  282. package/types/asset.d.ts.map +0 -1
  283. package/types/client-manager.d.ts.map +0 -1
  284. package/types/composer.d.ts.map +0 -1
  285. package/types/config.d.ts.map +0 -1
  286. package/types/debugging.d.ts.map +0 -1
  287. package/types/dispenser-client.d.ts.map +0 -1
  288. package/types/expand.d.ts.map +0 -1
  289. package/types/indexer.d.ts.map +0 -1
  290. package/types/kmd-account-manager.d.ts.map +0 -1
  291. package/types/logging.d.ts.map +0 -1
  292. package/types/logic-error.d.ts.map +0 -1
  293. package/types/network-client.d.ts.map +0 -1
  294. package/types/testing.d.ts.map +0 -1
  295. package/types/transaction.d.ts.map +0 -1
  296. package/types/transfer.d.ts.map +0 -1
  297. package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
  298. package/util.d.ts.map +0 -1
@@ -1 +1 @@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AC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAA;aACtG;SACF;;AAED,QAAA,OAAO,SAAU,CAAA;KAClB;AACF,CAAA;AAED;MACa,cAAc,CAAA;AAKzB;;AAEG;AACH,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;AAED;;AAEG;AACH,IAAA,IAAI,EAAE,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;KACxB;AAED;;AAEG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;AAED;;AAEG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,OAAO;AAClB,YAAA,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE;SACrB,CAAA;KACF;IAED,WAAY,CAAA,OAAgB,EAAE,MAA0B,EAAA;AACtD,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAA;KAClE;AACF;;;;;;"}
1
+ {"version":3,"file":"account.js","sources":["../../src/types/account.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { AlgoAmount } from './amount'\nimport ApplicationLocalState = algosdk.modelsv2.ApplicationLocalState\nimport ApplicationStateSchema = algosdk.modelsv2.ApplicationStateSchema\nimport AssetHolding = algosdk.modelsv2.AssetHolding\nimport Application = algosdk.modelsv2.Application\nimport Asset = algosdk.modelsv2.Asset\nimport AccountParticipation = algosdk.modelsv2.AccountParticipation\nimport Account = algosdk.Account\nimport MultisigMetadata = algosdk.MultisigMetadata\nimport Transaction = algosdk.Transaction\nimport TransactionSigner = algosdk.TransactionSigner\n\n/**\n * The account name identifier used for fund dispensing in test environments\n */\nexport const DISPENSER_ACCOUNT = 'DISPENSER'\n\n/** Account wrapper that supports partial or full multisig signing. */\nexport class MultisigAccount {\n _params: algosdk.MultisigMetadata\n _signingAccounts: (algosdk.Account | SigningAccount)[]\n _addr: string\n _signer: TransactionSigner\n\n /** The parameters for the multisig account */\n get params(): Readonly<algosdk.MultisigMetadata> {\n return this._params\n }\n\n /** The list of accounts that are present to sign */\n get signingAccounts(): Readonly<(algosdk.Account | SigningAccount)[]> {\n return this._signingAccounts\n }\n\n /** The address of the multisig account */\n get addr(): Readonly<string> {\n return this._addr\n }\n\n get signer(): TransactionSigner {\n return this._signer\n }\n\n constructor(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]) {\n this._params = multisigParams\n this._signingAccounts = signingAccounts\n this._addr = algosdk.multisigAddress(multisigParams)\n this._signer = algosdk.makeMultiSigAccountTransactionSigner(\n multisigParams,\n signingAccounts.map((a) => a.sk),\n )\n }\n\n /**\n * Sign the given transaction\n * @param transaction Either a transaction object or a raw, partially signed transaction\n * @returns The transaction signed by the present signers\n */\n public sign(transaction: Transaction | Uint8Array): Uint8Array {\n let signedTxn = 'from' in transaction ? undefined : transaction\n for (const signer of this._signingAccounts) {\n if (signedTxn) {\n signedTxn = algosdk.appendSignMultisigTransaction(signedTxn, this._params, signer.sk).blob\n } else {\n signedTxn = algosdk.signMultisigTransaction(transaction as Transaction, this._params, signer.sk).blob\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedTxn!\n }\n}\n\n/** Account wrapper that supports a rekeyed account */\nexport class SigningAccount implements Account {\n private _account: Account\n private _signer: TransactionSigner\n private _sender: string\n\n /**\n * Algorand address of the sender\n */\n get addr(): Readonly<string> {\n return this._sender\n }\n\n /**\n * Secret key belonging to the signer\n */\n get sk(): Readonly<Uint8Array> {\n return this._account.sk\n }\n\n /**\n * Transaction signer for the underlying signing account\n */\n get signer(): TransactionSigner {\n return this._signer\n }\n\n /**\n * Algorand account of the sender address and signer private key\n */\n get sender(): Account {\n return {\n addr: this._sender,\n sk: this._account.sk,\n }\n }\n\n constructor(account: Account, sender: string | undefined) {\n this._account = account\n this._sender = sender ?? account.addr\n this._signer = algosdk.makeBasicAccountTransactionSigner(account)\n }\n}\n\n/** A wrapper around `TransactionSigner` that also has the sender address. */\nexport interface TransactionSignerAccount {\n addr: Readonly<string>\n signer: TransactionSigner\n}\n\n/** Account information at a given round. */\nexport type AccountInformation = {\n /**\n * The account public key\n */\n address: string\n\n /** The balance of Algo currently held by the account. */\n balance: AlgoAmount\n\n /**\n * The amount of Algo in the account, without the pending rewards.\n */\n amountWithoutPendingRewards: AlgoAmount\n\n /**\n * Algo balance required to be held by the account.\n *\n * The requirement grows based on asset and application usage.\n */\n minBalance: AlgoAmount\n /**\n * Amount of Algo of pending rewards in this account.\n */\n pendingRewards: AlgoAmount\n\n /**\n * Total rewards of Algo the account has received, including pending\n * rewards.\n */\n rewards: AlgoAmount\n\n /**\n * The round number for which this information is relevant.\n */\n validAsOfRound: bigint\n\n /**\n * Delegation status of the account's Algo:\n * * Offline - indicates that the associated account is delegated.\n * * Online - indicates that the associated account used as part of the delegation pool.\n * * NotParticipating - indicates that the associated account is neither a delegator nor a delegate.\n */\n status: string\n\n /**\n * The count of all applications that have been opted in, equivalent to the count\n * of application local data (AppLocalState objects) stored in this account.\n */\n totalAppsOptedIn: number\n\n /**\n * The count of all assets that have been opted in, equivalent to the count of\n * AssetHolding objects held by this account.\n */\n totalAssetsOptedIn: number\n\n /**\n * The count of all apps (AppParams objects) created by this account.\n */\n totalCreatedApps: number\n\n /**\n * The count of all assets (AssetParams objects) created by this account.\n */\n totalCreatedAssets: number\n\n /**\n * Applications local data stored in this account.\n */\n appsLocalState?: ApplicationLocalState[]\n\n /**\n * The sum of all extra application program pages for this account.\n */\n appsTotalExtraPages?: number\n /**\n * (tsch) stores the sum of all of the local schemas and global schemas in this\n * account.\n * Note: the raw account uses `StateSchema` for this type.\n */\n appsTotalSchema?: ApplicationStateSchema\n\n /**\n * Assets held by this account.\n */\n assets?: AssetHolding[]\n\n /**\n * The address against which signing should be checked. If empty, the\n * address of the current account is used. This field can be updated in any\n * transaction by setting the `RekeyTo` field.\n */\n authAddr?: string\n\n /**\n * Parameters of applications created by this account including app global data.\n */\n createdApps?: Application[]\n\n /**\n * (apar) parameters of assets created by this account.\n * Note: the raw account uses `map[int] -> Asset` for this type.\n */\n createdAssets?: Asset[]\n\n /**\n * AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n */\n participation?: AccountParticipation\n\n /**\n * Used as part of the rewards computation. Only applicable to accounts\n * which are participating.\n */\n rewardBase?: number\n\n /**\n * Indicates what type of signature is used by this account, must be one of:\n * * sig\n * * msig\n * * lsig\n */\n sigType?: string\n\n /**\n * The total number of bytes used by this account's app's box keys and\n * values.\n */\n totalBoxBytes?: number\n\n /**\n * The number of existing boxes created by this account's app.\n */\n totalBoxes?: number\n}\n\n/** Account asset holding information at a given round. */\nexport type AccountAssetInformation = {\n /** The ID of the asset held. */\n assetId: bigint\n /** The current balance of that asset holding. */\n balance: bigint\n /** Whether or not the asset is frozen for the account. */\n frozen: boolean\n /** The round as at which the holding was correct. */\n round: bigint\n}\n\n/**\n * @deprecated The methods that use this can be achieved using `AccountManager` instead.\n * Config for an account config */\nexport interface AccountConfig {\n /** Mnemonic for an account */\n accountMnemonic: string\n /** Address of a rekeyed account */\n senderAddress?: string\n /** Account name used to retrieve config */\n accountName: string\n\n /** @deprecated Renamed to senderAddress in 2.3.1 */\n senderMnemonic?: string\n}\n"],"names":[],"mappings":";;;;AAaA;;AAEG;AACI,MAAM,iBAAiB,GAAG,YAAW;AAE5C;MACa,eAAe,CAAA;;AAO1B,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;;AAGD,IAAA,IAAI,eAAe,GAAA;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAA;KAC7B;;AAGD,IAAA,IAAI,IAAI,GAAA;QACN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rC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAA;KAClE;AACF;;;;"}
1
+ {"version":3,"file":"account.mjs","sources":["../../src/types/account.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { AlgoAmount } from './amount'\nimport ApplicationLocalState = algosdk.modelsv2.ApplicationLocalState\nimport ApplicationStateSchema = algosdk.modelsv2.ApplicationStateSchema\nimport AssetHolding = algosdk.modelsv2.AssetHolding\nimport Application = algosdk.modelsv2.Application\nimport Asset = algosdk.modelsv2.Asset\nimport AccountParticipation = algosdk.modelsv2.AccountParticipation\nimport Account = algosdk.Account\nimport MultisigMetadata = algosdk.MultisigMetadata\nimport Transaction = algosdk.Transaction\nimport TransactionSigner = algosdk.TransactionSigner\n\n/**\n * The account name identifier used for fund dispensing in test environments\n */\nexport const DISPENSER_ACCOUNT = 'DISPENSER'\n\n/** Account wrapper that supports partial or full multisig signing. */\nexport class MultisigAccount {\n _params: algosdk.MultisigMetadata\n _signingAccounts: (algosdk.Account | SigningAccount)[]\n _addr: string\n _signer: TransactionSigner\n\n /** The parameters for the multisig account */\n get params(): Readonly<algosdk.MultisigMetadata> {\n return this._params\n }\n\n /** The list of accounts that are present to sign */\n get signingAccounts(): Readonly<(algosdk.Account | SigningAccount)[]> {\n return this._signingAccounts\n }\n\n /** The address of the multisig account */\n get addr(): Readonly<string> {\n return this._addr\n }\n\n get signer(): TransactionSigner {\n return this._signer\n }\n\n constructor(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]) {\n this._params = multisigParams\n this._signingAccounts = signingAccounts\n this._addr = algosdk.multisigAddress(multisigParams)\n this._signer = algosdk.makeMultiSigAccountTransactionSigner(\n multisigParams,\n signingAccounts.map((a) => a.sk),\n )\n }\n\n /**\n * Sign the given transaction\n * @param transaction Either a transaction object or a raw, partially signed transaction\n * @returns The transaction signed by the present signers\n */\n public sign(transaction: Transaction | Uint8Array): Uint8Array {\n let signedTxn = 'from' in transaction ? undefined : transaction\n for (const signer of this._signingAccounts) {\n if (signedTxn) {\n signedTxn = algosdk.appendSignMultisigTransaction(signedTxn, this._params, signer.sk).blob\n } else {\n signedTxn = algosdk.signMultisigTransaction(transaction as Transaction, this._params, signer.sk).blob\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return signedTxn!\n }\n}\n\n/** Account wrapper that supports a rekeyed account */\nexport class SigningAccount implements Account {\n private _account: Account\n private _signer: TransactionSigner\n private _sender: string\n\n /**\n * Algorand address of the sender\n */\n get addr(): Readonly<string> {\n return this._sender\n }\n\n /**\n * Secret key belonging to the signer\n */\n get sk(): Readonly<Uint8Array> {\n return this._account.sk\n }\n\n /**\n * Transaction signer for the underlying signing account\n */\n get signer(): TransactionSigner {\n return this._signer\n }\n\n /**\n * Algorand account of the sender address and signer private key\n */\n get sender(): Account {\n return {\n addr: this._sender,\n sk: this._account.sk,\n }\n }\n\n constructor(account: Account, sender: string | undefined) {\n this._account = account\n this._sender = sender ?? account.addr\n this._signer = algosdk.makeBasicAccountTransactionSigner(account)\n }\n}\n\n/** A wrapper around `TransactionSigner` that also has the sender address. */\nexport interface TransactionSignerAccount {\n addr: Readonly<string>\n signer: TransactionSigner\n}\n\n/** Account information at a given round. */\nexport type AccountInformation = {\n /**\n * The account public key\n */\n address: string\n\n /** The balance of Algo currently held by the account. */\n balance: AlgoAmount\n\n /**\n * The amount of Algo in the account, without the pending rewards.\n */\n amountWithoutPendingRewards: AlgoAmount\n\n /**\n * Algo balance required to be held by the account.\n *\n * The requirement grows based on asset and application usage.\n */\n minBalance: AlgoAmount\n /**\n * Amount of Algo of pending rewards in this account.\n */\n pendingRewards: AlgoAmount\n\n /**\n * Total rewards of Algo the account has received, including pending\n * rewards.\n */\n rewards: AlgoAmount\n\n /**\n * The round number for which this information is relevant.\n */\n validAsOfRound: bigint\n\n /**\n * Delegation status of the account's Algo:\n * * Offline - indicates that the associated account is delegated.\n * * Online - indicates that the associated account used as part of the delegation pool.\n * * NotParticipating - indicates that the associated account is neither a delegator nor a delegate.\n */\n status: string\n\n /**\n * The count of all applications that have been opted in, equivalent to the count\n * of application local data (AppLocalState objects) stored in this account.\n */\n totalAppsOptedIn: number\n\n /**\n * The count of all assets that have been opted in, equivalent to the count of\n * AssetHolding objects held by this account.\n */\n totalAssetsOptedIn: number\n\n /**\n * The count of all apps (AppParams objects) created by this account.\n */\n totalCreatedApps: number\n\n /**\n * The count of all assets (AssetParams objects) created by this account.\n */\n totalCreatedAssets: number\n\n /**\n * Applications local data stored in this account.\n */\n appsLocalState?: ApplicationLocalState[]\n\n /**\n * The sum of all extra application program pages for this account.\n */\n appsTotalExtraPages?: number\n /**\n * (tsch) stores the sum of all of the local schemas and global schemas in this\n * account.\n * Note: the raw account uses `StateSchema` for this type.\n */\n appsTotalSchema?: ApplicationStateSchema\n\n /**\n * Assets held by this account.\n */\n assets?: AssetHolding[]\n\n /**\n * The address against which signing should be checked. If empty, the\n * address of the current account is used. This field can be updated in any\n * transaction by setting the `RekeyTo` field.\n */\n authAddr?: string\n\n /**\n * Parameters of applications created by this account including app global data.\n */\n createdApps?: Application[]\n\n /**\n * (apar) parameters of assets created by this account.\n * Note: the raw account uses `map[int] -> Asset` for this type.\n */\n createdAssets?: Asset[]\n\n /**\n * AccountParticipation describes the parameters used by this account in consensus\n * protocol.\n */\n participation?: AccountParticipation\n\n /**\n * Used as part of the rewards computation. Only applicable to accounts\n * which are participating.\n */\n rewardBase?: number\n\n /**\n * Indicates what type of signature is used by this account, must be one of:\n * * sig\n * * msig\n * * lsig\n */\n sigType?: string\n\n /**\n * The total number of bytes used by this account's app's box keys and\n * values.\n */\n totalBoxBytes?: number\n\n /**\n * The number of existing boxes created by this account's app.\n */\n totalBoxes?: number\n}\n\n/** Account asset holding information at a given round. */\nexport type AccountAssetInformation = {\n /** The ID of the asset held. */\n assetId: bigint\n /** The current balance of that asset holding. */\n balance: bigint\n /** Whether or not the asset is frozen for the account. */\n frozen: boolean\n /** The round as at which the holding was correct. */\n round: bigint\n}\n\n/**\n * @deprecated The methods that use this can be achieved using `AccountManager` instead.\n * Config for an account config */\nexport interface AccountConfig {\n /** Mnemonic for an account */\n accountMnemonic: string\n /** Address of a rekeyed account */\n senderAddress?: string\n /** Account name used to retrieve config */\n accountName: string\n\n /** @deprecated Renamed to senderAddress in 2.3.1 */\n senderMnemonic?: string\n}\n"],"names":[],"mappings":";;AAaA;;AAEG;AACI,MAAM,iBAAiB,GAAG,YAAW;AAE5C;MACa,eAAe,CAAA;;AAO1B,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;;AAGD,IAAA,IAAI,eAAe,GAAA;QACjB,OAAO,IAAI,CAAC,gBAAgB,CAAA;KAC7B;;AAGD,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;KAClB;AAED,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;IAED,WAAY,CAAA,cAAgC,EAAE,eAA6C,EAAA;AACzF,QAAA,IAAI,CAAC,OAAO,GAAG,cAAc,CAAA;AAC7B,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAA;QACvC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAA;QACpD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,oCAAoC,CACzD,cAAc,EACd,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CACjC,CAAA;KACF;AAED;;;;AAIG;AACI,IAAA,IAAI,CAAC,WAAqC,EAAA;AAC/C,QAAA,IAAI,SAAS,GAAG,MAAM,IAAI,WAAW,GAAG,SAAS,GAAG,WAAW,CAAA;AAC/D,QAAA,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,gBAAgB,EAAE;YAC1C,IAAI,SAAS,EAAE;AACb,gBAAA,SAAS,GAAG,OAAO,CAAC,6BAA6B,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAA;aAC3F;iBAAM;AACL,gBAAA,SAAS,GAAG,OAAO,CAAC,uBAAuB,CAAC,WAA0B,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAA;aACtG;SACF;;AAED,QAAA,OAAO,SAAU,CAAA;KAClB;AACF,CAAA;AAED;MACa,cAAc,CAAA;AAKzB;;AAEG;AACH,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;AAED;;AAEG;AACH,IAAA,IAAI,EAAE,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;KACxB;AAED;;AAEG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;KACpB;AAED;;AAEG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,OAAO;AAClB,YAAA,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE;SACrB,CAAA;KACF;IAED,WAAY,CAAA,OAAgB,EAAE,MAA0B,EAAA;AACtD,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAA;KAClE;AACF;;;;"}
@@ -11,4 +11,3 @@ export declare class AlgoHttpClientWithRetry extends URLTokenBaseHTTPClient {
11
11
  post(relativePath: string, data: Uint8Array, query?: Query<string>, requestHeaders?: Record<string, string>): Promise<BaseHTTPClientResponse>;
12
12
  delete(relativePath: string, data: Uint8Array, query?: Query<string>, requestHeaders?: Record<string, string>): Promise<BaseHTTPClientResponse>;
13
13
  }
14
- //# sourceMappingURL=algo-http-client-with-retry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"algo-http-client-with-retry.js","sources":["../../src/types/algo-http-client-with-retry.ts"],"sourcesContent":[null],"names":["URLTokenBaseHTTPClient","Config"],"mappings":";;;;;AAIA;AACM,MAAO,uBAAwB,SAAQA,mDAAsB,CAAA;IAmBzD,MAAM,aAAa,CAAC,IAA2C,EAAA;AACrE,QAAA,IAAI,QAA4C,CAAA;QAChD,IAAI,QAAQ,GAAG,CAAC,CAAA;AAChB,QAAA,GAAG;AACD,YAAA,IAAI;AACF,gBAAA,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAA;;aAExB;YAAC,OAAO,GAAQ,EAAE;AACjB,gBAAA,IAAI,QAAQ,IAAI,uBAAuB,CAAC,SAAS,EAAE;AACjD,oBAAA,MAAM,GAAG,CAAA;iBACV;;gBAED,IACE,EACE,uBAAuB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;oBAC5D,uBAAuB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;qBACtE,UAAU,IAAI,GAAG,IAAI,uBAAuB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CACxG,EACD;AACA,oBAAA,MAAM,GAAG,CAAA;iBACV;;AAED,gBAAA,MAAM,WAAW,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAA;AAC1H,gBAAA,IAAI,WAAW,GAAG,CAAC,EAAE;AACnB,oBAAA,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,EAAE,WAAW,CAAC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,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,aAAa;IACb,WAAW;AACX,IAAA,QAAQ;CACT;;;;"}
1
+ {"version":3,"file":"algo-http-client-with-retry.js","sources":["../../src/types/algo-http-client-with-retry.ts"],"sourcesContent":["import type { BaseHTTPClientResponse, Query } from 'algosdk/dist/types/client/baseHTTPClient'\nimport { Config } from '../config'\nimport { URLTokenBaseHTTPClient } from './urlTokenBaseHTTPClient'\n\n/** A HTTP Client that wraps the Algorand SDK HTTP Client with retries */\nexport class AlgoHttpClientWithRetry extends URLTokenBaseHTTPClient {\n private static readonly MAX_TRIES = 5\n private static readonly MAX_BACKOFF_MS = 10000\n\n // These lists come from https://visionmedia.github.io/superagent/#retrying-requests\n // which is the underlying library used by algosdk - but the CloudFlare specific 52X status codes have been removed\n private static readonly RETRY_STATUS_CODES = [408, 413, 429, 500, 502, 503, 504]\n private static readonly RETRY_ERROR_CODES = [\n 'ETIMEDOUT',\n 'ECONNRESET',\n 'EADDRINUSE',\n 'ECONNREFUSED',\n 'EPIPE',\n 'ENOTFOUND',\n 'ENETUNREACH',\n 'EAI_AGAIN',\n 'EPROTO', // We get this intermittently with AlgoNode API\n ]\n\n private async callWithRetry(func: () => Promise<BaseHTTPClientResponse>): Promise<BaseHTTPClientResponse> {\n let response: BaseHTTPClientResponse | undefined\n let numTries = 1\n do {\n try {\n response = await func()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n if (numTries >= AlgoHttpClientWithRetry.MAX_TRIES) {\n throw err\n }\n // Only retry for one of the hardcoded conditions\n if (\n !(\n AlgoHttpClientWithRetry.RETRY_ERROR_CODES.includes(err.code) ||\n AlgoHttpClientWithRetry.RETRY_STATUS_CODES.includes(Number(err.status)) ||\n ('response' in err && AlgoHttpClientWithRetry.RETRY_STATUS_CODES.includes(Number(err.response.status)))\n )\n ) {\n throw err\n }\n // Retry immediately the first time, then exponentially backoff.\n const delayTimeMs = numTries == 1 ? 0 : Math.min(1000 * Math.pow(2, numTries - 1), AlgoHttpClientWithRetry.MAX_BACKOFF_MS)\n if (delayTimeMs > 0) {\n await new Promise((r) => setTimeout(r, delayTimeMs))\n }\n Config.logger.warn(`algosdk request failed ${numTries} times. Retrying in ${delayTimeMs}ms: ${err}`)\n }\n } while (!response && ++numTries <= AlgoHttpClientWithRetry.MAX_TRIES)\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return response!\n }\n\n async get(relativePath: string, query?: Query<string>, requestHeaders: Record<string, string> = {}): Promise<BaseHTTPClientResponse> {\n return await this.callWithRetry(() => super.get(relativePath, query, requestHeaders))\n }\n\n async post(\n relativePath: string,\n data: Uint8Array,\n query?: Query<string>,\n requestHeaders: Record<string, string> = {},\n ): Promise<BaseHTTPClientResponse> {\n return await this.callWithRetry(() => super.post(relativePath, data, query, requestHeaders))\n }\n\n async delete(\n relativePath: string,\n data: Uint8Array,\n query?: Query<string>,\n requestHeaders: Record<string, string> = {},\n ): Promise<BaseHTTPClientResponse> {\n return await this.callWithRetry(() => super.delete(relativePath, data, query, requestHeaders))\n }\n}\n"],"names":["URLTokenBaseHTTPClient","Config"],"mappings":";;;;;AAIA;AACM,MAAO,uBAAwB,SAAQA,mDAAsB,CAAA;IAmBzD,MAAM,aAAa,CAAC,IAA2C,EAAA;AACrE,QAAA,IAAI,QAA4C,CAAA;QAChD,IAAI,QAAQ,GAAG,CAAC,CAAA;AAChB,QAAA,GAAG;AACD,YAAA,IAAI;AACF,gBAAA,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAA;;aAExB;YAAC,OAAO,GAAQ,EAAE;AACjB,gBAAA,IAAI,QAAQ,IAAI,uBAAuB,CAAC,SAAS,EAAE;AACjD,oBAAA,MAAM,GAAG,CAAA;iBACV;;gBAED,IACE,EACE,uBAAuB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;oBAC5D,uBAAuB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MA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I,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;KAC7F;IAED,MAAM,MAAM,CACV,YAAoB,EACpB,IAAgB,EAChB,KAAqB,EACrB,cAAA,GAAyC,EAAE,EAAA;QAE3C,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;KAC/F;;AAvEuB,uBAAS,CAAA,SAAA,GAAG,CAAC,CAAA;AACb,uBAAc,CAAA,cAAA,GAAG,KAAK,CAAA;AAE9C;AACA;AACwB,uBAAA,CAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACxD,uBAAA,CAAA,iBAAiB,GAAG;IAC1C,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,aAAa;IACb,WAAW;AACX,IAAA,QAAQ;CACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"algo-http-client-with-retry.mjs","sources":["../../src/types/algo-http-client-with-retry.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIA;AACM,MAAO,uBAAwB,SAAQ,sBAAsB,CAAA;IAmBzD,MAAM,aAAa,CAAC,IAA2C,EAAA;AACrE,QAAA,IAAI,QAA4C,CAAA;QAChD,IAAI,QAAQ,GAAG,CAAC,CAAA;AAChB,QAAA,GAAG;AACD,YAAA,IAAI;AACF,gBAAA,QAAQ,GAAG,MAAM,IAAI,EAAE,CAAA;;aAExB;YAAC,OAAO,GAAQ,EAAE;AACjB,gBAAA,IAAI,QAAQ,IAAI,uBAAuB,CAAC,SAAS,EAAE;AACjD,oBAAA,MAAM,GAAG,CAAA;iBACV;;gBAED,IACE,EACE,uBAAuB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;oBAC5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MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;KAC7F;IAED,MAAM,MAAM,CACV,YAAoB,EACpB,IAAgB,EAChB,KAAqB,EACrB,cAAA,GAAyC,EAAE,EAAA;QAE3C,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAA;KAC/F;;AAvEuB,uBAAS,CAAA,SAAA,GAAG,CAAC,CAAA;AACb,uBAAc,CAAA,cAAA,GAAG,KAAK,CAAA;AAE9C;AACA;AACwB,uBAAA,CAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACxD,uBAAA,CAAA,iBAAiB,GAAG;IAC1C,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,aAAa;IACb,WAAW;AACX,IAAA,QAAQ;CACT;;;;"}
1
+ {"version":3,"file":"algo-http-client-with-retry.mjs","sources":["../../src/types/algo-http-client-with-retry.ts"],"sourcesContent":["import type { BaseHTTPClientResponse, Query } from 'algosdk/dist/types/client/baseHTTPClient'\nimport { Config } from '../config'\nimport { URLTokenBaseHTTPClient } from './urlTokenBaseHTTPClient'\n\n/** A HTTP Client that wraps the Algorand SDK HTTP Client with retries */\nexport class AlgoHttpClientWithRetry extends URLTokenBaseHTTPClient {\n private static readonly MAX_TRIES = 5\n private static readonly MAX_BACKOFF_MS = 10000\n\n // These lists come from https://visionmedia.github.io/superagent/#retrying-requests\n // which is the underlying library used by algosdk - but the CloudFlare specific 52X status codes have been removed\n private static readonly RETRY_STATUS_CODES = [408, 413, 429, 500, 502, 503, 504]\n private static readonly RETRY_ERROR_CODES = [\n 'ETIMEDOUT',\n 'ECONNRESET',\n 'EADDRINUSE',\n 'ECONNREFUSED',\n 'EPIPE',\n 'ENOTFOUND',\n 'ENETUNREACH',\n 'EAI_AGAIN',\n 'EPROTO', // We get this intermittently with AlgoNode API\n ]\n\n private async callWithRetry(func: () => Promise<BaseHTTPClientResponse>): Promise<BaseHTTPClientResponse> {\n let response: BaseHTTPClientResponse | undefined\n let numTries = 1\n do {\n try {\n response = await func()\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n if (numTries >= AlgoHttpClientWithRetry.MAX_TRIES) {\n throw err\n }\n // Only retry for one of the hardcoded conditions\n if (\n !(\n AlgoHttpClientWithRetry.RETRY_ERROR_CODES.includes(err.code) ||\n AlgoHttpClientWithRetry.RETRY_STATUS_CODES.includes(Number(err.status)) ||\n ('response' in err && AlgoHttpClientWithRetry.RETRY_STATUS_CODES.includes(Number(err.response.status)))\n )\n ) {\n throw err\n }\n // Retry immediately the first time, then exponentially backoff.\n const delayTimeMs = numTries == 1 ? 0 : Math.min(1000 * Math.pow(2, numTries - 1), AlgoHttpClientWithRetry.MAX_BACKOFF_MS)\n if (delayTimeMs > 0) {\n await new Promise((r) => setTimeout(r, delayTimeMs))\n }\n Config.logger.warn(`algosdk request failed ${numTries} times. Retrying in ${delayTimeMs}ms: ${err}`)\n }\n } while (!response && ++numTries <= AlgoHttpClientWithRetry.MAX_TRIES)\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return response!\n }\n\n async get(relativePath: string, query?: Query<string>, requestHeaders: Record<string, string> = {}): Promise<BaseHTTPClientResponse> {\n return await this.callWithRetry(() => super.get(relativePath, query, requestHeaders))\n }\n\n async post(\n relativePath: string,\n data: Uint8Array,\n query?: Query<string>,\n requestHeaders: Record<string, string> = {},\n ): Promise<BaseHTTPClientResponse> {\n return await this.callWithRetry(() => super.post(relativePath, data, query, requestHeaders))\n }\n\n async delete(\n relativePath: string,\n data: Uint8Array,\n query?: Query<string>,\n requestHeaders: Record<string, string> = {},\n ): Promise<BaseHTT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AQ;CACT;;;;"}
@@ -26,4 +26,3 @@ export interface AlgorandClientInterface {
26
26
  isMainNet(): Promise<boolean>;
27
27
  };
28
28
  }
29
- //# sourceMappingURL=algorand-client-interface.d.ts.map
@@ -716,4 +716,3 @@ export declare class AlgorandClientTransactionCreator {
716
716
  /** Create an online key registration transaction. */
717
717
  onlineKeyRegistration: (params: import("./composer").OnlineKeyRegistrationParams) => Promise<Transaction>;
718
718
  }
719
- //# sourceMappingURL=algorand-client-transaction-creator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client-transaction-creator.js","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAmB3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAA;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,CAA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E,CAAA;AACpC,SAAC,CAAA;KACF;AAEO,IAAA,aAAa,CAAI,CAAyD,EAAA;AAChF,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;AACxE,SAAC,CAAA;KACF;AAipBF;;;;"}
1
+ {"version":3,"file":"algorand-client-transaction-creator.js","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport AlgoKitComposer, { BuiltTransactions } from './composer'\nimport { Expand } from './expand'\n\nimport Transaction = algosdk.Transaction\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => AlgoKitComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `AlgoKitComposer` transaction group\n */\n constructor(newGroup: () => AlgoKitComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n *\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetCreate({sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetConfig({sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetFreeze({sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetDestroy({sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetTransfer({sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.transactions.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetOptIn({sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetOptOut({sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.transactions.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.transactions.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCreate({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /** Create an online key registration transaction. */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n}\n"],"names":[],"mappings":";;AAMA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAmB3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDG;AACH,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC,CAAA;;AAErE,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC,CAAA;AAhqB1E,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;KAC1B;AAEO,IAAA,YAAY,CAAI,CAAyD,EAAA;AAC/E,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YAC9E,OAAO,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;AACpC,SAAC,CAAA;KACF;AAEO,IAAA,aAAa,CAAI,CAAyD,EAAA;AAChF,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;AACxE,SAAC,CAAA;KACF;AAipBF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAmB3C;;;;;;;;;;;;;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AC,CAAA;AACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDG;AACH,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC,CAAA;;AAErE,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC,CAAA;AAhqB1E,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;KAC1B;AAEO,IAAA,YAAY,CAAI,CAAyD,EAAA;AAC/E,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YAC9E,OAAO,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;AACpC,SAAC,CAAA;KACF;AAEO,IAAA,aAAa,CAAI,CAAyD,EAAA;AAChF,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;AACxE,SAAC,CAAA;KACF;AAipBF;;;;"}
1
+ {"version":3,"file":"algorand-client-transaction-creator.mjs","sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport AlgoKitComposer, { BuiltTransactions } from './composer'\nimport { Expand } from './expand'\n\nimport Transaction = algosdk.Transaction\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => AlgoKitComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `AlgoKitComposer` transaction group\n */\n constructor(newGroup: () => AlgoKitComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n *\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetCreate({sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetConfig({sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetFreeze({sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetDestroy({sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetTransfer({sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.transactions.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetOptIn({sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.transactions.assetOptOut({sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.transactions.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.transactions.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.transactions.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.transactions.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCreate({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.transactions.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /** Create an online key registration transaction. */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n}\n"],"names":[],"mappings":"AAMA;MACa,gCAAgC,CAAA;AAG3C;;;AAGG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAA;AAmB3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAAA;AAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;AACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,QAAA,IAAA,CAAA,WAAW,GA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C,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;YAC9E,OAAO,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAA;AACpC,SAAC,CAAA;KACF;AAEO,IAAA,aAAa,CAAI,CAAyD,EAAA;AAChF,QAAA,OAAO,OAAO,MAAS,KAAI;AACzB,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;AACjC,YAAA,OAAO,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAA;AACxE,SAAC,CAAA;KACF;AAipBF;;;;"}
@@ -713,9 +713,9 @@ export declare class AlgorandClientTransactionSender {
713
713
  localInts: number;
714
714
  localByteSlices: number;
715
715
  } | undefined;
716
- extraProgramPages?: number | undefined;
717
716
  signer?: algosdk.TransactionSigner | import("./account").TransactionSignerAccount | undefined;
718
717
  sender: string;
718
+ extraProgramPages?: number | undefined;
719
719
  rekeyTo?: string | undefined;
720
720
  staticFee?: import("./amount").AlgoAmount | undefined;
721
721
  extraFee?: import("./amount").AlgoAmount | undefined;
@@ -1156,4 +1156,3 @@ export declare class AlgorandClientTransactionSender {
1156
1156
  stateProofKey?: Uint8Array | undefined;
1157
1157
  } & ExecuteParams) => Promise<SendSingleTransactionResult>;
1158
1158
  }
1159
- //# sourceMappingURL=algorand-client-transaction-sender.d.ts.map
@@ -368,7 +368,7 @@ class AlgorandClientTransactionSender {
368
368
  const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId);
369
369
  balance = accountAssetInfo.balance;
370
370
  }
371
- catch (e) {
371
+ catch {
372
372
  throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`);
373
373
  }
374
374
  if (balance !== 0n) {
@@ -1 +1 @@
1
- {"version":3,"file":"algorand-client-transaction-sender.js","sources":["../../src/types/algorand-client-transaction-sender.ts"],"sourcesContent":[null],"names":["Buffer","Config","AppManager"],"mappings":";;;;;;;AAqBA,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAmD,KAAI;AAChG,IAAA,OAAO,CAAG,EAAA,MAAM,CAAC,IAAI,CAAI,CAAA,EAAA,CAAC,IAAI,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,OAAO,CAAC,KAAK,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;AACzJ,CAAC,CAAA;AAED;MACa,+BAA+B,CAAA;AAK1C;;;;AAIG;AACH,IAAA,WAAA,CAAY,QAA+B,EAAE,YAA0B,EAAE,UAAsB,EAAA;AA0G/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;YACxC,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,KAC1B,CAAA,QAAA,EAAW,MAAM,CAAC,MAAM,CAAC,SAAS,CAAA,YAAA,EAAe,MAAM,CAAC,MAAM,CAAA,IAAA,EAAO,MAAM,CAAC,QAAQ,CAAA,iBAAA,EAAoB,WAAW,CAAC,IAAI,EAAE,CAAE,CAAA;AAC/H,SAAA,CAAC,CAAA;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,OAAO,MAAyC,KAAI;AAChE,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CA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EAAE,CAAA;AAC5H,SAAC,CAAA;KACF;IAEO,kBAAkB,CACxB,CAAyD,EACzD,GAGC,EAAA;AAED,QAAA,OAAO,OAAO,MAAM,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;YAEtD,MAAM,gBAAgB,GACpB,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;YACxH,MAAM,aAAa,GACjB,OAAO,MAAM,CAAC,iBAAiB,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;YAE5H,OAAO,EAAE,GAAG,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAA;AACvD,SAAC,CAAA;KACF;IAEO,kBAAkB,CACxB,CAAyD,EACzD,GAGC,EAAA;AAED,QAAA,OAAO,OAAO,MAAM,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;YAE5D,OAAO;AACL,gBAAA,GAAG,MAAM;gBACT,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;gBACpD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;aACjF,CAAA;AACH,SAAC,CAAA;KACF;AA2yBF;;;;"}
1
+ {"version":3,"file":"algorand-client-transaction-sender.js","sources":["../../src/types/algorand-client-transaction-sender.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { Buffer } from 'buffer'\nimport { Config } from '../config'\nimport { SendAppCreateTransactionResult, SendAppTransactionResult, SendAppUpdateTransactionResult } from './app'\nimport { AppManager } from './app-manager'\nimport { AssetManager } from './asset-manager'\nimport AlgoKitComposer, {\n AppCallMethodCall,\n AppCallParams,\n AppCreateMethodCall,\n AppCreateParams,\n AppDeleteMethodCall,\n AppDeleteParams,\n AppUpdateMethodCall,\n AppUpdateParams,\n AssetCreateParams,\n AssetOptOutParams,\n} from './composer'\nimport { ExecuteParams, SendSingleTransactionResult } from './transaction'\nimport Transaction = algosdk.Transaction\n\nconst getMethodCallForLog = ({ method, args }: { method: algosdk.ABIMethod; args?: unknown[] }) => {\n return `${method.name}(${(args ?? []).map((a) => (typeof a === 'object' ? JSON.stringify(a, (_, v) => (typeof v === 'bigint' ? Number(v) : v)) : a))})`\n}\n\n/** Orchestrates sending transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionSender {\n private _newGroup: () => AlgoKitComposer\n private _assetManager: AssetManager\n private _appManager: AppManager\n\n /**\n * Creates a new `AlgorandClientSender`\n * @param newGroup A lambda that starts a new `AlgoKitComposer` transaction group\n * @param assetManager An `AssetManager` instance\n */\n constructor(newGroup: () => AlgoKitComposer, assetManager: AssetManager, appManager: AppManager) {\n this._newGroup = newGroup\n this._assetManager = assetManager\n this._appManager = appManager\n }\n\n newGroup() {\n return this._newGroup()\n }\n\n private _send<T>(\n c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & ExecuteParams) => Promise<SendSingleTransactionResult> {\n return async (params) => {\n const composer = this._newGroup()\n\n // Ensure `this` is properly populated\n c(composer).apply(composer, [params])\n\n if (log?.preLog) {\n const transaction = (await composer.build()).transactions.at(-1)!.txn\n Config.getLogger(params?.suppressLog).debug(log.preLog(params, transaction))\n }\n\n const rawResult = await composer.execute(params)\n const result = {\n // Last item covers when a group is created by an app call with ABI transaction parameters\n transaction: rawResult.transactions.at(-1)!,\n confirmation: rawResult.confirmations.at(-1)!,\n txId: rawResult.txIds.at(-1)!,\n ...rawResult,\n }\n\n if (log?.postLog) {\n Config.getLogger(params?.suppressLog).debug(log.postLog(params, result))\n }\n\n return result\n }\n }\n\n private _sendAppCall<\n T extends\n | AppCreateParams\n | AppUpdateParams\n | AppCallParams\n | AppDeleteParams\n | AppCreateMethodCall\n | AppUpdateMethodCall\n | AppCallMethodCall\n | AppDeleteMethodCall,\n >(\n c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & ExecuteParams) => Promise<SendAppTransactionResult> {\n return async (params) => {\n const result = await this._send(c, log)(params)\n\n return { ...result, return: AppManager.getABIReturn(result.confirmation, 'method' in params ? params.method : undefined) }\n }\n }\n\n private _sendAppUpdateCall<T extends AppCreateParams | AppUpdateParams | AppCreateMethodCall | AppUpdateMethodCall>(\n c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & ExecuteParams) => Promise<SendAppUpdateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppCall(c, log)(params)\n\n const compiledApproval =\n typeof params.approvalProgram === 'string' ? this._appManager.getCompilationResult(params.approvalProgram) : undefined\n const compiledClear =\n typeof params.clearStateProgram === 'string' ? this._appManager.getCompilationResult(params.clearStateProgram) : undefined\n\n return { ...result, compiledApproval, compiledClear }\n }\n }\n\n private _sendAppCreateCall<T extends AppCreateParams | AppCreateMethodCall>(\n c: (c: AlgoKitComposer) => (params: T) => AlgoKitComposer,\n log?: {\n preLog?: (params: T, transaction: Transaction) => string\n postLog?: (params: T, result: SendSingleTransactionResult) => string\n },\n ): (params: T & ExecuteParams) => Promise<SendAppCreateTransactionResult> {\n return async (params) => {\n const result = await this._sendAppUpdateCall(c, log)(params)\n\n return {\n ...result,\n appId: BigInt(result.confirmation.applicationIndex!),\n appAddress: algosdk.getApplicationAddress(result.confirmation.applicationIndex!),\n }\n }\n }\n\n /**\n * Send a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * const result = await algorand.send.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n *\n * @returns The result of the transaction and the transaction that was sent\n */\n payment = this._send((c) => c.addPayment, {\n preLog: (params, transaction) =>\n `Sending ${params.amount.microAlgo} µALGO from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Create a new Algorand Standard Asset.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetCreate({sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetCreate = async (params: AssetCreateParams & ExecuteParams) => {\n const result = await this._send((c) => c.addAssetCreate, {\n postLog: (params, result) =>\n `Created asset${params.assetName ? ` ${params.assetName}` : ''}${params.unitName ? ` (${params.unitName})` : ''} with ${params.total} units and ${params.decimals ?? 0} decimals created by ${params.sender} with ID ${result.confirmation.assetIndex} via transaction ${result.txIds.at(-1)}`,\n })(params)\n return { ...result, assetId: BigInt(result.confirmation.assetIndex ?? 0) }\n }\n /**\n * Configure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetConfig({sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetConfig = this._send((c) => c.addAssetConfig, {\n preLog: (params, transaction) => `Configuring asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Freeze or unfreeze an Algorand Standard Asset for an account.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetFreeze({sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetFreeze = this._send((c) => c.addAssetFreeze, {\n preLog: (params, transaction) => `Freezing asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Destroys an Algorand Standard Asset.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetDestroy({sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetDestroy = this._send((c) => c.addAssetDestroy, {\n preLog: (params, transaction) => `Destroying asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Transfer an Algorand Standard Asset.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetTransfer({sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.send.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetTransfer = this._send((c) => c.addAssetTransfer, {\n preLog: (params, transaction) =>\n `Transferring ${params.amount} units of asset with ID ${params.assetId} from ${params.sender} to ${params.receiver} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account into an Algorand Standard Asset.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.send.assetOptIn({sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetOptIn = this._send((c) => c.addAssetOptIn, {\n preLog: (params, transaction) => `Opting in ${params.sender} to asset with ID ${params.assetId} via transaction ${transaction.txID()}`,\n })\n /**\n * Opt an account out of an Algorand Standard Asset.\n *\n * *Note:* If the account has a balance of the asset,\n * it will not be able to opt-out unless `ensureZeroBalance`\n * is set to `false` (but then the account will lose the assets).\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example (without creator, will be retrieved from algod)\n * ```typescript\n * await algorand.send.assetOptOut({sender: \"SENDERADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Basic example (with creator)\n * ```typescript\n * await algorand.send.assetOptOut({sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.assetOptOut({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n * })\n * ```\n * @returns The result of the transaction and the transaction that was sent\n */\n assetOptOut = async (\n params: Omit<AssetOptOutParams, 'creator'> & {\n /** Optional asset creator account address; if not specified it will be retrieved from algod */\n creator?: string\n /** Whether or not to check if the account has a zero balance first or not.\n *\n * If this is set to `true` and the account has an asset balance it will throw an error.\n *\n * If this is set to `false` and the account has an asset balance it will lose those assets to the asset creator.\n */\n ensureZeroBalance: boolean\n } & ExecuteParams,\n ) => {\n if (params.ensureZeroBalance) {\n let balance = 0n\n try {\n const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId)\n balance = accountAssetInfo.balance\n } catch {\n throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`)\n }\n if (balance !== 0n) {\n throw new Error(`Account ${params.sender} does not have a zero balance for Asset ${params.assetId}; can't opt-out.`)\n }\n }\n\n params.creator = params.creator ?? (await this._assetManager.getById(params.assetId)).creator\n\n return await this._send((c) => c.addAssetOptOut, {\n preLog: (params, transaction) =>\n `Opting ${params.sender} out of asset with ID ${params.assetId} to creator ${params.creator} via transaction ${transaction.txID()}`,\n })(params as AssetOptOutParams & ExecuteParams)\n }\n /**\n * Create a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreate = this._sendAppCreateCall((c) => c.addAppCreate, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdate = this._sendAppUpdateCall((c) => c.addAppUpdate, {\n postLog: (params, result) =>\n `App ${params.appId} updated ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDelete = this._sendAppCall((c) => c.addAppDelete, {\n postLog: (params, result) =>\n `App ${params.appId} deleted ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.send.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.send.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCall = this._sendAppCall((c) => c.addAppCall, {\n postLog: (params, result) =>\n `App ${params.appId} called ${params.args ? ` with ${params.args.map((a) => Buffer.from(a).toString('base64'))}` : ''} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Create a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * const createdAppId = result.appId\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCreate({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCreateMethodCall = this._sendAppCreateCall((c) => c.addAppCreateMethodCall, {\n postLog: (params, result) =>\n `App created by ${params.sender} with ID ${result.confirmation.applicationIndex} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Update a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appUpdateMethodCall = this._sendAppUpdateCall((c) => c.addAppUpdateMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} updated with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Delete a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appDeleteMethodCall = this._sendAppCall((c) => c.addAppDeleteMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} deleted with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /**\n * Call a smart contract via an ABI method.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.send.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: algosdk.OnApplicationComplete.OptInOC,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * // Signer only needed if you want to provide one,\n * // generally you'd register it with AlgorandClient\n * // against the sender and not need to pass it in\n * signer: transactionSigner,\n * maxRoundsToWaitForConfirmation: 5,\n * suppressLog: true,\n *})\n * ```\n */\n appCallMethodCall = this._sendAppCall((c) => c.addAppCallMethodCall, {\n postLog: (params, result) =>\n `App ${params.appId} called with ${getMethodCallForLog(params)} by ${params.sender} via transaction ${result.txIds.at(-1)}`,\n })\n\n /** Register an online key. */\n onlineKeyRegistration = this._send((c) => c.addOnlineKeyRegistration, {\n preLog: (params, transaction) => `Registering online key for ${params.sender} via transaction ${transaction.txID()}`,\n })\n}\n"],"names":["Buffer","Config","AppManager"],"mappings":";;;;;;;AAqBA,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAmD,KAAI;AAChG,IAAA,OAAO,CAAG,EAAA,MAAM,CAAC,IAAI,CAAI,CAAA,EAA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GACpB,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;YACxH,MAAM,aAAa,GACjB,OAAO,MAAM,CAAC,iBAAiB,KAAK,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;YAE5H,OAAO,EAAE,GAAG,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAA;AACvD,SAAC,CAAA;KACF;IAEO,kBAAkB,CACxB,CAAyD,EACzD,GAGC,EAAA;AAED,QAAA,OAAO,OAAO,MAAM,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;YAE5D,OAAO;AACL,gBAAA,GAAG,MAAM;gBACT,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;gBACpD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAiB,CAAC;aACjF,CAAA;AACH,SAAC,CAAA;KACF;AA2yBF;;;;"}
@@ -366,7 +366,7 @@ class AlgorandClientTransactionSender {
366
366
  const accountAssetInfo = await this._assetManager.getAccountInformation(params.sender, params.assetId);
367
367
  balance = accountAssetInfo.balance;
368
368
  }
369
- catch (e) {
369
+ catch {
370
370
  throw new Error(`Account ${params.sender} is not opted-in to Asset ${params.assetId}; can't opt-out.`);
371
371
  }
372
372
  if (balance !== 0n) {