algosdk 1.23.2 → 1.24.1

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 (909) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/abi/abi_type.js +693 -0
  5. package/dist/cjs/abi/abi_type.js.map +1 -0
  6. package/dist/cjs/{src/abi → abi}/contract.js +0 -0
  7. package/dist/cjs/abi/contract.js.map +1 -0
  8. package/dist/cjs/{src/abi → abi}/index.js +0 -0
  9. package/dist/cjs/abi/index.js.map +1 -0
  10. package/dist/cjs/{src/abi → abi}/interface.js +0 -0
  11. package/dist/cjs/abi/interface.js.map +1 -0
  12. package/dist/cjs/{src/abi → abi}/method.js +0 -0
  13. package/dist/cjs/abi/method.js.map +1 -0
  14. package/dist/cjs/{src/abi → abi}/reference.js +0 -0
  15. package/dist/cjs/abi/reference.js.map +1 -0
  16. package/dist/cjs/{src/abi → abi}/transaction.js +0 -0
  17. package/dist/cjs/abi/transaction.js.map +1 -0
  18. package/dist/cjs/{src/account.js → account.js} +0 -0
  19. package/dist/cjs/account.js.map +1 -0
  20. package/dist/cjs/{src/bid.js → bid.js} +0 -0
  21. package/dist/cjs/bid.js.map +1 -0
  22. package/dist/cjs/{src/boxStorage.js → boxStorage.js} +0 -0
  23. package/dist/cjs/boxStorage.js.map +1 -0
  24. package/dist/cjs/{src/client → client}/algod.js +0 -0
  25. package/dist/cjs/client/algod.js.map +1 -0
  26. package/dist/cjs/{src/client → client}/baseHTTPClient.js +0 -0
  27. package/dist/cjs/client/baseHTTPClient.js.map +1 -0
  28. package/dist/cjs/{src/client → client}/client.js +0 -0
  29. package/dist/cjs/client/client.js.map +1 -0
  30. package/dist/cjs/{src/client → client}/kmd.js +0 -0
  31. package/dist/cjs/client/kmd.js.map +1 -0
  32. package/dist/cjs/{src/client → client}/urlTokenBaseHTTPClient.js +0 -0
  33. package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -0
  34. package/dist/cjs/{src/client → client}/v2/algod/accountApplicationInformation.js +0 -0
  35. package/dist/cjs/client/v2/algod/accountApplicationInformation.js.map +1 -0
  36. package/dist/cjs/{src/client → client}/v2/algod/accountAssetInformation.js +0 -0
  37. package/dist/cjs/client/v2/algod/accountAssetInformation.js.map +1 -0
  38. package/dist/cjs/{src/client → client}/v2/algod/accountInformation.js +0 -0
  39. package/dist/cjs/client/v2/algod/accountInformation.js.map +1 -0
  40. package/dist/cjs/{src/client → client}/v2/algod/algod.js +0 -0
  41. package/dist/cjs/client/v2/algod/algod.js.map +1 -0
  42. package/dist/cjs/{src/client → client}/v2/algod/block.js +0 -0
  43. package/dist/cjs/client/v2/algod/block.js.map +1 -0
  44. package/dist/cjs/{src/client → client}/v2/algod/compile.js +0 -0
  45. package/dist/cjs/client/v2/algod/compile.js.map +1 -0
  46. package/dist/cjs/{src/client → client}/v2/algod/dryrun.js +0 -0
  47. package/dist/cjs/client/v2/algod/dryrun.js.map +1 -0
  48. package/dist/cjs/{src/client → client}/v2/algod/genesis.js +0 -0
  49. package/dist/cjs/client/v2/algod/genesis.js.map +1 -0
  50. package/dist/cjs/{src/client → client}/v2/algod/getApplicationBoxByName.js +0 -0
  51. package/dist/cjs/client/v2/algod/getApplicationBoxByName.js.map +1 -0
  52. package/dist/cjs/{src/client → client}/v2/algod/getApplicationBoxes.js +0 -0
  53. package/dist/cjs/client/v2/algod/getApplicationBoxes.js.map +1 -0
  54. package/dist/cjs/{src/client → client}/v2/algod/getApplicationByID.js +0 -0
  55. package/dist/cjs/client/v2/algod/getApplicationByID.js.map +1 -0
  56. package/dist/cjs/{src/client → client}/v2/algod/getAssetByID.js +0 -0
  57. package/dist/cjs/client/v2/algod/getAssetByID.js.map +1 -0
  58. package/dist/cjs/{src/client → client}/v2/algod/getBlockHash.js +0 -0
  59. package/dist/cjs/client/v2/algod/getBlockHash.js.map +1 -0
  60. package/dist/cjs/{src/client → client}/v2/algod/getTransactionProof.js +0 -0
  61. package/dist/cjs/client/v2/algod/getTransactionProof.js.map +1 -0
  62. package/dist/cjs/{src/client → client}/v2/algod/healthCheck.js +0 -0
  63. package/dist/cjs/client/v2/algod/healthCheck.js.map +1 -0
  64. package/dist/cjs/{src/client → client}/v2/algod/lightBlockHeaderProof.js +0 -0
  65. package/dist/cjs/client/v2/algod/lightBlockHeaderProof.js.map +1 -0
  66. package/dist/cjs/client/v2/algod/models/types.js +2047 -0
  67. package/dist/cjs/client/v2/algod/models/types.js.map +1 -0
  68. package/dist/cjs/{src/client → client}/v2/algod/pendingTransactionInformation.js +0 -0
  69. package/dist/cjs/client/v2/algod/pendingTransactionInformation.js.map +1 -0
  70. package/dist/cjs/{src/client → client}/v2/algod/pendingTransactions.js +0 -0
  71. package/dist/cjs/client/v2/algod/pendingTransactions.js.map +1 -0
  72. package/dist/cjs/{src/client → client}/v2/algod/pendingTransactionsByAddress.js +0 -0
  73. package/dist/cjs/client/v2/algod/pendingTransactionsByAddress.js.map +1 -0
  74. package/dist/cjs/{src/client → client}/v2/algod/sendRawTransaction.js +0 -0
  75. package/dist/cjs/client/v2/algod/sendRawTransaction.js.map +1 -0
  76. package/dist/cjs/{src/client → client}/v2/algod/stateproof.js +0 -0
  77. package/dist/cjs/client/v2/algod/stateproof.js.map +1 -0
  78. package/dist/cjs/{src/client → client}/v2/algod/status.js +0 -0
  79. package/dist/cjs/client/v2/algod/status.js.map +1 -0
  80. package/dist/cjs/{src/client → client}/v2/algod/statusAfterBlock.js +0 -0
  81. package/dist/cjs/client/v2/algod/statusAfterBlock.js.map +1 -0
  82. package/dist/cjs/{src/client → client}/v2/algod/suggestedParams.js +0 -0
  83. package/dist/cjs/client/v2/algod/suggestedParams.js.map +1 -0
  84. package/dist/cjs/{src/client → client}/v2/algod/supply.js +0 -0
  85. package/dist/cjs/client/v2/algod/supply.js.map +1 -0
  86. package/dist/cjs/{src/client → client}/v2/algod/versions.js +0 -0
  87. package/dist/cjs/client/v2/algod/versions.js.map +1 -0
  88. package/dist/cjs/{src/client → client}/v2/basemodel.js +0 -0
  89. package/dist/cjs/client/v2/basemodel.js.map +1 -0
  90. package/dist/cjs/{src/client → client}/v2/indexer/indexer.js +0 -0
  91. package/dist/cjs/client/v2/indexer/indexer.js.map +1 -0
  92. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountAppLocalStates.js +0 -0
  93. package/dist/cjs/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
  94. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountAssets.js +0 -0
  95. package/dist/cjs/client/v2/indexer/lookupAccountAssets.js.map +1 -0
  96. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountByID.js +0 -0
  97. package/dist/cjs/client/v2/indexer/lookupAccountByID.js.map +1 -0
  98. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountCreatedApplications.js +0 -0
  99. package/dist/cjs/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
  100. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountCreatedAssets.js +0 -0
  101. package/dist/cjs/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
  102. package/dist/cjs/{src/client → client}/v2/indexer/lookupAccountTransactions.js +0 -0
  103. package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -0
  104. package/dist/cjs/{src/client → client}/v2/indexer/lookupApplicationBoxByIDandName.js +0 -0
  105. package/dist/cjs/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -0
  106. package/dist/cjs/{src/client → client}/v2/indexer/lookupApplicationLogs.js +0 -0
  107. package/dist/cjs/client/v2/indexer/lookupApplicationLogs.js.map +1 -0
  108. package/dist/cjs/{src/client → client}/v2/indexer/lookupApplications.js +0 -0
  109. package/dist/cjs/client/v2/indexer/lookupApplications.js.map +1 -0
  110. package/dist/cjs/{src/client → client}/v2/indexer/lookupAssetBalances.js +0 -0
  111. package/dist/cjs/client/v2/indexer/lookupAssetBalances.js.map +1 -0
  112. package/dist/cjs/{src/client → client}/v2/indexer/lookupAssetByID.js +0 -0
  113. package/dist/cjs/client/v2/indexer/lookupAssetByID.js.map +1 -0
  114. package/dist/cjs/{src/client → client}/v2/indexer/lookupAssetTransactions.js +0 -0
  115. package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -0
  116. package/dist/cjs/{src/client → client}/v2/indexer/lookupBlock.js +0 -0
  117. package/dist/cjs/client/v2/indexer/lookupBlock.js.map +1 -0
  118. package/dist/cjs/{src/client → client}/v2/indexer/lookupTransactionByID.js +0 -0
  119. package/dist/cjs/client/v2/indexer/lookupTransactionByID.js.map +1 -0
  120. package/dist/cjs/{src/client → client}/v2/indexer/makeHealthCheck.js +0 -0
  121. package/dist/cjs/client/v2/indexer/makeHealthCheck.js.map +1 -0
  122. package/dist/cjs/{src/client → client}/v2/indexer/models/types.js +0 -0
  123. package/dist/cjs/client/v2/indexer/models/types.js.map +1 -0
  124. package/dist/cjs/{src/client → client}/v2/indexer/searchAccounts.js +0 -0
  125. package/dist/cjs/client/v2/indexer/searchAccounts.js.map +1 -0
  126. package/dist/cjs/{src/client → client}/v2/indexer/searchForApplicationBoxes.js +0 -0
  127. package/dist/cjs/client/v2/indexer/searchForApplicationBoxes.js.map +1 -0
  128. package/dist/cjs/{src/client → client}/v2/indexer/searchForApplications.js +0 -0
  129. package/dist/cjs/client/v2/indexer/searchForApplications.js.map +1 -0
  130. package/dist/cjs/{src/client → client}/v2/indexer/searchForAssets.js +0 -0
  131. package/dist/cjs/client/v2/indexer/searchForAssets.js.map +1 -0
  132. package/dist/cjs/{src/client → client}/v2/indexer/searchForTransactions.js +0 -0
  133. package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -0
  134. package/dist/cjs/{src/client → client}/v2/jsonrequest.js +0 -0
  135. package/dist/cjs/client/v2/jsonrequest.js.map +1 -0
  136. package/dist/cjs/{src/client → client}/v2/serviceClient.js +0 -0
  137. package/dist/cjs/client/v2/serviceClient.js.map +1 -0
  138. package/dist/cjs/{src/composer.js → composer.js} +0 -0
  139. package/dist/cjs/composer.js.map +1 -0
  140. package/dist/cjs/{src/convert.js → convert.js} +0 -0
  141. package/dist/cjs/convert.js.map +1 -0
  142. package/dist/cjs/{src/dryrun.js → dryrun.js} +0 -0
  143. package/dist/cjs/dryrun.js.map +1 -0
  144. package/dist/cjs/{src/encoding → encoding}/address.js +0 -0
  145. package/dist/cjs/encoding/address.js.map +1 -0
  146. package/dist/cjs/{src/encoding → encoding}/bigint.js +0 -0
  147. package/dist/cjs/encoding/bigint.js.map +1 -0
  148. package/dist/cjs/{src/encoding → encoding}/encoding.js +0 -0
  149. package/dist/cjs/encoding/encoding.js.map +1 -0
  150. package/dist/cjs/{src/encoding → encoding}/uint64.js +0 -0
  151. package/dist/cjs/encoding/uint64.js.map +1 -0
  152. package/dist/cjs/{src/group.js → group.js} +0 -0
  153. package/dist/cjs/group.js.map +1 -0
  154. package/dist/cjs/index.js +2 -2
  155. package/dist/cjs/index.js.map +1 -1
  156. package/dist/cjs/{src/logic → logic}/langspec.json +0 -0
  157. package/dist/cjs/{src/logic → logic}/logic.js +0 -0
  158. package/dist/cjs/logic/logic.js.map +1 -0
  159. package/dist/cjs/{src/logic → logic}/sourcemap.js +0 -0
  160. package/dist/cjs/logic/sourcemap.js.map +1 -0
  161. package/dist/cjs/{src/logicTemplates → logicTemplates}/dynamicfee.js +0 -0
  162. package/dist/cjs/logicTemplates/dynamicfee.js.map +1 -0
  163. package/dist/cjs/{src/logicTemplates → logicTemplates}/htlc.js +0 -0
  164. package/dist/cjs/logicTemplates/htlc.js.map +1 -0
  165. package/dist/cjs/{src/logicTemplates → logicTemplates}/index.js +0 -0
  166. package/dist/cjs/logicTemplates/index.js.map +1 -0
  167. package/dist/cjs/{src/logicTemplates → logicTemplates}/limitorder.js +0 -0
  168. package/dist/cjs/logicTemplates/limitorder.js.map +1 -0
  169. package/dist/cjs/{src/logicTemplates → logicTemplates}/periodicpayment.js +0 -0
  170. package/dist/cjs/logicTemplates/periodicpayment.js.map +1 -0
  171. package/dist/cjs/{src/logicTemplates → logicTemplates}/split.js +0 -0
  172. package/dist/cjs/logicTemplates/split.js.map +1 -0
  173. package/dist/cjs/{src/logicTemplates → logicTemplates}/templates.js +0 -0
  174. package/dist/cjs/logicTemplates/templates.js.map +1 -0
  175. package/dist/cjs/{src/logicsig.js → logicsig.js} +0 -0
  176. package/dist/cjs/logicsig.js.map +1 -0
  177. package/dist/cjs/{src/main.js → main.js} +0 -0
  178. package/dist/cjs/main.js.map +1 -0
  179. package/dist/cjs/{src/makeTxn.js → makeTxn.js} +0 -0
  180. package/dist/cjs/makeTxn.js.map +1 -0
  181. package/dist/cjs/{src/mnemonic → mnemonic}/mnemonic.js +0 -0
  182. package/dist/cjs/mnemonic/mnemonic.js.map +1 -0
  183. package/dist/cjs/{src/mnemonic → mnemonic}/wordlists/english.js +0 -0
  184. package/dist/cjs/mnemonic/wordlists/english.js.map +1 -0
  185. package/dist/cjs/multisig.js +398 -0
  186. package/dist/cjs/multisig.js.map +1 -0
  187. package/dist/cjs/{src/nacl → nacl}/naclWrappers.js +0 -0
  188. package/dist/cjs/nacl/naclWrappers.js.map +1 -0
  189. package/dist/cjs/{src/signer.js → signer.js} +0 -0
  190. package/dist/cjs/signer.js.map +1 -0
  191. package/dist/cjs/{src/transaction.js → transaction.js} +0 -0
  192. package/dist/cjs/transaction.js.map +1 -0
  193. package/dist/cjs/{src/types → types}/account.js +0 -0
  194. package/dist/cjs/types/account.js.map +1 -0
  195. package/dist/cjs/{src/types → types}/address.js +0 -0
  196. package/dist/cjs/types/address.js.map +1 -0
  197. package/dist/cjs/{src/types → types}/blockHeader.js +0 -0
  198. package/dist/cjs/types/blockHeader.js.map +1 -0
  199. package/dist/cjs/{src/types → types}/index.js +0 -0
  200. package/dist/cjs/types/index.js.map +1 -0
  201. package/dist/cjs/{src/types → types}/intDecoding.js +0 -0
  202. package/dist/cjs/types/intDecoding.js.map +1 -0
  203. package/dist/cjs/{src/types → types}/multisig.js +0 -0
  204. package/dist/cjs/types/multisig.js.map +1 -0
  205. package/dist/cjs/{src/types → types}/transactions/application.js +0 -0
  206. package/dist/cjs/types/transactions/application.js.map +1 -0
  207. package/dist/cjs/{src/types → types}/transactions/asset.js +0 -0
  208. package/dist/cjs/types/transactions/asset.js.map +1 -0
  209. package/dist/cjs/{src/types → types}/transactions/base.js +0 -0
  210. package/dist/cjs/types/transactions/base.js.map +1 -0
  211. package/dist/cjs/{src/types → types}/transactions/builder.js +0 -0
  212. package/dist/cjs/types/transactions/builder.js.map +1 -0
  213. package/dist/cjs/{src/types → types}/transactions/encoded.js +0 -0
  214. package/dist/cjs/types/transactions/encoded.js.map +1 -0
  215. package/dist/cjs/{src/types → types}/transactions/index.js +0 -0
  216. package/dist/cjs/types/transactions/index.js.map +1 -0
  217. package/dist/cjs/{src/types → types}/transactions/keyreg.js +0 -0
  218. package/dist/cjs/types/transactions/keyreg.js.map +1 -0
  219. package/dist/cjs/{src/types → types}/transactions/payment.js +0 -0
  220. package/dist/cjs/types/transactions/payment.js.map +1 -0
  221. package/dist/cjs/{src/types → types}/transactions/stateproof.js +0 -0
  222. package/dist/cjs/types/transactions/stateproof.js.map +1 -0
  223. package/dist/cjs/{src/types → types}/utils.js +0 -0
  224. package/dist/cjs/types/utils.js.map +1 -0
  225. package/dist/cjs/{src/utils → utils}/utils.js +0 -0
  226. package/dist/cjs/utils/utils.js.map +1 -0
  227. package/dist/cjs/{src/wait.js → wait.js} +0 -0
  228. package/dist/cjs/wait.js.map +1 -0
  229. package/dist/esm/abi/abi_type.js +680 -0
  230. package/dist/esm/abi/abi_type.js.map +1 -0
  231. package/dist/esm/{src/abi → abi}/contract.js +0 -0
  232. package/dist/esm/abi/contract.js.map +1 -0
  233. package/dist/esm/{src/abi → abi}/index.js +0 -0
  234. package/dist/esm/abi/index.js.map +1 -0
  235. package/dist/esm/{src/abi → abi}/interface.js +0 -0
  236. package/dist/esm/abi/interface.js.map +1 -0
  237. package/dist/esm/{src/abi → abi}/method.js +0 -0
  238. package/dist/esm/abi/method.js.map +1 -0
  239. package/dist/esm/{src/abi → abi}/reference.js +0 -0
  240. package/dist/esm/abi/reference.js.map +1 -0
  241. package/dist/esm/{src/abi → abi}/transaction.js +0 -0
  242. package/dist/esm/abi/transaction.js.map +1 -0
  243. package/dist/esm/{src/account.js → account.js} +0 -0
  244. package/dist/esm/account.js.map +1 -0
  245. package/dist/esm/{src/bid.js → bid.js} +0 -0
  246. package/dist/esm/bid.js.map +1 -0
  247. package/dist/esm/{src/boxStorage.js → boxStorage.js} +0 -0
  248. package/dist/esm/boxStorage.js.map +1 -0
  249. package/dist/esm/{src/client → client}/algod.js +0 -0
  250. package/dist/esm/client/algod.js.map +1 -0
  251. package/dist/esm/{src/client → client}/baseHTTPClient.js +0 -0
  252. package/dist/esm/client/baseHTTPClient.js.map +1 -0
  253. package/dist/esm/{src/client → client}/client.js +0 -0
  254. package/dist/esm/client/client.js.map +1 -0
  255. package/dist/esm/{src/client → client}/kmd.js +0 -0
  256. package/dist/esm/client/kmd.js.map +1 -0
  257. package/dist/esm/{src/client → client}/urlTokenBaseHTTPClient.js +0 -0
  258. package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -0
  259. package/dist/esm/{src/client → client}/v2/algod/accountApplicationInformation.js +0 -0
  260. package/dist/esm/client/v2/algod/accountApplicationInformation.js.map +1 -0
  261. package/dist/esm/{src/client → client}/v2/algod/accountAssetInformation.js +0 -0
  262. package/dist/esm/client/v2/algod/accountAssetInformation.js.map +1 -0
  263. package/dist/esm/{src/client → client}/v2/algod/accountInformation.js +0 -0
  264. package/dist/esm/client/v2/algod/accountInformation.js.map +1 -0
  265. package/dist/esm/{src/client → client}/v2/algod/algod.js +0 -0
  266. package/dist/esm/client/v2/algod/algod.js.map +1 -0
  267. package/dist/esm/{src/client → client}/v2/algod/block.js +0 -0
  268. package/dist/esm/client/v2/algod/block.js.map +1 -0
  269. package/dist/esm/{src/client → client}/v2/algod/compile.js +0 -0
  270. package/dist/esm/client/v2/algod/compile.js.map +1 -0
  271. package/dist/esm/{src/client → client}/v2/algod/dryrun.js +0 -0
  272. package/dist/esm/client/v2/algod/dryrun.js.map +1 -0
  273. package/dist/esm/{src/client → client}/v2/algod/genesis.js +0 -0
  274. package/dist/esm/client/v2/algod/genesis.js.map +1 -0
  275. package/dist/esm/{src/client → client}/v2/algod/getApplicationBoxByName.js +0 -0
  276. package/dist/esm/client/v2/algod/getApplicationBoxByName.js.map +1 -0
  277. package/dist/esm/{src/client → client}/v2/algod/getApplicationBoxes.js +0 -0
  278. package/dist/esm/client/v2/algod/getApplicationBoxes.js.map +1 -0
  279. package/dist/esm/{src/client → client}/v2/algod/getApplicationByID.js +0 -0
  280. package/dist/esm/client/v2/algod/getApplicationByID.js.map +1 -0
  281. package/dist/esm/{src/client → client}/v2/algod/getAssetByID.js +0 -0
  282. package/dist/esm/client/v2/algod/getAssetByID.js.map +1 -0
  283. package/dist/esm/{src/client → client}/v2/algod/getBlockHash.js +0 -0
  284. package/dist/esm/client/v2/algod/getBlockHash.js.map +1 -0
  285. package/dist/esm/{src/client → client}/v2/algod/getTransactionProof.js +0 -0
  286. package/dist/esm/client/v2/algod/getTransactionProof.js.map +1 -0
  287. package/dist/esm/{src/client → client}/v2/algod/healthCheck.js +0 -0
  288. package/dist/esm/client/v2/algod/healthCheck.js.map +1 -0
  289. package/dist/esm/{src/client → client}/v2/algod/lightBlockHeaderProof.js +0 -0
  290. package/dist/esm/client/v2/algod/lightBlockHeaderProof.js.map +1 -0
  291. package/dist/esm/client/v2/algod/models/types.js +1998 -0
  292. package/dist/esm/client/v2/algod/models/types.js.map +1 -0
  293. package/dist/esm/{src/client → client}/v2/algod/pendingTransactionInformation.js +0 -0
  294. package/dist/esm/client/v2/algod/pendingTransactionInformation.js.map +1 -0
  295. package/dist/esm/{src/client → client}/v2/algod/pendingTransactions.js +0 -0
  296. package/dist/esm/client/v2/algod/pendingTransactions.js.map +1 -0
  297. package/dist/esm/{src/client → client}/v2/algod/pendingTransactionsByAddress.js +0 -0
  298. package/dist/esm/client/v2/algod/pendingTransactionsByAddress.js.map +1 -0
  299. package/dist/esm/{src/client → client}/v2/algod/sendRawTransaction.js +0 -0
  300. package/dist/esm/client/v2/algod/sendRawTransaction.js.map +1 -0
  301. package/dist/esm/{src/client → client}/v2/algod/stateproof.js +0 -0
  302. package/dist/esm/client/v2/algod/stateproof.js.map +1 -0
  303. package/dist/esm/{src/client → client}/v2/algod/status.js +0 -0
  304. package/dist/esm/client/v2/algod/status.js.map +1 -0
  305. package/dist/esm/{src/client → client}/v2/algod/statusAfterBlock.js +0 -0
  306. package/dist/esm/client/v2/algod/statusAfterBlock.js.map +1 -0
  307. package/dist/esm/{src/client → client}/v2/algod/suggestedParams.js +0 -0
  308. package/dist/esm/client/v2/algod/suggestedParams.js.map +1 -0
  309. package/dist/esm/{src/client → client}/v2/algod/supply.js +0 -0
  310. package/dist/esm/client/v2/algod/supply.js.map +1 -0
  311. package/dist/esm/{src/client → client}/v2/algod/versions.js +0 -0
  312. package/dist/esm/client/v2/algod/versions.js.map +1 -0
  313. package/dist/esm/{src/client → client}/v2/basemodel.js +0 -0
  314. package/dist/esm/client/v2/basemodel.js.map +1 -0
  315. package/dist/esm/{src/client → client}/v2/indexer/indexer.js +0 -0
  316. package/dist/esm/client/v2/indexer/indexer.js.map +1 -0
  317. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountAppLocalStates.js +0 -0
  318. package/dist/esm/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
  319. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountAssets.js +0 -0
  320. package/dist/esm/client/v2/indexer/lookupAccountAssets.js.map +1 -0
  321. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountByID.js +0 -0
  322. package/dist/esm/client/v2/indexer/lookupAccountByID.js.map +1 -0
  323. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountCreatedApplications.js +0 -0
  324. package/dist/esm/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
  325. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountCreatedAssets.js +0 -0
  326. package/dist/esm/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
  327. package/dist/esm/{src/client → client}/v2/indexer/lookupAccountTransactions.js +0 -0
  328. package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -0
  329. package/dist/esm/{src/client → client}/v2/indexer/lookupApplicationBoxByIDandName.js +0 -0
  330. package/dist/esm/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +1 -0
  331. package/dist/esm/{src/client → client}/v2/indexer/lookupApplicationLogs.js +0 -0
  332. package/dist/esm/client/v2/indexer/lookupApplicationLogs.js.map +1 -0
  333. package/dist/esm/{src/client → client}/v2/indexer/lookupApplications.js +0 -0
  334. package/dist/esm/client/v2/indexer/lookupApplications.js.map +1 -0
  335. package/dist/esm/{src/client → client}/v2/indexer/lookupAssetBalances.js +0 -0
  336. package/dist/esm/client/v2/indexer/lookupAssetBalances.js.map +1 -0
  337. package/dist/esm/{src/client → client}/v2/indexer/lookupAssetByID.js +0 -0
  338. package/dist/esm/client/v2/indexer/lookupAssetByID.js.map +1 -0
  339. package/dist/esm/{src/client → client}/v2/indexer/lookupAssetTransactions.js +0 -0
  340. package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -0
  341. package/dist/esm/{src/client → client}/v2/indexer/lookupBlock.js +0 -0
  342. package/dist/esm/client/v2/indexer/lookupBlock.js.map +1 -0
  343. package/dist/esm/{src/client → client}/v2/indexer/lookupTransactionByID.js +0 -0
  344. package/dist/esm/client/v2/indexer/lookupTransactionByID.js.map +1 -0
  345. package/dist/esm/{src/client → client}/v2/indexer/makeHealthCheck.js +0 -0
  346. package/dist/esm/client/v2/indexer/makeHealthCheck.js.map +1 -0
  347. package/dist/esm/{src/client → client}/v2/indexer/models/types.js +0 -0
  348. package/dist/esm/client/v2/indexer/models/types.js.map +1 -0
  349. package/dist/esm/{src/client → client}/v2/indexer/searchAccounts.js +0 -0
  350. package/dist/esm/client/v2/indexer/searchAccounts.js.map +1 -0
  351. package/dist/esm/{src/client → client}/v2/indexer/searchForApplicationBoxes.js +0 -0
  352. package/dist/esm/client/v2/indexer/searchForApplicationBoxes.js.map +1 -0
  353. package/dist/esm/{src/client → client}/v2/indexer/searchForApplications.js +0 -0
  354. package/dist/esm/client/v2/indexer/searchForApplications.js.map +1 -0
  355. package/dist/esm/{src/client → client}/v2/indexer/searchForAssets.js +0 -0
  356. package/dist/esm/client/v2/indexer/searchForAssets.js.map +1 -0
  357. package/dist/esm/{src/client → client}/v2/indexer/searchForTransactions.js +0 -0
  358. package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -0
  359. package/dist/esm/{src/client → client}/v2/jsonrequest.js +0 -0
  360. package/dist/esm/client/v2/jsonrequest.js.map +1 -0
  361. package/dist/esm/{src/client → client}/v2/serviceClient.js +0 -0
  362. package/dist/esm/client/v2/serviceClient.js.map +1 -0
  363. package/dist/esm/{src/composer.js → composer.js} +0 -0
  364. package/dist/esm/composer.js.map +1 -0
  365. package/dist/esm/{src/convert.js → convert.js} +0 -0
  366. package/dist/esm/convert.js.map +1 -0
  367. package/dist/esm/{src/dryrun.js → dryrun.js} +0 -0
  368. package/dist/esm/dryrun.js.map +1 -0
  369. package/dist/esm/{src/encoding → encoding}/address.js +0 -0
  370. package/dist/esm/encoding/address.js.map +1 -0
  371. package/dist/esm/{src/encoding → encoding}/bigint.js +0 -0
  372. package/dist/esm/encoding/bigint.js.map +1 -0
  373. package/dist/esm/{src/encoding → encoding}/encoding.js +0 -0
  374. package/dist/esm/encoding/encoding.js.map +1 -0
  375. package/dist/esm/{src/encoding → encoding}/uint64.js +0 -0
  376. package/dist/esm/encoding/uint64.js.map +1 -0
  377. package/dist/esm/{src/group.js → group.js} +0 -0
  378. package/dist/esm/group.js.map +1 -0
  379. package/dist/esm/index.js +2 -2
  380. package/dist/esm/index.js.map +1 -1
  381. package/dist/esm/{src/logic → logic}/langspec.json +0 -0
  382. package/dist/esm/{src/logic → logic}/logic.js +0 -0
  383. package/dist/esm/logic/logic.js.map +1 -0
  384. package/dist/esm/{src/logic → logic}/sourcemap.js +0 -0
  385. package/dist/esm/logic/sourcemap.js.map +1 -0
  386. package/dist/esm/{src/logicTemplates → logicTemplates}/dynamicfee.js +0 -0
  387. package/dist/esm/logicTemplates/dynamicfee.js.map +1 -0
  388. package/dist/esm/{src/logicTemplates → logicTemplates}/htlc.js +0 -0
  389. package/dist/esm/logicTemplates/htlc.js.map +1 -0
  390. package/dist/esm/{src/logicTemplates → logicTemplates}/index.js +0 -0
  391. package/dist/esm/logicTemplates/index.js.map +1 -0
  392. package/dist/esm/{src/logicTemplates → logicTemplates}/limitorder.js +0 -0
  393. package/dist/esm/logicTemplates/limitorder.js.map +1 -0
  394. package/dist/esm/{src/logicTemplates → logicTemplates}/periodicpayment.js +0 -0
  395. package/dist/esm/logicTemplates/periodicpayment.js.map +1 -0
  396. package/dist/esm/{src/logicTemplates → logicTemplates}/split.js +0 -0
  397. package/dist/esm/logicTemplates/split.js.map +1 -0
  398. package/dist/esm/{src/logicTemplates → logicTemplates}/templates.js +0 -0
  399. package/dist/esm/logicTemplates/templates.js.map +1 -0
  400. package/dist/esm/{src/logicsig.js → logicsig.js} +0 -0
  401. package/dist/esm/logicsig.js.map +1 -0
  402. package/dist/esm/{src/main.js → main.js} +0 -0
  403. package/dist/esm/main.js.map +1 -0
  404. package/dist/esm/{src/makeTxn.js → makeTxn.js} +0 -0
  405. package/dist/esm/makeTxn.js.map +1 -0
  406. package/dist/esm/{src/mnemonic → mnemonic}/mnemonic.js +0 -0
  407. package/dist/esm/mnemonic/mnemonic.js.map +1 -0
  408. package/dist/esm/{src/mnemonic → mnemonic}/wordlists/english.js +0 -0
  409. package/dist/esm/mnemonic/wordlists/english.js.map +1 -0
  410. package/dist/esm/multisig.js +364 -0
  411. package/dist/esm/multisig.js.map +1 -0
  412. package/dist/esm/{src/nacl → nacl}/naclWrappers.js +0 -0
  413. package/dist/esm/nacl/naclWrappers.js.map +1 -0
  414. package/dist/esm/{src/signer.js → signer.js} +0 -0
  415. package/dist/esm/signer.js.map +1 -0
  416. package/dist/esm/{src/transaction.js → transaction.js} +0 -0
  417. package/dist/esm/transaction.js.map +1 -0
  418. package/dist/esm/{src/types → types}/account.js +0 -0
  419. package/dist/esm/types/account.js.map +1 -0
  420. package/dist/esm/{src/types → types}/address.js +0 -0
  421. package/dist/esm/types/address.js.map +1 -0
  422. package/dist/esm/{src/types → types}/blockHeader.js +0 -0
  423. package/dist/esm/types/blockHeader.js.map +1 -0
  424. package/dist/esm/{src/types → types}/index.js +0 -0
  425. package/dist/esm/types/index.js.map +1 -0
  426. package/dist/esm/{src/types → types}/intDecoding.js +0 -0
  427. package/dist/esm/types/intDecoding.js.map +1 -0
  428. package/dist/esm/{src/types → types}/multisig.js +0 -0
  429. package/dist/esm/types/multisig.js.map +1 -0
  430. package/dist/esm/{src/types → types}/transactions/application.js +0 -0
  431. package/dist/esm/types/transactions/application.js.map +1 -0
  432. package/dist/esm/{src/types → types}/transactions/asset.js +0 -0
  433. package/dist/esm/types/transactions/asset.js.map +1 -0
  434. package/dist/esm/{src/types → types}/transactions/base.js +0 -0
  435. package/dist/esm/types/transactions/base.js.map +1 -0
  436. package/dist/esm/{src/types → types}/transactions/builder.js +0 -0
  437. package/dist/esm/types/transactions/builder.js.map +1 -0
  438. package/dist/esm/{src/types → types}/transactions/encoded.js +0 -0
  439. package/dist/esm/types/transactions/encoded.js.map +1 -0
  440. package/dist/esm/{src/types → types}/transactions/index.js +0 -0
  441. package/dist/esm/types/transactions/index.js.map +1 -0
  442. package/dist/esm/{src/types → types}/transactions/keyreg.js +0 -0
  443. package/dist/esm/types/transactions/keyreg.js.map +1 -0
  444. package/dist/esm/{src/types → types}/transactions/payment.js +0 -0
  445. package/dist/esm/types/transactions/payment.js.map +1 -0
  446. package/dist/esm/{src/types → types}/transactions/stateproof.js +0 -0
  447. package/dist/esm/types/transactions/stateproof.js.map +1 -0
  448. package/dist/esm/{src/types → types}/utils.js +0 -0
  449. package/dist/esm/types/utils.js.map +1 -0
  450. package/dist/esm/{src/utils → utils}/utils.js +0 -0
  451. package/dist/esm/utils/utils.js.map +1 -0
  452. package/dist/esm/{src/wait.js → wait.js} +0 -0
  453. package/dist/esm/wait.js.map +1 -0
  454. package/dist/types/{src/abi → abi}/abi_type.d.ts +0 -0
  455. package/dist/types/{src/abi → abi}/contract.d.ts +0 -0
  456. package/dist/types/{src/abi → abi}/index.d.ts +0 -0
  457. package/dist/types/{src/abi → abi}/interface.d.ts +0 -0
  458. package/dist/types/{src/abi → abi}/method.d.ts +0 -0
  459. package/dist/types/{src/abi → abi}/reference.d.ts +0 -0
  460. package/dist/types/{src/abi → abi}/transaction.d.ts +0 -0
  461. package/dist/types/{src/account.d.ts → account.d.ts} +0 -0
  462. package/dist/types/{src/bid.d.ts → bid.d.ts} +0 -0
  463. package/dist/types/{src/boxStorage.d.ts → boxStorage.d.ts} +0 -0
  464. package/dist/types/{src/client → client}/algod.d.ts +0 -0
  465. package/dist/types/{src/client → client}/baseHTTPClient.d.ts +0 -0
  466. package/dist/types/{src/client → client}/client.d.ts +0 -0
  467. package/dist/types/{src/client → client}/kmd.d.ts +0 -0
  468. package/dist/types/{src/client → client}/urlTokenBaseHTTPClient.d.ts +0 -0
  469. package/dist/types/{src/client → client}/v2/algod/accountApplicationInformation.d.ts +0 -0
  470. package/dist/types/{src/client → client}/v2/algod/accountAssetInformation.d.ts +0 -0
  471. package/dist/types/{src/client → client}/v2/algod/accountInformation.d.ts +0 -0
  472. package/dist/types/{src/client → client}/v2/algod/algod.d.ts +0 -0
  473. package/dist/types/{src/client → client}/v2/algod/block.d.ts +0 -0
  474. package/dist/types/{src/client → client}/v2/algod/compile.d.ts +0 -0
  475. package/dist/types/{src/client → client}/v2/algod/dryrun.d.ts +0 -0
  476. package/dist/types/{src/client → client}/v2/algod/genesis.d.ts +0 -0
  477. package/dist/types/{src/client → client}/v2/algod/getApplicationBoxByName.d.ts +0 -0
  478. package/dist/types/{src/client → client}/v2/algod/getApplicationBoxes.d.ts +0 -0
  479. package/dist/types/{src/client → client}/v2/algod/getApplicationByID.d.ts +0 -0
  480. package/dist/types/{src/client → client}/v2/algod/getAssetByID.d.ts +0 -0
  481. package/dist/types/{src/client → client}/v2/algod/getBlockHash.d.ts +0 -0
  482. package/dist/types/{src/client → client}/v2/algod/getTransactionProof.d.ts +0 -0
  483. package/dist/types/{src/client → client}/v2/algod/healthCheck.d.ts +0 -0
  484. package/dist/types/{src/client → client}/v2/algod/lightBlockHeaderProof.d.ts +0 -0
  485. package/dist/types/client/v2/algod/models/types.d.ts +1634 -0
  486. package/dist/types/{src/client → client}/v2/algod/pendingTransactionInformation.d.ts +0 -0
  487. package/dist/types/{src/client → client}/v2/algod/pendingTransactions.d.ts +0 -0
  488. package/dist/types/{src/client → client}/v2/algod/pendingTransactionsByAddress.d.ts +0 -0
  489. package/dist/types/{src/client → client}/v2/algod/sendRawTransaction.d.ts +0 -0
  490. package/dist/types/{src/client → client}/v2/algod/stateproof.d.ts +0 -0
  491. package/dist/types/{src/client → client}/v2/algod/status.d.ts +0 -0
  492. package/dist/types/{src/client → client}/v2/algod/statusAfterBlock.d.ts +0 -0
  493. package/dist/types/{src/client → client}/v2/algod/suggestedParams.d.ts +0 -0
  494. package/dist/types/{src/client → client}/v2/algod/supply.d.ts +0 -0
  495. package/dist/types/{src/client → client}/v2/algod/versions.d.ts +0 -0
  496. package/dist/types/{src/client → client}/v2/basemodel.d.ts +0 -0
  497. package/dist/types/{src/client → client}/v2/indexer/indexer.d.ts +0 -0
  498. package/dist/types/{src/client → client}/v2/indexer/lookupAccountAppLocalStates.d.ts +0 -0
  499. package/dist/types/{src/client → client}/v2/indexer/lookupAccountAssets.d.ts +0 -0
  500. package/dist/types/{src/client → client}/v2/indexer/lookupAccountByID.d.ts +0 -0
  501. package/dist/types/{src/client → client}/v2/indexer/lookupAccountCreatedApplications.d.ts +0 -0
  502. package/dist/types/{src/client → client}/v2/indexer/lookupAccountCreatedAssets.d.ts +0 -0
  503. package/dist/types/{src/client → client}/v2/indexer/lookupAccountTransactions.d.ts +0 -0
  504. package/dist/types/{src/client → client}/v2/indexer/lookupApplicationBoxByIDandName.d.ts +0 -0
  505. package/dist/types/{src/client → client}/v2/indexer/lookupApplicationLogs.d.ts +0 -0
  506. package/dist/types/{src/client → client}/v2/indexer/lookupApplications.d.ts +0 -0
  507. package/dist/types/{src/client → client}/v2/indexer/lookupAssetBalances.d.ts +0 -0
  508. package/dist/types/{src/client → client}/v2/indexer/lookupAssetByID.d.ts +0 -0
  509. package/dist/types/{src/client → client}/v2/indexer/lookupAssetTransactions.d.ts +0 -0
  510. package/dist/types/{src/client → client}/v2/indexer/lookupBlock.d.ts +0 -0
  511. package/dist/types/{src/client → client}/v2/indexer/lookupTransactionByID.d.ts +0 -0
  512. package/dist/types/{src/client → client}/v2/indexer/makeHealthCheck.d.ts +0 -0
  513. package/dist/types/{src/client → client}/v2/indexer/models/types.d.ts +0 -0
  514. package/dist/types/{src/client → client}/v2/indexer/searchAccounts.d.ts +0 -0
  515. package/dist/types/{src/client → client}/v2/indexer/searchForApplicationBoxes.d.ts +0 -0
  516. package/dist/types/{src/client → client}/v2/indexer/searchForApplications.d.ts +0 -0
  517. package/dist/types/{src/client → client}/v2/indexer/searchForAssets.d.ts +0 -0
  518. package/dist/types/{src/client → client}/v2/indexer/searchForTransactions.d.ts +0 -0
  519. package/dist/types/{src/client → client}/v2/jsonrequest.d.ts +0 -0
  520. package/dist/types/{src/client → client}/v2/serviceClient.d.ts +0 -0
  521. package/dist/types/{src/composer.d.ts → composer.d.ts} +0 -0
  522. package/dist/types/{src/convert.d.ts → convert.d.ts} +0 -0
  523. package/dist/types/{src/dryrun.d.ts → dryrun.d.ts} +0 -0
  524. package/dist/types/{src/encoding → encoding}/address.d.ts +0 -0
  525. package/dist/types/{src/encoding → encoding}/bigint.d.ts +0 -0
  526. package/dist/types/{src/encoding → encoding}/encoding.d.ts +0 -0
  527. package/dist/types/{src/encoding → encoding}/uint64.d.ts +0 -0
  528. package/dist/types/{src/group.d.ts → group.d.ts} +0 -0
  529. package/dist/types/index.d.ts +2 -2
  530. package/dist/types/{src/logic → logic}/logic.d.ts +0 -0
  531. package/dist/types/{src/logic → logic}/sourcemap.d.ts +0 -0
  532. package/dist/types/{src/logicTemplates → logicTemplates}/dynamicfee.d.ts +0 -0
  533. package/dist/types/{src/logicTemplates → logicTemplates}/htlc.d.ts +0 -0
  534. package/dist/types/{src/logicTemplates → logicTemplates}/index.d.ts +0 -0
  535. package/dist/types/{src/logicTemplates → logicTemplates}/limitorder.d.ts +0 -0
  536. package/dist/types/{src/logicTemplates → logicTemplates}/periodicpayment.d.ts +0 -0
  537. package/dist/types/{src/logicTemplates → logicTemplates}/split.d.ts +0 -0
  538. package/dist/types/{src/logicTemplates → logicTemplates}/templates.d.ts +0 -0
  539. package/dist/types/{src/logicsig.d.ts → logicsig.d.ts} +0 -0
  540. package/dist/types/{src/main.d.ts → main.d.ts} +0 -0
  541. package/dist/types/{src/makeTxn.d.ts → makeTxn.d.ts} +0 -0
  542. package/dist/types/{src/mnemonic → mnemonic}/mnemonic.d.ts +0 -0
  543. package/dist/types/{src/mnemonic → mnemonic}/wordlists/english.d.ts +0 -0
  544. package/dist/types/multisig.d.ts +125 -0
  545. package/dist/types/{src/nacl → nacl}/naclWrappers.d.ts +0 -0
  546. package/dist/types/{src/signer.d.ts → signer.d.ts} +0 -0
  547. package/dist/types/{src/transaction.d.ts → transaction.d.ts} +0 -0
  548. package/dist/types/{src/types → types}/account.d.ts +0 -0
  549. package/dist/types/{src/types → types}/address.d.ts +0 -0
  550. package/dist/types/{src/types → types}/blockHeader.d.ts +0 -0
  551. package/dist/types/{src/types → types}/index.d.ts +0 -0
  552. package/dist/types/{src/types → types}/intDecoding.d.ts +0 -0
  553. package/dist/types/{src/types → types}/multisig.d.ts +0 -0
  554. package/dist/types/{src/types → types}/transactions/application.d.ts +0 -0
  555. package/dist/types/{src/types → types}/transactions/asset.d.ts +0 -0
  556. package/dist/types/{src/types → types}/transactions/base.d.ts +0 -0
  557. package/dist/types/{src/types → types}/transactions/builder.d.ts +0 -0
  558. package/dist/types/{src/types → types}/transactions/encoded.d.ts +0 -0
  559. package/dist/types/{src/types → types}/transactions/index.d.ts +0 -0
  560. package/dist/types/{src/types → types}/transactions/keyreg.d.ts +0 -0
  561. package/dist/types/{src/types → types}/transactions/payment.d.ts +0 -0
  562. package/dist/types/{src/types → types}/transactions/stateproof.d.ts +0 -0
  563. package/dist/types/{src/types → types}/utils.d.ts +0 -0
  564. package/dist/types/{src/utils → utils}/utils.d.ts +0 -0
  565. package/dist/types/{src/wait.d.ts → wait.d.ts} +0 -0
  566. package/package.json +10 -6
  567. package/src/abi/abi_type.ts +846 -0
  568. package/src/abi/contract.ts +51 -0
  569. package/src/abi/index.ts +6 -0
  570. package/src/abi/interface.ts +35 -0
  571. package/src/abi/method.ts +186 -0
  572. package/src/abi/reference.ts +24 -0
  573. package/src/abi/transaction.ts +61 -0
  574. package/src/account.ts +12 -0
  575. package/src/bid.ts +95 -0
  576. package/src/boxStorage.ts +42 -0
  577. package/src/client/algod.js +365 -0
  578. package/src/client/baseHTTPClient.ts +58 -0
  579. package/src/client/client.ts +306 -0
  580. package/src/client/kmd.ts +423 -0
  581. package/src/client/urlTokenBaseHTTPClient.ts +217 -0
  582. package/src/client/v2/algod/accountApplicationInformation.ts +20 -0
  583. package/src/client/v2/algod/accountAssetInformation.ts +20 -0
  584. package/src/client/v2/algod/accountInformation.ts +37 -0
  585. package/src/client/v2/algod/algod.ts +561 -0
  586. package/src/client/v2/algod/block.ts +30 -0
  587. package/src/client/v2/algod/compile.ts +50 -0
  588. package/src/client/v2/algod/dryrun.ts +33 -0
  589. package/src/client/v2/algod/genesis.ts +8 -0
  590. package/src/client/v2/algod/getApplicationBoxByName.ts +49 -0
  591. package/src/client/v2/algod/getApplicationBoxes.ts +61 -0
  592. package/src/client/v2/algod/getApplicationByID.ts +14 -0
  593. package/src/client/v2/algod/getAssetByID.ts +14 -0
  594. package/src/client/v2/algod/getBlockHash.ts +18 -0
  595. package/src/client/v2/algod/getTransactionProof.ts +43 -0
  596. package/src/client/v2/algod/healthCheck.ts +19 -0
  597. package/src/client/v2/algod/lightBlockHeaderProof.ts +15 -0
  598. package/src/client/v2/algod/models/types.ts +3662 -0
  599. package/src/client/v2/algod/pendingTransactionInformation.ts +32 -0
  600. package/src/client/v2/algod/pendingTransactions.ts +32 -0
  601. package/src/client/v2/algod/pendingTransactionsByAddress.ts +32 -0
  602. package/src/client/v2/algod/sendRawTransaction.ts +59 -0
  603. package/src/client/v2/algod/stateproof.ts +15 -0
  604. package/src/client/v2/algod/status.ts +8 -0
  605. package/src/client/v2/algod/statusAfterBlock.ts +15 -0
  606. package/src/client/v2/algod/suggestedParams.ts +24 -0
  607. package/src/client/v2/algod/supply.ts +8 -0
  608. package/src/client/v2/algod/versions.ts +11 -0
  609. package/src/client/v2/basemodel.ts +79 -0
  610. package/src/client/v2/indexer/indexer.ts +432 -0
  611. package/src/client/v2/indexer/lookupAccountAppLocalStates.ts +140 -0
  612. package/src/client/v2/indexer/lookupAccountAssets.ts +141 -0
  613. package/src/client/v2/indexer/lookupAccountByID.ts +109 -0
  614. package/src/client/v2/indexer/lookupAccountCreatedApplications.ts +141 -0
  615. package/src/client/v2/indexer/lookupAccountCreatedAssets.ts +142 -0
  616. package/src/client/v2/indexer/lookupAccountTransactions.ts +393 -0
  617. package/src/client/v2/indexer/lookupApplicationBoxByIDandName.ts +50 -0
  618. package/src/client/v2/indexer/lookupApplicationLogs.ts +156 -0
  619. package/src/client/v2/indexer/lookupApplications.ts +59 -0
  620. package/src/client/v2/indexer/lookupAssetBalances.ts +146 -0
  621. package/src/client/v2/indexer/lookupAssetByID.ts +58 -0
  622. package/src/client/v2/indexer/lookupAssetTransactions.ts +406 -0
  623. package/src/client/v2/indexer/lookupBlock.ts +39 -0
  624. package/src/client/v2/indexer/lookupTransactionByID.ts +30 -0
  625. package/src/client/v2/indexer/makeHealthCheck.ts +23 -0
  626. package/src/client/v2/indexer/models/types.ts +5667 -0
  627. package/src/client/v2/indexer/searchAccounts.ts +268 -0
  628. package/src/client/v2/indexer/searchForApplicationBoxes.ts +101 -0
  629. package/src/client/v2/indexer/searchForApplications.ts +134 -0
  630. package/src/client/v2/indexer/searchForAssets.ts +175 -0
  631. package/src/client/v2/indexer/searchForTransactions.ts +435 -0
  632. package/src/client/v2/jsonrequest.ts +103 -0
  633. package/src/client/v2/serviceClient.ts +86 -0
  634. package/src/composer.ts +688 -0
  635. package/src/convert.ts +25 -0
  636. package/src/dryrun.ts +468 -0
  637. package/src/encoding/address.ts +191 -0
  638. package/src/encoding/bigint.ts +33 -0
  639. package/src/encoding/encoding.ts +56 -0
  640. package/src/encoding/uint64.ts +84 -0
  641. package/src/group.ts +97 -0
  642. package/src/index.ts +4 -0
  643. package/src/logic/langspec.json +2014 -0
  644. package/src/logic/logic.ts +316 -0
  645. package/src/logic/sourcemap.ts +67 -0
  646. package/src/logicTemplates/dynamicfee.js +219 -0
  647. package/src/logicTemplates/htlc.js +165 -0
  648. package/src/logicTemplates/index.js +20 -0
  649. package/src/logicTemplates/limitorder.js +227 -0
  650. package/src/logicTemplates/periodicpayment.js +208 -0
  651. package/src/logicTemplates/split.js +208 -0
  652. package/src/logicTemplates/templates.js +78 -0
  653. package/src/logicsig.ts +523 -0
  654. package/src/main.ts +185 -0
  655. package/src/makeTxn.ts +1871 -0
  656. package/src/mnemonic/mnemonic.ts +181 -0
  657. package/src/mnemonic/wordlists/english.ts +2052 -0
  658. package/src/multisig.ts +495 -0
  659. package/src/nacl/naclWrappers.ts +49 -0
  660. package/src/signer.ts +105 -0
  661. package/src/transaction.ts +1363 -0
  662. package/src/types/account.ts +16 -0
  663. package/src/types/address.ts +7 -0
  664. package/src/types/blockHeader.ts +81 -0
  665. package/src/types/index.ts +3 -0
  666. package/src/types/intDecoding.ts +29 -0
  667. package/src/types/multisig.ts +22 -0
  668. package/src/types/transactions/application.ts +111 -0
  669. package/src/types/transactions/asset.ts +108 -0
  670. package/src/types/transactions/base.ts +428 -0
  671. package/src/types/transactions/builder.ts +69 -0
  672. package/src/types/transactions/encoded.ts +423 -0
  673. package/src/types/transactions/index.ts +72 -0
  674. package/src/types/transactions/keyreg.ts +23 -0
  675. package/src/types/transactions/payment.ts +14 -0
  676. package/src/types/transactions/stateproof.ts +17 -0
  677. package/src/types/utils.ts +63 -0
  678. package/src/utils/utils.ts +121 -0
  679. package/src/wait.ts +58 -0
  680. package/dist/cjs/src/abi/abi_type.js +0 -693
  681. package/dist/cjs/src/abi/abi_type.js.map +0 -1
  682. package/dist/cjs/src/abi/contract.js.map +0 -1
  683. package/dist/cjs/src/abi/index.js.map +0 -1
  684. package/dist/cjs/src/abi/interface.js.map +0 -1
  685. package/dist/cjs/src/abi/method.js.map +0 -1
  686. package/dist/cjs/src/abi/reference.js.map +0 -1
  687. package/dist/cjs/src/abi/transaction.js.map +0 -1
  688. package/dist/cjs/src/account.js.map +0 -1
  689. package/dist/cjs/src/bid.js.map +0 -1
  690. package/dist/cjs/src/boxStorage.js.map +0 -1
  691. package/dist/cjs/src/client/algod.js.map +0 -1
  692. package/dist/cjs/src/client/baseHTTPClient.js.map +0 -1
  693. package/dist/cjs/src/client/client.js.map +0 -1
  694. package/dist/cjs/src/client/kmd.js.map +0 -1
  695. package/dist/cjs/src/client/urlTokenBaseHTTPClient.js.map +0 -1
  696. package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js.map +0 -1
  697. package/dist/cjs/src/client/v2/algod/accountAssetInformation.js.map +0 -1
  698. package/dist/cjs/src/client/v2/algod/accountInformation.js.map +0 -1
  699. package/dist/cjs/src/client/v2/algod/algod.js.map +0 -1
  700. package/dist/cjs/src/client/v2/algod/block.js.map +0 -1
  701. package/dist/cjs/src/client/v2/algod/compile.js.map +0 -1
  702. package/dist/cjs/src/client/v2/algod/dryrun.js.map +0 -1
  703. package/dist/cjs/src/client/v2/algod/genesis.js.map +0 -1
  704. package/dist/cjs/src/client/v2/algod/getApplicationBoxByName.js.map +0 -1
  705. package/dist/cjs/src/client/v2/algod/getApplicationBoxes.js.map +0 -1
  706. package/dist/cjs/src/client/v2/algod/getApplicationByID.js.map +0 -1
  707. package/dist/cjs/src/client/v2/algod/getAssetByID.js.map +0 -1
  708. package/dist/cjs/src/client/v2/algod/getBlockHash.js.map +0 -1
  709. package/dist/cjs/src/client/v2/algod/getTransactionProof.js.map +0 -1
  710. package/dist/cjs/src/client/v2/algod/healthCheck.js.map +0 -1
  711. package/dist/cjs/src/client/v2/algod/lightBlockHeaderProof.js.map +0 -1
  712. package/dist/cjs/src/client/v2/algod/models/types.js +0 -2033
  713. package/dist/cjs/src/client/v2/algod/models/types.js.map +0 -1
  714. package/dist/cjs/src/client/v2/algod/pendingTransactionInformation.js.map +0 -1
  715. package/dist/cjs/src/client/v2/algod/pendingTransactions.js.map +0 -1
  716. package/dist/cjs/src/client/v2/algod/pendingTransactionsByAddress.js.map +0 -1
  717. package/dist/cjs/src/client/v2/algod/sendRawTransaction.js.map +0 -1
  718. package/dist/cjs/src/client/v2/algod/stateproof.js.map +0 -1
  719. package/dist/cjs/src/client/v2/algod/status.js.map +0 -1
  720. package/dist/cjs/src/client/v2/algod/statusAfterBlock.js.map +0 -1
  721. package/dist/cjs/src/client/v2/algod/suggestedParams.js.map +0 -1
  722. package/dist/cjs/src/client/v2/algod/supply.js.map +0 -1
  723. package/dist/cjs/src/client/v2/algod/versions.js.map +0 -1
  724. package/dist/cjs/src/client/v2/basemodel.js.map +0 -1
  725. package/dist/cjs/src/client/v2/indexer/indexer.js.map +0 -1
  726. package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +0 -1
  727. package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +0 -1
  728. package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +0 -1
  729. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +0 -1
  730. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +0 -1
  731. package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +0 -1
  732. package/dist/cjs/src/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +0 -1
  733. package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js.map +0 -1
  734. package/dist/cjs/src/client/v2/indexer/lookupApplications.js.map +0 -1
  735. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +0 -1
  736. package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +0 -1
  737. package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js.map +0 -1
  738. package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +0 -1
  739. package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js.map +0 -1
  740. package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js.map +0 -1
  741. package/dist/cjs/src/client/v2/indexer/models/types.js.map +0 -1
  742. package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +0 -1
  743. package/dist/cjs/src/client/v2/indexer/searchForApplicationBoxes.js.map +0 -1
  744. package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +0 -1
  745. package/dist/cjs/src/client/v2/indexer/searchForAssets.js.map +0 -1
  746. package/dist/cjs/src/client/v2/indexer/searchForTransactions.js.map +0 -1
  747. package/dist/cjs/src/client/v2/jsonrequest.js.map +0 -1
  748. package/dist/cjs/src/client/v2/serviceClient.js.map +0 -1
  749. package/dist/cjs/src/composer.js.map +0 -1
  750. package/dist/cjs/src/convert.js.map +0 -1
  751. package/dist/cjs/src/dryrun.js.map +0 -1
  752. package/dist/cjs/src/encoding/address.js.map +0 -1
  753. package/dist/cjs/src/encoding/bigint.js.map +0 -1
  754. package/dist/cjs/src/encoding/encoding.js.map +0 -1
  755. package/dist/cjs/src/encoding/uint64.js.map +0 -1
  756. package/dist/cjs/src/group.js.map +0 -1
  757. package/dist/cjs/src/logic/logic.js.map +0 -1
  758. package/dist/cjs/src/logic/sourcemap.js.map +0 -1
  759. package/dist/cjs/src/logicTemplates/dynamicfee.js.map +0 -1
  760. package/dist/cjs/src/logicTemplates/htlc.js.map +0 -1
  761. package/dist/cjs/src/logicTemplates/index.js.map +0 -1
  762. package/dist/cjs/src/logicTemplates/limitorder.js.map +0 -1
  763. package/dist/cjs/src/logicTemplates/periodicpayment.js.map +0 -1
  764. package/dist/cjs/src/logicTemplates/split.js.map +0 -1
  765. package/dist/cjs/src/logicTemplates/templates.js.map +0 -1
  766. package/dist/cjs/src/logicsig.js.map +0 -1
  767. package/dist/cjs/src/main.js.map +0 -1
  768. package/dist/cjs/src/makeTxn.js.map +0 -1
  769. package/dist/cjs/src/mnemonic/mnemonic.js.map +0 -1
  770. package/dist/cjs/src/mnemonic/wordlists/english.js.map +0 -1
  771. package/dist/cjs/src/multisig.js +0 -398
  772. package/dist/cjs/src/multisig.js.map +0 -1
  773. package/dist/cjs/src/nacl/naclWrappers.js.map +0 -1
  774. package/dist/cjs/src/signer.js.map +0 -1
  775. package/dist/cjs/src/transaction.js.map +0 -1
  776. package/dist/cjs/src/types/account.js.map +0 -1
  777. package/dist/cjs/src/types/address.js.map +0 -1
  778. package/dist/cjs/src/types/blockHeader.js.map +0 -1
  779. package/dist/cjs/src/types/index.js.map +0 -1
  780. package/dist/cjs/src/types/intDecoding.js.map +0 -1
  781. package/dist/cjs/src/types/multisig.js.map +0 -1
  782. package/dist/cjs/src/types/transactions/application.js.map +0 -1
  783. package/dist/cjs/src/types/transactions/asset.js.map +0 -1
  784. package/dist/cjs/src/types/transactions/base.js.map +0 -1
  785. package/dist/cjs/src/types/transactions/builder.js.map +0 -1
  786. package/dist/cjs/src/types/transactions/encoded.js.map +0 -1
  787. package/dist/cjs/src/types/transactions/index.js.map +0 -1
  788. package/dist/cjs/src/types/transactions/keyreg.js.map +0 -1
  789. package/dist/cjs/src/types/transactions/payment.js.map +0 -1
  790. package/dist/cjs/src/types/transactions/stateproof.js.map +0 -1
  791. package/dist/cjs/src/types/utils.js.map +0 -1
  792. package/dist/cjs/src/utils/utils.js.map +0 -1
  793. package/dist/cjs/src/wait.js.map +0 -1
  794. package/dist/esm/src/abi/abi_type.js +0 -680
  795. package/dist/esm/src/abi/abi_type.js.map +0 -1
  796. package/dist/esm/src/abi/contract.js.map +0 -1
  797. package/dist/esm/src/abi/index.js.map +0 -1
  798. package/dist/esm/src/abi/interface.js.map +0 -1
  799. package/dist/esm/src/abi/method.js.map +0 -1
  800. package/dist/esm/src/abi/reference.js.map +0 -1
  801. package/dist/esm/src/abi/transaction.js.map +0 -1
  802. package/dist/esm/src/account.js.map +0 -1
  803. package/dist/esm/src/bid.js.map +0 -1
  804. package/dist/esm/src/boxStorage.js.map +0 -1
  805. package/dist/esm/src/client/algod.js.map +0 -1
  806. package/dist/esm/src/client/baseHTTPClient.js.map +0 -1
  807. package/dist/esm/src/client/client.js.map +0 -1
  808. package/dist/esm/src/client/kmd.js.map +0 -1
  809. package/dist/esm/src/client/urlTokenBaseHTTPClient.js.map +0 -1
  810. package/dist/esm/src/client/v2/algod/accountApplicationInformation.js.map +0 -1
  811. package/dist/esm/src/client/v2/algod/accountAssetInformation.js.map +0 -1
  812. package/dist/esm/src/client/v2/algod/accountInformation.js.map +0 -1
  813. package/dist/esm/src/client/v2/algod/algod.js.map +0 -1
  814. package/dist/esm/src/client/v2/algod/block.js.map +0 -1
  815. package/dist/esm/src/client/v2/algod/compile.js.map +0 -1
  816. package/dist/esm/src/client/v2/algod/dryrun.js.map +0 -1
  817. package/dist/esm/src/client/v2/algod/genesis.js.map +0 -1
  818. package/dist/esm/src/client/v2/algod/getApplicationBoxByName.js.map +0 -1
  819. package/dist/esm/src/client/v2/algod/getApplicationBoxes.js.map +0 -1
  820. package/dist/esm/src/client/v2/algod/getApplicationByID.js.map +0 -1
  821. package/dist/esm/src/client/v2/algod/getAssetByID.js.map +0 -1
  822. package/dist/esm/src/client/v2/algod/getBlockHash.js.map +0 -1
  823. package/dist/esm/src/client/v2/algod/getTransactionProof.js.map +0 -1
  824. package/dist/esm/src/client/v2/algod/healthCheck.js.map +0 -1
  825. package/dist/esm/src/client/v2/algod/lightBlockHeaderProof.js.map +0 -1
  826. package/dist/esm/src/client/v2/algod/models/types.js +0 -1984
  827. package/dist/esm/src/client/v2/algod/models/types.js.map +0 -1
  828. package/dist/esm/src/client/v2/algod/pendingTransactionInformation.js.map +0 -1
  829. package/dist/esm/src/client/v2/algod/pendingTransactions.js.map +0 -1
  830. package/dist/esm/src/client/v2/algod/pendingTransactionsByAddress.js.map +0 -1
  831. package/dist/esm/src/client/v2/algod/sendRawTransaction.js.map +0 -1
  832. package/dist/esm/src/client/v2/algod/stateproof.js.map +0 -1
  833. package/dist/esm/src/client/v2/algod/status.js.map +0 -1
  834. package/dist/esm/src/client/v2/algod/statusAfterBlock.js.map +0 -1
  835. package/dist/esm/src/client/v2/algod/suggestedParams.js.map +0 -1
  836. package/dist/esm/src/client/v2/algod/supply.js.map +0 -1
  837. package/dist/esm/src/client/v2/algod/versions.js.map +0 -1
  838. package/dist/esm/src/client/v2/basemodel.js.map +0 -1
  839. package/dist/esm/src/client/v2/indexer/indexer.js.map +0 -1
  840. package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +0 -1
  841. package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +0 -1
  842. package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +0 -1
  843. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +0 -1
  844. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +0 -1
  845. package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +0 -1
  846. package/dist/esm/src/client/v2/indexer/lookupApplicationBoxByIDandName.js.map +0 -1
  847. package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js.map +0 -1
  848. package/dist/esm/src/client/v2/indexer/lookupApplications.js.map +0 -1
  849. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +0 -1
  850. package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +0 -1
  851. package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js.map +0 -1
  852. package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +0 -1
  853. package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js.map +0 -1
  854. package/dist/esm/src/client/v2/indexer/makeHealthCheck.js.map +0 -1
  855. package/dist/esm/src/client/v2/indexer/models/types.js.map +0 -1
  856. package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +0 -1
  857. package/dist/esm/src/client/v2/indexer/searchForApplicationBoxes.js.map +0 -1
  858. package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +0 -1
  859. package/dist/esm/src/client/v2/indexer/searchForAssets.js.map +0 -1
  860. package/dist/esm/src/client/v2/indexer/searchForTransactions.js.map +0 -1
  861. package/dist/esm/src/client/v2/jsonrequest.js.map +0 -1
  862. package/dist/esm/src/client/v2/serviceClient.js.map +0 -1
  863. package/dist/esm/src/composer.js.map +0 -1
  864. package/dist/esm/src/convert.js.map +0 -1
  865. package/dist/esm/src/dryrun.js.map +0 -1
  866. package/dist/esm/src/encoding/address.js.map +0 -1
  867. package/dist/esm/src/encoding/bigint.js.map +0 -1
  868. package/dist/esm/src/encoding/encoding.js.map +0 -1
  869. package/dist/esm/src/encoding/uint64.js.map +0 -1
  870. package/dist/esm/src/group.js.map +0 -1
  871. package/dist/esm/src/logic/logic.js.map +0 -1
  872. package/dist/esm/src/logic/sourcemap.js.map +0 -1
  873. package/dist/esm/src/logicTemplates/dynamicfee.js.map +0 -1
  874. package/dist/esm/src/logicTemplates/htlc.js.map +0 -1
  875. package/dist/esm/src/logicTemplates/index.js.map +0 -1
  876. package/dist/esm/src/logicTemplates/limitorder.js.map +0 -1
  877. package/dist/esm/src/logicTemplates/periodicpayment.js.map +0 -1
  878. package/dist/esm/src/logicTemplates/split.js.map +0 -1
  879. package/dist/esm/src/logicTemplates/templates.js.map +0 -1
  880. package/dist/esm/src/logicsig.js.map +0 -1
  881. package/dist/esm/src/main.js.map +0 -1
  882. package/dist/esm/src/makeTxn.js.map +0 -1
  883. package/dist/esm/src/mnemonic/mnemonic.js.map +0 -1
  884. package/dist/esm/src/mnemonic/wordlists/english.js.map +0 -1
  885. package/dist/esm/src/multisig.js +0 -364
  886. package/dist/esm/src/multisig.js.map +0 -1
  887. package/dist/esm/src/nacl/naclWrappers.js.map +0 -1
  888. package/dist/esm/src/signer.js.map +0 -1
  889. package/dist/esm/src/transaction.js.map +0 -1
  890. package/dist/esm/src/types/account.js.map +0 -1
  891. package/dist/esm/src/types/address.js.map +0 -1
  892. package/dist/esm/src/types/blockHeader.js.map +0 -1
  893. package/dist/esm/src/types/index.js.map +0 -1
  894. package/dist/esm/src/types/intDecoding.js.map +0 -1
  895. package/dist/esm/src/types/multisig.js.map +0 -1
  896. package/dist/esm/src/types/transactions/application.js.map +0 -1
  897. package/dist/esm/src/types/transactions/asset.js.map +0 -1
  898. package/dist/esm/src/types/transactions/base.js.map +0 -1
  899. package/dist/esm/src/types/transactions/builder.js.map +0 -1
  900. package/dist/esm/src/types/transactions/encoded.js.map +0 -1
  901. package/dist/esm/src/types/transactions/index.js.map +0 -1
  902. package/dist/esm/src/types/transactions/keyreg.js.map +0 -1
  903. package/dist/esm/src/types/transactions/payment.js.map +0 -1
  904. package/dist/esm/src/types/transactions/stateproof.js.map +0 -1
  905. package/dist/esm/src/types/utils.js.map +0 -1
  906. package/dist/esm/src/utils/utils.js.map +0 -1
  907. package/dist/esm/src/wait.js.map +0 -1
  908. package/dist/types/src/client/v2/algod/models/types.d.ts +0 -1612
  909. package/dist/types/src/multisig.d.ts +0 -125
