@pezkuwi/rpc-provider 16.5.5 → 16.5.8

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 (277) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +10 -10
  3. package/bizinikiwi-connect/Health.js +259 -0
  4. package/{build/substrate-connect → bizinikiwi-connect}/index.d.ts +3 -3
  5. package/bizinikiwi-connect/index.js +319 -0
  6. package/bizinikiwi-connect/types.js +1 -0
  7. package/build/LICENSE +201 -0
  8. package/build/README.md +68 -0
  9. package/build/bizinikiwi-connect/Health.d.ts +7 -0
  10. package/build/bizinikiwi-connect/Health.js +259 -0
  11. package/build/bizinikiwi-connect/index.d.ts +22 -0
  12. package/build/bizinikiwi-connect/index.js +319 -0
  13. package/build/bizinikiwi-connect/types.d.ts +12 -0
  14. package/build/bizinikiwi-connect/types.js +1 -0
  15. package/build/bundle.d.ts +1 -1
  16. package/build/bundle.js +5 -0
  17. package/build/cjs/bizinikiwi-connect/Health.d.ts +7 -0
  18. package/build/cjs/bizinikiwi-connect/Health.js +264 -0
  19. package/build/cjs/bizinikiwi-connect/index.d.ts +22 -0
  20. package/build/cjs/bizinikiwi-connect/index.js +323 -0
  21. package/build/cjs/bizinikiwi-connect/types.d.ts +12 -0
  22. package/build/cjs/bizinikiwi-connect/types.js +2 -0
  23. package/build/cjs/bundle.d.ts +5 -0
  24. package/build/cjs/bundle.js +14 -0
  25. package/build/cjs/coder/error.d.ts +29 -0
  26. package/build/cjs/coder/error.js +53 -0
  27. package/build/cjs/coder/index.d.ts +8 -0
  28. package/build/cjs/coder/index.js +63 -0
  29. package/build/cjs/defaults.d.ts +5 -0
  30. package/build/cjs/defaults.js +8 -0
  31. package/build/cjs/http/index.d.ts +81 -0
  32. package/build/cjs/http/index.js +196 -0
  33. package/build/cjs/http/types.d.ts +7 -0
  34. package/build/cjs/http/types.js +2 -0
  35. package/build/cjs/index.d.ts +2 -0
  36. package/build/cjs/index.js +5 -0
  37. package/build/cjs/lru.d.ts +15 -0
  38. package/build/cjs/lru.js +150 -0
  39. package/build/cjs/mock/index.d.ts +35 -0
  40. package/build/cjs/mock/index.js +196 -0
  41. package/build/cjs/mock/mockHttp.d.ts +9 -0
  42. package/build/cjs/mock/mockHttp.js +17 -0
  43. package/build/cjs/mock/mockWs.d.ts +26 -0
  44. package/build/cjs/mock/mockWs.js +47 -0
  45. package/build/cjs/mock/types.d.ts +23 -0
  46. package/build/cjs/mock/types.js +2 -0
  47. package/build/cjs/package.json +3 -0
  48. package/build/cjs/packageDetect.d.ts +1 -0
  49. package/build/cjs/packageDetect.js +6 -0
  50. package/build/cjs/packageInfo.d.ts +6 -0
  51. package/build/cjs/packageInfo.js +4 -0
  52. package/build/cjs/types.d.ts +85 -0
  53. package/build/cjs/types.js +2 -0
  54. package/build/cjs/ws/errors.d.ts +1 -0
  55. package/build/cjs/ws/errors.js +41 -0
  56. package/build/cjs/ws/index.d.ts +121 -0
  57. package/build/cjs/ws/index.js +529 -0
  58. package/build/coder/error.js +50 -0
  59. package/build/coder/index.js +58 -0
  60. package/build/defaults.js +6 -0
  61. package/build/http/index.d.ts +1 -1
  62. package/build/http/index.js +191 -0
  63. package/build/http/types.js +1 -0
  64. package/build/index.js +2 -0
  65. package/build/lru.js +146 -0
  66. package/build/mock/index.js +191 -0
  67. package/build/mock/mockHttp.js +12 -0
  68. package/build/mock/mockWs.js +43 -0
  69. package/build/mock/types.js +1 -0
  70. package/build/package.json +344 -0
  71. package/build/packageDetect.js +4 -0
  72. package/build/packageInfo.js +1 -0
  73. package/build/types.js +1 -0
  74. package/build/ws/errors.js +38 -0
  75. package/build/ws/index.d.ts +1 -1
  76. package/build/ws/index.js +524 -0
  77. package/build-deno/README.md +66 -0
  78. package/build-deno/bizinikiwi-connect/Health.ts +323 -0
  79. package/build-deno/bizinikiwi-connect/index.ts +417 -0
  80. package/build-deno/bizinikiwi-connect/types.ts +14 -0
  81. package/build-deno/bundle.ts +6 -0
  82. package/build-deno/coder/error.ts +64 -0
  83. package/build-deno/coder/index.ts +86 -0
  84. package/build-deno/defaults.ts +8 -0
  85. package/build-deno/http/index.ts +236 -0
  86. package/build-deno/http/types.ts +9 -0
  87. package/build-deno/index.ts +4 -0
  88. package/build-deno/lru.ts +189 -0
  89. package/build-deno/mock/index.ts +257 -0
  90. package/build-deno/mock/mockHttp.ts +33 -0
  91. package/build-deno/mock/mockWs.ts +87 -0
  92. package/build-deno/mock/types.ts +34 -0
  93. package/build-deno/mod.ts +2 -0
  94. package/build-deno/packageDetect.ts +8 -0
  95. package/build-deno/packageInfo.ts +3 -0
  96. package/build-deno/types.ts +99 -0
  97. package/build-deno/ws/errors.ts +38 -0
  98. package/build-deno/ws/index.ts +650 -0
  99. package/build-tsc/bizinikiwi-connect/Health.d.ts +7 -0
  100. package/build-tsc/bizinikiwi-connect/index.d.ts +22 -0
  101. package/build-tsc/bizinikiwi-connect/types.d.ts +12 -0
  102. package/build-tsc/bundle.d.ts +5 -0
  103. package/build-tsc/coder/error.d.ts +29 -0
  104. package/build-tsc/coder/index.d.ts +8 -0
  105. package/build-tsc/defaults.d.ts +5 -0
  106. package/build-tsc/http/index.d.ts +81 -0
  107. package/build-tsc/http/types.d.ts +7 -0
  108. package/build-tsc/index.d.ts +2 -0
  109. package/build-tsc/lru.d.ts +15 -0
  110. package/build-tsc/mock/index.d.ts +35 -0
  111. package/build-tsc/mock/mockHttp.d.ts +9 -0
  112. package/build-tsc/mock/mockWs.d.ts +26 -0
  113. package/build-tsc/mock/types.d.ts +23 -0
  114. package/build-tsc/packageDetect.d.ts +1 -0
  115. package/build-tsc/packageInfo.d.ts +6 -0
  116. package/build-tsc/types.d.ts +85 -0
  117. package/build-tsc/ws/errors.d.ts +1 -0
  118. package/build-tsc/ws/index.d.ts +121 -0
  119. package/build-tsc-cjs/bizinikiwi-connect/Health.js +264 -0
  120. package/build-tsc-cjs/bizinikiwi-connect/index.js +323 -0
  121. package/build-tsc-cjs/bizinikiwi-connect/types.js +2 -0
  122. package/build-tsc-cjs/bundle.js +14 -0
  123. package/build-tsc-cjs/coder/error.js +53 -0
  124. package/build-tsc-cjs/coder/index.js +63 -0
  125. package/build-tsc-cjs/defaults.js +8 -0
  126. package/build-tsc-cjs/http/index.js +196 -0
  127. package/build-tsc-cjs/http/types.js +2 -0
  128. package/build-tsc-cjs/index.js +5 -0
  129. package/build-tsc-cjs/lru.js +150 -0
  130. package/build-tsc-cjs/mock/index.js +196 -0
  131. package/build-tsc-cjs/mock/mockHttp.js +17 -0
  132. package/build-tsc-cjs/mock/mockWs.js +47 -0
  133. package/build-tsc-cjs/mock/types.js +2 -0
  134. package/build-tsc-cjs/packageDetect.js +6 -0
  135. package/build-tsc-cjs/packageInfo.js +4 -0
  136. package/build-tsc-cjs/types.js +2 -0
  137. package/build-tsc-cjs/ws/errors.js +41 -0
  138. package/build-tsc-cjs/ws/index.js +529 -0
  139. package/build-tsc-esm/bizinikiwi-connect/Health.js +259 -0
  140. package/build-tsc-esm/bizinikiwi-connect/index.js +319 -0
  141. package/build-tsc-esm/bizinikiwi-connect/types.js +1 -0
  142. package/build-tsc-esm/bundle.js +5 -0
  143. package/build-tsc-esm/coder/error.js +50 -0
  144. package/build-tsc-esm/coder/index.js +58 -0
  145. package/build-tsc-esm/defaults.js +6 -0
  146. package/build-tsc-esm/http/index.js +191 -0
  147. package/build-tsc-esm/http/types.js +1 -0
  148. package/build-tsc-esm/index.js +2 -0
  149. package/build-tsc-esm/lru.js +146 -0
  150. package/build-tsc-esm/mock/index.js +191 -0
  151. package/build-tsc-esm/mock/mockHttp.js +12 -0
  152. package/build-tsc-esm/mock/mockWs.js +43 -0
  153. package/build-tsc-esm/mock/types.js +1 -0
  154. package/build-tsc-esm/packageDetect.js +4 -0
  155. package/build-tsc-esm/packageInfo.js +1 -0
  156. package/build-tsc-esm/types.js +1 -0
  157. package/build-tsc-esm/ws/errors.js +38 -0
  158. package/build-tsc-esm/ws/index.js +524 -0
  159. package/bundle.d.ts +5 -0
  160. package/bundle.js +5 -0
  161. package/cjs/bizinikiwi-connect/Health.d.ts +7 -0
  162. package/cjs/bizinikiwi-connect/Health.js +264 -0
  163. package/cjs/bizinikiwi-connect/index.d.ts +22 -0
  164. package/cjs/bizinikiwi-connect/index.js +323 -0
  165. package/cjs/bizinikiwi-connect/types.d.ts +12 -0
  166. package/cjs/bizinikiwi-connect/types.js +2 -0
  167. package/cjs/bundle.d.ts +5 -0
  168. package/cjs/bundle.js +14 -0
  169. package/cjs/coder/error.d.ts +29 -0
  170. package/cjs/coder/error.js +53 -0
  171. package/cjs/coder/index.d.ts +8 -0
  172. package/cjs/coder/index.js +63 -0
  173. package/cjs/defaults.d.ts +5 -0
  174. package/cjs/defaults.js +8 -0
  175. package/cjs/http/index.d.ts +81 -0
  176. package/cjs/http/index.js +196 -0
  177. package/cjs/http/types.d.ts +7 -0
  178. package/cjs/http/types.js +2 -0
  179. package/cjs/index.d.ts +2 -0
  180. package/cjs/index.js +5 -0
  181. package/cjs/lru.d.ts +15 -0
  182. package/cjs/lru.js +150 -0
  183. package/cjs/mock/index.d.ts +35 -0
  184. package/cjs/mock/index.js +196 -0
  185. package/cjs/mock/mockHttp.d.ts +9 -0
  186. package/cjs/mock/mockHttp.js +17 -0
  187. package/cjs/mock/mockWs.d.ts +26 -0
  188. package/cjs/mock/mockWs.js +47 -0
  189. package/cjs/mock/types.d.ts +23 -0
  190. package/cjs/mock/types.js +2 -0
  191. package/cjs/package.json +3 -0
  192. package/cjs/packageDetect.d.ts +1 -0
  193. package/cjs/packageDetect.js +6 -0
  194. package/cjs/packageInfo.d.ts +6 -0
  195. package/cjs/packageInfo.js +4 -0
  196. package/cjs/types.d.ts +85 -0
  197. package/cjs/types.js +2 -0
  198. package/cjs/ws/errors.d.ts +1 -0
  199. package/cjs/ws/errors.js +41 -0
  200. package/cjs/ws/index.d.ts +121 -0
  201. package/cjs/ws/index.js +529 -0
  202. package/coder/error.d.ts +29 -0
  203. package/coder/error.js +50 -0
  204. package/coder/index.d.ts +8 -0
  205. package/coder/index.js +58 -0
  206. package/defaults.d.ts +5 -0
  207. package/defaults.js +6 -0
  208. package/http/index.d.ts +81 -0
  209. package/http/index.js +191 -0
  210. package/http/types.d.ts +7 -0
  211. package/http/types.js +1 -0
  212. package/index.d.ts +2 -0
  213. package/index.js +2 -0
  214. package/lru.d.ts +15 -0
  215. package/lru.js +146 -0
  216. package/mock/index.d.ts +35 -0
  217. package/mock/index.js +191 -0
  218. package/mock/mockHttp.d.ts +9 -0
  219. package/mock/mockHttp.js +12 -0
  220. package/mock/mockWs.d.ts +26 -0
  221. package/mock/mockWs.js +43 -0
  222. package/mock/types.d.ts +23 -0
  223. package/mock/types.js +1 -0
  224. package/package.json +316 -15
  225. package/packageDetect.d.ts +1 -0
  226. package/packageDetect.js +4 -0
  227. package/packageInfo.d.ts +6 -0
  228. package/packageInfo.js +1 -0
  229. package/src/{substrate-connect → bizinikiwi-connect}/Health.ts +1 -1
  230. package/src/{substrate-connect → bizinikiwi-connect}/index.spec.ts +55 -22
  231. package/src/{substrate-connect → bizinikiwi-connect}/index.ts +27 -15
  232. package/src/{substrate-connect → bizinikiwi-connect}/types.ts +1 -1
  233. package/src/bundle.ts +2 -2
  234. package/src/coder/decodeResponse.spec.ts +1 -1
  235. package/src/coder/encodeJson.spec.ts +1 -1
  236. package/src/coder/encodeObject.spec.ts +1 -1
  237. package/src/coder/error.spec.ts +1 -1
  238. package/src/coder/error.ts +1 -1
  239. package/src/coder/index.ts +1 -1
  240. package/src/defaults.ts +1 -1
  241. package/src/http/index.spec.ts +1 -1
  242. package/src/http/index.ts +2 -2
  243. package/src/http/send.spec.ts +1 -1
  244. package/src/http/types.ts +1 -1
  245. package/src/index.ts +1 -1
  246. package/src/lru.spec.ts +1 -1
  247. package/src/lru.ts +2 -2
  248. package/src/mock/index.ts +2 -2
  249. package/src/mock/mockHttp.ts +1 -1
  250. package/src/mock/mockWs.ts +1 -1
  251. package/src/mock/on.spec.ts +1 -1
  252. package/src/mock/send.spec.ts +1 -1
  253. package/src/mock/subscribe.spec.ts +1 -1
  254. package/src/mock/types.ts +1 -1
  255. package/src/mock/unsubscribe.spec.ts +1 -1
  256. package/src/mod.ts +1 -1
  257. package/src/packageDetect.ts +2 -2
  258. package/src/packageInfo.ts +3 -3
  259. package/src/types.ts +1 -1
  260. package/src/ws/connect.spec.ts +1 -1
  261. package/src/ws/errors.ts +1 -1
  262. package/src/ws/index.spec.ts +1 -1
  263. package/src/ws/index.ts +2 -2
  264. package/src/ws/send.spec.ts +1 -1
  265. package/src/ws/state.spec.ts +1 -1
  266. package/src/ws/subscribe.spec.ts +1 -1
  267. package/src/ws/unsubscribe.spec.ts +1 -1
  268. package/tsconfig.build.tsbuildinfo +1 -1
  269. package/tsconfig.spec.tsbuildinfo +1 -0
  270. package/types.d.ts +85 -0
  271. package/types.js +1 -0
  272. package/ws/errors.d.ts +1 -0
  273. package/ws/errors.js +38 -0
  274. package/ws/index.d.ts +121 -0
  275. package/ws/index.js +524 -0
  276. /package/{build/substrate-connect → bizinikiwi-connect}/Health.d.ts +0 -0
  277. /package/{build/substrate-connect → bizinikiwi-connect}/types.d.ts +0 -0
