@dvmkit/sdk 0.1.5-rc.9 → 0.2.0-rc.9

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.
Files changed (56) hide show
  1. package/README.md +12 -0
  2. package/dist/{chunk-BIP6G74V.js → chunk-2ATUAUAO.js} +8 -8
  3. package/dist/{chunk-27V2ILSR.js → chunk-4A2RAKCW.js} +2 -2
  4. package/dist/{chunk-EVBK675R.js → chunk-6GRIKOFB.js} +28 -23
  5. package/dist/{chunk-CEOAHV2I.js → chunk-FDKRXOZO.js} +0 -5
  6. package/dist/{chunk-L4OYF4DQ.js → chunk-FT6HTUM4.js} +1 -1
  7. package/dist/{chunk-BTZY7VPH.js → chunk-GAIPXGM3.js} +1 -1
  8. package/dist/{chunk-U6M3ATSG.js → chunk-JDT5LCJC.js} +40 -6
  9. package/dist/{chunk-FROTD5XQ.js → chunk-JLXYOV4Y.js} +1 -2
  10. package/dist/{chunk-M7LHFJ5K.js → chunk-KMZXTBLA.js} +2 -2
  11. package/dist/{chunk-6BQM7TOW.js → chunk-L67WTZX2.js} +3 -7
  12. package/dist/{chunk-CGKZDODG.js → chunk-MG67KXU7.js} +0 -5
  13. package/dist/{chunk-JZWELPFH.js → chunk-MRAGS5VP.js} +1 -1
  14. package/dist/{chunk-2UUXIIOC.js → chunk-O2X2CCKH.js} +3 -3
  15. package/dist/{chunk-TQWGQCNV.js → chunk-OMIQMMME.js} +3 -3
  16. package/dist/{chunk-5PBOA25N.js → chunk-PCUQZDZA.js} +436 -355
  17. package/dist/{chunk-KVEHHC7W.js → chunk-PHHAYRQV.js} +7 -9
  18. package/dist/{chunk-SSSZUVWM.js → chunk-QP53RWAD.js} +88 -38
  19. package/dist/{chunk-DMNLFNTW.js → chunk-QT4ONTST.js} +1 -1
  20. package/dist/{chunk-RW5LP57K.js → chunk-SDK6KDJN.js} +0 -1
  21. package/dist/{chunk-MLRCSJYX.js → chunk-V7EVFLAK.js} +87 -90
  22. package/dist/{chunk-E4EVGPDX.js → chunk-XQXJKJ3P.js} +0 -2
  23. package/dist/{credit-ledger-2DFQHNLB.js → credit-ledger-5ZEJRI46.js} +1 -1
  24. package/dist/{credit-menu-enwMbn55.d.ts → credit-menu-D4Gcdgc4.d.ts} +487 -643
  25. package/dist/{fx-D860pZvP.d.ts → fx-B0SLBe5x.d.ts} +38 -82
  26. package/dist/index.d.ts +11 -14
  27. package/dist/index.js +2 -2
  28. package/dist/internal/caller.d.ts +618 -1525
  29. package/dist/internal/caller.js +28 -60
  30. package/dist/internal/server.d.ts +36 -61
  31. package/dist/internal/server.js +11 -11
  32. package/dist/{job-store-BUGqvCfL.d.ts → job-store-B2uZvga4.d.ts} +70 -59
  33. package/dist/{lightning-backend-BozcevPZ.d.ts → lightning-backend-CQBnQgsT.d.ts} +19 -27
  34. package/dist/{memory-credit-ledger-MNUOTQO5.js → memory-credit-ledger-ZOH6C3N4.js} +2 -2
  35. package/dist/{mpp-setup-4FJD6ZHV.js → mpp-setup-IOJBF7DB.js} +1 -1
  36. package/dist/{payout-reporter-RG6XNGPI.js → payout-reporter-5PIRYFVQ.js} +1 -1
  37. package/dist/{postgres-consumed-credential-store-VHBT4KEA.js → postgres-consumed-credential-store-ISRHBMOU.js} +1 -1
  38. package/dist/{postgres-job-store-3RAXMNSY.js → postgres-job-store-OGQ6IT4U.js} +1 -1
  39. package/dist/{postgres-kv-store-JFBDP5IP.js → postgres-kv-store-D5E2EZ24.js} +1 -1
  40. package/dist/{postgres-replay-store-UJXRT6VO.js → postgres-replay-store-IZFLTTAC.js} +1 -1
  41. package/dist/{pricing-4CEB34RM.js → pricing-MU5GNUJZ.js} +1 -1
  42. package/dist/{processed-payment-store-HAA4SFNK.js → processed-payment-store-FIDI3RNH.js} +1 -1
  43. package/dist/{revenue-reporter-ASZ7SHHH.js → revenue-reporter-NNCNRY4C.js} +1 -1
  44. package/dist/server/index.d.ts +53 -59
  45. package/dist/server/index.js +38 -37
  46. package/dist/{ssrf-DbFkpDv0.d.ts → ssrf-dMooihtY.d.ts} +1 -2
  47. package/dist/{step-cache-5dljDqrQ.d.ts → step-cache-CXg7ziML.d.ts} +389 -551
  48. package/dist/{tempo-charge-store-RIFTALZK.js → tempo-charge-store-76TDAF34.js} +1 -1
  49. package/dist/{tempo-lifecycle-DFIXQ54Q.js → tempo-lifecycle-DXM7QXJQ.js} +3 -3
  50. package/dist/{tempo-wallet-4QKSV65O.js → tempo-wallet-O67H5M4N.js} +2 -2
  51. package/dist/testing/index.d.ts +5 -15
  52. package/dist/testing/index.js +4 -11
  53. package/dist/{usd-DoRuAckA.d.ts → usd-BNDg1715.d.ts} +14 -16
  54. package/dist/{wallet-CJC8lwxx.d.ts → wallet-Dwjs5n_M.d.ts} +1 -1
  55. package/dist/{x402-5H27DCBE.js → x402-7S2EFINY.js} +2 -2
  56. package/package.json +2 -1
