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,2038 @@
1
+ /**
2
+ * NOTICE: This file was generated. Editing this file manually is not recommended.
3
+ */
4
+ /* eslint-disable no-use-before-define */
5
+ import BaseModel from '../../basemodel';
6
+ /**
7
+ * Account information at a given round.
8
+ * Definition:
9
+ * data/basics/userBalance.go : AccountData
10
+ */
11
+ export class Account extends BaseModel {
12
+ /**
13
+ * Creates a new `Account` object.
14
+ * @param address - the account public key
15
+ * @param amount - (algo) total number of MicroAlgos in the account
16
+ * @param amountWithoutPendingRewards - specifies the amount of MicroAlgos in the account, without the pending rewards.
17
+ * @param minBalance - MicroAlgo balance required by the account.
18
+ * The requirement grows based on asset and application usage.
19
+ * @param pendingRewards - amount of MicroAlgos of pending rewards in this account.
20
+ * @param rewards - (ern) total rewards of MicroAlgos the account has received, including pending
21
+ * rewards.
22
+ * @param round - The round for which this information is relevant.
23
+ * @param status - (onl) delegation status of the account's MicroAlgos
24
+ * * Offline - indicates that the associated account is delegated.
25
+ * * Online - indicates that the associated account used as part of the delegation
26
+ * pool.
27
+ * * NotParticipating - indicates that the associated account is neither a
28
+ * delegator nor a delegate.
29
+ * @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count
30
+ * of application local data (AppLocalState objects) stored in this account.
31
+ * @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of
32
+ * AssetHolding objects held by this account.
33
+ * @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
34
+ * @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
35
+ * @param appsLocalState - (appl) applications local data stored in this account.
36
+ * Note the raw object uses `map[int] -> AppLocalState` for this type.
37
+ * @param appsTotalExtraPages - (teap) the sum of all extra application program pages for this account.
38
+ * @param appsTotalSchema - (tsch) stores the sum of all of the local schemas and global schemas in this
39
+ * account.
40
+ * Note: the raw account uses `StateSchema` for this type.
41
+ * @param assets - (asset) assets held by this account.
42
+ * Note the raw object uses `map[int] -> AssetHolding` for this type.
43
+ * @param authAddr - (spend) the address against which signing should be checked. If empty, the
44
+ * address of the current account is used. This field can be updated in any
45
+ * transaction by setting the RekeyTo field.
46
+ * @param createdApps - (appp) parameters of applications created by this account including app global
47
+ * data.
48
+ * Note: the raw account uses `map[int] -> AppParams` for this type.
49
+ * @param createdAssets - (apar) parameters of assets created by this account.
50
+ * Note: the raw account uses `map[int] -> Asset` for this type.
51
+ * @param participation - AccountParticipation describes the parameters used by this account in consensus
52
+ * protocol.
53
+ * @param rewardBase - (ebase) used as part of the rewards computation. Only applicable to accounts
54
+ * which are participating.
55
+ * @param sigType - Indicates what type of signature is used by this account, must be one of:
56
+ * * sig
57
+ * * msig
58
+ * * lsig
59
+ * @param totalBoxBytes - (tbxb) The total number of bytes used by this account's app's box keys and
60
+ * values.
61
+ * @param totalBoxes - (tbx) The number of existing boxes created by this account's app.
62
+ */
63
+ constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, totalBoxBytes, totalBoxes, }) {
64
+ super();
65
+ this.address = address;
66
+ this.amount = amount;
67
+ this.amountWithoutPendingRewards = amountWithoutPendingRewards;
68
+ this.minBalance = minBalance;
69
+ this.pendingRewards = pendingRewards;
70
+ this.rewards = rewards;
71
+ this.round = round;
72
+ this.status = status;
73
+ this.totalAppsOptedIn = totalAppsOptedIn;
74
+ this.totalAssetsOptedIn = totalAssetsOptedIn;
75
+ this.totalCreatedApps = totalCreatedApps;
76
+ this.totalCreatedAssets = totalCreatedAssets;
77
+ this.appsLocalState = appsLocalState;
78
+ this.appsTotalExtraPages = appsTotalExtraPages;
79
+ this.appsTotalSchema = appsTotalSchema;
80
+ this.assets = assets;
81
+ this.authAddr = authAddr;
82
+ this.createdApps = createdApps;
83
+ this.createdAssets = createdAssets;
84
+ this.participation = participation;
85
+ this.rewardBase = rewardBase;
86
+ this.sigType = sigType;
87
+ this.totalBoxBytes = totalBoxBytes;
88
+ this.totalBoxes = totalBoxes;
89
+ this.attribute_map = {
90
+ address: 'address',
91
+ amount: 'amount',
92
+ amountWithoutPendingRewards: 'amount-without-pending-rewards',
93
+ minBalance: 'min-balance',
94
+ pendingRewards: 'pending-rewards',
95
+ rewards: 'rewards',
96
+ round: 'round',
97
+ status: 'status',
98
+ totalAppsOptedIn: 'total-apps-opted-in',
99
+ totalAssetsOptedIn: 'total-assets-opted-in',
100
+ totalCreatedApps: 'total-created-apps',
101
+ totalCreatedAssets: 'total-created-assets',
102
+ appsLocalState: 'apps-local-state',
103
+ appsTotalExtraPages: 'apps-total-extra-pages',
104
+ appsTotalSchema: 'apps-total-schema',
105
+ assets: 'assets',
106
+ authAddr: 'auth-addr',
107
+ createdApps: 'created-apps',
108
+ createdAssets: 'created-assets',
109
+ participation: 'participation',
110
+ rewardBase: 'reward-base',
111
+ sigType: 'sig-type',
112
+ totalBoxBytes: 'total-box-bytes',
113
+ totalBoxes: 'total-boxes',
114
+ };
115
+ }
116
+ // eslint-disable-next-line camelcase
117
+ static from_obj_for_encoding(data) {
118
+ /* eslint-disable dot-notation */
119
+ if (typeof data['address'] === 'undefined')
120
+ throw new Error(`Response is missing required field 'address': ${data}`);
121
+ if (typeof data['amount'] === 'undefined')
122
+ throw new Error(`Response is missing required field 'amount': ${data}`);
123
+ if (typeof data['amount-without-pending-rewards'] === 'undefined')
124
+ throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${data}`);
125
+ if (typeof data['min-balance'] === 'undefined')
126
+ throw new Error(`Response is missing required field 'min-balance': ${data}`);
127
+ if (typeof data['pending-rewards'] === 'undefined')
128
+ throw new Error(`Response is missing required field 'pending-rewards': ${data}`);
129
+ if (typeof data['rewards'] === 'undefined')
130
+ throw new Error(`Response is missing required field 'rewards': ${data}`);
131
+ if (typeof data['round'] === 'undefined')
132
+ throw new Error(`Response is missing required field 'round': ${data}`);
133
+ if (typeof data['status'] === 'undefined')
134
+ throw new Error(`Response is missing required field 'status': ${data}`);
135
+ if (typeof data['total-apps-opted-in'] === 'undefined')
136
+ throw new Error(`Response is missing required field 'total-apps-opted-in': ${data}`);
137
+ if (typeof data['total-assets-opted-in'] === 'undefined')
138
+ throw new Error(`Response is missing required field 'total-assets-opted-in': ${data}`);
139
+ if (typeof data['total-created-apps'] === 'undefined')
140
+ throw new Error(`Response is missing required field 'total-created-apps': ${data}`);
141
+ if (typeof data['total-created-assets'] === 'undefined')
142
+ throw new Error(`Response is missing required field 'total-created-assets': ${data}`);
143
+ return new Account({
144
+ address: data['address'],
145
+ amount: data['amount'],
146
+ amountWithoutPendingRewards: data['amount-without-pending-rewards'],
147
+ minBalance: data['min-balance'],
148
+ pendingRewards: data['pending-rewards'],
149
+ rewards: data['rewards'],
150
+ round: data['round'],
151
+ status: data['status'],
152
+ totalAppsOptedIn: data['total-apps-opted-in'],
153
+ totalAssetsOptedIn: data['total-assets-opted-in'],
154
+ totalCreatedApps: data['total-created-apps'],
155
+ totalCreatedAssets: data['total-created-assets'],
156
+ appsLocalState: typeof data['apps-local-state'] !== 'undefined'
157
+ ? data['apps-local-state'].map(ApplicationLocalState.from_obj_for_encoding)
158
+ : undefined,
159
+ appsTotalExtraPages: data['apps-total-extra-pages'],
160
+ appsTotalSchema: typeof data['apps-total-schema'] !== 'undefined'
161
+ ? ApplicationStateSchema.from_obj_for_encoding(data['apps-total-schema'])
162
+ : undefined,
163
+ assets: typeof data['assets'] !== 'undefined'
164
+ ? data['assets'].map(AssetHolding.from_obj_for_encoding)
165
+ : undefined,
166
+ authAddr: data['auth-addr'],
167
+ createdApps: typeof data['created-apps'] !== 'undefined'
168
+ ? data['created-apps'].map(Application.from_obj_for_encoding)
169
+ : undefined,
170
+ createdAssets: typeof data['created-assets'] !== 'undefined'
171
+ ? data['created-assets'].map(Asset.from_obj_for_encoding)
172
+ : undefined,
173
+ participation: typeof data['participation'] !== 'undefined'
174
+ ? AccountParticipation.from_obj_for_encoding(data['participation'])
175
+ : undefined,
176
+ rewardBase: data['reward-base'],
177
+ sigType: data['sig-type'],
178
+ totalBoxBytes: data['total-box-bytes'],
179
+ totalBoxes: data['total-boxes'],
180
+ });
181
+ /* eslint-enable dot-notation */
182
+ }
183
+ }
184
+ /**
185
+ * AccountApplicationResponse describes the account's application local state and
186
+ * global state (AppLocalState and AppParams, if either exists) for a specific
187
+ * application ID. Global state will only be returned if the provided address is
188
+ * the application's creator.
189
+ */
190
+ export class AccountApplicationResponse extends BaseModel {
191
+ /**
192
+ * Creates a new `AccountApplicationResponse` object.
193
+ * @param round - The round for which this information is relevant.
194
+ * @param appLocalState - (appl) the application local data stored in this account.
195
+ * The raw account uses `AppLocalState` for this type.
196
+ * @param createdApp - (appp) parameters of the application created by this account including app
197
+ * global data.
198
+ * The raw account uses `AppParams` for this type.
199
+ */
200
+ constructor({ round, appLocalState, createdApp, }) {
201
+ super();
202
+ this.round = round;
203
+ this.appLocalState = appLocalState;
204
+ this.createdApp = createdApp;
205
+ this.attribute_map = {
206
+ round: 'round',
207
+ appLocalState: 'app-local-state',
208
+ createdApp: 'created-app',
209
+ };
210
+ }
211
+ // eslint-disable-next-line camelcase
212
+ static from_obj_for_encoding(data) {
213
+ /* eslint-disable dot-notation */
214
+ if (typeof data['round'] === 'undefined')
215
+ throw new Error(`Response is missing required field 'round': ${data}`);
216
+ return new AccountApplicationResponse({
217
+ round: data['round'],
218
+ appLocalState: typeof data['app-local-state'] !== 'undefined'
219
+ ? ApplicationLocalState.from_obj_for_encoding(data['app-local-state'])
220
+ : undefined,
221
+ createdApp: typeof data['created-app'] !== 'undefined'
222
+ ? ApplicationParams.from_obj_for_encoding(data['created-app'])
223
+ : undefined,
224
+ });
225
+ /* eslint-enable dot-notation */
226
+ }
227
+ }
228
+ /**
229
+ * AccountAssetResponse describes the account's asset holding and asset parameters
230
+ * (if either exist) for a specific asset ID. Asset parameters will only be
231
+ * returned if the provided address is the asset's creator.
232
+ */
233
+ export class AccountAssetResponse extends BaseModel {
234
+ /**
235
+ * Creates a new `AccountAssetResponse` object.
236
+ * @param round - The round for which this information is relevant.
237
+ * @param assetHolding - (asset) Details about the asset held by this account.
238
+ * The raw account uses `AssetHolding` for this type.
239
+ * @param createdAsset - (apar) parameters of the asset created by this account.
240
+ * The raw account uses `AssetParams` for this type.
241
+ */
242
+ constructor({ round, assetHolding, createdAsset, }) {
243
+ super();
244
+ this.round = round;
245
+ this.assetHolding = assetHolding;
246
+ this.createdAsset = createdAsset;
247
+ this.attribute_map = {
248
+ round: 'round',
249
+ assetHolding: 'asset-holding',
250
+ createdAsset: 'created-asset',
251
+ };
252
+ }
253
+ // eslint-disable-next-line camelcase
254
+ static from_obj_for_encoding(data) {
255
+ /* eslint-disable dot-notation */
256
+ if (typeof data['round'] === 'undefined')
257
+ throw new Error(`Response is missing required field 'round': ${data}`);
258
+ return new AccountAssetResponse({
259
+ round: data['round'],
260
+ assetHolding: typeof data['asset-holding'] !== 'undefined'
261
+ ? AssetHolding.from_obj_for_encoding(data['asset-holding'])
262
+ : undefined,
263
+ createdAsset: typeof data['created-asset'] !== 'undefined'
264
+ ? AssetParams.from_obj_for_encoding(data['created-asset'])
265
+ : undefined,
266
+ });
267
+ /* eslint-enable dot-notation */
268
+ }
269
+ }
270
+ /**
271
+ * AccountParticipation describes the parameters used by this account in consensus
272
+ * protocol.
273
+ */
274
+ export class AccountParticipation extends BaseModel {
275
+ /**
276
+ * Creates a new `AccountParticipation` object.
277
+ * @param selectionParticipationKey - (sel) Selection public key (if any) currently registered for this round.
278
+ * @param voteFirstValid - (voteFst) First round for which this participation is valid.
279
+ * @param voteKeyDilution - (voteKD) Number of subkeys in each batch of participation keys.
280
+ * @param voteLastValid - (voteLst) Last round for which this participation is valid.
281
+ * @param voteParticipationKey - (vote) root participation public key (if any) currently registered for this
282
+ * round.
283
+ * @param stateProofKey - (stprf) Root of the state proof key (if any)
284
+ */
285
+ constructor({ selectionParticipationKey, voteFirstValid, voteKeyDilution, voteLastValid, voteParticipationKey, stateProofKey, }) {
286
+ super();
287
+ this.selectionParticipationKey =
288
+ typeof selectionParticipationKey === 'string'
289
+ ? new Uint8Array(Buffer.from(selectionParticipationKey, 'base64'))
290
+ : selectionParticipationKey;
291
+ this.voteFirstValid = voteFirstValid;
292
+ this.voteKeyDilution = voteKeyDilution;
293
+ this.voteLastValid = voteLastValid;
294
+ this.voteParticipationKey =
295
+ typeof voteParticipationKey === 'string'
296
+ ? new Uint8Array(Buffer.from(voteParticipationKey, 'base64'))
297
+ : voteParticipationKey;
298
+ this.stateProofKey =
299
+ typeof stateProofKey === 'string'
300
+ ? new Uint8Array(Buffer.from(stateProofKey, 'base64'))
301
+ : stateProofKey;
302
+ this.attribute_map = {
303
+ selectionParticipationKey: 'selection-participation-key',
304
+ voteFirstValid: 'vote-first-valid',
305
+ voteKeyDilution: 'vote-key-dilution',
306
+ voteLastValid: 'vote-last-valid',
307
+ voteParticipationKey: 'vote-participation-key',
308
+ stateProofKey: 'state-proof-key',
309
+ };
310
+ }
311
+ // eslint-disable-next-line camelcase
312
+ static from_obj_for_encoding(data) {
313
+ /* eslint-disable dot-notation */
314
+ if (typeof data['selection-participation-key'] === 'undefined')
315
+ throw new Error(`Response is missing required field 'selection-participation-key': ${data}`);
316
+ if (typeof data['vote-first-valid'] === 'undefined')
317
+ throw new Error(`Response is missing required field 'vote-first-valid': ${data}`);
318
+ if (typeof data['vote-key-dilution'] === 'undefined')
319
+ throw new Error(`Response is missing required field 'vote-key-dilution': ${data}`);
320
+ if (typeof data['vote-last-valid'] === 'undefined')
321
+ throw new Error(`Response is missing required field 'vote-last-valid': ${data}`);
322
+ if (typeof data['vote-participation-key'] === 'undefined')
323
+ throw new Error(`Response is missing required field 'vote-participation-key': ${data}`);
324
+ return new AccountParticipation({
325
+ selectionParticipationKey: data['selection-participation-key'],
326
+ voteFirstValid: data['vote-first-valid'],
327
+ voteKeyDilution: data['vote-key-dilution'],
328
+ voteLastValid: data['vote-last-valid'],
329
+ voteParticipationKey: data['vote-participation-key'],
330
+ stateProofKey: data['state-proof-key'],
331
+ });
332
+ /* eslint-enable dot-notation */
333
+ }
334
+ }
335
+ /**
336
+ * Application state delta.
337
+ */
338
+ export class AccountStateDelta extends BaseModel {
339
+ /**
340
+ * Creates a new `AccountStateDelta` object.
341
+ * @param address -
342
+ * @param delta - Application state delta.
343
+ */
344
+ constructor({ address, delta, }) {
345
+ super();
346
+ this.address = address;
347
+ this.delta = delta;
348
+ this.attribute_map = {
349
+ address: 'address',
350
+ delta: 'delta',
351
+ };
352
+ }
353
+ // eslint-disable-next-line camelcase
354
+ static from_obj_for_encoding(data) {
355
+ /* eslint-disable dot-notation */
356
+ if (typeof data['address'] === 'undefined')
357
+ throw new Error(`Response is missing required field 'address': ${data}`);
358
+ if (!Array.isArray(data['delta']))
359
+ throw new Error(`Response is missing required array field 'delta': ${data}`);
360
+ return new AccountStateDelta({
361
+ address: data['address'],
362
+ delta: data['delta'].map(EvalDeltaKeyValue.from_obj_for_encoding),
363
+ });
364
+ /* eslint-enable dot-notation */
365
+ }
366
+ }
367
+ /**
368
+ * Application index and its parameters
369
+ */
370
+ export class Application extends BaseModel {
371
+ /**
372
+ * Creates a new `Application` object.
373
+ * @param id - (appidx) application index.
374
+ * @param params - (appparams) application parameters.
375
+ */
376
+ constructor({ id, params, }) {
377
+ super();
378
+ this.id = id;
379
+ this.params = params;
380
+ this.attribute_map = {
381
+ id: 'id',
382
+ params: 'params',
383
+ };
384
+ }
385
+ // eslint-disable-next-line camelcase
386
+ static from_obj_for_encoding(data) {
387
+ /* eslint-disable dot-notation */
388
+ if (typeof data['id'] === 'undefined')
389
+ throw new Error(`Response is missing required field 'id': ${data}`);
390
+ if (typeof data['params'] === 'undefined')
391
+ throw new Error(`Response is missing required field 'params': ${data}`);
392
+ return new Application({
393
+ id: data['id'],
394
+ params: ApplicationParams.from_obj_for_encoding(data['params']),
395
+ });
396
+ /* eslint-enable dot-notation */
397
+ }
398
+ }
399
+ /**
400
+ * Stores local state associated with an application.
401
+ */
402
+ export class ApplicationLocalState extends BaseModel {
403
+ /**
404
+ * Creates a new `ApplicationLocalState` object.
405
+ * @param id - The application which this local state is for.
406
+ * @param schema - (hsch) schema.
407
+ * @param keyValue - (tkv) storage.
408
+ */
409
+ constructor({ id, schema, keyValue, }) {
410
+ super();
411
+ this.id = id;
412
+ this.schema = schema;
413
+ this.keyValue = keyValue;
414
+ this.attribute_map = {
415
+ id: 'id',
416
+ schema: 'schema',
417
+ keyValue: 'key-value',
418
+ };
419
+ }
420
+ // eslint-disable-next-line camelcase
421
+ static from_obj_for_encoding(data) {
422
+ /* eslint-disable dot-notation */
423
+ if (typeof data['id'] === 'undefined')
424
+ throw new Error(`Response is missing required field 'id': ${data}`);
425
+ if (typeof data['schema'] === 'undefined')
426
+ throw new Error(`Response is missing required field 'schema': ${data}`);
427
+ return new ApplicationLocalState({
428
+ id: data['id'],
429
+ schema: ApplicationStateSchema.from_obj_for_encoding(data['schema']),
430
+ keyValue: typeof data['key-value'] !== 'undefined'
431
+ ? data['key-value'].map(TealKeyValue.from_obj_for_encoding)
432
+ : undefined,
433
+ });
434
+ /* eslint-enable dot-notation */
435
+ }
436
+ }
437
+ /**
438
+ * Stores the global information associated with an application.
439
+ */
440
+ export class ApplicationParams extends BaseModel {
441
+ /**
442
+ * Creates a new `ApplicationParams` object.
443
+ * @param approvalProgram - (approv) approval program.
444
+ * @param clearStateProgram - (clearp) approval program.
445
+ * @param creator - The address that created this application. This is the address where the
446
+ * parameters and global state for this application can be found.
447
+ * @param extraProgramPages - (epp) the amount of extra program pages available to this app.
448
+ * @param globalState - [\gs) global schema
449
+ * @param globalStateSchema - [\gsch) global schema
450
+ * @param localStateSchema - [\lsch) local schema
451
+ */
452
+ constructor({ approvalProgram, clearStateProgram, creator, extraProgramPages, globalState, globalStateSchema, localStateSchema, }) {
453
+ super();
454
+ this.approvalProgram =
455
+ typeof approvalProgram === 'string'
456
+ ? new Uint8Array(Buffer.from(approvalProgram, 'base64'))
457
+ : approvalProgram;
458
+ this.clearStateProgram =
459
+ typeof clearStateProgram === 'string'
460
+ ? new Uint8Array(Buffer.from(clearStateProgram, 'base64'))
461
+ : clearStateProgram;
462
+ this.creator = creator;
463
+ this.extraProgramPages = extraProgramPages;
464
+ this.globalState = globalState;
465
+ this.globalStateSchema = globalStateSchema;
466
+ this.localStateSchema = localStateSchema;
467
+ this.attribute_map = {
468
+ approvalProgram: 'approval-program',
469
+ clearStateProgram: 'clear-state-program',
470
+ creator: 'creator',
471
+ extraProgramPages: 'extra-program-pages',
472
+ globalState: 'global-state',
473
+ globalStateSchema: 'global-state-schema',
474
+ localStateSchema: 'local-state-schema',
475
+ };
476
+ }
477
+ // eslint-disable-next-line camelcase
478
+ static from_obj_for_encoding(data) {
479
+ /* eslint-disable dot-notation */
480
+ if (typeof data['approval-program'] === 'undefined')
481
+ throw new Error(`Response is missing required field 'approval-program': ${data}`);
482
+ if (typeof data['clear-state-program'] === 'undefined')
483
+ throw new Error(`Response is missing required field 'clear-state-program': ${data}`);
484
+ if (typeof data['creator'] === 'undefined')
485
+ throw new Error(`Response is missing required field 'creator': ${data}`);
486
+ return new ApplicationParams({
487
+ approvalProgram: data['approval-program'],
488
+ clearStateProgram: data['clear-state-program'],
489
+ creator: data['creator'],
490
+ extraProgramPages: data['extra-program-pages'],
491
+ globalState: typeof data['global-state'] !== 'undefined'
492
+ ? data['global-state'].map(TealKeyValue.from_obj_for_encoding)
493
+ : undefined,
494
+ globalStateSchema: typeof data['global-state-schema'] !== 'undefined'
495
+ ? ApplicationStateSchema.from_obj_for_encoding(data['global-state-schema'])
496
+ : undefined,
497
+ localStateSchema: typeof data['local-state-schema'] !== 'undefined'
498
+ ? ApplicationStateSchema.from_obj_for_encoding(data['local-state-schema'])
499
+ : undefined,
500
+ });
501
+ /* eslint-enable dot-notation */
502
+ }
503
+ }
504
+ /**
505
+ * Specifies maximums on the number of each type that may be stored.
506
+ */
507
+ export class ApplicationStateSchema extends BaseModel {
508
+ /**
509
+ * Creates a new `ApplicationStateSchema` object.
510
+ * @param numUint - (nui) num of uints.
511
+ * @param numByteSlice - (nbs) num of byte slices.
512
+ */
513
+ constructor({ numUint, numByteSlice, }) {
514
+ super();
515
+ this.numUint = numUint;
516
+ this.numByteSlice = numByteSlice;
517
+ this.attribute_map = {
518
+ numUint: 'num-uint',
519
+ numByteSlice: 'num-byte-slice',
520
+ };
521
+ }
522
+ // eslint-disable-next-line camelcase
523
+ static from_obj_for_encoding(data) {
524
+ /* eslint-disable dot-notation */
525
+ if (typeof data['num-uint'] === 'undefined')
526
+ throw new Error(`Response is missing required field 'num-uint': ${data}`);
527
+ if (typeof data['num-byte-slice'] === 'undefined')
528
+ throw new Error(`Response is missing required field 'num-byte-slice': ${data}`);
529
+ return new ApplicationStateSchema({
530
+ numUint: data['num-uint'],
531
+ numByteSlice: data['num-byte-slice'],
532
+ });
533
+ /* eslint-enable dot-notation */
534
+ }
535
+ }
536
+ /**
537
+ * Specifies both the unique identifier and the parameters for an asset
538
+ */
539
+ export class Asset extends BaseModel {
540
+ /**
541
+ * Creates a new `Asset` object.
542
+ * @param index - unique asset identifier
543
+ * @param params - AssetParams specifies the parameters for an asset.
544
+ * (apar) when part of an AssetConfig transaction.
545
+ * Definition:
546
+ * data/transactions/asset.go : AssetParams
547
+ */
548
+ constructor({ index, params, }) {
549
+ super();
550
+ this.index = index;
551
+ this.params = params;
552
+ this.attribute_map = {
553
+ index: 'index',
554
+ params: 'params',
555
+ };
556
+ }
557
+ // eslint-disable-next-line camelcase
558
+ static from_obj_for_encoding(data) {
559
+ /* eslint-disable dot-notation */
560
+ if (typeof data['index'] === 'undefined')
561
+ throw new Error(`Response is missing required field 'index': ${data}`);
562
+ if (typeof data['params'] === 'undefined')
563
+ throw new Error(`Response is missing required field 'params': ${data}`);
564
+ return new Asset({
565
+ index: data['index'],
566
+ params: AssetParams.from_obj_for_encoding(data['params']),
567
+ });
568
+ /* eslint-enable dot-notation */
569
+ }
570
+ }
571
+ /**
572
+ * Describes an asset held by an account.
573
+ * Definition:
574
+ * data/basics/userBalance.go : AssetHolding
575
+ */
576
+ export class AssetHolding extends BaseModel {
577
+ /**
578
+ * Creates a new `AssetHolding` object.
579
+ * @param amount - (a) number of units held.
580
+ * @param assetId - Asset ID of the holding.
581
+ * @param isFrozen - (f) whether or not the holding is frozen.
582
+ */
583
+ constructor({ amount, assetId, isFrozen, }) {
584
+ super();
585
+ this.amount = amount;
586
+ this.assetId = assetId;
587
+ this.isFrozen = isFrozen;
588
+ this.attribute_map = {
589
+ amount: 'amount',
590
+ assetId: 'asset-id',
591
+ isFrozen: 'is-frozen',
592
+ };
593
+ }
594
+ // eslint-disable-next-line camelcase
595
+ static from_obj_for_encoding(data) {
596
+ /* eslint-disable dot-notation */
597
+ if (typeof data['amount'] === 'undefined')
598
+ throw new Error(`Response is missing required field 'amount': ${data}`);
599
+ if (typeof data['asset-id'] === 'undefined')
600
+ throw new Error(`Response is missing required field 'asset-id': ${data}`);
601
+ if (typeof data['is-frozen'] === 'undefined')
602
+ throw new Error(`Response is missing required field 'is-frozen': ${data}`);
603
+ return new AssetHolding({
604
+ amount: data['amount'],
605
+ assetId: data['asset-id'],
606
+ isFrozen: data['is-frozen'],
607
+ });
608
+ /* eslint-enable dot-notation */
609
+ }
610
+ }
611
+ /**
612
+ * AssetParams specifies the parameters for an asset.
613
+ * (apar) when part of an AssetConfig transaction.
614
+ * Definition:
615
+ * data/transactions/asset.go : AssetParams
616
+ */
617
+ export class AssetParams extends BaseModel {
618
+ /**
619
+ * Creates a new `AssetParams` object.
620
+ * @param creator - The address that created this asset. This is the address where the parameters
621
+ * for this asset can be found, and also the address where unwanted asset units can
622
+ * be sent in the worst case.
623
+ * @param decimals - (dc) The number of digits to use after the decimal point when displaying this
624
+ * asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in
625
+ * tenths. If 2, the base unit of the asset is in hundredths, and so on. This value
626
+ * must be between 0 and 19 (inclusive).
627
+ * @param total - (t) The total number of units of this asset.
628
+ * @param clawback - (c) Address of account used to clawback holdings of this asset. If empty,
629
+ * clawback is not permitted.
630
+ * @param defaultFrozen - (df) Whether holdings of this asset are frozen by default.
631
+ * @param freeze - (f) Address of account used to freeze holdings of this asset. If empty, freezing
632
+ * is not permitted.
633
+ * @param manager - (m) Address of account used to manage the keys of this asset and to destroy it.
634
+ * @param metadataHash - (am) A commitment to some unspecified asset metadata. The format of this
635
+ * metadata is up to the application.
636
+ * @param name - (an) Name of this asset, as supplied by the creator. Included only when the
637
+ * asset name is composed of printable utf-8 characters.
638
+ * @param nameB64 - Base64 encoded name of this asset, as supplied by the creator.
639
+ * @param reserve - (r) Address of account holding reserve (non-minted) units of this asset.
640
+ * @param unitName - (un) Name of a unit of this asset, as supplied by the creator. Included only
641
+ * when the name of a unit of this asset is composed of printable utf-8 characters.
642
+ * @param unitNameB64 - Base64 encoded name of a unit of this asset, as supplied by the creator.
643
+ * @param url - (au) URL where more information about the asset can be retrieved. Included only
644
+ * when the URL is composed of printable utf-8 characters.
645
+ * @param urlB64 - Base64 encoded URL where more information about the asset can be retrieved.
646
+ */
647
+ constructor({ creator, decimals, total, clawback, defaultFrozen, freeze, manager, metadataHash, name, nameB64, reserve, unitName, unitNameB64, url, urlB64, }) {
648
+ super();
649
+ this.creator = creator;
650
+ this.decimals = decimals;
651
+ this.total = total;
652
+ this.clawback = clawback;
653
+ this.defaultFrozen = defaultFrozen;
654
+ this.freeze = freeze;
655
+ this.manager = manager;
656
+ this.metadataHash =
657
+ typeof metadataHash === 'string'
658
+ ? new Uint8Array(Buffer.from(metadataHash, 'base64'))
659
+ : metadataHash;
660
+ this.name = name;
661
+ this.nameB64 =
662
+ typeof nameB64 === 'string'
663
+ ? new Uint8Array(Buffer.from(nameB64, 'base64'))
664
+ : nameB64;
665
+ this.reserve = reserve;
666
+ this.unitName = unitName;
667
+ this.unitNameB64 =
668
+ typeof unitNameB64 === 'string'
669
+ ? new Uint8Array(Buffer.from(unitNameB64, 'base64'))
670
+ : unitNameB64;
671
+ this.url = url;
672
+ this.urlB64 =
673
+ typeof urlB64 === 'string'
674
+ ? new Uint8Array(Buffer.from(urlB64, 'base64'))
675
+ : urlB64;
676
+ this.attribute_map = {
677
+ creator: 'creator',
678
+ decimals: 'decimals',
679
+ total: 'total',
680
+ clawback: 'clawback',
681
+ defaultFrozen: 'default-frozen',
682
+ freeze: 'freeze',
683
+ manager: 'manager',
684
+ metadataHash: 'metadata-hash',
685
+ name: 'name',
686
+ nameB64: 'name-b64',
687
+ reserve: 'reserve',
688
+ unitName: 'unit-name',
689
+ unitNameB64: 'unit-name-b64',
690
+ url: 'url',
691
+ urlB64: 'url-b64',
692
+ };
693
+ }
694
+ // eslint-disable-next-line camelcase
695
+ static from_obj_for_encoding(data) {
696
+ /* eslint-disable dot-notation */
697
+ if (typeof data['creator'] === 'undefined')
698
+ throw new Error(`Response is missing required field 'creator': ${data}`);
699
+ if (typeof data['decimals'] === 'undefined')
700
+ throw new Error(`Response is missing required field 'decimals': ${data}`);
701
+ if (typeof data['total'] === 'undefined')
702
+ throw new Error(`Response is missing required field 'total': ${data}`);
703
+ return new AssetParams({
704
+ creator: data['creator'],
705
+ decimals: data['decimals'],
706
+ total: data['total'],
707
+ clawback: data['clawback'],
708
+ defaultFrozen: data['default-frozen'],
709
+ freeze: data['freeze'],
710
+ manager: data['manager'],
711
+ metadataHash: data['metadata-hash'],
712
+ name: data['name'],
713
+ nameB64: data['name-b64'],
714
+ reserve: data['reserve'],
715
+ unitName: data['unit-name'],
716
+ unitNameB64: data['unit-name-b64'],
717
+ url: data['url'],
718
+ urlB64: data['url-b64'],
719
+ });
720
+ /* eslint-enable dot-notation */
721
+ }
722
+ }
723
+ /**
724
+ * Hash of a block header.
725
+ */
726
+ export class BlockHashResponse extends BaseModel {
727
+ /**
728
+ * Creates a new `BlockHashResponse` object.
729
+ * @param blockhash - Block header hash.
730
+ */
731
+ constructor({ blockhash }) {
732
+ super();
733
+ this.blockhash = blockhash;
734
+ this.attribute_map = {
735
+ blockhash: 'blockHash',
736
+ };
737
+ }
738
+ // eslint-disable-next-line camelcase
739
+ static from_obj_for_encoding(data) {
740
+ /* eslint-disable dot-notation */
741
+ if (typeof data['blockHash'] === 'undefined')
742
+ throw new Error(`Response is missing required field 'blockHash': ${data}`);
743
+ return new BlockHashResponse({
744
+ blockhash: data['blockHash'],
745
+ });
746
+ /* eslint-enable dot-notation */
747
+ }
748
+ }
749
+ /**
750
+ * Encoded block object.
751
+ */
752
+ export class BlockResponse extends BaseModel {
753
+ /**
754
+ * Creates a new `BlockResponse` object.
755
+ * @param block - Block header data.
756
+ * @param cert - Optional certificate object. This is only included when the format is set to
757
+ * message pack.
758
+ */
759
+ constructor({ block, cert, }) {
760
+ super();
761
+ this.block = block;
762
+ this.cert = cert;
763
+ this.attribute_map = {
764
+ block: 'block',
765
+ cert: 'cert',
766
+ };
767
+ }
768
+ // eslint-disable-next-line camelcase
769
+ static from_obj_for_encoding(data) {
770
+ /* eslint-disable dot-notation */
771
+ if (typeof data['block'] === 'undefined')
772
+ throw new Error(`Response is missing required field 'block': ${data}`);
773
+ return new BlockResponse({
774
+ block: data['block'],
775
+ cert: data['cert'],
776
+ });
777
+ /* eslint-enable dot-notation */
778
+ }
779
+ }
780
+ /**
781
+ * Box name and its content.
782
+ */
783
+ export class Box extends BaseModel {
784
+ /**
785
+ * Creates a new `Box` object.
786
+ * @param name - (name) box name, base64 encoded
787
+ * @param value - (value) box value, base64 encoded.
788
+ */
789
+ constructor({ name, value, }) {
790
+ super();
791
+ this.name =
792
+ typeof name === 'string'
793
+ ? new Uint8Array(Buffer.from(name, 'base64'))
794
+ : name;
795
+ this.value =
796
+ typeof value === 'string'
797
+ ? new Uint8Array(Buffer.from(value, 'base64'))
798
+ : value;
799
+ this.attribute_map = {
800
+ name: 'name',
801
+ value: 'value',
802
+ };
803
+ }
804
+ // eslint-disable-next-line camelcase
805
+ static from_obj_for_encoding(data) {
806
+ /* eslint-disable dot-notation */
807
+ if (typeof data['name'] === 'undefined')
808
+ throw new Error(`Response is missing required field 'name': ${data}`);
809
+ if (typeof data['value'] === 'undefined')
810
+ throw new Error(`Response is missing required field 'value': ${data}`);
811
+ return new Box({
812
+ name: data['name'],
813
+ value: data['value'],
814
+ });
815
+ /* eslint-enable dot-notation */
816
+ }
817
+ }
818
+ /**
819
+ * Box descriptor describes a Box.
820
+ */
821
+ export class BoxDescriptor extends BaseModel {
822
+ /**
823
+ * Creates a new `BoxDescriptor` object.
824
+ * @param name - Base64 encoded box name
825
+ */
826
+ constructor({ name }) {
827
+ super();
828
+ this.name =
829
+ typeof name === 'string'
830
+ ? new Uint8Array(Buffer.from(name, 'base64'))
831
+ : name;
832
+ this.attribute_map = {
833
+ name: 'name',
834
+ };
835
+ }
836
+ // eslint-disable-next-line camelcase
837
+ static from_obj_for_encoding(data) {
838
+ /* eslint-disable dot-notation */
839
+ if (typeof data['name'] === 'undefined')
840
+ throw new Error(`Response is missing required field 'name': ${data}`);
841
+ return new BoxDescriptor({
842
+ name: data['name'],
843
+ });
844
+ /* eslint-enable dot-notation */
845
+ }
846
+ }
847
+ /**
848
+ * Box names of an application
849
+ */
850
+ export class BoxesResponse extends BaseModel {
851
+ /**
852
+ * Creates a new `BoxesResponse` object.
853
+ * @param boxes -
854
+ */
855
+ constructor({ boxes }) {
856
+ super();
857
+ this.boxes = boxes;
858
+ this.attribute_map = {
859
+ boxes: 'boxes',
860
+ };
861
+ }
862
+ // eslint-disable-next-line camelcase
863
+ static from_obj_for_encoding(data) {
864
+ /* eslint-disable dot-notation */
865
+ if (!Array.isArray(data['boxes']))
866
+ throw new Error(`Response is missing required array field 'boxes': ${data}`);
867
+ return new BoxesResponse({
868
+ boxes: data['boxes'].map(BoxDescriptor.from_obj_for_encoding),
869
+ });
870
+ /* eslint-enable dot-notation */
871
+ }
872
+ }
873
+ export class BuildVersion extends BaseModel {
874
+ /**
875
+ * Creates a new `BuildVersion` object.
876
+ * @param branch -
877
+ * @param buildNumber -
878
+ * @param channel -
879
+ * @param commitHash -
880
+ * @param major -
881
+ * @param minor -
882
+ */
883
+ constructor({ branch, buildNumber, channel, commitHash, major, minor, }) {
884
+ super();
885
+ this.branch = branch;
886
+ this.buildNumber = buildNumber;
887
+ this.channel = channel;
888
+ this.commitHash = commitHash;
889
+ this.major = major;
890
+ this.minor = minor;
891
+ this.attribute_map = {
892
+ branch: 'branch',
893
+ buildNumber: 'build_number',
894
+ channel: 'channel',
895
+ commitHash: 'commit_hash',
896
+ major: 'major',
897
+ minor: 'minor',
898
+ };
899
+ }
900
+ // eslint-disable-next-line camelcase
901
+ static from_obj_for_encoding(data) {
902
+ /* eslint-disable dot-notation */
903
+ if (typeof data['branch'] === 'undefined')
904
+ throw new Error(`Response is missing required field 'branch': ${data}`);
905
+ if (typeof data['build_number'] === 'undefined')
906
+ throw new Error(`Response is missing required field 'build_number': ${data}`);
907
+ if (typeof data['channel'] === 'undefined')
908
+ throw new Error(`Response is missing required field 'channel': ${data}`);
909
+ if (typeof data['commit_hash'] === 'undefined')
910
+ throw new Error(`Response is missing required field 'commit_hash': ${data}`);
911
+ if (typeof data['major'] === 'undefined')
912
+ throw new Error(`Response is missing required field 'major': ${data}`);
913
+ if (typeof data['minor'] === 'undefined')
914
+ throw new Error(`Response is missing required field 'minor': ${data}`);
915
+ return new BuildVersion({
916
+ branch: data['branch'],
917
+ buildNumber: data['build_number'],
918
+ channel: data['channel'],
919
+ commitHash: data['commit_hash'],
920
+ major: data['major'],
921
+ minor: data['minor'],
922
+ });
923
+ /* eslint-enable dot-notation */
924
+ }
925
+ }
926
+ /**
927
+ * Teal compile Result
928
+ */
929
+ export class CompileResponse extends BaseModel {
930
+ /**
931
+ * Creates a new `CompileResponse` object.
932
+ * @param hash - base32 SHA512_256 of program bytes (Address style)
933
+ * @param result - base64 encoded program bytes
934
+ * @param sourcemap - JSON of the source map
935
+ */
936
+ constructor({ hash, result, sourcemap, }) {
937
+ super();
938
+ this.hash = hash;
939
+ this.result = result;
940
+ this.sourcemap = sourcemap;
941
+ this.attribute_map = {
942
+ hash: 'hash',
943
+ result: 'result',
944
+ sourcemap: 'sourcemap',
945
+ };
946
+ }
947
+ // eslint-disable-next-line camelcase
948
+ static from_obj_for_encoding(data) {
949
+ /* eslint-disable dot-notation */
950
+ if (typeof data['hash'] === 'undefined')
951
+ throw new Error(`Response is missing required field 'hash': ${data}`);
952
+ if (typeof data['result'] === 'undefined')
953
+ throw new Error(`Response is missing required field 'result': ${data}`);
954
+ return new CompileResponse({
955
+ hash: data['hash'],
956
+ result: data['result'],
957
+ sourcemap: data['sourcemap'],
958
+ });
959
+ /* eslint-enable dot-notation */
960
+ }
961
+ }
962
+ /**
963
+ * Teal disassembly Result
964
+ */
965
+ export class DisassembleResponse extends BaseModel {
966
+ /**
967
+ * Creates a new `DisassembleResponse` object.
968
+ * @param result - disassembled Teal code
969
+ */
970
+ constructor({ result }) {
971
+ super();
972
+ this.result = result;
973
+ this.attribute_map = {
974
+ result: 'result',
975
+ };
976
+ }
977
+ // eslint-disable-next-line camelcase
978
+ static from_obj_for_encoding(data) {
979
+ /* eslint-disable dot-notation */
980
+ if (typeof data['result'] === 'undefined')
981
+ throw new Error(`Response is missing required field 'result': ${data}`);
982
+ return new DisassembleResponse({
983
+ result: data['result'],
984
+ });
985
+ /* eslint-enable dot-notation */
986
+ }
987
+ }
988
+ /**
989
+ * Request data type for dryrun endpoint. Given the Transactions and simulated
990
+ * ledger state upload, run TEAL scripts and return debugging information.
991
+ */
992
+ export class DryrunRequest extends BaseModel {
993
+ /**
994
+ * Creates a new `DryrunRequest` object.
995
+ * @param accounts -
996
+ * @param apps -
997
+ * @param latestTimestamp - LatestTimestamp is available to some TEAL scripts. Defaults to the latest
998
+ * confirmed timestamp this algod is attached to.
999
+ * @param protocolVersion - ProtocolVersion specifies a specific version string to operate under, otherwise
1000
+ * whatever the current protocol of the network this algod is running in.
1001
+ * @param round - Round is available to some TEAL scripts. Defaults to the current round on the
1002
+ * network this algod is attached to.
1003
+ * @param sources -
1004
+ * @param txns -
1005
+ */
1006
+ constructor({ accounts, apps, latestTimestamp, protocolVersion, round, sources, txns, }) {
1007
+ super();
1008
+ this.accounts = accounts;
1009
+ this.apps = apps;
1010
+ this.latestTimestamp = latestTimestamp;
1011
+ this.protocolVersion = protocolVersion;
1012
+ this.round = round;
1013
+ this.sources = sources;
1014
+ this.txns = txns;
1015
+ this.attribute_map = {
1016
+ accounts: 'accounts',
1017
+ apps: 'apps',
1018
+ latestTimestamp: 'latest-timestamp',
1019
+ protocolVersion: 'protocol-version',
1020
+ round: 'round',
1021
+ sources: 'sources',
1022
+ txns: 'txns',
1023
+ };
1024
+ }
1025
+ // eslint-disable-next-line camelcase
1026
+ static from_obj_for_encoding(data) {
1027
+ /* eslint-disable dot-notation */
1028
+ if (!Array.isArray(data['accounts']))
1029
+ throw new Error(`Response is missing required array field 'accounts': ${data}`);
1030
+ if (!Array.isArray(data['apps']))
1031
+ throw new Error(`Response is missing required array field 'apps': ${data}`);
1032
+ if (typeof data['latest-timestamp'] === 'undefined')
1033
+ throw new Error(`Response is missing required field 'latest-timestamp': ${data}`);
1034
+ if (typeof data['protocol-version'] === 'undefined')
1035
+ throw new Error(`Response is missing required field 'protocol-version': ${data}`);
1036
+ if (typeof data['round'] === 'undefined')
1037
+ throw new Error(`Response is missing required field 'round': ${data}`);
1038
+ if (!Array.isArray(data['sources']))
1039
+ throw new Error(`Response is missing required array field 'sources': ${data}`);
1040
+ if (!Array.isArray(data['txns']))
1041
+ throw new Error(`Response is missing required array field 'txns': ${data}`);
1042
+ return new DryrunRequest({
1043
+ accounts: data['accounts'].map(Account.from_obj_for_encoding),
1044
+ apps: data['apps'].map(Application.from_obj_for_encoding),
1045
+ latestTimestamp: data['latest-timestamp'],
1046
+ protocolVersion: data['protocol-version'],
1047
+ round: data['round'],
1048
+ sources: data['sources'].map(DryrunSource.from_obj_for_encoding),
1049
+ txns: data['txns'],
1050
+ });
1051
+ /* eslint-enable dot-notation */
1052
+ }
1053
+ }
1054
+ /**
1055
+ * DryrunResponse contains per-txn debug information from a dryrun.
1056
+ */
1057
+ export class DryrunResponse extends BaseModel {
1058
+ /**
1059
+ * Creates a new `DryrunResponse` object.
1060
+ * @param error -
1061
+ * @param protocolVersion - Protocol version is the protocol version Dryrun was operated under.
1062
+ * @param txns -
1063
+ */
1064
+ constructor({ error, protocolVersion, txns, }) {
1065
+ super();
1066
+ this.error = error;
1067
+ this.protocolVersion = protocolVersion;
1068
+ this.txns = txns;
1069
+ this.attribute_map = {
1070
+ error: 'error',
1071
+ protocolVersion: 'protocol-version',
1072
+ txns: 'txns',
1073
+ };
1074
+ }
1075
+ // eslint-disable-next-line camelcase
1076
+ static from_obj_for_encoding(data) {
1077
+ /* eslint-disable dot-notation */
1078
+ if (typeof data['error'] === 'undefined')
1079
+ throw new Error(`Response is missing required field 'error': ${data}`);
1080
+ if (typeof data['protocol-version'] === 'undefined')
1081
+ throw new Error(`Response is missing required field 'protocol-version': ${data}`);
1082
+ if (!Array.isArray(data['txns']))
1083
+ throw new Error(`Response is missing required array field 'txns': ${data}`);
1084
+ return new DryrunResponse({
1085
+ error: data['error'],
1086
+ protocolVersion: data['protocol-version'],
1087
+ txns: data['txns'].map(DryrunTxnResult.from_obj_for_encoding),
1088
+ });
1089
+ /* eslint-enable dot-notation */
1090
+ }
1091
+ }
1092
+ /**
1093
+ * DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into
1094
+ * transactions or application state.
1095
+ */
1096
+ export class DryrunSource extends BaseModel {
1097
+ /**
1098
+ * Creates a new `DryrunSource` object.
1099
+ * @param fieldName - FieldName is what kind of sources this is. If lsig then it goes into the
1100
+ * transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the
1101
+ * Approval Program or Clear State Program of application[this.AppIndex].
1102
+ * @param source -
1103
+ * @param txnIndex -
1104
+ * @param appIndex -
1105
+ */
1106
+ constructor({ fieldName, source, txnIndex, appIndex, }) {
1107
+ super();
1108
+ this.fieldName = fieldName;
1109
+ this.source = source;
1110
+ this.txnIndex = txnIndex;
1111
+ this.appIndex = appIndex;
1112
+ this.attribute_map = {
1113
+ fieldName: 'field-name',
1114
+ source: 'source',
1115
+ txnIndex: 'txn-index',
1116
+ appIndex: 'app-index',
1117
+ };
1118
+ }
1119
+ // eslint-disable-next-line camelcase
1120
+ static from_obj_for_encoding(data) {
1121
+ /* eslint-disable dot-notation */
1122
+ if (typeof data['field-name'] === 'undefined')
1123
+ throw new Error(`Response is missing required field 'field-name': ${data}`);
1124
+ if (typeof data['source'] === 'undefined')
1125
+ throw new Error(`Response is missing required field 'source': ${data}`);
1126
+ if (typeof data['txn-index'] === 'undefined')
1127
+ throw new Error(`Response is missing required field 'txn-index': ${data}`);
1128
+ if (typeof data['app-index'] === 'undefined')
1129
+ throw new Error(`Response is missing required field 'app-index': ${data}`);
1130
+ return new DryrunSource({
1131
+ fieldName: data['field-name'],
1132
+ source: data['source'],
1133
+ txnIndex: data['txn-index'],
1134
+ appIndex: data['app-index'],
1135
+ });
1136
+ /* eslint-enable dot-notation */
1137
+ }
1138
+ }
1139
+ /**
1140
+ * Stores the TEAL eval step data
1141
+ */
1142
+ export class DryrunState extends BaseModel {
1143
+ /**
1144
+ * Creates a new `DryrunState` object.
1145
+ * @param line - Line number
1146
+ * @param pc - Program counter
1147
+ * @param stack -
1148
+ * @param error - Evaluation error if any
1149
+ * @param scratch -
1150
+ */
1151
+ constructor({ line, pc, stack, error, scratch, }) {
1152
+ super();
1153
+ this.line = line;
1154
+ this.pc = pc;
1155
+ this.stack = stack;
1156
+ this.error = error;
1157
+ this.scratch = scratch;
1158
+ this.attribute_map = {
1159
+ line: 'line',
1160
+ pc: 'pc',
1161
+ stack: 'stack',
1162
+ error: 'error',
1163
+ scratch: 'scratch',
1164
+ };
1165
+ }
1166
+ // eslint-disable-next-line camelcase
1167
+ static from_obj_for_encoding(data) {
1168
+ /* eslint-disable dot-notation */
1169
+ if (typeof data['line'] === 'undefined')
1170
+ throw new Error(`Response is missing required field 'line': ${data}`);
1171
+ if (typeof data['pc'] === 'undefined')
1172
+ throw new Error(`Response is missing required field 'pc': ${data}`);
1173
+ if (!Array.isArray(data['stack']))
1174
+ throw new Error(`Response is missing required array field 'stack': ${data}`);
1175
+ return new DryrunState({
1176
+ line: data['line'],
1177
+ pc: data['pc'],
1178
+ stack: data['stack'].map(TealValue.from_obj_for_encoding),
1179
+ error: data['error'],
1180
+ scratch: typeof data['scratch'] !== 'undefined'
1181
+ ? data['scratch'].map(TealValue.from_obj_for_encoding)
1182
+ : undefined,
1183
+ });
1184
+ /* eslint-enable dot-notation */
1185
+ }
1186
+ }
1187
+ /**
1188
+ * DryrunTxnResult contains any LogicSig or ApplicationCall program debug
1189
+ * information and state updates from a dryrun.
1190
+ */
1191
+ export class DryrunTxnResult extends BaseModel {
1192
+ /**
1193
+ * Creates a new `DryrunTxnResult` object.
1194
+ * @param disassembly - Disassembled program line by line.
1195
+ * @param appCallMessages -
1196
+ * @param appCallTrace -
1197
+ * @param budgetAdded - Budget added during execution of app call transaction.
1198
+ * @param budgetConsumed - Budget consumed during execution of app call transaction.
1199
+ * @param globalDelta - Application state delta.
1200
+ * @param localDeltas -
1201
+ * @param logicSigDisassembly - Disassembled lsig program line by line.
1202
+ * @param logicSigMessages -
1203
+ * @param logicSigTrace -
1204
+ * @param logs -
1205
+ */
1206
+ constructor({ disassembly, appCallMessages, appCallTrace, budgetAdded, budgetConsumed, globalDelta, localDeltas, logicSigDisassembly, logicSigMessages, logicSigTrace, logs, }) {
1207
+ super();
1208
+ this.disassembly = disassembly;
1209
+ this.appCallMessages = appCallMessages;
1210
+ this.appCallTrace = appCallTrace;
1211
+ this.budgetAdded = budgetAdded;
1212
+ this.budgetConsumed = budgetConsumed;
1213
+ this.globalDelta = globalDelta;
1214
+ this.localDeltas = localDeltas;
1215
+ this.logicSigDisassembly = logicSigDisassembly;
1216
+ this.logicSigMessages = logicSigMessages;
1217
+ this.logicSigTrace = logicSigTrace;
1218
+ this.logs = logs;
1219
+ this.attribute_map = {
1220
+ disassembly: 'disassembly',
1221
+ appCallMessages: 'app-call-messages',
1222
+ appCallTrace: 'app-call-trace',
1223
+ budgetAdded: 'budget-added',
1224
+ budgetConsumed: 'budget-consumed',
1225
+ globalDelta: 'global-delta',
1226
+ localDeltas: 'local-deltas',
1227
+ logicSigDisassembly: 'logic-sig-disassembly',
1228
+ logicSigMessages: 'logic-sig-messages',
1229
+ logicSigTrace: 'logic-sig-trace',
1230
+ logs: 'logs',
1231
+ };
1232
+ }
1233
+ // eslint-disable-next-line camelcase
1234
+ static from_obj_for_encoding(data) {
1235
+ /* eslint-disable dot-notation */
1236
+ if (!Array.isArray(data['disassembly']))
1237
+ throw new Error(`Response is missing required array field 'disassembly': ${data}`);
1238
+ return new DryrunTxnResult({
1239
+ disassembly: data['disassembly'],
1240
+ appCallMessages: data['app-call-messages'],
1241
+ appCallTrace: typeof data['app-call-trace'] !== 'undefined'
1242
+ ? data['app-call-trace'].map(DryrunState.from_obj_for_encoding)
1243
+ : undefined,
1244
+ budgetAdded: data['budget-added'],
1245
+ budgetConsumed: data['budget-consumed'],
1246
+ globalDelta: typeof data['global-delta'] !== 'undefined'
1247
+ ? data['global-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
1248
+ : undefined,
1249
+ localDeltas: typeof data['local-deltas'] !== 'undefined'
1250
+ ? data['local-deltas'].map(AccountStateDelta.from_obj_for_encoding)
1251
+ : undefined,
1252
+ logicSigDisassembly: data['logic-sig-disassembly'],
1253
+ logicSigMessages: data['logic-sig-messages'],
1254
+ logicSigTrace: typeof data['logic-sig-trace'] !== 'undefined'
1255
+ ? data['logic-sig-trace'].map(DryrunState.from_obj_for_encoding)
1256
+ : undefined,
1257
+ logs: data['logs'],
1258
+ });
1259
+ /* eslint-enable dot-notation */
1260
+ }
1261
+ }
1262
+ /**
1263
+ * An error response with optional data field.
1264
+ */
1265
+ export class ErrorResponse extends BaseModel {
1266
+ /**
1267
+ * Creates a new `ErrorResponse` object.
1268
+ * @param message -
1269
+ * @param data -
1270
+ */
1271
+ constructor({ message, data, }) {
1272
+ super();
1273
+ this.message = message;
1274
+ this.data = data;
1275
+ this.attribute_map = {
1276
+ message: 'message',
1277
+ data: 'data',
1278
+ };
1279
+ }
1280
+ // eslint-disable-next-line camelcase
1281
+ static from_obj_for_encoding(data) {
1282
+ /* eslint-disable dot-notation */
1283
+ if (typeof data['message'] === 'undefined')
1284
+ throw new Error(`Response is missing required field 'message': ${data}`);
1285
+ return new ErrorResponse({
1286
+ message: data['message'],
1287
+ data: data['data'],
1288
+ });
1289
+ /* eslint-enable dot-notation */
1290
+ }
1291
+ }
1292
+ /**
1293
+ * Represents a TEAL value delta.
1294
+ */
1295
+ export class EvalDelta extends BaseModel {
1296
+ /**
1297
+ * Creates a new `EvalDelta` object.
1298
+ * @param action - (at) delta action.
1299
+ * @param bytes - (bs) bytes value.
1300
+ * @param uint - (ui) uint value.
1301
+ */
1302
+ constructor({ action, bytes, uint, }) {
1303
+ super();
1304
+ this.action = action;
1305
+ this.bytes = bytes;
1306
+ this.uint = uint;
1307
+ this.attribute_map = {
1308
+ action: 'action',
1309
+ bytes: 'bytes',
1310
+ uint: 'uint',
1311
+ };
1312
+ }
1313
+ // eslint-disable-next-line camelcase
1314
+ static from_obj_for_encoding(data) {
1315
+ /* eslint-disable dot-notation */
1316
+ if (typeof data['action'] === 'undefined')
1317
+ throw new Error(`Response is missing required field 'action': ${data}`);
1318
+ return new EvalDelta({
1319
+ action: data['action'],
1320
+ bytes: data['bytes'],
1321
+ uint: data['uint'],
1322
+ });
1323
+ /* eslint-enable dot-notation */
1324
+ }
1325
+ }
1326
+ /**
1327
+ * Key-value pairs for StateDelta.
1328
+ */
1329
+ export class EvalDeltaKeyValue extends BaseModel {
1330
+ /**
1331
+ * Creates a new `EvalDeltaKeyValue` object.
1332
+ * @param key -
1333
+ * @param value - Represents a TEAL value delta.
1334
+ */
1335
+ constructor({ key, value }) {
1336
+ super();
1337
+ this.key = key;
1338
+ this.value = value;
1339
+ this.attribute_map = {
1340
+ key: 'key',
1341
+ value: 'value',
1342
+ };
1343
+ }
1344
+ // eslint-disable-next-line camelcase
1345
+ static from_obj_for_encoding(data) {
1346
+ /* eslint-disable dot-notation */
1347
+ if (typeof data['key'] === 'undefined')
1348
+ throw new Error(`Response is missing required field 'key': ${data}`);
1349
+ if (typeof data['value'] === 'undefined')
1350
+ throw new Error(`Response is missing required field 'value': ${data}`);
1351
+ return new EvalDeltaKeyValue({
1352
+ key: data['key'],
1353
+ value: EvalDelta.from_obj_for_encoding(data['value']),
1354
+ });
1355
+ /* eslint-enable dot-notation */
1356
+ }
1357
+ }
1358
+ /**
1359
+ * Proof of membership and position of a light block header.
1360
+ */
1361
+ export class LightBlockHeaderProof extends BaseModel {
1362
+ /**
1363
+ * Creates a new `LightBlockHeaderProof` object.
1364
+ * @param index - The index of the light block header in the vector commitment tree
1365
+ * @param proof - The encoded proof.
1366
+ * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
1367
+ * from a leaf to the root.
1368
+ */
1369
+ constructor({ index, proof, treedepth, }) {
1370
+ super();
1371
+ this.index = index;
1372
+ this.proof =
1373
+ typeof proof === 'string'
1374
+ ? new Uint8Array(Buffer.from(proof, 'base64'))
1375
+ : proof;
1376
+ this.treedepth = treedepth;
1377
+ this.attribute_map = {
1378
+ index: 'index',
1379
+ proof: 'proof',
1380
+ treedepth: 'treedepth',
1381
+ };
1382
+ }
1383
+ // eslint-disable-next-line camelcase
1384
+ static from_obj_for_encoding(data) {
1385
+ /* eslint-disable dot-notation */
1386
+ if (typeof data['index'] === 'undefined')
1387
+ throw new Error(`Response is missing required field 'index': ${data}`);
1388
+ if (typeof data['proof'] === 'undefined')
1389
+ throw new Error(`Response is missing required field 'proof': ${data}`);
1390
+ if (typeof data['treedepth'] === 'undefined')
1391
+ throw new Error(`Response is missing required field 'treedepth': ${data}`);
1392
+ return new LightBlockHeaderProof({
1393
+ index: data['index'],
1394
+ proof: data['proof'],
1395
+ treedepth: data['treedepth'],
1396
+ });
1397
+ /* eslint-enable dot-notation */
1398
+ }
1399
+ }
1400
+ /**
1401
+ *
1402
+ */
1403
+ export class NodeStatusResponse extends BaseModel {
1404
+ /**
1405
+ * Creates a new `NodeStatusResponse` object.
1406
+ * @param catchupTime - CatchupTime in nanoseconds
1407
+ * @param lastRound - LastRound indicates the last round seen
1408
+ * @param lastVersion - LastVersion indicates the last consensus version supported
1409
+ * @param nextVersion - NextVersion of consensus protocol to use
1410
+ * @param nextVersionRound - NextVersionRound is the round at which the next consensus version will apply
1411
+ * @param nextVersionSupported - NextVersionSupported indicates whether the next consensus version is supported
1412
+ * by this node
1413
+ * @param stoppedAtUnsupportedRound - StoppedAtUnsupportedRound indicates that the node does not support the new
1414
+ * rounds and has stopped making progress
1415
+ * @param timeSinceLastRound - TimeSinceLastRound in nanoseconds
1416
+ * @param catchpoint - The current catchpoint that is being caught up to
1417
+ * @param catchpointAcquiredBlocks - The number of blocks that have already been obtained by the node as part of the
1418
+ * catchup
1419
+ * @param catchpointProcessedAccounts - The number of accounts from the current catchpoint that have been processed so
1420
+ * far as part of the catchup
1421
+ * @param catchpointProcessedKvs - The number of key-values (KVs) from the current catchpoint that have been
1422
+ * processed so far as part of the catchup
1423
+ * @param catchpointTotalAccounts - The total number of accounts included in the current catchpoint
1424
+ * @param catchpointTotalBlocks - The total number of blocks that are required to complete the current catchpoint
1425
+ * catchup
1426
+ * @param catchpointTotalKvs - The total number of key-values (KVs) included in the current catchpoint
1427
+ * @param catchpointVerifiedAccounts - The number of accounts from the current catchpoint that have been verified so
1428
+ * far as part of the catchup
1429
+ * @param catchpointVerifiedKvs - The number of key-values (KVs) from the current catchpoint that have been
1430
+ * verified so far as part of the catchup
1431
+ * @param lastCatchpoint - The last catchpoint seen by the node
1432
+ */
1433
+ constructor({ catchupTime, lastRound, lastVersion, nextVersion, nextVersionRound, nextVersionSupported, stoppedAtUnsupportedRound, timeSinceLastRound, catchpoint, catchpointAcquiredBlocks, catchpointProcessedAccounts, catchpointProcessedKvs, catchpointTotalAccounts, catchpointTotalBlocks, catchpointTotalKvs, catchpointVerifiedAccounts, catchpointVerifiedKvs, lastCatchpoint, }) {
1434
+ super();
1435
+ this.catchupTime = catchupTime;
1436
+ this.lastRound = lastRound;
1437
+ this.lastVersion = lastVersion;
1438
+ this.nextVersion = nextVersion;
1439
+ this.nextVersionRound = nextVersionRound;
1440
+ this.nextVersionSupported = nextVersionSupported;
1441
+ this.stoppedAtUnsupportedRound = stoppedAtUnsupportedRound;
1442
+ this.timeSinceLastRound = timeSinceLastRound;
1443
+ this.catchpoint = catchpoint;
1444
+ this.catchpointAcquiredBlocks = catchpointAcquiredBlocks;
1445
+ this.catchpointProcessedAccounts = catchpointProcessedAccounts;
1446
+ this.catchpointProcessedKvs = catchpointProcessedKvs;
1447
+ this.catchpointTotalAccounts = catchpointTotalAccounts;
1448
+ this.catchpointTotalBlocks = catchpointTotalBlocks;
1449
+ this.catchpointTotalKvs = catchpointTotalKvs;
1450
+ this.catchpointVerifiedAccounts = catchpointVerifiedAccounts;
1451
+ this.catchpointVerifiedKvs = catchpointVerifiedKvs;
1452
+ this.lastCatchpoint = lastCatchpoint;
1453
+ this.attribute_map = {
1454
+ catchupTime: 'catchup-time',
1455
+ lastRound: 'last-round',
1456
+ lastVersion: 'last-version',
1457
+ nextVersion: 'next-version',
1458
+ nextVersionRound: 'next-version-round',
1459
+ nextVersionSupported: 'next-version-supported',
1460
+ stoppedAtUnsupportedRound: 'stopped-at-unsupported-round',
1461
+ timeSinceLastRound: 'time-since-last-round',
1462
+ catchpoint: 'catchpoint',
1463
+ catchpointAcquiredBlocks: 'catchpoint-acquired-blocks',
1464
+ catchpointProcessedAccounts: 'catchpoint-processed-accounts',
1465
+ catchpointProcessedKvs: 'catchpoint-processed-kvs',
1466
+ catchpointTotalAccounts: 'catchpoint-total-accounts',
1467
+ catchpointTotalBlocks: 'catchpoint-total-blocks',
1468
+ catchpointTotalKvs: 'catchpoint-total-kvs',
1469
+ catchpointVerifiedAccounts: 'catchpoint-verified-accounts',
1470
+ catchpointVerifiedKvs: 'catchpoint-verified-kvs',
1471
+ lastCatchpoint: 'last-catchpoint',
1472
+ };
1473
+ }
1474
+ // eslint-disable-next-line camelcase
1475
+ static from_obj_for_encoding(data) {
1476
+ /* eslint-disable dot-notation */
1477
+ if (typeof data['catchup-time'] === 'undefined')
1478
+ throw new Error(`Response is missing required field 'catchup-time': ${data}`);
1479
+ if (typeof data['last-round'] === 'undefined')
1480
+ throw new Error(`Response is missing required field 'last-round': ${data}`);
1481
+ if (typeof data['last-version'] === 'undefined')
1482
+ throw new Error(`Response is missing required field 'last-version': ${data}`);
1483
+ if (typeof data['next-version'] === 'undefined')
1484
+ throw new Error(`Response is missing required field 'next-version': ${data}`);
1485
+ if (typeof data['next-version-round'] === 'undefined')
1486
+ throw new Error(`Response is missing required field 'next-version-round': ${data}`);
1487
+ if (typeof data['next-version-supported'] === 'undefined')
1488
+ throw new Error(`Response is missing required field 'next-version-supported': ${data}`);
1489
+ if (typeof data['stopped-at-unsupported-round'] === 'undefined')
1490
+ throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${data}`);
1491
+ if (typeof data['time-since-last-round'] === 'undefined')
1492
+ throw new Error(`Response is missing required field 'time-since-last-round': ${data}`);
1493
+ return new NodeStatusResponse({
1494
+ catchupTime: data['catchup-time'],
1495
+ lastRound: data['last-round'],
1496
+ lastVersion: data['last-version'],
1497
+ nextVersion: data['next-version'],
1498
+ nextVersionRound: data['next-version-round'],
1499
+ nextVersionSupported: data['next-version-supported'],
1500
+ stoppedAtUnsupportedRound: data['stopped-at-unsupported-round'],
1501
+ timeSinceLastRound: data['time-since-last-round'],
1502
+ catchpoint: data['catchpoint'],
1503
+ catchpointAcquiredBlocks: data['catchpoint-acquired-blocks'],
1504
+ catchpointProcessedAccounts: data['catchpoint-processed-accounts'],
1505
+ catchpointProcessedKvs: data['catchpoint-processed-kvs'],
1506
+ catchpointTotalAccounts: data['catchpoint-total-accounts'],
1507
+ catchpointTotalBlocks: data['catchpoint-total-blocks'],
1508
+ catchpointTotalKvs: data['catchpoint-total-kvs'],
1509
+ catchpointVerifiedAccounts: data['catchpoint-verified-accounts'],
1510
+ catchpointVerifiedKvs: data['catchpoint-verified-kvs'],
1511
+ lastCatchpoint: data['last-catchpoint'],
1512
+ });
1513
+ /* eslint-enable dot-notation */
1514
+ }
1515
+ }
1516
+ /**
1517
+ * Details about a pending transaction. If the transaction was recently confirmed,
1518
+ * includes confirmation details like the round and reward details.
1519
+ */
1520
+ export class PendingTransactionResponse extends BaseModel {
1521
+ /**
1522
+ * Creates a new `PendingTransactionResponse` object.
1523
+ * @param poolError - Indicates that the transaction was kicked out of this node's transaction pool
1524
+ * (and specifies why that happened). An empty string indicates the transaction
1525
+ * wasn't kicked out of this node's txpool due to an error.
1526
+ * @param txn - The raw signed transaction.
1527
+ * @param applicationIndex - The application index if the transaction was found and it created an
1528
+ * application.
1529
+ * @param assetClosingAmount - The number of the asset's unit that were transferred to the close-to address.
1530
+ * @param assetIndex - The asset index if the transaction was found and it created an asset.
1531
+ * @param closeRewards - Rewards in microalgos applied to the close remainder to account.
1532
+ * @param closingAmount - Closing amount for the transaction.
1533
+ * @param confirmedRound - The round where this transaction was confirmed, if present.
1534
+ * @param globalStateDelta - (gd) Global state key/value changes for the application being executed by this
1535
+ * transaction.
1536
+ * @param innerTxns - Inner transactions produced by application execution.
1537
+ * @param localStateDelta - (ld) Local state key/value changes for the application being executed by this
1538
+ * transaction.
1539
+ * @param logs - (lg) Logs for the application being executed by this transaction.
1540
+ * @param receiverRewards - Rewards in microalgos applied to the receiver account.
1541
+ * @param senderRewards - Rewards in microalgos applied to the sender account.
1542
+ */
1543
+ constructor({ poolError, txn, applicationIndex, assetClosingAmount, assetIndex, closeRewards, closingAmount, confirmedRound, globalStateDelta, innerTxns, localStateDelta, logs, receiverRewards, senderRewards, }) {
1544
+ super();
1545
+ this.poolError = poolError;
1546
+ this.txn = txn;
1547
+ this.applicationIndex = applicationIndex;
1548
+ this.assetClosingAmount = assetClosingAmount;
1549
+ this.assetIndex = assetIndex;
1550
+ this.closeRewards = closeRewards;
1551
+ this.closingAmount = closingAmount;
1552
+ this.confirmedRound = confirmedRound;
1553
+ this.globalStateDelta = globalStateDelta;
1554
+ this.innerTxns = innerTxns;
1555
+ this.localStateDelta = localStateDelta;
1556
+ this.logs = logs;
1557
+ this.receiverRewards = receiverRewards;
1558
+ this.senderRewards = senderRewards;
1559
+ this.attribute_map = {
1560
+ poolError: 'pool-error',
1561
+ txn: 'txn',
1562
+ applicationIndex: 'application-index',
1563
+ assetClosingAmount: 'asset-closing-amount',
1564
+ assetIndex: 'asset-index',
1565
+ closeRewards: 'close-rewards',
1566
+ closingAmount: 'closing-amount',
1567
+ confirmedRound: 'confirmed-round',
1568
+ globalStateDelta: 'global-state-delta',
1569
+ innerTxns: 'inner-txns',
1570
+ localStateDelta: 'local-state-delta',
1571
+ logs: 'logs',
1572
+ receiverRewards: 'receiver-rewards',
1573
+ senderRewards: 'sender-rewards',
1574
+ };
1575
+ }
1576
+ // eslint-disable-next-line camelcase
1577
+ static from_obj_for_encoding(data) {
1578
+ /* eslint-disable dot-notation */
1579
+ if (typeof data['pool-error'] === 'undefined')
1580
+ throw new Error(`Response is missing required field 'pool-error': ${data}`);
1581
+ if (typeof data['txn'] === 'undefined')
1582
+ throw new Error(`Response is missing required field 'txn': ${data}`);
1583
+ return new PendingTransactionResponse({
1584
+ poolError: data['pool-error'],
1585
+ txn: data['txn'],
1586
+ applicationIndex: data['application-index'],
1587
+ assetClosingAmount: data['asset-closing-amount'],
1588
+ assetIndex: data['asset-index'],
1589
+ closeRewards: data['close-rewards'],
1590
+ closingAmount: data['closing-amount'],
1591
+ confirmedRound: data['confirmed-round'],
1592
+ globalStateDelta: typeof data['global-state-delta'] !== 'undefined'
1593
+ ? data['global-state-delta'].map(EvalDeltaKeyValue.from_obj_for_encoding)
1594
+ : undefined,
1595
+ innerTxns: typeof data['inner-txns'] !== 'undefined'
1596
+ ? data['inner-txns'].map(PendingTransactionResponse.from_obj_for_encoding)
1597
+ : undefined,
1598
+ localStateDelta: typeof data['local-state-delta'] !== 'undefined'
1599
+ ? data['local-state-delta'].map(AccountStateDelta.from_obj_for_encoding)
1600
+ : undefined,
1601
+ logs: data['logs'],
1602
+ receiverRewards: data['receiver-rewards'],
1603
+ senderRewards: data['sender-rewards'],
1604
+ });
1605
+ /* eslint-enable dot-notation */
1606
+ }
1607
+ }
1608
+ /**
1609
+ * A potentially truncated list of transactions currently in the node's transaction
1610
+ * pool. You can compute whether or not the list is truncated if the number of
1611
+ * elements in the **top-transactions** array is fewer than **total-transactions**.
1612
+ */
1613
+ export class PendingTransactionsResponse extends BaseModel {
1614
+ /**
1615
+ * Creates a new `PendingTransactionsResponse` object.
1616
+ * @param topTransactions - An array of signed transaction objects.
1617
+ * @param totalTransactions - Total number of transactions in the pool.
1618
+ */
1619
+ constructor({ topTransactions, totalTransactions, }) {
1620
+ super();
1621
+ this.topTransactions = topTransactions;
1622
+ this.totalTransactions = totalTransactions;
1623
+ this.attribute_map = {
1624
+ topTransactions: 'top-transactions',
1625
+ totalTransactions: 'total-transactions',
1626
+ };
1627
+ }
1628
+ // eslint-disable-next-line camelcase
1629
+ static from_obj_for_encoding(data) {
1630
+ /* eslint-disable dot-notation */
1631
+ if (!Array.isArray(data['top-transactions']))
1632
+ throw new Error(`Response is missing required array field 'top-transactions': ${data}`);
1633
+ if (typeof data['total-transactions'] === 'undefined')
1634
+ throw new Error(`Response is missing required field 'total-transactions': ${data}`);
1635
+ return new PendingTransactionsResponse({
1636
+ topTransactions: data['top-transactions'],
1637
+ totalTransactions: data['total-transactions'],
1638
+ });
1639
+ /* eslint-enable dot-notation */
1640
+ }
1641
+ }
1642
+ /**
1643
+ * Transaction ID of the submission.
1644
+ */
1645
+ export class PostTransactionsResponse extends BaseModel {
1646
+ /**
1647
+ * Creates a new `PostTransactionsResponse` object.
1648
+ * @param txid - encoding of the transaction hash.
1649
+ */
1650
+ constructor({ txid }) {
1651
+ super();
1652
+ this.txid = txid;
1653
+ this.attribute_map = {
1654
+ txid: 'txId',
1655
+ };
1656
+ }
1657
+ // eslint-disable-next-line camelcase
1658
+ static from_obj_for_encoding(data) {
1659
+ /* eslint-disable dot-notation */
1660
+ if (typeof data['txId'] === 'undefined')
1661
+ throw new Error(`Response is missing required field 'txId': ${data}`);
1662
+ return new PostTransactionsResponse({
1663
+ txid: data['txId'],
1664
+ });
1665
+ /* eslint-enable dot-notation */
1666
+ }
1667
+ }
1668
+ /**
1669
+ * Represents a state proof and its corresponding message
1670
+ */
1671
+ export class StateProof extends BaseModel {
1672
+ /**
1673
+ * Creates a new `StateProof` object.
1674
+ * @param message - Represents the message that the state proofs are attesting to.
1675
+ * @param stateproof - The encoded StateProof for the message.
1676
+ */
1677
+ constructor({ message, stateproof, }) {
1678
+ super();
1679
+ this.message = message;
1680
+ this.stateproof =
1681
+ typeof stateproof === 'string'
1682
+ ? new Uint8Array(Buffer.from(stateproof, 'base64'))
1683
+ : stateproof;
1684
+ this.attribute_map = {
1685
+ message: 'Message',
1686
+ stateproof: 'StateProof',
1687
+ };
1688
+ }
1689
+ // eslint-disable-next-line camelcase
1690
+ static from_obj_for_encoding(data) {
1691
+ /* eslint-disable dot-notation */
1692
+ if (typeof data['Message'] === 'undefined')
1693
+ throw new Error(`Response is missing required field 'Message': ${data}`);
1694
+ if (typeof data['StateProof'] === 'undefined')
1695
+ throw new Error(`Response is missing required field 'StateProof': ${data}`);
1696
+ return new StateProof({
1697
+ message: StateProofMessage.from_obj_for_encoding(data['Message']),
1698
+ stateproof: data['StateProof'],
1699
+ });
1700
+ /* eslint-enable dot-notation */
1701
+ }
1702
+ }
1703
+ /**
1704
+ * Represents the message that the state proofs are attesting to.
1705
+ */
1706
+ export class StateProofMessage extends BaseModel {
1707
+ /**
1708
+ * Creates a new `StateProofMessage` object.
1709
+ * @param blockheaderscommitment - The vector commitment root on all light block headers within a state proof
1710
+ * interval.
1711
+ * @param firstattestedround - The first round the message attests to.
1712
+ * @param lastattestedround - The last round the message attests to.
1713
+ * @param lnprovenweight - An integer value representing the natural log of the proven weight with 16 bits
1714
+ * of precision. This value would be used to verify the next state proof.
1715
+ * @param voterscommitment - The vector commitment root of the top N accounts to sign the next StateProof.
1716
+ */
1717
+ constructor({ blockheaderscommitment, firstattestedround, lastattestedround, lnprovenweight, voterscommitment, }) {
1718
+ super();
1719
+ this.blockheaderscommitment =
1720
+ typeof blockheaderscommitment === 'string'
1721
+ ? new Uint8Array(Buffer.from(blockheaderscommitment, 'base64'))
1722
+ : blockheaderscommitment;
1723
+ this.firstattestedround = firstattestedround;
1724
+ this.lastattestedround = lastattestedround;
1725
+ this.lnprovenweight = lnprovenweight;
1726
+ this.voterscommitment =
1727
+ typeof voterscommitment === 'string'
1728
+ ? new Uint8Array(Buffer.from(voterscommitment, 'base64'))
1729
+ : voterscommitment;
1730
+ this.attribute_map = {
1731
+ blockheaderscommitment: 'BlockHeadersCommitment',
1732
+ firstattestedround: 'FirstAttestedRound',
1733
+ lastattestedround: 'LastAttestedRound',
1734
+ lnprovenweight: 'LnProvenWeight',
1735
+ voterscommitment: 'VotersCommitment',
1736
+ };
1737
+ }
1738
+ // eslint-disable-next-line camelcase
1739
+ static from_obj_for_encoding(data) {
1740
+ /* eslint-disable dot-notation */
1741
+ if (typeof data['BlockHeadersCommitment'] === 'undefined')
1742
+ throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${data}`);
1743
+ if (typeof data['FirstAttestedRound'] === 'undefined')
1744
+ throw new Error(`Response is missing required field 'FirstAttestedRound': ${data}`);
1745
+ if (typeof data['LastAttestedRound'] === 'undefined')
1746
+ throw new Error(`Response is missing required field 'LastAttestedRound': ${data}`);
1747
+ if (typeof data['LnProvenWeight'] === 'undefined')
1748
+ throw new Error(`Response is missing required field 'LnProvenWeight': ${data}`);
1749
+ if (typeof data['VotersCommitment'] === 'undefined')
1750
+ throw new Error(`Response is missing required field 'VotersCommitment': ${data}`);
1751
+ return new StateProofMessage({
1752
+ blockheaderscommitment: data['BlockHeadersCommitment'],
1753
+ firstattestedround: data['FirstAttestedRound'],
1754
+ lastattestedround: data['LastAttestedRound'],
1755
+ lnprovenweight: data['LnProvenWeight'],
1756
+ voterscommitment: data['VotersCommitment'],
1757
+ });
1758
+ /* eslint-enable dot-notation */
1759
+ }
1760
+ }
1761
+ /**
1762
+ * Supply represents the current supply of MicroAlgos in the system.
1763
+ */
1764
+ export class SupplyResponse extends BaseModel {
1765
+ /**
1766
+ * Creates a new `SupplyResponse` object.
1767
+ * @param currentRound - Round
1768
+ * @param onlineMoney - OnlineMoney
1769
+ * @param totalMoney - TotalMoney
1770
+ */
1771
+ constructor({ currentRound, onlineMoney, totalMoney, }) {
1772
+ super();
1773
+ this.currentRound = currentRound;
1774
+ this.onlineMoney = onlineMoney;
1775
+ this.totalMoney = totalMoney;
1776
+ this.attribute_map = {
1777
+ currentRound: 'current_round',
1778
+ onlineMoney: 'online-money',
1779
+ totalMoney: 'total-money',
1780
+ };
1781
+ }
1782
+ // eslint-disable-next-line camelcase
1783
+ static from_obj_for_encoding(data) {
1784
+ /* eslint-disable dot-notation */
1785
+ if (typeof data['current_round'] === 'undefined')
1786
+ throw new Error(`Response is missing required field 'current_round': ${data}`);
1787
+ if (typeof data['online-money'] === 'undefined')
1788
+ throw new Error(`Response is missing required field 'online-money': ${data}`);
1789
+ if (typeof data['total-money'] === 'undefined')
1790
+ throw new Error(`Response is missing required field 'total-money': ${data}`);
1791
+ return new SupplyResponse({
1792
+ currentRound: data['current_round'],
1793
+ onlineMoney: data['online-money'],
1794
+ totalMoney: data['total-money'],
1795
+ });
1796
+ /* eslint-enable dot-notation */
1797
+ }
1798
+ }
1799
+ /**
1800
+ * Represents a key-value pair in an application store.
1801
+ */
1802
+ export class TealKeyValue extends BaseModel {
1803
+ /**
1804
+ * Creates a new `TealKeyValue` object.
1805
+ * @param key -
1806
+ * @param value - Represents a TEAL value.
1807
+ */
1808
+ constructor({ key, value }) {
1809
+ super();
1810
+ this.key = key;
1811
+ this.value = value;
1812
+ this.attribute_map = {
1813
+ key: 'key',
1814
+ value: 'value',
1815
+ };
1816
+ }
1817
+ // eslint-disable-next-line camelcase
1818
+ static from_obj_for_encoding(data) {
1819
+ /* eslint-disable dot-notation */
1820
+ if (typeof data['key'] === 'undefined')
1821
+ throw new Error(`Response is missing required field 'key': ${data}`);
1822
+ if (typeof data['value'] === 'undefined')
1823
+ throw new Error(`Response is missing required field 'value': ${data}`);
1824
+ return new TealKeyValue({
1825
+ key: data['key'],
1826
+ value: TealValue.from_obj_for_encoding(data['value']),
1827
+ });
1828
+ /* eslint-enable dot-notation */
1829
+ }
1830
+ }
1831
+ /**
1832
+ * Represents a TEAL value.
1833
+ */
1834
+ export class TealValue extends BaseModel {
1835
+ /**
1836
+ * Creates a new `TealValue` object.
1837
+ * @param type - (tt) value type. Value `1` refers to **bytes**, value `2` refers to **uint**
1838
+ * @param bytes - (tb) bytes value.
1839
+ * @param uint - (ui) uint value.
1840
+ */
1841
+ constructor({ type, bytes, uint, }) {
1842
+ super();
1843
+ this.type = type;
1844
+ this.bytes = bytes;
1845
+ this.uint = uint;
1846
+ this.attribute_map = {
1847
+ type: 'type',
1848
+ bytes: 'bytes',
1849
+ uint: 'uint',
1850
+ };
1851
+ }
1852
+ // eslint-disable-next-line camelcase
1853
+ static from_obj_for_encoding(data) {
1854
+ /* eslint-disable dot-notation */
1855
+ if (typeof data['type'] === 'undefined')
1856
+ throw new Error(`Response is missing required field 'type': ${data}`);
1857
+ if (typeof data['bytes'] === 'undefined')
1858
+ throw new Error(`Response is missing required field 'bytes': ${data}`);
1859
+ if (typeof data['uint'] === 'undefined')
1860
+ throw new Error(`Response is missing required field 'uint': ${data}`);
1861
+ return new TealValue({
1862
+ type: data['type'],
1863
+ bytes: data['bytes'],
1864
+ uint: data['uint'],
1865
+ });
1866
+ /* eslint-enable dot-notation */
1867
+ }
1868
+ }
1869
+ /**
1870
+ * TransactionParams contains the parameters that help a client construct a new
1871
+ * transaction.
1872
+ */
1873
+ export class TransactionParametersResponse extends BaseModel {
1874
+ /**
1875
+ * Creates a new `TransactionParametersResponse` object.
1876
+ * @param consensusVersion - ConsensusVersion indicates the consensus protocol version
1877
+ * as of LastRound.
1878
+ * @param fee - Fee is the suggested transaction fee
1879
+ * Fee is in units of micro-Algos per byte.
1880
+ * Fee may fall to zero but transactions must still have a fee of
1881
+ * at least MinTxnFee for the current network protocol.
1882
+ * @param genesisHash - GenesisHash is the hash of the genesis block.
1883
+ * @param genesisId - GenesisID is an ID listed in the genesis block.
1884
+ * @param lastRound - LastRound indicates the last round seen
1885
+ * @param minFee - The minimum transaction fee (not per byte) required for the
1886
+ * txn to validate for the current network protocol.
1887
+ */
1888
+ constructor({ consensusVersion, fee, genesisHash, genesisId, lastRound, minFee, }) {
1889
+ super();
1890
+ this.consensusVersion = consensusVersion;
1891
+ this.fee = fee;
1892
+ this.genesisHash =
1893
+ typeof genesisHash === 'string'
1894
+ ? new Uint8Array(Buffer.from(genesisHash, 'base64'))
1895
+ : genesisHash;
1896
+ this.genesisId = genesisId;
1897
+ this.lastRound = lastRound;
1898
+ this.minFee = minFee;
1899
+ this.attribute_map = {
1900
+ consensusVersion: 'consensus-version',
1901
+ fee: 'fee',
1902
+ genesisHash: 'genesis-hash',
1903
+ genesisId: 'genesis-id',
1904
+ lastRound: 'last-round',
1905
+ minFee: 'min-fee',
1906
+ };
1907
+ }
1908
+ // eslint-disable-next-line camelcase
1909
+ static from_obj_for_encoding(data) {
1910
+ /* eslint-disable dot-notation */
1911
+ if (typeof data['consensus-version'] === 'undefined')
1912
+ throw new Error(`Response is missing required field 'consensus-version': ${data}`);
1913
+ if (typeof data['fee'] === 'undefined')
1914
+ throw new Error(`Response is missing required field 'fee': ${data}`);
1915
+ if (typeof data['genesis-hash'] === 'undefined')
1916
+ throw new Error(`Response is missing required field 'genesis-hash': ${data}`);
1917
+ if (typeof data['genesis-id'] === 'undefined')
1918
+ throw new Error(`Response is missing required field 'genesis-id': ${data}`);
1919
+ if (typeof data['last-round'] === 'undefined')
1920
+ throw new Error(`Response is missing required field 'last-round': ${data}`);
1921
+ if (typeof data['min-fee'] === 'undefined')
1922
+ throw new Error(`Response is missing required field 'min-fee': ${data}`);
1923
+ return new TransactionParametersResponse({
1924
+ consensusVersion: data['consensus-version'],
1925
+ fee: data['fee'],
1926
+ genesisHash: data['genesis-hash'],
1927
+ genesisId: data['genesis-id'],
1928
+ lastRound: data['last-round'],
1929
+ minFee: data['min-fee'],
1930
+ });
1931
+ /* eslint-enable dot-notation */
1932
+ }
1933
+ }
1934
+ /**
1935
+ * Proof of transaction in a block.
1936
+ */
1937
+ export class TransactionProofResponse extends BaseModel {
1938
+ /**
1939
+ * Creates a new `TransactionProofResponse` object.
1940
+ * @param idx - Index of the transaction in the block's payset.
1941
+ * @param proof - Proof of transaction membership.
1942
+ * @param stibhash - Hash of SignedTxnInBlock for verifying proof.
1943
+ * @param treedepth - Represents the depth of the tree that is being proven, i.e. the number of edges
1944
+ * from a leaf to the root.
1945
+ * @param hashtype - The type of hash function used to create the proof, must be one of:
1946
+ * * sha512_256
1947
+ * * sha256
1948
+ */
1949
+ constructor({ idx, proof, stibhash, treedepth, hashtype, }) {
1950
+ super();
1951
+ this.idx = idx;
1952
+ this.proof =
1953
+ typeof proof === 'string'
1954
+ ? new Uint8Array(Buffer.from(proof, 'base64'))
1955
+ : proof;
1956
+ this.stibhash =
1957
+ typeof stibhash === 'string'
1958
+ ? new Uint8Array(Buffer.from(stibhash, 'base64'))
1959
+ : stibhash;
1960
+ this.treedepth = treedepth;
1961
+ this.hashtype = hashtype;
1962
+ this.attribute_map = {
1963
+ idx: 'idx',
1964
+ proof: 'proof',
1965
+ stibhash: 'stibhash',
1966
+ treedepth: 'treedepth',
1967
+ hashtype: 'hashtype',
1968
+ };
1969
+ }
1970
+ // eslint-disable-next-line camelcase
1971
+ static from_obj_for_encoding(data) {
1972
+ /* eslint-disable dot-notation */
1973
+ if (typeof data['idx'] === 'undefined')
1974
+ throw new Error(`Response is missing required field 'idx': ${data}`);
1975
+ if (typeof data['proof'] === 'undefined')
1976
+ throw new Error(`Response is missing required field 'proof': ${data}`);
1977
+ if (typeof data['stibhash'] === 'undefined')
1978
+ throw new Error(`Response is missing required field 'stibhash': ${data}`);
1979
+ if (typeof data['treedepth'] === 'undefined')
1980
+ throw new Error(`Response is missing required field 'treedepth': ${data}`);
1981
+ return new TransactionProofResponse({
1982
+ idx: data['idx'],
1983
+ proof: data['proof'],
1984
+ stibhash: data['stibhash'],
1985
+ treedepth: data['treedepth'],
1986
+ hashtype: data['hashtype'],
1987
+ });
1988
+ /* eslint-enable dot-notation */
1989
+ }
1990
+ }
1991
+ /**
1992
+ * algod version information.
1993
+ */
1994
+ export class Version extends BaseModel {
1995
+ /**
1996
+ * Creates a new `Version` object.
1997
+ * @param build -
1998
+ * @param genesisHashB64 -
1999
+ * @param genesisId -
2000
+ * @param versions -
2001
+ */
2002
+ constructor({ build, genesisHashB64, genesisId, versions, }) {
2003
+ super();
2004
+ this.build = build;
2005
+ this.genesisHashB64 =
2006
+ typeof genesisHashB64 === 'string'
2007
+ ? new Uint8Array(Buffer.from(genesisHashB64, 'base64'))
2008
+ : genesisHashB64;
2009
+ this.genesisId = genesisId;
2010
+ this.versions = versions;
2011
+ this.attribute_map = {
2012
+ build: 'build',
2013
+ genesisHashB64: 'genesis_hash_b64',
2014
+ genesisId: 'genesis_id',
2015
+ versions: 'versions',
2016
+ };
2017
+ }
2018
+ // eslint-disable-next-line camelcase
2019
+ static from_obj_for_encoding(data) {
2020
+ /* eslint-disable dot-notation */
2021
+ if (typeof data['build'] === 'undefined')
2022
+ throw new Error(`Response is missing required field 'build': ${data}`);
2023
+ if (typeof data['genesis_hash_b64'] === 'undefined')
2024
+ throw new Error(`Response is missing required field 'genesis_hash_b64': ${data}`);
2025
+ if (typeof data['genesis_id'] === 'undefined')
2026
+ throw new Error(`Response is missing required field 'genesis_id': ${data}`);
2027
+ if (!Array.isArray(data['versions']))
2028
+ throw new Error(`Response is missing required array field 'versions': ${data}`);
2029
+ return new Version({
2030
+ build: BuildVersion.from_obj_for_encoding(data['build']),
2031
+ genesisHashB64: data['genesis_hash_b64'],
2032
+ genesisId: data['genesis_id'],
2033
+ versions: data['versions'],
2034
+ });
2035
+ /* eslint-enable dot-notation */
2036
+ }
2037
+ }
2038
+ //# sourceMappingURL=types.js.map