@safe-global/api-kit 3.0.0-alpha.1 → 3.0.0-alpha.2

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.
@@ -35,9 +35,9 @@ __export(src_exports, {
35
35
  module.exports = __toCommonJS(src_exports);
36
36
 
37
37
  // src/utils/httpRequests.ts
38
- var import_node_fetch = __toESM(require("node-fetch"));
39
38
  async function sendRequest({ url, method, body }) {
40
- const response = await (0, import_node_fetch.default)(url, {
39
+ const fetch = await (typeof window === "undefined" ? import("node-fetch").then((m) => m.default) : Promise.resolve(window.fetch));
40
+ const response = await fetch(url, {
41
41
  method,
42
42
  headers: {
43
43
  Accept: "application/json",
@@ -1,6 +1,6 @@
1
1
  // src/utils/httpRequests.ts
2
- import fetch from "node-fetch";
3
2
  async function sendRequest({ url, method, body }) {
3
+ const fetch = await (typeof window === "undefined" ? import("node-fetch").then((m) => m.default) : Promise.resolve(window.fetch));
4
4
  const response = await fetch(url, {
5
5
  method,
6
6
  headers: {
@@ -1 +1 @@
1
- {"version":3,"file":"httpRequests.d.ts","sourceRoot":"","sources":["../../../src/utils/httpRequests.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CA4CnF"}
1
+ {"version":3,"file":"httpRequests.d.ts","sourceRoot":"","sources":["../../../src/utils/httpRequests.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAgDnF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-global/api-kit",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "SDK that facilitates the interaction with the Safe Transaction Service API",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "main": "dist/cjs/index.cjs",
@@ -48,8 +48,8 @@
48
48
  ],
49
49
  "homepage": "https://github.com/safe-global/safe-core-sdk#readme",
50
50
  "devDependencies": {
51
- "@safe-global/relay-kit": "^4.0.0-alpha.1",
52
- "@safe-global/testing-kit": "^0.2.0-alpha.1",
51
+ "@safe-global/relay-kit": "^4.0.0-alpha.2",
52
+ "@safe-global/testing-kit": "^0.2.0-alpha.2",
53
53
  "@types/chai": "^4.3.20",
54
54
  "@types/chai-as-promised": "^7.1.8",
55
55
  "@types/mocha": "^10.0.10",
@@ -67,8 +67,8 @@
67
67
  "web3": "^4.12.1"
68
68
  },
69
69
  "dependencies": {
70
- "@safe-global/protocol-kit": "^6.0.0-alpha.1",
71
- "@safe-global/types-kit": "^2.0.0-alpha.1",
70
+ "@safe-global/protocol-kit": "^6.0.0-alpha.2",
71
+ "@safe-global/types-kit": "^2.0.0-alpha.2",
72
72
  "node-fetch": "^2.7.0",
73
73
  "viem": "^2.21.8"
74
74
  }