@@ -1,23 +1,16 @@
1
- import { C as Currency } from './step-cache-5dljDqrQ.js';
1
+ import { C as Currency } from './step-cache-CXg7ziML.js';
2
2
 
3
3
  /**
4
- * Quote-time fx snapshot. Embedded in scribe's `lockedQuote` for within-job
5
- * consistency between upfront and mid-job charges (see scribe's
6
- * `runTranscribeJob`). Within-call lock = "rate cached at first fetch and
7
- * reused across the duration calculation"; across-call lock degrades to
8
- * "fxFetcher {@link FX_CACHE_TTL_MS} cache window" — see
9
- * `public design rationale`.
10
- *
11
- * `rates` maps an ISO-4217 lowercase currency code to that currency's
12
- * value-per-BTC at `as_of`. The set of currencies present matches the
13
- * fetcher's configured set (see `createFxFetcher.currencies`).
4
+ * Quote-time FX snapshot. `rates` maps configured lowercase currency codes to
5
+ * units of that currency per BTC at `as_of`; partial responses may omit codes.
6
+ * Capture a snapshot once to keep upfront and mid-job charges at one rate.
14
7
  */
15
8
  interface FxRateSnapshot {
16
9
  rates: Record<Currency, number>;
17
10
  as_of: string;
18
11
  /**
19
12
  * Configured currencies whose rate here came from an *earlier* fetch, because
20
- * the source's latest body omitted them (internal-review). The rate is the best one
13
+ * the source's latest body omitted them. The rate is the best one
21
14
  * this process holds; `as_of` describes the rest of the snapshot, so a
22
15
  * consumer pricing one of these is degrading and should say so — the mid-job
23
16
  * legs report it as `credit_topup_stale_rate` / `dvm.ask_pin_stale_rate`.
@@ -30,7 +23,7 @@ interface FxRateSnapshot {
30
23
  * raises `fx_rate_unavailable` rather than `unsupported_currency` for these:
31
24
  * the DVM advertises the currency, so this is a rate outage narrowed to one
32
25
  * code, and a caller's agent must read it on the same retryable envelope as
33
- * any other (internal-review). Absent on the normal complete-body path.
26
+ * any other. Absent on the normal complete-body path.
34
27
  */
35
28
  unavailable?: readonly Currency[];
36
29
  }
@@ -61,31 +54,25 @@ interface PlatformFxSource {
61
54
  token: string;
62
55
  }
