@settlemint/dalp-sdk 3.1.18-main.34455919642 → 3.1.18-main.34460939478
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-65s2vt8s.js → chunk-f7ktab3w.js} +1 -1
- package/dist/{chunk-kytts4jm.js → chunk-jtm384aj.js} +1 -1
- package/dist/{chunk-wea3x9j4.js → chunk-shp8v4ws.js} +44 -3
- package/dist/effect.js +1 -1
- package/dist/index.js +3 -3
- package/dist/proxy/sse.d.ts +22 -1
- package/dist/react-query.js +1 -1
- package/package.json +1 -1
package/dist/auth.js
CHANGED
package/dist/bundler.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import"./chunk-d0vznz79.js";
|
|
2
2
|
import"./chunk-j4sxrfzz.js";
|
|
3
|
-
import"./chunk-
|
|
3
|
+
import"./chunk-shp8v4ws.js";
|
|
4
4
|
import"./chunk-xp3fx2yt.js";
|
|
5
5
|
import {
|
|
6
6
|
createDalpClient2
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-f7ktab3w.js";
|
|
8
8
|
|
|
9
9
|
// src/bundler.ts
|
|
10
10
|
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.18-main.
|
|
105
|
+
version: "3.1.18-main.34460939478",
|
|
106
106
|
private: false,
|
|
107
107
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
108
108
|
homepage: "https://settlemint.com",
|
|
@@ -795,7 +795,7 @@ async function* decodeEventStream2(body) {
|
|
|
795
795
|
await reader.cancel().catch(() => {});
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
async function*
|
|
798
|
+
async function* openEventStream(transport, route, input, options, signal, closed) {
|
|
799
799
|
const prepared = prepareRequest(transport, route, input, options);
|
|
800
800
|
prepared.headers.set("Accept", "text/event-stream");
|
|
801
801
|
const response = await transport.fetch(prepared.url, {
|
|
@@ -803,7 +803,7 @@ async function* streamRequest(transport, route, input, options) {
|
|
|
803
803
|
headers: prepared.headers,
|
|
804
804
|
credentials: transport.credentials,
|
|
805
805
|
...prepared.body === undefined ? {} : { body: prepared.body },
|
|
806
|
-
|
|
806
|
+
signal
|
|
807
807
|
});
|
|
808
808
|
if (!response.ok) {
|
|
809
809
|
await readResponse(response);
|
|
@@ -812,7 +812,48 @@ async function* streamRequest(transport, route, input, options) {
|
|
|
812
812
|
if (response.body === null) {
|
|
813
813
|
return;
|
|
814
814
|
}
|
|
815
|
-
|
|
815
|
+
try {
|
|
816
|
+
yield* decodeEventStream2(response.body);
|
|
817
|
+
} catch (error) {
|
|
818
|
+
if (!closed.byConsumer) {
|
|
819
|
+
throw error;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
function streamRequest(transport, route, input, options) {
|
|
824
|
+
const closing = new AbortController;
|
|
825
|
+
const callerSignal = options?.signal;
|
|
826
|
+
if (callerSignal !== undefined) {
|
|
827
|
+
if (callerSignal.aborted) {
|
|
828
|
+
closing.abort(callerSignal.reason);
|
|
829
|
+
} else {
|
|
830
|
+
callerSignal.addEventListener("abort", () => closing.abort(callerSignal.reason), { once: true });
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
const closed = { byConsumer: false };
|
|
834
|
+
const frames = openEventStream(transport, route, input, options, closing.signal, closed);
|
|
835
|
+
const close = () => {
|
|
836
|
+
closed.byConsumer = true;
|
|
837
|
+
closing.abort();
|
|
838
|
+
};
|
|
839
|
+
return {
|
|
840
|
+
[Symbol.asyncIterator]() {
|
|
841
|
+
return this;
|
|
842
|
+
},
|
|
843
|
+
next: (...args) => frames.next(...args),
|
|
844
|
+
return: (value) => {
|
|
845
|
+
close();
|
|
846
|
+
return frames.return(value);
|
|
847
|
+
},
|
|
848
|
+
throw: (error) => {
|
|
849
|
+
close();
|
|
850
|
+
return frames.throw(error);
|
|
851
|
+
},
|
|
852
|
+
async[Symbol.asyncDispose]() {
|
|
853
|
+
close();
|
|
854
|
+
await frames.return(undefined);
|
|
855
|
+
}
|
|
856
|
+
};
|
|
816
857
|
}
|
|
817
858
|
|
|
818
859
|
// src/proxy/fetch-executor.ts
|
package/dist/effect.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
RESERVED_STREAM_FAILURE_EVENT2,
|
|
13
13
|
STREAM_FAILED_ERROR_CODE2,
|
|
14
14
|
decodeEventStream2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-shp8v4ws.js";
|
|
16
16
|
import {
|
|
17
17
|
SECRET_REDACTION_MARKER2,
|
|
18
18
|
Secret2,
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
createCookieStoreFetch2,
|
|
24
24
|
SDK_VERSION2,
|
|
25
25
|
SDK_USER_AGENT2
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-jtm384aj.js";
|
|
27
27
|
import {
|
|
28
28
|
readsAsIndexerRebuild2
|
|
29
29
|
} from "./chunk-sk9nc2q3.js";
|
|
30
30
|
import {
|
|
31
31
|
createDalpClient2
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-f7ktab3w.js";
|
|
33
33
|
// src/transport/sse-lifecycle.ts
|
|
34
34
|
class SseLifecycleError extends Error {
|
|
35
35
|
reason;
|
package/dist/proxy/sse.d.ts
CHANGED
|
@@ -49,6 +49,27 @@ export declare function decodeEventStream(body: ReadableStream<Uint8Array>): Asy
|
|
|
49
49
|
/**
|
|
50
50
|
* Open one SSE route and yield its frames.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* The frames come from a generator this function wraps rather than from this
|
|
53
|
+
* function itself, because closing an async generator does not reach its body
|
|
54
|
+
* while a read is in flight. A `return()` on a generator suspended inside
|
|
55
|
+
* `await reader.read()` is QUEUED behind that read, and a route that holds its
|
|
56
|
+
* stream open with nothing left to say never settles it. The close then waits
|
|
57
|
+
* for a frame the route has no reason to send, and it waits forever.
|
|
58
|
+
*
|
|
59
|
+
* That is not a corner case. A consumer stops reading exactly when it has seen
|
|
60
|
+
* what it came for, which is usually before the run it is watching finishes:
|
|
61
|
+
* a screen the operator navigates away from, and a caller that stops at a
|
|
62
|
+
* funding ask it cannot pay. Measured on the gas drill (`aa-subjects` AE5): the
|
|
63
|
+
* lane stopped at the smart-account ask, which by design leaves the token
|
|
64
|
+
* create parked on that ask, and every assertion passed. The scope holding the
|
|
65
|
+
* stream then called `return()`, the parked stream never sent another frame,
|
|
66
|
+
* and the lane failed on its 600 s timeout with the work already done.
|
|
67
|
+
*
|
|
68
|
+
* So the request carries an abort signal this function owns, and the wrapper
|
|
69
|
+
* fires it BEFORE forwarding the close. The read in flight then ends, the
|
|
70
|
+
* generator body runs its own cleanup, and the close resolves. The caller's own
|
|
71
|
+
* signal still aborts the request; it is forwarded into the same controller.
|
|
72
|
+
*
|
|
73
|
+
* @returns The route's frame sequence, in order, closable at any frame.
|
|
53
74
|
*/
|
|
54
75
|
export declare function streamRequest(transport: Transport, route: RouteRow, input: unknown, options: CallOptions | undefined): AsyncGenerator<unknown>;
|
package/dist/react-query.js
CHANGED
package/package.json
CHANGED