@pezkuwi/api 16.5.8 → 16.5.10

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 (381) hide show
  1. package/bundle-pezkuwi-api.js +24 -18
  2. package/cjs/packageInfo.js +1 -1
  3. package/cjs/submittable/createClass.js +1 -0
  4. package/package.json +18 -17
  5. package/packageInfo.js +1 -1
  6. package/submittable/createClass.js +1 -0
  7. package/build/LICENSE +0 -201
  8. package/build/README.md +0 -100
  9. package/build/augment.d.ts +0 -1
  10. package/build/augment.js +0 -1
  11. package/build/base/Decorate.d.ts +0 -143
  12. package/build/base/Decorate.js +0 -752
  13. package/build/base/Events.d.ts +0 -67
  14. package/build/base/Events.js +0 -78
  15. package/build/base/Getters.d.ts +0 -163
  16. package/build/base/Getters.js +0 -207
  17. package/build/base/Init.d.ts +0 -44
  18. package/build/base/Init.js +0 -400
  19. package/build/base/find.d.ts +0 -3
  20. package/build/base/find.js +0 -7
  21. package/build/base/index.d.ts +0 -47
  22. package/build/base/index.js +0 -57
  23. package/build/base/types.d.ts +0 -15
  24. package/build/base/types.js +0 -1
  25. package/build/bundle-pezkuwi-api.js +0 -26247
  26. package/build/bundle.d.ts +0 -7
  27. package/build/bundle.js +0 -7
  28. package/build/cjs/augment.d.ts +0 -1
  29. package/build/cjs/augment.js +0 -3
  30. package/build/cjs/base/Decorate.d.ts +0 -143
  31. package/build/cjs/base/Decorate.js +0 -756
  32. package/build/cjs/base/Events.d.ts +0 -67
  33. package/build/cjs/base/Events.js +0 -82
  34. package/build/cjs/base/Getters.d.ts +0 -163
  35. package/build/cjs/base/Getters.js +0 -211
  36. package/build/cjs/base/Init.d.ts +0 -44
  37. package/build/cjs/base/Init.js +0 -404
  38. package/build/cjs/base/find.d.ts +0 -3
  39. package/build/cjs/base/find.js +0 -11
  40. package/build/cjs/base/index.d.ts +0 -47
  41. package/build/cjs/base/index.js +0 -61
  42. package/build/cjs/base/types.d.ts +0 -15
  43. package/build/cjs/base/types.js +0 -2
  44. package/build/cjs/bundle.d.ts +0 -7
  45. package/build/cjs/bundle.js +0 -17
  46. package/build/cjs/index.d.ts +0 -2
  47. package/build/cjs/index.js +0 -5
  48. package/build/cjs/package.json +0 -3
  49. package/build/cjs/packageDetect.d.ts +0 -1
  50. package/build/cjs/packageDetect.js +0 -10
  51. package/build/cjs/packageInfo.d.ts +0 -6
  52. package/build/cjs/packageInfo.js +0 -4
  53. package/build/cjs/promise/Api.d.ts +0 -158
  54. package/build/cjs/promise/Api.js +0 -195
  55. package/build/cjs/promise/Combinator.d.ts +0 -12
  56. package/build/cjs/promise/Combinator.js +0 -72
  57. package/build/cjs/promise/decorateMethod.d.ts +0 -14
  58. package/build/cjs/promise/decorateMethod.js +0 -75
  59. package/build/cjs/promise/index.d.ts +0 -2
  60. package/build/cjs/promise/index.js +0 -7
  61. package/build/cjs/promise/types.d.ts +0 -5
  62. package/build/cjs/promise/types.js +0 -2
  63. package/build/cjs/rx/Api.d.ts +0 -155
  64. package/build/cjs/rx/Api.js +0 -173
  65. package/build/cjs/rx/decorateMethod.d.ts +0 -3
  66. package/build/cjs/rx/decorateMethod.js +0 -6
  67. package/build/cjs/rx/index.d.ts +0 -2
  68. package/build/cjs/rx/index.js +0 -7
  69. package/build/cjs/submittable/Result.d.ts +0 -31
  70. package/build/cjs/submittable/Result.js +0 -84
  71. package/build/cjs/submittable/createClass.d.ts +0 -12
  72. package/build/cjs/submittable/createClass.js +0 -277
  73. package/build/cjs/submittable/createSubmittable.d.ts +0 -8
  74. package/build/cjs/submittable/createSubmittable.js +0 -8
  75. package/build/cjs/submittable/index.d.ts +0 -2
  76. package/build/cjs/submittable/index.js +0 -7
  77. package/build/cjs/submittable/types.d.ts +0 -1
  78. package/build/cjs/submittable/types.js +0 -2
  79. package/build/cjs/types/calls.d.ts +0 -1
  80. package/build/cjs/types/calls.js +0 -4
  81. package/build/cjs/types/consts.d.ts +0 -1
  82. package/build/cjs/types/consts.js +0 -4
  83. package/build/cjs/types/errors.d.ts +0 -1
  84. package/build/cjs/types/errors.js +0 -4
  85. package/build/cjs/types/events.d.ts +0 -1
  86. package/build/cjs/types/events.js +0 -4
  87. package/build/cjs/types/index.d.ts +0 -114
  88. package/build/cjs/types/index.js +0 -13
  89. package/build/cjs/types/storage.d.ts +0 -1
  90. package/build/cjs/types/storage.js +0 -4
  91. package/build/cjs/types/submittable.d.ts +0 -1
  92. package/build/cjs/types/submittable.js +0 -4
  93. package/build/cjs/util/augmentObject.d.ts +0 -9
  94. package/build/cjs/util/augmentObject.js +0 -84
  95. package/build/cjs/util/decorate.d.ts +0 -16
  96. package/build/cjs/util/decorate.js +0 -17
  97. package/build/cjs/util/filterEvents.d.ts +0 -6
  98. package/build/cjs/util/filterEvents.js +0 -25
  99. package/build/cjs/util/index.d.ts +0 -4
  100. package/build/cjs/util/index.js +0 -11
  101. package/build/cjs/util/isKeyringPair.d.ts +0 -3
  102. package/build/cjs/util/isKeyringPair.js +0 -7
  103. package/build/cjs/util/logging.d.ts +0 -1
  104. package/build/cjs/util/logging.js +0 -5
  105. package/build/cjs/util/validate.d.ts +0 -3
  106. package/build/cjs/util/validate.js +0 -26
  107. package/build/index.d.ts +0 -2
  108. package/build/index.js +0 -2
  109. package/build/package.json +0 -612
  110. package/build/packageDetect.d.ts +0 -1
  111. package/build/packageDetect.js +0 -8
  112. package/build/packageInfo.d.ts +0 -6
  113. package/build/packageInfo.js +0 -1
  114. package/build/promise/Api.d.ts +0 -158
  115. package/build/promise/Api.js +0 -191
  116. package/build/promise/Combinator.d.ts +0 -12
  117. package/build/promise/Combinator.js +0 -68
  118. package/build/promise/decorateMethod.d.ts +0 -14
  119. package/build/promise/decorateMethod.js +0 -71
  120. package/build/promise/index.d.ts +0 -2
  121. package/build/promise/index.js +0 -2
  122. package/build/promise/types.d.ts +0 -5
  123. package/build/promise/types.js +0 -1
  124. package/build/rx/Api.d.ts +0 -155
  125. package/build/rx/Api.js +0 -169
  126. package/build/rx/decorateMethod.d.ts +0 -3
  127. package/build/rx/decorateMethod.js +0 -3
  128. package/build/rx/index.d.ts +0 -2
  129. package/build/rx/index.js +0 -2
  130. package/build/submittable/Result.d.ts +0 -31
  131. package/build/submittable/Result.js +0 -80
  132. package/build/submittable/createClass.d.ts +0 -12
  133. package/build/submittable/createClass.js +0 -274
  134. package/build/submittable/createSubmittable.d.ts +0 -8
  135. package/build/submittable/createSubmittable.js +0 -5
  136. package/build/submittable/index.d.ts +0 -2
  137. package/build/submittable/index.js +0 -2
  138. package/build/submittable/types.d.ts +0 -1
  139. package/build/submittable/types.js +0 -1
  140. package/build/types/calls.d.ts +0 -1
  141. package/build/types/calls.js +0 -1
  142. package/build/types/consts.d.ts +0 -1
  143. package/build/types/consts.js +0 -1
  144. package/build/types/errors.d.ts +0 -1
  145. package/build/types/errors.js +0 -1
  146. package/build/types/events.d.ts +0 -1
  147. package/build/types/events.js +0 -1
  148. package/build/types/index.d.ts +0 -114
  149. package/build/types/index.js +0 -8
  150. package/build/types/storage.d.ts +0 -1
  151. package/build/types/storage.js +0 -1
  152. package/build/types/submittable.d.ts +0 -1
  153. package/build/types/submittable.js +0 -1
  154. package/build/util/augmentObject.d.ts +0 -9
  155. package/build/util/augmentObject.js +0 -81
  156. package/build/util/decorate.d.ts +0 -16
  157. package/build/util/decorate.js +0 -14
  158. package/build/util/filterEvents.d.ts +0 -6
  159. package/build/util/filterEvents.js +0 -22
  160. package/build/util/index.d.ts +0 -4
  161. package/build/util/index.js +0 -4
  162. package/build/util/isKeyringPair.d.ts +0 -3
  163. package/build/util/isKeyringPair.js +0 -4
  164. package/build/util/logging.d.ts +0 -1
  165. package/build/util/logging.js +0 -2
  166. package/build/util/validate.d.ts +0 -3
  167. package/build/util/validate.js +0 -23
  168. package/build-deno/README.md +0 -95
  169. package/build-deno/augment.ts +0 -2
  170. package/build-deno/base/Decorate.ts +0 -1100
  171. package/build-deno/base/Events.ts +0 -89
  172. package/build-deno/base/Getters.ts +0 -243
  173. package/build-deno/base/Init.ts +0 -523
  174. package/build-deno/base/find.ts +0 -12
  175. package/build-deno/base/index.ts +0 -83
  176. package/build-deno/base/types.ts +0 -17
  177. package/build-deno/bundle.ts +0 -11
  178. package/build-deno/checkTypes.manual.ts +0 -320
  179. package/build-deno/index.ts +0 -4
  180. package/build-deno/mod.ts +0 -2
  181. package/build-deno/packageDetect.ts +0 -12
  182. package/build-deno/packageInfo.ts +0 -3
  183. package/build-deno/promise/Api.ts +0 -212
  184. package/build-deno/promise/Combinator.ts +0 -89
  185. package/build-deno/promise/decorateMethod.ts +0 -111
  186. package/build-deno/promise/index.ts +0 -3
  187. package/build-deno/promise/types.ts +0 -7
  188. package/build-deno/rx/Api.ts +0 -184
  189. package/build-deno/rx/decorateMethod.ts +0 -7
  190. package/build-deno/rx/index.ts +0 -3
  191. package/build-deno/submittable/Result.ts +0 -109
  192. package/build-deno/submittable/createClass.ts +0 -436
  193. package/build-deno/submittable/createSubmittable.ts +0 -17
  194. package/build-deno/submittable/index.ts +0 -3
  195. package/build-deno/submittable/types.ts +0 -2
  196. package/build-deno/test/SingleAccountSigner.ts +0 -51
  197. package/build-deno/test/index.ts +0 -3
  198. package/build-deno/test/logEvents.ts +0 -21
  199. package/build-deno/types/calls.ts +0 -2
  200. package/build-deno/types/consts.ts +0 -2
  201. package/build-deno/types/errors.ts +0 -2
  202. package/build-deno/types/events.ts +0 -2
  203. package/build-deno/types/index.ts +0 -124
  204. package/build-deno/types/storage.ts +0 -2
  205. package/build-deno/types/submittable.ts +0 -2
  206. package/build-deno/util/augmentObject.ts +0 -109
  207. package/build-deno/util/decorate.ts +0 -38
  208. package/build-deno/util/filterEvents.ts +0 -32
  209. package/build-deno/util/index.ts +0 -6
  210. package/build-deno/util/isKeyringPair.ts +0 -9
  211. package/build-deno/util/logging.ts +0 -4
  212. package/build-deno/util/validate.ts +0 -32
  213. package/build-tsc/augment.d.ts +0 -1
  214. package/build-tsc/base/Decorate.d.ts +0 -143
  215. package/build-tsc/base/Events.d.ts +0 -67
  216. package/build-tsc/base/Getters.d.ts +0 -163
  217. package/build-tsc/base/Init.d.ts +0 -44
  218. package/build-tsc/base/find.d.ts +0 -3
  219. package/build-tsc/base/index.d.ts +0 -47
  220. package/build-tsc/base/types.d.ts +0 -15
  221. package/build-tsc/bundle.d.ts +0 -7
  222. package/build-tsc/index.d.ts +0 -2
  223. package/build-tsc/packageDetect.d.ts +0 -1
  224. package/build-tsc/packageInfo.d.ts +0 -6
  225. package/build-tsc/promise/Api.d.ts +0 -158
  226. package/build-tsc/promise/Combinator.d.ts +0 -12
  227. package/build-tsc/promise/decorateMethod.d.ts +0 -14
  228. package/build-tsc/promise/index.d.ts +0 -2
  229. package/build-tsc/promise/types.d.ts +0 -5
  230. package/build-tsc/rx/Api.d.ts +0 -155
  231. package/build-tsc/rx/decorateMethod.d.ts +0 -3
  232. package/build-tsc/rx/index.d.ts +0 -2
  233. package/build-tsc/submittable/Result.d.ts +0 -31
  234. package/build-tsc/submittable/createClass.d.ts +0 -12
  235. package/build-tsc/submittable/createSubmittable.d.ts +0 -8
  236. package/build-tsc/submittable/index.d.ts +0 -2
  237. package/build-tsc/submittable/types.d.ts +0 -1
  238. package/build-tsc/types/calls.d.ts +0 -1
  239. package/build-tsc/types/consts.d.ts +0 -1
  240. package/build-tsc/types/errors.d.ts +0 -1
  241. package/build-tsc/types/events.d.ts +0 -1
  242. package/build-tsc/types/index.d.ts +0 -114
  243. package/build-tsc/types/storage.d.ts +0 -1
  244. package/build-tsc/types/submittable.d.ts +0 -1
  245. package/build-tsc/util/augmentObject.d.ts +0 -9
  246. package/build-tsc/util/decorate.d.ts +0 -16
  247. package/build-tsc/util/filterEvents.d.ts +0 -6
  248. package/build-tsc/util/index.d.ts +0 -4
  249. package/build-tsc/util/isKeyringPair.d.ts +0 -3
  250. package/build-tsc/util/logging.d.ts +0 -1
  251. package/build-tsc/util/validate.d.ts +0 -3
  252. package/build-tsc-cjs/augment.js +0 -3
  253. package/build-tsc-cjs/base/Decorate.js +0 -756
  254. package/build-tsc-cjs/base/Events.js +0 -82
  255. package/build-tsc-cjs/base/Getters.js +0 -211
  256. package/build-tsc-cjs/base/Init.js +0 -404
  257. package/build-tsc-cjs/base/find.js +0 -11
  258. package/build-tsc-cjs/base/index.js +0 -61
  259. package/build-tsc-cjs/base/types.js +0 -2
  260. package/build-tsc-cjs/bundle.js +0 -17
  261. package/build-tsc-cjs/index.js +0 -5
  262. package/build-tsc-cjs/packageDetect.js +0 -10
  263. package/build-tsc-cjs/packageInfo.js +0 -4
  264. package/build-tsc-cjs/promise/Api.js +0 -195
  265. package/build-tsc-cjs/promise/Combinator.js +0 -72
  266. package/build-tsc-cjs/promise/decorateMethod.js +0 -75
  267. package/build-tsc-cjs/promise/index.js +0 -7
  268. package/build-tsc-cjs/promise/types.js +0 -2
  269. package/build-tsc-cjs/rx/Api.js +0 -173
  270. package/build-tsc-cjs/rx/decorateMethod.js +0 -6
  271. package/build-tsc-cjs/rx/index.js +0 -7
  272. package/build-tsc-cjs/submittable/Result.js +0 -84
  273. package/build-tsc-cjs/submittable/createClass.js +0 -277
  274. package/build-tsc-cjs/submittable/createSubmittable.js +0 -8
  275. package/build-tsc-cjs/submittable/index.js +0 -7
  276. package/build-tsc-cjs/submittable/types.js +0 -2
  277. package/build-tsc-cjs/types/calls.js +0 -4
  278. package/build-tsc-cjs/types/consts.js +0 -4
  279. package/build-tsc-cjs/types/errors.js +0 -4
  280. package/build-tsc-cjs/types/events.js +0 -4
  281. package/build-tsc-cjs/types/index.js +0 -13
  282. package/build-tsc-cjs/types/storage.js +0 -4
  283. package/build-tsc-cjs/types/submittable.js +0 -4
  284. package/build-tsc-cjs/util/augmentObject.js +0 -84
  285. package/build-tsc-cjs/util/decorate.js +0 -17
  286. package/build-tsc-cjs/util/filterEvents.js +0 -25
  287. package/build-tsc-cjs/util/index.js +0 -11
  288. package/build-tsc-cjs/util/isKeyringPair.js +0 -7
  289. package/build-tsc-cjs/util/logging.js +0 -5
  290. package/build-tsc-cjs/util/validate.js +0 -26
  291. package/build-tsc-esm/augment.js +0 -1
  292. package/build-tsc-esm/base/Decorate.js +0 -752
  293. package/build-tsc-esm/base/Events.js +0 -78
  294. package/build-tsc-esm/base/Getters.js +0 -207
  295. package/build-tsc-esm/base/Init.js +0 -400
  296. package/build-tsc-esm/base/find.js +0 -7
  297. package/build-tsc-esm/base/index.js +0 -57
  298. package/build-tsc-esm/base/types.js +0 -1
  299. package/build-tsc-esm/bundle.js +0 -7
  300. package/build-tsc-esm/index.js +0 -2
  301. package/build-tsc-esm/packageDetect.js +0 -8
  302. package/build-tsc-esm/packageInfo.js +0 -1
  303. package/build-tsc-esm/promise/Api.js +0 -191
  304. package/build-tsc-esm/promise/Combinator.js +0 -68
  305. package/build-tsc-esm/promise/decorateMethod.js +0 -71
  306. package/build-tsc-esm/promise/index.js +0 -2
  307. package/build-tsc-esm/promise/types.js +0 -1
  308. package/build-tsc-esm/rx/Api.js +0 -169
  309. package/build-tsc-esm/rx/decorateMethod.js +0 -3
  310. package/build-tsc-esm/rx/index.js +0 -2
  311. package/build-tsc-esm/submittable/Result.js +0 -80
  312. package/build-tsc-esm/submittable/createClass.js +0 -274
  313. package/build-tsc-esm/submittable/createSubmittable.js +0 -5
  314. package/build-tsc-esm/submittable/index.js +0 -2
  315. package/build-tsc-esm/submittable/types.js +0 -1
  316. package/build-tsc-esm/types/calls.js +0 -1
  317. package/build-tsc-esm/types/consts.js +0 -1
  318. package/build-tsc-esm/types/errors.js +0 -1
  319. package/build-tsc-esm/types/events.js +0 -1
  320. package/build-tsc-esm/types/index.js +0 -8
  321. package/build-tsc-esm/types/storage.js +0 -1
  322. package/build-tsc-esm/types/submittable.js +0 -1
  323. package/build-tsc-esm/util/augmentObject.js +0 -81
  324. package/build-tsc-esm/util/decorate.js +0 -14
  325. package/build-tsc-esm/util/filterEvents.js +0 -22
  326. package/build-tsc-esm/util/index.js +0 -4
  327. package/build-tsc-esm/util/isKeyringPair.js +0 -4
  328. package/build-tsc-esm/util/logging.js +0 -2
  329. package/build-tsc-esm/util/validate.js +0 -23
  330. package/src/augment.ts +0 -4
  331. package/src/base/Decorate.ts +0 -1103
  332. package/src/base/Events.ts +0 -91
  333. package/src/base/Getters.ts +0 -245
  334. package/src/base/Init.ts +0 -525
  335. package/src/base/find.ts +0 -14
  336. package/src/base/index.ts +0 -85
  337. package/src/base/types.ts +0 -19
  338. package/src/bundle.ts +0 -16
  339. package/src/checkTypes.manual.ts +0 -323
  340. package/src/index.ts +0 -6
  341. package/src/mod.ts +0 -4
  342. package/src/packageDetect.ts +0 -16
  343. package/src/packageInfo.ts +0 -6
  344. package/src/promise/Api.ts +0 -214
  345. package/src/promise/Combinator.ts +0 -91
  346. package/src/promise/Combinators.spec.ts +0 -109
  347. package/src/promise/decorateMethod.ts +0 -118
  348. package/src/promise/index.spec.ts +0 -167
  349. package/src/promise/index.ts +0 -5
  350. package/src/promise/types.ts +0 -9
  351. package/src/rx/Api.ts +0 -186
  352. package/src/rx/decorateMethod.ts +0 -9
  353. package/src/rx/index.ts +0 -5
  354. package/src/submittable/Result.ts +0 -111
  355. package/src/submittable/createClass.ts +0 -438
  356. package/src/submittable/createSubmittable.ts +0 -19
  357. package/src/submittable/index.ts +0 -5
  358. package/src/submittable/types.ts +0 -4
  359. package/src/test/SingleAccountSigner.ts +0 -53
  360. package/src/test/index.ts +0 -5
  361. package/src/test/logEvents.ts +0 -24
  362. package/src/types/calls.ts +0 -4
  363. package/src/types/consts.ts +0 -4
  364. package/src/types/errors.ts +0 -4
  365. package/src/types/events.ts +0 -4
  366. package/src/types/index.ts +0 -137
  367. package/src/types/storage.ts +0 -4
  368. package/src/types/submittable.ts +0 -4
  369. package/src/util/augmentObject.spec.ts +0 -54
  370. package/src/util/augmentObject.ts +0 -112
  371. package/src/util/decorate.ts +0 -43
  372. package/src/util/filterEvents.ts +0 -34
  373. package/src/util/index.ts +0 -10
  374. package/src/util/isKeyringPair.ts +0 -11
  375. package/src/util/logging.ts +0 -6
  376. package/src/util/validate.spec.ts +0 -72
  377. package/src/util/validate.ts +0 -36
  378. package/tsconfig.build.json +0 -25
  379. package/tsconfig.build.tsbuildinfo +0 -1
  380. package/tsconfig.spec.json +0 -26
  381. package/tsconfig.spec.tsbuildinfo +0 -1
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from '@pezkuwi/api-base/types/events';
@@ -1,137 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { ApiTypes, DeriveCustom, QueryableStorageMulti } from '@pezkuwi/api-base/types';
5
- import type { ApiInterfaceRx as ApiInterfaceBase } from '@pezkuwi/api-base/types/api';
6
- import type { QueryableCalls } from '@pezkuwi/api-base/types/calls';
7
- import type { QueryableConsts } from '@pezkuwi/api-base/types/consts';
8
- import type { DecoratedErrors } from '@pezkuwi/api-base/types/errors';
9
- import type { DecoratedEvents } from '@pezkuwi/api-base/types/events';
10
- import type { QueryableStorage } from '@pezkuwi/api-base/types/storage';
11
- import type { ProviderInterface, ProviderInterfaceEmitted } from '@pezkuwi/rpc-provider/types';
12
- import type { ExtDef } from '@pezkuwi/types/extrinsic/signedExtensions/types';
13
- import type { Call, Extrinsic, Hash, RuntimeVersionPartial } from '@pezkuwi/types/interfaces';
14
- import type { CallFunction, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@pezkuwi/types/types';
15
- import type { BN } from '@pezkuwi/util';
16
- import type { HexString } from '@pezkuwi/util/types';
17
- import type { ApiBase } from '../base/index.js';
18
- import type { SubmittableExtrinsic } from '../types/submittable.js';
19
- import type { AllDerives } from '../util/decorate.js';
20
-
21
- // types
22
- export type { Signer, SignerResult } from '@pezkuwi/types/types';
23
-
24
- // all named
25
- export { ApiBase } from '../base/index.js';
26
-
27
- // all starred
28
- // eslint-disable-next-line import/export
29
- export * from '@pezkuwi/api/types/calls';
30
- // eslint-disable-next-line import/export
31
- export * from '@pezkuwi/api/types/consts';
32
- // eslint-disable-next-line import/export
33
- export * from '@pezkuwi/api/types/errors';
34
- // eslint-disable-next-line import/export
35
- export * from '@pezkuwi/api/types/events';
36
- // eslint-disable-next-line import/export
37
- export * from '@pezkuwi/api/types/storage';
38
- // eslint-disable-next-line import/export
39
- export * from '@pezkuwi/api/types/submittable';
40
- // eslint-disable-next-line import/export
41
- export * from '@pezkuwi/api-base/types';
42
-
43
- // A smaller interface of ApiRx, used in derive and in SubmittableExtrinsic
44
- export interface ApiInterfaceRx extends ApiInterfaceBase {
45
- derive: AllDerives<'rxjs'>;
46
- }
47
-
48
- export interface ApiOptions extends RegisteredTypes {
49
- /**
50
- * @description Add custom derives to be injected
51
- */
52
- derives?: DeriveCustom;
53
- /**
54
- * @description Control the initialization of the wasm libraries. When not specified, it defaults to `true`, initializing the wasm libraries, set to `false` to not initialize wasm. (No sr25519 support)
55
- */
56
- initWasm?: boolean;
57
- /**
58
- * @description Controls the checking of storage values once they have been contructed. When not specified this defaults to `true`. Set to `false` to forgo any checking on storage results.
59
- */
60
- isPedantic?: boolean;
61
- /**
62
- * @description pre-bundles is a map of 'genesis hash and runtime spec version' as key to a metadata hex string
63
- * if genesis hash and runtime spec version matches, then use metadata, else fetch it from chain
64
- */
65
- metadata?: Record<string, HexString>;
66
- /**
67
- * @description Don't display any warnings on initialization (missing RPC methods & runtime calls)
68
- */
69
- noInitWarn?: boolean;
70
- /**
71
- * @description Transport Provider from rpc-provider. If not specified, it will default to
72
- * connecting to a WsProvider connecting localhost with the default port, i.e. `ws://127.0.0.1:9944`
73
- */
74
- provider?: ProviderInterface;
75
- /**
76
- * @description A type registry to use along with this instance
77
- */
78
- registry?: Registry;
79
- /**
80
- * @description User-defined RPC methods
81
- */
82
- rpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
83
- /**
84
- * @description Defines the size of the cache for the rpc-core. Defaults to 1024 * 10 * 10.
85
- */
86
- rpcCacheCapacity?: number;
87
- /**
88
- * @description Overrides for state_call usage (this will be removed in some future version)
89
- */
90
- runtime?: DefinitionsCall;
91
- /**
92
- * @description Any chain-specific signed extensions that are now well-known
93
- */
94
- signedExtensions?: ExtDef;
95
- /**
96
- * @description An external signer which will be used to sign extrinsic when account passed in is not KeyringPair
97
- */
98
- signer?: Signer;
99
- /**
100
- * @description The source object to use for runtime information (only used when cloning)
101
- */
102
- source?: ApiBase<any>;
103
- /**
104
- * @description Throws an error when the initial connection fails (same as isReadyOrError)
105
- */
106
- throwOnConnect?: boolean;
107
- /**
108
- * @description Throws an error when some types are unknown (useful with throwOnConnect)
109
- */
110
- throwOnUnknown?: boolean;
111
- }
112
-
113
- export type ApiInterfaceEvents = ProviderInterfaceEmitted | 'ready' | 'decorated';
114
-
115
- export interface SignerOptions extends SignatureOptions {
116
- blockNumber: BN;
117
- genesisHash: Hash;
118
- }
119
-
120
- export interface ApiDecoration<ApiType extends ApiTypes> {
121
- call: QueryableCalls<ApiType>;
122
- consts: QueryableConsts<ApiType>;
123
- errors: DecoratedErrors<ApiType>;
124
- events: DecoratedEvents<ApiType>;
125
- query: QueryableStorage<ApiType>;
126
- registry: Registry;
127
- runtimeVersion: RuntimeVersionPartial;
128
- rx: {
129
- call: QueryableCalls<'rxjs'>;
130
- query: QueryableStorage<'rxjs'>;
131
- };
132
- tx: (extrinsic: Call | Extrinsic | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
133
-
134
- findCall (callIndex: Uint8Array | string): CallFunction;
135
- findError (errorIndex: Uint8Array | string): RegistryError;
136
- queryMulti: QueryableStorageMulti<ApiType>;
137
- }
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api-augment authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from '@pezkuwi/api-base/types/storage';
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api-augment authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from '@pezkuwi/api-base/types/submittable';
@@ -1,54 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
5
-
6
- import { augmentObject } from './augmentObject.js';
7
-
8
- describe('augmentObject', (): void => {
9
- let spy: ReturnType<typeof jest.spyOn>;
10
-
11
- beforeEach((): void => {
12
- spy = jest.spyOn(console, 'warn');
13
- });
14
-
15
- afterEach((): void => {
16
- spy.mockRestore();
17
- });
18
-
19
- it('logs added/removed sections and methods', (): void => {
20
- augmentObject(
21
- 'test',
22
- { bar: { b: 1 }, foo: { d: 1, f: 1 }, new: { z: 1 } },
23
- { bar: { a: 1, c: 1 }, baz: { a: 1 }, foo: { c: 1, f: 1 } }
24
- );
25
-
26
- expect(spy).toHaveBeenCalledWith(
27
- expect.anything(),
28
- expect.stringMatching(/API\/AUGMENT/),
29
- 'api.test: Found 1 added and 1 removed modules:\n\t added: new\n\tremoved: baz'
30
- );
31
- expect(spy).toHaveBeenCalledWith(
32
- expect.anything(),
33
- expect.stringMatching(/API\/AUGMENT/),
34
- 'api.test: Found 2 added and 3 removed calls:\n\t added: bar.b, foo.d\n\tremoved: bar.a, bar.c, foo.c'
35
- );
36
- });
37
-
38
- it('copies sections to the dest', (): void => {
39
- const src = { bar: { b: 1 }, foo: { a: 1 } };
40
-
41
- expect(augmentObject('test', src, {})).toEqual(src);
42
- });
43
-
44
- it('adds fields to existing sections', (): void => {
45
- const src = { bar: { b: 1 }, foo: { a: 1 } };
46
- const dst = { baz: { c: 1 }, foo: { b: 2 } };
47
-
48
- expect(augmentObject('test', src, dst)).toEqual({
49
- bar: { b: 1 },
50
- baz: { c: 1 },
51
- foo: { a: 1, b: 2 }
52
- });
53
- });
54
- });
@@ -1,112 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { lazyMethods, logger, objectClear } from '@pezkuwi/util';
5
-
6
- type Sections <T> = Record<string, Methods<T>>;
7
-
8
- type Methods <T> = Record<string, T>;
9
-
10
- type StringsStrings = [string[], string[]];
11
-
12
- const l = logger('api/augment');
13
-
14
- function logLength (type: 'added' | 'removed', values: string[], and: string[] = []): string {
15
- return values.length
16
- ? ` ${values.length} ${type}${and.length ? ' and' : ''}`
17
- : '';
18
- }
19
-
20
- function logValues (type: 'added' | 'removed', values: string[]): string {
21
- return values.length
22
- ? `\n\t${type.padStart(7)}: ${values.sort().join(', ')}`
23
- : '';
24
- }
25
-
26
- // log details to console
27
- function warn (prefix: string, type: 'calls' | 'modules', [added, removed]: StringsStrings): void {
28
- if (added.length || removed.length) {
29
- l.warn(`api.${prefix}: Found${logLength('added', added, removed)}${logLength('removed', removed)} ${type}:${logValues('added', added)}${logValues('removed', removed)}`);
30
- }
31
- }
32
-
33
- function findSectionExcludes (a: string[], b: string[]): string[] {
34
- return a.filter((s) => !b.includes(s));
35
- }
36
-
37
- function findSectionIncludes (a: string[], b: string[]): string[] {
38
- return a.filter((s) => b.includes(s));
39
- }
40
-
41
- function extractSections <T> (src: Sections<T>, dst: Sections<T>): StringsStrings {
42
- const srcSections = Object.keys(src);
43
- const dstSections = Object.keys(dst);
44
-
45
- return [
46
- findSectionExcludes(srcSections, dstSections),
47
- findSectionExcludes(dstSections, srcSections)
48
- ];
49
- }
50
-
51
- function findMethodExcludes <T> (src: Sections<T>, dst: Sections<T>): string[] {
52
- const srcSections = Object.keys(src);
53
- const dstSections = findSectionIncludes(Object.keys(dst), srcSections);
54
- const excludes: string[] = [];
55
-
56
- for (let s = 0, scount = dstSections.length; s < scount; s++) {
57
- const section = dstSections[s];
58
- const srcMethods = Object.keys(src[section]);
59
- const dstMethods = Object.keys(dst[section]);
60
-
61
- for (let d = 0, mcount = dstMethods.length; d < mcount; d++) {
62
- const method = dstMethods[d];
63
-
64
- if (!srcMethods.includes(method)) {
65
- excludes.push(`${section}.${method}`);
66
- }
67
- }
68
- }
69
-
70
- return excludes;
71
- }
72
-
73
- function extractMethods <T> (src: Sections<T>, dst: Sections<T>): StringsStrings {
74
- return [
75
- findMethodExcludes(dst, src),
76
- findMethodExcludes(src, dst)
77
- ];
78
- }
79
-
80
- /**
81
- * @description Takes a decorated api section (e.g. api.tx) and augment it with the details. It does not override what is
82
- * already available, but rather just adds new missing items into the result object.
83
- * @internal
84
- */
85
- export function augmentObject <T> (prefix: string | null, src: Sections<T>, dst: Sections<T>, fromEmpty = false): Sections<T> {
86
- fromEmpty && objectClear(dst);
87
-
88
- // NOTE: This part is slightly problematic since it will get the
89
- // values for at least all the sections and the names of the methods
90
- // (Since methods won't be decorated before lazy, this _may_ be ok)
91
- if (prefix && Object.keys(dst).length) {
92
- warn(prefix, 'modules', extractSections(src, dst));
93
- warn(prefix, 'calls', extractMethods(src, dst));
94
- }
95
-
96
- const sections = Object.keys(src);
97
-
98
- for (let i = 0, count = sections.length; i < count; i++) {
99
- const section = sections[i];
100
- const methods = src[section];
101
-
102
- // We don't set here with a lazy interface, we decorate based
103
- // on the top-level structure (this bypasses adding lazy onto lazy)
104
- if (!dst[section]) {
105
- dst[section] = {};
106
- }
107
-
108
- lazyMethods(dst[section], Object.keys(methods), (m: string) => methods[m]);
109
- }
110
-
111
- return dst;
112
- }
@@ -1,43 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { ExactDerive } from '@pezkuwi/api-derive';
5
- import type { AnyFunction } from '@pezkuwi/types/types';
6
- import type { ApiTypes, DecorateMethod, MethodResult } from '../types/index.js';
7
-
8
- import { lazyDeriveSection } from '@pezkuwi/api-derive';
9
-
10
- type AnyDeriveSection = Record<string, AnyFunction>;
11
-
12
- // Most generic typings for `api.derive.*.*`
13
- type AnyDerive = Record<string, AnyDeriveSection>;
14
-
15
- // Exact typings for a particular section `api.derive.section.*`
16
- type DeriveSection<ApiType extends ApiTypes, Section extends AnyDeriveSection> = {
17
- [M in keyof Section]: MethodResult<ApiType, Section[M]>
18
- };
19
-
20
- // Exact typings for all sections `api.derive.*.*`
21
- export type AllDerives<ApiType extends ApiTypes> = {
22
- [S in keyof ExactDerive]: DeriveSection<ApiType, ExactDerive[S]>
23
- };
24
-
25
- /**
26
- * This is a section decorator which keeps all type information.
27
- */
28
- export function decorateDeriveSections<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>, derives: AnyDerive): AllDerives<ApiType> {
29
- const getKeys = (s: string) =>
30
- Object.keys(derives[s]);
31
-
32
- const creator = (s: string, m: string) =>
33
- decorateMethod(derives[s][m]) as AnyFunction;
34
-
35
- const result: AnyDerive = {};
36
- const names = Object.keys(derives);
37
-
38
- for (let i = 0, count = names.length; i < count; i++) {
39
- lazyDeriveSection(result, names[i], getKeys, creator);
40
- }
41
-
42
- return result as AllDerives<ApiType>;
43
- }
@@ -1,34 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { BlockNumber, EventRecord, ExtrinsicStatus, H256, SignedBlock } from '@pezkuwi/types/interfaces';
5
-
6
- import { isCompact } from '@pezkuwi/util';
7
-
8
- import { l } from './logging.js';
9
-
10
- export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): { events?: EventRecord[], txIndex?: number, blockNumber?: BlockNumber } {
11
- // extrinsics to hashes
12
- for (const [txIndex, x] of extrinsics.entries()) {
13
- if (x.hash.eq(txHash)) {
14
- return {
15
- blockNumber: isCompact<BlockNumber>(header.number) ? header.number.unwrap() : header.number,
16
- events: allEvents.filter(({ phase }) =>
17
- phase.isApplyExtrinsic &&
18
- phase.asApplyExtrinsic.eqn(txIndex)
19
- ),
20
- txIndex
21
- };
22
- }
23
- }
24
-
25
- // if we do get the block after finalized, it _should_ be there
26
- // only warn on filtering with isInBlock (finalization finalizes after)
27
- if (status.isInBlock) {
28
- const allHashes = extrinsics.map((x) => x.hash.toHex());
29
-
30
- l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`);
31
- }
32
-
33
- return {};
34
- }
package/src/util/index.ts DELETED
@@ -1,10 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- // all named
5
- export { filterEvents } from './filterEvents.js';
6
- export { isKeyringPair } from './isKeyringPair.js';
7
- export { l } from './logging.js';
8
-
9
- // all starred
10
- export * from './decorate.js';
@@ -1,11 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { AccountId, Address } from '@pezkuwi/types/interfaces';
5
- import type { IKeyringPair } from '@pezkuwi/types/types';
6
-
7
- import { isFunction } from '@pezkuwi/util';
8
-
9
- export function isKeyringPair (account: string | IKeyringPair | AccountId | Address): account is IKeyringPair {
10
- return isFunction((account as IKeyringPair).sign);
11
- }
@@ -1,6 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { logger } from '@pezkuwi/util';
5
-
6
- export const l = /*#__PURE__*/ logger('api/util');
@@ -1,72 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
5
-
6
- import { decorateStorage, Metadata, TypeRegistry } from '@pezkuwi/types';
7
- import metaStatic from '@pezkuwi/types-support/metadata/static-bizinikiwi';
8
-
9
- import { extractStorageArgs } from './validate.js';
10
-
11
- describe('extractStorageArgs', (): void => {
12
- const registry = new TypeRegistry();
13
- const metadata = new Metadata(registry, metaStatic);
14
-
15
- registry.setMetadata(metadata);
16
-
17
- const storage = decorateStorage(registry, metadata.asLatest, metadata.version);
18
-
19
- it('validates no-arg plain', (): void => {
20
- expect(
21
- extractStorageArgs(registry, storage['timestamp']['now'], [])
22
- ).toEqual([storage['timestamp']['now'], []]);
23
- });
24
-
25
- it('validates no-arg plain (with undefined, undefined)', (): void => {
26
- expect(
27
- extractStorageArgs(registry, storage['timestamp']['now'], [undefined, undefined])
28
- ).toEqual([storage['timestamp']['now'], []]);
29
- });
30
-
31
- it('validates no-arg plain (failing when there are args)', (): void => {
32
- expect(
33
- () => extractStorageArgs(registry, storage['timestamp']['now'], [123, 456])
34
- ).toThrow('timestamp.now() does not take any arguments, 2 found');
35
- });
36
-
37
- it('validates map, 1 arg', (): void => {
38
- expect(
39
- extractStorageArgs(registry, storage['staking']['payee'], ['abc'])
40
- ).toEqual([storage['staking']['payee'], ['abc']]);
41
- });
42
-
43
- it('validates map, 1 arg (failing with no args)', (): void => {
44
- expect(
45
- () => extractStorageArgs(registry, storage['staking']['payee'], [])
46
- ).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 0 found');
47
- });
48
-
49
- it('validates map, 1 arg (failing with more args)', (): void => {
50
- expect(
51
- () => extractStorageArgs(registry, storage['staking']['payee'], ['abc', 'def'])
52
- ).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 2 found');
53
- });
54
-
55
- it('validates doublemap, 2 args', (): void => {
56
- expect(
57
- extractStorageArgs(registry, storage['staking']['erasStakers'], [1, '0x1234'])
58
- ).toEqual([storage['staking']['erasStakers'], [1, '0x1234']]);
59
- });
60
-
61
- it('validates doublemap, 2 args (failing with no args)', (): void => {
62
- expect(
63
- () => extractStorageArgs(registry, storage['staking']['erasStakers'], [])
64
- ).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 0 found');
65
- });
66
-
67
- it('validates doublemap, 2 args (failing with 1 arg)', (): void => {
68
- expect(
69
- () => extractStorageArgs(registry, storage['staking']['erasStakers'], [123])
70
- ).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 1 found');
71
- });
72
- });
@@ -1,36 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/api authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import type { SiLookupTypeId } from '@pezkuwi/types/interfaces';
5
- import type { StorageEntry } from '@pezkuwi/types/primitive/types';
6
- import type { Registry } from '@pezkuwi/types/types';
7
-
8
- import { isUndefined } from '@pezkuwi/util';
9
-
10
- function sig ({ lookup }: Registry, { method, section }: StorageEntry, args: SiLookupTypeId[]): string {
11
- return `${section}.${method}(${args.map((a) => lookup.getTypeDef(a).type).join(', ')})`;
12
- }
13
-
14
- // sets up the arguments in the form of [creator, args] ready to be used in a storage
15
- // call. Additionally, it verifies that the correct number of arguments have been passed
16
- export function extractStorageArgs (registry: Registry, creator: StorageEntry, _args: unknown[]): [StorageEntry, unknown[]] {
17
- const args = _args.filter((a) => !isUndefined(a));
18
-
19
- if (creator.meta.type.isPlain) {
20
- if (args.length !== 0) {
21
- throw new Error(`${sig(registry, creator, [])} does not take any arguments, ${args.length} found`);
22
- }
23
- } else {
24
- const { hashers, key } = creator.meta.type.asMap;
25
- const keys = hashers.length === 1
26
- ? [key]
27
- : registry.lookup.getSiType(key).def.asTuple.map((t) => t);
28
-
29
- if (args.length !== keys.length) {
30
- throw new Error(`${sig(registry, creator, keys)} is a map, requiring ${keys.length} arguments, ${args.length} found`);
31
- }
32
- }
33
-
34
- // pass as tuple
35
- return [creator, args];
36
- }
@@ -1,25 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "baseUrl": "..",
5
- "outDir": "./build",
6
- "rootDir": "./src"
7
- },
8
- "exclude": [
9
- "**/checkTypes.manual.ts",
10
- "**/mod.ts",
11
- "**/*.spec.ts",
12
- "**/test/**/*"
13
- ],
14
- "references": [
15
- { "path": "../api-augment/tsconfig.build.json" },
16
- { "path": "../api-base/tsconfig.build.json" },
17
- { "path": "../api-derive/tsconfig.build.json" },
18
- { "path": "../rpc-augment/tsconfig.build.json" },
19
- { "path": "../rpc-core/tsconfig.build.json" },
20
- { "path": "../rpc-provider/tsconfig.build.json" },
21
- { "path": "../types/tsconfig.build.json" },
22
- { "path": "../types-codec/tsconfig.build.json" },
23
- { "path": "../types-known/tsconfig.build.json" }
24
- ]
25
- }