@aeternity/aepp-sdk 11.0.1 → 12.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/LICENSE +1 -1
  2. package/dist/aepp-sdk.browser-script.js +1 -1
  3. package/dist/aepp-sdk.browser-script.js.LICENSE.txt +0 -22
  4. package/dist/aepp-sdk.browser-script.js.map +1 -1
  5. package/dist/aepp-sdk.browser.js +2 -1
  6. package/dist/aepp-sdk.browser.js.LICENSE.txt +1 -0
  7. package/dist/aepp-sdk.browser.js.map +1 -1
  8. package/dist/aepp-sdk.js +20765 -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 +70 -0
  14. package/es/AeSdkAepp.mjs +176 -0
  15. package/es/AeSdkAepp.mjs.map +1 -0
  16. package/es/AeSdkBase.d.ts +213 -0
  17. package/es/AeSdkBase.mjs +314 -0
  18. package/es/AeSdkBase.mjs.map +1 -0
  19. package/es/AeSdkWallet.d.ts +104 -0
  20. package/es/AeSdkWallet.mjs +326 -0
  21. package/es/AeSdkWallet.mjs.map +1 -0
  22. package/es/Node.d.ts +41 -0
  23. package/es/Node.mjs +147 -0
  24. package/es/Node.mjs.map +1 -0
  25. package/es/account/Base.d.ts +68 -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 +26 -0
  29. package/es/account/Memory.mjs +103 -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 +80 -0
  33. package/es/account/Rpc.mjs.map +1 -0
  34. package/es/aens.d.ts +222 -0
  35. package/es/aens.mjs +338 -0
  36. package/es/aens.mjs.map +1 -0
  37. package/es/aepp-wallet-communication/connection/Browser.d.ts +33 -0
  38. package/es/aepp-wallet-communication/connection/Browser.mjs +73 -0
  39. package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -0
  40. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +18 -0
  41. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +58 -0
  42. package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -0
  43. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
  44. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +146 -0
  45. package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -0
  46. package/es/aepp-wallet-communication/connection-proxy.d.ts +11 -0
  47. package/{src/utils/crypto-ts.ts → es/aepp-wallet-communication/connection-proxy.mjs} +16 -11
  48. package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -0
  49. package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -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 +105 -46
  56. package/es/aepp-wallet-communication/schema.mjs +251 -0
  57. package/es/aepp-wallet-communication/schema.mjs.map +1 -0
  58. package/es/aepp-wallet-communication/wallet-detector.d.ts +25 -0
  59. package/es/aepp-wallet-communication/wallet-detector.mjs +62 -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 +1065 -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 +4166 -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 +248 -0
  92. package/es/chain.mjs +560 -0
  93. package/es/chain.mjs.map +1 -0
  94. package/es/channel/handlers.d.ts +34 -0
  95. package/es/channel/handlers.mjs +164 -131
  96. package/es/channel/handlers.mjs.map +1 -1
  97. package/es/channel/index.d.ts +625 -0
  98. package/es/channel/index.mjs +897 -902
  99. package/es/channel/index.mjs.map +1 -1
  100. package/es/channel/internal.d.ts +101 -0
  101. package/es/channel/internal.mjs +136 -85
  102. package/es/channel/internal.mjs.map +1 -1
  103. package/es/contract/Compiler.d.ts +18 -0
  104. package/es/contract/Compiler.mjs +68 -0
  105. package/es/contract/Compiler.mjs.map +1 -0
  106. package/es/contract/aci.d.ts +127 -0
  107. package/es/contract/aci.mjs +225 -193
  108. package/es/contract/aci.mjs.map +1 -1
  109. package/es/contract/ga.d.ts +69 -0
  110. package/es/contract/ga.mjs +195 -0
  111. package/es/contract/ga.mjs.map +1 -0
  112. package/es/contract/methods.d.ts +71 -0
  113. package/es/contract/methods.mjs +104 -0
  114. package/es/contract/methods.mjs.map +1 -0
  115. package/es/deprecated/index.d.ts +143 -0
  116. package/es/deprecated/index.mjs +162 -0
  117. package/es/deprecated/index.mjs.map +1 -0
  118. package/es/deprecated/methods.d.ts +18 -0
  119. package/es/deprecated/methods.mjs +26 -0
  120. package/es/deprecated/methods.mjs.map +1 -0
  121. package/es/index.d.ts +35 -0
  122. package/es/index.mjs +35 -40
  123. package/es/index.mjs.map +1 -1
  124. package/es/oracle.d.ts +161 -0
  125. package/es/oracle.mjs +306 -0
  126. package/es/oracle.mjs.map +1 -0
  127. package/es/spend.d.ts +62 -0
  128. package/es/spend.mjs +111 -0
  129. package/es/spend.mjs.map +1 -0
  130. package/es/tx/builder/address.d.ts +25 -0
  131. package/es/tx/builder/address.mjs +45 -0
  132. package/es/tx/builder/address.mjs.map +1 -0
  133. package/es/tx/builder/constants.d.ts +70 -0
  134. package/es/tx/builder/constants.mjs +61 -47
  135. package/es/tx/builder/constants.mjs.map +1 -1
  136. package/es/tx/builder/field-types/coin-amount.d.ts +13 -0
  137. package/es/tx/builder/field-types/coin-amount.mjs +26 -0
  138. package/es/tx/builder/field-types/coin-amount.mjs.map +1 -0
  139. package/es/tx/builder/field-types/deposit.d.ts +15 -0
  140. package/es/tx/builder/field-types/deposit.mjs +19 -0
  141. package/es/tx/builder/field-types/deposit.mjs.map +1 -0
  142. package/es/tx/builder/field-types/fee.d.ts +25 -0
  143. package/es/tx/builder/field-types/fee.mjs +150 -0
  144. package/es/tx/builder/field-types/fee.mjs.map +1 -0
  145. package/es/tx/builder/field-types/field.d.ts +6 -0
  146. package/es/tx/builder/field-types/field.mjs +15 -0
  147. package/es/tx/builder/field-types/field.mjs.map +1 -0
  148. package/es/tx/builder/field-types/gas-limit.d.ts +12 -0
  149. package/es/tx/builder/field-types/gas-limit.mjs +33 -0
  150. package/es/tx/builder/field-types/gas-limit.mjs.map +1 -0
  151. package/es/tx/builder/field-types/gas-price.d.ts +8 -0
  152. package/es/tx/builder/field-types/gas-price.mjs +18 -0
  153. package/es/tx/builder/field-types/gas-price.mjs.map +1 -0
  154. package/es/tx/builder/field-types/index.d.ts +70 -0
  155. package/es/tx/builder/field-types/index.mjs +25 -0
  156. package/es/tx/builder/field-types/index.mjs.map +1 -0
  157. package/es/tx/builder/field-types/name-fee.d.ts +20 -0
  158. package/es/tx/builder/field-types/name-fee.mjs +24 -0
  159. package/es/tx/builder/field-types/name-fee.mjs.map +1 -0
  160. package/es/tx/builder/field-types/name-id.d.ts +14 -0
  161. package/es/tx/builder/field-types/name-id.mjs +19 -0
  162. package/es/tx/builder/field-types/name-id.mjs.map +1 -0
  163. package/es/tx/builder/field-types/name.d.ts +13 -0
  164. package/es/tx/builder/field-types/name.mjs +18 -0
  165. package/es/tx/builder/field-types/name.mjs.map +1 -0
  166. package/es/tx/builder/field-types/short-u-int.d.ts +6 -0
  167. package/es/tx/builder/field-types/short-u-int.mjs +12 -0
  168. package/es/tx/builder/field-types/short-u-int.mjs.map +1 -0
  169. package/es/tx/builder/field-types/u-int.d.ts +8 -0
  170. package/es/tx/builder/field-types/u-int.mjs +14 -0
  171. package/es/tx/builder/field-types/u-int.mjs.map +1 -0
  172. package/es/tx/builder/helpers.d.ts +125 -0
  173. package/es/tx/builder/helpers.mjs +94 -198
  174. package/es/tx/builder/helpers.mjs.map +1 -1
  175. package/es/tx/builder/index.d.ts +88 -0
  176. package/es/tx/builder/index.mjs +167 -358
  177. package/es/tx/builder/index.mjs.map +1 -1
  178. package/es/tx/builder/schema.d.ts +1201 -0
  179. package/es/tx/builder/schema.mjs +175 -561
  180. package/es/tx/builder/schema.mjs.map +1 -1
  181. package/es/tx/index.d.ts +64 -0
  182. package/es/tx/index.mjs +151 -265
  183. package/es/tx/index.mjs.map +1 -1
  184. package/es/tx/validator.d.ts +20 -0
  185. package/es/tx/validator.mjs +104 -124
  186. package/es/tx/validator.mjs.map +1 -1
  187. package/es/typings/@aeternity__argon2-browser/index.d.mjs +2 -0
  188. package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +1 -0
  189. package/es/typings/@aeternity__uuid/index.d.mjs +2 -0
  190. package/es/typings/@aeternity__uuid/index.d.mjs.map +1 -0
  191. package/es/typings/bip32-path/index.d.mjs +2 -0
  192. package/es/typings/bip32-path/index.d.mjs.map +1 -0
  193. package/es/typings/blakejs/index.d.mjs.map +1 -1
  194. package/es/typings/sha-js/index.d.mjs +2 -0
  195. package/es/typings/sha-js/index.d.mjs.map +1 -0
  196. package/es/typings/tweetnacl-auth/index.d.mjs +2 -0
  197. package/es/typings/tweetnacl-auth/index.d.mjs.map +1 -0
  198. package/es/utils/amount-formatter.d.ts +42 -0
  199. package/es/utils/amount-formatter.mjs +36 -49
  200. package/es/utils/amount-formatter.mjs.map +1 -1
  201. package/es/utils/autorest.d.ts +6 -0
  202. package/es/utils/autorest.mjs +97 -0
  203. package/es/utils/autorest.mjs.map +1 -0
  204. package/es/utils/bignumber.d.ts +13 -0
  205. package/es/utils/bignumber.mjs +11 -8
  206. package/es/utils/bignumber.mjs.map +1 -1
  207. package/es/{bytes.d.ts → utils/bytes.d.ts} +10 -13
  208. package/es/utils/bytes.mjs +11 -15
  209. package/es/utils/bytes.mjs.map +1 -1
  210. package/es/utils/crypto.d.ts +88 -0
  211. package/es/utils/crypto.mjs +64 -98
  212. package/es/utils/crypto.mjs.map +1 -1
  213. package/es/utils/encoder-types.d.ts +61 -0
  214. package/es/utils/encoder-types.mjs +36 -0
  215. package/es/utils/encoder-types.mjs.map +1 -0
  216. package/es/utils/encoder.d.ts +25 -0
  217. package/es/utils/encoder.mjs +71 -59
  218. package/es/utils/encoder.mjs.map +1 -1
  219. package/es/{errors.d.ts → utils/errors.d.ts} +246 -59
  220. package/es/utils/errors.mjs +313 -136
  221. package/es/utils/errors.mjs.map +1 -1
  222. package/es/utils/hd-wallet.d.ts +50 -0
  223. package/es/utils/hd-wallet.mjs +86 -45
  224. package/es/utils/hd-wallet.mjs.map +1 -1
  225. package/es/utils/json-big.d.ts +5 -0
  226. package/es/utils/json-big.mjs +12 -16
  227. package/es/utils/json-big.mjs.map +1 -1
  228. package/es/utils/keystore.d.ts +51 -0
  229. package/es/utils/keystore.mjs +101 -194
  230. package/es/utils/keystore.mjs.map +1 -1
  231. package/es/{mptree.d.ts → utils/mptree.d.ts} +6 -9
  232. package/es/utils/mptree.mjs +22 -18
  233. package/es/utils/mptree.mjs.map +1 -1
  234. package/es/utils/other.d.ts +20 -0
  235. package/es/utils/other.mjs +32 -35
  236. package/es/utils/other.mjs.map +1 -1
  237. package/es/utils/semver-satisfies.d.ts +1 -0
  238. package/es/utils/semver-satisfies.mjs +2 -2
  239. package/es/utils/semver-satisfies.mjs.map +1 -1
  240. package/es/utils/string.d.ts +24 -0
  241. package/es/utils/string.mjs +8 -10
  242. package/es/utils/string.mjs.map +1 -1
  243. package/package.json +55 -43
  244. package/src/AeSdk.ts +68 -0
  245. package/src/AeSdkAepp.ts +176 -0
  246. package/src/AeSdkBase.ts +338 -0
  247. package/src/AeSdkWallet.ts +348 -0
  248. package/src/Node.ts +173 -0
  249. package/src/account/Base.ts +124 -0
  250. package/src/account/Memory.ts +98 -0
  251. package/src/account/Rpc.ts +69 -0
  252. package/src/aens.ts +407 -0
  253. package/src/aepp-wallet-communication/connection/Browser.ts +71 -0
  254. package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +59 -0
  255. package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +122 -0
  256. package/{es/utils/crypto-ts.mjs → src/aepp-wallet-communication/connection-proxy.ts} +18 -18
  257. package/src/aepp-wallet-communication/rpc/RpcClient.ts +143 -0
  258. package/src/aepp-wallet-communication/rpc/types.ts +66 -0
  259. package/src/aepp-wallet-communication/schema.ts +224 -0
  260. package/src/aepp-wallet-communication/wallet-detector.ts +72 -0
  261. package/src/apis/compiler/code-model-v4.yaml +2649 -0
  262. package/src/apis/compiler/compiler.ts +585 -0
  263. package/src/apis/compiler/index.ts +2 -0
  264. package/src/apis/compiler/models/index.ts +301 -0
  265. package/src/apis/compiler/models/mappers.ts +583 -0
  266. package/src/apis/compiler/models/parameters.ts +93 -0
  267. package/src/apis/node/code-model-v4.yaml +10080 -0
  268. package/src/apis/node/index.ts +2 -0
  269. package/src/apis/node/models/index.ts +1257 -0
  270. package/src/apis/node/models/mappers.ts +4280 -0
  271. package/src/apis/node/models/parameters.ts +188 -0
  272. package/src/apis/node/node.ts +1299 -0
  273. package/src/chain.ts +502 -0
  274. package/src/channel/handlers.ts +817 -0
  275. package/src/channel/index.ts +1025 -0
  276. package/src/channel/internal.ts +361 -0
  277. package/src/contract/Compiler.ts +67 -0
  278. package/src/contract/aci.ts +538 -0
  279. package/src/contract/ga.ts +199 -0
  280. package/src/contract/methods.ts +123 -0
  281. package/src/deprecated/index.ts +172 -0
  282. package/src/deprecated/methods.ts +25 -0
  283. package/src/index.ts +56 -0
  284. package/src/oracle.ts +364 -0
  285. package/src/spend.ts +164 -0
  286. package/src/tx/builder/address.ts +50 -0
  287. package/src/tx/builder/constants.ts +126 -0
  288. package/src/tx/builder/field-types/coin-amount.ts +27 -0
  289. package/src/tx/builder/field-types/deposit.ts +21 -0
  290. package/src/tx/builder/field-types/fee.ts +143 -0
  291. package/src/tx/builder/field-types/field.ts +9 -0
  292. package/src/tx/builder/field-types/gas-limit.ts +41 -0
  293. package/src/tx/builder/field-types/gas-price.ts +16 -0
  294. package/src/tx/builder/field-types/index.ts +45 -0
  295. package/src/tx/builder/field-types/name-fee.ts +32 -0
  296. package/src/tx/builder/field-types/name-id.ts +20 -0
  297. package/src/tx/builder/field-types/name.ts +18 -0
  298. package/src/tx/builder/field-types/short-u-int.ts +11 -0
  299. package/src/tx/builder/field-types/u-int.ts +16 -0
  300. package/src/tx/builder/helpers.ts +248 -0
  301. package/src/tx/builder/index.ts +400 -0
  302. package/src/tx/builder/schema.ts +727 -0
  303. package/src/tx/index.ts +192 -0
  304. package/src/tx/validator.ts +230 -0
  305. package/src/typings/@aeternity__argon2-browser/index.d.ts +3 -0
  306. package/src/typings/@aeternity__uuid/index.d.ts +5 -0
  307. package/src/typings/bip32-path/index.d.ts +33 -0
  308. package/src/typings/blakejs/index.d.ts +4 -32
  309. package/src/typings/sha-js/index.d.ts +5 -0
  310. package/src/typings/tweetnacl-auth/index.d.ts +14 -0
  311. package/src/utils/amount-formatter.ts +56 -69
  312. package/src/utils/autorest.ts +93 -0
  313. package/src/utils/bignumber.ts +11 -12
  314. package/src/utils/bytes.ts +29 -31
  315. package/src/utils/crypto.ts +205 -0
  316. package/src/utils/encoder-types.ts +63 -0
  317. package/src/utils/encoder.ts +116 -71
  318. package/src/utils/errors.ts +482 -366
  319. package/src/utils/hd-wallet.ts +166 -0
  320. package/src/utils/json-big.ts +27 -0
  321. package/src/utils/keystore.ts +182 -0
  322. package/src/utils/mptree.ts +64 -61
  323. package/src/utils/other.ts +34 -41
  324. package/src/utils/semver-satisfies.ts +15 -11
  325. package/src/utils/string.ts +18 -20
  326. package/es/account/base.mjs +0 -179
  327. package/es/account/base.mjs.map +0 -1
  328. package/es/account/memory.mjs +0 -99
  329. package/es/account/memory.mjs.map +0 -1
  330. package/es/account/multiple.mjs +0 -179
  331. package/es/account/multiple.mjs.map +0 -1
  332. package/es/ae/aens.mjs +0 -404
  333. package/es/ae/aens.mjs.map +0 -1
  334. package/es/ae/aepp.mjs +0 -45
  335. package/es/ae/aepp.mjs.map +0 -1
  336. package/es/ae/contract.mjs +0 -159
  337. package/es/ae/contract.mjs.map +0 -1
  338. package/es/ae/index.mjs +0 -207
  339. package/es/ae/index.mjs.map +0 -1
  340. package/es/ae/oracle.mjs +0 -339
  341. package/es/ae/oracle.mjs.map +0 -1
  342. package/es/ae/universal.mjs +0 -45
  343. package/es/ae/universal.mjs.map +0 -1
  344. package/es/ae/wallet.mjs +0 -50
  345. package/es/ae/wallet.mjs.map +0 -1
  346. package/es/amount-formatter.d.ts +0 -58
  347. package/es/bignumber.d.ts +0 -18
  348. package/es/chain/index.mjs +0 -272
  349. package/es/chain/index.mjs.map +0 -1
  350. package/es/chain/node.mjs +0 -442
  351. package/es/chain/node.mjs.map +0 -1
  352. package/es/contract/compiler.mjs +0 -115
  353. package/es/contract/compiler.mjs.map +0 -1
  354. package/es/contract/ga/helpers.mjs +0 -30
  355. package/es/contract/ga/helpers.mjs.map +0 -1
  356. package/es/contract/ga/index.mjs +0 -178
  357. package/es/contract/ga/index.mjs.map +0 -1
  358. package/es/crypto-ts.d.ts +0 -9
  359. package/es/encoder.d.ts +0 -26
  360. package/es/node-pool/index.mjs +0 -188
  361. package/es/node-pool/index.mjs.map +0 -1
  362. package/es/node.mjs +0 -133
  363. package/es/node.mjs.map +0 -1
  364. package/es/other.d.ts +0 -31
  365. package/es/semver-satisfies.d.ts +0 -1
  366. package/es/string.d.ts +0 -26
  367. package/es/tx/builder/field-types.mjs +0 -74
  368. package/es/tx/builder/field-types.mjs.map +0 -1
  369. package/es/tx/tx-object.mjs +0 -283
  370. package/es/tx/tx-object.mjs.map +0 -1
  371. package/es/tx/tx.mjs +0 -938
  372. package/es/tx/tx.mjs.map +0 -1
  373. package/es/utils/aepp-wallet-communication/connection/browser-runtime.mjs +0 -132
  374. package/es/utils/aepp-wallet-communication/connection/browser-runtime.mjs.map +0 -1
  375. package/es/utils/aepp-wallet-communication/connection/browser-window-message.mjs +0 -183
  376. package/es/utils/aepp-wallet-communication/connection/browser-window-message.mjs.map +0 -1
  377. package/es/utils/aepp-wallet-communication/connection/index.mjs +0 -87
  378. package/es/utils/aepp-wallet-communication/connection/index.mjs.map +0 -1
  379. package/es/utils/aepp-wallet-communication/content-script-bridge.mjs +0 -98
  380. package/es/utils/aepp-wallet-communication/content-script-bridge.mjs.map +0 -1
  381. package/es/utils/aepp-wallet-communication/helpers.mjs +0 -92
  382. package/es/utils/aepp-wallet-communication/helpers.mjs.map +0 -1
  383. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.mjs +0 -375
  384. package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.mjs.map +0 -1
  385. package/es/utils/aepp-wallet-communication/rpc/rpc-client.mjs +0 -275
  386. package/es/utils/aepp-wallet-communication/rpc/rpc-client.mjs.map +0 -1
  387. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.mjs +0 -541
  388. package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.mjs.map +0 -1
  389. package/es/utils/aepp-wallet-communication/schema.mjs +0 -102
  390. package/es/utils/aepp-wallet-communication/schema.mjs.map +0 -1
  391. package/es/utils/aepp-wallet-communication/wallet-detector.mjs +0 -110
  392. package/es/utils/aepp-wallet-communication/wallet-detector.mjs.map +0 -1
  393. package/es/utils/async-init.mjs +0 -64
  394. package/es/utils/async-init.mjs.map +0 -1
  395. package/es/utils/crypto-ts.mjs.map +0 -1
  396. package/es/utils/swagger.mjs +0 -164
  397. package/es/utils/swagger.mjs.map +0 -1
  398. package/src/account/base.js +0 -153
  399. package/src/account/memory.js +0 -83
  400. package/src/account/multiple.js +0 -162
  401. package/src/ae/aens.js +0 -361
  402. package/src/ae/aepp.js +0 -45
  403. package/src/ae/contract.js +0 -148
  404. package/src/ae/index.js +0 -168
  405. package/src/ae/oracle.js +0 -311
  406. package/src/ae/universal.js +0 -47
  407. package/src/ae/wallet.js +0 -50
  408. package/src/chain/index.js +0 -269
  409. package/src/chain/node.js +0 -320
  410. package/src/channel/handlers.js +0 -673
  411. package/src/channel/index.js +0 -903
  412. package/src/channel/internal.js +0 -236
  413. package/src/contract/aci.js +0 -376
  414. package/src/contract/compiler.js +0 -100
  415. package/src/contract/ga/helpers.js +0 -19
  416. package/src/contract/ga/index.js +0 -150
  417. package/src/index.js +0 -89
  418. package/src/node-pool/index.js +0 -172
  419. package/src/node.js +0 -116
  420. package/src/tx/builder/constants.js +0 -100
  421. package/src/tx/builder/field-types.js +0 -61
  422. package/src/tx/builder/helpers.js +0 -334
  423. package/src/tx/builder/index.js +0 -465
  424. package/src/tx/builder/schema.js +0 -1100
  425. package/src/tx/index.js +0 -301
  426. package/src/tx/tx-object.js +0 -187
  427. package/src/tx/tx.js +0 -631
  428. package/src/tx/validator.js +0 -181
  429. package/src/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -119
  430. package/src/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -165
  431. package/src/utils/aepp-wallet-communication/connection/index.js +0 -85
  432. package/src/utils/aepp-wallet-communication/content-script-bridge.js +0 -86
  433. package/src/utils/aepp-wallet-communication/helpers.js +0 -60
  434. package/src/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -294
  435. package/src/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -232
  436. package/src/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -401
  437. package/src/utils/aepp-wallet-communication/schema.ts +0 -80
  438. package/src/utils/aepp-wallet-communication/wallet-detector.js +0 -92
  439. package/src/utils/async-init.js +0 -45
  440. package/src/utils/crypto.js +0 -219
  441. package/src/utils/hd-wallet.js +0 -100
  442. package/src/utils/json-big.js +0 -26
  443. package/src/utils/keystore.js +0 -219
  444. package/src/utils/swagger.js +0 -156
