@settlemint/dalp-sdk 3.1.19-main.35740775477 → 3.1.19-main.35747494922
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/auth.js +1 -1
- package/dist/bundler.js +2 -2
- package/dist/{chunk-qv2wgcmj.js → chunk-5g4ev5k6.js} +1 -1
- package/dist/{chunk-7y52nnrf.js → chunk-eh86kbrr.js} +1 -1
- package/dist/{chunk-tmyd93kk.js → chunk-wmzaewxm.js} +16 -0
- package/dist/effect.js +1 -1
- package/dist/index.js +3 -3
- package/dist/react-query.js +1 -1
- package/dist/routes/console.js +2 -2
- package/package.json +1 -1
package/dist/auth.js
CHANGED
package/dist/bundler.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import"./chunk-j4sxrfzz.js";
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-wmzaewxm.js";
|
|
3
3
|
import"./chunk-xp3fx2yt.js";
|
|
4
4
|
import {
|
|
5
5
|
buildDalpClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-eh86kbrr.js";
|
|
7
7
|
|
|
8
8
|
// src/bundler.ts
|
|
9
9
|
import { getAddress, hexToBigInt, isHex } from "viem";
|
|
@@ -102,7 +102,7 @@ function createCookieStoreFetch2(cookieStore, fetchImpl = globalThis.fetch) {
|
|
|
102
102
|
// package.json
|
|
103
103
|
var package_default = {
|
|
104
104
|
name: "@settlemint/dalp-sdk",
|
|
105
|
-
version: "3.1.19-main.
|
|
105
|
+
version: "3.1.19-main.35747494922",
|
|
106
106
|
private: false,
|
|
107
107
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
108
108
|
homepage: "https://settlemint.com",
|
|
@@ -700,6 +700,19 @@ function sdkErrorFromEnvelope(payload, response) {
|
|
|
700
700
|
...Object.keys(data).length === 0 ? {} : { details: data }
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
|
+
function malformedSuccessError(response, text) {
|
|
704
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
705
|
+
return new DalpSdkError2({
|
|
706
|
+
code: "sdk.transport.MALFORMED_RESPONSE",
|
|
707
|
+
category: "dependency",
|
|
708
|
+
status: response.status,
|
|
709
|
+
retryable: true,
|
|
710
|
+
message: `DALP API responded ${String(response.status)} without a JSON object body`,
|
|
711
|
+
why: text === "" ? "The platform answered with an empty body where a JSON envelope was expected." : "The platform answered with a body that is not a JSON object, so the envelope cannot be read.",
|
|
712
|
+
fix: "Check the base URL and any proxy in front of the API: a sign-in page, an HTML error page, or a truncated body reached the client instead of the API envelope.",
|
|
713
|
+
details: { contentType, bodyLength: text.length, bodyPreview: text.slice(0, 120) }
|
|
714
|
+
});
|
|
715
|
+
}
|
|
703
716
|
async function readResponse(response) {
|
|
704
717
|
const text = await response.text();
|
|
705
718
|
let payload;
|
|
@@ -711,6 +724,9 @@ async function readResponse(response) {
|
|
|
711
724
|
if (!response.ok) {
|
|
712
725
|
throw makeDalpApiError2(sdkErrorFromEnvelope(payload, response));
|
|
713
726
|
}
|
|
727
|
+
if (payload === null || typeof payload !== "object") {
|
|
728
|
+
throw makeDalpApiError2(malformedSuccessError(response, text));
|
|
729
|
+
}
|
|
714
730
|
return payload;
|
|
715
731
|
}
|
|
716
732
|
|
package/dist/effect.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
RESERVED_STREAM_FAILURE_EVENT2,
|
|
15
15
|
STREAM_FAILED_ERROR_CODE2,
|
|
16
16
|
decodeEventStream2
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-wmzaewxm.js";
|
|
18
18
|
import {
|
|
19
19
|
SECRET_REDACTION_MARKER2,
|
|
20
20
|
Secret2,
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
createCookieStoreFetch2,
|
|
26
26
|
SDK_VERSION2,
|
|
27
27
|
SDK_USER_AGENT2
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5g4ev5k6.js";
|
|
29
29
|
import {
|
|
30
30
|
readsAsIndexerRebuild2
|
|
31
31
|
} from "./chunk-5qkmb0bq.js";
|
|
32
32
|
import {
|
|
33
33
|
buildDalpClient
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-eh86kbrr.js";
|
|
35
35
|
|
|
36
36
|
// src/proxy/client.ts
|
|
37
37
|
function createDalpClient(options) {
|
package/dist/react-query.js
CHANGED