63
56
  /**
64
- * In-process cache window for the fx snapshot. 5 minutes amortises rate-limit
65
- * budget across concurrent quotes and gives a within-window quote → job pair a
66
- * consistent rate without an explicit lock. Bumped from 60s in internal-review; the
67
- * per-call drift remains sub-cent at typical DVM amounts (BTC's intra-5-min
68
- * volatility is well under 1%). Within-job consistency is unaffected — scribe's
69
- * `lockedQuote.fx` is captured once at quote-time and reused at settlement
70
- * regardless of the TTL. Hosted-DVM upstream fan-out is handled by internal-review
71
- * (platform-served fx endpoint) rather than this TTL.
57
+ * Five-minute in-process freshness window. Concurrent quotes share a rate
58
+ * without another network hit; within-job consistency requires capturing the
59
+ * quote snapshot rather than fetching again after the window expires.
72
60
  */
73
61
  declare const FX_CACHE_TTL_MS = 300000;
74
62
  /** Default retry budget per `fetch()` call before raising `fx_rate_unavailable`. */
75
63
  declare const FX_RETRY_COUNT = 2;
76
- /** Agent-relayable copy for an {@link FxRateUnavailableError}. */
77
64
  interface FxRateUnavailableCopy {
78
65
  display?: string;
79
66
  hint?: string;
80
67
  }
81
68
  /**
82
69
  * The platform's *deliberate* known-stale refusal, threaded through the fetch
83
- * boundary from the `_internal/fx` 503 body (internal-review/internal-review). Present on an
70
+ * boundary from the `_internal/fx` 503 body. Present on an
84
71
  * {@link FxRateUnavailableError} only when the platform decided the snapshot is
85
72
  * too old to price against (`error.code === "fx_rate_unavailable"` with a
86
73
  * `detail.stale_days`) — as opposed to a transient unreachability, which carries
87
74
  * no `knownStale`. `resolveServerBtcUsdRate` fails closed on this rather than
88
- * degrading to `lastKnown` (internal-review): the platform already refused to serve the
75
+ * degrading to `lastKnown`: the platform already refused to serve the
89
76
  * rate, so pricing off a frozen local copy of it would defeat the refusal.
90
77
  */