@@ -0,0 +1,3662 @@
1
+ /**
2
+ * NOTICE: This file was generated. Editing this file manually is not recommended.
3
+ */
4
+
5
+ /* eslint-disable no-use-before-define */
6
+ import BaseModel from '../../basemodel';
7
+ import { EncodedSignedTransaction } from '../../../../types/transactions/encoded';
8
+ import BlockHeader from '../../../../types/blockHeader';
9
+
10
+ /**
11
+ * Account information at a given round.
12
+ * Definition:
13
+ * data/basics/userBalance.go : AccountData
14
+ */
15
+ export class Account extends BaseModel {
16
+ /**
17
+ * the account public key
18
+ */
19
+ public address: string;
20
+
21
+ /**
22
+ * (algo) total number of MicroAlgos in the account
23
+ */
24
+ public amount: number | bigint;
25
+
26
+ /**
27
+ * specifies the amount of MicroAlgos in the account, without the pending rewards.
28
+ */
29
+ public amountWithoutPendingRewards: number | bigint;
30
+
31
+ /**
32
+ * MicroAlgo balance required by the account.
33
+ * The requirement grows based on asset and application usage.
34
+ */
35
+ public minBalance: number | bigint;
36
+
37
+ /**
38
+ * amount of MicroAlgos of pending rewards in this account.
39
+ */
40
+ public pendingRewards: number | bigint;
41
+
42
+ /**
43
+ * (ern) total rewards of MicroAlgos the account has received, including pending
44
+ * rewards.
45
+ */
46
+ public rewards: number | bigint;
47
+
48
+ /**
49
+ * The round for which this information is relevant.
50
+ */
51
+ public round: number | bigint;
52
+
53
+ /**
54
+ * (onl) delegation status of the account's MicroAlgos
55
+ * * Offline - indicates that the associated account is delegated.
56
+ * * Online - indicates that the associated account used as part of the delegation
57
+ * pool.
58
+ * * NotParticipating - indicates that the associated account is neither a
59
+ * delegator nor a delegate.
60
+ */
61
+ public status: string;
62
+
63
+ /**
64
+ * The count of all applications that have been opted in, equivalent to the count
65
+ * of application local data (AppLocalState objects) stored in this account.
66
+ */
67
+ public totalAppsOptedIn: number | bigint;
68
+
69
+ /**
70
+ * The count of all assets that have been opted in, equivalent to the count of
71
+ * AssetHolding objects held by this account.
72
+ */
73
+ public totalAssetsOptedIn: number | bigint;
74
+
75
+ /**
76
+ * The count of all apps (AppParams objects) created by this account.
77
+ */
78
+ public totalCreatedApps: number | bigint;
79
+
80
+ /**
81
+ * The count of all assets (AssetParams objects) created by this account.
82
+ */
83
+ public totalCreatedAssets: number | bigint;
84
+
85
+ /**
86
+ * (appl) applications local data stored in this account.
87
+ * Note the raw object uses `map[int] -> AppLocalState` for this type.
88
+ */
89
+ public appsLocalState?: ApplicationLocalState[];
90
+
91
+ /**
92
+ * (teap) the sum of all extra application program pages for this account.
93
+ */
94
+ public appsTotalExtraPages?: number | bigint;
95
+
96
+ /**
97
+ * (tsch) stores the sum of all of the local schemas and global schemas in this
98
+ * account.
99
+ * Note: the raw account uses `StateSchema` for this type.
100
+ */
101
+ public appsTotalSchema?: ApplicationStateSchema;
102
+
103
+ /**
104
+ * (asset) assets held by this account.
105
+ * Note the raw object uses `map[int] -> AssetHolding` for this type.
106
+ */
107
+ public assets?: AssetHolding[];
108
+
109
+ /**
110
+ * (spend) the address against which signing should be checked. If empty, the
111
+ * address of the current account is used. This field can be updated in any
112
+ * transaction by setting the RekeyTo field.
113
+ */
114
+ public authAddr?: string;
115
+
116
+ /**
117
+ * (appp) parameters of applications created by this account including app global
118
+ * data.
119
+ * Note: the raw account uses `map[int] -> AppParams` for this type.
120
+ */
121
+ public createdApps?: Application[];
122
+
123
+ /**
124
+ * (apar) parameters of assets created by this account.
125
+ * Note: the raw account uses `map[int] -> Asset` for this type.
126
+ */
127
+ public createdAssets?: Asset[];
128
+
129
+ /**
130
+ * AccountParticipation describes the parameters used by this account in consensus
131
+ * protocol.
132
+ */
133
+ public participation?: AccountParticipation;
134
+
135
+ /**
136
+ * (ebase) used as part of the rewards computation. Only applicable to accounts
137
+ * which are participating.
138
+ */
139
+ public rewardBase?: number | bigint;
140
+
141
+ /**
142
+ * Indicates what type of signature is used by this account, must be one of:
143
+ * * sig
144
+ * * msig
145
+ * * lsig
146
+ */
147
+ public sigType?: string;
148
+
149
+ /**
150
+ * (tbxb) The total number of bytes used by this account's app's box keys and
151
+ * values.
152
+ */
153
+ public totalBoxBytes?: number | bigint;
154
+
155
+ /**
156
+ * (tbx) The number of existing boxes created by this account's app.
157
+ */
158
+ public totalBoxes?: number | bigint;
159
+
160
+ /**
161
+ * Creates a new `Account` object.
162
+ * @param address - the account public key
163
+ * @param amount - (algo) total number of MicroAlgos in the account
164
+ * @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.
165
+ * @param minBalance - MicroAlgo balance required by the account.
166
+ * The requirement grows based on asset and application usage.
167
+ * @param pendingRewards - amount of MicroAlgos of pending rewards in this account.
168
+ * @param rewards - (ern) total rewards of MicroAlgos the account has received, including pending
169
+ * rewards.
170
+ * @param round - The round for which this information is relevant.
171
+ * @param status - (onl) delegation status of the account's MicroAlgos
172
+ * * Offline - indicates that the associated account is delegated.
173
+ * * Online - indicates that the associated account used as part of the delegation
174
+ * pool.
175
+ * * NotParticipating - indicates that the associated account is neither a
176
+ * delegator nor a delegate.
177
+ * @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count
178
+ * of application local data (AppLocalState objects) stored in this account.
179
+ * @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of
180
+ * AssetHolding objects held by this account.
181
+ * @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
182
+ * @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
183
+ * @param appsLocalState - (appl) applications local data stored in this account.
184
+ * Note the raw object uses `map[int] -> AppLocalState` for this type.
185
+ * @param appsTotalExtraPages - (teap) the sum of all extra application program pages for this account.
186
+ * @param appsTotalSchema - (tsch) stores the sum of all of the local schemas and global schemas in this
187
+ * account.
188
+ * Note: the raw account uses `StateSchema` for this type.
189
+ * @param assets - (asset) assets held by this account.
190
+ * Note the raw object uses `map[int] -> AssetHolding` for this type.
191
+ * @param authAddr - (spend) the address against which signing should be checked. If empty, the
192
+ * address of the current account is used. This field can be updated in any
193
+ * transaction by setting the RekeyTo field.
194
+ * @param createdApps - (appp) parameters of applications created by this account including app global
195
+ * data.
196
+ * Note: the raw account uses `map[int] -> AppParams` for this type.
197
+ * @param createdAssets - (apar) parameters of assets created by this account.
198
+ * Note: the raw account uses `map[int] -> Asset` for this type.
199
+ * @param participation - AccountParticipation describes the parameters used by this account in consensus
200
+ * protocol.
201
+ * @param rewardBase - (ebase) used as part of the rewards computation. Only applicable to accounts
202
+ * which are participating.
203
+ * @param sigType - Indicates what type of signature is used by this account, must be one of:
204
+ * * sig
205
+ * * msig
206
+ * * lsig
207
+ * @param totalBoxBytes - (tbxb) The total number of bytes used by this account's app's box keys and
208
+ * values.
209
+ * @param totalBoxes - (tbx) The number of existing boxes created by this account's app.
210
+ */
211
+ constructor({
212
+ address,
213
+ amount,
214
+ amountWithoutPendingRewards,
215
+ minBalance,
216
+ pendingRewards,
217
+ rewards,
218
+ round,
219
+ status,
220
+ totalAppsOptedIn,
221
+ totalAssetsOptedIn,
222
+ totalCreatedApps,
223
+ totalCreatedAssets,
224
+ appsLocalState,
225
+ appsTotalExtraPages,
226
+ appsTotalSchema,
227
+ assets,
228
+ authAddr,
229
+ createdApps,
230
+ createdAssets,
231
+ participation,
232
+ rewardBase,
233
+ sigType,
234
+ totalBoxBytes,
235
+ totalBoxes,
236
+ }: {
237
+ address: string;
238
+ amount: number | bigint;
239
+ amountWithoutPendingRewards: number | bigint;
240
+ minBalance: number | bigint;
241
+ pendingRewards: number | bigint;
242
+ rewards: number | bigint;
243
+ round: number | bigint;
244
+ status: string;
245
+ totalAppsOptedIn: number | bigint;
246
+ totalAssetsOptedIn: number | bigint;
247
+ totalCreatedApps: number | bigint;
248
+ totalCreatedAssets: number | bigint;
249
+ appsLocalState?: ApplicationLocalState[];
250
+ appsTotalExtraPages?: number | bigint;
251
+ appsTotalSchema?: ApplicationStateSchema;
252
+ assets?: AssetHolding[];
253
+ authAddr?: string;
254
+ createdApps?: Application[];
255
+ createdAssets?: Asset[];
256
+ participation?: AccountParticipation;
257
+ rewardBase?: number | bigint;
258
+ sigType?: string;
259
+ totalBoxBytes?: number | bigint;
260
+ totalBoxes?: number | bigint;
261
+ }) {
262
+ super();
263
+ this.address = address;
264
+ this.amount = amount;
265
+ this.amountWithoutPendingRewards = amountWithoutPendingRewards;
266
+ this.minBalance = minBalance;
267
+ this.pendingRewards = pendingRewards;
268
+ this.rewards = rewards;
269
+ this.round = round;
270
+ this.status = status;
271
+ this.totalAppsOptedIn = totalAppsOptedIn;
272
+ this.totalAssetsOptedIn = totalAssetsOptedIn;
273
+ this.totalCreatedApps = totalCreatedApps;
274
+ this.totalCreatedAssets = totalCreatedAssets;
275
+ this.appsLocalState = appsLocalState;
276
+ this.appsTotalExtraPages = appsTotalExtraPages;
277
+ this.appsTotalSchema = appsTotalSchema;
278
+ this.assets = assets;
279
+ this.authAddr = authAddr;
280
+ this.createdApps = createdApps;
281
+ this.createdAssets = createdAssets;
282
+ this.participation = participation;
283
+ this.rewardBase = rewardBase;
284
+ this.sigType = sigType;
285
+ this.totalBoxBytes = totalBoxBytes;
286
+ this.totalBoxes = totalBoxes;
287
+
288
+ this.attribute_map = {
289
+ address: 'address',
290
+ amount: 'amount',
291
+ amountWithoutPendingRewards: 'amount-without-pending-rewards',
292
+ minBalance: 'min-balance',
293
+ pendingRewards: 'pending-rewards',
294
+ rewards: 'rewards',
295
+ round: 'round',
296
+ status: 'status',
297
+ totalAppsOptedIn: 'total-apps-opted-in',
298
+ totalAssetsOptedIn: 'total-assets-opted-in',
299
+ totalCreatedApps: 'total-created-apps',
300
+ totalCreatedAssets: 'total-created-assets',
301
+ appsLocalState: 'apps-local-state',
302
+ appsTotalExtraPages: 'apps-total-extra-pages',
303
+ appsTotalSchema: 'apps-total-schema',
304
+ assets: 'assets',
305
+ authAddr: 'auth-addr',
306
+ createdApps: 'created-apps',
307
+ createdAssets: 'created-assets',
308
+ participation: 'participation',
309
+ rewardBase: 'reward-base',
310
+ sigType: 'sig-type',
311
+ totalBoxBytes: 'total-box-bytes',
312
+ totalBoxes: 'total-boxes',
313
+ };
314
+ }
315
+
316
+ // eslint-disable-next-line camelcase
317
+ static from_obj_for_encoding(data: Record<string, any>): Account {
318
+ /* eslint-disable dot-notation */
319
+ if (typeof data['address'] === 'undefined')
320
+ throw new Error(`Response is missing required field 'address': ${data}`);
321
+ if (typeof data['amount'] === 'undefined')
322
+ throw new Error(`Response is missing required field 'amount': ${data}`);
323
+ if (typeof data['amount-without-pending-rewards'] === 'undefined')
324
+ throw new Error(
325
+ `Response is missing required field 'amount-without-pending-rewards': ${data}`
326
+ );
327
+ if (typeof data['min-balance'] === 'undefined')
328
+ throw new Error(
329
+ `Response is missing required field 'min-balance': ${data}`
330
+ );
331
+ if (typeof data['pending-rewards'] === 'undefined')
332
+ throw new Error(
333
+ `Response is missing required field 'pending-rewards': ${data}`
334
+ );
335
+ if (typeof data['rewards'] === 'undefined')
336
+ throw new Error(`Response is missing required field 'rewards': ${data}`);
337
+ if (typeof data['round'] === 'undefined')
338
+ throw new Error(`Response is missing required field 'round': ${data}`);
339
+ if (typeof data['status'] === 'undefined')
340
+ throw new Error(`Response is missing required field 'status': ${data}`);
341
+ if (typeof data['total-apps-opted-in'] === 'undefined')
342
+ throw new Error(
343
+ `Response is missing required field 'total-apps-opted-in': ${data}`
344
+ );
345
+ if (typeof data['total-assets-opted-in'] === 'undefined')
346
+ throw new Error(
347
+ `Response is missing required field 'total-assets-opted-in': ${data}`
348
+ );
349
+ if (typeof data['total-created-apps'] === 'undefined')
350
+ throw new Error(
351
+ `Response is missing required field 'total-created-apps': ${data}`
352
+ );
353
+ if (typeof data['total-created-assets'] === 'undefined')
354
+ throw new Error(
355
+ `Response is missing required field 'total-created-assets': ${data}`
356
+ );
357
+ return new Account({
358
+ address: data['address'],
359
+ amount: data['amount'],
360
+ amountWithoutPendingRewards: data['amount-without-pending-rewards'],
361
+ minBalance: data['min-balance'],
362
+ pendingRewards: data['pending-rewards'],
363
+ rewards: data['rewards'],
364
+ round: data['round'],
365
+ status: data['status'],
366
+ totalAppsOptedIn: data['total-apps-opted-in'],
367
+ totalAssetsOptedIn: data['total-assets-opted-in'],
368
+ totalCreatedApps: data['total-created-apps'],
369
+ totalCreatedAssets: data['total-created-assets'],
370
+ appsLocalState:
371
+ typeof data['apps-local-state'] !== 'undefined'
372
+ ? data['apps-local-state'].map(
373
+ ApplicationLocalState.from_obj_for_encoding
374
+ )
375
+ : undefined,
376
+ appsTotalExtraPages: data['apps-total-extra-pages'],
377
+ appsTotalSchema:
378
+ typeof data['apps-total-schema'] !== 'undefined'
379
+ ? ApplicationStateSchema.from_obj_for_encoding(
380
+ data['apps-total-schema']
381
+ )
382
+ : undefined,
383
+ assets:
384
+ typeof data['assets'] !== 'undefined'
385
+ ? data['assets'].map(AssetHolding.from_obj_for_encoding)
386
+ : undefined,
387
+ authAddr: data['auth-addr'],
388
+ createdApps:
389
+ typeof data['created-apps'] !== 'undefined'
390
+ ? data['created-apps'].map(Application.from_obj_for_encoding)
391
+ : undefined,
392
+ createdAssets:
393
+ typeof data['created-assets'] !== 'undefined'
394
+ ? data['created-assets'].map(Asset.from_obj_for_encoding)
395
+ : undefined,
396
+ participation:
397
+ typeof data['participation'] !== 'undefined'
398
+ ? AccountParticipation.from_obj_for_encoding(data['participation'])
399
+ : undefined,
400
+ rewardBase: data['reward-base'],
401
+ sigType: data['sig-type'],
402
+ totalBoxBytes: data['total-box-bytes'],
403
+ totalBoxes: data['total-boxes'],
404
+ });
405
+ /* eslint-enable dot-notation */
406
+ }
407
+ }
408
+
409
+ /**
410
+ * AccountApplicationResponse describes the account's application local state and
411
+ * global state (AppLocalState and AppParams, if either exists) for a specific
412
+ * application ID. Global state will only be returned if the provided address is
413
+ * the application's creator.
414
+ */
415
+ export class AccountApplicationResponse extends BaseModel {
416
+ /**
417
+ * The round for which this information is relevant.
418
+ */
419
+ public round: number | bigint;
420
+
421
+ /**
422
+ * (appl) the application local data stored in this account.
423
+ * The raw account uses `AppLocalState` for this type.
424
+ */
425
+ public appLocalState?: ApplicationLocalState;
426
+
427
+ /**
428
+ * (appp) parameters of the application created by this account including app
429
+ * global data.
430
+ * The raw account uses `AppParams` for this type.
431
+ */
432
+ public createdApp?: ApplicationParams;
433
+
434
+ /**
435
+ * Creates a new `AccountApplicationResponse` object.
436
+ * @param round - The round for which this information is relevant.
437
+ * @param appLocalState - (appl) the application local data stored in this account.
438
+ * The raw account uses `AppLocalState` for this type.
439
+ * @param createdApp - (appp) parameters of the application created by this account including app
440
+ * global data.
441
+ * The raw account uses `AppParams` for this type.
442
+ */
443
+ constructor(
444
+ round: number | bigint,
445
+ appLocalState?: ApplicationLocalState,
446
+ createdApp?: ApplicationParams
447
+ ) {
448
+ super();
449
+ this.round = round;
450
+ this.appLocalState = appLocalState;
451
+ this.createdApp = createdApp;
452
+
453
+ this.attribute_map = {
454
+ round: 'round',
455
+ appLocalState: 'app-local-state',
456
+ createdApp: 'created-app',
457
+ };
458
+ }
459
+
460
+ // eslint-disable-next-line camelcase
461
+ static from_obj_for_encoding(
462
+ data: Record<string, any>
463
+ ): AccountApplicationResponse {
464
+ /* eslint-disable dot-notation */
465
+ if (typeof data['round'] === 'undefined')
466
+ throw new Error(`Response is missing required field 'round': ${data}`);
467
+ return new AccountApplicationResponse(
468
+ data['round'],
469
+ typeof data['app-local-state'] !== 'undefined'
470
+ ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
471
+ : undefined,
472
+ typeof data['created-app'] !== 'undefined'
473
+ ? ApplicationParams.from_obj_for_encoding(data['created-app'])
474
+ : undefined
475
+ );
476
+ /* eslint-enable dot-notation */
477
+ }
478
+ }
479
+
480
+ /**
481
+ * AccountAssetResponse describes the account's asset holding and asset parameters
482
+ * (if either exist) for a specific asset ID. Asset parameters will only be
483
+ * returned if the provided address is the asset's creator.
484
+ */
485
+ export class AccountAssetResponse extends BaseModel {
486
+ /**
487
+ * The round for which this information is relevant.
488
+ */
489
+ public round: number | bigint;
490
+
491
+ /**
492
+ * (asset) Details about the asset held by this account.
493
+ * The raw account uses `AssetHolding` for this type.
494
+ */
495
+ public assetHolding?: AssetHolding;
496
+
497
+ /**
498
+ * (apar) parameters of the asset created by this account.
499
+ * The raw account uses `AssetParams` for this type.
500
+ */
501
+ public createdAsset?: AssetParams;
502
+
503
+ /**
504
+ * Creates a new `AccountAssetResponse` object.
505
+ * @param round - The round for which this information is relevant.
506
+ * @param assetHolding - (asset) Details about the asset held by this account.
507
+ * The raw account uses `AssetHolding` for this type.
508
+ * @param createdAsset - (apar) parameters of the asset created by this account.
509
+ * The raw account uses `AssetParams` for this type.
510
+ */
511
+ constructor(
512
+ round: number | bigint,
513
+ assetHolding?: AssetHolding,
514
+ createdAsset?: AssetParams
515
+ ) {
516
+ super();
517
+ this.round = round;
518
+ this.assetHolding = assetHolding;
519
+ this.createdAsset = createdAsset;
520
+
521
+ this.attribute_map = {
522
+ round: 'round',
523
+ assetHolding: 'asset-holding',
524
+ createdAsset: 'created-asset',
525
+ };
526
+ }
527
+
528
+ // eslint-disable-next-line camelcase
529
+ static from_obj_for_encoding(
530
+ data: Record<string, any>
531
+ ): AccountAssetResponse {
532
+ /* eslint-disable dot-notation */
533
+ if (typeof data['round'] === 'undefined')
534
+ throw new Error(`Response is missing required field 'round': ${data}`);
535
+ return new AccountAssetResponse(
536
+ data['round'],
537
+ typeof data['asset-holding'] !== 'undefined'
538
+ ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
539
+ : undefined,
540
+ typeof data['created-asset'] !== 'undefined'
541
+ ? AssetParams.from_obj_for_encoding(data['created-asset'])
542
+ : undefined
543
+ );
544
+ /* eslint-enable dot-notation */
545
+ }
546
+ }
547
+
548
+ /**
549
+ * AccountParticipation describes the parameters used by this account in consensus
550
+ * protocol.
551
+ */
552
+ export class AccountParticipation extends BaseModel {
553
+ /**
554
+ * (sel) Selection public key (if any) currently registered for this round.
555
+ */
556
+ public selectionParticipationKey: Uint8Array;
557
+
558
+ /**
559
+ * (voteFst) First round for which this participation is valid.
560
+ */
561
+ public voteFirstValid: number | bigint;
562
+
563
+ /**
564
+ * (voteKD) Number of subkeys in each batch of participation keys.
565
+ */
566
+ public voteKeyDilution: number | bigint;
567
+
568
+ /**
569
+ * (voteLst) Last round for which this participation is valid.
570
+ */
571
+ public voteLastValid: number | bigint;
572
+
573
+ /**
574
+ * (vote) root participation public key (if any) currently registered for this
575
+ * round.
576
+ */
577
+ public voteParticipationKey: Uint8Array;
578
+
579
+ /**
580
+ * (stprf) Root of the state proof key (if any)
581
+ */
582
+ public stateProofKey?: Uint8Array;
583
+
584
+ /**
585
+ * Creates a new `AccountParticipation` object.
586
+ * @param selectionParticipationKey - (sel) Selection public key (if any) currently registered for this round.
587
+ * @param voteFirstValid - (voteFst) First round for which this participation is valid.
588
+ * @param voteKeyDilution - (voteKD) Number of subkeys in each batch of participation keys.
589
+ * @param voteLastValid - (voteLst) Last round for which this participation is valid.
590
+ * @param voteParticipationKey - (vote) root participation public key (if any) currently registered for this
591
+ * round.
592
+ * @param stateProofKey - (stprf) Root of the state proof key (if any)
593
+ */
594
+ constructor({
595
+ selectionParticipationKey,
596
+ voteFirstValid,
597
+ voteKeyDilution,
598
+ voteLastValid,
599
+ voteParticipationKey,
600
+ stateProofKey,
601
+ }: {
602
+ selectionParticipationKey: string | Uint8Array;
603
+ voteFirstValid: number | bigint;
604
+ voteKeyDilution: number | bigint;
605
+ voteLastValid: number | bigint;
606
+ voteParticipationKey: string | Uint8Array;
607
+ stateProofKey?: string | Uint8Array;
608
+ }) {
609
+ super();
610
+ this.selectionParticipationKey =
611
+ typeof selectionParticipationKey === 'string'
612
+ ? new Uint8Array(Buffer.from(selectionParticipationKey, 'base64'))
613
+ : selectionParticipationKey;
614
+ this.voteFirstValid = voteFirstValid;
615
+ this.voteKeyDilution = voteKeyDilution;
616
+ this.voteLastValid = voteLastValid;
617
+ this.voteParticipationKey =
618
+ typeof voteParticipationKey === 'string'
619
+ ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))
620
+ : voteParticipationKey;
621
+ this.stateProofKey =
622
+ typeof stateProofKey === 'string'
623
+ ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))
624
+ : stateProofKey;
625
+
626
+ this.attribute_map = {
627
+ selectionParticipationKey: 'selection-participation-key',
628
+ voteFirstValid: 'vote-first-valid',
629
+ voteKeyDilution: 'vote-key-dilution',
630
+ voteLastValid: 'vote-last-valid',
631
+ voteParticipationKey: 'vote-participation-key',
632
+ stateProofKey: 'state-proof-key',
633
+ };
634
+ }
635
+
636
+ // eslint-disable-next-line camelcase
637
+ static from_obj_for_encoding(
638
+ data: Record<string, any>
639
+ ): AccountParticipation {
640
+ /* eslint-disable dot-notation */
641
+ if (typeof data['selection-participation-key'] === 'undefined')
642
+ throw new Error(
643
+ `Response is missing required field 'selection-participation-key': ${data}`
644
+ );
645
+ if (typeof data['vote-first-valid'] === 'undefined')
646
+ throw new Error(
647
+ `Response is missing required field 'vote-first-valid': ${data}`
648
+ );
649
+ if (typeof data['vote-key-dilution'] === 'undefined')
650
+ throw new Error(
651
+ `Response is missing required field 'vote-key-dilution': ${data}`
652
+ );
653
+ if (typeof data['vote-last-valid'] === 'undefined')
654
+ throw new Error(
655
+ `Response is missing required field 'vote-last-valid': ${data}`
656
+ );
657
+ if (typeof data['vote-participation-key'] === 'undefined')
658
+ throw new Error(
659
+ `Response is missing required field 'vote-participation-key': ${data}`
660
+ );
661
+ return new AccountParticipation({
662
+ selectionParticipationKey: data['selection-participation-key'],
663
+ voteFirstValid: data['vote-first-valid'],
664
+ voteKeyDilution: data['vote-key-dilution'],
665
+ voteLastValid: data['vote-last-valid'],
666
+ voteParticipationKey: data['vote-participation-key'],
667
+ stateProofKey: data['state-proof-key'],
668
+ });
669
+ /* eslint-enable dot-notation */
670
+ }
671
+ }
672
+
673
+ /**
674
+ * Application state delta.
675
+ */
676
+ export class AccountStateDelta extends BaseModel {
677
+ public address: string;
678
+
679
+ /**
680
+ * Application state delta.
681
+ */
682
+ public delta: EvalDeltaKeyValue[];
683
+
684
+ /**
685
+ * Creates a new `AccountStateDelta` object.
686
+ * @param address -
687
+ * @param delta - Application state delta.
688
+ */
689
+ constructor(address: string, delta: EvalDeltaKeyValue[]) {
690
+ super();
691
+ this.address = address;
692
+ this.delta = delta;
693
+
694
+ this.attribute_map = {
695
+ address: 'address',
696
+ delta: 'delta',
697
+ };
698
+ }
699
+
700
+ // eslint-disable-next-line camelcase
701
+ static from_obj_for_encoding(data: Record<string, any>): AccountStateDelta {
702
+ /* eslint-disable dot-notation */
703
+ if (typeof data['address'] === 'undefined')
704
+ throw new Error(`Response is missing required field 'address': ${data}`);
705
+ if (!Array.isArray(data['delta']))
706
+ throw new Error(
707
+ `Response is missing required array field 'delta': ${data}`
708
+ );
709
+ return new AccountStateDelta(
710
+ data['address'],
711
+ data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
712
+ );
713
+ /* eslint-enable dot-notation */
714
+ }
715
+ }
716
+
717
+ /**
718
+ * Application index and its parameters
719
+ */
720
+ export class Application extends BaseModel {
721
+ /**
722
+ * (appidx) application index.
723
+ */
724
+ public id: number | bigint;
725
+
726
+ /**
727
+ * (appparams) application parameters.
728
+ */
729
+ public params: ApplicationParams;
730
+
731
+ /**
732
+ * Creates a new `Application` object.
733
+ * @param id - (appidx) application index.
734
+ * @param params - (appparams) application parameters.
735
+ */
736
+ constructor(id: number | bigint, params: ApplicationParams) {
737
+ super();
738
+ this.id = id;
739
+ this.params = params;
740
+
741
+ this.attribute_map = {
742
+ id: 'id',
743
+ params: 'params',
744
+ };
745
+ }
746
+
747
+ // eslint-disable-next-line camelcase
748
+ static from_obj_for_encoding(data: Record<string, any>): Application {
749
+ /* eslint-disable dot-notation */
750
+ if (typeof data['id'] === 'undefined')
751
+ throw new Error(`Response is missing required field 'id': ${data}`);
752
+ if (typeof data['params'] === 'undefined')
753
+ throw new Error(`Response is missing required field 'params': ${data}`);
754
+ return new Application(
755
+ data['id'],
756
+ ApplicationParams.from_obj_for_encoding(data['params'])
757
+ );
758
+ /* eslint-enable dot-notation */
759
+ }
760
+ }
761
+
762
+ /**
763
+ * Stores local state associated with an application.
764
+ */
765
+ export class ApplicationLocalState extends BaseModel {
766
+ /**
767
+ * The application which this local state is for.
768
+ */
769
+ public id: number | bigint;
770
+
771
+ /**
772
+ * (hsch) schema.
773
+ */
774
+ public schema: ApplicationStateSchema;
775
+
776
+ /**
777
+ * (tkv) storage.
778
+ */
779
+ public keyValue?: TealKeyValue[];
780
+
781
+ /**
782
+ * Creates a new `ApplicationLocalState` object.
783
+ * @param id - The application which this local state is for.
784
+ * @param schema - (hsch) schema.
785
+ * @param keyValue - (tkv) storage.
786
+ */
787
+ constructor(
788
+ id: number | bigint,
789
+ schema: ApplicationStateSchema,
790
+ keyValue?: TealKeyValue[]
791
+ ) {
792
+ super();
793
+ this.id = id;
794
+ this.schema = schema;
795
+ this.keyValue = keyValue;
796
+
797
+ this.attribute_map = {
798
+ id: 'id',
799
+ schema: 'schema',
800
+ keyValue: 'key-value',
801
+ };
802
+ }
803
+
804
+ // eslint-disable-next-line camelcase
805
+ static from_obj_for_encoding(
806
+ data: Record<string, any>
807
+ ): ApplicationLocalState {
808
+ /* eslint-disable dot-notation */
809
+ if (typeof data['id'] === 'undefined')
810
+ throw new Error(`Response is missing required field 'id': ${data}`);
811
+ if (typeof data['schema'] === 'undefined')
812
+ throw new Error(`Response is missing required field 'schema': ${data}`);
813
+ return new ApplicationLocalState(
814
+ data['id'],
815
+ ApplicationStateSchema.from_obj_for_encoding(data['schema']),
816
+ typeof data['key-value'] !== 'undefined'
817
+ ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
818
+ : undefined
819
+ );
820
+ /* eslint-enable dot-notation */
821
+ }
822
+ }
823
+
824
+ /**
825
+ * Stores the global information associated with an application.
826
+ */
827
+ export class ApplicationParams extends BaseModel {
828
+ /**
829
+ * (approv) approval program.
830
+ */
831
+ public approvalProgram: Uint8Array;
832
+
833
+ /**
834
+ * (clearp) approval program.
835
+ */
836
+ public clearStateProgram: Uint8Array;
837
+
838
+ /**
839
+ * The address that created this application. This is the address where the
840
+ * parameters and global state for this application can be found.
841
+ */
842
+ public creator: string;
843
+
844
+ /**
845
+ * (epp) the amount of extra program pages available to this app.
846
+ */
847
+ public extraProgramPages?: number | bigint;
848
+
849
+ /**
850
+ * [\gs) global schema
851
+ */
852
+ public globalState?: TealKeyValue[];
853
+
854
+ /**
855
+ * [\gsch) global schema
856
+ */
857
+ public globalStateSchema?: ApplicationStateSchema;
858
+
859
+ /**
860
+ * [\lsch) local schema
861
+ */
862
+ public localStateSchema?: ApplicationStateSchema;
863
+
864
+ /**
865
+ * Creates a new `ApplicationParams` object.
866
+ * @param approvalProgram - (approv) approval program.
867
+ * @param clearStateProgram - (clearp) approval program.
868
+ * @param creator - The address that created this application. This is the address where the
869
+ * parameters and global state for this application can be found.
870
+ * @param extraProgramPages - (epp) the amount of extra program pages available to this app.
871
+ * @param globalState - [\gs) global schema
872
+ * @param globalStateSchema - [\gsch) global schema
873
+ * @param localStateSchema - [\lsch) local schema
874
+ */
875
+ constructor({
876
+ approvalProgram,
877
+ clearStateProgram,
878
+ creator,
879
+ extraProgramPages,
880
+ globalState,
881
+ globalStateSchema,
882
+ localStateSchema,
883
+ }: {
884
+ approvalProgram: string | Uint8Array;
885
+ clearStateProgram: string | Uint8Array;
886
+ creator: string;
887
+ extraProgramPages?: number | bigint;
888
+ globalState?: TealKeyValue[];
889
+ globalStateSchema?: ApplicationStateSchema;
890
+ localStateSchema?: ApplicationStateSchema;
891
+ }) {
892
+ super();
893
+ this.approvalProgram =
894
+ typeof approvalProgram === 'string'
895
+ ? new Uint8Array(Buffer.from(approvalProgram, 'base64'))
896
+ : approvalProgram;
897
+ this.clearStateProgram =
898
+ typeof clearStateProgram === 'string'
899
+ ? new Uint8Array(Buffer.from(clearStateProgram, 'base64'))
900
+ : clearStateProgram;
901
+ this.creator = creator;
902
+ this.extraProgramPages = extraProgramPages;
903
+ this.globalState = globalState;
904
+ this.globalStateSchema = globalStateSchema;
905
+ this.localStateSchema = localStateSchema;
906
+
907
+ this.attribute_map = {
908
+ approvalProgram: 'approval-program',
909
+ clearStateProgram: 'clear-state-program',
910
+ creator: 'creator',
911
+ extraProgramPages: 'extra-program-pages',
912
+ globalState: 'global-state',
913
+ globalStateSchema: 'global-state-schema',
914
+ localStateSchema: 'local-state-schema',
915
+ };
916
+ }
917
+
918
+ // eslint-disable-next-line camelcase
919
+ static from_obj_for_encoding(data: Record<string, any>): ApplicationParams {
920
+ /* eslint-disable dot-notation */
921
+ if (typeof data['approval-program'] === 'undefined')
922
+ throw new Error(
923
+ `Response is missing required field 'approval-program': ${data}`
924
+ );
925
+ if (typeof data['clear-state-program'] === 'undefined')
926
+ throw new Error(
927
+ `Response is missing required field 'clear-state-program': ${data}`
928
+ );
929
+ if (typeof data['creator'] === 'undefined')
930
+ throw new Error(`Response is missing required field 'creator': ${data}`);
931
+ return new ApplicationParams({
932
+ approvalProgram: data['approval-program'],
933
+ clearStateProgram: data['clear-state-program'],
934
+ creator: data['creator'],
935
+ extraProgramPages: data['extra-program-pages'],
936
+ globalState:
937
+ typeof data['global-state'] !== 'undefined'
938
+ ? data['global-state'].map(TealKeyValue.from_obj_for_encoding)
939
+ : undefined,
940
+ globalStateSchema:
941
+ typeof data['global-state-schema'] !== 'undefined'
942
+ ? ApplicationStateSchema.from_obj_for_encoding(
943
+ data['global-state-schema']
944
+ )
945
+ : undefined,
946
+ localStateSchema:
947
+ typeof data['local-state-schema'] !== 'undefined'
948
+ ? ApplicationStateSchema.from_obj_for_encoding(
949
+ data['local-state-schema']
950
+ )
951
+ : undefined,
952
+ });
953
+ /* eslint-enable dot-notation */
954
+ }
955
+ }
956
+
957
+ /**
958
+ * Specifies maximums on the number of each type that may be stored.
959
+ */
960
+ export class ApplicationStateSchema extends BaseModel {
961
+ /**
962
+ * (nui) num of uints.
963
+ */
964
+ public numUint: number | bigint;
965
+
966
+ /**
967
+ * (nbs) num of byte slices.
968
+ */
969
+ public numByteSlice: number | bigint;
970
+
971
+ /**
972
+ * Creates a new `ApplicationStateSchema` object.
973
+ * @param numUint - (nui) num of uints.
974
+ * @param numByteSlice - (nbs) num of byte slices.
975
+ */
976
+ constructor(numUint: number | bigint, numByteSlice: number | bigint) {
977
+ super();
978
+ this.numUint = numUint;
979
+ this.numByteSlice = numByteSlice;
980
+
981
+ this.attribute_map = {
982
+ numUint: 'num-uint',
983
+ numByteSlice: 'num-byte-slice',
984
+ };
985
+ }
986
+
987
+ // eslint-disable-next-line camelcase
988
+ static from_obj_for_encoding(
989
+ data: Record<string, any>
990
+ ): ApplicationStateSchema {
991
+ /* eslint-disable dot-notation */
992
+ if (typeof data['num-uint'] === 'undefined')
993
+ throw new Error(`Response is missing required field 'num-uint': ${data}`);
994
+ if (typeof data['num-byte-slice'] === 'undefined')
995
+ throw new Error(
996
+ `Response is missing required field 'num-byte-slice': ${data}`
997
+ );
998
+ return new ApplicationStateSchema(data['num-uint'], data['num-byte-slice']);
999
+ /* eslint-enable dot-notation */
1000
+ }
1001
+ }
1002
+
1003
+ /**
1004
+ * Specifies both the unique identifier and the parameters for an asset
1005
+ */
1006
+ export class Asset extends BaseModel {
1007
+ /**
1008
+ * unique asset identifier
1009
+ */
1010
+ public index: number | bigint;
1011
+
1012
+ /**
1013
+ * AssetParams specifies the parameters for an asset.
1014
+ * (apar) when part of an AssetConfig transaction.
1015
+ * Definition:
1016
+ * data/transactions/asset.go : AssetParams
1017
+ */
1018
+ public params: AssetParams;
1019
+
1020
+ /**
1021
+ * Creates a new `Asset` object.
1022
+ * @param index - unique asset identifier
1023
+ * @param params - AssetParams specifies the parameters for an asset.
1024
+ * (apar) when part of an AssetConfig transaction.
1025
+ * Definition:
1026
+ * data/transactions/asset.go : AssetParams
1027
+ */
1028
+ constructor(index: number | bigint, params: AssetParams) {
1029
+ super();
1030
+ this.index = index;
1031
+ this.params = params;
1032
+
1033
+ this.attribute_map = {
1034
+ index: 'index',
1035
+ params: 'params',
1036
+ };
1037
+ }
1038
+
1039
+ // eslint-disable-next-line camelcase
1040
+ static from_obj_for_encoding(data: Record<string, any>): Asset {
1041
+ /* eslint-disable dot-notation */
1042
+ if (typeof data['index'] === 'undefined')
1043
+ throw new Error(`Response is missing required field 'index': ${data}`);
1044
+ if (typeof data['params'] === 'undefined')
1045
+ throw new Error(`Response is missing required field 'params': ${data}`);
1046
+ return new Asset(
1047
+ data['index'],
1048
+ AssetParams.from_obj_for_encoding(data['params'])
1049
+ );
1050
+ /* eslint-enable dot-notation */
1051
+ }
1052
+ }
1053
+
1054
+ /**
1055
+ * Describes an asset held by an account.
1056
+ * Definition:
1057
+ * data/basics/userBalance.go : AssetHolding
1058
+ */
1059
+ export class AssetHolding extends BaseModel {
1060
+ /**
1061
+ * (a) number of units held.
1062
+ */
1063
+ public amount: number | bigint;
1064
+
1065
+ /**
1066
+ * Asset ID of the holding.
1067
+ */
1068
+ public assetId: number | bigint;
1069
+
1070
+ /**
1071
+ * (f) whether or not the holding is frozen.
1072
+ */
1073
+ public isFrozen: boolean;
1074
+
1075
+ /**
1076
+ * Creates a new `AssetHolding` object.
1077
+ * @param amount - (a) number of units held.
1078
+ * @param assetId - Asset ID of the holding.
1079
+ * @param isFrozen - (f) whether or not the holding is frozen.
1080
+ */
1081
+ constructor(
1082
+ amount: number | bigint,
1083
+ assetId: number | bigint,
1084
+ isFrozen: boolean
1085
+ ) {
1086
+ super();
1087
+ this.amount = amount;
1088
+ this.assetId = assetId;
1089
+ this.isFrozen = isFrozen;
1090
+
1091
+ this.attribute_map = {
1092
+ amount: 'amount',
1093
+ assetId: 'asset-id',
1094
+ isFrozen: 'is-frozen',
1095
+ };
1096
+ }
1097
+
1098
+ // eslint-disable-next-line camelcase
1099
+ static from_obj_for_encoding(data: Record<string, any>): AssetHolding {
1100
+ /* eslint-disable dot-notation */
1101
+ if (typeof data['amount'] === 'undefined')
1102
+ throw new Error(`Response is missing required field 'amount': ${data}`);
1103
+ if (typeof data['asset-id'] === 'undefined')
1104
+ throw new Error(`Response is missing required field 'asset-id': ${data}`);
1105
+ if (typeof data['is-frozen'] === 'undefined')
1106
+ throw new Error(
1107
+ `Response is missing required field 'is-frozen': ${data}`
1108
+ );
1109
+ return new AssetHolding(
1110
+ data['amount'],
1111
+ data['asset-id'],
1112
+ data['is-frozen']
1113
+ );
1114
+ /* eslint-enable dot-notation */
1115
+ }
1116
+ }
1117
+
1118
+ /**
1119
+ * AssetParams specifies the parameters for an asset.
1120
+ * (apar) when part of an AssetConfig transaction.
1121
+ * Definition:
1122
+ * data/transactions/asset.go : AssetParams
1123
+ */
1124
+ export class AssetParams extends BaseModel {
1125
+ /**
1126
+ * The address that created this asset. This is the address where the parameters
1127
+ * for this asset can be found, and also the address where unwanted asset units can
1128
+ * be sent in the worst case.
1129
+ */
1130
+ public creator: string;
1131
+
1132
+ /**
1133
+ * (dc) The number of digits to use after the decimal point when displaying this
1134
+ * asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in
1135
+ * tenths. If 2, the base unit of the asset is in hundredths, and so on. This value
1136
+ * must be between 0 and 19 (inclusive).
1137
+ */
1138
+ public decimals: number | bigint;
1139
+
1140
+ /**
1141
+ * (t) The total number of units of this asset.
1142
+ */
1143
+ public total: number | bigint;
1144
+
1145
+ /**
1146
+ * (c) Address of account used to clawback holdings of this asset. If empty,
1147
+ * clawback is not permitted.
1148
+ */
1149
+ public clawback?: string;
1150
+
1151
+ /**
1152
+ * (df) Whether holdings of this asset are frozen by default.
1153
+ */
1154
+ public defaultFrozen?: boolean;
1155
+
1156
+ /**
1157
+ * (f) Address of account used to freeze holdings of this asset. If empty, freezing
1158
+ * is not permitted.
1159
+ */
1160
+ public freeze?: string;
1161
+
1162
+ /**
1163
+ * (m) Address of account used to manage the keys of this asset and to destroy it.
1164
+ */
1165
+ public manager?: string;
1166
+
1167
+ /**
1168
+ * (am) A commitment to some unspecified asset metadata. The format of this
1169
+ * metadata is up to the application.
1170
+ */
1171
+ public metadataHash?: Uint8Array;
1172
+
1173
+ /**
1174
+ * (an) Name of this asset, as supplied by the creator. Included only when the
1175
+ * asset name is composed of printable utf-8 characters.
1176
+ */
1177
+ public name?: string;
1178
+
1179
+ /**
1180
+ * Base64 encoded name of this asset, as supplied by the creator.
1181
+ */
1182
+ public nameB64?: Uint8Array;
1183
+
1184
+ /**
1185
+ * (r) Address of account holding reserve (non-minted) units of this asset.
1186
+ */
1187
+ public reserve?: string;
1188
+
1189
+ /**
1190
+ * (un) Name of a unit of this asset, as supplied by the creator. Included only
1191
+ * when the name of a unit of this asset is composed of printable utf-8 characters.
1192
+ */
1193
+ public unitName?: string;
1194
+
1195
+ /**
1196
+ * Base64 encoded name of a unit of this asset, as supplied by the creator.
1197
+ */
1198
+ public unitNameB64?: Uint8Array;
1199
+
1200
+ /**
1201
+ * (au) URL where more information about the asset can be retrieved. Included only
1202
+ * when the URL is composed of printable utf-8 characters.
1203
+ */
1204
+ public url?: string;
1205
+
1206
+ /**
1207
+ * Base64 encoded URL where more information about the asset can be retrieved.
1208
+ */
1209
+ public urlB64?: Uint8Array;
1210
+
1211
+ /**
1212
+ * Creates a new `AssetParams` object.
1213
+ * @param creator - The address that created this asset. This is the address where the parameters
1214
+ * for this asset can be found, and also the address where unwanted asset units can
1215
+ * be sent in the worst case.
1216
+ * @param decimals - (dc) The number of digits to use after the decimal point when displaying this
1217
+ * asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in
1218
+ * tenths. If 2, the base unit of the asset is in hundredths, and so on. This value
1219
+ * must be between 0 and 19 (inclusive).
1220
+ * @param total - (t) The total number of units of this asset.
1221
+ * @param clawback - (c) Address of account used to clawback holdings of this asset. If empty,
1222
+ * clawback is not permitted.
1223
+ * @param defaultFrozen - (df) Whether holdings of this asset are frozen by default.
1224
+ * @param freeze - (f) Address of account used to freeze holdings of this asset. If empty, freezing
1225
+ * is not permitted.
1226
+ * @param manager - (m) Address of account used to manage the keys of this asset and to destroy it.
1227
+ * @param metadataHash - (am) A commitment to some unspecified asset metadata. The format of this
1228
+ * metadata is up to the application.
1229
+ * @param name - (an) Name of this asset, as supplied by the creator. Included only when the
1230
+ * asset name is composed of printable utf-8 characters.
1231
+ * @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.
1232
+ * @param reserve - (r) Address of account holding reserve (non-minted) units of this asset.
1233
+ * @param unitName - (un) Name of a unit of this asset, as supplied by the creator. Included only
1234
+ * when the name of a unit of this asset is composed of printable utf-8 characters.
1235
+ * @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.
1236
+ * @param url - (au) URL where more information about the asset can be retrieved. Included only
1237
+ * when the URL is composed of printable utf-8 characters.
1238
+ * @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
1239
+ */
1240
+ constructor({
1241
+ creator,
1242
+ decimals,
1243
+ total,
1244
+ clawback,
1245
+ defaultFrozen,
1246
+ freeze,
1247
+ manager,
1248
+ metadataHash,
1249
+ name,
1250
+ nameB64,
1251
+ reserve,
1252
+ unitName,
1253
+ unitNameB64,
1254
+ url,
1255
+ urlB64,
1256
+ }: {
1257
+ creator: string;
1258
+ decimals: number | bigint;
1259
+ total: number | bigint;
1260
+ clawback?: string;
1261
+ defaultFrozen?: boolean;
1262
+ freeze?: string;
1263
+ manager?: string;
1264
+ metadataHash?: string | Uint8Array;
1265
+ name?: string;
1266
+ nameB64?: string | Uint8Array;
1267
+ reserve?: string;
1268
+ unitName?: string;
1269
+ unitNameB64?: string | Uint8Array;
1270
+ url?: string;
1271
+ urlB64?: string | Uint8Array;
1272
+ }) {
1273
+ super();
1274
+ this.creator = creator;
1275
+ this.decimals = decimals;
1276
+ this.total = total;
1277
+ this.clawback = clawback;
1278
+ this.defaultFrozen = defaultFrozen;
1279
+ this.freeze = freeze;
1280
+ this.manager = manager;
1281
+ this.metadataHash =
1282
+ typeof metadataHash === 'string'
1283
+ ? new Uint8Array(Buffer.from(metadataHash, 'base64'))
1284
+ : metadataHash;
1285
+ this.name = name;
1286
+ this.nameB64 =
1287
+ typeof nameB64 === 'string'
1288
+ ? new Uint8Array(Buffer.from(nameB64, 'base64'))
1289
+ : nameB64;
1290
+ this.reserve = reserve;
1291
+ this.unitName = unitName;
1292
+ this.unitNameB64 =
1293
+ typeof unitNameB64 === 'string'
1294
+ ? new Uint8Array(Buffer.from(unitNameB64, 'base64'))
1295
+ : unitNameB64;
1296
+ this.url = url;
1297
+ this.urlB64 =
1298
+ typeof urlB64 === 'string'
1299
+ ? new Uint8Array(Buffer.from(urlB64, 'base64'))
1300
+ : urlB64;
1301
+
1302
+ this.attribute_map = {
1303
+ creator: 'creator',
1304
+ decimals: 'decimals',
1305
+ total: 'total',
1306
+ clawback: 'clawback',
1307
+ defaultFrozen: 'default-frozen',
1308
+ freeze: 'freeze',
1309
+ manager: 'manager',
1310
+ metadataHash: 'metadata-hash',
1311
+ name: 'name',
1312
+ nameB64: 'name-b64',
1313
+ reserve: 'reserve',
1314
+ unitName: 'unit-name',
1315
+ unitNameB64: 'unit-name-b64',
1316
+ url: 'url',
1317
+ urlB64: 'url-b64',
1318
+ };
1319
+ }
1320
+
1321
+ // eslint-disable-next-line camelcase
1322
+ static from_obj_for_encoding(data: Record<string, any>): AssetParams {
1323
+ /* eslint-disable dot-notation */
1324
+ if (typeof data['creator'] === 'undefined')
1325
+ throw new Error(`Response is missing required field 'creator': ${data}`);
1326
+ if (typeof data['decimals'] === 'undefined')
1327
+ throw new Error(`Response is missing required field 'decimals': ${data}`);
1328
+ if (typeof data['total'] === 'undefined')
1329
+ throw new Error(`Response is missing required field 'total': ${data}`);
1330
+ return new AssetParams({
1331
+ creator: data['creator'],
1332
+ decimals: data['decimals'],
1333
+ total: data['total'],
1334
+ clawback: data['clawback'],
1335
+ defaultFrozen: data['default-frozen'],
1336
+ freeze: data['freeze'],
1337
+ manager: data['manager'],
1338
+ metadataHash: data['metadata-hash'],
1339
+ name: data['name'],
1340
+ nameB64: data['name-b64'],
1341
+ reserve: data['reserve'],
1342
+ unitName: data['unit-name'],
1343
+ unitNameB64: data['unit-name-b64'],
1344
+ url: data['url'],
1345
+ urlB64: data['url-b64'],
1346
+ });
1347
+ /* eslint-enable dot-notation */
1348
+ }
1349
+ }
1350
+
1351
+ /**
1352
+ * Hash of a block header.
1353
+ */
1354
+ export class BlockHashResponse extends BaseModel {
1355
+ /**
1356
+ * Block header hash.
1357
+ */
1358
+ public blockhash: string;
1359
+
1360
+ /**
1361
+ * Creates a new `BlockHashResponse` object.
1362
+ * @param blockhash - Block header hash.
1363
+ */
1364
+ constructor(blockhash: string) {
1365
+ super();
1366
+ this.blockhash = blockhash;
1367
+
1368
+ this.attribute_map = {
1369
+ blockhash: 'blockHash',
1370
+ };
1371
+ }
1372
+
1373
+ // eslint-disable-next-line camelcase
1374
+ static from_obj_for_encoding(data: Record<string, any>): BlockHashResponse {
1375
+ /* eslint-disable dot-notation */
1376
+ if (typeof data['blockHash'] === 'undefined')
1377
+ throw new Error(
1378
+ `Response is missing required field 'blockHash': ${data}`
1379
+ );
1380
+ return new BlockHashResponse(data['blockHash']);
1381
+ /* eslint-enable dot-notation */
1382
+ }
1383
+ }
1384
+
1385
+ /**
1386
+ * Encoded block object.
1387
+ */
1388
+ export class BlockResponse extends BaseModel {
1389
+ /**
1390
+ * Block header data.
1391
+ */
1392
+ public block: BlockHeader;
1393
+
1394
+ /**
1395
+ * Optional certificate object. This is only included when the format is set to
1396
+ * message pack.
1397
+ */
1398
+ public cert?: Record<string, any>;
1399
+
1400
+ /**
1401
+ * Creates a new `BlockResponse` object.
1402
+ * @param block - Block header data.
1403
+ * @param cert - Optional certificate object. This is only included when the format is set to
1404
+ * message pack.
1405
+ */
1406
+ constructor(block: BlockHeader, cert?: Record<string, any>) {
1407
+ super();
1408
+ this.block = block;
1409
+ this.cert = cert;
1410
+
1411
+ this.attribute_map = {
1412
+ block: 'block',
1413
+ cert: 'cert',
1414
+ };
1415
+ }
1416
+
1417
+ // eslint-disable-next-line camelcase
1418
+ static from_obj_for_encoding(data: Record<string, any>): BlockResponse {
1419
+ /* eslint-disable dot-notation */
1420
+ if (typeof data['block'] === 'undefined')
1421
+ throw new Error(`Response is missing required field 'block': ${data}`);
1422
+ return new BlockResponse(data['block'], data['cert']);
1423
+ /* eslint-enable dot-notation */
1424
+ }
1425
+ }
1426
+
1427
+ /**
1428
+ * Box name and its content.
1429
+ */
1430
+ export class Box extends BaseModel {
1431
+ /**
1432
+ * (name) box name, base64 encoded
1433
+ */
1434
+ public name: Uint8Array;
1435
+
1436
+ /**
1437
+ * (value) box value, base64 encoded.
1438
+ */
1439
+ public value: Uint8Array;
1440
+
1441
+ /**
1442
+ * Creates a new `Box` object.
1443
+ * @param name - (name) box name, base64 encoded
1444
+ * @param value - (value) box value, base64 encoded.
1445
+ */
1446
+ constructor(name: string | Uint8Array, value: string | Uint8Array) {
1447
+ super();
1448
+ this.name =
1449
+ typeof name === 'string'
1450
+ ? new Uint8Array(Buffer.from(name, 'base64'))
1451
+ : name;
1452
+ this.value =
1453
+ typeof value === 'string'
1454
+ ? new Uint8Array(Buffer.from(value, 'base64'))
1455
+ : value;
1456
+
1457
+ this.attribute_map = {
1458
+ name: 'name',
1459
+ value: 'value',
1460
+ };
1461
+ }
1462
+
1463
+ // eslint-disable-next-line camelcase
1464
+ static from_obj_for_encoding(data: Record<string, any>): Box {
1465
+ /* eslint-disable dot-notation */
1466
+ if (typeof data['name'] === 'undefined')
1467
+ throw new Error(`Response is missing required field 'name': ${data}`);
1468
+ if (typeof data['value'] === 'undefined')
1469
+ throw new Error(`Response is missing required field 'value': ${data}`);
1470
+ return new Box(data['name'], data['value']);
1471
+ /* eslint-enable dot-notation */
1472
+ }
1473
+ }
1474
+
1475
+ /**
1476
+ * Box descriptor describes a Box.
1477
+ */
1478
+ export class BoxDescriptor extends BaseModel {
1479
+ /**
1480
+ * Base64 encoded box name
1481
+ */
1482
+ public name: Uint8Array;
1483
+
1484
+ /**
1485
+ * Creates a new `BoxDescriptor` object.
1486
+ * @param name - Base64 encoded box name
1487
+ */
1488
+ constructor(name: string | Uint8Array) {
1489
+ super();
1490
+ this.name =
1491
+ typeof name === 'string'
1492
+ ? new Uint8Array(Buffer.from(name, 'base64'))
1493
+ : name;
1494
+
1495
+ this.attribute_map = {
1496
+ name: 'name',
1497
+ };
1498
+ }
1499
+
1500
+ // eslint-disable-next-line camelcase
1501
+ static from_obj_for_encoding(data: Record<string, any>): BoxDescriptor {
1502
+ /* eslint-disable dot-notation */
1503
+ if (typeof data['name'] === 'undefined')
1504
+ throw new Error(`Response is missing required field 'name': ${data}`);
1505
+ return new BoxDescriptor(data['name']);
1506
+ /* eslint-enable dot-notation */
1507
+ }
1508
+ }
1509
+
1510
+ /**
1511
+ * Box names of an application
1512
+ */
1513
+ export class BoxesResponse extends BaseModel {
1514
+ public boxes: BoxDescriptor[];
1515
+
1516
+ /**
1517
+ * Creates a new `BoxesResponse` object.
1518
+ * @param boxes -
1519
+ */
1520
+ constructor(boxes: BoxDescriptor[]) {
1521
+ super();
1522
+ this.boxes = boxes;
1523
+
1524
+ this.attribute_map = {
1525
+ boxes: 'boxes',
1526
+ };
1527
+ }
1528
+
1529
+ // eslint-disable-next-line camelcase
1530
+ static from_obj_for_encoding(data: Record<string, any>): BoxesResponse {
1531
+ /* eslint-disable dot-notation */
1532
+ if (!Array.isArray(data['boxes']))
1533
+ throw new Error(
1534
+ `Response is missing required array field 'boxes': ${data}`
1535
+ );
1536
+ return new BoxesResponse(
1537
+ data['boxes'].map(BoxDescriptor.from_obj_for_encoding)
1538
+ );
1539
+ /* eslint-enable dot-notation */
1540
+ }
1541
+ }
1542
+
1543
+ export class BuildVersion extends BaseModel {
1544
+ public branch: string;
1545
+
1546
+ public buildNumber: number | bigint;
1547
+
1548
+ public channel: string;
1549
+
1550
+ public commitHash: string;
1551
+
1552
+ public major: number | bigint;
1553
+
1554
+ public minor: number | bigint;
1555
+
1556
+ /**
1557
+ * Creates a new `BuildVersion` object.
1558
+ * @param branch -
1559
+ * @param buildNumber -
1560
+ * @param channel -
1561
+ * @param commitHash -
1562
+ * @param major -
1563
+ * @param minor -
1564
+ */
1565
+ constructor({
1566
+ branch,
1567
+ buildNumber,
1568
+ channel,
1569
+ commitHash,
1570
+ major,
1571
+ minor,
1572
+ }: {
1573
+ branch: string;
1574
+ buildNumber: number | bigint;
1575
+ channel: string;
1576
+ commitHash: string;
1577
+ major: number | bigint;
1578
+ minor: number | bigint;
1579
+ }) {
1580
+ super();
1581
+ this.branch = branch;
1582
+ this.buildNumber = buildNumber;
1583
+ this.channel = channel;
1584
+ this.commitHash = commitHash;
1585
+ this.major = major;
1586
+ this.minor = minor;
1587
+
1588
+ this.attribute_map = {
1589
+ branch: 'branch',
1590
+ buildNumber: 'build_number',
1591
+ channel: 'channel',
1592
+ commitHash: 'commit_hash',
1593
+ major: 'major',
1594
+ minor: 'minor',
1595
+ };
1596
+ }
1597
+
1598
+ // eslint-disable-next-line camelcase
1599
+ static from_obj_for_encoding(data: Record<string, any>): BuildVersion {
1600
+ /* eslint-disable dot-notation */
1601
+ if (typeof data['branch'] === 'undefined')
1602
+ throw new Error(`Response is missing required field 'branch': ${data}`);
1603
+ if (typeof data['build_number'] === 'undefined')
1604
+ throw new Error(
1605
+ `Response is missing required field 'build_number': ${data}`
1606
+ );
1607
+ if (typeof data['channel'] === 'undefined')
1608
+ throw new Error(`Response is missing required field 'channel': ${data}`);
1609
+ if (typeof data['commit_hash'] === 'undefined')
1610
+ throw new Error(
1611
+ `Response is missing required field 'commit_hash': ${data}`
1612
+ );
1613
+ if (typeof data['major'] === 'undefined')
1614
+ throw new Error(`Response is missing required field 'major': ${data}`);
1615
+ if (typeof data['minor'] === 'undefined')
1616
+ throw new Error(`Response is missing required field 'minor': ${data}`);
1617
+ return new BuildVersion({
1618
+ branch: data['branch'],
1619
+ buildNumber: data['build_number'],
1620
+ channel: data['channel'],
1621
+ commitHash: data['commit_hash'],
1622
+ major: data['major'],
1623
+ minor: data['minor'],
1624
+ });
1625
+ /* eslint-enable dot-notation */
1626
+ }
1627
+ }
1628
+
1629
+ /**
1630
+ *
1631
+ */
1632
+ export class CatchpointAbortResponse extends BaseModel {
1633
+ /**
1634
+ * Catchup abort response string
1635
+ */
1636
+ public catchupMessage: string;
1637
+
1638
+ /**
1639
+ * Creates a new `CatchpointAbortResponse` object.
1640
+ * @param catchupMessage - Catchup abort response string
1641
+ */
1642
+ constructor(catchupMessage: string) {
1643
+ super();
1644
+ this.catchupMessage = catchupMessage;
1645
+
1646
+ this.attribute_map = {
1647
+ catchupMessage: 'catchup-message',
1648
+ };
1649
+ }
1650
+
1651
+ // eslint-disable-next-line camelcase
1652
+ static from_obj_for_encoding(
1653
+ data: Record<string, any>
1654
+ ): CatchpointAbortResponse {
1655
+ /* eslint-disable dot-notation */
1656
+ if (typeof data['catchup-message'] === 'undefined')
1657
+ throw new Error(
1658
+ `Response is missing required field 'catchup-message': ${data}`
1659
+ );
1660
+ return new CatchpointAbortResponse(data['catchup-message']);
1661
+ /* eslint-enable dot-notation */
1662
+ }
1663
+ }
1664
+
1665
+ /**
1666
+ *
1667
+ */
1668
+ export class CatchpointStartResponse extends BaseModel {
1669
+ /**
1670
+ * Catchup start response string
1671
+ */
1672
+ public catchupMessage: string;
1673
+
1674
+ /**
1675
+ * Creates a new `CatchpointStartResponse` object.
1676
+ * @param catchupMessage - Catchup start response string
1677
+ */
1678
+ constructor(catchupMessage: string) {
1679
+ super();
1680
+ this.catchupMessage = catchupMessage;
1681
+
1682
+ this.attribute_map = {
1683
+ catchupMessage: 'catchup-message',
1684
+ };
1685
+ }
1686
+
1687
+ // eslint-disable-next-line camelcase
1688
+ static from_obj_for_encoding(
1689
+ data: Record<string, any>
1690
+ ): CatchpointStartResponse {
1691
+ /* eslint-disable dot-notation */
1692
+ if (typeof data['catchup-message'] === 'undefined')
1693
+ throw new Error(
1694
+ `Response is missing required field 'catchup-message': ${data}`
1695
+ );
1696
+ return new CatchpointStartResponse(data['catchup-message']);
1697
+ /* eslint-enable dot-notation */
1698
+ }
1699
+ }
1700
+
1701
+ /**
1702
+ * Teal compile Result
1703
+ */
1704
+ export class CompileResponse extends BaseModel {
1705
+ /**
1706
+ * base32 SHA512_256 of program bytes (Address style)
1707
+ */
1708
+ public hash: string;
1709
+
1710
+ /**
1711
+ * base64 encoded program bytes
1712
+ */
1713
+ public result: string;
1714
+
1715
+ /**
1716
+ * JSON of the source map
1717
+ */
1718
+ public sourcemap?: Record<string, any>;
1719
+
1720
+ /**
1721
+ * Creates a new `CompileResponse` object.
1722
+ * @param hash - base32 SHA512_256 of program bytes (Address style)
1723
+ * @param result - base64 encoded program bytes
1724
+ * @param sourcemap - JSON of the source map
1725
+ */
1726
+ constructor(hash: string, result: string, sourcemap?: Record<string, any>) {
1727
+ super();
1728
+ this.hash = hash;
1729
+ this.result = result;
1730
+ this.sourcemap = sourcemap;
1731
+
1732
+ this.attribute_map = {
1733
+ hash: 'hash',
1734
+ result: 'result',
1735
+ sourcemap: 'sourcemap',
1736
+ };
1737
+ }
1738
+
1739
+ // eslint-disable-next-line camelcase
1740
+ static from_obj_for_encoding(data: Record<string, any>): CompileResponse {
1741
+ /* eslint-disable dot-notation */
1742
+ if (typeof data['hash'] === 'undefined')
1743
+ throw new Error(`Response is missing required field 'hash': ${data}`);
1744
+ if (typeof data['result'] === 'undefined')
1745
+ throw new Error(`Response is missing required field 'result': ${data}`);
1746
+ return new CompileResponse(data['hash'], data['result'], data['sourcemap']);
1747
+ /* eslint-enable dot-notation */
1748
+ }
1749
+ }
1750
+
1751
+ /**
1752
+ * Teal disassembly Result
1753
+ */
1754
+ export class DisassembleResponse extends BaseModel {
1755
+ /**
1756
+ * disassembled Teal code
1757
+ */
1758
+ public result: string;
1759
+
1760
+ /**
1761
+ * Creates a new `DisassembleResponse` object.
1762
+ * @param result - disassembled Teal code
1763
+ */
1764
+ constructor(result: string) {
1765
+ super();
1766
+ this.result = result;
1767
+
1768
+ this.attribute_map = {
1769
+ result: 'result',
1770
+ };
1771
+ }
1772
+
1773
+ // eslint-disable-next-line camelcase
1774
+ static from_obj_for_encoding(data: Record<string, any>): DisassembleResponse {
1775
+ /* eslint-disable dot-notation */
1776
+ if (typeof data['result'] === 'undefined')
1777
+ throw new Error(`Response is missing required field 'result': ${data}`);
1778
+ return new DisassembleResponse(data['result']);
1779
+ /* eslint-enable dot-notation */
1780
+ }
1781
+ }
1782
+
1783
+ /**
1784
+ * Request data type for dryrun endpoint. Given the Transactions and simulated
1785
+ * ledger state upload, run TEAL scripts and return debugging information.
1786
+ */
1787
+ export class DryrunRequest extends BaseModel {
1788
+ public accounts: Account[];
1789
+
1790
+ public apps: Application[];
1791
+
1792
+ /**
1793
+ * LatestTimestamp is available to some TEAL scripts. Defaults to the latest
1794
+ * confirmed timestamp this algod is attached to.
1795
+ */
1796
+ public latestTimestamp: number | bigint;
1797
+
1798
+ /**
1799
+ * ProtocolVersion specifies a specific version string to operate under, otherwise
1800
+ * whatever the current protocol of the network this algod is running in.
1801
+ */
1802
+ public protocolVersion: string;
1803
+
1804
+ /**
1805
+ * Round is available to some TEAL scripts. Defaults to the current round on the
1806
+ * network this algod is attached to.
1807
+ */
1808
+ public round: number | bigint;
1809
+
1810
+ public sources: DryrunSource[];
1811
+
1812
+ public txns: EncodedSignedTransaction[];
1813
+
1814
+ /**
1815
+ * Creates a new `DryrunRequest` object.
1816
+ * @param accounts -
1817
+ * @param apps -
1818
+ * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
1819
+ * confirmed timestamp this algod is attached to.
1820
+ * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
1821
+ * whatever the current protocol of the network this algod is running in.
1822
+ * @param round - Round is available to some TEAL scripts. Defaults to the current round on the
1823
+ * network this algod is attached to.
1824
+ * @param sources -
1825
+ * @param txns -
1826
+ */
1827
+ constructor({
1828
+ accounts,
1829
+ apps,
1830
+ latestTimestamp,
1831
+ protocolVersion,
1832
+ round,
1833
+ sources,
1834
+ txns,
1835
+ }: {
1836
+ accounts: Account[];
1837
+ apps: Application[];
1838
+ latestTimestamp: number | bigint;
1839
+ protocolVersion: string;
1840
+ round: number | bigint;
1841
+ sources: DryrunSource[];
1842
+ txns: EncodedSignedTransaction[];
1843
+ }) {
1844
+ super();
1845
+ this.accounts = accounts;
1846
+ this.apps = apps;
1847
+ this.latestTimestamp = latestTimestamp;
1848
+ this.protocolVersion = protocolVersion;
1849
+ this.round = round;
1850
+ this.sources = sources;
1851
+ this.txns = txns;
1852
+
1853
+ this.attribute_map = {
1854
+ accounts: 'accounts',
1855
+ apps: 'apps',
1856
+ latestTimestamp: 'latest-timestamp',
1857
+ protocolVersion: 'protocol-version',
1858
+ round: 'round',
1859
+ sources: 'sources',
1860
+ txns: 'txns',
1861
+ };
1862
+ }
1863
+
1864
+ // eslint-disable-next-line camelcase
1865
+ static from_obj_for_encoding(data: Record<string, any>): DryrunRequest {
1866
+ /* eslint-disable dot-notation */
1867
+ if (!Array.isArray(data['accounts']))
1868
+ throw new Error(
1869
+ `Response is missing required array field 'accounts': ${data}`
1870
+ );
1871
+ if (!Array.isArray(data['apps']))
1872
+ throw new Error(
1873
+ `Response is missing required array field 'apps': ${data}`
1874
+ );
1875
+ if (typeof data['latest-timestamp'] === 'undefined')
1876
+ throw new Error(
1877
+ `Response is missing required field 'latest-timestamp': ${data}`
1878
+ );
1879
+ if (typeof data['protocol-version'] === 'undefined')
1880
+ throw new Error(
1881
+ `Response is missing required field 'protocol-version': ${data}`
1882
+ );
1883
+ if (typeof data['round'] === 'undefined')
1884
+ throw new Error(`Response is missing required field 'round': ${data}`);
1885
+ if (!Array.isArray(data['sources']))
1886
+ throw new Error(
1887
+ `Response is missing required array field 'sources': ${data}`
1888
+ );
1889
+ if (!Array.isArray(data['txns']))
1890
+ throw new Error(
1891
+ `Response is missing required array field 'txns': ${data}`
1892
+ );
1893
+ return new DryrunRequest({
1894
+ accounts: data['accounts'].map(Account.from_obj_for_encoding),
1895
+ apps: data['apps'].map(Application.from_obj_for_encoding),
1896
+ latestTimestamp: data['latest-timestamp'],
1897
+ protocolVersion: data['protocol-version'],
1898
+ round: data['round'],
1899
+ sources: data['sources'].map(DryrunSource.from_obj_for_encoding),
1900
+ txns: data['txns'],
1901
+ });
1902
+ /* eslint-enable dot-notation */
1903
+ }
1904
+ }
1905
+
1906
+ /**
1907
+ * DryrunResponse contains per-txn debug information from a dryrun.
1908
+ */
1909
+ export class DryrunResponse extends BaseModel {
1910
+ public error: string;
1911
+
1912
+ /**
1913
+ * Protocol version is the protocol version Dryrun was operated under.
1914
+ */
1915
+ public protocolVersion: string;
1916
+
1917
+ public txns: DryrunTxnResult[];
1918
+
1919
+ /**
1920
+ * Creates a new `DryrunResponse` object.
1921
+ * @param error -
1922
+ * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1923
+ * @param txns -
1924
+ */
1925
+ constructor(error: string, protocolVersion: string, txns: DryrunTxnResult[]) {
1926
+ super();
1927
+ this.error = error;
1928
+ this.protocolVersion = protocolVersion;
1929
+ this.txns = txns;
1930
+
1931
+ this.attribute_map = {
1932
+ error: 'error',
1933
+ protocolVersion: 'protocol-version',
1934
+ txns: 'txns',
1935
+ };
1936
+ }
1937
+
1938
+ // eslint-disable-next-line camelcase
1939
+ static from_obj_for_encoding(data: Record<string, any>): DryrunResponse {
1940
+ /* eslint-disable dot-notation */
1941
+ if (typeof data['error'] === 'undefined')
1942
+ throw new Error(`Response is missing required field 'error': ${data}`);
1943
+ if (typeof data['protocol-version'] === 'undefined')
1944
+ throw new Error(
1945
+ `Response is missing required field 'protocol-version': ${data}`
1946
+ );
1947
+ if (!Array.isArray(data['txns']))
1948
+ throw new Error(
1949
+ `Response is missing required array field 'txns': ${data}`
1950
+ );
1951
+ return new DryrunResponse(
1952
+ data['error'],
1953
+ data['protocol-version'],
1954
+ data['txns'].map(DryrunTxnResult.from_obj_for_encoding)
1955
+ );
1956
+ /* eslint-enable dot-notation */
1957
+ }
1958
+ }
1959
+
1960
+ /**
1961
+ * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
1962
+ * transactions or application state.
1963
+ */
1964
+ export class DryrunSource extends BaseModel {
1965
+ /**
1966
+ * FieldName is what kind of sources this is. If lsig then it goes into the
1967
+ * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
1968
+ * Approval Program or Clear State Program of application[this.AppIndex].
1969
+ */
1970
+ public fieldName: string;
1971
+
1972
+ public source: string;
1973
+
1974
+ public txnIndex: number | bigint;
1975
+
1976
+ public appIndex: number | bigint;
1977
+
1978
+ /**
1979
+ * Creates a new `DryrunSource` object.
1980
+ * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
1981
+ * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
1982
+ * Approval Program or Clear State Program of application[this.AppIndex].
1983
+ * @param source -
1984
+ * @param txnIndex -
1985
+ * @param appIndex -
1986
+ */
1987
+ constructor(
1988
+ fieldName: string,
1989
+ source: string,
1990
+ txnIndex: number | bigint,
1991
+ appIndex: number | bigint
1992
+ ) {
1993
+ super();
1994
+ this.fieldName = fieldName;
1995
+ this.source = source;
1996
+ this.txnIndex = txnIndex;
1997
+ this.appIndex = appIndex;
1998
+
1999
+ this.attribute_map = {
2000
+ fieldName: 'field-name',
2001
+ source: 'source',
2002
+ txnIndex: 'txn-index',
2003
+ appIndex: 'app-index',
2004
+ };
2005
+ }
2006
+
2007
+ // eslint-disable-next-line camelcase
2008
+ static from_obj_for_encoding(data: Record<string, any>): DryrunSource {
2009
+ /* eslint-disable dot-notation */
2010
+ if (typeof data['field-name'] === 'undefined')
2011
+ throw new Error(
2012
+ `Response is missing required field 'field-name': ${data}`
2013
+ );
2014
+ if (typeof data['source'] === 'undefined')
2015
+ throw new Error(`Response is missing required field 'source': ${data}`);
2016
+ if (typeof data['txn-index'] === 'undefined')
2017
+ throw new Error(
2018
+ `Response is missing required field 'txn-index': ${data}`
2019
+ );
2020
+ if (typeof data['app-index'] === 'undefined')
2021
+ throw new Error(
2022
+ `Response is missing required field 'app-index': ${data}`
2023
+ );
2024
+ return new DryrunSource(
2025
+ data['field-name'],
2026
+ data['source'],
2027
+ data['txn-index'],
2028
+ data['app-index']
2029
+ );
2030
+ /* eslint-enable dot-notation */
2031
+ }
2032
+ }
2033
+
2034
+ /**
2035
+ * Stores the TEAL eval step data
2036
+ */
2037
+ export class DryrunState extends BaseModel {
2038
+ /**
2039
+ * Line number
2040
+ */
2041
+ public line: number | bigint;
2042
+
2043
+ /**
2044
+ * Program counter
2045
+ */
2046
+ public pc: number | bigint;
2047
+
2048
+ public stack: TealValue[];
2049
+
2050
+ /**
2051
+ * Evaluation error if any
2052
+ */
2053
+ public error?: string;
2054
+
2055
+ public scratch?: TealValue[];
2056
+
2057
+ /**
2058
+ * Creates a new `DryrunState` object.
2059
+ * @param line - Line number
2060
+ * @param pc - Program counter
2061
+ * @param stack -
2062
+ * @param error - Evaluation error if any
2063
+ * @param scratch -
2064
+ */
2065
+ constructor({
2066
+ line,
2067
+ pc,
2068
+ stack,
2069
+ error,
2070
+ scratch,
2071
+ }: {
2072
+ line: number | bigint;
2073
+ pc: number | bigint;
2074
+ stack: TealValue[];
2075
+ error?: string;
2076
+ scratch?: TealValue[];
2077
+ }) {
2078
+ super();
2079
+ this.line = line;
2080
+ this.pc = pc;
2081
+ this.stack = stack;
2082
+ this.error = error;
2083
+ this.scratch = scratch;
2084
+
2085
+ this.attribute_map = {
2086
+ line: 'line',
2087
+ pc: 'pc',
2088
+ stack: 'stack',
2089
+ error: 'error',
2090
+ scratch: 'scratch',
2091
+ };
2092
+ }
2093
+
2094
+ // eslint-disable-next-line camelcase
2095
+ static from_obj_for_encoding(data: Record<string, any>): DryrunState {
2096
+ /* eslint-disable dot-notation */
2097
+ if (typeof data['line'] === 'undefined')
2098
+ throw new Error(`Response is missing required field 'line': ${data}`);
2099
+ if (typeof data['pc'] === 'undefined')
2100
+ throw new Error(`Response is missing required field 'pc': ${data}`);
2101
+ if (!Array.isArray(data['stack']))
2102
+ throw new Error(
2103
+ `Response is missing required array field 'stack': ${data}`
2104
+ );
2105
+ return new DryrunState({
2106
+ line: data['line'],
2107
+ pc: data['pc'],
2108
+ stack: data['stack'].map(TealValue.from_obj_for_encoding),
2109
+ error: data['error'],
2110
+ scratch:
2111
+ typeof data['scratch'] !== 'undefined'
2112
+ ? data['scratch'].map(TealValue.from_obj_for_encoding)
2113
+ : undefined,
2114
+ });
2115
+ /* eslint-enable dot-notation */
2116
+ }
2117
+ }
2118
+
2119
+ /**
2120
+ * DryrunTxnResult contains any LogicSig or ApplicationCall program debug
2121
+ * information and state updates from a dryrun.
2122
+ */
2123
+ export class DryrunTxnResult extends BaseModel {
2124
+ /**
2125
+ * Disassembled program line by line.
2126
+ */
2127
+ public disassembly: string[];
2128
+
2129
+ public appCallMessages?: string[];
2130
+
2131
+ public appCallTrace?: DryrunState[];
2132
+
2133
+ /**
2134
+ * Budget added during execution of app call transaction.
2135
+ */
2136
+ public budgetAdded?: number | bigint;
2137
+
2138
+ /**
2139
+ * Budget consumed during execution of app call transaction.
2140
+ */
2141
+ public budgetConsumed?: number | bigint;
2142
+
2143
+ /**
2144
+ * Net cost of app execution. Field is DEPRECATED and is subject for removal.
2145
+ * Instead, use `budget-added` and `budget-consumed.
2146
+ */
2147
+ public cost?: number | bigint;
2148
+
2149
+ /**
2150
+ * Application state delta.
2151
+ */
2152
+ public globalDelta?: EvalDeltaKeyValue[];
2153
+
2154
+ public localDeltas?: AccountStateDelta[];
2155
+
2156
+ /**
2157
+ * Disassembled lsig program line by line.
2158
+ */
2159
+ public logicSigDisassembly?: string[];
2160
+
2161
+ public logicSigMessages?: string[];
2162
+
2163
+ public logicSigTrace?: DryrunState[];
2164
+
2165
+ public logs?: Uint8Array[];
2166
+
2167
+ /**
2168
+ * Creates a new `DryrunTxnResult` object.
2169
+ * @param disassembly - Disassembled program line by line.
2170
+ * @param appCallMessages -
2171
+ * @param appCallTrace -
2172
+ * @param budgetAdded - Budget added during execution of app call transaction.
2173
+ * @param budgetConsumed - Budget consumed during execution of app call transaction.
2174
+ * @param cost - Net cost of app execution. Field is DEPRECATED and is subject for removal.
2175
+ * Instead, use `budget-added` and `budget-consumed.
2176
+ * @param globalDelta - Application state delta.
2177
+ * @param localDeltas -
2178
+ * @param logicSigDisassembly - Disassembled lsig program line by line.
2179
+ * @param logicSigMessages -
2180
+ * @param logicSigTrace -
2181
+ * @param logs -
2182
+ */
2183
+ constructor({
2184
+ disassembly,
2185
+ appCallMessages,
2186
+ appCallTrace,
2187
+ budgetAdded,
2188
+ budgetConsumed,
2189
+ cost,
2190
+ globalDelta,
2191
+ localDeltas,
2192
+ logicSigDisassembly,
2193
+ logicSigMessages,
2194
+ logicSigTrace,
2195
+ logs,
2196
+ }: {
2197
+ disassembly: string[];
2198
+ appCallMessages?: string[];
2199
+ appCallTrace?: DryrunState[];
2200
+ budgetAdded?: number | bigint;
2201
+ budgetConsumed?: number | bigint;
2202
+ cost?: number | bigint;
2203
+ globalDelta?: EvalDeltaKeyValue[];
2204
+ localDeltas?: AccountStateDelta[];
2205
+ logicSigDisassembly?: string[];
2206
+ logicSigMessages?: string[];
2207
+ logicSigTrace?: DryrunState[];
2208
+ logs?: Uint8Array[];
2209
+ }) {
2210
+ super();
2211
+ this.disassembly = disassembly;
2212
+ this.appCallMessages = appCallMessages;
2213
+ this.appCallTrace = appCallTrace;
2214
+ this.budgetAdded = budgetAdded;
2215
+ this.budgetConsumed = budgetConsumed;
2216
+ this.cost = cost;
2217
+ this.globalDelta = globalDelta;
2218
+ this.localDeltas = localDeltas;
2219
+ this.logicSigDisassembly = logicSigDisassembly;
2220
+ this.logicSigMessages = logicSigMessages;
2221
+ this.logicSigTrace = logicSigTrace;
2222
+ this.logs = logs;
2223
+
2224
+ this.attribute_map = {
2225
+ disassembly: 'disassembly',
2226
+ appCallMessages: 'app-call-messages',
2227
+ appCallTrace: 'app-call-trace',
2228
+ budgetAdded: 'budget-added',
2229
+ budgetConsumed: 'budget-consumed',
2230
+ cost: 'cost',
2231
+ globalDelta: 'global-delta',
2232
+ localDeltas: 'local-deltas',
2233
+ logicSigDisassembly: 'logic-sig-disassembly',
2234
+ logicSigMessages: 'logic-sig-messages',
2235
+ logicSigTrace: 'logic-sig-trace',
2236
+ logs: 'logs',
2237
+ };
2238
+ }
2239
+
2240
+ // eslint-disable-next-line camelcase
2241
+ static from_obj_for_encoding(data: Record<string, any>): DryrunTxnResult {
2242
+ /* eslint-disable dot-notation */
2243
+ if (!Array.isArray(data['disassembly']))
2244
+ throw new Error(
2245
+ `Response is missing required array field 'disassembly': ${data}`
2246
+ );
2247
+ return new DryrunTxnResult({
2248
+ disassembly: data['disassembly'],
2249
+ appCallMessages: data['app-call-messages'],
2250
+ appCallTrace:
2251
+ typeof data['app-call-trace'] !== 'undefined'
2252
+ ? data['app-call-trace'].map(DryrunState.from_obj_for_encoding)
2253
+ : undefined,
2254
+ budgetAdded: data['budget-added'],
2255
+ budgetConsumed: data['budget-consumed'],
2256
+ cost: data['cost'],
2257
+ globalDelta:
2258
+ typeof data['global-delta'] !== 'undefined'
2259
+ ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
2260
+ : undefined,
2261
+ localDeltas:
2262
+ typeof data['local-deltas'] !== 'undefined'
2263
+ ? data['local-deltas'].map(AccountStateDelta.from_obj_for_encoding)
2264
+ : undefined,
2265
+ logicSigDisassembly: data['logic-sig-disassembly'],
2266
+ logicSigMessages: data['logic-sig-messages'],
2267
+ logicSigTrace:
2268
+ typeof data['logic-sig-trace'] !== 'undefined'
2269
+ ? data['logic-sig-trace'].map(DryrunState.from_obj_for_encoding)
2270
+ : undefined,
2271
+ logs: data['logs'],
2272
+ });
2273
+ /* eslint-enable dot-notation */
2274
+ }
2275
+ }
2276
+
2277
+ /**
2278
+ * An error response with optional data field.
2279
+ */
2280
+ export class ErrorResponse extends BaseModel {
2281
+ public message: string;
2282
+
2283
+ public data?: Record<string, any>;
2284
+
2285
+ /**
2286
+ * Creates a new `ErrorResponse` object.
2287
+ * @param message -
2288
+ * @param data -
2289
+ */
2290
+ constructor(message: string, data?: Record<string, any>) {
2291
+ super();
2292
+ this.message = message;
2293
+ this.data = data;
2294
+
2295
+ this.attribute_map = {
2296
+ message: 'message',
2297
+ data: 'data',
2298
+ };
2299
+ }
2300
+
2301
+ // eslint-disable-next-line camelcase
2302
+ static from_obj_for_encoding(data: Record<string, any>): ErrorResponse {
2303
+ /* eslint-disable dot-notation */
2304
+ if (typeof data['message'] === 'undefined')
2305
+ throw new Error(`Response is missing required field 'message': ${data}`);
2306
+ return new ErrorResponse(data['message'], data['data']);
2307
+ /* eslint-enable dot-notation */
2308
+ }
2309
+ }
2310
+
2311
+ /**
2312
+ * Represents a TEAL value delta.
2313
+ */
2314
+ export class EvalDelta extends BaseModel {
2315
+ /**
2316
+ * (at) delta action.
2317
+ */
2318
+ public action: number | bigint;
2319
+
2320
+ /**
2321
+ * (bs) bytes value.
2322
+ */
2323
+ public bytes?: string;
2324
+
2325
+ /**
2326
+ * (ui) uint value.
2327
+ */
2328
+ public uint?: number | bigint;
2329
+
2330
+ /**
2331
+ * Creates a new `EvalDelta` object.
2332
+ * @param action - (at) delta action.
2333
+ * @param bytes - (bs) bytes value.
2334
+ * @param uint - (ui) uint value.
2335
+ */
2336
+ constructor(action: number | bigint, bytes?: string, uint?: number | bigint) {
2337
+ super();
2338
+ this.action = action;
2339
+ this.bytes = bytes;
2340
+ this.uint = uint;
2341
+
2342
+ this.attribute_map = {
2343
+ action: 'action',
2344
+ bytes: 'bytes',
2345
+ uint: 'uint',
2346
+ };
2347
+ }
2348
+
2349
+ // eslint-disable-next-line camelcase
2350
+ static from_obj_for_encoding(data: Record<string, any>): EvalDelta {
2351
+ /* eslint-disable dot-notation */
2352
+ if (typeof data['action'] === 'undefined')
2353
+ throw new Error(`Response is missing required field 'action': ${data}`);
2354
+ return new EvalDelta(data['action'], data['bytes'], data['uint']);
2355
+ /* eslint-enable dot-notation */
2356
+ }
2357
+ }
2358
+
2359
+ /**
2360
+ * Key-value pairs for StateDelta.
2361
+ */
2362
+ export class EvalDeltaKeyValue extends BaseModel {
2363
+ public key: string;
2364
+
2365
+ /**
2366
+ * Represents a TEAL value delta.
2367
+ */
2368
+ public value: EvalDelta;
2369
+
2370
+ /**
2371
+ * Creates a new `EvalDeltaKeyValue` object.
2372
+ * @param key -
2373
+ * @param value - Represents a TEAL value delta.
2374
+ */
2375
+ constructor(key: string, value: EvalDelta) {
2376
+ super();
2377
+ this.key = key;
2378
+ this.value = value;
2379
+
2380
+ this.attribute_map = {
2381
+ key: 'key',
2382
+ value: 'value',
2383
+ };
2384
+ }
2385
+
2386
+ // eslint-disable-next-line camelcase
2387
+ static from_obj_for_encoding(data: Record<string, any>): EvalDeltaKeyValue {
2388
+ /* eslint-disable dot-notation */
2389
+ if (typeof data['key'] === 'undefined')
2390
+ throw new Error(`Response is missing required field 'key': ${data}`);
2391
+ if (typeof data['value'] === 'undefined')
2392
+ throw new Error(`Response is missing required field 'value': ${data}`);
2393
+ return new EvalDeltaKeyValue(
2394
+ data['key'],
2395
+ EvalDelta.from_obj_for_encoding(data['value'])
2396
+ );
2397
+ /* eslint-enable dot-notation */
2398
+ }
2399
+ }
2400
+
2401
+ /**
2402
+ * Proof of membership and position of a light block header.
2403
+ */
2404
+ export class LightBlockHeaderProof extends BaseModel {
2405
+ /**
2406
+ * The index of the light block header in the vector commitment tree
2407
+ */
2408
+ public index: number | bigint;
2409
+
2410
+ /**
2411
+ * The encoded proof.
2412
+ */
2413
+ public proof: Uint8Array;
2414
+
2415
+ /**
2416
+ * Represents the depth of the tree that is being proven, i.e. the number of edges
2417
+ * from a leaf to the root.
2418
+ */
2419
+ public treedepth: number | bigint;
2420
+
2421
+ /**
2422
+ * Creates a new `LightBlockHeaderProof` object.
2423
+ * @param index - The index of the light block header in the vector commitment tree
2424
+ * @param proof - The encoded proof.
2425
+ * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
2426
+ * from a leaf to the root.
2427
+ */
2428
+ constructor(
2429
+ index: number | bigint,
2430
+ proof: string | Uint8Array,
2431
+ treedepth: number | bigint
2432
+ ) {
2433
+ super();
2434
+ this.index = index;
2435
+ this.proof =
2436
+ typeof proof === 'string'
2437
+ ? new Uint8Array(Buffer.from(proof, 'base64'))
2438
+ : proof;
2439
+ this.treedepth = treedepth;
2440
+
2441
+ this.attribute_map = {
2442
+ index: 'index',
2443
+ proof: 'proof',
2444
+ treedepth: 'treedepth',
2445
+ };
2446
+ }
2447
+
2448
+ // eslint-disable-next-line camelcase
2449
+ static from_obj_for_encoding(
2450
+ data: Record<string, any>
2451
+ ): LightBlockHeaderProof {
2452
+ /* eslint-disable dot-notation */
2453
+ if (typeof data['index'] === 'undefined')
2454
+ throw new Error(`Response is missing required field 'index': ${data}`);
2455
+ if (typeof data['proof'] === 'undefined')
2456
+ throw new Error(`Response is missing required field 'proof': ${data}`);
2457
+ if (typeof data['treedepth'] === 'undefined')
2458
+ throw new Error(
2459
+ `Response is missing required field 'treedepth': ${data}`
2460
+ );
2461
+ return new LightBlockHeaderProof(
2462
+ data['index'],
2463
+ data['proof'],
2464
+ data['treedepth']
2465
+ );
2466
+ /* eslint-enable dot-notation */
2467
+ }
2468
+ }
2469
+
2470
+ /**
2471
+ *
2472
+ */
2473
+ export class NodeStatusResponse extends BaseModel {
2474
+ /**
2475
+ * CatchupTime in nanoseconds
2476
+ */
2477
+ public catchupTime: number | bigint;
2478
+
2479
+ /**
2480
+ * LastRound indicates the last round seen
2481
+ */
2482
+ public lastRound: number | bigint;
2483
+
2484
+ /**
2485
+ * LastVersion indicates the last consensus version supported
2486
+ */
2487
+ public lastVersion: string;
2488
+
2489
+ /**
2490
+ * NextVersion of consensus protocol to use
2491
+ */
2492
+ public nextVersion: string;
2493
+
2494
+ /**
2495
+ * NextVersionRound is the round at which the next consensus version will apply
2496
+ */
2497
+ public nextVersionRound: number | bigint;
2498
+
2499
+ /**
2500
+ * NextVersionSupported indicates whether the next consensus version is supported
2501
+ * by this node
2502
+ */
2503
+ public nextVersionSupported: boolean;
2504
+
2505
+ /**
2506
+ * StoppedAtUnsupportedRound indicates that the node does not support the new
2507
+ * rounds and has stopped making progress
2508
+ */
2509
+ public stoppedAtUnsupportedRound: boolean;
2510
+
2511
+ /**
2512
+ * TimeSinceLastRound in nanoseconds
2513
+ */
2514
+ public timeSinceLastRound: number | bigint;
2515
+
2516
+ /**
2517
+ * The current catchpoint that is being caught up to
2518
+ */
2519
+ public catchpoint?: string;
2520
+
2521
+ /**
2522
+ * The number of blocks that have already been obtained by the node as part of the
2523
+ * catchup
2524
+ */
2525
+ public catchpointAcquiredBlocks?: number | bigint;
2526
+
2527
+ /**
2528
+ * The number of accounts from the current catchpoint that have been processed so
2529
+ * far as part of the catchup
2530
+ */
2531
+ public catchpointProcessedAccounts?: number | bigint;
2532
+
2533
+ /**
2534
+ * The number of key-values (KVs) from the current catchpoint that have been
2535
+ * processed so far as part of the catchup
2536
+ */
2537
+ public catchpointProcessedKvs?: number | bigint;
2538
+
2539
+ /**
2540
+ * The total number of accounts included in the current catchpoint
2541
+ */
2542
+ public catchpointTotalAccounts?: number | bigint;
2543
+
2544
+ /**
2545
+ * The total number of blocks that are required to complete the current catchpoint
2546
+ * catchup
2547
+ */
2548
+ public catchpointTotalBlocks?: number | bigint;
2549
+
2550
+ /**
2551
+ * The total number of key-values (KVs) included in the current catchpoint
2552
+ */
2553
+ public catchpointTotalKvs?: number | bigint;
2554
+
2555
+ /**
2556
+ * The number of accounts from the current catchpoint that have been verified so
2557
+ * far as part of the catchup
2558
+ */
2559
+ public catchpointVerifiedAccounts?: number | bigint;
2560
+
2561
+ /**
2562
+ * The number of key-values (KVs) from the current catchpoint that have been
2563
+ * verified so far as part of the catchup
2564
+ */
2565
+ public catchpointVerifiedKvs?: number | bigint;
2566
+
2567
+ /**
2568
+ * The last catchpoint seen by the node
2569
+ */
2570
+ public lastCatchpoint?: string;
2571
+
2572
+ /**
2573
+ * Creates a new `NodeStatusResponse` object.
2574
+ * @param catchupTime - CatchupTime in nanoseconds
2575
+ * @param lastRound - LastRound indicates the last round seen
2576
+ * @param lastVersion - LastVersion indicates the last consensus version supported
2577
+ * @param nextVersion - NextVersion of consensus protocol to use
2578
+ * @param nextVersionRound - NextVersionRound is the round at which the next consensus version will apply
2579
+ * @param nextVersionSupported - NextVersionSupported indicates whether the next consensus version is supported
2580
+ * by this node
2581
+ * @param stoppedAtUnsupportedRound - StoppedAtUnsupportedRound indicates that the node does not support the new
2582
+ * rounds and has stopped making progress
2583
+ * @param timeSinceLastRound - TimeSinceLastRound in nanoseconds
2584
+ * @param catchpoint - The current catchpoint that is being caught up to
2585
+ * @param catchpointAcquiredBlocks - The number of blocks that have already been obtained by the node as part of the
2586
+ * catchup
2587
+ * @param catchpointProcessedAccounts - The number of accounts from the current catchpoint that have been processed so
2588
+ * far as part of the catchup
2589
+ * @param catchpointProcessedKvs - The number of key-values (KVs) from the current catchpoint that have been
2590
+ * processed so far as part of the catchup
2591
+ * @param catchpointTotalAccounts - The total number of accounts included in the current catchpoint
2592
+ * @param catchpointTotalBlocks - The total number of blocks that are required to complete the current catchpoint
2593
+ * catchup
2594
+ * @param catchpointTotalKvs - The total number of key-values (KVs) included in the current catchpoint
2595
+ * @param catchpointVerifiedAccounts - The number of accounts from the current catchpoint that have been verified so
2596
+ * far as part of the catchup
2597
+ * @param catchpointVerifiedKvs - The number of key-values (KVs) from the current catchpoint that have been
2598
+ * verified so far as part of the catchup
2599
+ * @param lastCatchpoint - The last catchpoint seen by the node
2600
+ */
2601
+ constructor({
2602
+ catchupTime,
2603
+ lastRound,
2604
+ lastVersion,
2605
+ nextVersion,
2606
+ nextVersionRound,
2607
+ nextVersionSupported,
2608
+ stoppedAtUnsupportedRound,
2609
+ timeSinceLastRound,
2610
+ catchpoint,
2611
+ catchpointAcquiredBlocks,
2612
+ catchpointProcessedAccounts,
2613
+ catchpointProcessedKvs,
2614
+ catchpointTotalAccounts,
2615
+ catchpointTotalBlocks,
2616
+ catchpointTotalKvs,
2617
+ catchpointVerifiedAccounts,
2618
+ catchpointVerifiedKvs,
2619
+ lastCatchpoint,
2620
+ }: {
2621
+ catchupTime: number | bigint;
2622
+ lastRound: number | bigint;
2623
+ lastVersion: string;
2624
+ nextVersion: string;
2625
+ nextVersionRound: number | bigint;
2626
+ nextVersionSupported: boolean;
2627
+ stoppedAtUnsupportedRound: boolean;
2628
+ timeSinceLastRound: number | bigint;
2629
+ catchpoint?: string;
2630
+ catchpointAcquiredBlocks?: number | bigint;
2631
+ catchpointProcessedAccounts?: number | bigint;
2632
+ catchpointProcessedKvs?: number | bigint;
2633
+ catchpointTotalAccounts?: number | bigint;
2634
+ catchpointTotalBlocks?: number | bigint;
2635
+ catchpointTotalKvs?: number | bigint;
2636
+ catchpointVerifiedAccounts?: number | bigint;
2637
+ catchpointVerifiedKvs?: number | bigint;
2638
+ lastCatchpoint?: string;
2639
+ }) {
2640
+ super();
2641
+ this.catchupTime = catchupTime;
2642
+ this.lastRound = lastRound;
2643
+ this.lastVersion = lastVersion;
2644
+ this.nextVersion = nextVersion;
2645
+ this.nextVersionRound = nextVersionRound;
2646
+ this.nextVersionSupported = nextVersionSupported;
2647
+ this.stoppedAtUnsupportedRound = stoppedAtUnsupportedRound;
2648
+ this.timeSinceLastRound = timeSinceLastRound;
2649
+ this.catchpoint = catchpoint;
2650
+ this.catchpointAcquiredBlocks = catchpointAcquiredBlocks;
2651
+ this.catchpointProcessedAccounts = catchpointProcessedAccounts;
2652
+ this.catchpointProcessedKvs = catchpointProcessedKvs;
2653
+ this.catchpointTotalAccounts = catchpointTotalAccounts;
2654
+ this.catchpointTotalBlocks = catchpointTotalBlocks;
2655
+ this.catchpointTotalKvs = catchpointTotalKvs;
2656
+ this.catchpointVerifiedAccounts = catchpointVerifiedAccounts;
2657
+ this.catchpointVerifiedKvs = catchpointVerifiedKvs;
2658
+ this.lastCatchpoint = lastCatchpoint;
2659
+
2660
+ this.attribute_map = {
2661
+ catchupTime: 'catchup-time',
2662
+ lastRound: 'last-round',
2663
+ lastVersion: 'last-version',
2664
+ nextVersion: 'next-version',
2665
+ nextVersionRound: 'next-version-round',
2666
+ nextVersionSupported: 'next-version-supported',
2667
+ stoppedAtUnsupportedRound: 'stopped-at-unsupported-round',
2668
+ timeSinceLastRound: 'time-since-last-round',
2669
+ catchpoint: 'catchpoint',
2670
+ catchpointAcquiredBlocks: 'catchpoint-acquired-blocks',
2671
+ catchpointProcessedAccounts: 'catchpoint-processed-accounts',
2672
+ catchpointProcessedKvs: 'catchpoint-processed-kvs',
2673
+ catchpointTotalAccounts: 'catchpoint-total-accounts',
2674
+ catchpointTotalBlocks: 'catchpoint-total-blocks',
2675
+ catchpointTotalKvs: 'catchpoint-total-kvs',
2676
+ catchpointVerifiedAccounts: 'catchpoint-verified-accounts',
2677
+ catchpointVerifiedKvs: 'catchpoint-verified-kvs',
2678
+ lastCatchpoint: 'last-catchpoint',
2679
+ };
2680
+ }
2681
+
2682
+ // eslint-disable-next-line camelcase
2683
+ static from_obj_for_encoding(data: Record<string, any>): NodeStatusResponse {
2684
+ /* eslint-disable dot-notation */
2685
+ if (typeof data['catchup-time'] === 'undefined')
2686
+ throw new Error(
2687
+ `Response is missing required field 'catchup-time': ${data}`
2688
+ );
2689
+ if (typeof data['last-round'] === 'undefined')
2690
+ throw new Error(
2691
+ `Response is missing required field 'last-round': ${data}`
2692
+ );
2693
+ if (typeof data['last-version'] === 'undefined')
2694
+ throw new Error(
2695
+ `Response is missing required field 'last-version': ${data}`
2696
+ );
2697
+ if (typeof data['next-version'] === 'undefined')
2698
+ throw new Error(
2699
+ `Response is missing required field 'next-version': ${data}`
2700
+ );
2701
+ if (typeof data['next-version-round'] === 'undefined')
2702
+ throw new Error(
2703
+ `Response is missing required field 'next-version-round': ${data}`
2704
+ );
2705
+ if (typeof data['next-version-supported'] === 'undefined')
2706
+ throw new Error(
2707
+ `Response is missing required field 'next-version-supported': ${data}`
2708
+ );
2709
+ if (typeof data['stopped-at-unsupported-round'] === 'undefined')
2710
+ throw new Error(
2711
+ `Response is missing required field 'stopped-at-unsupported-round': ${data}`
2712
+ );
2713
+ if (typeof data['time-since-last-round'] === 'undefined')
2714
+ throw new Error(
2715
+ `Response is missing required field 'time-since-last-round': ${data}`
2716
+ );
2717
+ return new NodeStatusResponse({
2718
+ catchupTime: data['catchup-time'],
2719
+ lastRound: data['last-round'],
2720
+ lastVersion: data['last-version'],
2721
+ nextVersion: data['next-version'],
2722
+ nextVersionRound: data['next-version-round'],
2723
+ nextVersionSupported: data['next-version-supported'],
2724
+ stoppedAtUnsupportedRound: data['stopped-at-unsupported-round'],
2725
+ timeSinceLastRound: data['time-since-last-round'],
2726
+ catchpoint: data['catchpoint'],
2727
+ catchpointAcquiredBlocks: data['catchpoint-acquired-blocks'],
2728
+ catchpointProcessedAccounts: data['catchpoint-processed-accounts'],
2729
+ catchpointProcessedKvs: data['catchpoint-processed-kvs'],
2730
+ catchpointTotalAccounts: data['catchpoint-total-accounts'],
2731
+ catchpointTotalBlocks: data['catchpoint-total-blocks'],
2732
+ catchpointTotalKvs: data['catchpoint-total-kvs'],
2733
+ catchpointVerifiedAccounts: data['catchpoint-verified-accounts'],
2734
+ catchpointVerifiedKvs: data['catchpoint-verified-kvs'],
2735
+ lastCatchpoint: data['last-catchpoint'],
2736
+ });
2737
+ /* eslint-enable dot-notation */
2738
+ }
2739
+ }
2740
+
2741
+ /**
2742
+ * Details about a pending transaction. If the transaction was recently confirmed,
2743
+ * includes confirmation details like the round and reward details.
2744
+ */
2745
+ export class PendingTransactionResponse extends BaseModel {
2746
+ /**
2747
+ * Indicates that the transaction was kicked out of this node's transaction pool
2748
+ * (and specifies why that happened). An empty string indicates the transaction
2749
+ * wasn't kicked out of this node's txpool due to an error.
2750
+ */
2751
+ public poolError: string;
2752
+
2753
+ /**
2754
+ * The raw signed transaction.
2755
+ */
2756
+ public txn: EncodedSignedTransaction;
2757
+
2758
+ /**
2759
+ * The application index if the transaction was found and it created an
2760
+ * application.
2761
+ */
2762
+ public applicationIndex?: number | bigint;
2763
+
2764
+ /**
2765
+ * The number of the asset's unit that were transferred to the close-to address.
2766
+ */
2767
+ public assetClosingAmount?: number | bigint;
2768
+
2769
+ /**
2770
+ * The asset index if the transaction was found and it created an asset.
2771
+ */
2772
+ public assetIndex?: number | bigint;
2773
+
2774
+ /**
2775
+ * Rewards in microalgos applied to the close remainder to account.
2776
+ */
2777
+ public closeRewards?: number | bigint;
2778
+
2779
+ /**
2780
+ * Closing amount for the transaction.
2781
+ */
2782
+ public closingAmount?: number | bigint;
2783
+
2784
+ /**
2785
+ * The round where this transaction was confirmed, if present.
2786
+ */
2787
+ public confirmedRound?: number | bigint;
2788
+
2789
+ /**
2790
+ * (gd) Global state key/value changes for the application being executed by this
2791
+ * transaction.
2792
+ */
2793
+ public globalStateDelta?: EvalDeltaKeyValue[];
2794
+
2795
+ /**
2796
+ * Inner transactions produced by application execution.
2797
+ */
2798
+ public innerTxns?: PendingTransactionResponse[];
2799
+
2800
+ /**
2801
+ * (ld) Local state key/value changes for the application being executed by this
2802
+ * transaction.
2803
+ */
2804
+ public localStateDelta?: AccountStateDelta[];
2805
+
2806
+ /**
2807
+ * (lg) Logs for the application being executed by this transaction.
2808
+ */
2809
+ public logs?: Uint8Array[];
2810
+
2811
+ /**
2812
+ * Rewards in microalgos applied to the receiver account.
2813
+ */
2814
+ public receiverRewards?: number | bigint;
2815
+
2816
+ /**
2817
+ * Rewards in microalgos applied to the sender account.
2818
+ */
2819
+ public senderRewards?: number | bigint;
2820
+
2821
+ /**
2822
+ * Creates a new `PendingTransactionResponse` object.
2823
+ * @param poolError - Indicates that the transaction was kicked out of this node's transaction pool
2824
+ * (and specifies why that happened). An empty string indicates the transaction
2825
+ * wasn't kicked out of this node's txpool due to an error.
2826
+ * @param txn - The raw signed transaction.
2827
+ * @param applicationIndex - The application index if the transaction was found and it created an
2828
+ * application.
2829
+ * @param assetClosingAmount - The number of the asset's unit that were transferred to the close-to address.
2830
+ * @param assetIndex - The asset index if the transaction was found and it created an asset.
2831
+ * @param closeRewards - Rewards in microalgos applied to the close remainder to account.
2832
+ * @param closingAmount - Closing amount for the transaction.
2833
+ * @param confirmedRound - The round where this transaction was confirmed, if present.
2834
+ * @param globalStateDelta - (gd) Global state key/value changes for the application being executed by this
2835
+ * transaction.
2836
+ * @param innerTxns - Inner transactions produced by application execution.
2837
+ * @param localStateDelta - (ld) Local state key/value changes for the application being executed by this
2838
+ * transaction.
2839
+ * @param logs - (lg) Logs for the application being executed by this transaction.
2840
+ * @param receiverRewards - Rewards in microalgos applied to the receiver account.
2841
+ * @param senderRewards - Rewards in microalgos applied to the sender account.
2842
+ */
2843
+ constructor({
2844
+ poolError,
2845
+ txn,
2846
+ applicationIndex,
2847
+ assetClosingAmount,
2848
+ assetIndex,
2849
+ closeRewards,
2850
+ closingAmount,
2851
+ confirmedRound,
2852
+ globalStateDelta,
2853
+ innerTxns,
2854
+ localStateDelta,
2855
+ logs,
2856
+ receiverRewards,
2857
+ senderRewards,
2858
+ }: {
2859
+ poolError: string;
2860
+ txn: EncodedSignedTransaction;
2861
+ applicationIndex?: number | bigint;
2862
+ assetClosingAmount?: number | bigint;
2863
+ assetIndex?: number | bigint;
2864
+ closeRewards?: number | bigint;
2865
+ closingAmount?: number | bigint;
2866
+ confirmedRound?: number | bigint;
2867
+ globalStateDelta?: EvalDeltaKeyValue[];
2868
+ innerTxns?: PendingTransactionResponse[];
2869
+ localStateDelta?: AccountStateDelta[];
2870
+ logs?: Uint8Array[];
2871
+ receiverRewards?: number | bigint;
2872
+ senderRewards?: number | bigint;
2873
+ }) {
2874
+ super();
2875
+ this.poolError = poolError;
2876
+ this.txn = txn;
2877
+ this.applicationIndex = applicationIndex;
2878
+ this.assetClosingAmount = assetClosingAmount;
2879
+ this.assetIndex = assetIndex;
2880
+ this.closeRewards = closeRewards;
2881
+ this.closingAmount = closingAmount;
2882
+ this.confirmedRound = confirmedRound;
2883
+ this.globalStateDelta = globalStateDelta;
2884
+ this.innerTxns = innerTxns;
2885
+ this.localStateDelta = localStateDelta;
2886
+ this.logs = logs;
2887
+ this.receiverRewards = receiverRewards;
2888
+ this.senderRewards = senderRewards;
2889
+
2890
+ this.attribute_map = {
2891
+ poolError: 'pool-error',
2892
+ txn: 'txn',
2893
+ applicationIndex: 'application-index',
2894
+ assetClosingAmount: 'asset-closing-amount',
2895
+ assetIndex: 'asset-index',
2896
+ closeRewards: 'close-rewards',
2897
+ closingAmount: 'closing-amount',
2898
+ confirmedRound: 'confirmed-round',
2899
+ globalStateDelta: 'global-state-delta',
2900
+ innerTxns: 'inner-txns',
2901
+ localStateDelta: 'local-state-delta',
2902
+ logs: 'logs',
2903
+ receiverRewards: 'receiver-rewards',
2904
+ senderRewards: 'sender-rewards',
2905
+ };
2906
+ }
2907
+
2908
+ // eslint-disable-next-line camelcase
2909
+ static from_obj_for_encoding(
2910
+ data: Record<string, any>
2911
+ ): PendingTransactionResponse {
2912
+ /* eslint-disable dot-notation */
2913
+ if (typeof data['pool-error'] === 'undefined')
2914
+ throw new Error(
2915
+ `Response is missing required field 'pool-error': ${data}`
2916
+ );
2917
+ if (typeof data['txn'] === 'undefined')
2918
+ throw new Error(`Response is missing required field 'txn': ${data}`);
2919
+ return new PendingTransactionResponse({
2920
+ poolError: data['pool-error'],
2921
+ txn: data['txn'],
2922
+ applicationIndex: data['application-index'],
2923
+ assetClosingAmount: data['asset-closing-amount'],
2924
+ assetIndex: data['asset-index'],
2925
+ closeRewards: data['close-rewards'],
2926
+ closingAmount: data['closing-amount'],
2927
+ confirmedRound: data['confirmed-round'],
2928
+ globalStateDelta:
2929
+ typeof data['global-state-delta'] !== 'undefined'
2930
+ ? data['global-state-delta'].map(
2931
+ EvalDeltaKeyValue.from_obj_for_encoding
2932
+ )
2933
+ : undefined,
2934
+ innerTxns:
2935
+ typeof data['inner-txns'] !== 'undefined'
2936
+ ? data['inner-txns'].map(
2937
+ PendingTransactionResponse.from_obj_for_encoding
2938
+ )
2939
+ : undefined,
2940
+ localStateDelta:
2941
+ typeof data['local-state-delta'] !== 'undefined'
2942
+ ? data['local-state-delta'].map(
2943
+ AccountStateDelta.from_obj_for_encoding
2944
+ )
2945
+ : undefined,
2946
+ logs: data['logs'],
2947
+ receiverRewards: data['receiver-rewards'],
2948
+ senderRewards: data['sender-rewards'],
2949
+ });
2950
+ /* eslint-enable dot-notation */
2951
+ }
2952
+ }
2953
+
2954
+ /**
2955
+ * A potentially truncated list of transactions currently in the node's transaction
2956
+ * pool. You can compute whether or not the list is truncated if the number of
2957
+ * elements in the **top-transactions** array is fewer than **total-transactions**.
2958
+ */
2959
+ export class PendingTransactionsResponse extends BaseModel {
2960
+ /**
2961
+ * An array of signed transaction objects.
2962
+ */
2963
+ public topTransactions: EncodedSignedTransaction[];
2964
+
2965
+ /**
2966
+ * Total number of transactions in the pool.
2967
+ */
2968
+ public totalTransactions: number | bigint;
2969
+
2970
+ /**
2971
+ * Creates a new `PendingTransactionsResponse` object.
2972
+ * @param topTransactions - An array of signed transaction objects.
2973
+ * @param totalTransactions - Total number of transactions in the pool.
2974
+ */
2975
+ constructor(
2976
+ topTransactions: EncodedSignedTransaction[],
2977
+ totalTransactions: number | bigint
2978
+ ) {
2979
+ super();
2980
+ this.topTransactions = topTransactions;
2981
+ this.totalTransactions = totalTransactions;
2982
+
2983
+ this.attribute_map = {
2984
+ topTransactions: 'top-transactions',
2985
+ totalTransactions: 'total-transactions',
2986
+ };
2987
+ }
2988
+
2989
+ // eslint-disable-next-line camelcase
2990
+ static from_obj_for_encoding(
2991
+ data: Record<string, any>
2992
+ ): PendingTransactionsResponse {
2993
+ /* eslint-disable dot-notation */
2994
+ if (!Array.isArray(data['top-transactions']))
2995
+ throw new Error(
2996
+ `Response is missing required array field 'top-transactions': ${data}`
2997
+ );
2998
+ if (typeof data['total-transactions'] === 'undefined')
2999
+ throw new Error(
3000
+ `Response is missing required field 'total-transactions': ${data}`
3001
+ );
3002
+ return new PendingTransactionsResponse(
3003
+ data['top-transactions'],
3004
+ data['total-transactions']
3005
+ );
3006
+ /* eslint-enable dot-notation */
3007
+ }
3008
+ }
3009
+
3010
+ /**
3011
+ * Transaction ID of the submission.
3012
+ */
3013
+ export class PostTransactionsResponse extends BaseModel {
3014
+ /**
3015
+ * encoding of the transaction hash.
3016
+ */
3017
+ public txid: string;
3018
+
3019
+ /**
3020
+ * Creates a new `PostTransactionsResponse` object.
3021
+ * @param txid - encoding of the transaction hash.
3022
+ */
3023
+ constructor(txid: string) {
3024
+ super();
3025
+ this.txid = txid;
3026
+
3027
+ this.attribute_map = {
3028
+ txid: 'txId',
3029
+ };
3030
+ }
3031
+
3032
+ // eslint-disable-next-line camelcase
3033
+ static from_obj_for_encoding(
3034
+ data: Record<string, any>
3035
+ ): PostTransactionsResponse {
3036
+ /* eslint-disable dot-notation */
3037
+ if (typeof data['txId'] === 'undefined')
3038
+ throw new Error(`Response is missing required field 'txId': ${data}`);
3039
+ return new PostTransactionsResponse(data['txId']);
3040
+ /* eslint-enable dot-notation */
3041
+ }
3042
+ }
3043
+
3044
+ /**
3045
+ * Represents a state proof and its corresponding message
3046
+ */
3047
+ export class StateProof extends BaseModel {
3048
+ /**
3049
+ * Represents the message that the state proofs are attesting to.
3050
+ */
3051
+ public message: StateProofMessage;
3052
+
3053
+ /**
3054
+ * The encoded StateProof for the message.
3055
+ */
3056
+ public stateproof: Uint8Array;
3057
+
3058
+ /**
3059
+ * Creates a new `StateProof` object.
3060
+ * @param message - Represents the message that the state proofs are attesting to.
3061
+ * @param stateproof - The encoded StateProof for the message.
3062
+ */
3063
+ constructor(message: StateProofMessage, stateproof: string | Uint8Array) {
3064
+ super();
3065
+ this.message = message;
3066
+ this.stateproof =
3067
+ typeof stateproof === 'string'
3068
+ ? new Uint8Array(Buffer.from(stateproof, 'base64'))
3069
+ : stateproof;
3070
+
3071
+ this.attribute_map = {
3072
+ message: 'Message',
3073
+ stateproof: 'StateProof',
3074
+ };
3075
+ }
3076
+
3077
+ // eslint-disable-next-line camelcase
3078
+ static from_obj_for_encoding(data: Record<string, any>): StateProof {
3079
+ /* eslint-disable dot-notation */
3080
+ if (typeof data['Message'] === 'undefined')
3081
+ throw new Error(`Response is missing required field 'Message': ${data}`);
3082
+ if (typeof data['StateProof'] === 'undefined')
3083
+ throw new Error(
3084
+ `Response is missing required field 'StateProof': ${data}`
3085
+ );
3086
+ return new StateProof(
3087
+ StateProofMessage.from_obj_for_encoding(data['Message']),
3088
+ data['StateProof']
3089
+ );
3090
+ /* eslint-enable dot-notation */
3091
+ }
3092
+ }
3093
+
3094
+ /**
3095
+ * Represents the message that the state proofs are attesting to.
3096
+ */
3097
+ export class StateProofMessage extends BaseModel {
3098
+ /**
3099
+ * The vector commitment root on all light block headers within a state proof
3100
+ * interval.
3101
+ */
3102
+ public blockheaderscommitment: Uint8Array;
3103
+
3104
+ /**
3105
+ * The first round the message attests to.
3106
+ */
3107
+ public firstattestedround: number | bigint;
3108
+
3109
+ /**
3110
+ * The last round the message attests to.
3111
+ */
3112
+ public lastattestedround: number | bigint;
3113
+
3114
+ /**
3115
+ * An integer value representing the natural log of the proven weight with 16 bits
3116
+ * of precision. This value would be used to verify the next state proof.
3117
+ */
3118
+ public lnprovenweight: number | bigint;
3119
+
3120
+ /**
3121
+ * The vector commitment root of the top N accounts to sign the next StateProof.
3122
+ */
3123
+ public voterscommitment: Uint8Array;
3124
+
3125
+ /**
3126
+ * Creates a new `StateProofMessage` object.
3127
+ * @param blockheaderscommitment - The vector commitment root on all light block headers within a state proof
3128
+ * interval.
3129
+ * @param firstattestedround - The first round the message attests to.
3130
+ * @param lastattestedround - The last round the message attests to.
3131
+ * @param lnprovenweight - An integer value representing the natural log of the proven weight with 16 bits
3132
+ * of precision. This value would be used to verify the next state proof.
3133
+ * @param voterscommitment - The vector commitment root of the top N accounts to sign the next StateProof.
3134
+ */
3135
+ constructor({
3136
+ blockheaderscommitment,
3137
+ firstattestedround,
3138
+ lastattestedround,
3139
+ lnprovenweight,
3140
+ voterscommitment,
3141
+ }: {
3142
+ blockheaderscommitment: string | Uint8Array;
3143
+ firstattestedround: number | bigint;
3144
+ lastattestedround: number | bigint;
3145
+ lnprovenweight: number | bigint;
3146
+ voterscommitment: string | Uint8Array;
3147
+ }) {
3148
+ super();
3149
+ this.blockheaderscommitment =
3150
+ typeof blockheaderscommitment === 'string'
3151
+ ? new Uint8Array(Buffer.from(blockheaderscommitment, 'base64'))
3152
+ : blockheaderscommitment;
3153
+ this.firstattestedround = firstattestedround;
3154
+ this.lastattestedround = lastattestedround;
3155
+ this.lnprovenweight = lnprovenweight;
3156
+ this.voterscommitment =
3157
+ typeof voterscommitment === 'string'
3158
+ ? new Uint8Array(Buffer.from(voterscommitment, 'base64'))
3159
+ : voterscommitment;
3160
+
3161
+ this.attribute_map = {
3162
+ blockheaderscommitment: 'BlockHeadersCommitment',
3163
+ firstattestedround: 'FirstAttestedRound',
3164
+ lastattestedround: 'LastAttestedRound',
3165
+ lnprovenweight: 'LnProvenWeight',
3166
+ voterscommitment: 'VotersCommitment',
3167
+ };
3168
+ }
3169
+
3170
+ // eslint-disable-next-line camelcase
3171
+ static from_obj_for_encoding(data: Record<string, any>): StateProofMessage {
3172
+ /* eslint-disable dot-notation */
3173
+ if (typeof data['BlockHeadersCommitment'] === 'undefined')
3174
+ throw new Error(
3175
+ `Response is missing required field 'BlockHeadersCommitment': ${data}`
3176
+ );
3177
+ if (typeof data['FirstAttestedRound'] === 'undefined')
3178
+ throw new Error(
3179
+ `Response is missing required field 'FirstAttestedRound': ${data}`
3180
+ );
3181
+ if (typeof data['LastAttestedRound'] === 'undefined')
3182
+ throw new Error(
3183
+ `Response is missing required field 'LastAttestedRound': ${data}`
3184
+ );
3185
+ if (typeof data['LnProvenWeight'] === 'undefined')
3186
+ throw new Error(
3187
+ `Response is missing required field 'LnProvenWeight': ${data}`
3188
+ );
3189
+ if (typeof data['VotersCommitment'] === 'undefined')
3190
+ throw new Error(
3191
+ `Response is missing required field 'VotersCommitment': ${data}`
3192
+ );
3193
+ return new StateProofMessage({
3194
+ blockheaderscommitment: data['BlockHeadersCommitment'],
3195
+ firstattestedround: data['FirstAttestedRound'],
3196
+ lastattestedround: data['LastAttestedRound'],
3197
+ lnprovenweight: data['LnProvenWeight'],
3198
+ voterscommitment: data['VotersCommitment'],
3199
+ });
3200
+ /* eslint-enable dot-notation */
3201
+ }
3202
+ }
3203
+
3204
+ /**
3205
+ * Supply represents the current supply of MicroAlgos in the system.
3206
+ */
3207
+ export class SupplyResponse extends BaseModel {
3208
+ /**
3209
+ * Round
3210
+ */
3211
+ public currentRound: number | bigint;
3212
+
3213
+ /**
3214
+ * OnlineMoney
3215
+ */
3216
+ public onlineMoney: number | bigint;
3217
+
3218
+ /**
3219
+ * TotalMoney
3220
+ */
3221
+ public totalMoney: number | bigint;
3222
+
3223
+ /**
3224
+ * Creates a new `SupplyResponse` object.
3225
+ * @param currentRound - Round
3226
+ * @param onlineMoney - OnlineMoney
3227
+ * @param totalMoney - TotalMoney
3228
+ */
3229
+ constructor(
3230
+ currentRound: number | bigint,
3231
+ onlineMoney: number | bigint,
3232
+ totalMoney: number | bigint
3233
+ ) {
3234
+ super();
3235
+ this.currentRound = currentRound;
3236
+ this.onlineMoney = onlineMoney;
3237
+ this.totalMoney = totalMoney;
3238
+
3239
+ this.attribute_map = {
3240
+ currentRound: 'current_round',
3241
+ onlineMoney: 'online-money',
3242
+ totalMoney: 'total-money',
3243
+ };
3244
+ }
3245
+
3246
+ // eslint-disable-next-line camelcase
3247
+ static from_obj_for_encoding(data: Record<string, any>): SupplyResponse {
3248
+ /* eslint-disable dot-notation */
3249
+ if (typeof data['current_round'] === 'undefined')
3250
+ throw new Error(
3251
+ `Response is missing required field 'current_round': ${data}`
3252
+ );
3253
+ if (typeof data['online-money'] === 'undefined')
3254
+ throw new Error(
3255
+ `Response is missing required field 'online-money': ${data}`
3256
+ );
3257
+ if (typeof data['total-money'] === 'undefined')
3258
+ throw new Error(
3259
+ `Response is missing required field 'total-money': ${data}`
3260
+ );
3261
+ return new SupplyResponse(
3262
+ data['current_round'],
3263
+ data['online-money'],
3264
+ data['total-money']
3265
+ );
3266
+ /* eslint-enable dot-notation */
3267
+ }
3268
+ }
3269
+
3270
+ /**
3271
+ * Represents a key-value pair in an application store.
3272
+ */
3273
+ export class TealKeyValue extends BaseModel {
3274
+ public key: string;
3275
+
3276
+ /**
3277
+ * Represents a TEAL value.
3278
+ */
3279
+ public value: TealValue;
3280
+
3281
+ /**
3282
+ * Creates a new `TealKeyValue` object.
3283
+ * @param key -
3284
+ * @param value - Represents a TEAL value.
3285
+ */
3286
+ constructor(key: string, value: TealValue) {
3287
+ super();
3288
+ this.key = key;
3289
+ this.value = value;
3290
+
3291
+ this.attribute_map = {
3292
+ key: 'key',
3293
+ value: 'value',
3294
+ };
3295
+ }
3296
+
3297
+ // eslint-disable-next-line camelcase
3298
+ static from_obj_for_encoding(data: Record<string, any>): TealKeyValue {
3299
+ /* eslint-disable dot-notation */
3300
+ if (typeof data['key'] === 'undefined')
3301
+ throw new Error(`Response is missing required field 'key': ${data}`);
3302
+ if (typeof data['value'] === 'undefined')
3303
+ throw new Error(`Response is missing required field 'value': ${data}`);
3304
+ return new TealKeyValue(
3305
+ data['key'],
3306
+ TealValue.from_obj_for_encoding(data['value'])
3307
+ );
3308
+ /* eslint-enable dot-notation */
3309
+ }
3310
+ }
3311
+
3312
+ /**
3313
+ * Represents a TEAL value.
3314
+ */
3315
+ export class TealValue extends BaseModel {
3316
+ /**
3317
+ * (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
3318
+ */
3319
+ public type: number | bigint;
3320
+
3321
+ /**
3322
+ * (tb) bytes value.
3323
+ */
3324
+ public bytes: string;
3325
+
3326
+ /**
3327
+ * (ui) uint value.
3328
+ */
3329
+ public uint: number | bigint;
3330
+
3331
+ /**
3332
+ * Creates a new `TealValue` object.
3333
+ * @param type - (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
3334
+ * @param bytes - (tb) bytes value.
3335
+ * @param uint - (ui) uint value.
3336
+ */
3337
+ constructor(type: number | bigint, bytes: string, uint: number | bigint) {
3338
+ super();
3339
+ this.type = type;
3340
+ this.bytes = bytes;
3341
+ this.uint = uint;
3342
+
3343
+ this.attribute_map = {
3344
+ type: 'type',
3345
+ bytes: 'bytes',
3346
+ uint: 'uint',
3347
+ };
3348
+ }
3349
+
3350
+ // eslint-disable-next-line camelcase
3351
+ static from_obj_for_encoding(data: Record<string, any>): TealValue {
3352
+ /* eslint-disable dot-notation */
3353
+ if (typeof data['type'] === 'undefined')
3354
+ throw new Error(`Response is missing required field 'type': ${data}`);
3355
+ if (typeof data['bytes'] === 'undefined')
3356
+ throw new Error(`Response is missing required field 'bytes': ${data}`);
3357
+ if (typeof data['uint'] === 'undefined')
3358
+ throw new Error(`Response is missing required field 'uint': ${data}`);
3359
+ return new TealValue(data['type'], data['bytes'], data['uint']);
3360
+ /* eslint-enable dot-notation */
3361
+ }
3362
+ }
3363
+
3364
+ /**
3365
+ * TransactionParams contains the parameters that help a client construct a new
3366
+ * transaction.
3367
+ */
3368
+ export class TransactionParametersResponse extends BaseModel {
3369
+ /**
3370
+ * ConsensusVersion indicates the consensus protocol version
3371
+ * as of LastRound.
3372
+ */
3373
+ public consensusVersion: string;
3374
+
3375
+ /**
3376
+ * Fee is the suggested transaction fee
3377
+ * Fee is in units of micro-Algos per byte.
3378
+ * Fee may fall to zero but transactions must still have a fee of
3379
+ * at least MinTxnFee for the current network protocol.
3380
+ */
3381
+ public fee: number | bigint;
3382
+
3383
+ /**
3384
+ * GenesisHash is the hash of the genesis block.
3385
+ */
3386
+ public genesisHash: Uint8Array;
3387
+
3388
+ /**
3389
+ * GenesisID is an ID listed in the genesis block.
3390
+ */
3391
+ public genesisId: string;
3392
+
3393
+ /**
3394
+ * LastRound indicates the last round seen
3395
+ */
3396
+ public lastRound: number | bigint;
3397
+
3398
+ /**
3399
+ * The minimum transaction fee (not per byte) required for the
3400
+ * txn to validate for the current network protocol.
3401
+ */
3402
+ public minFee: number | bigint;
3403
+
3404
+ /**
3405
+ * Creates a new `TransactionParametersResponse` object.
3406
+ * @param consensusVersion - ConsensusVersion indicates the consensus protocol version
3407
+ * as of LastRound.
3408
+ * @param fee - Fee is the suggested transaction fee
3409
+ * Fee is in units of micro-Algos per byte.
3410
+ * Fee may fall to zero but transactions must still have a fee of
3411
+ * at least MinTxnFee for the current network protocol.
3412
+ * @param genesisHash - GenesisHash is the hash of the genesis block.
3413
+ * @param genesisId - GenesisID is an ID listed in the genesis block.
3414
+ * @param lastRound - LastRound indicates the last round seen
3415
+ * @param minFee - The minimum transaction fee (not per byte) required for the
3416
+ * txn to validate for the current network protocol.
3417
+ */
3418
+ constructor({
3419
+ consensusVersion,
3420
+ fee,
3421
+ genesisHash,
3422
+ genesisId,
3423
+ lastRound,
3424
+ minFee,
3425
+ }: {
3426
+ consensusVersion: string;
3427
+ fee: number | bigint;
3428
+ genesisHash: string | Uint8Array;
3429
+ genesisId: string;
3430
+ lastRound: number | bigint;
3431
+ minFee: number | bigint;
3432
+ }) {
3433
+ super();
3434
+ this.consensusVersion = consensusVersion;
3435
+ this.fee = fee;
3436
+ this.genesisHash =
3437
+ typeof genesisHash === 'string'
3438
+ ? new Uint8Array(Buffer.from(genesisHash, 'base64'))
3439
+ : genesisHash;
3440
+ this.genesisId = genesisId;
3441
+ this.lastRound = lastRound;
3442
+ this.minFee = minFee;
3443
+
3444
+ this.attribute_map = {
3445
+ consensusVersion: 'consensus-version',
3446
+ fee: 'fee',
3447
+ genesisHash: 'genesis-hash',
3448
+ genesisId: 'genesis-id',
3449
+ lastRound: 'last-round',
3450
+ minFee: 'min-fee',
3451
+ };
3452
+ }
3453
+
3454
+ // eslint-disable-next-line camelcase
3455
+ static from_obj_for_encoding(
3456
+ data: Record<string, any>
3457
+ ): TransactionParametersResponse {
3458
+ /* eslint-disable dot-notation */
3459
+ if (typeof data['consensus-version'] === 'undefined')
3460
+ throw new Error(
3461
+ `Response is missing required field 'consensus-version': ${data}`
3462
+ );
3463
+ if (typeof data['fee'] === 'undefined')
3464
+ throw new Error(`Response is missing required field 'fee': ${data}`);
3465
+ if (typeof data['genesis-hash'] === 'undefined')
3466
+ throw new Error(
3467
+ `Response is missing required field 'genesis-hash': ${data}`
3468
+ );
3469
+ if (typeof data['genesis-id'] === 'undefined')
3470
+ throw new Error(
3471
+ `Response is missing required field 'genesis-id': ${data}`
3472
+ );
3473
+ if (typeof data['last-round'] === 'undefined')
3474
+ throw new Error(
3475
+ `Response is missing required field 'last-round': ${data}`
3476
+ );
3477
+ if (typeof data['min-fee'] === 'undefined')
3478
+ throw new Error(`Response is missing required field 'min-fee': ${data}`);
3479
+ return new TransactionParametersResponse({
3480
+ consensusVersion: data['consensus-version'],
3481
+ fee: data['fee'],
3482
+ genesisHash: data['genesis-hash'],
3483
+ genesisId: data['genesis-id'],
3484
+ lastRound: data['last-round'],
3485
+ minFee: data['min-fee'],
3486
+ });
3487
+ /* eslint-enable dot-notation */
3488
+ }
3489
+ }
3490
+
3491
+ /**
3492
+ * Proof of transaction in a block.
3493
+ */
3494
+ export class TransactionProofResponse extends BaseModel {
3495
+ /**
3496
+ * Index of the transaction in the block's payset.
3497
+ */
3498
+ public idx: number | bigint;
3499
+
3500
+ /**
3501
+ * Proof of transaction membership.
3502
+ */
3503
+ public proof: Uint8Array;
3504
+
3505
+ /**
3506
+ * Hash of SignedTxnInBlock for verifying proof.
3507
+ */
3508
+ public stibhash: Uint8Array;
3509
+
3510
+ /**
3511
+ * Represents the depth of the tree that is being proven, i.e. the number of edges
3512
+ * from a leaf to the root.
3513
+ */
3514
+ public treedepth: number | bigint;
3515
+
3516
+ /**
3517
+ * The type of hash function used to create the proof, must be one of:
3518
+ * * sha512_256
3519
+ * * sha256
3520
+ */
3521
+ public hashtype?: string;
3522
+
3523
+ /**
3524
+ * Creates a new `TransactionProofResponse` object.
3525
+ * @param idx - Index of the transaction in the block's payset.
3526
+ * @param proof - Proof of transaction membership.
3527
+ * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
3528
+ * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
3529
+ * from a leaf to the root.
3530
+ * @param hashtype - The type of hash function used to create the proof, must be one of:
3531
+ * * sha512_256
3532
+ * * sha256
3533
+ */
3534
+ constructor({
3535
+ idx,
3536
+ proof,
3537
+ stibhash,
3538
+ treedepth,
3539
+ hashtype,
3540
+ }: {
3541
+ idx: number | bigint;
3542
+ proof: string | Uint8Array;
3543
+ stibhash: string | Uint8Array;
3544
+ treedepth: number | bigint;
3545
+ hashtype?: string;
3546
+ }) {
3547
+ super();
3548
+ this.idx = idx;
3549
+ this.proof =
3550
+ typeof proof === 'string'
3551
+ ? new Uint8Array(Buffer.from(proof, 'base64'))
3552
+ : proof;
3553
+ this.stibhash =
3554
+ typeof stibhash === 'string'
3555
+ ? new Uint8Array(Buffer.from(stibhash, 'base64'))
3556
+ : stibhash;
3557
+ this.treedepth = treedepth;
3558
+ this.hashtype = hashtype;
3559
+
3560
+ this.attribute_map = {
3561
+ idx: 'idx',
3562
+ proof: 'proof',
3563
+ stibhash: 'stibhash',
3564
+ treedepth: 'treedepth',
3565
+ hashtype: 'hashtype',
3566
+ };
3567
+ }
3568
+
3569
+ // eslint-disable-next-line camelcase
3570
+ static from_obj_for_encoding(
3571
+ data: Record<string, any>
3572
+ ): TransactionProofResponse {
3573
+ /* eslint-disable dot-notation */
3574
+ if (typeof data['idx'] === 'undefined')
3575
+ throw new Error(`Response is missing required field 'idx': ${data}`);
3576
+ if (typeof data['proof'] === 'undefined')
3577
+ throw new Error(`Response is missing required field 'proof': ${data}`);
3578
+ if (typeof data['stibhash'] === 'undefined')
3579
+ throw new Error(`Response is missing required field 'stibhash': ${data}`);
3580
+ if (typeof data['treedepth'] === 'undefined')
3581
+ throw new Error(
3582
+ `Response is missing required field 'treedepth': ${data}`
3583
+ );
3584
+ return new TransactionProofResponse({
3585
+ idx: data['idx'],
3586
+ proof: data['proof'],
3587
+ stibhash: data['stibhash'],
3588
+ treedepth: data['treedepth'],
3589
+ hashtype: data['hashtype'],
3590
+ });
3591
+ /* eslint-enable dot-notation */
3592
+ }
3593
+ }
3594
+
3595
+ /**
3596
+ * algod version information.
3597
+ */
3598
+ export class Version extends BaseModel {
3599
+ public build: BuildVersion;
3600
+
3601
+ public genesisHashB64: Uint8Array;
3602
+
3603
+ public genesisId: string;
3604
+
3605
+ public versions: string[];
3606
+
3607
+ /**
3608
+ * Creates a new `Version` object.
3609
+ * @param build -
3610
+ * @param genesisHashB64 -
3611
+ * @param genesisId -
3612
+ * @param versions -
3613
+ */
3614
+ constructor(
3615
+ build: BuildVersion,
3616
+ genesisHashB64: string | Uint8Array,
3617
+ genesisId: string,
3618
+ versions: string[]
3619
+ ) {
3620
+ super();
3621
+ this.build = build;
3622
+ this.genesisHashB64 =
3623
+ typeof genesisHashB64 === 'string'
3624
+ ? new Uint8Array(Buffer.from(genesisHashB64, 'base64'))
3625
+ : genesisHashB64;
3626
+ this.genesisId = genesisId;
3627
+ this.versions = versions;
3628
+
3629
+ this.attribute_map = {
3630
+ build: 'build',
3631
+ genesisHashB64: 'genesis_hash_b64',
3632
+ genesisId: 'genesis_id',
3633
+ versions: 'versions',
3634
+ };
3635
+ }
3636
+
3637
+ // eslint-disable-next-line camelcase
3638
+ static from_obj_for_encoding(data: Record<string, any>): Version {
3639
+ /* eslint-disable dot-notation */
3640
+ if (typeof data['build'] === 'undefined')
3641
+ throw new Error(`Response is missing required field 'build': ${data}`);
3642
+ if (typeof data['genesis_hash_b64'] === 'undefined')
3643
+ throw new Error(
3644
+ `Response is missing required field 'genesis_hash_b64': ${data}`
3645
+ );
3646
+ if (typeof data['genesis_id'] === 'undefined')
3647
+ throw new Error(
3648
+ `Response is missing required field 'genesis_id': ${data}`
3649
+ );
3650
+ if (!Array.isArray(data['versions']))
3651
+ throw new Error(
3652
+ `Response is missing required array field 'versions': ${data}`
3653
+ );
3654
+ return new Version(
3655
+ BuildVersion.from_obj_for_encoding(data['build']),
3656
+ data['genesis_hash_b64'],
3657
+ data['genesis_id'],
3658
+ data['versions']
3659
+ );
3660
+ /* eslint-enable dot-notation */
3661
+ }
3662
+ }