@settlemint/dalp-sdk 3.1.18-main.34042135992 → 3.1.18-main.34045384230
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/README.md +26 -24
- package/dist/auth.js +1 -1
- package/dist/bundler.js +3 -3
- package/dist/{chunk-8mxdqwrr.js → chunk-6ffsp0q3.js} +1 -1
- package/dist/{chunk-396ye0s9.js → chunk-8rarvfkr.js} +27 -110
- package/dist/{chunk-daqk4jhm.js → chunk-9q3a58gk.js} +2 -2
- package/dist/{chunk-98m5ctae.js → chunk-ydgdk1k9.js} +1 -1
- package/dist/effect.d.ts +8 -0
- package/dist/effect.js +4 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +4 -10
- package/dist/proxy/builder.d.ts +1 -1
- package/dist/proxy/fetch-executor.d.ts +6 -4
- package/dist/proxy/transport.d.ts +2 -1
- package/dist/react-query.js +1 -1
- package/dist/routes/index.js +1 -1
- package/dist/wait-for-transaction.js +10 -4
- package/package.json +1 -1
- package/dist/chunk-d327hed9.js +0 -11
- package/dist/proxy/settlement.d.ts +0 -67
package/README.md
CHANGED
|
@@ -53,24 +53,26 @@ demo scripts are all built on it.
|
|
|
53
53
|
|
|
54
54
|
### Settlement
|
|
55
55
|
|
|
56
|
-
A queue-backed write
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
that
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
A queue-backed write carries a `Prefer` header derived from
|
|
57
|
+
`settlementTimeoutMs`: undefined asks for `wait=15`, zero or less asks for
|
|
58
|
+
`respond-async`, anything else asks for `wait=<seconds>`, clamped to the
|
|
59
|
+
platform's 5 to 99 second range. `settlementTimeoutMs` sets that bound per
|
|
60
|
+
client, and a call may override it.
|
|
61
|
+
|
|
62
|
+
The platform does the waiting, not the client. When the write settles inside
|
|
63
|
+
the wait, the call returns the route's HTTP 200 resource. When it does not, the
|
|
64
|
+
call returns the declared HTTP 202 handle unchanged: a transaction write's
|
|
65
|
+
`{ transactionId, status, statusUrl }`, or a custody write's `{ requestId,
|
|
66
|
+
state, statusUrl }`. The client never polls a status URL on your behalf.
|
|
67
|
+
|
|
68
|
+
Pass a transaction id to `waitForTransaction` to follow it to a terminal
|
|
69
|
+
state. A write the funding gate parks on an operator payment reads as still
|
|
70
|
+
queued for as long as the ask is open: the status row carries it as
|
|
71
|
+
`activeRequirement`, and `waitForTransaction` restarts its own timeout on every
|
|
72
|
+
status that reports one, so the wait it runs outlasts the pause. A caller that
|
|
73
|
+
cannot wait that long ends the wait through `signal`, or passes
|
|
74
|
+
`holdWhilePaused: false` to end on the first parked status instead. A custody
|
|
75
|
+
handle has no equivalent helper: follow `statusUrl` yourself.
|
|
74
76
|
|
|
75
77
|
### Conditional requests and ETags
|
|
76
78
|
|
|
@@ -126,8 +128,8 @@ using something else.
|
|
|
126
128
|
Cache keys are derived from route identity plus canonicalized input, so two
|
|
127
129
|
callers passing the same parameters in a different key order share one entry.
|
|
128
130
|
`./react-query` exports `queryKeyFor` and `canonicalize` for building a
|
|
129
|
-
matching invalidation filter, and `UI_SETTLEMENT_TIMEOUT_MS`, the
|
|
130
|
-
|
|
131
|
+
matching invalidation filter, and `UI_SETTLEMENT_TIMEOUT_MS`, the bound the
|
|
132
|
+
mutation factories default to.
|
|
131
133
|
|
|
132
134
|
## Scalars
|
|
133
135
|
|
|
@@ -173,14 +175,14 @@ while calling the v2 REST resources underneath. It accepts EntryPoint v0.9
|
|
|
173
175
|
|
|
174
176
|
- `./verify-webhook` verifies an inbound webhook signature.
|
|
175
177
|
- `./sign-webhook-receipt` signs a webhook delivery receipt (Node only).
|
|
176
|
-
- `./wait-for-transaction` is a bounded poll
|
|
177
|
-
transaction id
|
|
178
|
-
|
|
178
|
+
- `./wait-for-transaction` is a bounded poll to a terminal state, for a
|
|
179
|
+
transaction id from any source, including the 202 handle a client write
|
|
180
|
+
returns when the platform's wait runs out.
|
|
179
181
|
|
|
180
182
|
## Package root
|
|
181
183
|
|
|
182
184
|
The root stays small: the client factory, its options and errors, cookie-store
|
|
183
|
-
transport,
|
|
185
|
+
transport, and the version constants. A consumer who only
|
|
184
186
|
calls routes never pays for auth, bundler, TanStack Query, or webhook code.
|
|
185
187
|
|
|
186
188
|
## Documentation
|
package/dist/auth.js
CHANGED
package/dist/bundler.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-6ffsp0q3.js";
|
|
2
2
|
import"./chunk-j4sxrfzz.js";
|
|
3
|
-
import"./chunk-
|
|
3
|
+
import"./chunk-8rarvfkr.js";
|
|
4
4
|
import"./chunk-xp3fx2yt.js";
|
|
5
5
|
import {
|
|
6
6
|
createDalpClient2
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-9q3a58gk.js";
|
|
8
8
|
|
|
9
9
|
// src/bundler.ts
|
|
10
10
|
import { getAddress, hexToBigInt, isHex } from "viem";
|