@pezkuwi/api 16.5.11 → 16.5.13

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