91
78
  interface FxKnownStale {
@@ -100,7 +87,7 @@ interface FxKnownStale {
100
87
  * pass `display` to humans.
101
88
  *
102
89
  * `copy` overrides the quote-flavoured defaults. The payment rails raise the
103
- * same code from a different moment in the request (internal-review) — an agent that
90
+ * same code from a different moment in the request — an agent that
104
91
  * can't be quoted and an agent whose payment couldn't be priced retry the same
105
92
  * way, so they share one code, but "nothing was charged" is only true of the
106
93
  * latter and must not be said to the former.
@@ -109,16 +96,15 @@ interface FxKnownStale {
109
96
  * hint } }`, the payment path the flat `{ error: "fx_rate_unavailable", display,
110
97
  * hint }` that every other payment error uses (`buildPaymentErrorResponse`). So
111
98
  * an agent has one retry rule but still two shapes to parse the code out of —
112
- * that split is the response envelopes', not this error's, and unifying it is
113
- * internal-review.
99
+ * that split is the response envelopes', not this error's.
114
100
  */
115
101
  declare class FxRateUnavailableError extends Error {
116
102
  readonly code = "fx_rate_unavailable";
117
103
  readonly display: string;
118
104
  readonly hint: string;
119
105
  /**
120
- * Set only when the platform explicitly refused a *known-stale* snapshot
121
- * (internal-review). Absent means transient/unreachable — a distinction the payment
106
+ * Set only when the platform explicitly refused a *known-stale* snapshot.
107
+ * Absent means transient/unreachable — a distinction the payment
122
108
  * rail's amount computation branches on: refuse on `knownStale`, degrade to
123
109
  * the last-known rate without it. See {@link FxKnownStale}.
124
110
  */
@@ -140,7 +126,7 @@ interface FxFetcher {
140
126
  * The last snapshot this fetcher successfully retrieved, paired with the Unix
141
127
  * ms it was cached, or `null` if none has landed yet. Ignores the freshness
142
128
  * TTL — the cache is never cleared, so this survives an upstream outage and is
143
- * the offline degradation source for the payment rail (internal-review): when
129
+ * the offline degradation source for the payment rail: when
144
130
  * {@link fetch} throws, callers serve this rather than fail a priced request.
145
131
  * Optional so lightweight test fakes need not implement it.
146
132
  */
@@ -152,10 +138,10 @@ interface FxFetcher {
152
138
  /**
153
139
  * Options for `createFxFetcher`. `source` accepts either:
154
140
  * - a URL string targeting a CoinGecko-shaped endpoint
155
- * (`{ bitcoin: { <currency>: number, ... } }`), or
141
+ * (`{ bitcoin: { <currency>: number, ... } }`), or
156
142
  * - a {@link PlatformFxSource} object pointing at the dvmkit platform's
157
- * `_internal/fx` endpoint (the canonical `fx_rates` snapshot, served with
158
- * bearer auth).
143
+ * `_internal/fx` endpoint (the canonical `fx_rates` snapshot, served with
144
+ * bearer auth).
159
145
  *
160
146
  * `undefined` falls back to {@link DEFAULT_FX_RATE_SOURCE} (CoinGecko-direct).
161
147
  */
@@ -177,66 +163,36 @@ interface CreateFxFetcherOpts {
177
163
  /** Build the default fx fetcher backed by `DVMKIT_FX_SOURCE` (or CoinGecko). */
178
164
  declare function createFxFetcher(opts?: CreateFxFetcherOpts): FxFetcher;
179
165
  /**
180
- * Prime `fetcher`'s snapshot cache so the first priced surface to need a rate
181
- * isn't the process's first fetch (internal-review).
182
- *
183
- * internal-review gave every fx hop in the payment layer a ladder down onto
184
- * {@link FxFetcher.lastKnown}, which closes the failure for any process that
185
- * has ever held a rate. A free-to-submit DVM never has: the job is free, so no
186
- * quote fetches one, and the ask-time pin in `ctx.requestPayment` *is* the
187
- * first fetch — a blip at the rate provider in that window has nothing to
188
- * degrade onto and still costs the receipt its whole `credit` block.
189
- *
190
- * Fire-and-forget by construction: never awaited, so it can't slow a boot;
191
- * never rethrown, so it can't fail one. A failure is deliberately **silent** —
192
- * a warn on every offline `dvmctl dev` boot is worse than the gap this closes,
193
- * and the first real ask walks the internal-review ladder and names its own failure
194
- * there. Racing that ask costs one upstream fetch rather than two, because
195
- * {@link createFxFetcher} dedupes in flight.
196
- *
197
- * Already-warm fetchers are left alone, so calling this twice — or against an
198
- * injected fetcher a caller primed itself — is free.
166
+ * Prime the last-known snapshot before the first priced request needs it.
167
+ * Fire-and-forget: failures stay silent and never delay or fail startup.
168
+ * Already-warm fetchers are left alone; racing a request shares its in-flight
169
+ * fetch rather than adding an upstream call.
199
170
  */
200
171
  declare function warmFxSnapshot(fetcher: FxFetcher): void;
201
172
  /**
202
173
  * Look up `currency`'s rate in `snapshot`.
203
174
  *
204
- * Two ways it can be missing, and they are not the same failure (internal-review):
175
+ * Two ways it can be missing, and they are not the same failure:
205
176
  *
206
177
  * - The snapshot lists it in {@link FxRateSnapshot.unavailable} — the DVM
207
- * advertises the currency, but its rate source omitted it and this process
208
- * holds no earlier one. That is a rate outage narrowed to one code, so it
209
- * raises `fx_rate_unavailable`, retryable, the same envelope every other rate
210
- * failure reaches the caller's agent on (internal-review). Answering
211
- * `unsupported_currency` here would reach the quote path as a `400
212
- * invalid_quote_result` — telling an agent the DVM's own quote is malformed,
213
- * and not to retry, over a transient omission upstream.
178
+ * advertises the currency, but its rate source omitted it and this process
179
+ * holds no earlier one. That is a rate outage narrowed to one code, so it
180
+ * raises `fx_rate_unavailable`, retryable, the same envelope every other rate
181
+ * failure reaches the caller's agent on. Answering
182
+ * `unsupported_currency` here would reach the quote path as a `400
183
+ * invalid_quote_result` — telling an agent the DVM's own quote is malformed,
184
+ * and not to retry, over a transient omission upstream.
214
185
  * - Anything else — a currency neither configured nor fetched, typically an
215
- * operator's `DVMKIT_FX_SOURCE` override that doesn't carry it. Raises
216
- * `UnsupportedCurrencyError` naming the keys actually present, so the message
217
- * stays truthful about what this snapshot can price.
186
+ * operator's `DVMKIT_FX_SOURCE` override that doesn't carry it. Raises
187
+ * `UnsupportedCurrencyError` naming the keys actually present, so the message
188
+ * stays truthful about what this snapshot can price.
218
189
  */
219
190
  declare function fxRateFor(snapshot: FxRateSnapshot, currency: Currency): number;
220
191
  /**
221
- * Resolve the fx source from a DVM process's env. Used by first-party DVMs to
222
- * pick between platform-served and CoinGecko-direct fetchers based on whether
223
- * the platform wired this DVM up at deploy-time. Returns `undefined` when no
224
- * env override is set — the default CoinGecko URL kicks in inside
225
- * {@link createFxFetcher}.
226
- *
227
- * - `DVMKIT_FX_SOURCE === "platform"` + `DVMKIT_PLATFORM_URL` +
228
- * `DVMKIT_PLATFORM_TOKEN` → {@link PlatformFxSource} pointing at
229
- * `${DVMKIT_PLATFORM_URL}/_internal/fx`. The platform's container deploy
230
- * pipeline injects all three together (see `applyPlatformTokenInjection`).
231
- * - `DVMKIT_FX_SOURCE` starts with `http(s)://` → URL passed through verbatim
232
- * (CoinGecko-shaped override, mostly used by tests + self-hosted operators
233
- * pointing at a private mirror).
234
- * - Otherwise → `undefined` (CoinGecko-direct default).
235
- *
236
- * The magic string `"platform"` and the URL fallback are intentionally
237
- * non-overlapping shapes — operators who want a CoinGecko-style URL pass a
238
- * URL, and platform-injected DVMs get the string flag plus the two address
239
- * env vars.
192
+ * Resolve an environment override for `createFxFetcher`. An unset
193
+ * `DVMKIT_FX_SOURCE` leaves its default source in effect. `"platform"` requires
194
+ * both `DVMKIT_PLATFORM_URL` and `DVMKIT_PLATFORM_TOKEN`, and becomes an
195
+ * authenticated `PlatformFxSource`; any other nonempty value passes through.
240
196
  */
241
197
  declare function resolveFxSourceFromEnv(env: Record<string, string | undefined>): string | PlatformFxSource | undefined;
242
198
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-5dljDqrQ.js';
2
- export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CreateSignedRequestVerifierOpts, f as CreditConfig, g as CreditView, h as DEFAULT_CREDIT_MAX, i as DEFAULT_CREDIT_MIN, j as DEFAULT_CREDIT_TTL_SECONDS, k as DEFAULT_JOB_RETENTION_DAYS, l as DVMRouteContext, I as IncomingMessage, m as InputType, n as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, o as PaymentMethod, p as PriceValue, q as ProgressContent, r as PromptOpts, Q as QuoteConfig, s as QuoteContext, t as QuoteResult, R as ResolvedCreditConfig, u as ResponseContent, S as SDKJobContext, v as SDKPaymentRequestOpts, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, y as SignedRequestAudience, z as SignedRequestDomain, B as SignedRequestError, E as SignedRequestFailure, F as SignedRequestReplayStore, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, U as UnsupportedCurrencyError, N as createSignedRequestVerifier, O as isZodSchema, T as signedRequestStatementHeader, V as validateCurrency } from './step-cache-5dljDqrQ.js';
3
- export { C as CreateFxFetcherOpts, D as DEFAULT_FX_CURRENCIES, a as DEFAULT_FX_RATE_SOURCE, F as FxFetcher, b as FxRateSnapshot, c as FxRateUnavailableError, P as PlatformFxSource, d as createFxFetcher, f as fxRateFor, r as resolveFxSourceFromEnv } from './fx-D860pZvP.js';
4
- export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-DoRuAckA.js';
5
- export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-BUGqvCfL.js';
6
- export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from './ssrf-DbFkpDv0.js';
1
+ import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-CXg7ziML.js';
2
+ export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CreateSignedRequestVerifierOpts, f as CreditConfig, g as CreditView, h as DEFAULT_CREDIT_MAX, i as DEFAULT_CREDIT_MIN, j as DEFAULT_CREDIT_TTL_SECONDS, k as DEFAULT_JOB_RETENTION_DAYS, l as DVMRouteContext, I as IncomingMessage, m as InputType, n as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, o as PaymentMethod, p as PriceValue, q as ProgressContent, r as PromptOpts, Q as QuoteConfig, s as QuoteContext, t as QuoteResult, R as ResolvedCreditConfig, u as ResponseContent, S as SDKJobContext, v as SDKPaymentRequestOpts, w as SIGNED_REQUEST_AUTH_ID, x as SIGNED_REQUEST_STATEMENT_VERSION, y as SignedRequestAudience, z as SignedRequestDomain, B as SignedRequestError, E as SignedRequestFailure, F as SignedRequestReplayStore, G as SignedRequestSignOpts, H as SignedRequestStatementHeader, M as SignedRequestVerifier, U as UnsupportedCurrencyError, N as createSignedRequestVerifier, O as isZodSchema, T as signedRequestStatementHeader, V as validateCurrency } from './step-cache-CXg7ziML.js';
3
+ export { C as CreateFxFetcherOpts, D as DEFAULT_FX_CURRENCIES, a as DEFAULT_FX_RATE_SOURCE, F as FxFetcher, b as FxRateSnapshot, c as FxRateUnavailableError, P as PlatformFxSource, d as createFxFetcher, f as fxRateFor, r as resolveFxSourceFromEnv } from './fx-B0SLBe5x.js';
4
+ export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-BNDg1715.js';
5
+ export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-B2uZvga4.js';
6
+ export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from './ssrf-dMooihtY.js';
7
7
  export { z } from 'zod';
