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