@alephium/web3 0.14.5 → 0.14.6

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.
@@ -25,7 +25,7 @@ function initializeExplorerApi(baseUrl, apiKey, customFetch) {
25
25
  baseUrl: baseUrl,
26
26
  baseApiParams: { secure: true },
27
27
  securityWorker: (accessToken) => (accessToken !== null ? { headers: { 'X-API-KEY': `${accessToken}` } } : {}),
28
- customFetch: customFetch ?? fetch
28
+ customFetch: customFetch ?? ((...fetchParams) => fetch(...fetchParams))
29
29
  });
30
30
  explorerApi.setSecurityData(apiKey ?? null);
31
31
  return explorerApi;
@@ -26,7 +26,7 @@ function initializeNodeApi(baseUrl, apiKey, customFetch) {
26
26
  baseUrl: baseUrl,
27
27
  baseApiParams: { secure: true },
28
28
  securityWorker: (accessToken) => (accessToken !== null ? { headers: { 'X-API-KEY': `${accessToken}` } } : {}),
29
- customFetch: customFetch ?? fetch
29
+ customFetch: customFetch ?? ((...fetchParams) => fetch(...fetchParams))
30
30
  });
31
31
  nodeApi.setSecurityData(apiKey ?? null);
32
32
  return nodeApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "0.14.5",
3
+ "version": "0.14.6",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -24,7 +24,7 @@ function initializeExplorerApi(baseUrl: string, apiKey?: string, customFetch?: t
24
24
  baseUrl: baseUrl,
25
25
  baseApiParams: { secure: true },
26
26
  securityWorker: (accessToken) => (accessToken !== null ? { headers: { 'X-API-KEY': `${accessToken}` } } : {}),
27
- customFetch: customFetch ?? fetch
27
+ customFetch: customFetch ?? ((...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams))
28
28
  })
29
29
  explorerApi.setSecurityData(apiKey ?? null)
30
30
  return explorerApi
@@ -35,7 +35,7 @@ function initializeNodeApi(baseUrl: string, apiKey?: string, customFetch?: typeo
35
35
  baseUrl: baseUrl,
36
36
  baseApiParams: { secure: true },
37
37
  securityWorker: (accessToken) => (accessToken !== null ? { headers: { 'X-API-KEY': `${accessToken}` } } : {}),
38
- customFetch: customFetch ?? fetch
38
+ customFetch: customFetch ?? ((...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams))
39
39
  })
40
40
  nodeApi.setSecurityData(apiKey ?? null)
41
41
  return nodeApi