algosdk 1.24.0 → 2.0.0

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