@aeternity/aepp-sdk 11.0.1 → 12.0.0

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