@@ -0,0 +1,1257 @@
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: ContractCallReturnType;
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: GAReturnType;
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 ContractCallReturnType. */
995
+ export type ContractCallReturnType = "ok" | "error" | "revert";
996
+ /** Defines values for GAReturnType. */
997
+ export type GAReturnType = "ok" | "error";
998
+ /** Defines values for OracleQueryType. */
999
+ export type OracleQueryType = "open" | "closed" | "all";
1000
+
1001
+ /** Optional parameters. */
1002
+ export interface GetTopHeaderOptionalParams
1003
+ extends coreClient.OperationOptions {}
1004
+
1005
+ /** Contains response data for the getTopHeader operation. */
1006
+ export type GetTopHeaderResponse = Header;
1007
+
1008
+ /** Optional parameters. */
1009
+ export interface GetCurrentKeyBlockOptionalParams
1010
+ extends coreClient.OperationOptions {}
1011
+
1012
+ /** Contains response data for the getCurrentKeyBlock operation. */
1013
+ export type GetCurrentKeyBlockResponse = KeyBlock;
1014
+
1015
+ /** Optional parameters. */
1016
+ export interface GetCurrentKeyBlockHashOptionalParams
1017
+ extends coreClient.OperationOptions {}
1018
+
1019
+ /** Contains response data for the getCurrentKeyBlockHash operation. */
1020
+ export type GetCurrentKeyBlockHashResponse = HashResponse;
1021
+
1022
+ /** Optional parameters. */
1023
+ export interface GetCurrentKeyBlockHeightOptionalParams
1024
+ extends coreClient.OperationOptions {}
1025
+
1026
+ /** Contains response data for the getCurrentKeyBlockHeight operation. */
1027
+ export type GetCurrentKeyBlockHeightResponse = HeightResponse;
1028
+
1029
+ /** Optional parameters. */
1030
+ export interface GetPendingKeyBlockOptionalParams
1031
+ extends coreClient.OperationOptions {}
1032
+
1033
+ /** Contains response data for the getPendingKeyBlock operation. */
1034
+ export type GetPendingKeyBlockResponse = KeyBlock;
1035
+
1036
+ /** Optional parameters. */
1037
+ export interface GetKeyBlockByHashOptionalParams
1038
+ extends coreClient.OperationOptions {}
1039
+
1040
+ /** Contains response data for the getKeyBlockByHash operation. */
1041
+ export type GetKeyBlockByHashResponse = KeyBlock;
1042
+
1043
+ /** Optional parameters. */
1044
+ export interface GetKeyBlockByHeightOptionalParams
1045
+ extends coreClient.OperationOptions {}
1046
+
1047
+ /** Contains response data for the getKeyBlockByHeight operation. */
1048
+ export type GetKeyBlockByHeightResponse = KeyBlock;
1049
+
1050
+ /** Optional parameters. */
1051
+ export interface GetMicroBlockHeaderByHashOptionalParams
1052
+ extends coreClient.OperationOptions {}
1053
+
1054
+ /** Contains response data for the getMicroBlockHeaderByHash operation. */
1055
+ export type GetMicroBlockHeaderByHashResponse = MicroBlockHeader;
1056
+
1057
+ /** Optional parameters. */
1058
+ export interface GetMicroBlockTransactionsByHashOptionalParams
1059
+ extends coreClient.OperationOptions {}
1060
+
1061
+ /** Contains response data for the getMicroBlockTransactionsByHash operation. */
1062
+ export type GetMicroBlockTransactionsByHashResponse = SignedTxs;
1063
+
1064
+ /** Optional parameters. */
1065
+ export interface GetMicroBlockTransactionByHashAndIndexOptionalParams
1066
+ extends coreClient.OperationOptions {}
1067
+
1068
+ /** Contains response data for the getMicroBlockTransactionByHashAndIndex operation. */
1069
+ export type GetMicroBlockTransactionByHashAndIndexResponse = SignedTx;
1070
+
1071
+ /** Optional parameters. */
1072
+ export interface GetMicroBlockTransactionsCountByHashOptionalParams
1073
+ extends coreClient.OperationOptions {}
1074
+
1075
+ /** Contains response data for the getMicroBlockTransactionsCountByHash operation. */
1076
+ export type GetMicroBlockTransactionsCountByHashResponse = CountResponse;
1077
+
1078
+ /** Optional parameters. */
1079
+ export interface GetCurrentGenerationOptionalParams
1080
+ extends coreClient.OperationOptions {}
1081
+
1082
+ /** Contains response data for the getCurrentGeneration operation. */
1083
+ export type GetCurrentGenerationResponse = Generation;
1084
+
1085
+ /** Optional parameters. */
1086
+ export interface GetGenerationByHashOptionalParams
1087
+ extends coreClient.OperationOptions {}
1088
+
1089
+ /** Contains response data for the getGenerationByHash operation. */
1090
+ export type GetGenerationByHashResponse = Generation;
1091
+
1092
+ /** Optional parameters. */
1093
+ export interface GetGenerationByHeightOptionalParams
1094
+ extends coreClient.OperationOptions {}
1095
+
1096
+ /** Contains response data for the getGenerationByHeight operation. */
1097
+ export type GetGenerationByHeightResponse = Generation;
1098
+
1099
+ /** Optional parameters. */
1100
+ export interface GetAccountByPubkeyOptionalParams
1101
+ extends coreClient.OperationOptions {}
1102
+
1103
+ /** Contains response data for the getAccountByPubkey operation. */
1104
+ export type GetAccountByPubkeyResponse = Account;
1105
+
1106
+ /** Optional parameters. */
1107
+ export interface GetAccountByPubkeyAndHeightOptionalParams
1108
+ extends coreClient.OperationOptions {}
1109
+
1110
+ /** Contains response data for the getAccountByPubkeyAndHeight operation. */
1111
+ export type GetAccountByPubkeyAndHeightResponse = Account;
1112
+
1113
+ /** Optional parameters. */
1114
+ export interface GetAccountByPubkeyAndHashOptionalParams
1115
+ extends coreClient.OperationOptions {}
1116
+
1117
+ /** Contains response data for the getAccountByPubkeyAndHash operation. */
1118
+ export type GetAccountByPubkeyAndHashResponse = Account;
1119
+
1120
+ /** Optional parameters. */
1121
+ export interface GetPendingAccountTransactionsByPubkeyOptionalParams
1122
+ extends coreClient.OperationOptions {}
1123
+
1124
+ /** Contains response data for the getPendingAccountTransactionsByPubkey operation. */
1125
+ export type GetPendingAccountTransactionsByPubkeyResponse = SignedTxs;
1126
+
1127
+ /** Optional parameters. */
1128
+ export interface GetAccountNextNonceOptionalParams
1129
+ extends coreClient.OperationOptions {
1130
+ /** 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. */
1131
+ strategy?: NextNonceStrategy;
1132
+ }
1133
+
1134
+ /** Contains response data for the getAccountNextNonce operation. */
1135
+ export type GetAccountNextNonceResponse = NextNonceResponse;
1136
+
1137
+ /** Optional parameters. */
1138
+ export interface ProtectedDryRunTxsOptionalParams
1139
+ extends coreClient.OperationOptions {}
1140
+
1141
+ /** Contains response data for the protectedDryRunTxs operation. */
1142
+ export type ProtectedDryRunTxsResponse = DryRunResults;
1143
+
1144
+ /** Optional parameters. */
1145
+ export interface GetTransactionByHashOptionalParams
1146
+ extends coreClient.OperationOptions {}
1147
+
1148
+ /** Contains response data for the getTransactionByHash operation. */
1149
+ export type GetTransactionByHashResponse = SignedTx;
1150
+
1151
+ /** Optional parameters. */
1152
+ export interface GetTransactionInfoByHashOptionalParams
1153
+ extends coreClient.OperationOptions {}
1154
+
1155
+ /** Contains response data for the getTransactionInfoByHash operation. */
1156
+ export type GetTransactionInfoByHashResponse = TxInfoObject;
1157
+
1158
+ /** Optional parameters. */
1159
+ export interface PostTransactionOptionalParams
1160
+ extends coreClient.OperationOptions {}
1161
+
1162
+ /** Contains response data for the postTransaction operation. */
1163
+ export type PostTransactionResponse = PostTxResponse;
1164
+
1165
+ /** Optional parameters. */
1166
+ export interface GetContractOptionalParams
1167
+ extends coreClient.OperationOptions {}
1168
+
1169
+ /** Contains response data for the getContract operation. */
1170
+ export type GetContractResponse = ContractObject;
1171
+
1172
+ /** Optional parameters. */
1173
+ export interface GetContractCodeOptionalParams
1174
+ extends coreClient.OperationOptions {}
1175
+
1176
+ /** Contains response data for the getContractCode operation. */
1177
+ export type GetContractCodeResponse = ByteCode;
1178
+
1179
+ /** Optional parameters. */
1180
+ export interface GetContractPoIOptionalParams
1181
+ extends coreClient.OperationOptions {}
1182
+
1183
+ /** Contains response data for the getContractPoI operation. */
1184
+ export type GetContractPoIResponse = PoI;
1185
+
1186
+ /** Optional parameters. */
1187
+ export interface GetOracleByPubkeyOptionalParams
1188
+ extends coreClient.OperationOptions {}
1189
+
1190
+ /** Contains response data for the getOracleByPubkey operation. */
1191
+ export type GetOracleByPubkeyResponse = RegisteredOracle;
1192
+
1193
+ /** Optional parameters. */
1194
+ export interface GetOracleQueriesByPubkeyOptionalParams
1195
+ extends coreClient.OperationOptions {
1196
+ /** Last query id in previous page */
1197
+ fromParam?: string;
1198
+ /** Max number of oracle queries */
1199
+ limit?: number;
1200
+ /** The type of a query: open, closed or all */
1201
+ typeParam?: OracleQueryType;
1202
+ }
1203
+
1204
+ /** Contains response data for the getOracleQueriesByPubkey operation. */
1205
+ export type GetOracleQueriesByPubkeyResponse = OracleQueries;
1206
+
1207
+ /** Optional parameters. */
1208
+ export interface GetOracleQueryByPubkeyAndQueryIdOptionalParams
1209
+ extends coreClient.OperationOptions {}
1210
+
1211
+ /** Contains response data for the getOracleQueryByPubkeyAndQueryId operation. */
1212
+ export type GetOracleQueryByPubkeyAndQueryIdResponse = OracleQuery;
1213
+
1214
+ /** Optional parameters. */
1215
+ export interface GetNameEntryByNameOptionalParams
1216
+ extends coreClient.OperationOptions {}
1217
+
1218
+ /** Contains response data for the getNameEntryByName operation. */
1219
+ export type GetNameEntryByNameResponse = NameEntry;
1220
+
1221
+ /** Optional parameters. */
1222
+ export interface GetChannelByPubkeyOptionalParams
1223
+ extends coreClient.OperationOptions {}
1224
+
1225
+ /** Contains response data for the getChannelByPubkey operation. */
1226
+ export type GetChannelByPubkeyResponse = Channel;
1227
+
1228
+ /** Optional parameters. */
1229
+ export interface GetPeerPubkeyOptionalParams
1230
+ extends coreClient.OperationOptions {}
1231
+
1232
+ /** Contains response data for the getPeerPubkey operation. */
1233
+ export type GetPeerPubkeyResponse = PeerPubKey;
1234
+
1235
+ /** Optional parameters. */
1236
+ export interface GetStatusOptionalParams extends coreClient.OperationOptions {}
1237
+
1238
+ /** Contains response data for the getStatus operation. */
1239
+ export type GetStatusResponse = Status;
1240
+
1241
+ /** Optional parameters. */
1242
+ export interface GetChainEndsOptionalParams
1243
+ extends coreClient.OperationOptions {}
1244
+
1245
+ /** Contains response data for the getChainEnds operation. */
1246
+ export type GetChainEndsResponse = {
1247
+ /** The parsed response body. */
1248
+ body: string[];
1249
+ };
1250
+
1251
+ /** Optional parameters. */
1252
+ export interface NodeOptionalParams extends coreClient.ServiceClientOptions {
1253
+ /** If this flag is set to true, the response will have all integers set as strings */
1254
+ intAsString?: boolean;
1255
+ /** Overrides client endpoint. */
1256
+ endpoint?: string;
1257
+ }