@safe-global/api-kit
Advanced tools
@@ -38,5 +38,5 @@ "use strict"; | ||
| // src/utils/httpRequests.ts | ||
| var import_node_fetch = __toESM(require("node-fetch")); | ||
| async function sendRequest({ url, method, body }) { | ||
| const response = await (0, import_node_fetch.default)(url, { | ||
| const fetch = await (typeof window === "undefined" ? import("node-fetch").then((m) => m.default) : Promise.resolve(window.fetch)); | ||
| const response = await fetch(url, { | ||
| method, | ||
@@ -43,0 +43,0 @@ headers: { |
| // src/utils/httpRequests.ts | ||
| import fetch from "node-fetch"; | ||
| async function sendRequest({ url, method, body }) { | ||
| const fetch = await (typeof window === "undefined" ? import("node-fetch").then((m) => m.default) : Promise.resolve(window.fetch)); | ||
| const response = await fetch(url, { | ||
@@ -5,0 +5,0 @@ method, |
@@ -1,1 +0,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"} | ||
| {"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"} |
+5
-5
| { | ||
| "name": "@safe-global/api-kit", | ||
| "version": "3.0.0-alpha.1", | ||
| "version": "3.0.0-alpha.2", | ||
| "description": "SDK that facilitates the interaction with the Safe Transaction Service API", | ||
@@ -51,4 +51,4 @@ "types": "dist/src/index.d.ts", | ||
| "devDependencies": { | ||
| "@safe-global/relay-kit": "^4.0.0-alpha.1", | ||
| "@safe-global/testing-kit": "^0.2.0-alpha.1", | ||
| "@safe-global/relay-kit": "^4.0.0-alpha.2", | ||
| "@safe-global/testing-kit": "^0.2.0-alpha.2", | ||
| "@types/chai": "^4.3.20", | ||
@@ -71,4 +71,4 @@ "@types/chai-as-promised": "^7.1.8", | ||
| "dependencies": { | ||
| "@safe-global/protocol-kit": "^6.0.0-alpha.1", | ||
| "@safe-global/types-kit": "^2.0.0-alpha.1", | ||
| "@safe-global/protocol-kit": "^6.0.0-alpha.2", | ||
| "@safe-global/types-kit": "^2.0.0-alpha.2", | ||
| "node-fetch": "^2.7.0", | ||
@@ -75,0 +75,0 @@ "viem": "^2.21.8" |
110246
0.14%6
200%