@dvmkit/sdk 0.7.0-rc.7 → 0.7.0-rc.8
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 +6 -2
- package/dist/{chunk-JUEEUV5X.js → chunk-KB7MEWBE.js} +14 -3
- package/dist/{chunk-QTH7CIA3.js → chunk-XO5EUHCW.js} +82 -0
- package/dist/{chunk-HGMS3LR7.js → chunk-Z6EJOVIU.js} +11 -5
- package/dist/{credit-menu-Bm8opjYy.d.ts → credit-menu-CUJdCfpt.d.ts} +2 -0
- package/dist/internal/caller.d.ts +64 -1
- package/dist/internal/caller.js +9 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/server.d.ts +2 -2
- package/dist/internal/server.js +3 -3
- package/dist/{postgres-job-store-E6AUHNKB.js → postgres-job-store-3YBSGLYU.js} +1 -1
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ This metadata describes the retention schedule. The SDK does not automatically d
|
|
|
110
110
|
|
|
111
111
|
Use the Node.js release in `.nvmrc` (Node 22). Install with `npm ci`, then run the same gate CI runs with `npm run verify`. The gate checks repository metadata in the checkout, copies only tracked and unignored source into an isolated directory, installs its locked dependencies, and runs lint, build, typecheck (including the release scripts under `checkJs`), unit and database tests, API, package, consumer, packed-artifact safety, and release checks there. The clean source tree owns the complete build and test pass, so verification never depends on the checkout's `node_modules` or pre-existing `dist` and does not repeat the full suite; after every check passes, its verified `dist` replaces the checkout's build output for release packaging.
|
|
112
112
|
|
|
113
|
-
`DATABASE_URL` is optional locally. Without it the database suite is skipped rather than passed, and `verify` says so in its summary, because a skipped suite verified nothing and must not be reported as green. Point `DATABASE_URL` at a scratch Postgres to run it, and pass `npm run verify -- --require-database` to make a missing one a failure, which is what CI does.
|
|
113
|
+
`DATABASE_URL` is optional locally. Without it the database suite is skipped rather than passed, and `verify` says so in its summary, because a skipped suite verified nothing and must not be reported as green. Point `DATABASE_URL` at a scratch Postgres to run it, and pass `npm run verify -- --require-database` to make a missing one a failure, which is what CI does. That mode also requires the local test mint started by `node scripts/start-cashu-mint.mjs`.
|
|
114
114
|
|
|
115
115
|
The public surface is exactly `@dvmkit/sdk`, `@dvmkit/sdk/server`, and `@dvmkit/sdk/testing`.
|
|
116
116
|
|
|
@@ -150,6 +150,10 @@ The same values are accepted as `--endpoint <url>` and `--job-token <hex>`. Thes
|
|
|
150
150
|
|
|
151
151
|
If an upgrade broke something for you, an [API compatibility report](https://github.com/dvmkit/sdk/issues/new/choose) is the most useful thing you can send us. It tells us which parts of the published surface people actually build on, which no test of ours can.
|
|
152
152
|
|
|
153
|
+
## Job identity field
|
|
154
|
+
|
|
155
|
+
Every 200 or 202 response to `POST /v1/job`, `POST /v1/request-resume/:id` and `POST /v1/request-result/:id` carries a `DVM-Job-Identity-V1` response-head field whose value is the body's `job_id`, byte for byte, so a router or caller can learn which job a response names without reading a body of any size. No other status carries it. The value grammar is `^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$`; a server whose job ID falls outside it sends no field. A reader takes the value from `Headers.get`, trims nothing and never folds case: a repeated field (joined with `", "`), an empty value or any other character is invalid, and a trailer of the same name is never identity. The portable contract and its classification vectors are in `protocol-fixtures/job-identity-v1.json`. Hosting control's status reports `jobIdentityHeader: "v1"` when the deployment emits the field.
|
|
156
|
+
|
|
153
157
|
## Per-job costs
|
|
154
158
|
|
|
155
159
|
A handler can declare what a job cost **you**, the builder, to serve — a vendor API call, a GPU minute, a per-request licence fee — and the SDK reports it to the platform alongside what the caller paid, so your dashboard can state a margin instead of guessing at one.
|
|
@@ -171,7 +175,7 @@ Three things worth knowing:
|
|
|
171
175
|
- **Declare the cost where you incur it, including inside `ctx.step`.** The step cache carries those declarations with the result and applies them once when a replay skips the body.
|
|
172
176
|
- **Every terminal job reports its declared cost.** A paid completion carries the cost on its revenue report. A free completion, failure, or cancellation sends a separate cost-only report and does not create revenue.
|
|
173
177
|
|
|
174
|
-
The cost is yours, never the caller's: it is recorded separately from what the caller paid and is never netted against it. Both report shapes use the same durable outbox. Cost-only reports are keyed on the job id and revisioned, so retries and cross-machine updates converge on the latest cumulative value. With the Postgres job store, boot-time and periodic reconciliation enqueue any terminal cost revision that a process exited before reporting.
|
|
178
|
+
The cost is yours, never the caller's: it is recorded separately from what the caller paid and is never netted against it. Both report shapes use the same durable outbox. Cost-only reports are keyed on the job id and revisioned, so retries and cross-machine updates converge on the latest cumulative value. With the Postgres job store, boot-time and periodic reconciliation enqueue any terminal cost revision that a process exited before reporting. Other job stores get no reconciliation: their cost-only report is durable only once the outbox insert commits, so an exit between the terminal save and that insert loses it.
|
|
175
179
|
|
|
176
180
|
## Rate cards
|
|
177
181
|
|
|
@@ -286,10 +286,20 @@ var PostgresJobStore = class {
|
|
|
286
286
|
CREATE INDEX IF NOT EXISTS idx_jobs_retention
|
|
287
287
|
ON jobs (last_activity_at, id)
|
|
288
288
|
WHERE redacted_at IS NULL AND status IN ('completed', 'failed', 'cancelled');
|
|
289
|
-
|
|
289
|
+
-- Terminal cost recovery runs at boot and every 30s on each machine.
|
|
290
|
+
-- Indexing only rows whose latest revision is not yet enqueued keeps each
|
|
291
|
+
-- pass proportional to that backlog; marking a row drops it from the
|
|
292
|
+
-- index. listUnreportedTerminalCosts' WHERE clause must imply this
|
|
293
|
+
-- predicate or the planner falls back to scanning terminal history.
|
|
294
|
+
DROP INDEX IF EXISTS idx_jobs_pending_cost_report;
|
|
295
|
+
CREATE INDEX IF NOT EXISTS idx_jobs_unreported_terminal_cost
|
|
290
296
|
ON jobs (dvm_id, id)
|
|
291
297
|
WHERE cost_revision IS NOT NULL
|
|
292
|
-
AND
|
|
298
|
+
AND (cost_reported_revision IS NULL OR cost_reported_revision < cost_revision)
|
|
299
|
+
AND (
|
|
300
|
+
status IN ('failed', 'cancelled')
|
|
301
|
+
OR (status = 'completed' AND paid_msats = 0)
|
|
302
|
+
);
|
|
293
303
|
-- the idempotent-replay lookup. payment_tx_hash carries the
|
|
294
304
|
-- caller's X-Cashu-Request-Id on the accumulator path, so a retried paid
|
|
295
305
|
-- submit finds the job its payment already created.
|
|
@@ -689,7 +699,8 @@ var PostgresJobStore = class {
|
|
|
689
699
|
}
|
|
690
700
|
/**
|
|
691
701
|
* Read terminal zero-revenue jobs whose latest declared-cost revision has
|
|
692
|
-
* not yet reached the durable reporter outbox.
|
|
702
|
+
* not yet reached the durable reporter outbox. Keep the filter in step with
|
|
703
|
+
* `idx_jobs_unreported_terminal_cost`, which bounds each pass to the backlog.
|
|
693
704
|
*/
|
|
694
705
|
async listUnreportedTerminalCosts(args) {
|
|
695
706
|
const { rows } = await this.pool.query(
|
|
@@ -397,10 +397,20 @@ var DEFAULT_LOCK_RETRY_INTERVAL_MS = 1e3;
|
|
|
397
397
|
var WALLET_VERSION = 9;
|
|
398
398
|
var RECENT_SPENDS_CAP = 10;
|
|
399
399
|
var DEFAULT_AGENT_MINT_URL = "https://mint.coinos.io";
|
|
400
|
+
var MAX_STORABLE_JOB_ID_LENGTH = 512;
|
|
401
|
+
function isStorableJobId(value) {
|
|
402
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_STORABLE_JOB_ID_LENGTH && // eslint-disable-next-line no-control-regex -- control characters are what this rejects
|
|
403
|
+
!/[\u0000-\u001f\u007f-\u009f]/u.test(value);
|
|
404
|
+
}
|
|
400
405
|
function loadWalletConfiguredMints() {
|
|
401
406
|
return loadAgentWallet()?.mints ?? [];
|
|
402
407
|
}
|
|
403
408
|
function loadAgentWallet() {
|
|
409
|
+
const wallet = parseAgentWallet();
|
|
410
|
+
if (wallet) normalizeAcceptedUnresolved(wallet);
|
|
411
|
+
return wallet;
|
|
412
|
+
}
|
|
413
|
+
function parseAgentWallet() {
|
|
404
414
|
if (!existsSync4(WALLET_FILE)) return null;
|
|
405
415
|
const raw = readFileSync4(WALLET_FILE, "utf-8");
|
|
406
416
|
let parsed;
|
|
@@ -481,6 +491,7 @@ function loadAgentWallet() {
|
|
|
481
491
|
return parsed;
|
|
482
492
|
}
|
|
483
493
|
function saveAgentWallet(wallet) {
|
|
494
|
+
assertAcceptedUnresolvedStorable(wallet);
|
|
484
495
|
ensureConfigDir();
|
|
485
496
|
const tmp = `${WALLET_FILE}.tmp`;
|
|
486
497
|
const data = JSON.stringify(wallet, null, 2) + "\n";
|
|
@@ -649,6 +660,62 @@ function migrateV8ToV9(parsed) {
|
|
|
649
660
|
created_at: typeof parsed.created_at === "string" ? parsed.created_at : (/* @__PURE__ */ new Date()).toISOString()
|
|
650
661
|
};
|
|
651
662
|
}
|
|
663
|
+
var ACCEPTED_UNRESOLVED_KINDS = /* @__PURE__ */ new Set([
|
|
664
|
+
"identity_mismatch",
|
|
665
|
+
"body_unreadable",
|
|
666
|
+
"router_identity_conflict"
|
|
667
|
+
]);
|
|
668
|
+
var OBSERVED_JOB_ID_FIELDS = ["header_job_id", "body_job_id", "accepted_job_id"];
|
|
669
|
+
var PLACEHOLDER_KIND = "body_unreadable";
|
|
670
|
+
var PLACEHOLDER_OBSERVED_AT = (/* @__PURE__ */ new Date(0)).toISOString();
|
|
671
|
+
function assertAcceptedUnresolvedStorable(wallet) {
|
|
672
|
+
const entries = wallet.pending_submissions;
|
|
673
|
+
if (!Array.isArray(entries)) return;
|
|
674
|
+
for (const entry of entries) {
|
|
675
|
+
const record = entry?.accepted_unresolved;
|
|
676
|
+
if (record === void 0 || isStorableAcceptedUnresolved(record)) continue;
|
|
677
|
+
throw new DvmError(
|
|
678
|
+
"accepted_unresolved_invalid",
|
|
679
|
+
`Refusing to save pending submission ${String(entry?.request_id)}: its accepted_unresolved record is outside the stored contract.`,
|
|
680
|
+
"Use one of the three kinds, an ISO-8601 observed_at, and job IDs and ambiguity_id that pass isStorableJobId; omit an observed ID that does not. The wallet file was not changed."
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
function isStorableAcceptedUnresolved(value) {
|
|
685
|
+
if (!isPlainRecord(value)) return false;
|
|
686
|
+
return ACCEPTED_UNRESOLVED_KINDS.has(value.kind) && isIsoTimestamp(value.observed_at) && isStorableJobId(value.ambiguity_id) && OBSERVED_JOB_ID_FIELDS.every((field) => value[field] === void 0 || isStorableJobId(value[field]));
|
|
687
|
+
}
|
|
688
|
+
function normalizeAcceptedUnresolved(wallet) {
|
|
689
|
+
const entries = wallet.pending_submissions;
|
|
690
|
+
if (!Array.isArray(entries)) return;
|
|
691
|
+
for (const entry of entries) {
|
|
692
|
+
if (!entry || entry.accepted_unresolved === void 0) continue;
|
|
693
|
+
const stored = entry.accepted_unresolved;
|
|
694
|
+
if (isStorableAcceptedUnresolved(stored)) continue;
|
|
695
|
+
const record = isPlainRecord(stored) ? { ...stored } : {};
|
|
696
|
+
if (!ACCEPTED_UNRESOLVED_KINDS.has(record.kind)) record.kind = PLACEHOLDER_KIND;
|
|
697
|
+
if (!isIsoTimestamp(record.observed_at)) record.observed_at = PLACEHOLDER_OBSERVED_AT;
|
|
698
|
+
if (!isStorableJobId(record.ambiguity_id)) {
|
|
699
|
+
record.ambiguity_id = isStorableJobId(entry.request_id) ? entry.request_id : "missing-ambiguity";
|
|
700
|
+
}
|
|
701
|
+
for (const field of OBSERVED_JOB_ID_FIELDS) {
|
|
702
|
+
if (record[field] !== void 0 && !isStorableJobId(record[field])) delete record[field];
|
|
703
|
+
}
|
|
704
|
+
entry.accepted_unresolved = record;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
function isPlainRecord(value) {
|
|
708
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
709
|
+
}
|
|
710
|
+
var ISO_TIMESTAMP = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;
|
|
711
|
+
function isIsoTimestamp(value) {
|
|
712
|
+
if (typeof value !== "string") return false;
|
|
713
|
+
const match = ISO_TIMESTAMP.exec(value);
|
|
714
|
+
if (!match) return false;
|
|
715
|
+
const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
716
|
+
const date = new Date(Date.UTC(year, month - 1, day));
|
|
717
|
+
return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
|
|
718
|
+
}
|
|
652
719
|
function isCounterMap(value) {
|
|
653
720
|
if (typeof value !== "object" || value === null) return false;
|
|
654
721
|
for (const inner of Object.values(value)) {
|
|
@@ -1255,6 +1322,17 @@ function buildAdminAuthHeader(args) {
|
|
|
1255
1322
|
};
|
|
1256
1323
|
}
|
|
1257
1324
|
|
|
1325
|
+
// src/lib/job-identity-header.ts
|
|
1326
|
+
var JOB_IDENTITY_HEADER = "dvm-job-identity-v1";
|
|
1327
|
+
var JOB_IDENTITY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
1328
|
+
function isJobIdentityValue(value) {
|
|
1329
|
+
return typeof value === "string" && JOB_IDENTITY_PATTERN.test(value);
|
|
1330
|
+
}
|
|
1331
|
+
function parseJobIdentityHeader(value) {
|
|
1332
|
+
if (value === null) return { kind: "absent" };
|
|
1333
|
+
return isJobIdentityValue(value) ? { kind: "valid", jobId: value } : { kind: "invalid" };
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1258
1336
|
// src/lib/builder-identity.ts
|
|
1259
1337
|
import {
|
|
1260
1338
|
chmodSync as chmodSync4,
|
|
@@ -1808,6 +1886,7 @@ export {
|
|
|
1808
1886
|
WALLET_VERSION,
|
|
1809
1887
|
RECENT_SPENDS_CAP,
|
|
1810
1888
|
DEFAULT_AGENT_MINT_URL,
|
|
1889
|
+
isStorableJobId,
|
|
1811
1890
|
loadWalletConfiguredMints,
|
|
1812
1891
|
loadAgentWallet,
|
|
1813
1892
|
saveAgentWallet,
|
|
@@ -1835,6 +1914,9 @@ export {
|
|
|
1835
1914
|
ADMIN_STATE_UNAVAILABLE,
|
|
1836
1915
|
buildAdminChallenge,
|
|
1837
1916
|
buildAdminAuthHeader,
|
|
1917
|
+
JOB_IDENTITY_HEADER,
|
|
1918
|
+
isJobIdentityValue,
|
|
1919
|
+
parseJobIdentityHeader,
|
|
1838
1920
|
generateIdentity,
|
|
1839
1921
|
loadIdentitySecret,
|
|
1840
1922
|
writeIdentity,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-FOJKZ4E7.js";
|
|
26
26
|
import {
|
|
27
27
|
PostgresJobStore
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KB7MEWBE.js";
|
|
29
29
|
import {
|
|
30
30
|
parseStoreValue
|
|
31
31
|
} from "./chunk-YG7G4DPZ.js";
|
|
@@ -65,6 +65,7 @@ import {
|
|
|
65
65
|
ADMIN_AUTH_NONCE_TTL_SECONDS,
|
|
66
66
|
ADMIN_STATE_UNAVAILABLE,
|
|
67
67
|
IMPLICIT_CREDIT_TTL_MS,
|
|
68
|
+
JOB_IDENTITY_HEADER,
|
|
68
69
|
TEMPO_SESSION_UPDATED_REASON,
|
|
69
70
|
X402_BATCH_CHANNEL_ABI,
|
|
70
71
|
attestedDvmIdentity,
|
|
@@ -74,6 +75,7 @@ import {
|
|
|
74
75
|
createMonotonicClock,
|
|
75
76
|
formatStaleness,
|
|
76
77
|
getWallet,
|
|
78
|
+
isJobIdentityValue,
|
|
77
79
|
isPublicRequestId,
|
|
78
80
|
isX402SettlementReconciliationReason,
|
|
79
81
|
parseTraceparent,
|
|
@@ -83,7 +85,7 @@ import {
|
|
|
83
85
|
signReceipt,
|
|
84
86
|
toLockPubkey,
|
|
85
87
|
verifyChallenge
|
|
86
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-XO5EUHCW.js";
|
|
87
89
|
import {
|
|
88
90
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
89
91
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -11769,7 +11771,8 @@ var HostingControl = class {
|
|
|
11769
11771
|
pendingAdmissionCount: Number(pending.rows[0].pending),
|
|
11770
11772
|
pendingAdmissions: inFlight.rows.map((row) => ({ admissionId: row.id, workId: row.job_id })),
|
|
11771
11773
|
unresolvedAdmissionCount: Number(pending.rows[0].unresolved),
|
|
11772
|
-
unresolvedAdmissions: unresolved.rows.map((row) => ({ admissionId: row.id, jobId: row.job_id }))
|
|
11774
|
+
unresolvedAdmissions: unresolved.rows.map((row) => ({ admissionId: row.id, jobId: row.job_id })),
|
|
11775
|
+
jobIdentityHeader: "v1"
|
|
11773
11776
|
};
|
|
11774
11777
|
}
|
|
11775
11778
|
};
|
|
@@ -22495,7 +22498,7 @@ function buildSubmitResponse(c, job, jobToken, contentFields) {
|
|
|
22495
22498
|
else if (job.status === "completed") res.status = "completed";
|
|
22496
22499
|
Object.assign(res, terminalResponseFields(job), contentFields);
|
|
22497
22500
|
removeUnavailableContent(res);
|
|
22498
|
-
return c.json(res, job.status === "completed" ? 200 : 202);
|
|
22501
|
+
return c.json(res, job.status === "completed" ? 200 : 202, jobIdentityHeaders(job.id));
|
|
22499
22502
|
}
|
|
22500
22503
|
function requestRecoveryStore(store) {
|
|
22501
22504
|
return store.findJobByRequestId && store.claimRequestId && store.resumeRequestId && store.releaseRequestIdClaim ? store : void 0;
|
|
@@ -22561,7 +22564,10 @@ function buildRequestResultResponse(c, requestId, job, contentFields) {
|
|
|
22561
22564
|
if (job.paymentTransactionHash) res.transaction_hash = job.paymentTransactionHash;
|
|
22562
22565
|
Object.assign(res, terminalResponseFields(job), contentFields);
|
|
22563
22566
|
removeUnavailableContent(res);
|
|
22564
|
-
return c.json(res, isTerminal(job.status) ? 200 : 202);
|
|
22567
|
+
return c.json(res, isTerminal(job.status) ? 200 : 202, jobIdentityHeaders(job.id));
|
|
22568
|
+
}
|
|
22569
|
+
function jobIdentityHeaders(jobId) {
|
|
22570
|
+
return isJobIdentityValue(jobId) ? { [JOB_IDENTITY_HEADER]: jobId } : {};
|
|
22565
22571
|
}
|
|
22566
22572
|
function requestResultNotFound(c, requestId) {
|
|
22567
22573
|
return c.json(
|
|
@@ -3907,6 +3907,31 @@ declare function loadReceipt(jobId: string): StoredReceipt | null;
|
|
|
3907
3907
|
/** True when a value is a URL-safe caller-generated request identifier. */
|
|
3908
3908
|
declare function isPublicRequestId(value: unknown): value is string;
|
|
3909
3909
|
|
|
3910
|
+
/**
|
|
3911
|
+
* Response-head field stating the job ID of a `POST /v1/job`,
|
|
3912
|
+
* `POST /v1/request-resume/:id` or `POST /v1/request-result/:id` 200/202, so a
|
|
3913
|
+
* router or caller can learn the job's identity without reading the body. The
|
|
3914
|
+
* version is part of the name: a later version is a different field.
|
|
3915
|
+
*/
|
|
3916
|
+
declare const JOB_IDENTITY_HEADER = "dvm-job-identity-v1";
|
|
3917
|
+
type JobIdentityHeaderResult = {
|
|
3918
|
+
kind: "absent";
|
|
3919
|
+
} | {
|
|
3920
|
+
kind: "valid";
|
|
3921
|
+
jobId: string;
|
|
3922
|
+
} | {
|
|
3923
|
+
kind: "invalid";
|
|
3924
|
+
};
|
|
3925
|
+
/** True when a value satisfies the `DVM-Job-Identity-V1` value grammar. */
|
|
3926
|
+
declare function isJobIdentityValue(value: unknown): value is string;
|
|
3927
|
+
/**
|
|
3928
|
+
* Classify the value `Headers.get(JOB_IDENTITY_HEADER)` returned. Fetch joins a
|
|
3929
|
+
* repeated field with `", "`, which falls outside the grammar, so a repeated
|
|
3930
|
+
* field is invalid even when every copy is equal. Nothing is trimmed and case
|
|
3931
|
+
* is never folded: the value must equal the body's `job_id` byte for byte.
|
|
3932
|
+
*/
|
|
3933
|
+
declare function parseJobIdentityHeader(value: string | null): JobIdentityHeaderResult;
|
|
3934
|
+
|
|
3910
3935
|
/** Header carrying a router-issued, DVM/job-bound feedback attribution claim. */
|
|
3911
3936
|
declare const ROUTER_FEEDBACK_CLAIM_HEADER = "x-dvmkit-router-feedback-claim";
|
|
3912
3937
|
/** Lifetime of a routed job's feedback attribution claim. */
|
|
@@ -4544,6 +4569,39 @@ interface PendingSubmissionContext {
|
|
|
4544
4569
|
*/
|
|
4545
4570
|
credit_body?: Record<string, unknown>;
|
|
4546
4571
|
}
|
|
4572
|
+
/**
|
|
4573
|
+
* Terminal state of a submission a DVM or router accepted whose job identity the
|
|
4574
|
+
* caller could not settle: the response-head job ID disagreed with the body's,
|
|
4575
|
+
* the body could not be read, or the router reported a conflicting accepted
|
|
4576
|
+
* job. The payment may have landed, so the entry must never be re-paid; the
|
|
4577
|
+
* job-ID strings are what was observed, kept for the operator's evidence.
|
|
4578
|
+
*/
|
|
4579
|
+
interface PendingSubmissionAcceptedUnresolved {
|
|
4580
|
+
/**
|
|
4581
|
+
* Adding a kind requires a {@link WALLET_VERSION} bump: an older reader
|
|
4582
|
+
* cannot know what a new kind means, and a version it does not understand
|
|
4583
|
+
* is the wallet's existing refusal path.
|
|
4584
|
+
*/
|
|
4585
|
+
kind: "identity_mismatch" | "body_unreadable" | "router_identity_conflict";
|
|
4586
|
+
/** ISO-8601 timestamp of the observation, like `created_at`. */
|
|
4587
|
+
observed_at: string;
|
|
4588
|
+
/** Must satisfy {@link isStorableJobId}. */
|
|
4589
|
+
header_job_id?: string;
|
|
4590
|
+
/** Must satisfy {@link isStorableJobId}. */
|
|
4591
|
+
body_job_id?: string;
|
|
4592
|
+
/** Must satisfy {@link isStorableJobId}. */
|
|
4593
|
+
accepted_job_id?: string;
|
|
4594
|
+
/** Request-scoped key of the caller's evidence record; must satisfy {@link isStorableJobId}. */
|
|
4595
|
+
ambiguity_id: string;
|
|
4596
|
+
}
|
|
4597
|
+
/**
|
|
4598
|
+
* True when a string may be stored in an `accepted_unresolved` record: non-empty,
|
|
4599
|
+
* at most {@link MAX_STORABLE_JOB_ID_LENGTH} UTF-16 code units, and free of
|
|
4600
|
+
* control characters — C0 (U+0000–U+001F, including TAB), DEL (U+007F) and C1
|
|
4601
|
+
* (U+0080–U+009F, which `Headers.get` yields for obs-text bytes 0x80–0x9F).
|
|
4602
|
+
* Writers omit or clean a value that fails, since the save refuses it.
|
|
4603
|
+
*/
|
|
4604
|
+
declare function isStorableJobId(value: unknown): value is string;
|
|
4547
4605
|
/** Persisted preview for a per-call swap whose mint outcome is not yet durable. */
|
|
4548
4606
|
interface PendingSubmissionSwappingState {
|
|
4549
4607
|
/** Keyset whose amount key unblinds the restored signatures. */
|
|
@@ -4678,6 +4736,11 @@ interface PendingSubmission {
|
|
|
4678
4736
|
* `unreclaimable` on this flag alone.
|
|
4679
4737
|
*/
|
|
4680
4738
|
reclaim_terminal?: boolean;
|
|
4739
|
+
/**
|
|
4740
|
+
* Set when the submission was accepted but its job identity could not be
|
|
4741
|
+
* settled. Its presence forbids paying for this request again.
|
|
4742
|
+
*/
|
|
4743
|
+
accepted_unresolved?: PendingSubmissionAcceptedUnresolved;
|
|
4681
4744
|
}
|
|
4682
4745
|
/**
|
|
4683
4746
|
* Persistent state for the agent wallet — the lock keypair plus the Cashu
|
|
@@ -6276,4 +6339,4 @@ declare class MemoryKVStore implements KVStore {
|
|
|
6276
6339
|
list(prefix?: string): Promise<string[]>;
|
|
6277
6340
|
}
|
|
6278
6341
|
|
|
6279
|
-
export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, type AgentProof, type AgentRecentSpend, type AgentWallet, type AttestedDvmIdentity, BTC_RATE_FILE, BUDGET_FILE, type BudgetCaps, type BudgetCheckResult, type BudgetLedger, type BudgetLedgerEntry, type BudgetSpendBreakdown, type BudgetSpendKind, type BudgetWindow, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CliIdentityEntry, type CoinGeckoBtcSpot, type CoinGeckoSpot, type CompletedCreditHistoryPage, type CompletedCreditHistoryQuery, type CompletedCreditHistoryRecord, type CompletedRefundHistoryRecord, type ConfigDirModeResult, CreatedInvoice, type CreditDrainRail, type CreditFundRail, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditTerms, type CreditWire, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, type DeliveredResult, type DescribeOptions, type DiagnosticCapabilityAuthority, type DiagnosticIdentityAuthority, DrainReceipt, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, DvmError, DvmX402ChannelStorage, type ExpiredCreditLossHistoryRecord, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, type FundValuation, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, IDENTITIES_FILE, IDENTITIES_VERSION, type IdentitiesFile, InvoiceStatus, JOBS_FILE, type JobEnvelope, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, LightningTransactionListOptions, LightningTransactionSnapshot, LightningWalletInfo, type LnAddressParts, MESSAGES_DIR, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, type MnemonicValidationResult, MppxChallenge, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, PAIRINGS_DIR, PRIVKEY_HEX_RE, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, PaymentRequirementsV1, PaymentRequirementsV2, type PendingDrain, type PendingFunding, type PendingMelt, type PendingMint, type PendingMintMintingState, type PendingSubmission, type PendingSubmissionContext, type PendingTempoChargeFunding, type PendingX402ExactFunding, type PendingX402Funding, type PersistedOutputData, PersistentCounterSource, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RAIL_FLAGS, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type Rail, type RailAsset, type RailFlag, type ReceiptChecks, ReceiptCredit, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, type RecordSpendOptions, type RpcSource, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanProjectionResult, type SpanRow, type SpanTransport, SpanWriter, type StatusOptions, type StoredCredit, type StoredCreditX402Binding, type StoredFundingMenuSnapshot, type StoredImplicitCredit, type StoredReceipt, type StoredSiblingCredit, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, type SwapSendReserve, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, type TempoAccount, type TempoChannelAssociation, type TempoChannelController, type TempoChannelDescriptor, type TempoChannelExitResult, type TempoChannelReconcileResult, type TempoChannelStoreContext, type TempoCredentialAccount, type TempoNetwork, type TempoSessionClientResolver, type Transport, type JobReceipt as TransportJobReceipt, type TrustAnchorRead, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, WALLET_FILE, WALLET_VERSION, type WalletCredentialConfig, type WalletInfo, type X402Asset, type X402Balance, type X402BatchPayment, type X402ChannelChainReport, type X402ChannelClient, type X402ChannelReconciliation, type X402ConnectedWallet, type X402CreditFlavour, type X402CreditInstrument, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, type X402VoucherPendingState, X402Wallet, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, builderLockPath, canReplaceExpiredX402Deposit, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, checkBudgetForLedger, checkMeltQuoteState, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, generateIdentity as cliIdentityStoreGenerateIdentity, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getX402Balance, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isCreditFundRail, isCreditFundingMode, isPublicRequestId, isSignableExactRequirement, isStablecoinFundRail, isValidEvmPrivateKey, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, parseTraceparent, payInvoiceReconciling, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signDvmRequestData, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, walletExists, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig };
|
|
6342
|
+
export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, type AgentProof, type AgentRecentSpend, type AgentWallet, type AttestedDvmIdentity, BTC_RATE_FILE, BUDGET_FILE, type BudgetCaps, type BudgetCheckResult, type BudgetLedger, type BudgetLedgerEntry, type BudgetSpendBreakdown, type BudgetSpendKind, type BudgetWindow, type BuilderLockKeypair, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, type CachedBtcRate, type CancelOptions, type CliIdentityEntry, type CoinGeckoBtcSpot, type CoinGeckoSpot, type CompletedCreditHistoryPage, type CompletedCreditHistoryQuery, type CompletedCreditHistoryRecord, type CompletedRefundHistoryRecord, type ConfigDirModeResult, CreatedInvoice, type CreditDrainRail, type CreditFundRail, type CreditFundingMode, type CreditMenu, type CreditOpResult, type CreditTerms, type CreditWire, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, type DeliveredResult, type DescribeOptions, type DiagnosticCapabilityAuthority, type DiagnosticIdentityAuthority, DrainReceipt, type DrainReceiptChecks, type DrainReceiptVerifyResult, type DrainWire, DvmError, DvmX402ChannelStorage, type ExpiredCreditLossHistoryRecord, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, type FundValuation, FundingReceipt, type FundingReceiptChecks, type FundingReceiptVerifyResult, IDENTITIES_FILE, IDENTITIES_VERSION, type IdentitiesFile, InvoiceStatus, JOBS_FILE, JOB_IDENTITY_HEADER, type JobEnvelope, type JobIdentityHeaderResult, type JobPolicy, JobReceipt$1 as JobReceipt, type JobStatus, JsonValue, LightningBackend, type LightningFundingOffer, LightningPayment, LightningTransactionListOptions, LightningTransactionSnapshot, LightningWalletInfo, type LnAddressParts, MESSAGES_DIR, type MeltQuoteInfo, MemoryKVStore, Message, type MessagePollOptions, MessageType, type MnemonicValidationResult, MppxChallenge, MppxCredential, NwcBackend, type NwcConnection, NwcError, type NwcRequestOptions, type NwcTransaction, type OutboundMessage, PAIRINGS_DIR, PRIVKEY_HEX_RE, type PayInvoiceOutcome, type PayInvoiceReconcilingOptions, type PayInvoiceResult, type PayOutcome, type Payment, PaymentRequired, PaymentRequirementsV1, PaymentRequirementsV2, type PendingDrain, type PendingFunding, type PendingMelt, type PendingMint, type PendingMintMintingState, type PendingSubmission, type PendingSubmissionAcceptedUnresolved, type PendingSubmissionContext, type PendingTempoChargeFunding, type PendingX402ExactFunding, type PendingX402Funding, type PersistedOutputData, PersistentCounterSource, type ProviderInfo, type ProviderRef, type ProviderText, type Quote, RAIL_FLAGS, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, type Rail, type RailAsset, type RailFlag, type ReceiptChecks, ReceiptCredit, type ReceiptInvalidReason, type ReceiptKeypair, type ReceiptParseError, type ReceiptTrustAnchor, type ReceiptVerification, type ReceiptVerifyResult, type RecordSpendOptions, type RpcSource, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, type SelectError, type SendMessageOptions, type SpanProjectionResult, type SpanRow, type SpanTransport, SpanWriter, type StatusOptions, type StoredCredit, type StoredCreditX402Binding, type StoredFundingMenuSnapshot, type StoredImplicitCredit, type StoredReceipt, type StoredSiblingCredit, type StoredX402ChannelConfig, type StoredX402ChannelMetadata, type StreamOptions, type StreamResult, type SubmitOptions, type SwapSendReserve, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, type TempoAccount, type TempoChannelAssociation, type TempoChannelController, type TempoChannelDescriptor, type TempoChannelExitResult, type TempoChannelReconcileResult, type TempoChannelStoreContext, type TempoCredentialAccount, type TempoNetwork, type TempoSessionClientResolver, type Transport, type JobReceipt as TransportJobReceipt, type TrustAnchorRead, type V1InfoCapability, type V1InfoResponse, type VerifyJobReceiptArgs, WALLET_FILE, WALLET_VERSION, type WalletCredentialConfig, type WalletInfo, type X402Asset, type X402Balance, type X402BatchPayment, type X402ChannelChainReport, type X402ChannelClient, type X402ChannelReconciliation, type X402ConnectedWallet, type X402CreditFlavour, type X402CreditInstrument, X402EnvValidationError, type X402Network, type X402RefundArgs, type X402RefundOutcome, type X402RepinnedWallet, type X402UnobservedBalanceProvenance, X402Version, type X402VoucherPendingState, X402Wallet, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, builderLockPath, canReplaceExpiredX402Deposit, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, checkBudgetForLedger, checkMeltQuoteState, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, generateIdentity as cliIdentityStoreGenerateIdentity, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getX402Balance, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isCreditFundRail, isCreditFundingMode, isJobIdentityValue, isPublicRequestId, isSignableExactRequirement, isStablecoinFundRail, isStorableJobId, isValidEvmPrivateKey, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseJobIdentityHeader, parseLnAddress, parseNwcUri, parseTraceparent, payInvoiceReconciling, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signDvmRequestData, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceiptChain, verifyFundingReceiptChain, verifyJobReceipt, verifyRouterFeedbackClaim, walletExists, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig };
|
package/dist/internal/caller.js
CHANGED
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
IDENTITIES_FILE,
|
|
55
55
|
IMPLICIT_CREDIT_TTL_MS,
|
|
56
56
|
JOBS_FILE,
|
|
57
|
+
JOB_IDENTITY_HEADER,
|
|
57
58
|
MESSAGES_DIR,
|
|
58
59
|
PAIRINGS_DIR,
|
|
59
60
|
PRIVKEY_HEX_RE,
|
|
@@ -106,8 +107,10 @@ import {
|
|
|
106
107
|
hashCapabilities,
|
|
107
108
|
isDrainReceipt,
|
|
108
109
|
isFundingReceipt,
|
|
110
|
+
isJobIdentityValue,
|
|
109
111
|
isPublicRequestId,
|
|
110
112
|
isSignedJobReceipt,
|
|
113
|
+
isStorableJobId,
|
|
111
114
|
isX402SettlementReconciliationReason,
|
|
112
115
|
loadAgentWallet,
|
|
113
116
|
loadIdentitySecret,
|
|
@@ -115,6 +118,7 @@ import {
|
|
|
115
118
|
looksLikeMnemonic,
|
|
116
119
|
meltAmountBounds,
|
|
117
120
|
mnemonicFingerprint,
|
|
121
|
+
parseJobIdentityHeader,
|
|
118
122
|
parseTraceparent,
|
|
119
123
|
readAgentMnemonic,
|
|
120
124
|
receiptPubkeyFromSecret,
|
|
@@ -139,7 +143,7 @@ import {
|
|
|
139
143
|
withWalletLock,
|
|
140
144
|
writeAgentMnemonic,
|
|
141
145
|
writeIdentity
|
|
142
|
-
} from "../chunk-
|
|
146
|
+
} from "../chunk-XO5EUHCW.js";
|
|
143
147
|
import {
|
|
144
148
|
X402_BATCH_SETTLEMENT_SCHEME,
|
|
145
149
|
X402_DEFAULT_FACILITATOR,
|
|
@@ -5986,6 +5990,7 @@ export {
|
|
|
5986
5990
|
IDENTITIES_VERSION,
|
|
5987
5991
|
InvalidUsdPriceError,
|
|
5988
5992
|
JOBS_FILE,
|
|
5993
|
+
JOB_IDENTITY_HEADER,
|
|
5989
5994
|
MESSAGES_DIR,
|
|
5990
5995
|
MemoryKVStore,
|
|
5991
5996
|
NwcBackend,
|
|
@@ -6167,12 +6172,14 @@ export {
|
|
|
6167
6172
|
isCreditFundingMode,
|
|
6168
6173
|
isDrainReceipt,
|
|
6169
6174
|
isFundingReceipt,
|
|
6175
|
+
isJobIdentityValue,
|
|
6170
6176
|
isPaymentRequestMessage,
|
|
6171
6177
|
isPromptMessage,
|
|
6172
6178
|
isPublicRequestId,
|
|
6173
6179
|
isSignableExactRequirement,
|
|
6174
6180
|
isSignedJobReceipt,
|
|
6175
6181
|
isStablecoinFundRail,
|
|
6182
|
+
isStorableJobId,
|
|
6176
6183
|
isTextMessage,
|
|
6177
6184
|
isValidEvmPrivateKey,
|
|
6178
6185
|
isWorkingMessage,
|
|
@@ -6237,6 +6244,7 @@ export {
|
|
|
6237
6244
|
offersX402CreditFunding,
|
|
6238
6245
|
parseCreditMenu,
|
|
6239
6246
|
parseCreditTerms,
|
|
6247
|
+
parseJobIdentityHeader,
|
|
6240
6248
|
parseLnAddress,
|
|
6241
6249
|
parseNwcUri,
|
|
6242
6250
|
parseTraceparent,
|
package/dist/internal/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, MESSAGES_DIR, MemoryKVStore, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, X402_V1_VERSION, X402_VERSION, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, amountBoundsVerdict, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertNutSupport, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildPaymentRequiredV2, buildPaymentRequirements, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, chainIdFromCaip2, checkBudgetForLedger, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, computeResultHash, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, exactEvmAuthorization, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isDrainReceipt, isFundingReceipt, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isSignableExactRequirement, isSignedJobReceipt, isStablecoinFundRail, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, meltAmountBounds, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseLnAddress, parseNwcUri, parseTraceparent, parseUsdPrice, payInvoiceReconciling, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, toLockPubkey, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig } from "./caller.js";
|
|
1
|
+
export { ADMIN_STATE_UNAVAILABLE, AGENT_MNEMONIC_FILE, BTC_RATE_FILE, BUDGET_FILE, CAPABILITY_NAME_RE, COINGECKO_SIMPLE_PRICE_URL, CONFIG_AUDIT_FILE, CONFIG_BACKUP_FILE, CONFIG_DIR, CONFIG_FILE, CONFIG_PINNED_FILE, CREDITS_FILE, CREDIT_DRAIN_RAILS, CREDIT_FUNDING_MODES, CREDIT_FUND_RAILS, DEFAULT_AGENT_MINT_URL, DIAGNOSTIC_CATALOGUE_VERSION, DbTransport, DvmError, DvmX402ChannelStorage, FAVORITES_FILE, FEEDBACK_NUDGES_FILE, FX_CACHE_TTL_MS, FX_RETRY_COUNT, IDENTITIES_FILE, IDENTITIES_VERSION, InvalidUsdPriceError, JOBS_FILE, JOB_IDENTITY_HEADER, MESSAGES_DIR, MemoryKVStore, NwcBackend, NwcError, PAIRINGS_DIR, PRIVKEY_HEX_RE, PersistentCounterSource, RAIL_FLAGS, RAIL_REFUNDABLE, RECEIPTS_FILE, RECENT_SPENDS_CAP, RECOVERY_MNEMONIC_FILE, REQUEST_INTENTS_DIR, ROUTER_FEEDBACK_CLAIM_HEADER, ROUTER_FEEDBACK_CLAIM_TTL_MS, SPANS_INSERTED_CHANNEL, STABLECOIN_FUND_RAILS, SUPPORTED_PROTOCOL_VERSION, SpanWriter, StepCache, TEMPO_CHAIN_ID, TEMPO_CHANNELS_FILE, TEMPO_CHARGE_PENDING_STALE_MS, TEMPO_MODERATO_CHAIN_ID, TEMPO_MODERATO_RPC, TEMPO_PATH_USD_MODERATO, TEMPO_SESSION_UPDATED_REASON, WALLET_FILE, WALLET_VERSION, X402EnvValidationError, X402_BATCH_CHANNEL_ABI, X402_BATCH_SETTLEMENT_KEY, X402_BATCH_SETTLEMENT_SCHEME, X402_CHANNELS_FILE, X402_DEFAULT_FACILITATOR, X402_DEFAULT_NETWORK, X402_EXACT_AUTHORIZATION_TTL_SECONDS, X402_EXACT_SCHEME, X402_NETWORKS, X402_PENDING_STALE_MS, X402_RECEIVER_AUTHORIZER_KEY, X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS, X402_RPC_URL_KEY, X402_SELF_RELAY_KEY, X402_V1_VERSION, X402_VERSION, acknowledgeReplayedX402Payment, acknowledgeX402ChannelOwner, advanceTempoChannelExit, amountBoundsVerdict, appendBudgetSpend, appendFundingReceipt, appendReceipt, applyImplicitReceiptCredit, applyReceiptCredit, applyRetryToPool, asProviderText, asProviderTextOpt, assertAgentMnemonicReplaceable, assertNoRivalX402Voucher, assertNutSupport, assertSupportedX402Network, assertTempoSessionChallengeWithinAsk, assertTempoSessionDepositWithinCap, assertTempoSessionVoucherWithinAsk, assertX402ChannelPayer, assertX402RequirementDescribesChannel, attestedDvmIdentity, authenticatedBuilderPubkey, backupSecretFile, bindCashuTokenToSubmissionContext, bindDiagnosticCapabilityAuthority, bindDiagnosticIdentityAuthority, breakdownSince, buildAdminAuthHeader, buildAdminChallenge, buildAttestation, buildPaymentRequiredV2, buildPaymentRequirements, builderLockPath, caip2ToX402Network, canReplaceExpiredX402Deposit, canSwap, canonicalRequestPath, canonicaliseForSigning, canonicalize, capFor, cashuSubmissionBindingFingerprint, cashuSubmissionBindingFromContext, chainIdFromCaip2, checkBudgetForLedger, checkMeltQuoteState, checkMintHealth, checkReceiptAttestation, clearCreditSelection, clearPendingDrain, clearPendingFunding, clearPendingTempoChargeFunding, clearPendingX402ExactFunding, clearPendingX402Funding, clearRefillRailUnavailable, cliIdentityStoreGenerateIdentity, computeResultHash, computeSmartDenominations, costAnchor, coveringMintsForSpend, createDiagnosticCapabilityAuthority, createMintQuoteRetryState, createMonotonicClock, createNoopLogger, createStdoutLogger, createTempoChannelStore, createTempoCloseCredential, createTempoCreditSession, createTempoSessionPaymentFetch, createX402BatchPayment, currentContext, decodePayment, decodePaymentRequiredHeader, deleteAgentMnemonic, deriveAgentMasterKeypair, deriveAgentRefundSubkey, deriveAgentRefundSubkeyPubkey, deriveBuilderLockKeypair, deriveBuilderLockPubkey, deriveIdentityFromPrivkey, derivePubkeyFromPrivkey, deriveReceiptKeypair, deriveReceiptSecret, deriveTempoAddress, dvmLocationIdentity, effectiveFundingMint, effectiveMints, encodePayment, encodePaymentRequiredHeader, encodeSettleResponseHeader, ensureAddress, ensureConfigDir, ensureConfigSubdir, ensureProvisionalCredit, entryKind, exactEvmAuthorization, extendDiagnosticIdentityAuthority, fetchBtcUsdRate, fetchCoinGeckoBtcUsd, fetchCoinGeckoSpot, fetchLnurlPayInvoice, fetchMeltQuote, findX402Channel, forgetCredit, formatStaleness, formatUsd, formatUsdcMicrounits, fundWireAmountMicro, fundingModeForTempoIntent, fundingModeForX402Flavour, generateAgentMnemonic, generateEphemeralReceiptKey, generateIdentity, generateX402PrivateKey, getBalance, getBalanceByMint, getInfo, getInputFeesForProofs, getLastKnownBtcRate, getTempoUsdcBalance, getWallet, getX402Balance, hashCapabilities, hashedCanonicalDvmId, identitiesFileExists, initLoggers, insertSpanBatch, isAbortError, isArtifactMessage, isCancelMessage, isCompleteMessage, isCreditFundRail, isCreditFundingMode, isDrainReceipt, isFundingReceipt, isJobIdentityValue, isPaymentRequestMessage, isPromptMessage, isPublicRequestId, isSignableExactRequirement, isSignedJobReceipt, isStablecoinFundRail, isStorableJobId, isTextMessage, isValidEvmPrivateKey, isWorkingMessage, issueRouterFeedbackClaim, listCredits, listFundingMenuSnapshots, listImplicitCredits, listPendingFundings, listPendingX402Fundings, listPendingX402FundingsForChannel, listResumableTempoChargeFundings, listResumableX402ExactFundings, listResumableX402Fundings, listTempoChannelAssociations, listTransactions, listX402Channels, loadAgentWallet, loadBudgetLedger, loadCredit, loadCreditX402Binding, loadIdentities, loadIdentitySecret, loadImplicitCredits, loadPendingFunding, loadReceipt, loadReceipts, loadResumableTempoChargeFunding, loadResumableX402ExactFunding, loadResumableX402Funding, loadTempoChannelAssociation, loadTempoChannelAssociationByKey, loadTempoChannelController, loadTempoChannelEntry, loadWalletConfiguredMints, loggers, looksLikeMnemonic, lookupInvoice, makeInvoice, markCredit, markImplicitCreditLost, markRefillDrainNoticed, markRefillRailUnavailable, maxAdvertisedMicro, maxKeysetDenomination, meltAmountBounds, microToSats, missingDleqRecoveryDiagnostic, mnemonicFingerprint, msatsToMicro, msatsToUsd, msatsToUsdCents, msatsToUsdc, normalizeCreditEndpoint, normalizeFeedbackEndpointHost, nwcDedupWindowMs, nwcTimeoutMs, offersTempoCreditCharge, offersTempoCreditFunding, offersTempoCreditSession, offersX402CreditChannel, offersX402CreditFlavour, offersX402CreditFunding, parseCreditMenu, parseCreditTerms, parseJobIdentityHeader, parseLnAddress, parseNwcUri, parseTraceparent, parseUsdPrice, payInvoiceReconciling, paymentRequiredV2FromV1, pendingDrainById, pendingDrainFor, persistTempoOpenCredential, pinDimension, prepareP2PKMint, processX402BatchCorrection, processX402BatchResponse, processX402BatchResponseForWallet, projectDiagnosticFields, projectEventName, projectSpanRow, providerProseSources, providerTextToString, randomTraceId, readAgentMnemonic, readCompletedCreditHistory, readFundValuation, readX402ChannelGuardFacts, readX402ChannelOnChain, receiptPubkeyFromSecret, receiveToAgentWallet, reconcileRefusedX402Deposits, reconcileTempoChannelOnChain, recordBalanceResponse, recordCreditX402Instrument, recordDrainReceipts, recordFundResponse, recordFundingMenuSnapshot, recordPendingDrain, recordPendingFunding, recordPendingTempoChargeFunding, recordPendingX402ExactFunding, recordPendingX402Funding, recordRefusedDrawBalance, recordX402ChannelMetadata, redactUrl, redactUrlsInText, refundX402BatchChannel, rehydrateOutputData, repairConfigDirMode, resolveLnurlPayMetadataUrl, resolveRpcHttpTransportOptions, resolveRpcOverride, resolveTempoAsset, resolveTempoNetwork, resolveX402Asset, resolveX402ChannelRpc, restoreProofsFromOutputs, retirePendingX402Funding, retireTempoChannel, retireTempoChannelScope, retryMintQuoteOperation, saveAgentWallet, saveBudgetLedger, saveIdentities, selectProofsForSpend, serializeOutputData, setEmitter, settleDrainEvidence, sha256hex, shellQuoteArg, signAttestation, signDrainReceipt, signDvmRequestData, signFundingReceipt, signReceipt, signRequestData, signedRequestDomain, spendEntry, swapFeeForProofs, swapSendReserve, tempoAccountFromConfig, tempoBalanceCheckHint, tempoChallengeAmountMicro, tempoChannelControlledBy, tempoChargeCredentialSettleable, tempoCredentialAmountMicro, tempoCredentialValidBefore, tempoDescriptorController, tempoSessionAssociationByKey, tempoSessionChallenge, tempoSessionChallengeChannelScope, tempoSessionChallengeMicro, tempoSessionCredentialChannelScope, tempoSessionCredentialCumulativeMicro, tempoSessionCumulativeCapMicro, tempoSessionPriorCumulativeMicro, tempoTokenReference, toAgentProof, toCashuProofs, toLockPubkey, transportErrorCode, tryResolveTempoAsset, unsignRequestData, usdToMsats, usdcContractByCaip2, usdcContractFor, usdcDomainNameFor, usdcDomainVersionFor, usdcToMsats, validateAgentMnemonic, validateLnAddress, validateX402Env, verifyAttestation, verifyCanonicalSignedRequest, verifyChallenge, verifyDrainReceipt, verifyDrainReceiptChain, verifyFundingReceipt, verifyFundingReceiptChain, verifyJobReceipt, verifyReceipt, verifyRouterFeedbackClaim, walletExists, warmFxSnapshot, weakestReceiptVerdict, windowEnd, windowStart, withIdentitiesLock, withInitRetry, withNwcPool, withTempoChannelLock, withTraceContext, withWalletLock, withX402ChannelLock, withholdsTempoCreditSession, withinAdvertisedTolerance, writeAgentMnemonic, writeIdentity, x402ChannelBalanceUnreconciledAt, x402ChannelControlledBy, x402ChannelReservation, x402CreditChannelNetworks, x402CreditExactNetworks, x402CreditFlavour, x402CreditFundingNetworks, x402ExactFundingDead, x402FlavourForInstrument, x402InstrumentForFlavour, x402NetworkByCaip2, x402NetworkBySlug, x402NetworkLabel, x402NetworkListForCopy, x402NetworkToCaip2, x402PendingBlockExpiresAt, x402PendingDepositExpiresAt, x402PendingFundingJson, x402PendingRetired, x402PendingStale, x402PendingUnsettled, x402RequiredFromError, x402ReservationRelease, x402SupportedNetworksHint, x402VoucherPendingState, x402WalletFromConfig } from "./caller.js";
|
|
2
2
|
export { DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, JobCancelledError, MintHealthTracker, NON_CHANNEL_BITCOIN_RAILS, PAYMENT_PROOF_KEYS, PayoutReporter, PostgresTempoChargeStore, PostgresTempoSessionStore, RevenueReporter, SIGNED_ENVELOPE_FIELDS, SIGNED_ENVELOPE_TYPES, TEMPO_CLOSE_DB_RECOVERY_BUDGET_MS, TEMPO_CLOSE_REQUESTED_TOPIC, TempoSessionChannelMismatchError, X402FacilitatorHealth, X402_BATCH_SETTLEMENT_MAINNET_NETWORK, _testing, abortJob, activePubkeySet, applyPaymentInfoToJob, assertRevenueReporterReady, buildPaymentErrorResponse, clearAccumulatorForDvm, createAdminCashuNonceStore, createDVMServer, createDefaultReplayStore, createInstrumentedFetch, creditDepositPayload, depleteLots, derivedFundCreditId, devModeSkipsPaymentVerification, fifoOrder, fromJobRecord, fundedMicroFor, hasPaymentProof, hashLockKey, humanizeZodError, implicitCreditId, inKindDrawMsats, initLockPubkeyTable, initWalletAccumulatorTable, insertAccumulatorRows, installAdminCashuRoutes, isDerivedCreditId, isInKindDepletion, isNonChannelBitcoinRail, isStaleJobReapable, isTerminal, isYieldMessage, issueUpfrontChallenges, jobCredentialGate, loadLockPubkeyState, lockPubkeyStoreToLockPubkey, lotOwedSats, msatsToFiatMicro, netOwedSats, paymentErrorBody, pinAskFiat, priceFiatMicro, processIncomingPayment, providerMessage, pruneRetired, rateUnavailablePaymentError, repairX402ExactSettlementEffect, resolveFxSnapshot, resolvePriceFiat, revenueReporterBannerState, rotateLockPubkey, seedLockPubkeyState, settleWithFacilitator, toCreditTerms, toJobRecord, unknownRouteNotFound, verifyIncomingPayment, verifyTempoSessionManagementCredential, verifyUpfrontPayment, verifyWithFacilitator, verifyX402Payment, wrapMppx, x402RequiredUsdcMicro, x402SettledShare } from "./server.js";
|
|
@@ -6,8 +6,8 @@ import { Env, BlankSchema } from 'hono/types';
|
|
|
6
6
|
import { Pool } from 'pg';
|
|
7
7
|
export { Pool } from 'pg';
|
|
8
8
|
import { g as getWallet } from '../wallet-Dwjs5n_M.js';
|
|
9
|
-
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-
|
|
10
|
-
export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-
|
|
9
|
+
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-CUJdCfpt.js';
|
|
10
|
+
export { A as AccumulatorPool, a as AppEnv, b as CreditFundingReport, D as DEFAULT_LOCK_PUBKEY_GRACE_SECONDS, F as FiatDenomination, c as FiatDenominationFailure, d as FundOnlyRequest, I as IncomingPaymentOpts, J as JobCancelledError, e as LockPubkeyPool, f as LockPubkeyState, M as MintHealthTracker, P as PAYMENT_PROOF_KEYS, g as PaymentErrorCode, h as PaymentErrorDetail, i as PaymentInfo, j as PostgresTempoChargeStore, R as ReporterBannerOpts, k as ResolvedFx, l as RevenueBootCheckOpts, S as SDKServerOpts, m as ServerJob, n as ShortPayForfeit, T as TempoChannelReport, o as TempoObserverHealth, p as TempoSessionChannelMismatchError, U as UpfrontPaymentOpts, V as VerifiedIncomingPayment, q as VerifyIncomingSnapshot, X as X402BatchChannelObservation, r as X402FacilitatorHealth, s as X402SettlementEvidenceOutcome, t as X402SettlementRepair, u as X402SettlementRepairRefusal, v as X402SettlementRepaired, w as X402WedgedSettlement, x as X402WedgedSettlementPage, y as X402_BATCH_SETTLEMENT_MAINNET_NETWORK, z as abortJob, B as activePubkeySet, E as applyPaymentInfoToJob, G as assertRevenueReporterReady, H as buildPaymentErrorResponse, K as clearAccumulatorForDvm, N as createDVMServer, O as creditDepositPayload, Q as derivedFundCreditId, W as devModeSkipsPaymentVerification, Y as fromJobRecord, Z as fundedMicroFor, _ as hasPaymentProof, $ as hashLockKey, a0 as implicitCreditId, a1 as initLockPubkeyTable, a2 as initWalletAccumulatorTable, a3 as insertAccumulatorRows, a4 as isDerivedCreditId, a5 as isTerminal, a6 as isYieldMessage, a7 as issueUpfrontChallenges, a8 as loadLockPubkeyState, a9 as msatsToFiatMicro, aa as paymentErrorBody, ab as pinAskFiat, ac as priceFiatMicro, ad as processIncomingPayment, ae as providerMessage, af as pruneRetired, ag as repairX402ExactSettlementEffect, ah as resolveFxSnapshot, ai as resolvePriceFiat, aj as revenueReporterBannerState, ak as rotateLockPubkey, al as seedLockPubkeyState, am as toCreditTerms, an as toJobRecord, ao as unknownRouteNotFound, ap as verifyIncomingPayment, aq as verifyTempoSessionManagementCredential, ar as verifyUpfrontPayment, as as x402RequiredUsdcMicro, at as x402SettledShare } from '../credit-menu-CUJdCfpt.js';
|
|
11
11
|
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-DjgN2AOk.js';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-DeasHNOP.js';
|
package/dist/internal/server.js
CHANGED
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
verifyUpfrontPayment,
|
|
62
62
|
x402RequiredUsdcMicro,
|
|
63
63
|
x402SettledShare
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-Z6EJOVIU.js";
|
|
65
65
|
import {
|
|
66
66
|
_testing,
|
|
67
67
|
wrapMppx
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
verifyWithFacilitator
|
|
75
75
|
} from "../chunk-XEOTTFLH.js";
|
|
76
76
|
import "../chunk-FOJKZ4E7.js";
|
|
77
|
-
import "../chunk-
|
|
77
|
+
import "../chunk-KB7MEWBE.js";
|
|
78
78
|
import "../chunk-YG7G4DPZ.js";
|
|
79
79
|
import {
|
|
80
80
|
SIGNED_ENVELOPE_FIELDS,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
} from "../chunk-AFV77S4C.js";
|
|
98
98
|
import {
|
|
99
99
|
toLockPubkey
|
|
100
|
-
} from "../chunk-
|
|
100
|
+
} from "../chunk-XO5EUHCW.js";
|
|
101
101
|
import "../chunk-62FI3NJF.js";
|
|
102
102
|
import "../chunk-UKD3R2KU.js";
|
|
103
103
|
import "../chunk-SX4WCPW7.js";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ae as CashuMode, bL as CreditDrainEnqueue, bM as HostedSettlementReportObligations, R as ResolvedCreditConfig, bN as DVMAuthScheme, B as SignedRequestDomain, bO as CreditLedgerLike, bP as X402RefundSettlementGate, bQ as CreditSnapshot, bR as DrawResult, bS as X402SettlementStatus, bT as X402UnresolvedRefund, bU as GrownDrawResult, bV as DrawResolution, bW as FundingRecord, $ as FundingReceipt, bX as CreditInvoiceRecord, bY as InvoiceSettlement, bZ as BlockedInvoiceCursor, b_ as InvoiceReconciliation, b$ as InvoiceWriteOff, c0 as DrawRecord, c1 as StalePendingDrawCursor, c2 as TempoCreditLossEvidence, c3 as CreditLedgerQuerier, c4 as TempoCreditLoss, c5 as X402CreditLossEvidence, c6 as X402CreditLoss, c7 as DrainMethod, c8 as DrainRequestResult, c9 as BitcoinDepositLiability, bp as FundingLot, ca as CreditDrainRecord, cb as ChannelDrainCursor, cc as DrainWriteOff, cd as DrainReleaseResult, ce as DrainFulfilment, cf as DrainTransitionResult, cg as HostingCleanupFence, a0 as JobReceipt, a5 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-C9JRSFhM.js';
|
|
2
2
|
export { ch as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ci as ClientCompatibility, cj as ClientCompatibilityEnv, ck as ClientCompatibilityGate, cl as ClientCompatibilityRequirement, cm as ClientSemVer, f as CreateSignedRequestVerifierOpts, cn as CreditFundingBasis, co as CreditInvoiceStatus, cp as CreditLedger, cq as CreditLedgerError, cr as CreditLedgerErrorCode, cs as CreditLedgerErrorDetails, ct as CreditLedgerPool, cu as CreditStatus, cv as DRAIN_DELIVERY_RESERVE_SATS, cw as DVM_PROTOCOL_VERSION, cx as DrainConflictReason, cy as DrawRailValue, cz as DrawStatus, cA as JobCostReportPayload, cB as JobTerminalReportPayload, cC as PostgresX402ChannelStorage, cD as ReplayStoreBackend, cE as RevenueSkippedNoRailPayload, cF as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cG as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cH as X402ChannelStorageOpts, cI as X402RelayLockHolder, cJ as X402RelaySubmissionLock, cK as X402RelaySubmissionLockError, cL as allocateDrawValue, cM as clientCompatibilityAttributes, cN as clientCompatibilityMiddleware, cO as clientUpgradeRequired, O as createSignedRequestVerifier, cP as parseClientCapabilities, cQ as parseClientCompatibility, cR as parseDvmClient, cS as parseProtocolVersion, cT as requireClientCompatibility, cU as secp256k1Auth, cV as signedRequestInput, V as signedRequestStatementHeader } from '../step-cache-C9JRSFhM.js';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-
|
|
5
|
-
export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-
|
|
4
|
+
import { au as CreditMenu, a as AppEnv, U as UpfrontPaymentOpts, i as PaymentInfo, av as ReceiptIssuer, aw as LightningReceive, ax as TempoSettlementReadiness, ay as DVMHostOpts, az as DVMServeResult, L as LockPubkeyStateLoader, C as ConsumedCredentialStore } from '../credit-menu-CUJdCfpt.js';
|
|
5
|
+
export { aA as BuildCreditMenuArgs, aB as BuilderIdentity, aC as CREDIT_ENVELOPE_KEYS, aD as CreateX402BatchSettlementServerOpts, aE as CreditEnvelope, aF as CreditEnvelopeError, aG as CreditFundCommitment, aH as CreditTerms, aI as DEFAULT_INVOICE_TTL_SECONDS, aJ as DVMHost, aK as HostingClosureCommand, aL as HostingClosureEvidence, aM as HostingControlCommand, aN as HostingControlConfig, aO as HostingControlStatus, aP as JobManager, aQ as JobManagerOpts, aR as LightningReceiveConfig, aS as MIN_INVOICE_TTL_SECONDS, aT as MemoryConsumedCredentialStore, aU as MemoryConsumedCredentialStoreOpts, aV as MemoryProcessedPaymentStore, aW as MemoryX402ExactSettlementStore, aX as MountOpts, aY as OwnerDisplay, aZ as PaidJobCompletion, a_ as PaymentMode, a$ as PlatformReporterOpts, b0 as PostgresProcessedPaymentStore, b1 as PostgresX402ExactSettlementStore, b2 as PriceFiat, b3 as ProcessedPaymentQuerier, b4 as ProcessedPaymentRail, b5 as ProcessedPaymentRecord, b6 as ProcessedPaymentReplayError, b7 as ProcessedPaymentStore, b8 as X402BatchAcceptance, b9 as X402BatchFunding, ba as X402BatchRefusal, bb as X402BatchSettlementServer, bc as X402ExactAcceptance, bd as X402ExactIntentConflictError, be as X402ExactSettlementAttempt, bf as X402ExactSettlementChainEvidence, bg as X402ExactSettlementEffect, bh as X402ExactSettlementEvidenceMissingError, bi as X402ExactSettlementEvidenceReader, bj as X402ExactSettlementIntent, bk as X402ExactSettlementNotReadyError, bl as X402ExactSettlementServer, bm as X402ExactSettlementServerOpts, bn as X402ExactSettlementStatus, bo as X402ExactSettlementStore, bp as X402SettlementChainEvidence, bq as X402SettlementEvidenceReader, br as X402SettlementSubmissionError, bs as X402_BATCH_AUTO_SETTLEMENT, bt as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bu as X402_BATCH_SETTLEMENT_NETWORK, bv as attachCreditMenu, bw as buildCreditMenu, bx as createDVMHost, by as createX402BatchSettlementServer, bz as creditEnvelopeIgnoreFields, bA as drawSettlementRef, bB as extractCreditEnvelope, bC as fundingCommitment, bD as selectPrimaryCredit, bE as signHostingClosure, bF as signHostingControl, bG as stripCreditEnvelope, bH as toCreditView } from '../credit-menu-CUJdCfpt.js';
|
|
6
6
|
import { Context, Hono } from 'hono';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { F as FxFetcher } from '../fx-BvG2Wnjk.js';
|
|
@@ -377,7 +377,8 @@ declare class PostgresJobStore implements StreamableJobStore, ReceiptIssuingStor
|
|
|
377
377
|
listUnreportedTerminalReports(dvmId: string, capabilities: string[] | null, afterJobId?: string): Promise<JobRecord[]>;
|
|
378
378
|
/**
|
|
379
379
|
* Read terminal zero-revenue jobs whose latest declared-cost revision has
|
|
380
|
-
* not yet reached the durable reporter outbox.
|
|
380
|
+
* not yet reached the durable reporter outbox. Keep the filter in step with
|
|
381
|
+
* `idx_jobs_unreported_terminal_cost`, which bounds each pass to the backlog.
|
|
381
382
|
*/
|
|
382
383
|
listUnreportedTerminalCosts(args: {
|
|
383
384
|
dvmId: string;
|
package/dist/server/index.js
CHANGED
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
stripProtocolEnvelope,
|
|
81
81
|
toCreditView,
|
|
82
82
|
unknownRouteNotFound
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-Z6EJOVIU.js";
|
|
84
84
|
import {
|
|
85
85
|
TEMPO_MODERATO_CHAIN_ID,
|
|
86
86
|
TEMPO_MODERATO_RPC,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
} from "../chunk-FOJKZ4E7.js";
|
|
96
96
|
import {
|
|
97
97
|
PostgresJobStore
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-KB7MEWBE.js";
|
|
99
99
|
import "../chunk-YG7G4DPZ.js";
|
|
100
100
|
import {
|
|
101
101
|
SignedRequestError,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
IMPLICIT_CREDIT_TTL_MS,
|
|
117
117
|
generateEphemeralReceiptKey,
|
|
118
118
|
receiptPubkeyFromSecret
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-XO5EUHCW.js";
|
|
120
120
|
import {
|
|
121
121
|
X402_DEFAULT_FACILITATOR,
|
|
122
122
|
X402_DEFAULT_NETWORK,
|
|
@@ -1147,7 +1147,7 @@ function createDVMHost(opts = {}) {
|
|
|
1147
1147
|
});
|
|
1148
1148
|
applyRetryToPool(pool, "dvm-host");
|
|
1149
1149
|
pgPool = pool;
|
|
1150
|
-
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-
|
|
1150
|
+
const { PostgresJobStore: PostgresJobStore2 } = await import("../postgres-job-store-3YBSGLYU.js");
|
|
1151
1151
|
const pgJobStore = new PostgresJobStore2(pool);
|
|
1152
1152
|
pendingInits.push(pgJobStore.init(), pgJobStore.initStreaming());
|
|
1153
1153
|
jobStore = pgJobStore;
|