@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,1299 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
3
+ import * as Parameters from "./models/parameters";
4
+ import * as Mappers from "./models/mappers";
5
+ import {
6
+ NodeOptionalParams,
7
+ GetTopHeaderOptionalParams,
8
+ GetTopHeaderResponse,
9
+ GetCurrentKeyBlockOptionalParams,
10
+ GetCurrentKeyBlockResponse,
11
+ GetCurrentKeyBlockHashOptionalParams,
12
+ GetCurrentKeyBlockHashResponse,
13
+ GetCurrentKeyBlockHeightOptionalParams,
14
+ GetCurrentKeyBlockHeightResponse,
15
+ GetPendingKeyBlockOptionalParams,
16
+ GetPendingKeyBlockResponse,
17
+ GetKeyBlockByHashOptionalParams,
18
+ GetKeyBlockByHashResponse,
19
+ GetKeyBlockByHeightOptionalParams,
20
+ GetKeyBlockByHeightResponse,
21
+ GetMicroBlockHeaderByHashOptionalParams,
22
+ GetMicroBlockHeaderByHashResponse,
23
+ GetMicroBlockTransactionsByHashOptionalParams,
24
+ GetMicroBlockTransactionsByHashResponse,
25
+ GetMicroBlockTransactionByHashAndIndexOptionalParams,
26
+ GetMicroBlockTransactionByHashAndIndexResponse,
27
+ GetMicroBlockTransactionsCountByHashOptionalParams,
28
+ GetMicroBlockTransactionsCountByHashResponse,
29
+ GetCurrentGenerationOptionalParams,
30
+ GetCurrentGenerationResponse,
31
+ GetGenerationByHashOptionalParams,
32
+ GetGenerationByHashResponse,
33
+ GetGenerationByHeightOptionalParams,
34
+ GetGenerationByHeightResponse,
35
+ GetAccountByPubkeyOptionalParams,
36
+ GetAccountByPubkeyResponse,
37
+ GetAccountByPubkeyAndHeightOptionalParams,
38
+ GetAccountByPubkeyAndHeightResponse,
39
+ GetAccountByPubkeyAndHashOptionalParams,
40
+ GetAccountByPubkeyAndHashResponse,
41
+ GetPendingAccountTransactionsByPubkeyOptionalParams,
42
+ GetPendingAccountTransactionsByPubkeyResponse,
43
+ GetAccountNextNonceOptionalParams,
44
+ GetAccountNextNonceResponse,
45
+ DryRunInput,
46
+ ProtectedDryRunTxsOptionalParams,
47
+ ProtectedDryRunTxsResponse,
48
+ GetTransactionByHashOptionalParams,
49
+ GetTransactionByHashResponse,
50
+ GetTransactionInfoByHashOptionalParams,
51
+ GetTransactionInfoByHashResponse,
52
+ EncodedTx,
53
+ PostTransactionOptionalParams,
54
+ PostTransactionResponse,
55
+ GetContractOptionalParams,
56
+ GetContractResponse,
57
+ GetContractCodeOptionalParams,
58
+ GetContractCodeResponse,
59
+ GetContractPoIOptionalParams,
60
+ GetContractPoIResponse,
61
+ GetOracleByPubkeyOptionalParams,
62
+ GetOracleByPubkeyResponse,
63
+ GetOracleQueriesByPubkeyOptionalParams,
64
+ GetOracleQueriesByPubkeyResponse,
65
+ GetOracleQueryByPubkeyAndQueryIdOptionalParams,
66
+ GetOracleQueryByPubkeyAndQueryIdResponse,
67
+ GetNameEntryByNameOptionalParams,
68
+ GetNameEntryByNameResponse,
69
+ GetChannelByPubkeyOptionalParams,
70
+ GetChannelByPubkeyResponse,
71
+ GetPeerPubkeyOptionalParams,
72
+ GetPeerPubkeyResponse,
73
+ GetStatusOptionalParams,
74
+ GetStatusResponse,
75
+ GetChainEndsOptionalParams,
76
+ GetChainEndsResponse
77
+ } from "./models";
78
+
79
+ export class Node extends coreClient.ServiceClient {
80
+ $host: string;
81
+ intAsString?: boolean;
82
+
83
+ /**
84
+ * Initializes a new instance of the Node class.
85
+ * @param $host server parameter
86
+ * @param options The parameter options
87
+ */
88
+ constructor($host: string, options?: NodeOptionalParams) {
89
+ if ($host === undefined) {
90
+ throw new Error("'$host' cannot be null");
91
+ }
92
+
93
+ // Initializing default values for options
94
+ if (!options) {
95
+ options = {};
96
+ }
97
+ const defaults: NodeOptionalParams = {
98
+ requestContentType: "application/json; charset=utf-8"
99
+ };
100
+
101
+ const packageDetails = `azsdk-js-node/1.0.0-beta.1`;
102
+ const userAgentPrefix =
103
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
104
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
105
+ : `${packageDetails}`;
106
+
107
+ const optionsWithDefaults = {
108
+ ...defaults,
109
+ ...options,
110
+ userAgentOptions: {
111
+ userAgentPrefix
112
+ },
113
+ baseUri: options.endpoint ?? options.baseUri ?? "{$host}"
114
+ };
115
+ super(optionsWithDefaults);
116
+
117
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
118
+ const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
119
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
120
+ (pipelinePolicy) =>
121
+ pipelinePolicy.name ===
122
+ coreRestPipeline.bearerTokenAuthenticationPolicyName
123
+ );
124
+ if (!bearerTokenAuthenticationPolicyFound) {
125
+ this.pipeline.removePolicy({
126
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
127
+ });
128
+ this.pipeline.addPolicy(
129
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
130
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
131
+ challengeCallbacks: {
132
+ authorizeRequestOnChallenge:
133
+ coreClient.authorizeRequestOnClaimChallenge
134
+ }
135
+ })
136
+ );
137
+ }
138
+ }
139
+ // Parameter assignments
140
+ this.$host = $host;
141
+ }
142
+
143
+ /**
144
+ * Get the top header (either key or micro block)
145
+ * @param options The options parameters.
146
+ */
147
+ getTopHeader(
148
+ options?: GetTopHeaderOptionalParams
149
+ ): Promise<GetTopHeaderResponse> {
150
+ return this.sendOperationRequest({ options }, getTopHeaderOperationSpec);
151
+ }
152
+
153
+ /**
154
+ * Get the current key block
155
+ * @param options The options parameters.
156
+ */
157
+ getCurrentKeyBlock(
158
+ options?: GetCurrentKeyBlockOptionalParams
159
+ ): Promise<GetCurrentKeyBlockResponse> {
160
+ return this.sendOperationRequest(
161
+ { options },
162
+ getCurrentKeyBlockOperationSpec
163
+ );
164
+ }
165
+
166
+ /**
167
+ * Get the hash of the current key block
168
+ * @param options The options parameters.
169
+ */
170
+ getCurrentKeyBlockHash(
171
+ options?: GetCurrentKeyBlockHashOptionalParams
172
+ ): Promise<GetCurrentKeyBlockHashResponse> {
173
+ return this.sendOperationRequest(
174
+ { options },
175
+ getCurrentKeyBlockHashOperationSpec
176
+ );
177
+ }
178
+
179
+ /**
180
+ * Get the height of the current key block
181
+ * @param options The options parameters.
182
+ */
183
+ getCurrentKeyBlockHeight(
184
+ options?: GetCurrentKeyBlockHeightOptionalParams
185
+ ): Promise<GetCurrentKeyBlockHeightResponse> {
186
+ return this.sendOperationRequest(
187
+ { options },
188
+ getCurrentKeyBlockHeightOperationSpec
189
+ );
190
+ }
191
+
192
+ /**
193
+ * Get the pending key block
194
+ * @param options The options parameters.
195
+ */
196
+ getPendingKeyBlock(
197
+ options?: GetPendingKeyBlockOptionalParams
198
+ ): Promise<GetPendingKeyBlockResponse> {
199
+ return this.sendOperationRequest(
200
+ { options },
201
+ getPendingKeyBlockOperationSpec
202
+ );
203
+ }
204
+
205
+ /**
206
+ * Get a key block by hash
207
+ * @param hash The hash of the block - either a keyblock or a microblock
208
+ * @param options The options parameters.
209
+ */
210
+ getKeyBlockByHash(
211
+ hash: string,
212
+ options?: GetKeyBlockByHashOptionalParams
213
+ ): Promise<GetKeyBlockByHashResponse> {
214
+ return this.sendOperationRequest(
215
+ { hash, options },
216
+ getKeyBlockByHashOperationSpec
217
+ );
218
+ }
219
+
220
+ /**
221
+ * Get a key block by height
222
+ * @param height The height
223
+ * @param options The options parameters.
224
+ */
225
+ getKeyBlockByHeight(
226
+ height: number,
227
+ options?: GetKeyBlockByHeightOptionalParams
228
+ ): Promise<GetKeyBlockByHeightResponse> {
229
+ return this.sendOperationRequest(
230
+ { height, options },
231
+ getKeyBlockByHeightOperationSpec
232
+ );
233
+ }
234
+
235
+ /**
236
+ * Get a micro block header by hash
237
+ * @param hash The hash of the block - either a keyblock or a microblock
238
+ * @param options The options parameters.
239
+ */
240
+ getMicroBlockHeaderByHash(
241
+ hash: string,
242
+ options?: GetMicroBlockHeaderByHashOptionalParams
243
+ ): Promise<GetMicroBlockHeaderByHashResponse> {
244
+ return this.sendOperationRequest(
245
+ { hash, options },
246
+ getMicroBlockHeaderByHashOperationSpec
247
+ );
248
+ }
249
+
250
+ /**
251
+ * Get micro block transactions by hash
252
+ * @param hash The hash of the micro block
253
+ * @param options The options parameters.
254
+ */
255
+ getMicroBlockTransactionsByHash(
256
+ hash: string,
257
+ options?: GetMicroBlockTransactionsByHashOptionalParams
258
+ ): Promise<GetMicroBlockTransactionsByHashResponse> {
259
+ return this.sendOperationRequest(
260
+ { hash, options },
261
+ getMicroBlockTransactionsByHashOperationSpec
262
+ );
263
+ }
264
+
265
+ /**
266
+ * Get a micro block transaction by hash and index
267
+ * @param hash The hash of the micro block
268
+ * @param index The index of the transaction in a block
269
+ * @param options The options parameters.
270
+ */
271
+ getMicroBlockTransactionByHashAndIndex(
272
+ hash: string,
273
+ index: number,
274
+ options?: GetMicroBlockTransactionByHashAndIndexOptionalParams
275
+ ): Promise<GetMicroBlockTransactionByHashAndIndexResponse> {
276
+ return this.sendOperationRequest(
277
+ { hash, index, options },
278
+ getMicroBlockTransactionByHashAndIndexOperationSpec
279
+ );
280
+ }
281
+
282
+ /**
283
+ * Get micro block transaction count by hash
284
+ * @param hash The hash of the micro block
285
+ * @param options The options parameters.
286
+ */
287
+ getMicroBlockTransactionsCountByHash(
288
+ hash: string,
289
+ options?: GetMicroBlockTransactionsCountByHashOptionalParams
290
+ ): Promise<GetMicroBlockTransactionsCountByHashResponse> {
291
+ return this.sendOperationRequest(
292
+ { hash, options },
293
+ getMicroBlockTransactionsCountByHashOperationSpec
294
+ );
295
+ }
296
+
297
+ /**
298
+ * Get the current generation
299
+ * @param options The options parameters.
300
+ */
301
+ getCurrentGeneration(
302
+ options?: GetCurrentGenerationOptionalParams
303
+ ): Promise<GetCurrentGenerationResponse> {
304
+ return this.sendOperationRequest(
305
+ { options },
306
+ getCurrentGenerationOperationSpec
307
+ );
308
+ }
309
+
310
+ /**
311
+ * Get a generation by hash
312
+ * @param hash The hash of the key block
313
+ * @param options The options parameters.
314
+ */
315
+ getGenerationByHash(
316
+ hash: string,
317
+ options?: GetGenerationByHashOptionalParams
318
+ ): Promise<GetGenerationByHashResponse> {
319
+ return this.sendOperationRequest(
320
+ { hash, options },
321
+ getGenerationByHashOperationSpec
322
+ );
323
+ }
324
+
325
+ /**
326
+ * Get a generation by height
327
+ * @param height The height
328
+ * @param options The options parameters.
329
+ */
330
+ getGenerationByHeight(
331
+ height: number,
332
+ options?: GetGenerationByHeightOptionalParams
333
+ ): Promise<GetGenerationByHeightResponse> {
334
+ return this.sendOperationRequest(
335
+ { height, options },
336
+ getGenerationByHeightOperationSpec
337
+ );
338
+ }
339
+
340
+ /**
341
+ * Get an account by public key
342
+ * @param pubkey The public key of the account
343
+ * @param options The options parameters.
344
+ */
345
+ getAccountByPubkey(
346
+ pubkey: string,
347
+ options?: GetAccountByPubkeyOptionalParams
348
+ ): Promise<GetAccountByPubkeyResponse> {
349
+ return this.sendOperationRequest(
350
+ { pubkey, options },
351
+ getAccountByPubkeyOperationSpec
352
+ );
353
+ }
354
+
355
+ /**
356
+ * Get an account by public key after the opening key block of the generation at height
357
+ * @param pubkey The public key of the account
358
+ * @param height The height
359
+ * @param options The options parameters.
360
+ */
361
+ getAccountByPubkeyAndHeight(
362
+ pubkey: string,
363
+ height: number,
364
+ options?: GetAccountByPubkeyAndHeightOptionalParams
365
+ ): Promise<GetAccountByPubkeyAndHeightResponse> {
366
+ return this.sendOperationRequest(
367
+ { pubkey, height, options },
368
+ getAccountByPubkeyAndHeightOperationSpec
369
+ );
370
+ }
371
+
372
+ /**
373
+ * Get an account by public key after the block indicated by hash. Can be either a micro block or a
374
+ * keyblock hash
375
+ * @param pubkey The public key of the account
376
+ * @param hash The hash of the block - either a keyblock or a microblock
377
+ * @param options The options parameters.
378
+ */
379
+ getAccountByPubkeyAndHash(
380
+ pubkey: string,
381
+ hash: string,
382
+ options?: GetAccountByPubkeyAndHashOptionalParams
383
+ ): Promise<GetAccountByPubkeyAndHashResponse> {
384
+ return this.sendOperationRequest(
385
+ { pubkey, hash, options },
386
+ getAccountByPubkeyAndHashOperationSpec
387
+ );
388
+ }
389
+
390
+ /**
391
+ * Get pending account transactions by public key
392
+ * @param pubkey The public key of the account
393
+ * @param options The options parameters.
394
+ */
395
+ getPendingAccountTransactionsByPubkey(
396
+ pubkey: string,
397
+ options?: GetPendingAccountTransactionsByPubkeyOptionalParams
398
+ ): Promise<GetPendingAccountTransactionsByPubkeyResponse> {
399
+ return this.sendOperationRequest(
400
+ { pubkey, options },
401
+ getPendingAccountTransactionsByPubkeyOperationSpec
402
+ );
403
+ }
404
+
405
+ /**
406
+ * Get an account's next nonce; This is computed according to whatever is the current account nonce and
407
+ * what transactions are currently present in the transaction pool
408
+ * @param pubkey The public key of the account
409
+ * @param options The options parameters.
410
+ */
411
+ getAccountNextNonce(
412
+ pubkey: string,
413
+ options?: GetAccountNextNonceOptionalParams
414
+ ): Promise<GetAccountNextNonceResponse> {
415
+ return this.sendOperationRequest(
416
+ { pubkey, options },
417
+ getAccountNextNonceOperationSpec
418
+ );
419
+ }
420
+
421
+ /**
422
+ * Dry-run transactions on top of a given block. Supports all TXs except GAMetaTx, PayingForTx and
423
+ * OffchainTx. The maximum gas limit of all calls is capped. The maximum gas limit per request is a
424
+ * global node setting. Since DryRunCallReq object do not have a mandatory gas field, if not set a
425
+ * default value of 1000000 is being used instead.
426
+ * @param body transactions
427
+ * @param options The options parameters.
428
+ */
429
+ protectedDryRunTxs(
430
+ body: DryRunInput,
431
+ options?: ProtectedDryRunTxsOptionalParams
432
+ ): Promise<ProtectedDryRunTxsResponse> {
433
+ return this.sendOperationRequest(
434
+ { body, options },
435
+ protectedDryRunTxsOperationSpec
436
+ );
437
+ }
438
+
439
+ /**
440
+ * Get a transaction by hash
441
+ * @param hash The hash of the transaction
442
+ * @param options The options parameters.
443
+ */
444
+ getTransactionByHash(
445
+ hash: string,
446
+ options?: GetTransactionByHashOptionalParams
447
+ ): Promise<GetTransactionByHashResponse> {
448
+ return this.sendOperationRequest(
449
+ { hash, options },
450
+ getTransactionByHashOperationSpec
451
+ );
452
+ }
453
+
454
+ /**
455
+ * @param hash The hash of the transaction
456
+ * @param options The options parameters.
457
+ */
458
+ getTransactionInfoByHash(
459
+ hash: string,
460
+ options?: GetTransactionInfoByHashOptionalParams
461
+ ): Promise<GetTransactionInfoByHashResponse> {
462
+ return this.sendOperationRequest(
463
+ { hash, options },
464
+ getTransactionInfoByHashOperationSpec
465
+ );
466
+ }
467
+
468
+ /**
469
+ * Post a new transaction
470
+ * @param body The new transaction
471
+ * @param options The options parameters.
472
+ */
473
+ postTransaction(
474
+ body: EncodedTx,
475
+ options?: PostTransactionOptionalParams
476
+ ): Promise<PostTransactionResponse> {
477
+ return this.sendOperationRequest(
478
+ { body, options },
479
+ postTransactionOperationSpec
480
+ );
481
+ }
482
+
483
+ /**
484
+ * Get a contract by pubkey
485
+ * @param pubkey Contract pubkey to get proof for
486
+ * @param options The options parameters.
487
+ */
488
+ getContract(
489
+ pubkey: string,
490
+ options?: GetContractOptionalParams
491
+ ): Promise<GetContractResponse> {
492
+ return this.sendOperationRequest(
493
+ { pubkey, options },
494
+ getContractOperationSpec
495
+ );
496
+ }
497
+
498
+ /**
499
+ * Get contract code by pubkey
500
+ * @param pubkey Contract pubkey to get proof for
501
+ * @param options The options parameters.
502
+ */
503
+ getContractCode(
504
+ pubkey: string,
505
+ options?: GetContractCodeOptionalParams
506
+ ): Promise<GetContractCodeResponse> {
507
+ return this.sendOperationRequest(
508
+ { pubkey, options },
509
+ getContractCodeOperationSpec
510
+ );
511
+ }
512
+
513
+ /**
514
+ * Get a proof of inclusion for a contract
515
+ * @param pubkey Contract pubkey to get proof for
516
+ * @param options The options parameters.
517
+ */
518
+ getContractPoI(
519
+ pubkey: string,
520
+ options?: GetContractPoIOptionalParams
521
+ ): Promise<GetContractPoIResponse> {
522
+ return this.sendOperationRequest(
523
+ { pubkey, options },
524
+ getContractPoIOperationSpec
525
+ );
526
+ }
527
+
528
+ /**
529
+ * Get an oracle by public key
530
+ * @param pubkey The public key of the oracle
531
+ * @param options The options parameters.
532
+ */
533
+ getOracleByPubkey(
534
+ pubkey: string,
535
+ options?: GetOracleByPubkeyOptionalParams
536
+ ): Promise<GetOracleByPubkeyResponse> {
537
+ return this.sendOperationRequest(
538
+ { pubkey, options },
539
+ getOracleByPubkeyOperationSpec
540
+ );
541
+ }
542
+
543
+ /**
544
+ * Get oracle queries by public key
545
+ * @param pubkey The public key of the oracle
546
+ * @param options The options parameters.
547
+ */
548
+ getOracleQueriesByPubkey(
549
+ pubkey: string,
550
+ options?: GetOracleQueriesByPubkeyOptionalParams
551
+ ): Promise<GetOracleQueriesByPubkeyResponse> {
552
+ return this.sendOperationRequest(
553
+ { pubkey, options },
554
+ getOracleQueriesByPubkeyOperationSpec
555
+ );
556
+ }
557
+
558
+ /**
559
+ * Get an oracle query by public key and query ID
560
+ * @param pubkey The public key of the oracle
561
+ * @param queryId The ID of the query
562
+ * @param options The options parameters.
563
+ */
564
+ getOracleQueryByPubkeyAndQueryId(
565
+ pubkey: string,
566
+ queryId: string,
567
+ options?: GetOracleQueryByPubkeyAndQueryIdOptionalParams
568
+ ): Promise<GetOracleQueryByPubkeyAndQueryIdResponse> {
569
+ return this.sendOperationRequest(
570
+ { pubkey, queryId, options },
571
+ getOracleQueryByPubkeyAndQueryIdOperationSpec
572
+ );
573
+ }
574
+
575
+ /**
576
+ * Get name entry from naming system
577
+ * @param name The name key of the name entry
578
+ * @param options The options parameters.
579
+ */
580
+ getNameEntryByName(
581
+ name: string,
582
+ options?: GetNameEntryByNameOptionalParams
583
+ ): Promise<GetNameEntryByNameResponse> {
584
+ return this.sendOperationRequest(
585
+ { name, options },
586
+ getNameEntryByNameOperationSpec
587
+ );
588
+ }
589
+
590
+ /**
591
+ * Get channel by public key
592
+ * @param pubkey The pubkey of the channel
593
+ * @param options The options parameters.
594
+ */
595
+ getChannelByPubkey(
596
+ pubkey: string,
597
+ options?: GetChannelByPubkeyOptionalParams
598
+ ): Promise<GetChannelByPubkeyResponse> {
599
+ return this.sendOperationRequest(
600
+ { pubkey, options },
601
+ getChannelByPubkeyOperationSpec
602
+ );
603
+ }
604
+
605
+ /**
606
+ * Get peer public key
607
+ * @param options The options parameters.
608
+ */
609
+ getPeerPubkey(
610
+ options?: GetPeerPubkeyOptionalParams
611
+ ): Promise<GetPeerPubkeyResponse> {
612
+ return this.sendOperationRequest({ options }, getPeerPubkeyOperationSpec);
613
+ }
614
+
615
+ /**
616
+ * Get the status of a node
617
+ * @param options The options parameters.
618
+ */
619
+ getStatus(options?: GetStatusOptionalParams): Promise<GetStatusResponse> {
620
+ return this.sendOperationRequest({ options }, getStatusOperationSpec);
621
+ }
622
+
623
+ /**
624
+ * Get oldest keyblock hashes counting from genesis including orphans
625
+ * @param options The options parameters.
626
+ */
627
+ getChainEnds(
628
+ options?: GetChainEndsOptionalParams
629
+ ): Promise<GetChainEndsResponse> {
630
+ return this.sendOperationRequest({ options }, getChainEndsOperationSpec);
631
+ }
632
+ }
633
+ // Operation Specifications
634
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
635
+
636
+ const getTopHeaderOperationSpec: coreClient.OperationSpec = {
637
+ path: "/v3/headers/top",
638
+ httpMethod: "GET",
639
+ responses: {
640
+ 200: {
641
+ bodyMapper: Mappers.Header
642
+ },
643
+ 404: {
644
+ bodyMapper: Mappers.ErrorModel,
645
+ isError: true
646
+ }
647
+ },
648
+ queryParameters: [Parameters.intAsString],
649
+ urlParameters: [Parameters.$host],
650
+ headerParameters: [Parameters.accept],
651
+ serializer
652
+ };
653
+ const getCurrentKeyBlockOperationSpec: coreClient.OperationSpec = {
654
+ path: "/v3/key-blocks/current",
655
+ httpMethod: "GET",
656
+ responses: {
657
+ 200: {
658
+ bodyMapper: Mappers.KeyBlock
659
+ },
660
+ 404: {
661
+ bodyMapper: Mappers.ErrorModel,
662
+ isError: true
663
+ }
664
+ },
665
+ queryParameters: [Parameters.intAsString],
666
+ urlParameters: [Parameters.$host],
667
+ headerParameters: [Parameters.accept],
668
+ serializer
669
+ };
670
+ const getCurrentKeyBlockHashOperationSpec: coreClient.OperationSpec = {
671
+ path: "/v3/key-blocks/current/hash",
672
+ httpMethod: "GET",
673
+ responses: {
674
+ 200: {
675
+ bodyMapper: Mappers.HashResponse
676
+ },
677
+ 404: {
678
+ bodyMapper: Mappers.ErrorModel,
679
+ isError: true
680
+ }
681
+ },
682
+ queryParameters: [Parameters.intAsString],
683
+ urlParameters: [Parameters.$host],
684
+ headerParameters: [Parameters.accept],
685
+ serializer
686
+ };
687
+ const getCurrentKeyBlockHeightOperationSpec: coreClient.OperationSpec = {
688
+ path: "/v3/key-blocks/current/height",
689
+ httpMethod: "GET",
690
+ responses: {
691
+ 200: {
692
+ bodyMapper: Mappers.HeightResponse
693
+ },
694
+ 404: {
695
+ bodyMapper: Mappers.ErrorModel,
696
+ isError: true
697
+ }
698
+ },
699
+ queryParameters: [Parameters.intAsString],
700
+ urlParameters: [Parameters.$host],
701
+ headerParameters: [Parameters.accept],
702
+ serializer
703
+ };
704
+ const getPendingKeyBlockOperationSpec: coreClient.OperationSpec = {
705
+ path: "/v3/key-blocks/pending",
706
+ httpMethod: "GET",
707
+ responses: {
708
+ 200: {
709
+ bodyMapper: Mappers.KeyBlock
710
+ },
711
+ 400: {
712
+ bodyMapper: Mappers.ErrorModel,
713
+ isError: true
714
+ },
715
+ 404: {
716
+ bodyMapper: Mappers.ErrorModel,
717
+ isError: true
718
+ }
719
+ },
720
+ queryParameters: [Parameters.intAsString],
721
+ urlParameters: [Parameters.$host],
722
+ headerParameters: [Parameters.accept],
723
+ serializer
724
+ };
725
+ const getKeyBlockByHashOperationSpec: coreClient.OperationSpec = {
726
+ path: "/v3/key-blocks/hash/{hash}",
727
+ httpMethod: "GET",
728
+ responses: {
729
+ 200: {
730
+ bodyMapper: Mappers.KeyBlock
731
+ },
732
+ 400: {
733
+ bodyMapper: Mappers.ErrorModel,
734
+ isError: true
735
+ },
736
+ 404: {
737
+ bodyMapper: Mappers.ErrorModel,
738
+ isError: true
739
+ }
740
+ },
741
+ queryParameters: [Parameters.intAsString],
742
+ urlParameters: [Parameters.$host, Parameters.hash],
743
+ headerParameters: [Parameters.accept],
744
+ serializer
745
+ };
746
+ const getKeyBlockByHeightOperationSpec: coreClient.OperationSpec = {
747
+ path: "/v3/key-blocks/height/{height}",
748
+ httpMethod: "GET",
749
+ responses: {
750
+ 200: {
751
+ bodyMapper: Mappers.KeyBlock
752
+ },
753
+ 404: {
754
+ bodyMapper: Mappers.ErrorModel,
755
+ isError: true
756
+ }
757
+ },
758
+ queryParameters: [Parameters.intAsString],
759
+ urlParameters: [Parameters.$host, Parameters.height],
760
+ headerParameters: [Parameters.accept],
761
+ serializer
762
+ };
763
+ const getMicroBlockHeaderByHashOperationSpec: coreClient.OperationSpec = {
764
+ path: "/v3/micro-blocks/hash/{hash}/header",
765
+ httpMethod: "GET",
766
+ responses: {
767
+ 200: {
768
+ bodyMapper: Mappers.MicroBlockHeader
769
+ },
770
+ 400: {
771
+ bodyMapper: Mappers.ErrorModel,
772
+ isError: true
773
+ },
774
+ 404: {
775
+ bodyMapper: Mappers.ErrorModel,
776
+ isError: true
777
+ }
778
+ },
779
+ queryParameters: [Parameters.intAsString],
780
+ urlParameters: [Parameters.$host, Parameters.hash],
781
+ headerParameters: [Parameters.accept],
782
+ serializer
783
+ };
784
+ const getMicroBlockTransactionsByHashOperationSpec: coreClient.OperationSpec = {
785
+ path: "/v3/micro-blocks/hash/{hash}/transactions",
786
+ httpMethod: "GET",
787
+ responses: {
788
+ 200: {
789
+ bodyMapper: Mappers.SignedTxs
790
+ },
791
+ 400: {
792
+ bodyMapper: Mappers.ErrorModel,
793
+ isError: true
794
+ },
795
+ 404: {
796
+ bodyMapper: Mappers.ErrorModel,
797
+ isError: true
798
+ }
799
+ },
800
+ queryParameters: [Parameters.intAsString],
801
+ urlParameters: [Parameters.$host, Parameters.hash],
802
+ headerParameters: [Parameters.accept],
803
+ serializer
804
+ };
805
+ const getMicroBlockTransactionByHashAndIndexOperationSpec: coreClient.OperationSpec = {
806
+ path: "/v3/micro-blocks/hash/{hash}/transactions/index/{index}",
807
+ httpMethod: "GET",
808
+ responses: {
809
+ 200: {
810
+ bodyMapper: Mappers.SignedTx
811
+ },
812
+ 400: {
813
+ bodyMapper: Mappers.ErrorModel,
814
+ isError: true
815
+ },
816
+ 404: {
817
+ bodyMapper: Mappers.ErrorModel,
818
+ isError: true
819
+ }
820
+ },
821
+ queryParameters: [Parameters.intAsString],
822
+ urlParameters: [Parameters.$host, Parameters.hash, Parameters.index],
823
+ headerParameters: [Parameters.accept],
824
+ serializer
825
+ };
826
+ const getMicroBlockTransactionsCountByHashOperationSpec: coreClient.OperationSpec = {
827
+ path: "/v3/micro-blocks/hash/{hash}/transactions/count",
828
+ httpMethod: "GET",
829
+ responses: {
830
+ 200: {
831
+ bodyMapper: Mappers.CountResponse
832
+ },
833
+ 400: {
834
+ bodyMapper: Mappers.ErrorModel,
835
+ isError: true
836
+ },
837
+ 404: {
838
+ bodyMapper: Mappers.ErrorModel,
839
+ isError: true
840
+ }
841
+ },
842
+ queryParameters: [Parameters.intAsString],
843
+ urlParameters: [Parameters.$host, Parameters.hash],
844
+ headerParameters: [Parameters.accept],
845
+ serializer
846
+ };
847
+ const getCurrentGenerationOperationSpec: coreClient.OperationSpec = {
848
+ path: "/v3/generations/current",
849
+ httpMethod: "GET",
850
+ responses: {
851
+ 200: {
852
+ bodyMapper: Mappers.Generation
853
+ },
854
+ 404: {
855
+ bodyMapper: Mappers.ErrorModel,
856
+ isError: true
857
+ }
858
+ },
859
+ queryParameters: [Parameters.intAsString],
860
+ urlParameters: [Parameters.$host],
861
+ headerParameters: [Parameters.accept],
862
+ serializer
863
+ };
864
+ const getGenerationByHashOperationSpec: coreClient.OperationSpec = {
865
+ path: "/v3/generations/hash/{hash}",
866
+ httpMethod: "GET",
867
+ responses: {
868
+ 200: {
869
+ bodyMapper: Mappers.Generation
870
+ },
871
+ 400: {
872
+ bodyMapper: Mappers.ErrorModel,
873
+ isError: true
874
+ },
875
+ 404: {
876
+ bodyMapper: Mappers.ErrorModel,
877
+ isError: true
878
+ }
879
+ },
880
+ queryParameters: [Parameters.intAsString],
881
+ urlParameters: [Parameters.$host, Parameters.hash],
882
+ headerParameters: [Parameters.accept],
883
+ serializer
884
+ };
885
+ const getGenerationByHeightOperationSpec: coreClient.OperationSpec = {
886
+ path: "/v3/generations/height/{height}",
887
+ httpMethod: "GET",
888
+ responses: {
889
+ 200: {
890
+ bodyMapper: Mappers.Generation
891
+ },
892
+ 404: {
893
+ bodyMapper: Mappers.ErrorModel,
894
+ isError: true
895
+ }
896
+ },
897
+ queryParameters: [Parameters.intAsString],
898
+ urlParameters: [Parameters.$host, Parameters.height],
899
+ headerParameters: [Parameters.accept],
900
+ serializer
901
+ };
902
+ const getAccountByPubkeyOperationSpec: coreClient.OperationSpec = {
903
+ path: "/v3/accounts/{pubkey}",
904
+ httpMethod: "GET",
905
+ responses: {
906
+ 200: {
907
+ bodyMapper: Mappers.Account
908
+ },
909
+ 400: {
910
+ bodyMapper: Mappers.ErrorModel,
911
+ isError: true
912
+ },
913
+ 404: {
914
+ bodyMapper: Mappers.ErrorModel,
915
+ isError: true
916
+ }
917
+ },
918
+ queryParameters: [Parameters.intAsString],
919
+ urlParameters: [Parameters.$host, Parameters.pubkey],
920
+ headerParameters: [Parameters.accept],
921
+ serializer
922
+ };
923
+ const getAccountByPubkeyAndHeightOperationSpec: coreClient.OperationSpec = {
924
+ path: "/v3/accounts/{pubkey}/height/{height}",
925
+ httpMethod: "GET",
926
+ responses: {
927
+ 200: {
928
+ bodyMapper: Mappers.Account
929
+ },
930
+ 400: {
931
+ bodyMapper: Mappers.ErrorModel,
932
+ isError: true
933
+ },
934
+ 404: {
935
+ bodyMapper: Mappers.ErrorModel,
936
+ isError: true
937
+ }
938
+ },
939
+ queryParameters: [Parameters.intAsString],
940
+ urlParameters: [Parameters.$host, Parameters.height, Parameters.pubkey],
941
+ headerParameters: [Parameters.accept],
942
+ serializer
943
+ };
944
+ const getAccountByPubkeyAndHashOperationSpec: coreClient.OperationSpec = {
945
+ path: "/v3/accounts/{pubkey}/hash/{hash}",
946
+ httpMethod: "GET",
947
+ responses: {
948
+ 200: {
949
+ bodyMapper: Mappers.Account
950
+ },
951
+ 400: {
952
+ bodyMapper: Mappers.ErrorModel,
953
+ isError: true
954
+ },
955
+ 404: {
956
+ bodyMapper: Mappers.ErrorModel,
957
+ isError: true
958
+ }
959
+ },
960
+ queryParameters: [Parameters.intAsString],
961
+ urlParameters: [Parameters.$host, Parameters.hash, Parameters.pubkey],
962
+ headerParameters: [Parameters.accept],
963
+ serializer
964
+ };
965
+ const getPendingAccountTransactionsByPubkeyOperationSpec: coreClient.OperationSpec = {
966
+ path: "/v3/accounts/{pubkey}/transactions/pending",
967
+ httpMethod: "GET",
968
+ responses: {
969
+ 200: {
970
+ bodyMapper: Mappers.SignedTxs
971
+ },
972
+ 400: {
973
+ bodyMapper: Mappers.ErrorModel,
974
+ isError: true
975
+ },
976
+ 404: {
977
+ bodyMapper: Mappers.ErrorModel,
978
+ isError: true
979
+ }
980
+ },
981
+ queryParameters: [Parameters.intAsString],
982
+ urlParameters: [Parameters.$host, Parameters.pubkey],
983
+ headerParameters: [Parameters.accept],
984
+ serializer
985
+ };
986
+ const getAccountNextNonceOperationSpec: coreClient.OperationSpec = {
987
+ path: "/v3/accounts/{pubkey}/next-nonce",
988
+ httpMethod: "GET",
989
+ responses: {
990
+ 200: {
991
+ bodyMapper: Mappers.NextNonceResponse
992
+ },
993
+ 400: {
994
+ bodyMapper: Mappers.ErrorModel,
995
+ isError: true
996
+ },
997
+ 404: {
998
+ bodyMapper: Mappers.ErrorModel,
999
+ isError: true
1000
+ }
1001
+ },
1002
+ queryParameters: [Parameters.intAsString, Parameters.strategy],
1003
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1004
+ headerParameters: [Parameters.accept],
1005
+ serializer
1006
+ };
1007
+ const protectedDryRunTxsOperationSpec: coreClient.OperationSpec = {
1008
+ path: "/v3/dry-run",
1009
+ httpMethod: "POST",
1010
+ responses: {
1011
+ 200: {
1012
+ bodyMapper: Mappers.DryRunResults
1013
+ },
1014
+ 403: {
1015
+ bodyMapper: Mappers.ErrorModel,
1016
+ isError: true
1017
+ }
1018
+ },
1019
+ requestBody: Parameters.body,
1020
+ queryParameters: [Parameters.intAsString],
1021
+ urlParameters: [Parameters.$host],
1022
+ headerParameters: [Parameters.accept, Parameters.contentType],
1023
+ mediaType: "json",
1024
+ serializer
1025
+ };
1026
+ const getTransactionByHashOperationSpec: coreClient.OperationSpec = {
1027
+ path: "/v3/transactions/{hash}",
1028
+ httpMethod: "GET",
1029
+ responses: {
1030
+ 200: {
1031
+ bodyMapper: Mappers.SignedTx
1032
+ },
1033
+ 400: {
1034
+ bodyMapper: Mappers.ErrorModel,
1035
+ isError: true
1036
+ },
1037
+ 404: {
1038
+ bodyMapper: Mappers.ErrorModel,
1039
+ isError: true
1040
+ }
1041
+ },
1042
+ queryParameters: [Parameters.intAsString],
1043
+ urlParameters: [Parameters.$host, Parameters.hash],
1044
+ headerParameters: [Parameters.accept],
1045
+ serializer
1046
+ };
1047
+ const getTransactionInfoByHashOperationSpec: coreClient.OperationSpec = {
1048
+ path: "/v3/transactions/{hash}/info",
1049
+ httpMethod: "GET",
1050
+ responses: {
1051
+ 200: {
1052
+ bodyMapper: Mappers.TxInfoObject
1053
+ },
1054
+ 400: {
1055
+ bodyMapper: Mappers.ErrorModel,
1056
+ isError: true
1057
+ },
1058
+ 404: {
1059
+ bodyMapper: Mappers.ErrorModel,
1060
+ isError: true
1061
+ }
1062
+ },
1063
+ queryParameters: [Parameters.intAsString],
1064
+ urlParameters: [Parameters.$host, Parameters.hash],
1065
+ headerParameters: [Parameters.accept],
1066
+ serializer
1067
+ };
1068
+ const postTransactionOperationSpec: coreClient.OperationSpec = {
1069
+ path: "/v3/transactions",
1070
+ httpMethod: "POST",
1071
+ responses: {
1072
+ 200: {
1073
+ bodyMapper: Mappers.PostTxResponse
1074
+ },
1075
+ 400: {
1076
+ bodyMapper: Mappers.ErrorModel,
1077
+ isError: true
1078
+ }
1079
+ },
1080
+ requestBody: Parameters.body1,
1081
+ queryParameters: [Parameters.intAsString],
1082
+ urlParameters: [Parameters.$host],
1083
+ headerParameters: [Parameters.accept, Parameters.contentType],
1084
+ mediaType: "json",
1085
+ serializer
1086
+ };
1087
+ const getContractOperationSpec: coreClient.OperationSpec = {
1088
+ path: "/v3/contracts/{pubkey}",
1089
+ httpMethod: "GET",
1090
+ responses: {
1091
+ 200: {
1092
+ bodyMapper: Mappers.ContractObject
1093
+ },
1094
+ 400: {
1095
+ bodyMapper: Mappers.ErrorModel,
1096
+ isError: true
1097
+ },
1098
+ 404: {
1099
+ isError: true
1100
+ }
1101
+ },
1102
+ queryParameters: [Parameters.intAsString],
1103
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1104
+ headerParameters: [Parameters.accept],
1105
+ serializer
1106
+ };
1107
+ const getContractCodeOperationSpec: coreClient.OperationSpec = {
1108
+ path: "/v3/contracts/{pubkey}/code",
1109
+ httpMethod: "GET",
1110
+ responses: {
1111
+ 200: {
1112
+ bodyMapper: Mappers.ByteCode
1113
+ },
1114
+ 400: {
1115
+ bodyMapper: Mappers.ErrorModel,
1116
+ isError: true
1117
+ },
1118
+ 404: {
1119
+ bodyMapper: Mappers.ErrorModel,
1120
+ isError: true
1121
+ }
1122
+ },
1123
+ queryParameters: [Parameters.intAsString],
1124
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1125
+ headerParameters: [Parameters.accept],
1126
+ serializer
1127
+ };
1128
+ const getContractPoIOperationSpec: coreClient.OperationSpec = {
1129
+ path: "/v3/contracts/{pubkey}/poi",
1130
+ httpMethod: "GET",
1131
+ responses: {
1132
+ 200: {
1133
+ bodyMapper: Mappers.PoI
1134
+ },
1135
+ 400: {
1136
+ bodyMapper: Mappers.ErrorModel,
1137
+ isError: true
1138
+ },
1139
+ 404: {
1140
+ bodyMapper: Mappers.ErrorModel,
1141
+ isError: true
1142
+ }
1143
+ },
1144
+ queryParameters: [Parameters.intAsString],
1145
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1146
+ headerParameters: [Parameters.accept],
1147
+ serializer
1148
+ };
1149
+ const getOracleByPubkeyOperationSpec: coreClient.OperationSpec = {
1150
+ path: "/v3/oracles/{pubkey}",
1151
+ httpMethod: "GET",
1152
+ responses: {
1153
+ 200: {
1154
+ bodyMapper: Mappers.RegisteredOracle
1155
+ },
1156
+ 400: {
1157
+ bodyMapper: Mappers.ErrorModel,
1158
+ isError: true
1159
+ },
1160
+ 404: {
1161
+ bodyMapper: Mappers.ErrorModel,
1162
+ isError: true
1163
+ }
1164
+ },
1165
+ queryParameters: [Parameters.intAsString],
1166
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1167
+ headerParameters: [Parameters.accept],
1168
+ serializer
1169
+ };
1170
+ const getOracleQueriesByPubkeyOperationSpec: coreClient.OperationSpec = {
1171
+ path: "/v3/oracles/{pubkey}/queries",
1172
+ httpMethod: "GET",
1173
+ responses: {
1174
+ 200: {
1175
+ bodyMapper: Mappers.OracleQueries
1176
+ },
1177
+ 400: {
1178
+ bodyMapper: Mappers.ErrorModel,
1179
+ isError: true
1180
+ },
1181
+ 404: {
1182
+ bodyMapper: Mappers.ErrorModel,
1183
+ isError: true
1184
+ }
1185
+ },
1186
+ queryParameters: [
1187
+ Parameters.intAsString,
1188
+ Parameters.fromParam,
1189
+ Parameters.limit,
1190
+ Parameters.typeParam
1191
+ ],
1192
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1193
+ headerParameters: [Parameters.accept],
1194
+ serializer
1195
+ };
1196
+ const getOracleQueryByPubkeyAndQueryIdOperationSpec: coreClient.OperationSpec = {
1197
+ path: "/v3/oracles/{pubkey}/queries/{query-id}",
1198
+ httpMethod: "GET",
1199
+ responses: {
1200
+ 200: {
1201
+ bodyMapper: Mappers.OracleQuery
1202
+ },
1203
+ 400: {
1204
+ bodyMapper: Mappers.ErrorModel,
1205
+ isError: true
1206
+ },
1207
+ 404: {
1208
+ bodyMapper: Mappers.ErrorModel,
1209
+ isError: true
1210
+ }
1211
+ },
1212
+ queryParameters: [Parameters.intAsString],
1213
+ urlParameters: [Parameters.$host, Parameters.pubkey, Parameters.queryId],
1214
+ headerParameters: [Parameters.accept],
1215
+ serializer
1216
+ };
1217
+ const getNameEntryByNameOperationSpec: coreClient.OperationSpec = {
1218
+ path: "/v3/names/{name}",
1219
+ httpMethod: "GET",
1220
+ responses: {
1221
+ 200: {
1222
+ bodyMapper: Mappers.NameEntry
1223
+ },
1224
+ 400: {
1225
+ bodyMapper: Mappers.ErrorModel,
1226
+ isError: true
1227
+ },
1228
+ 404: {
1229
+ bodyMapper: Mappers.ErrorModel,
1230
+ isError: true
1231
+ }
1232
+ },
1233
+ queryParameters: [Parameters.intAsString],
1234
+ urlParameters: [Parameters.$host, Parameters.name],
1235
+ headerParameters: [Parameters.accept],
1236
+ serializer
1237
+ };
1238
+ const getChannelByPubkeyOperationSpec: coreClient.OperationSpec = {
1239
+ path: "/v3/channels/{pubkey}",
1240
+ httpMethod: "GET",
1241
+ responses: {
1242
+ 200: {
1243
+ bodyMapper: Mappers.Channel
1244
+ },
1245
+ 400: {
1246
+ bodyMapper: Mappers.ErrorModel,
1247
+ isError: true
1248
+ },
1249
+ 404: {
1250
+ bodyMapper: Mappers.ErrorModel,
1251
+ isError: true
1252
+ }
1253
+ },
1254
+ queryParameters: [Parameters.intAsString],
1255
+ urlParameters: [Parameters.$host, Parameters.pubkey],
1256
+ headerParameters: [Parameters.accept],
1257
+ serializer
1258
+ };
1259
+ const getPeerPubkeyOperationSpec: coreClient.OperationSpec = {
1260
+ path: "/v3/peers/pubkey",
1261
+ httpMethod: "GET",
1262
+ responses: {
1263
+ 200: {
1264
+ bodyMapper: Mappers.PeerPubKey
1265
+ }
1266
+ },
1267
+ queryParameters: [Parameters.intAsString],
1268
+ urlParameters: [Parameters.$host],
1269
+ headerParameters: [Parameters.accept],
1270
+ serializer
1271
+ };
1272
+ const getStatusOperationSpec: coreClient.OperationSpec = {
1273
+ path: "/v3/status",
1274
+ httpMethod: "GET",
1275
+ responses: {
1276
+ 200: {
1277
+ bodyMapper: Mappers.Status
1278
+ }
1279
+ },
1280
+ queryParameters: [Parameters.intAsString],
1281
+ urlParameters: [Parameters.$host],
1282
+ headerParameters: [Parameters.accept],
1283
+ serializer
1284
+ };
1285
+ const getChainEndsOperationSpec: coreClient.OperationSpec = {
1286
+ path: "/v3/status/chain-ends",
1287
+ httpMethod: "GET",
1288
+ responses: {
1289
+ 200: {
1290
+ bodyMapper: {
1291
+ type: { name: "Sequence", element: { type: { name: "String" } } }
1292
+ }
1293
+ }
1294
+ },
1295
+ queryParameters: [Parameters.intAsString],
1296
+ urlParameters: [Parameters.$host],
1297
+ headerParameters: [Parameters.accept],
1298
+ serializer
1299
+ };