@settlemint/dalp-sdk 3.1.18-main.34042135992 → 3.1.18-main.34051758545

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 CHANGED
@@ -53,24 +53,26 @@ demo scripts are all built on it.
53
53
 
54
54
  ### Settlement
55
55
 
56
- A queue-backed write resolves with the settled record, not with the platform's
57
- acceptance. The platform answers such a route either with the settled body or
58
- with a handle to poll, and the client follows the handle so no caller writes
59
- that loop.
60
-
61
- A wait that runs out raises `SettlementTimeoutError` carrying the transaction
62
- id and the status URL. That is not a failed write: the transaction is still on
63
- its way to a block, and resubmitting is a second transfer. `settlementTimeoutMs`
64
- sets the bound per client, and a call may override it.
65
-
66
- A write the funding gate parks on an operator payment is stopped, not slow. The
67
- status row carries the open ask as `activeRequirement`, and every read that
68
- reports one restarts the bound, so the wait outlasts the pause and resolves
69
- with the settled record once the ask is paid. When an ask lapses unpaid the
70
- platform fails the request, and that failure is what the client reports. A
71
- caller that cannot wait that long ends the wait through `signal`, and
72
- `waitForTransaction` takes `holdWhilePaused: false` to end on the first parked
73
- status with reason `funding-paused` instead.
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 shorter bound
130
- the mutation factories default to.
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 for on-chain settlement, for a
177
- transaction id you hold from somewhere other than a client call. A write made
178
- through the client already waits.
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, the settlement types, and the version constants. A consumer who only
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
@@ -10,7 +10,7 @@ import {
10
10
  makeCookieStore2,
11
11
  createCookieStoreFetch2,
12
12
  SDK_USER_AGENT2
13
- } from "./chunk-98m5ctae.js";
13
+ } from "./chunk-bmac5ggc.js";
14
14
 
15
15
  // src/auth/live.ts
16
16
  import { apiKeyClient } from "@better-auth/api-key/client";
package/dist/bundler.js CHANGED
@@ -1,10 +1,10 @@
1
- import"./chunk-8mxdqwrr.js";
1
+ import"./chunk-6ffsp0q3.js";
2
2
  import"./chunk-j4sxrfzz.js";
3
- import"./chunk-396ye0s9.js";
3
+ import"./chunk-8rarvfkr.js";
4
4
  import"./chunk-xp3fx2yt.js";
5
5
  import {
6
6
  createDalpClient2
7
- } from "./chunk-daqk4jhm.js";
7
+ } from "./chunk-9q3a58gk.js";
8
8
 
9
9
  // src/bundler.ts
10
10
  import { getAddress, hexToBigInt, isHex } from "viem";