@@ -1,7 +1,7 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import type * as ScType from '@substrate/connect';
4
+ import type * as ScType from '@bizinikiwi/connect';
5
5
  import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types.js';
6
6
 
7
7
  import { EventEmitter } from 'eventemitter3';
@@ -16,17 +16,17 @@ type ResponseCallback = (response: string | Error) => void;
16
16
  // We define the interface with items we use - this means that we don't really
17
17
  // need to be passed a full `import * as Sc from '@ubstrate/connect'`, but can
18
18
  // also make do with a { WellKnownChain, createScClient } interface
19
- interface SubstrateConnect {
19
+ interface BizinikiwiConnect {
20
20
  WellKnownChain: typeof ScType['WellKnownChain'];
21
21
  createScClient: typeof ScType['createScClient'];
22
22
  }
23
23
 
24
- const l = logger('api-substrate-connect');
24
+ const l = logger('api-bizinikiwi-connect');
25
25
 
26
26
  // These methods have been taken from:
27
- // https://github.com/paritytech/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
27
+ // https://github.com/pezkuwichain/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
28
28
  // It's important to take into account that smoldot is adding support to the new
29
- // json-rpc-interface https://paritytech.github.io/json-rpc-interface-spec/
29
+ // json-rpc-interface https://pezkuwichain.github.io/json-rpc-interface-spec/
30
30
  // However, at the moment this list only includes methods that belong to the "old" API
31
31
  const subscriptionUnsubscriptionMethods = new Map<string, string>([
32
32
  ['author_submitAndWatchExtrinsic', 'author_unwatchExtrinsic'],
@@ -51,7 +51,7 @@ interface ActiveSubs {
51
51
  }
52
52
 
53
53
  export class ScProvider implements ProviderInterface {
54
- readonly #Sc: SubstrateConnect;
54
+ readonly #Sc: BizinikiwiConnect;
55
55
  readonly #coder: RpcCoder = new RpcCoder();
56
56
  readonly #spec: string | ScType.WellKnownChain;
57
57
  readonly #sharedSandbox?: ScProvider | undefined;
@@ -64,9 +64,9 @@ export class ScProvider implements ProviderInterface {
64
64
  #chain: Promise<ScType.Chain> | null = null;
65
65
  #isChainReady = false;
66
66
 
67
- public constructor (Sc: SubstrateConnect, spec: string | ScType.WellKnownChain, sharedSandbox?: ScProvider) {
67
+ public constructor (Sc: BizinikiwiConnect, spec: string | ScType.WellKnownChain, sharedSandbox?: ScProvider) {
68
68
  if (!isObject(Sc) || !isObject(Sc.WellKnownChain) || !isFunction(Sc.createScClient)) {
69
- throw new Error('Expected an @substrate/connect interface as first parameter to ScProvider');
69
+ throw new Error('Expected an @bizinikiwi/connect interface as first parameter to ScProvider');
70
70
  }
71
71
 
72
72
  this.#Sc = Sc;
@@ -92,8 +92,8 @@ export class ScProvider implements ProviderInterface {
92
92
  throw new Error('clone() is not supported.');
93
93
  }
94
94
 
95
- // Config details can be found in @substrate/connect repo following the link:
96
- // https://github.com/paritytech/substrate-connect/blob/main/packages/connect/src/connector/index.ts
95
+ // Config details can be found in @bizinikiwi/connect repo following the link:
96
+ // https://github.com/pezkuwichain/bizinikiwi-connect/blob/main/packages/connect/src/connector/index.ts
97
97
  async connect (config?: ScType.Config, checkerFactory = healthChecker): Promise<void> {
98
98
  if (this.isConnected) {
99
99
  throw new Error('Already connected!');
@@ -166,9 +166,21 @@ export class ScProvider implements ProviderInterface {
166
166
  ? client.addWellKnownChain
167
167
  : client.addChain;
168
168
 
169
- this.#chain = addChain(this.#spec as ScType.WellKnownChain, onResponse).then((chain) => {
169
+ this.#chain = addChain(this.#spec as ScType.WellKnownChain).then((chain) => {
170
170
  hc.setSendJsonRpc(chain.sendJsonRpc);
171
171
 
172
+ // Start async response processing loop
173
+ // This replaces the callback-based API from older @substrate/connect versions
174
+ (async () => {
175
+ try {
176
+ for await (const res of chain.jsonRpcResponses) {
177
+ onResponse(res);
178
+ }
179
+ } catch {
180
+ // Chain was removed or connection closed - this is expected
181
+ }
182
+ })();
183
+
172
184
  this.#isChainReady = false;
173
185
 
174
186
  const cleanup = () => {
@@ -223,11 +235,11 @@ export class ScProvider implements ProviderInterface {
223
235
  // If we've reached this point, that means that the chain used to be "ready"
224
236
  // and now we are about to emit `disconnected`.
225
237
  //
226
- // This will cause the PolkadotJs API think that the connection is
238
+ // This will cause the PezkuwiJs API think that the connection is
227
239
  // actually dead. In reality the smoldot chain is not dead, of course.
228
240
  // However, we have to cleanup all the existing callbacks because when
229
241
  // the smoldot chain stops syncing, then we will emit `connected` and
230
- // the PolkadotJs API will try to re-create the previous
242
+ // the PezkuwiJs API will try to re-create the previous
231
243
  // subscriptions and requests. Although, now is not a good moment
232
244
  // to be sending unsubscription messages to the smoldot chain, we
233
245
  // should wait until is no longer syncing to send the unsubscription
@@ -316,7 +328,7 @@ export class ScProvider implements ProviderInterface {
316
328
  }
317
329
 
318
330
  public on (type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void {
319
- // It's possible. Although, quite unlikely, that by the time that polkadot
331
+ // It's possible. Although, quite unlikely, that by the time that pezkuwi
320
332
  // subscribes to the `connected` event, the Provider is already connected.
321
333
  // In that case, we must emit to let the consumer know that we are connected.
322
334
  if (type === 'connected' && this.isConnected) {
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  export interface SmoldotHealth {
package/src/bundle.ts CHANGED
@@ -1,8 +1,8 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
+ export { ScProvider } from './bizinikiwi-connect/index.js';
4
5
  export { HttpProvider } from './http/index.js';
5
6
  export { DEFAULT_CAPACITY, LRUCache } from './lru.js';
6
7
  export { packageInfo } from './packageInfo.js';
7
- export { ScProvider } from './substrate-connect/index.js';
8
8
  export { WsProvider } from './ws/index.js';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { RpcErrorInterface } from '../types.js';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { JsonRpcRequest, JsonRpcResponse, JsonRpcResponseBaseError } from '../types.js';
package/src/defaults.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  const HTTP_URL = 'http://127.0.0.1:9933';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/http/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type RpcError from '../coder/error.js';
@@ -16,7 +16,7 @@ const ERROR_SUBSCRIBE = 'HTTP Provider does not have subscriptions, use WebSocke
16
16
  const l = logger('api-http');
17
17
 
18
18
  /**
19
- * # @polkadot/rpc-provider
19
+ * # @pezkuwi/rpc-provider
20
20
  *
21
21
  * @name HttpProvider
22
22
  *
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/http/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { Logger } from '@pezkuwi/util/types';
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import './packageDetect.js';
package/src/lru.spec.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/lru.ts CHANGED
@@ -1,9 +1,9 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  // Assuming all 1.5MB responses, we apply a default allowing for 192MB
5
5
  // cache space (depending on the historic queries this would vary, metadata
6
- // for Kusama/Polkadot/Substrate falls between 600-750K, 2x for estimate)
6
+ // for Zagros/Pezkuwi/Bizinikiwi falls between 600-750K, 2x for estimate)
7
7
 
8
8
  export const DEFAULT_CAPACITY = 1024;
9
9
  export const DEFAULT_TTL = 30000; // 30 seconds
package/src/mock/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /* eslint-disable camelcase */
@@ -15,7 +15,7 @@ import { decorateStorage, Metadata } from '@pezkuwi/types';
15
15
  import jsonrpc from '@pezkuwi/types/interfaces/jsonrpc';
16
16
  import rpcHeader from '@pezkuwi/types-support/json/Header.004.json' assert { type: 'json' };
17
17
  import rpcSignedBlock from '@pezkuwi/types-support/json/SignedBlock.004.immortal.json' assert { type: 'json' };
18
- import rpcMetadata from '@pezkuwi/types-support/metadata/static-substrate';
18
+ import rpcMetadata from '@pezkuwi/types-support/metadata/static-bizinikiwi';
19
19
  import { BN, bnToU8a, logger, u8aToHex } from '@pezkuwi/util';
20
20
  import { randomAsU8a } from '@pezkuwi/util-crypto';
21
21
 
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { Mock } from './types.js';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { Server, WebSocket } from 'mock-socket';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/mock/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { Server } from 'mock-socket';
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/mod.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  export * from './index.js';
@@ -1,7 +1,7 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2026 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- // Do not edit, auto-generated by @polkadot/dev
4
+ // Do not edit, auto-generated by @pezkuwi/dev
5
5
  // (packageInfo imports will be kept as-is, user-editable)
6
6
 
7
7
  import { packageInfo as typesInfo } from '@pezkuwi/types/packageInfo';
@@ -1,6 +1,6 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2026 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- // Do not edit, auto-generated by @polkadot/dev
4
+ // Do not edit, auto-generated by @pezkuwi/dev
5
5
 
6
- export const packageInfo = { name: '@pezkuwi/rpc-provider', path: 'auto', type: 'auto', version: '16.5.5' };
6
+ export const packageInfo = { name: '@pezkuwi/rpc-provider', path: 'auto', type: 'auto', version: '16.5.8' };
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  export interface JsonRpcObject {
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/ws/errors.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  // from https://stackoverflow.com/questions/19304157/getting-the-reason-why-websockets-closed-with-close-code-1006
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
package/src/ws/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import type { Class } from '@pezkuwi/util/types';
@@ -64,7 +64,7 @@ function defaultEndpointStats (): EndpointStats {
64
64
  }
65
65
 
66
66
  /**
67
- * # @polkadot/rpc-provider/ws
67
+ * # @pezkuwi/rpc-provider/ws
68
68
  *
69
69
  * @name WsProvider
70
70
  *
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2025 @polkadot/rpc-provider authors & contributors
1
+ // Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  /// <reference types="@pezkuwi/dev-test/globals.d.ts" />