@aeternity/aepp-sdk 10.0.0 → 12.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 (424) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +15 -14
  3. package/dist/aepp-sdk.browser-script.js +1 -1
  4. package/dist/aepp-sdk.browser-script.js.LICENSE.txt +13 -40
  5. package/dist/aepp-sdk.browser-script.js.map +1 -1
  6. package/dist/aepp-sdk.browser.js +1 -1
  7. package/dist/aepp-sdk.browser.js.map +1 -1
  8. package/dist/aepp-sdk.js +1 -1
  9. package/dist/aepp-sdk.js.map +1 -1
  10. package/es/AeSdk.d.ts +37 -0
  11. package/es/AeSdk.mjs +81 -0
  12. package/es/AeSdk.mjs.map +1 -0
  13. package/es/AeSdkAepp.d.ts +69 -0
  14. package/es/AeSdkAepp.mjs +175 -0
  15. package/es/AeSdkAepp.mjs.map +1 -0
  16. package/es/AeSdkBase.d.ts +212 -0
  17. package/es/AeSdkBase.mjs +310 -0
  18. package/es/AeSdkBase.mjs.map +1 -0
  19. package/es/AeSdkWallet.d.ts +103 -0
  20. package/es/AeSdkWallet.mjs +322 -0
  21. package/es/AeSdkWallet.mjs.map +1 -0
  22. package/es/Node.d.ts +44 -0
  23. package/es/Node.mjs +141 -0
  24. package/es/Node.mjs.map +1 -0
  25. package/es/account/Base.d.ts +65 -0
  26. package/es/account/Base.mjs +123 -0
  27. package/es/account/Base.mjs.map +1 -0
  28. package/es/account/Memory.d.ts +25 -0
  29. package/es/account/Memory.mjs +81 -0
  30. package/es/account/Memory.mjs.map +1 -0
  31. package/es/account/Rpc.d.ts +27 -0
  32. package/es/account/Rpc.mjs +79 -0
  33. package/es/account/Rpc.mjs.map +1 -0
  34. package/es/aens.d.ts +209 -0
  35. package/es/aens.mjs +332 -0
  36. package/es/aens.mjs.map +1 -0
  37. package/es/aepp-wallet-communication/connection/Browser.d.ts +32 -0
  38. package/es/aepp-wallet-communication/connection/Browser.mjs +70 -0
  39. package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -0
  40. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +17 -0
  41. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +57 -0
  42. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -0
  43. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +35 -0
  44. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +142 -0
  45. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -0
  46. package/es/aepp-wallet-communication/connection-proxy.d.ts +10 -0
  47. package/{src/utils/crypto-ts.ts → es/aepp-wallet-communication/connection-proxy.mjs} +15 -11
  48. package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -0
  49. package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +33 -0
  50. package/es/aepp-wallet-communication/rpc/RpcClient.mjs +169 -0
  51. package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -0
  52. package/es/aepp-wallet-communication/rpc/types.d.ts +77 -0
  53. package/es/aepp-wallet-communication/rpc/types.mjs +3 -0
  54. package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -0
  55. package/es/aepp-wallet-communication/schema.d.ts +118 -0
  56. package/es/aepp-wallet-communication/schema.mjs +214 -0
  57. package/es/aepp-wallet-communication/schema.mjs.map +1 -0
  58. package/es/aepp-wallet-communication/wallet-detector.d.ts +24 -0
  59. package/es/aepp-wallet-communication/wallet-detector.mjs +63 -0
  60. package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -0
  61. package/es/apis/compiler/compiler.d.ts +92 -0
  62. package/es/apis/compiler/compiler.mjs +576 -0
  63. package/es/apis/compiler/compiler.mjs.map +1 -0
  64. package/es/apis/compiler/index.d.ts +2 -0
  65. package/es/apis/compiler/index.mjs +3 -0
  66. package/es/apis/compiler/index.mjs.map +1 -0
  67. package/es/apis/compiler/models/index.d.ts +248 -0
  68. package/es/apis/compiler/models/index.mjs +48 -0
  69. package/es/apis/compiler/models/index.mjs.map +1 -0
  70. package/es/apis/compiler/models/mappers.d.ts +23 -0
  71. package/es/apis/compiler/models/mappers.mjs +585 -0
  72. package/es/apis/compiler/models/mappers.mjs.map +1 -0
  73. package/es/apis/compiler/models/parameters.d.ts +13 -0
  74. package/es/apis/compiler/models/parameters.mjs +71 -0
  75. package/es/apis/compiler/models/parameters.mjs.map +1 -0
  76. package/es/apis/node/index.d.ts +2 -0
  77. package/es/apis/node/index.mjs +3 -0
  78. package/es/apis/node/index.mjs.map +1 -0
  79. package/es/apis/node/models/index.d.ts +1061 -0
  80. package/es/apis/node/models/index.mjs +2 -0
  81. package/es/apis/node/models/index.mjs.map +1 -0
  82. package/es/apis/node/models/mappers.d.ts +95 -0
  83. package/es/apis/node/models/mappers.mjs +4164 -0
  84. package/es/apis/node/models/mappers.mjs.map +1 -0
  85. package/es/apis/node/models/parameters.d.ts +17 -0
  86. package/es/apis/node/models/parameters.mjs +165 -0
  87. package/es/apis/node/models/parameters.mjs.map +1 -0
  88. package/es/apis/node/node.d.ts +215 -0
  89. package/es/apis/node/node.mjs +1165 -0
  90. package/es/apis/node/node.mjs.map +1 -0
  91. package/es/chain.d.ts +220 -0
  92. package/es/chain.mjs +524 -0
  93. package/es/chain.mjs.map +1 -0
  94. package/es/channel/handlers.d.ts +34 -0
  95. package/es/channel/{handlers.js → handlers.mjs} +163 -130
  96. package/es/channel/handlers.mjs.map +1 -0
  97. package/es/channel/index.d.ts +634 -0
  98. package/es/channel/index.mjs +978 -0
  99. package/es/channel/index.mjs.map +1 -0
  100. package/es/channel/internal.d.ts +100 -0
  101. package/es/channel/internal.mjs +328 -0
  102. package/es/channel/internal.mjs.map +1 -0
  103. package/es/contract/Compiler.d.ts +17 -0
  104. package/es/contract/Compiler.mjs +67 -0
  105. package/es/contract/Compiler.mjs.map +1 -0
  106. package/es/contract/aci.d.ts +125 -0
  107. package/es/contract/aci.mjs +496 -0
  108. package/es/contract/aci.mjs.map +1 -0
  109. package/es/contract/ga.d.ts +68 -0
  110. package/es/contract/ga.mjs +190 -0
  111. package/es/contract/ga.mjs.map +1 -0
  112. package/es/contract/methods.d.ts +68 -0
  113. package/es/contract/methods.mjs +101 -0
  114. package/es/contract/methods.mjs.map +1 -0
  115. package/es/index.d.ts +32 -0
  116. package/es/index.mjs +49 -0
  117. package/es/index.mjs.map +1 -0
  118. package/es/oracle.d.ts +154 -0
  119. package/es/oracle.mjs +288 -0
  120. package/es/oracle.mjs.map +1 -0
  121. package/es/spend.d.ts +61 -0
  122. package/es/spend.mjs +122 -0
  123. package/es/spend.mjs.map +1 -0
  124. package/es/tx/builder/constants.d.ts +41 -0
  125. package/es/tx/builder/constants.mjs +100 -0
  126. package/es/tx/builder/constants.mjs.map +1 -0
  127. package/es/tx/builder/field-types.d.ts +62 -0
  128. package/es/tx/builder/field-types.mjs +126 -0
  129. package/es/tx/builder/field-types.mjs.map +1 -0
  130. package/es/tx/builder/helpers.d.ts +131 -0
  131. package/es/tx/builder/helpers.mjs +223 -0
  132. package/es/tx/builder/helpers.mjs.map +1 -0
  133. package/es/tx/builder/index.d.ts +75 -0
  134. package/es/tx/builder/index.mjs +424 -0
  135. package/es/tx/builder/index.mjs.map +1 -0
  136. package/es/tx/builder/schema.d.ts +350 -0
  137. package/es/tx/builder/schema.mjs +320 -0
  138. package/es/tx/builder/schema.mjs.map +1 -0
  139. package/es/tx/index.d.ts +63 -0
  140. package/es/tx/index.mjs +209 -0
  141. package/es/tx/index.mjs.map +1 -0
  142. package/es/tx/min-fee.d.ts +20 -0
  143. package/es/tx/min-fee.mjs +148 -0
  144. package/es/tx/min-fee.mjs.map +1 -0
  145. package/es/tx/validator.d.ts +19 -0
  146. package/es/tx/validator.mjs +240 -0
  147. package/es/tx/validator.mjs.map +1 -0
  148. package/es/typings/@aeternity__argon2-browser/index.d.mjs +2 -0
  149. package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +1 -0
  150. package/es/typings/@aeternity__uuid/index.d.mjs +2 -0
  151. package/es/typings/@aeternity__uuid/index.d.mjs.map +1 -0
  152. package/es/typings/bip32-path/index.d.mjs +2 -0
  153. package/es/typings/bip32-path/index.d.mjs.map +1 -0
  154. package/es/typings/blakejs/index.d.mjs +2 -0
  155. package/es/typings/blakejs/index.d.mjs.map +1 -0
  156. package/es/typings/tweetnacl-auth/index.d.mjs +2 -0
  157. package/es/typings/tweetnacl-auth/index.d.mjs.map +1 -0
  158. package/es/utils/amount-formatter.d.ts +42 -0
  159. package/es/utils/{amount-formatter.js → amount-formatter.mjs} +38 -44
  160. package/es/utils/amount-formatter.mjs.map +1 -0
  161. package/es/utils/autorest.d.ts +6 -0
  162. package/es/utils/autorest.mjs +97 -0
  163. package/es/utils/autorest.mjs.map +1 -0
  164. package/es/utils/bignumber.d.ts +13 -0
  165. package/es/utils/bignumber.mjs +23 -0
  166. package/es/utils/bignumber.mjs.map +1 -0
  167. package/es/{bytes.d.ts → utils/bytes.d.ts} +10 -13
  168. package/es/utils/{bytes.js → bytes.mjs} +26 -22
  169. package/es/utils/bytes.mjs.map +1 -0
  170. package/es/utils/crypto.d.ts +103 -0
  171. package/es/utils/crypto.mjs +221 -0
  172. package/es/utils/crypto.mjs.map +1 -0
  173. package/es/utils/encoder.d.ts +26 -0
  174. package/es/utils/encoder.mjs +102 -0
  175. package/es/utils/encoder.mjs.map +1 -0
  176. package/es/utils/errors.d.ts +481 -0
  177. package/es/utils/errors.mjs +882 -0
  178. package/es/utils/errors.mjs.map +1 -0
  179. package/es/utils/hd-wallet.d.ts +34 -0
  180. package/es/utils/hd-wallet.mjs +122 -0
  181. package/es/utils/hd-wallet.mjs.map +1 -0
  182. package/es/utils/json-big.d.ts +5 -0
  183. package/es/utils/json-big.mjs +41 -0
  184. package/es/utils/json-big.mjs.map +1 -0
  185. package/es/utils/keystore.d.ts +51 -0
  186. package/es/utils/keystore.mjs +145 -0
  187. package/es/utils/keystore.mjs.map +1 -0
  188. package/es/{mptree.d.ts → utils/mptree.d.ts} +5 -8
  189. package/es/utils/{mptree.js → mptree.mjs} +33 -25
  190. package/es/utils/mptree.mjs.map +1 -0
  191. package/es/utils/other.d.ts +14 -0
  192. package/es/utils/other.mjs +28 -0
  193. package/es/utils/other.mjs.map +1 -0
  194. package/es/{semver-satisfies.d.ts → utils/semver-satisfies.d.ts} +0 -0
  195. package/es/utils/{semver-satisfies.js → semver-satisfies.mjs} +1 -1
  196. package/es/utils/semver-satisfies.mjs.map +1 -0
  197. package/es/utils/string.d.ts +24 -0
  198. package/es/utils/{string.js → string.mjs} +9 -11
  199. package/es/utils/string.mjs.map +1 -0
  200. package/package.json +67 -64
  201. package/src/AeSdk.ts +65 -0
  202. package/src/AeSdkAepp.ts +167 -0
  203. package/src/AeSdkBase.ts +320 -0
  204. package/src/AeSdkWallet.ts +332 -0
  205. package/src/Node.ts +167 -0
  206. package/src/account/Base.ts +114 -0
  207. package/src/account/Memory.ts +83 -0
  208. package/src/account/Rpc.ts +67 -0
  209. package/src/aens.ts +391 -0
  210. package/src/aepp-wallet-communication/connection/Browser.ts +68 -0
  211. package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +58 -0
  212. package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +111 -0
  213. package/{es/utils/crypto-ts.js → src/aepp-wallet-communication/connection-proxy.ts} +16 -9
  214. package/src/aepp-wallet-communication/rpc/RpcClient.ts +137 -0
  215. package/src/aepp-wallet-communication/rpc/types.ts +66 -0
  216. package/src/aepp-wallet-communication/schema.ts +181 -0
  217. package/src/aepp-wallet-communication/wallet-detector.ts +71 -0
  218. package/src/apis/compiler/code-model-v4.yaml +2649 -0
  219. package/src/apis/compiler/compiler.ts +585 -0
  220. package/src/apis/compiler/index.ts +2 -0
  221. package/src/apis/compiler/models/index.ts +301 -0
  222. package/src/apis/compiler/models/mappers.ts +583 -0
  223. package/src/apis/compiler/models/parameters.ts +93 -0
  224. package/src/apis/node/code-model-v4.yaml +10046 -0
  225. package/src/apis/node/index.ts +2 -0
  226. package/src/apis/node/models/index.ts +1253 -0
  227. package/src/apis/node/models/mappers.ts +4278 -0
  228. package/src/apis/node/models/parameters.ts +188 -0
  229. package/src/apis/node/node.ts +1299 -0
  230. package/src/chain.ts +444 -0
  231. package/src/channel/{handlers.js → handlers.ts} +238 -143
  232. package/src/channel/index.ts +991 -0
  233. package/src/channel/internal.ts +345 -0
  234. package/src/contract/Compiler.ts +66 -0
  235. package/src/contract/aci.ts +529 -0
  236. package/src/contract/ga.ts +178 -0
  237. package/src/contract/methods.ts +118 -0
  238. package/src/index.ts +51 -0
  239. package/src/oracle.ts +342 -0
  240. package/src/spend.ts +152 -0
  241. package/src/tx/builder/constants.ts +96 -0
  242. package/src/tx/builder/field-types.ts +111 -0
  243. package/src/tx/builder/helpers.ts +253 -0
  244. package/src/tx/builder/index.ts +394 -0
  245. package/src/tx/builder/schema.ts +771 -0
  246. package/src/tx/index.ts +199 -0
  247. package/src/tx/min-fee.ts +136 -0
  248. package/src/tx/validator.ts +226 -0
  249. package/src/typings/@aeternity__argon2-browser/index.d.ts +3 -0
  250. package/src/typings/@aeternity__uuid/index.d.ts +3 -0
  251. package/src/typings/bip32-path/index.d.ts +33 -0
  252. package/src/typings/tweetnacl-auth/index.d.ts +14 -0
  253. package/src/utils/amount-formatter.ts +29 -41
  254. package/src/utils/autorest.ts +90 -0
  255. package/src/utils/bignumber.ts +9 -19
  256. package/src/utils/bytes.ts +15 -16
  257. package/src/utils/crypto.ts +217 -0
  258. package/src/utils/encoder.ts +98 -0
  259. package/src/utils/errors.ts +817 -0
  260. package/src/utils/hd-wallet.ts +134 -0
  261. package/src/utils/json-big.ts +26 -0
  262. package/src/utils/keystore.ts +179 -0
  263. package/src/utils/mptree.ts +26 -20
  264. package/src/utils/other.ts +28 -43
  265. package/src/utils/string.ts +8 -10
  266. package/CHANGELOG.md +0 -1603
  267. package/es/account/base.js +0 -169
  268. package/es/account/base.js.map +0 -1
  269. package/es/account/memory.js +0 -84
  270. package/es/account/memory.js.map +0 -1
  271. package/es/account/multiple.js +0 -178
  272. package/es/account/multiple.js.map +0 -1
  273. package/es/ae/aens.js +0 -408
  274. package/es/ae/aens.js.map +0 -1
  275. package/es/ae/aepp.js +0 -45
  276. package/es/ae/aepp.js.map +0 -1
  277. package/es/ae/contract.js +0 -312
  278. package/es/ae/contract.js.map +0 -1
  279. package/es/ae/index.js +0 -206
  280. package/es/ae/index.js.map +0 -1
  281. package/es/ae/oracle.js +0 -322
  282. package/es/ae/oracle.js.map +0 -1
  283. package/es/ae/universal.js +0 -45
  284. package/es/ae/universal.js.map +0 -1
  285. package/es/ae/wallet.js +0 -50
  286. package/es/ae/wallet.js.map +0 -1
  287. package/es/amount-formatter.d.ts +0 -58
  288. package/es/bignumber.d.ts +0 -24
  289. package/es/chain/index.js +0 -256
  290. package/es/chain/index.js.map +0 -1
  291. package/es/chain/node.js +0 -394
  292. package/es/chain/node.js.map +0 -1
  293. package/es/channel/handlers.js.map +0 -1
  294. package/es/channel/index.js +0 -980
  295. package/es/channel/index.js.map +0 -1
  296. package/es/channel/internal.js +0 -266
  297. package/es/channel/internal.js.map +0 -1
  298. package/es/contract/aci/helpers.js +0 -298
  299. package/es/contract/aci/helpers.js.map +0 -1
  300. package/es/contract/aci/index.js +0 -361
  301. package/es/contract/aci/index.js.map +0 -1
  302. package/es/contract/aci/transformation.js +0 -66
  303. package/es/contract/aci/transformation.js.map +0 -1
  304. package/es/contract/compiler.js +0 -244
  305. package/es/contract/compiler.js.map +0 -1
  306. package/es/contract/ga/helpers.js +0 -22
  307. package/es/contract/ga/helpers.js.map +0 -1
  308. package/es/contract/ga/index.js +0 -170
  309. package/es/contract/ga/index.js.map +0 -1
  310. package/es/contract/index.js +0 -162
  311. package/es/contract/index.js.map +0 -1
  312. package/es/crypto-ts.d.ts +0 -9
  313. package/es/index.js +0 -57
  314. package/es/index.js.map +0 -1
  315. package/es/node-pool/index.js +0 -187
  316. package/es/node-pool/index.js.map +0 -1
  317. package/es/node.js +0 -132
  318. package/es/node.js.map +0 -1
  319. package/es/other.d.ts +0 -31
  320. package/es/string.d.ts +0 -26
  321. package/es/tx/builder/helpers.js +0 -305
  322. package/es/tx/builder/helpers.js.map +0 -1
  323. package/es/tx/builder/index.js +0 -595
  324. package/es/tx/builder/index.js.map +0 -1
  325. package/es/tx/builder/schema.js +0 -814
  326. package/es/tx/builder/schema.js.map +0 -1
  327. package/es/tx/index.js +0 -300
  328. package/es/tx/index.js.map +0 -1
  329. package/es/tx/tx-object.js +0 -276
  330. package/es/tx/tx-object.js.map +0 -1
  331. package/es/tx/tx.js +0 -937
  332. package/es/tx/tx.js.map +0 -1
  333. package/es/tx/validator.js +0 -208
  334. package/es/tx/validator.js.map +0 -1
  335. package/es/typings/blakejs/index.d.js +0 -2
  336. package/es/typings/blakejs/index.d.js.map +0 -1
  337. package/es/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -131
  338. package/es/utils/aepp-wallet-communication/connection/browser-runtime.js.map +0 -1
  339. package/es/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -184
  340. package/es/utils/aepp-wallet-communication/connection/browser-window-message.js.map +0 -1
  341. package/es/utils/aepp-wallet-communication/connection/index.js +0 -84
  342. package/es/utils/aepp-wallet-communication/connection/index.js.map +0 -1
  343. package/es/utils/aepp-wallet-communication/content-script-bridge.js +0 -97
  344. package/es/utils/aepp-wallet-communication/content-script-bridge.js.map +0 -1
  345. package/es/utils/aepp-wallet-communication/helpers.js +0 -103
  346. package/es/utils/aepp-wallet-communication/helpers.js.map +0 -1
  347. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -329
  348. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.js.map +0 -1
  349. package/es/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -270
  350. package/es/utils/aepp-wallet-communication/rpc/rpc-client.js.map +0 -1
  351. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -533
  352. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.js.map +0 -1
  353. package/es/utils/aepp-wallet-communication/schema.js +0 -107
  354. package/es/utils/aepp-wallet-communication/schema.js.map +0 -1
  355. package/es/utils/aepp-wallet-communication/wallet-detector.js +0 -109
  356. package/es/utils/aepp-wallet-communication/wallet-detector.js.map +0 -1
  357. package/es/utils/amount-formatter.js.map +0 -1
  358. package/es/utils/async-init.js +0 -67
  359. package/es/utils/async-init.js.map +0 -1
  360. package/es/utils/bignumber.js +0 -28
  361. package/es/utils/bignumber.js.map +0 -1
  362. package/es/utils/bytes.js.map +0 -1
  363. package/es/utils/crypto-ts.js.map +0 -1
  364. package/es/utils/crypto.js +0 -304
  365. package/es/utils/crypto.js.map +0 -1
  366. package/es/utils/hd-wallet.js +0 -112
  367. package/es/utils/hd-wallet.js.map +0 -1
  368. package/es/utils/json-big.js +0 -45
  369. package/es/utils/json-big.js.map +0 -1
  370. package/es/utils/keystore.js +0 -228
  371. package/es/utils/keystore.js.map +0 -1
  372. package/es/utils/mptree.js.map +0 -1
  373. package/es/utils/other.js +0 -43
  374. package/es/utils/other.js.map +0 -1
  375. package/es/utils/semver-satisfies.js.map +0 -1
  376. package/es/utils/string.js.map +0 -1
  377. package/es/utils/swagger.js +0 -132
  378. package/es/utils/swagger.js.map +0 -1
  379. package/src/account/base.js +0 -153
  380. package/src/account/memory.js +0 -78
  381. package/src/account/multiple.js +0 -154
  382. package/src/ae/aens.js +0 -366
  383. package/src/ae/aepp.js +0 -45
  384. package/src/ae/contract.js +0 -285
  385. package/src/ae/index.js +0 -167
  386. package/src/ae/oracle.js +0 -296
  387. package/src/ae/universal.js +0 -47
  388. package/src/ae/wallet.js +0 -50
  389. package/src/chain/index.js +0 -250
  390. package/src/chain/node.js +0 -293
  391. package/src/channel/index.js +0 -898
  392. package/src/channel/internal.js +0 -231
  393. package/src/contract/aci/index.js +0 -317
  394. package/src/contract/aci/transformation.js +0 -72
  395. package/src/contract/compiler.js +0 -195
  396. package/src/contract/ga/helpers.js +0 -17
  397. package/src/contract/ga/index.js +0 -147
  398. package/src/contract/index.js +0 -163
  399. package/src/index.js +0 -90
  400. package/src/node-pool/index.js +0 -171
  401. package/src/node.js +0 -118
  402. package/src/tx/builder/helpers.js +0 -325
  403. package/src/tx/builder/index.js +0 -460
  404. package/src/tx/builder/schema.js +0 -1211
  405. package/src/tx/index.js +0 -301
  406. package/src/tx/tx-object.js +0 -186
  407. package/src/tx/tx.js +0 -622
  408. package/src/tx/validator.js +0 -161
  409. package/src/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -114
  410. package/src/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -161
  411. package/src/utils/aepp-wallet-communication/connection/index.js +0 -85
  412. package/src/utils/aepp-wallet-communication/content-script-bridge.js +0 -85
  413. package/src/utils/aepp-wallet-communication/helpers.js +0 -70
  414. package/src/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -268
  415. package/src/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -223
  416. package/src/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -390
  417. package/src/utils/aepp-wallet-communication/schema.js +0 -108
  418. package/src/utils/aepp-wallet-communication/wallet-detector.js +0 -91
  419. package/src/utils/async-init.js +0 -41
  420. package/src/utils/crypto.js +0 -312
  421. package/src/utils/hd-wallet.js +0 -115
  422. package/src/utils/json-big.js +0 -26
  423. package/src/utils/keystore.js +0 -223
  424. package/src/utils/swagger.js +0 -133