8
8
  import 'hono';
9
9
  import 'mppx';
@@ -15,11 +15,9 @@ import '@x402/core/types';
15
15
  import '@cashu/cashu-ts';
16
16
 
17
17
  /**
18
- * Protocol-enforced upfront fiat commitment. The hard invariant of the new
19
- * `QuoteResult` shape — every DVM's quote handler returns one. The SDK
20
- * derives sats from `amount × fx` at settlement time; for fixed-price DVMs
21
- * this is the total cost, for two-phase DVMs (scribe) more may be requested
22
- * mid-job via `ctx.requestPayment`.
18
+ * Upfront fiat commitment converted to sats at settlement time. This is the
19
+ * total cost for fixed-price jobs; two-phase jobs may request more mid-job
20
+ * through `ctx.requestPayment`.
23
21
  */
24
22
  interface Upfront {
25
23
  amount: number;
@@ -53,7 +51,6 @@ declare function isConfiguredDVMDescriptor(value: unknown): value is DVMDescript
53
51
  */
54
52
  declare function envFlag(value: string | undefined): boolean;
55
53
 
56
- /** Options for `withProgressHeartbeat`. */
57
54
  interface ProgressHeartbeatOpts {
58
55
  /**
59
56
  * Progress emitter — typically `ctx.progress.bind(ctx)` in a handler, or a
@@ -66,8 +63,8 @@ interface ProgressHeartbeatOpts {
66
63
  /** Percent (0-100) emitted with each heartbeat. Stays constant across the run. */
67
64
  percent: number;
68
65
  /**
69
- * Heartbeat cadence in milliseconds. Default 30s — twice the AC's
70
- * "every minute" floor, so a single missed tick still satisfies the contract.
66
+ * Heartbeat cadence in milliseconds. Default 30s, so a single missed tick
67
+ * still emits progress within the one-minute contract.
71
68
  */
72
69
  intervalMs?: number;
73
70
  }
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  configureDVM,
9
9
  isConfiguredDVMDescriptor
10
- } from "./chunk-BTZY7VPH.js";
10
+ } from "./chunk-GAIPXGM3.js";
11
11
  import {
12
12
  SignedRequestError,
13
13
  createSignedRequestVerifier
@@ -33,7 +33,7 @@ import {
33
33
  fxRateFor,
34
34
  resolveFxSourceFromEnv,
35
35
  validateCurrency
36
- } from "./chunk-27V2ILSR.js";
36
+ } from "./chunk-4A2RAKCW.js";
37
37
  import {
38
38
  InvalidFxRateError,
39
39
  fiatToSatsCeil,