@calimero-network/mero-js 19.17.0 → 19.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mero-js.d.ts CHANGED
@@ -21,6 +21,8 @@ export interface MeroJsConfig {
21
21
  timeoutMs?: number;
22
22
  /** Request credentials mode for fetch (omit, same-origin, include) */
23
23
  requestCredentials?: RequestCredentials;
24
+ /** Custom fetch for every HTTP request (`auth`, `admin`, `rpc`, `events`). Defaults to global `fetch`. */
25
+ fetch?: typeof fetch;
24
26
  /** Optional token store for persistence */
25
27
  tokenStore?: TokenStore;
26
28
  /**
package/dist/mero-js.js CHANGED
@@ -77,6 +77,7 @@ export class MeroJs {
77
77
  const getProof = resolveProofSigner(this.config.requestProof);
78
78
  this.httpClient = createBrowserHttpClient({
79
79
  baseUrl: this.config.baseUrl,
80
+ fetch: this.config.fetch,
80
81
  getProof,
81
82
  getAuthToken: async () => {
82
83
  const token = await this.getValidToken();
@@ -153,6 +154,7 @@ export class MeroJs {
153
154
  if (!this.sseClient) {
154
155
  this.sseClient = new SseClient({
155
156
  baseUrl: this.config.baseUrl,
157
+ fetch: this.config.fetch,
156
158
  getAuthToken: async () => {
157
159
  const token = await this.getValidToken();
158
160
  return token?.access_token || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calimero-network/mero-js",
3
- "version": "19.17.0",
3
+ "version": "19.18.0",
4
4
  "description": "Pure JavaScript SDK for Calimero",
5
5
  "type": "module",
6
6
  "exports": {