@@ -0,0 +1,1253 @@
1
+ import * as coreClient from "@azure/core-client";
2
+
3
+ export type OffChainUpdateUnion =
4
+ | OffChainUpdate
5
+ | OffChainTransfer
6
+ | OffChainWithdrawal
7
+ | OffChainDeposit
8
+ | OffChainNewContract
9
+ | OffChainCallContract;
10
+
11
+ /** A mix of KeyBlock, MicroBlockHeader properties. */
12
+ export interface Header {
13
+ /** Base58Check encoded tagged hash */
14
+ hash: string;
15
+ height: string;
16
+ /** Base58Check encoded tagged hash */
17
+ prevHash: string;
18
+ /** Base58Check encoded tagged hash */
19
+ prevKeyHash: string;
20
+ /** Base58Check encoded tagged hash */
21
+ stateHash: string;
22
+ /** Base58Check encoded tagged pubkey */
23
+ miner?: string;
24
+ /** Base58Check encoded tagged pubkey */
25
+ beneficiary?: string;
26
+ target?: string;
27
+ pow?: string[];
28
+ nonce?: string;
29
+ time: string;
30
+ version: string;
31
+ /** Base64Check encoded tagged byte array */
32
+ info?: string;
33
+ /** Base58Check encoded tagged hash */
34
+ pofHash?: string;
35
+ /** Base58Check encoded tagged hash */
36
+ txsHash?: string;
37
+ /** Base58Check encoded tagged value */
38
+ signature?: string;
39
+ }
40
+
41
+ export interface ErrorModel {
42
+ reason: string;
43
+ }
44
+
45
+ export interface KeyBlock {
46
+ /** Base58Check encoded tagged hash */
47
+ hash: string;
48
+ height: string;
49
+ /** Base58Check encoded tagged hash */
50
+ prevHash: string;
51
+ /** Base58Check encoded tagged hash */
52
+ prevKeyHash: string;
53
+ /** Base58Check encoded tagged hash */
54
+ stateHash: string;
55
+ /** Base58Check encoded tagged pubkey */
56
+ miner: string;
57
+ /** Base58Check encoded tagged pubkey */
58
+ beneficiary: string;
59
+ target: string;
60
+ pow?: string[];
61
+ nonce?: string;
62
+ time: string;
63
+ version: string;
64
+ /** Base64Check encoded tagged byte array */
65
+ info: string;
66
+ }
67
+
68
+ export interface HashResponse {
69
+ hash: string;
70
+ }
71
+
72
+ export interface HeightResponse {
73
+ height: string;
74
+ }
75
+
76
+ export interface MicroBlockHeader {
77
+ /** Base58Check encoded tagged hash */
78
+ hash: string;
79
+ height: string;
80
+ /** Base58Check encoded tagged hash */
81
+ pofHash: string;
82
+ /** Base58Check encoded tagged hash */
83
+ prevHash: string;
84
+ /** Base58Check encoded tagged hash */
85
+ prevKeyHash: string;
86
+ /** Base58Check encoded tagged hash */
87
+ stateHash: string;
88
+ /** Base58Check encoded tagged hash */
89
+ txsHash: string;
90
+ /** Base58Check encoded tagged value */
91
+ signature: string;
92
+ time: string;
93
+ version: string;
94
+ }
95
+
96
+ export interface SignedTxs {
97
+ transactions: SignedTx[];
98
+ }
99
+
100
+ export interface SignedTx {
101
+ /** A mix of all transaction types. */
102
+ tx: Tx;
103
+ blockHeight: string;
104
+ /** Base58Check encoded tagged hash */
105
+ blockHash: string;
106
+ /** Base58Check encoded tagged hash */
107
+ hash: string;
108
+ /** At least one signature is required unless for Generalized Account Meta transactions */
109
+ signatures: string[];
110
+ }
111
+
112
+ /** A mix of all transaction types. */
113
+ export interface Tx {
114
+ /** Polymorphic discriminator, which specifies the different types this object can be */
115
+ type: "undefined";
116
+ /** Base58Check encoded tagged pubkey */
117
+ recipientId?: string;
118
+ amount?: string;
119
+ fee: string;
120
+ ttl?: string;
121
+ /** Base58Check encoded tagged pubkey */
122
+ senderId?: string;
123
+ nonce?: string;
124
+ /** Base64Check encoded tagged byte array */
125
+ payload?: string;
126
+ /** Base58Check encoded tagged pubkey */
127
+ initiatorId?: string;
128
+ initiatorAmount?: string;
129
+ /** Base58Check encoded tagged pubkey */
130
+ responderId?: string;
131
+ responderAmount?: string;
132
+ channelReserve?: string;
133
+ lockPeriod?: string;
134
+ /** Base58Check encoded tagged pubkey */
135
+ stateHash?: string;
136
+ delegateIds?: Delegates;
137
+ /** Base58Check encoded tagged pubkey */
138
+ channelId?: string;
139
+ /** Base58Check encoded tagged pubkey */
140
+ fromId?: string;
141
+ round?: string;
142
+ /** Base58Check encoded tagged pubkey */
143
+ toId?: string;
144
+ update?: OffChainUpdateUnion;
145
+ /** Base64Check encoded tagged byte array */
146
+ offchainTrees?: string;
147
+ initiatorAmountFinal?: string;
148
+ responderAmountFinal?: string;
149
+ /** Base64Check encoded tagged byte array */
150
+ poi?: string;
151
+ initiatorDelegateIds?: string[];
152
+ responderDelegateIds?: string[];
153
+ queryFormat?: string;
154
+ responseFormat?: string;
155
+ queryFee?: string;
156
+ oracleTtl?: RelativeTTL;
157
+ /** Base58Check encoded tagged pubkey */
158
+ accountId?: string;
159
+ abiVersion?: string;
160
+ /** Base58Check encoded tagged pubkey */
161
+ oracleId?: string;
162
+ query?: string;
163
+ queryTtl?: Ttl;
164
+ responseTtl?: RelativeTTL;
165
+ /** Base58Check encoded tagged value */
166
+ queryId?: string;
167
+ response?: string;
168
+ /** Base58Check encoded tagged value */
169
+ commitmentId?: string;
170
+ name?: string;
171
+ nameSalt?: string;
172
+ nameFee?: string;
173
+ /** Base58Check encoded tagged value */
174
+ nameId?: string;
175
+ nameTtl?: string;
176
+ pointers?: NamePointer[];
177
+ clientTtl?: string;
178
+ /** Base58Check encoded tagged pubkey */
179
+ ownerId?: string;
180
+ /** Base64Check encoded tagged byte array */
181
+ code?: string;
182
+ vmVersion?: string;
183
+ deposit?: string;
184
+ gas?: string;
185
+ gasPrice?: string;
186
+ /** Base64Check encoded tagged byte array */
187
+ callData?: string;
188
+ /** Base58Check encoded tagged pubkey */
189
+ callerId?: string;
190
+ /** Base58Check encoded tagged pubkey */
191
+ contractId?: string;
192
+ /** Contract authorization function hash (hex encoded) */
193
+ authFun?: string;
194
+ /** Base58Check encoded tagged pubkey */
195
+ gaId?: string;
196
+ /** Base64Check encoded tagged byte array */
197
+ authData?: string;
198
+ tx?: SignedTx;
199
+ /** Base58Check encoded tagged pubkey */
200
+ payerId?: string;
201
+ version: string;
202
+ }
203
+
204
+ export interface Delegates {
205
+ initiator?: string[];
206
+ responder?: string[];
207
+ }
208
+
209
+ export interface OffChainUpdate {
210
+ /** Polymorphic discriminator, which specifies the different types this object can be */
211
+ op:
212
+ | "OffChainTransfer"
213
+ | "OffChainWithdrawal"
214
+ | "OffChainDeposit"
215
+ | "OffChainNewContract"
216
+ | "OffChainCallContract";
217
+ }
218
+
219
+ export interface RelativeTTL {
220
+ type: "delta";
221
+ value: string;
222
+ }
223
+
224
+ export interface Ttl {
225
+ type: TTLType;
226
+ value: string;
227
+ }
228
+
229
+ export interface NamePointer {
230
+ key: string;
231
+ /** Base58Check encoded tagged pubkey */
232
+ id: string;
233
+ }
234
+
235
+ export interface CountResponse {
236
+ count: string;
237
+ }
238
+
239
+ export interface Generation {
240
+ keyBlock: KeyBlock;
241
+ microBlocks: string[];
242
+ }
243
+
244
+ export interface Account {
245
+ /** Base58Check encoded tagged pubkey */
246
+ id: string;
247
+ balance: string;
248
+ nonce: string;
249
+ /** Payable */
250
+ payable?: boolean;
251
+ kind?: AccountKind;
252
+ /** Base58Check encoded tagged pubkey */
253
+ contractId?: string;
254
+ /** Name of authorization function for generalized account */
255
+ authFun?: string;
256
+ }
257
+
258
+ export interface NextNonceResponse {
259
+ nextNonce: string;
260
+ }
261
+
262
+ export interface DryRunInput {
263
+ /** Base58Check encoded tagged hash */
264
+ top?: string;
265
+ /** Accounts */
266
+ accounts?: DryRunAccount[];
267
+ /** Txs */
268
+ txs: DryRunInputItem[];
269
+ /** Collect and return on-chain tx events that would result from the call */
270
+ txEvents?: boolean;
271
+ }
272
+
273
+ export interface DryRunAccount {
274
+ /** Base58Check encoded tagged pubkey */
275
+ pubKey: string;
276
+ amount: string;
277
+ }
278
+
279
+ export interface DryRunInputItem {
280
+ /** Base64Check encoded tagged byte array */
281
+ tx?: string;
282
+ callReq?: DryRunCallReq;
283
+ }
284
+
285
+ export interface DryRunCallReq {
286
+ /** Base64Check encoded tagged byte array */
287
+ calldata: string;
288
+ /** Base58Check encoded tagged pubkey */
289
+ contract: string;
290
+ amount?: string;
291
+ gas?: string;
292
+ /** Base58Check encoded tagged pubkey */
293
+ caller?: string;
294
+ nonce?: string;
295
+ abiVersion?: string;
296
+ context?: DryRunCallContext;
297
+ }
298
+
299
+ export interface DryRunCallContext {
300
+ /** Base64Check encoded tagged byte array */
301
+ tx?: string;
302
+ /** Base58Check encoded tagged hash */
303
+ txHash?: string;
304
+ /** This call will have effects on the next call in this dry-run (or not) */
305
+ stateful?: boolean;
306
+ }
307
+
308
+ export interface DryRunResults {
309
+ /** results */
310
+ results: DryRunResult[];
311
+ /** on-chain tx events */
312
+ txEvents?: Record<string, unknown>[];
313
+ }
314
+
315
+ export interface DryRunResult {
316
+ type: string;
317
+ result: string;
318
+ reason?: string;
319
+ callObj?: ContractCallObject;
320
+ }
321
+
322
+ export interface ContractCallObject {
323
+ /** Base58Check encoded tagged pubkey */
324
+ callerId: string;
325
+ callerNonce: string;
326
+ height: string;
327
+ /** Base58Check encoded tagged pubkey */
328
+ contractId: string;
329
+ gasPrice: string;
330
+ gasUsed: string;
331
+ log: Event[];
332
+ /** Base64Check encoded tagged byte array */
333
+ returnValue: string;
334
+ /** The status of the call 'ok | error | revert'. */
335
+ returnType: string;
336
+ }
337
+
338
+ export interface Event {
339
+ /** Base58Check encoded tagged pubkey */
340
+ address: string;
341
+ /** Event topics */
342
+ topics: string[];
343
+ /** Base64Check encoded tagged byte array */
344
+ data: string;
345
+ }
346
+
347
+ export interface TxInfoObject {
348
+ callInfo?: ContractCallObject;
349
+ gaInfo?: GAObject;
350
+ txInfo?: string;
351
+ }
352
+
353
+ export interface GAObject {
354
+ /** Base58Check encoded tagged pubkey */
355
+ callerId: string;
356
+ height: string;
357
+ gasPrice: string;
358
+ gasUsed: string;
359
+ /** Base64Check encoded tagged byte array */
360
+ returnValue: string;
361
+ /** The status of the call 'ok | error'. */
362
+ returnType: string;
363
+ innerObject?: TxInfoObject;
364
+ }
365
+
366
+ export interface EncodedTx {
367
+ /** Base64Check encoded tagged byte array */
368
+ tx: string;
369
+ }
370
+
371
+ export interface PostTxResponse {
372
+ /** Base58Check encoded tagged hash */
373
+ txHash: string;
374
+ }
375
+
376
+ export interface ContractObject {
377
+ /** Base58Check encoded tagged pubkey */
378
+ id: string;
379
+ /** Base58Check encoded tagged pubkey */
380
+ ownerId: string;
381
+ vmVersion: string;
382
+ abiVersion: string;
383
+ active: boolean;
384
+ referrerIds: string[];
385
+ deposit: string;
386
+ }
387
+
388
+ export interface ByteCode {
389
+ /** Base64Check encoded tagged byte array */
390
+ bytecode: string;
391
+ }
392
+
393
+ export interface PoI {
394
+ /** Base64Check encoded tagged byte array */
395
+ poi: string;
396
+ }
397
+
398
+ export interface RegisteredOracle {
399
+ /** Base58Check encoded tagged pubkey */
400
+ id: string;
401
+ queryFormat: string;
402
+ responseFormat: string;
403
+ queryFee: string;
404
+ ttl: string;
405
+ abiVersion: string;
406
+ }
407
+
408
+ export interface OracleQueries {
409
+ oracleQueries: OracleQuery[];
410
+ }
411
+
412
+ export interface OracleQuery {
413
+ /** Base58Check encoded tagged value */
414
+ id: string;
415
+ /** Base58Check encoded tagged pubkey */
416
+ senderId: string;
417
+ senderNonce: string;
418
+ /** Base58Check encoded tagged pubkey */
419
+ oracleId: string;
420
+ query: string;
421
+ response: string;
422
+ ttl: string;
423
+ responseTtl: Ttl;
424
+ fee: string;
425
+ }
426
+
427
+ export interface NameEntry {
428
+ /** Base58Check encoded tagged value */
429
+ id: string;
430
+ /** Base58Check encoded tagged pubkey */
431
+ owner?: string;
432
+ ttl: string;
433
+ pointers: NamePointer[];
434
+ }
435
+
436
+ export interface Channel {
437
+ /** Base58Check encoded tagged pubkey */
438
+ id: string;
439
+ /** Base58Check encoded tagged pubkey */
440
+ initiatorId: string;
441
+ /** Base58Check encoded tagged pubkey */
442
+ responderId: string;
443
+ channelAmount: string;
444
+ initiatorAmount: string;
445
+ responderAmount: string;
446
+ channelReserve: string;
447
+ delegateIds: Delegates;
448
+ /** Base58Check encoded tagged hash */
449
+ stateHash: string;
450
+ round: string;
451
+ soloRound: string;
452
+ lockPeriod: string;
453
+ lockedUntil: string;
454
+ }
455
+
456
+ export interface PeerPubKey {
457
+ /** Base58Check encoded tagged pubkey */
458
+ pubkey: string;
459
+ }
460
+
461
+ export interface Status {
462
+ /** Base58Check encoded tagged hash */
463
+ genesisKeyBlockHash: string;
464
+ solutions: string;
465
+ difficulty: string;
466
+ syncing: boolean;
467
+ syncProgress?: number;
468
+ listening: boolean;
469
+ protocols: Protocol[];
470
+ nodeVersion: string;
471
+ nodeRevision: string;
472
+ peerCount: string;
473
+ peerConnections: PeerConnections;
474
+ pendingTransactionsCount: string;
475
+ networkId: string;
476
+ /** Base58Check encoded tagged pubkey */
477
+ peerPubkey: string;
478
+ /** Base58Check encoded tagged hash */
479
+ topKeyBlockHash: string;
480
+ topBlockHeight: string;
481
+ }
482
+
483
+ export interface Protocol {
484
+ version: string;
485
+ effectiveAtHeight: string;
486
+ }
487
+
488
+ export interface PeerConnections {
489
+ inbound: string;
490
+ outbound: string;
491
+ }
492
+
493
+ export interface SpendTx {
494
+ /** Base58Check encoded tagged pubkey */
495
+ recipientId: string;
496
+ amount: string;
497
+ fee: string;
498
+ ttl?: string;
499
+ /** Base58Check encoded tagged pubkey */
500
+ senderId: string;
501
+ nonce?: string;
502
+ /** Base64Check encoded tagged byte array */
503
+ payload: string;
504
+ }
505
+
506
+ export interface OracleRegisterTx {
507
+ queryFormat: string;
508
+ responseFormat: string;
509
+ queryFee: string;
510
+ oracleTtl: Ttl;
511
+ /** Base58Check encoded tagged pubkey */
512
+ accountId: string;
513
+ nonce?: string;
514
+ fee: string;
515
+ ttl?: string;
516
+ abiVersion?: string;
517
+ }
518
+
519
+ export interface OracleExtendTx {
520
+ fee: string;
521
+ oracleTtl: RelativeTTL;
522
+ /** Base58Check encoded tagged pubkey */
523
+ oracleId: string;
524
+ nonce?: string;
525
+ ttl?: string;
526
+ }
527
+
528
+ export interface OracleQueryTx {
529
+ /** Base58Check encoded tagged pubkey */
530
+ oracleId: string;
531
+ query: string;
532
+ queryFee: string;
533
+ queryTtl: Ttl;
534
+ responseTtl: RelativeTTL;
535
+ fee: string;
536
+ ttl?: string;
537
+ /** Base58Check encoded tagged pubkey */
538
+ senderId: string;
539
+ nonce?: string;
540
+ }
541
+
542
+ export interface OracleRespondTx {
543
+ /** Base58Check encoded tagged value */
544
+ queryId: string;
545
+ response: string;
546
+ responseTtl: RelativeTTL;
547
+ fee: string;
548
+ ttl?: string;
549
+ /** Base58Check encoded tagged pubkey */
550
+ oracleId: string;
551
+ nonce?: string;
552
+ }
553
+
554
+ export interface NamePreclaimTx {
555
+ /** Base58Check encoded tagged value */
556
+ commitmentId: string;
557
+ fee: string;
558
+ ttl?: string;
559
+ /** Base58Check encoded tagged pubkey */
560
+ accountId: string;
561
+ nonce?: string;
562
+ }
563
+
564
+ export interface NameClaimTx {
565
+ name: string;
566
+ nameSalt: string;
567
+ nameFee?: string;
568
+ fee: string;
569
+ ttl?: string;
570
+ /** Base58Check encoded tagged pubkey */
571
+ accountId: string;
572
+ nonce?: string;
573
+ }
574
+
575
+ export interface NameUpdateTx {
576
+ /** Base58Check encoded tagged value */
577
+ nameId: string;
578
+ nameTtl: string;
579
+ pointers: NamePointer[];
580
+ clientTtl: string;
581
+ fee: string;
582
+ ttl?: string;
583
+ /** Base58Check encoded tagged pubkey */
584
+ accountId: string;
585
+ nonce?: string;
586
+ }
587
+
588
+ export interface NameTransferTx {
589
+ /** Base58Check encoded tagged value */
590
+ nameId: string;
591
+ /** Base58Check encoded tagged pubkey */
592
+ recipientId: string;
593
+ fee: string;
594
+ ttl?: string;
595
+ /** Base58Check encoded tagged pubkey */
596
+ accountId: string;
597
+ nonce?: string;
598
+ }
599
+
600
+ export interface NameRevokeTx {
601
+ /** Base58Check encoded tagged value */
602
+ nameId: string;
603
+ fee: string;
604
+ ttl?: string;
605
+ /** Base58Check encoded tagged pubkey */
606
+ accountId: string;
607
+ nonce?: string;
608
+ }
609
+
610
+ export interface CommitmentId {
611
+ /** Base58Check encoded tagged value */
612
+ commitmentId: string;
613
+ }
614
+
615
+ export interface NameHash {
616
+ /** Base58Check encoded tagged value */
617
+ nameId: string;
618
+ }
619
+
620
+ export interface ChannelCreateTx {
621
+ /** Base58Check encoded tagged pubkey */
622
+ initiatorId: string;
623
+ initiatorAmount: string;
624
+ /** Base58Check encoded tagged pubkey */
625
+ responderId: string;
626
+ responderAmount: string;
627
+ channelReserve: string;
628
+ lockPeriod: string;
629
+ ttl?: string;
630
+ fee: string;
631
+ nonce?: string;
632
+ /** Base58Check encoded tagged hash */
633
+ stateHash: string;
634
+ delegateIds?: Delegates;
635
+ }
636
+
637
+ export interface ChannelDepositTx {
638
+ /** Base58Check encoded tagged pubkey */
639
+ channelId: string;
640
+ /** Base58Check encoded tagged pubkey */
641
+ fromId: string;
642
+ amount: string;
643
+ ttl?: string;
644
+ fee: string;
645
+ nonce: string;
646
+ /** Base58Check encoded tagged hash */
647
+ stateHash: string;
648
+ round: string;
649
+ }
650
+
651
+ export interface ChannelWithdrawTx {
652
+ /** Base58Check encoded tagged pubkey */
653
+ channelId: string;
654
+ /** Base58Check encoded tagged pubkey */
655
+ toId: string;
656
+ amount: string;
657
+ ttl?: string;
658
+ fee: string;
659
+ nonce: string;
660
+ /** Base58Check encoded tagged hash */
661
+ stateHash: string;
662
+ round: string;
663
+ }
664
+
665
+ export interface ChannelForceProgressTx {
666
+ /** Base58Check encoded tagged pubkey */
667
+ channelId: string;
668
+ /** Base58Check encoded tagged pubkey */
669
+ fromId: string;
670
+ /** Base64Check encoded tagged byte array */
671
+ payload: string;
672
+ round: string;
673
+ update: OffChainUpdateUnion;
674
+ /** Base58Check encoded tagged hash */
675
+ stateHash: string;
676
+ ttl?: string;
677
+ fee: string;
678
+ nonce?: string;
679
+ /** Base64Check encoded tagged byte array */
680
+ offchainTrees?: string;
681
+ }
682
+
683
+ export interface ChannelCloseMutualTx {
684
+ /** Base58Check encoded tagged pubkey */
685
+ channelId: string;
686
+ /** Base58Check encoded tagged pubkey */
687
+ fromId: string;
688
+ initiatorAmountFinal: string;
689
+ responderAmountFinal: string;
690
+ ttl?: string;
691
+ fee: string;
692
+ nonce: string;
693
+ }
694
+
695
+ export interface ChannelCloseSoloTx {
696
+ /** Base58Check encoded tagged pubkey */
697
+ channelId: string;
698
+ /** Base58Check encoded tagged pubkey */
699
+ fromId: string;
700
+ /** Base64Check encoded tagged byte array */
701
+ payload: string;
702
+ ttl?: string;
703
+ fee: string;
704
+ nonce?: string;
705
+ /** Base64Check encoded tagged byte array */
706
+ poi: string;
707
+ }
708
+
709
+ export interface ChannelSlashTx {
710
+ /** Base58Check encoded tagged pubkey */
711
+ channelId: string;
712
+ /** Base58Check encoded tagged pubkey */
713
+ fromId: string;
714
+ /** Base64Check encoded tagged byte array */
715
+ payload: string;
716
+ ttl?: string;
717
+ fee: string;
718
+ nonce?: string;
719
+ /** Base64Check encoded tagged byte array */
720
+ poi: string;
721
+ }
722
+
723
+ export interface ChannelSettleTx {
724
+ /** Base58Check encoded tagged pubkey */
725
+ channelId: string;
726
+ /** Base58Check encoded tagged pubkey */
727
+ fromId: string;
728
+ initiatorAmountFinal: string;
729
+ responderAmountFinal: string;
730
+ ttl?: string;
731
+ fee: string;
732
+ nonce: string;
733
+ }
734
+
735
+ export interface ChannelSnapshotSoloTx {
736
+ /** Base58Check encoded tagged pubkey */
737
+ channelId: string;
738
+ /** Base58Check encoded tagged pubkey */
739
+ fromId: string;
740
+ /** Base64Check encoded tagged byte array */
741
+ payload: string;
742
+ ttl?: string;
743
+ fee: string;
744
+ nonce?: string;
745
+ }
746
+
747
+ export interface ChannelSetDelegatesTx {
748
+ /** Base58Check encoded tagged pubkey */
749
+ channelId: string;
750
+ /** Base58Check encoded tagged pubkey */
751
+ fromId: string;
752
+ initiatorDelegateIds: string[];
753
+ responderDelegateIds: string[];
754
+ /** Base58Check encoded tagged pubkey */
755
+ stateHash: string;
756
+ round: string;
757
+ /** Base64Check encoded tagged byte array */
758
+ payload: string;
759
+ ttl?: string;
760
+ fee: string;
761
+ nonce?: string;
762
+ }
763
+
764
+ export interface PubKey {
765
+ /** Base58Check encoded tagged pubkey */
766
+ pubKey: string;
767
+ }
768
+
769
+ export interface PeerDetails {
770
+ /** Hostname of peer */
771
+ host: string;
772
+ port: string;
773
+ firstSeen: string;
774
+ lastSeen: string;
775
+ /** Base58Check encoded tagged hash */
776
+ genesisHash: string;
777
+ /** Base58Check encoded tagged hash */
778
+ topHash: string;
779
+ topDifficulty: string;
780
+ networkId?: string;
781
+ nodeVersion?: string;
782
+ nodeRevision?: string;
783
+ nodeVendor?: string;
784
+ nodeOs?: string;
785
+ }
786
+
787
+ export interface Peers {
788
+ /** All discovered peers */
789
+ peers: string[];
790
+ /** All blocked peers */
791
+ blocked: string[];
792
+ }
793
+
794
+ export interface PeerCount {
795
+ connected: PeerCountConnected;
796
+ available: PeerCountAvailable;
797
+ blocked: string;
798
+ }
799
+
800
+ export interface PeerCountConnected {
801
+ inbound?: string;
802
+ outbound?: string;
803
+ }
804
+
805
+ export interface PeerCountAvailable {
806
+ verified?: string;
807
+ unverified?: string;
808
+ }
809
+
810
+ export interface ContractCreateTx {
811
+ /** Base58Check encoded tagged pubkey */
812
+ ownerId: string;
813
+ nonce?: string;
814
+ /** Base64Check encoded tagged byte array */
815
+ code: string;
816
+ vmVersion: string;
817
+ abiVersion: string;
818
+ deposit: string;
819
+ amount: string;
820
+ gas: string;
821
+ gasPrice: string;
822
+ fee: string;
823
+ ttl?: string;
824
+ /** Base64Check encoded tagged byte array */
825
+ callData: string;
826
+ }
827
+
828
+ export interface ContractCallTx {
829
+ /** Base58Check encoded tagged pubkey */
830
+ callerId: string;
831
+ nonce?: string;
832
+ /** Base58Check encoded tagged pubkey */
833
+ contractId: string;
834
+ abiVersion: string;
835
+ fee: string;
836
+ ttl?: string;
837
+ amount: string;
838
+ gas: string;
839
+ gasPrice: string;
840
+ /** Base64Check encoded tagged byte array */
841
+ callData: string;
842
+ }
843
+
844
+ export interface UnsignedTx {
845
+ /** Base64Check encoded tagged byte array */
846
+ tx: string;
847
+ }
848
+
849
+ export interface TokenSupply {
850
+ accounts?: string;
851
+ contracts?: string;
852
+ contractOracles?: string;
853
+ locked?: string;
854
+ oracles?: string;
855
+ oracleQueries?: string;
856
+ pendingRewards?: string;
857
+ total?: string;
858
+ }
859
+
860
+ export interface GAAttachTx {
861
+ /** Base58Check encoded tagged pubkey */
862
+ ownerId: string;
863
+ nonce?: string;
864
+ /** Base64Check encoded tagged byte array */
865
+ code: string;
866
+ vmVersion: string;
867
+ abiVersion: string;
868
+ gas: string;
869
+ gasPrice: string;
870
+ fee: string;
871
+ ttl?: string;
872
+ /** Base64Check encoded tagged byte array */
873
+ callData: string;
874
+ /** Contract authorization function hash (hex encoded) */
875
+ authFun: string;
876
+ }
877
+
878
+ export interface GAMetaTx {
879
+ /** Base58Check encoded tagged pubkey */
880
+ gaId: string;
881
+ abiVersion: string;
882
+ gas: string;
883
+ gasPrice: string;
884
+ fee: string;
885
+ ttl?: string;
886
+ /** Base64Check encoded tagged byte array */
887
+ authData: string;
888
+ tx: SignedTx;
889
+ }
890
+
891
+ export interface PayingForTx {
892
+ /** Base58Check encoded tagged pubkey */
893
+ payerId: string;
894
+ fee: string;
895
+ nonce?: string;
896
+ tx: SignedTx;
897
+ }
898
+
899
+ export interface CheckTxInPoolResponse {
900
+ status: string;
901
+ }
902
+
903
+ export type OffChainTransfer = OffChainUpdate & {
904
+ /** Polymorphic discriminator, which specifies the different types this object can be */
905
+ op: "OffChainTransfer";
906
+ /** Base58Check encoded tagged pubkey */
907
+ from: string;
908
+ /** Base58Check encoded tagged pubkey */
909
+ to: string;
910
+ amount: string;
911
+ };
912
+
913
+ export type OffChainWithdrawal = OffChainUpdate & {
914
+ /** Polymorphic discriminator, which specifies the different types this object can be */
915
+ op: "OffChainWithdrawal";
916
+ /** Base58Check encoded tagged pubkey */
917
+ to: string;
918
+ amount: string;
919
+ };
920
+
921
+ export type OffChainDeposit = OffChainUpdate & {
922
+ /** Polymorphic discriminator, which specifies the different types this object can be */
923
+ op: "OffChainDeposit";
924
+ /** Base58Check encoded tagged pubkey */
925
+ from: string;
926
+ amount: string;
927
+ };
928
+
929
+ export type OffChainNewContract = OffChainUpdate & {
930
+ /** Polymorphic discriminator, which specifies the different types this object can be */
931
+ op: "OffChainNewContract";
932
+ /** Base58Check encoded tagged pubkey */
933
+ owner: string;
934
+ vmVersion: string;
935
+ abiVersion: string;
936
+ code: ByteCode;
937
+ deposit: string;
938
+ /** Base64Check encoded tagged byte array */
939
+ callData: string;
940
+ };
941
+
942
+ export type OffChainCallContract = OffChainUpdate & {
943
+ /** Polymorphic discriminator, which specifies the different types this object can be */
944
+ op: "OffChainCallContract";
945
+ /** Base58Check encoded tagged pubkey */
946
+ caller: string;
947
+ /** Base58Check encoded tagged pubkey */
948
+ contract: string;
949
+ abiVersion: string;
950
+ amount: string;
951
+ gas: string;
952
+ gasPrice: string;
953
+ /** Base64Check encoded tagged byte array */
954
+ callData: string;
955
+ };
956
+
957
+ export type CreateContractUnsignedTx = UnsignedTx & {
958
+ /** Base58Check encoded tagged pubkey */
959
+ contractId: string;
960
+ };
961
+ /** Defines values for TTLType. */
962
+ export type TTLType = "delta" | "block";
963
+ /** Defines values for TxType. */
964
+ export type TxType =
965
+ | "SpendTx"
966
+ | "ChannelCreateTx"
967
+ | "ChannelDepositTx"
968
+ | "ChannelWithdrawTx"
969
+ | "ChannelForceProgressTx"
970
+ | "ChannelCloseMutualTx"
971
+ | "ChannelCloseSoloTx"
972
+ | "ChannelSlashTx"
973
+ | "ChannelSettleTx"
974
+ | "ChannelSnapshotSoloTx"
975
+ | "ChannelSetDelegatesTx"
976
+ | "OracleRegisterTx"
977
+ | "OracleExtendTx"
978
+ | "OracleQueryTx"
979
+ | "OracleRespondTx"
980
+ | "NamePreclaimTx"
981
+ | "NameClaimTx"
982
+ | "NameUpdateTx"
983
+ | "NameTransferTx"
984
+ | "NameRevokeTx"
985
+ | "ContractCreateTx"
986
+ | "ContractCallTx"
987
+ | "GAAttachTx"
988
+ | "GAMetaTx"
989
+ | "PayingForTx";
990
+ /** Defines values for AccountKind. */
991
+ export type AccountKind = "basic" | "generalized";
992
+ /** Defines values for NextNonceStrategy. */
993
+ export type NextNonceStrategy = "max" | "continuity";
994
+ /** Defines values for OracleQueryType. */
995
+ export type OracleQueryType = "open" | "closed" | "all";
996
+
997
+ /** Optional parameters. */
998
+ export interface GetTopHeaderOptionalParams
999
+ extends coreClient.OperationOptions {}
1000
+
1001
+ /** Contains response data for the getTopHeader operation. */
1002
+ export type GetTopHeaderResponse = Header;
1003
+
1004
+ /** Optional parameters. */
1005
+ export interface GetCurrentKeyBlockOptionalParams
1006
+ extends coreClient.OperationOptions {}
1007
+
1008
+ /** Contains response data for the getCurrentKeyBlock operation. */
1009
+ export type GetCurrentKeyBlockResponse = KeyBlock;
1010
+
1011
+ /** Optional parameters. */
1012
+ export interface GetCurrentKeyBlockHashOptionalParams
1013
+ extends coreClient.OperationOptions {}
1014
+
1015
+ /** Contains response data for the getCurrentKeyBlockHash operation. */
1016
+ export type GetCurrentKeyBlockHashResponse = HashResponse;
1017
+
1018
+ /** Optional parameters. */
1019
+ export interface GetCurrentKeyBlockHeightOptionalParams
1020
+ extends coreClient.OperationOptions {}
1021
+
1022
+ /** Contains response data for the getCurrentKeyBlockHeight operation. */
1023
+ export type GetCurrentKeyBlockHeightResponse = HeightResponse;
1024
+
1025
+ /** Optional parameters. */
1026
+ export interface GetPendingKeyBlockOptionalParams
1027
+ extends coreClient.OperationOptions {}
1028
+
1029
+ /** Contains response data for the getPendingKeyBlock operation. */
1030
+ export type GetPendingKeyBlockResponse = KeyBlock;
1031
+
1032
+ /** Optional parameters. */
1033
+ export interface GetKeyBlockByHashOptionalParams
1034
+ extends coreClient.OperationOptions {}
1035
+
1036
+ /** Contains response data for the getKeyBlockByHash operation. */
1037
+ export type GetKeyBlockByHashResponse = KeyBlock;
1038
+
1039
+ /** Optional parameters. */
1040
+ export interface GetKeyBlockByHeightOptionalParams
1041
+ extends coreClient.OperationOptions {}
1042
+
1043
+ /** Contains response data for the getKeyBlockByHeight operation. */
1044
+ export type GetKeyBlockByHeightResponse = KeyBlock;
1045
+
1046
+ /** Optional parameters. */
1047
+ export interface GetMicroBlockHeaderByHashOptionalParams
1048
+ extends coreClient.OperationOptions {}
1049
+
1050
+ /** Contains response data for the getMicroBlockHeaderByHash operation. */
1051
+ export type GetMicroBlockHeaderByHashResponse = MicroBlockHeader;
1052
+
1053
+ /** Optional parameters. */
1054
+ export interface GetMicroBlockTransactionsByHashOptionalParams
1055
+ extends coreClient.OperationOptions {}
1056
+
1057
+ /** Contains response data for the getMicroBlockTransactionsByHash operation. */
1058
+ export type GetMicroBlockTransactionsByHashResponse = SignedTxs;
1059
+
1060
+ /** Optional parameters. */
1061
+ export interface GetMicroBlockTransactionByHashAndIndexOptionalParams
1062
+ extends coreClient.OperationOptions {}
1063
+
1064
+ /** Contains response data for the getMicroBlockTransactionByHashAndIndex operation. */
1065
+ export type GetMicroBlockTransactionByHashAndIndexResponse = SignedTx;
1066
+
1067
+ /** Optional parameters. */
1068
+ export interface GetMicroBlockTransactionsCountByHashOptionalParams
1069
+ extends coreClient.OperationOptions {}
1070
+
1071
+ /** Contains response data for the getMicroBlockTransactionsCountByHash operation. */
1072
+ export type GetMicroBlockTransactionsCountByHashResponse = CountResponse;
1073
+
1074
+ /** Optional parameters. */
1075
+ export interface GetCurrentGenerationOptionalParams
1076
+ extends coreClient.OperationOptions {}
1077
+
1078
+ /** Contains response data for the getCurrentGeneration operation. */
1079
+ export type GetCurrentGenerationResponse = Generation;
1080
+
1081
+ /** Optional parameters. */
1082
+ export interface GetGenerationByHashOptionalParams
1083
+ extends coreClient.OperationOptions {}
1084
+
1085
+ /** Contains response data for the getGenerationByHash operation. */
1086
+ export type GetGenerationByHashResponse = Generation;
1087
+
1088
+ /** Optional parameters. */
1089
+ export interface GetGenerationByHeightOptionalParams
1090
+ extends coreClient.OperationOptions {}
1091
+
1092
+ /** Contains response data for the getGenerationByHeight operation. */
1093
+ export type GetGenerationByHeightResponse = Generation;
1094
+
1095
+ /** Optional parameters. */
1096
+ export interface GetAccountByPubkeyOptionalParams
1097
+ extends coreClient.OperationOptions {}
1098
+
1099
+ /** Contains response data for the getAccountByPubkey operation. */
1100
+ export type GetAccountByPubkeyResponse = Account;
1101
+
1102
+ /** Optional parameters. */
1103
+ export interface GetAccountByPubkeyAndHeightOptionalParams
1104
+ extends coreClient.OperationOptions {}
1105
+
1106
+ /** Contains response data for the getAccountByPubkeyAndHeight operation. */
1107
+ export type GetAccountByPubkeyAndHeightResponse = Account;
1108
+
1109
+ /** Optional parameters. */
1110
+ export interface GetAccountByPubkeyAndHashOptionalParams
1111
+ extends coreClient.OperationOptions {}
1112
+
1113
+ /** Contains response data for the getAccountByPubkeyAndHash operation. */
1114
+ export type GetAccountByPubkeyAndHashResponse = Account;
1115
+
1116
+ /** Optional parameters. */
1117
+ export interface GetPendingAccountTransactionsByPubkeyOptionalParams
1118
+ extends coreClient.OperationOptions {}
1119
+
1120
+ /** Contains response data for the getPendingAccountTransactionsByPubkey operation. */
1121
+ export type GetPendingAccountTransactionsByPubkeyResponse = SignedTxs;
1122
+
1123
+ /** Optional parameters. */
1124
+ export interface GetAccountNextNonceOptionalParams
1125
+ extends coreClient.OperationOptions {
1126
+ /** What strategy to use in order to determine the next nonce: shall it check for continuity or return the largest nonce seen + 1. If you choose strategy max, then the greatest nonce seen in the account or currently in the transaction pool is incremented with 1 and returned. If you choose the strategy continuity, then transactions in the mempool are checked if there are gaps - missing nonces that prevent transactions with greater nonces to get included. */
1127
+ strategy?: NextNonceStrategy;
1128
+ }
1129
+
1130
+ /** Contains response data for the getAccountNextNonce operation. */
1131
+ export type GetAccountNextNonceResponse = NextNonceResponse;
1132
+
1133
+ /** Optional parameters. */
1134
+ export interface ProtectedDryRunTxsOptionalParams
1135
+ extends coreClient.OperationOptions {}
1136
+
1137
+ /** Contains response data for the protectedDryRunTxs operation. */
1138
+ export type ProtectedDryRunTxsResponse = DryRunResults;
1139
+
1140
+ /** Optional parameters. */
1141
+ export interface GetTransactionByHashOptionalParams
1142
+ extends coreClient.OperationOptions {}
1143
+
1144
+ /** Contains response data for the getTransactionByHash operation. */
1145
+ export type GetTransactionByHashResponse = SignedTx;
1146
+
1147
+ /** Optional parameters. */
1148
+ export interface GetTransactionInfoByHashOptionalParams
1149
+ extends coreClient.OperationOptions {}
1150
+
1151
+ /** Contains response data for the getTransactionInfoByHash operation. */
1152
+ export type GetTransactionInfoByHashResponse = TxInfoObject;
1153
+
1154
+ /** Optional parameters. */
1155
+ export interface PostTransactionOptionalParams
1156
+ extends coreClient.OperationOptions {}
1157
+
1158
+ /** Contains response data for the postTransaction operation. */
1159
+ export type PostTransactionResponse = PostTxResponse;
1160
+
1161
+ /** Optional parameters. */
1162
+ export interface GetContractOptionalParams
1163
+ extends coreClient.OperationOptions {}
1164
+
1165
+ /** Contains response data for the getContract operation. */
1166
+ export type GetContractResponse = ContractObject;
1167
+
1168
+ /** Optional parameters. */
1169
+ export interface GetContractCodeOptionalParams
1170
+ extends coreClient.OperationOptions {}
1171
+
1172
+ /** Contains response data for the getContractCode operation. */
1173
+ export type GetContractCodeResponse = ByteCode;
1174
+
1175
+ /** Optional parameters. */
1176
+ export interface GetContractPoIOptionalParams
1177
+ extends coreClient.OperationOptions {}
1178
+
1179
+ /** Contains response data for the getContractPoI operation. */
1180
+ export type GetContractPoIResponse = PoI;
1181
+
1182
+ /** Optional parameters. */
1183
+ export interface GetOracleByPubkeyOptionalParams
1184
+ extends coreClient.OperationOptions {}
1185
+
1186
+ /** Contains response data for the getOracleByPubkey operation. */
1187
+ export type GetOracleByPubkeyResponse = RegisteredOracle;
1188
+
1189
+ /** Optional parameters. */
1190
+ export interface GetOracleQueriesByPubkeyOptionalParams
1191
+ extends coreClient.OperationOptions {
1192
+ /** Last query id in previous page */
1193
+ fromParam?: string;
1194
+ /** Max number of oracle queries */
1195
+ limit?: number;
1196
+ /** The type of a query: open, closed or all */
1197
+ typeParam?: OracleQueryType;
1198
+ }
1199
+
1200
+ /** Contains response data for the getOracleQueriesByPubkey operation. */
1201
+ export type GetOracleQueriesByPubkeyResponse = OracleQueries;
1202
+
1203
+ /** Optional parameters. */
1204
+ export interface GetOracleQueryByPubkeyAndQueryIdOptionalParams
1205
+ extends coreClient.OperationOptions {}
1206
+
1207
+ /** Contains response data for the getOracleQueryByPubkeyAndQueryId operation. */
1208
+ export type GetOracleQueryByPubkeyAndQueryIdResponse = OracleQuery;
1209
+
1210
+ /** Optional parameters. */
1211
+ export interface GetNameEntryByNameOptionalParams
1212
+ extends coreClient.OperationOptions {}
1213
+
1214
+ /** Contains response data for the getNameEntryByName operation. */
1215
+ export type GetNameEntryByNameResponse = NameEntry;
1216
+
1217
+ /** Optional parameters. */
1218
+ export interface GetChannelByPubkeyOptionalParams
1219
+ extends coreClient.OperationOptions {}
1220
+
1221
+ /** Contains response data for the getChannelByPubkey operation. */
1222
+ export type GetChannelByPubkeyResponse = Channel;
1223
+
1224
+ /** Optional parameters. */
1225
+ export interface GetPeerPubkeyOptionalParams
1226
+ extends coreClient.OperationOptions {}
1227
+
1228
+ /** Contains response data for the getPeerPubkey operation. */
1229
+ export type GetPeerPubkeyResponse = PeerPubKey;
1230
+
1231
+ /** Optional parameters. */
1232
+ export interface GetStatusOptionalParams extends coreClient.OperationOptions {}
1233
+
1234
+ /** Contains response data for the getStatus operation. */
1235
+ export type GetStatusResponse = Status;
1236
+
1237
+ /** Optional parameters. */
1238
+ export interface GetChainEndsOptionalParams
1239
+ extends coreClient.OperationOptions {}
1240
+
1241
+ /** Contains response data for the getChainEnds operation. */
1242
+ export type GetChainEndsResponse = {
1243
+ /** The parsed response body. */
1244
+ body: string[];
1245
+ };
1246
+
1247
+ /** Optional parameters. */
1248
+ export interface NodeOptionalParams extends coreClient.ServiceClientOptions {
1249
+ /** If this flag is set to true, the response will have all integers set as strings */
1250
+ intAsString?: boolean;
1251
+ /** Overrides client endpoint. */
1252
+ endpoint?: string;
1253
+ }