@dvmkit/sdk 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MXESSBXF.js → chunk-A6AOE63A.js} +5 -1
- package/dist/{chunk-RPJKEWRR.js → chunk-NWOSJFZX.js} +79 -1
- package/dist/{content-retention-C_TToHCi.d.ts → content-retention-COnj0QKi.d.ts} +1 -1
- package/dist/{credit-menu-BlODG4E7.d.ts → credit-menu-BpPa43Co.d.ts} +4 -4
- package/dist/{fx-QoVA2oBc.d.ts → fx-DfzQ0Lge.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/internal/caller.d.ts +6 -6
- package/dist/internal/server.d.ts +7 -7
- package/dist/internal/server.js +2 -2
- package/dist/{job-store-D4-18IKm.d.ts → job-store-p45j28px.d.ts} +1 -1
- package/dist/{lightning-backend-B2wMBR-x.d.ts → lightning-backend-DO7G7VqP.d.ts} +1 -1
- package/dist/server/index.d.ts +10 -10
- package/dist/server/index.js +2 -2
- package/dist/{step-cache-B83Y9T9p.d.ts → step-cache-CcCjpZm1.d.ts} +9 -1
- package/dist/testing/index.d.ts +3 -3
- package/dist/{usd-g9kCw86F.d.ts → usd-BnAFcUai.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -343,7 +343,11 @@ function resolveCashuConfig(cashu) {
|
|
|
343
343
|
`configureDVM: cashu.unsignedMinLocktimeSeconds (${unsignedMinLocktimeSeconds}) must not exceed cashu.minLocktimeSeconds less 86400 (${signedWindow}); a payer without a signature can take the signed floor instead by sending X-Cashu-Request-Id`
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
|
-
|
|
346
|
+
const unsignedResultWaitSeconds = cashu.unsignedResultWaitSeconds === void 0 ? 10 : cashu.unsignedResultWaitSeconds;
|
|
347
|
+
if (typeof unsignedResultWaitSeconds !== "number" || !Number.isInteger(unsignedResultWaitSeconds) || unsignedResultWaitSeconds < 0 || unsignedResultWaitSeconds > 20) {
|
|
348
|
+
throw new Error("configureDVM: cashu.unsignedResultWaitSeconds must be an integer from 0 to 20");
|
|
349
|
+
}
|
|
350
|
+
return { minLocktimeSeconds, unsignedMinLocktimeSeconds, unsignedResultWaitSeconds };
|
|
347
351
|
}
|
|
348
352
|
function validFloor(value, field, minimum) {
|
|
349
353
|
if (value === void 0) return void 0;
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
signedRequestInput,
|
|
34
34
|
unsignedCashuLockWindowSeconds,
|
|
35
35
|
zodIssuesOf
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-A6AOE63A.js";
|
|
37
37
|
import {
|
|
38
38
|
MemoryJobStore,
|
|
39
39
|
UNCAPPABLE_ASK_TOTAL,
|
|
@@ -18411,6 +18411,75 @@ function withWallClockDeadline(promise, timeoutMs) {
|
|
|
18411
18411
|
});
|
|
18412
18412
|
}
|
|
18413
18413
|
|
|
18414
|
+
// src/sdk/server/inline-result-wait.ts
|
|
18415
|
+
function waitForInlineResult(store, jobId, localJob, seconds, signal) {
|
|
18416
|
+
if (seconds === 0 || signal.aborted) return Promise.resolve();
|
|
18417
|
+
return new Promise((resolve, reject) => {
|
|
18418
|
+
let done = false;
|
|
18419
|
+
let checking = false;
|
|
18420
|
+
let queued = false;
|
|
18421
|
+
let unsubscribe;
|
|
18422
|
+
let poll;
|
|
18423
|
+
const finish = (error) => {
|
|
18424
|
+
if (done) return;
|
|
18425
|
+
done = true;
|
|
18426
|
+
clearTimeout(deadline);
|
|
18427
|
+
clearInterval(poll);
|
|
18428
|
+
signal.removeEventListener("abort", abort);
|
|
18429
|
+
localJob?.listeners.delete(notify);
|
|
18430
|
+
unsubscribe?.();
|
|
18431
|
+
if (error) reject(error);
|
|
18432
|
+
else resolve();
|
|
18433
|
+
};
|
|
18434
|
+
const abort = () => finish();
|
|
18435
|
+
const check = async () => {
|
|
18436
|
+
if (done) return;
|
|
18437
|
+
if (checking) {
|
|
18438
|
+
queued = true;
|
|
18439
|
+
return;
|
|
18440
|
+
}
|
|
18441
|
+
checking = true;
|
|
18442
|
+
try {
|
|
18443
|
+
do {
|
|
18444
|
+
queued = false;
|
|
18445
|
+
const job = await store.get(jobId);
|
|
18446
|
+
if (!job || isTerminal(job.status) || job.status === "awaiting-input") finish();
|
|
18447
|
+
} while (queued && !done);
|
|
18448
|
+
} catch (error) {
|
|
18449
|
+
finish(error);
|
|
18450
|
+
} finally {
|
|
18451
|
+
checking = false;
|
|
18452
|
+
}
|
|
18453
|
+
};
|
|
18454
|
+
const notify = () => {
|
|
18455
|
+
void check();
|
|
18456
|
+
};
|
|
18457
|
+
const deadline = setTimeout(finish, seconds * 1e3);
|
|
18458
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
18459
|
+
localJob?.listeners.add(notify);
|
|
18460
|
+
if (signal.aborted) {
|
|
18461
|
+
finish();
|
|
18462
|
+
return;
|
|
18463
|
+
}
|
|
18464
|
+
if (isStreamableJobStore(store)) {
|
|
18465
|
+
try {
|
|
18466
|
+
void store.subscribeNotifications(jobId, notify).then((stop) => {
|
|
18467
|
+
if (done) stop();
|
|
18468
|
+
else {
|
|
18469
|
+
unsubscribe = stop;
|
|
18470
|
+
notify();
|
|
18471
|
+
}
|
|
18472
|
+
}, finish);
|
|
18473
|
+
} catch (error) {
|
|
18474
|
+
finish(error);
|
|
18475
|
+
}
|
|
18476
|
+
} else {
|
|
18477
|
+
poll = setInterval(notify, 100);
|
|
18478
|
+
}
|
|
18479
|
+
notify();
|
|
18480
|
+
});
|
|
18481
|
+
}
|
|
18482
|
+
|
|
18414
18483
|
// src/sdk/server/job-read-response.ts
|
|
18415
18484
|
async function withJobReadAvailability(read) {
|
|
18416
18485
|
try {
|
|
@@ -24622,6 +24691,15 @@ var DVMServer = class {
|
|
|
24622
24691
|
return snapshot;
|
|
24623
24692
|
}
|
|
24624
24693
|
async submitResponse(c, job, jobToken) {
|
|
24694
|
+
if (job.paymentRail === "cashu" && job.paymentTxHash?.startsWith(DERIVED_REQUEST_ID_PREFIX) && !job.requesterPubkey && c.req.header("X-Cashu") && !c.req.header("X-Cashu-Request-Id")) {
|
|
24695
|
+
await waitForInlineResult(
|
|
24696
|
+
this.jobManager.store,
|
|
24697
|
+
job.id,
|
|
24698
|
+
this.jobManager.activeJobs.get(job.id),
|
|
24699
|
+
this.descriptor.cashu?.unsignedResultWaitSeconds ?? 10,
|
|
24700
|
+
c.req.raw.signal
|
|
24701
|
+
);
|
|
24702
|
+
}
|
|
24625
24703
|
const snapshot = await this.readJobSnapshot(job, !("listeners" in job));
|
|
24626
24704
|
return buildSubmitResponse(c, snapshot, jobToken, await this.contentFields(snapshot));
|
|
24627
24705
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-
|
|
2
|
-
import { cr as HostingCleanupFence, dc as HostedIntent, an as FundingMethod, q as PaymentMethod, bX as CreditLedgerLike, a9 as Message, V as UpfrontPayment, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, S as SDKJobContext, aB as StepCache, x as ResponseContent, P as PaymentContent, a5 as MessageType, bs as X402Receipt, aK as X402Config, br as X402ExactVersionSupport, ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, dd as X402SettlementIntent, de as HostedFundingReservation, bT as CreditLedgerQuerier, df as X402SettlementCursor, c1 as X402SettlementStatus, dg as X402SettlementWriteOff, bY as X402RefundSettlementGate, dh as X402FacilitatorAuth, di as X402BatchSettlementConfig, cO as PostgresX402ChannelStorage, dj as X402PayoutObserver, bV as HostedSettlementReportObligations, bv as CreditDepositPayload, bA as MppxServer, ai as CashuMode, dk as CreditDepositEnqueue, dl as X402SettlementReconciliationReason, au as PaymentRequirements, c5 as FundingRecord, a7 as MppxCredential, c0 as DrawResult, cB as CreditLedgerError, ab as ReceiptCredit, ak as DrainReceiptEvent, ac as DrainReceipt, a2 as DrawFundingReceipt, K as KVStore, E as SignedRequestAudience, dm as CreditDrawReleaseEnqueue, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cQ as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, cv as ClientCompatibilityGate, ct as ClientCompatibility, bE as PostgresTempoSessionStore, bD as PayoutReporter, w as ResolvedCreditConfig, i as CreditView } from './step-cache-
|
|
1
|
+
import { f as LockPubkey, e as CheckMintHealthOptions, b as LightningBackend, A as AttestationPayload } from './lightning-backend-DO7G7VqP.js';
|
|
2
|
+
import { cr as HostingCleanupFence, dc as HostedIntent, an as FundingMethod, q as PaymentMethod, bX as CreditLedgerLike, a9 as Message, V as UpfrontPayment, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, S as SDKJobContext, aB as StepCache, x as ResponseContent, P as PaymentContent, a5 as MessageType, bs as X402Receipt, aK as X402Config, br as X402ExactVersionSupport, ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, dd as X402SettlementIntent, de as HostedFundingReservation, bT as CreditLedgerQuerier, df as X402SettlementCursor, c1 as X402SettlementStatus, dg as X402SettlementWriteOff, bY as X402RefundSettlementGate, dh as X402FacilitatorAuth, di as X402BatchSettlementConfig, cO as PostgresX402ChannelStorage, dj as X402PayoutObserver, bV as HostedSettlementReportObligations, bv as CreditDepositPayload, bA as MppxServer, ai as CashuMode, dk as CreditDepositEnqueue, dl as X402SettlementReconciliationReason, au as PaymentRequirements, c5 as FundingRecord, a7 as MppxCredential, c0 as DrawResult, cB as CreditLedgerError, ab as ReceiptCredit, ak as DrainReceiptEvent, ac as DrainReceipt, a2 as DrawFundingReceipt, K as KVStore, E as SignedRequestAudience, dm as CreditDrawReleaseEnqueue, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cQ as RevenueSkippedNoRailPayload, Z as ZodLike, a as DVMDescriptor, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, cv as ClientCompatibilityGate, ct as ClientCompatibility, bE as PostgresTempoSessionStore, bD as PayoutReporter, w as ResolvedCreditConfig, i as CreditView } from './step-cache-CcCjpZm1.js';
|
|
3
3
|
import { ProofLike, SerializedDLEQ, Proof } from '@cashu/cashu-ts';
|
|
4
4
|
import { Hono, Context } from 'hono';
|
|
5
5
|
import { Pool } from 'pg';
|
|
6
|
-
import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-
|
|
6
|
+
import { d as FxSourceFailure, b as FxRateSnapshot, F as FxFetcher } from './fx-DfzQ0Lge.js';
|
|
7
7
|
import { Store, Challenge } from 'mppx';
|
|
8
|
-
import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-
|
|
8
|
+
import { T as TopUpCapUnenforcedReason, A as AppendOutgoingOptions, J as JobRecord, b as JobStore } from './job-store-p45j28px.js';
|
|
9
9
|
import { SettleResponse, SupportedResponse } from '@x402/core/types';
|
|
10
10
|
import { Channel, AutoSettlementConfig } from '@x402/evm/batch-settlement/server';
|
|
11
11
|
import { FacilitatorClient } from '@x402/core/server';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-
|
|
2
|
-
export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CapabilityRate, f as CashuConfig, g as CreateSignedRequestVerifierOpts, h as CreditConfig, i as CreditView, j as DEFAULT_CREDIT_MAX, k as DEFAULT_CREDIT_MIN, l as DEFAULT_CREDIT_TTL_SECONDS, m as DEFAULT_JOB_RETENTION_DAYS, n as DVMRouteContext, I as IncomingMessage, o as InputType, p as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, q as PaymentMethod, r as PriceValue, s as ProgressContent, t as PromptOpts, Q as QuoteConfig, u as QuoteContext, v as QuoteResult, R as ResolvedCashuConfig, w as ResolvedCreditConfig, x as ResponseContent, S as SDKJobContext, y as SDKPaymentRequestOpts, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, E as SignedRequestAudience, F as SignedRequestDomain, G as SignedRequestError, H as SignedRequestFailure, M as SignedRequestReplayStore, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, U as UnsupportedCurrencyError, V as UpfrontPayment, W as createSignedRequestVerifier, X as isZodSchema, Y as signedRequestStatementHeader, _ as validateCurrency } from './step-cache-
|
|
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, d as FxSourceFailure, e as FxSourceFailureCategory, P as PlatformFxSource, f as createFxFetcher, g as fxRateFor, r as resolveFxSourceFromEnv } from './fx-
|
|
4
|
-
export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-
|
|
5
|
-
export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-
|
|
1
|
+
import { C as Currency, Z as ZodLike, D as DVMConfig, a as DVMDescriptor } from './step-cache-CcCjpZm1.js';
|
|
2
|
+
export { A as ApprovalContent, b as ArtifactContent, c as CancelContent, d as CanonicalEnvelope, e as CapabilityRate, f as CashuConfig, g as CreateSignedRequestVerifierOpts, h as CreditConfig, i as CreditView, j as DEFAULT_CREDIT_MAX, k as DEFAULT_CREDIT_MIN, l as DEFAULT_CREDIT_TTL_SECONDS, m as DEFAULT_JOB_RETENTION_DAYS, n as DVMRouteContext, I as IncomingMessage, o as InputType, p as InvalidCurrencyError, J as JobCost, K as KVStore, L as Logger, P as PaymentContent, q as PaymentMethod, r as PriceValue, s as ProgressContent, t as PromptOpts, Q as QuoteConfig, u as QuoteContext, v as QuoteResult, R as ResolvedCashuConfig, w as ResolvedCreditConfig, x as ResponseContent, S as SDKJobContext, y as SDKPaymentRequestOpts, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, E as SignedRequestAudience, F as SignedRequestDomain, G as SignedRequestError, H as SignedRequestFailure, M as SignedRequestReplayStore, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, U as UnsupportedCurrencyError, V as UpfrontPayment, W as createSignedRequestVerifier, X as isZodSchema, Y as signedRequestStatementHeader, _ as validateCurrency } from './step-cache-CcCjpZm1.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, d as FxSourceFailure, e as FxSourceFailureCategory, P as PlatformFxSource, f as createFxFetcher, g as fxRateFor, r as resolveFxSourceFromEnv } from './fx-DfzQ0Lge.js';
|
|
4
|
+
export { I as InvalidFxRateError, f as fiatToSatsCeil, a as formatFiat, b as formatUsd, r as roundUsd, s as satsToFiat } from './usd-BnAFcUai.js';
|
|
5
|
+
export { J as JobRecord, a as JobStatus, b as JobStore } from './job-store-p45j28px.js';
|
|
6
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';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as JsonValue, F as SignedRequestDomain, O as SignedRequestStatementHeader, a0 as X402_BATCH_SETTLEMENT_SCHEME, a1 as X402_EXACT_SCHEME, a2 as DrawFundingReceipt, a3 as FundingReceipt, a4 as JobReceipt$1, V as UpfrontPayment, a5 as MessageType, a6 as X402Version, a7 as MppxCredential, E as SignedRequestAudience, a8 as PaymentRequired, a9 as Message, aa as MppxChallenge, ab as ReceiptCredit, ac as DrainReceipt, C as Currency, ad as X402Wallet, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-
|
|
2
|
-
export { ag as BuildPaymentRequirementsOpts, ah as CapabilityDescriptor, ai as CashuMode, aj as CompleteContent, ak as DrainReceiptEvent, al as ExactEvmPayload, am as ExactEvmPayloadAuthorization, an as FundingMethod, ao as MessageFrom, ap as PaymentPayload, aq as PaymentPayloadV1, ar as PaymentPayloadV2, as as PaymentRequestContent, at as PaymentRequiredV2, au as PaymentRequirements, av as PromptContent, aw as RAIL_REFUNDABLE, ax as ReceiptOutcome, ay as ReceiptPayment, az as ResourceInfo, aA as SettleResponse, aB as StepCache, aC as StepRecord, aD as TextContent, aE as UnsignedDrainReceipt, aF as UnsignedDrawFundingReceipt, aG as UnsignedFundingReceipt, aH as UnsignedJobReceipt, aI as VerifyResponse, aJ as WorkingContent, aK as X402Config, aL as X402ResponseBody, aM as X402SelfRelayRpcFailureReason, aN as X402_DEFAULT_NETWORK, aO as X402_V1_VERSION, aP as X402_VERSION, aQ as buildPaymentRequiredV2, aR as buildPaymentRequirements, aS as caip2ToX402Network, aT as canonicalRequestPath, aU as canonicaliseForSigning, aV as canonicalize, aW as chainIdFromCaip2, aX as computeResultHash, aY as decodePayment, aZ as decodePaymentRequiredHeader, a_ as encodePayment, a$ as encodePaymentRequiredHeader, b0 as encodeSettleResponseHeader, b1 as exactEvmAuthorization, b2 as isArtifactMessage, b3 as isCancelMessage, b4 as isCompleteMessage, b5 as isDrainReceipt, b6 as isDrawFundingReceipt, b7 as isFundingReceipt, b8 as isPaymentRequestMessage, b9 as isPromptMessage, ba as isSignedJobReceipt, bb as isTextMessage, bc as isWorkingMessage, bd as paymentRequiredV2FromV1, be as signDrainReceipt, bf as signDrawFundingReceipt, bg as signFundingReceipt, bh as signReceipt, bi as usdcContractByCaip2, bj as usdcContractFor, bk as usdcDomainNameFor, bl as usdcDomainVersionFor, bm as verifyDrainReceipt, bn as verifyDrawFundingReceipt, bo as verifyFundingReceipt, bp as verifyReceipt, bq as x402NetworkToCaip2 } from '../step-cache-
|
|
3
|
-
import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-
|
|
4
|
-
export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-
|
|
1
|
+
import { $ as JsonValue, F as SignedRequestDomain, O as SignedRequestStatementHeader, a0 as X402_BATCH_SETTLEMENT_SCHEME, a1 as X402_EXACT_SCHEME, a2 as DrawFundingReceipt, a3 as FundingReceipt, a4 as JobReceipt$1, V as UpfrontPayment, a5 as MessageType, a6 as X402Version, a7 as MppxCredential, E as SignedRequestAudience, a8 as PaymentRequired, a9 as Message, aa as MppxChallenge, ab as ReceiptCredit, ac as DrainReceipt, C as Currency, ad as X402Wallet, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, L as Logger$1, K as KVStore } from '../step-cache-CcCjpZm1.js';
|
|
2
|
+
export { ag as BuildPaymentRequirementsOpts, ah as CapabilityDescriptor, ai as CashuMode, aj as CompleteContent, ak as DrainReceiptEvent, al as ExactEvmPayload, am as ExactEvmPayloadAuthorization, an as FundingMethod, ao as MessageFrom, ap as PaymentPayload, aq as PaymentPayloadV1, ar as PaymentPayloadV2, as as PaymentRequestContent, at as PaymentRequiredV2, au as PaymentRequirements, av as PromptContent, aw as RAIL_REFUNDABLE, ax as ReceiptOutcome, ay as ReceiptPayment, az as ResourceInfo, aA as SettleResponse, aB as StepCache, aC as StepRecord, aD as TextContent, aE as UnsignedDrainReceipt, aF as UnsignedDrawFundingReceipt, aG as UnsignedFundingReceipt, aH as UnsignedJobReceipt, aI as VerifyResponse, aJ as WorkingContent, aK as X402Config, aL as X402ResponseBody, aM as X402SelfRelayRpcFailureReason, aN as X402_DEFAULT_NETWORK, aO as X402_V1_VERSION, aP as X402_VERSION, aQ as buildPaymentRequiredV2, aR as buildPaymentRequirements, aS as caip2ToX402Network, aT as canonicalRequestPath, aU as canonicaliseForSigning, aV as canonicalize, aW as chainIdFromCaip2, aX as computeResultHash, aY as decodePayment, aZ as decodePaymentRequiredHeader, a_ as encodePayment, a$ as encodePaymentRequiredHeader, b0 as encodeSettleResponseHeader, b1 as exactEvmAuthorization, b2 as isArtifactMessage, b3 as isCancelMessage, b4 as isCompleteMessage, b5 as isDrainReceipt, b6 as isDrawFundingReceipt, b7 as isFundingReceipt, b8 as isPaymentRequestMessage, b9 as isPromptMessage, ba as isSignedJobReceipt, bb as isTextMessage, bc as isWorkingMessage, bd as paymentRequiredV2FromV1, be as signDrainReceipt, bf as signDrawFundingReceipt, bg as signFundingReceipt, bh as signReceipt, bi as usdcContractByCaip2, bj as usdcContractFor, bk as usdcDomainNameFor, bl as usdcDomainVersionFor, bm as verifyDrainReceipt, bn as verifyDrawFundingReceipt, bo as verifyFundingReceipt, bp as verifyReceipt, bq as x402NetworkToCaip2 } from '../step-cache-CcCjpZm1.js';
|
|
3
|
+
import { L as LightningTransactionListOptions, a as LightningTransactionSnapshot, b as LightningBackend, c as LightningPayment, d as LightningWalletInfo, C as CreatedInvoice, I as InvoiceStatus } from '../lightning-backend-DO7G7VqP.js';
|
|
4
|
+
export { A as AttestationPayload, B as BuilderIdentityKeypair, e as CheckMintHealthOptions, f as LockPubkey, M as MintAmountBounds, g as MintHealthCheckResult, h as amountBoundsVerdict, i as assertNutSupport, j as buildAttestation, k as canSwap, l as checkMintHealth, m as generateIdentity, n as hashCapabilities, o as loadIdentitySecret, p as meltAmountBounds, s as signAttestation, t as toLockPubkey, v as verifyAttestation, w as writeIdentity } from '../lightning-backend-DO7G7VqP.js';
|
|
5
5
|
import { ProofLike, MeltQuoteBolt11Response, Proof, Wallet, MintQuoteBolt11Response, MintPreview, CounterSource, CounterRange, SerializedDLEQ, OutputData, OutputDataLike } from '@cashu/cashu-ts';
|
|
6
6
|
export { g as getWallet } from '../wallet-Dwjs5n_M.js';
|
|
7
7
|
import { SimplePool } from 'nostr-tools/pool';
|
|
@@ -9,8 +9,8 @@ import { Session } from 'mppx/tempo';
|
|
|
9
9
|
import { Pool } from 'pg';
|
|
10
10
|
import { PaymentRequired as PaymentRequired$1 } from '@x402/core/types';
|
|
11
11
|
import { ClientChannelStorage, BatchSettlementClientContext, BatchSettlementEvmScheme } from '@x402/evm/batch-settlement/client';
|
|
12
|
-
export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-
|
|
13
|
-
export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-
|
|
12
|
+
export { h as FX_CACHE_TTL_MS, i as FX_RETRY_COUNT, w as warmFxSnapshot } from '../fx-DfzQ0Lge.js';
|
|
13
|
+
export { c as InvalidUsdPriceError, p as parseUsdPrice } from '../usd-BnAFcUai.js';
|
|
14
14
|
import 'hono';
|
|
15
15
|
import 'mppx';
|
|
16
16
|
import '@x402/core/server';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { FacilitatorConfig } from '@x402/core/server';
|
|
2
|
-
import { ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, aK as X402Config, aA as SettleResponse, aI as VerifyResponse, br as X402ExactVersionSupport, bs as X402Receipt, bt as TransactionalPayoutHook, bu as CashuMeltCompleted } from '../step-cache-
|
|
3
|
-
export { bv as CreditDepositPayload, bw as CreditDrainPayload, bx as FundingLot, by as LotDebit, bz as LotDepletion, bA as MppxServer, bB as NON_CHANNEL_BITCOIN_RAILS, bC as NonChannelBitcoinRail, bD as PayoutReporter, bE as PostgresTempoSessionStore, bF as RevenueReporter, bG as SIGNED_ENVELOPE_FIELDS, bH as SIGNED_ENVELOPE_TYPES, bI as X402TrackedChannel, bJ as _testing, bK as createDefaultReplayStore, bL as depleteLots, bM as fifoOrder, bN as inKindDrawMsats, bO as isInKindDepletion, bP as isNonChannelBitcoinRail, bQ as lotOwedSats, bR as netOwedSats, bS as wrapMppx } from '../step-cache-
|
|
2
|
+
import { ap as PaymentPayload, ae as PaymentRequirementsV1, af as PaymentRequirementsV2, aK as X402Config, aA as SettleResponse, aI as VerifyResponse, br as X402ExactVersionSupport, bs as X402Receipt, bt as TransactionalPayoutHook, bu as CashuMeltCompleted } from '../step-cache-CcCjpZm1.js';
|
|
3
|
+
export { bv as CreditDepositPayload, bw as CreditDrainPayload, bx as FundingLot, by as LotDebit, bz as LotDepletion, bA as MppxServer, bB as NON_CHANNEL_BITCOIN_RAILS, bC as NonChannelBitcoinRail, bD as PayoutReporter, bE as PostgresTempoSessionStore, bF as RevenueReporter, bG as SIGNED_ENVELOPE_FIELDS, bH as SIGNED_ENVELOPE_TYPES, bI as X402TrackedChannel, bJ as _testing, bK as createDefaultReplayStore, bL as depleteLots, bM as fifoOrder, bN as inKindDrawMsats, bO as isInKindDepletion, bP as isNonChannelBitcoinRail, bQ as lotOwedSats, bR as netOwedSats, bS as wrapMppx } from '../step-cache-CcCjpZm1.js';
|
|
4
4
|
import { Hono } from 'hono';
|
|
5
5
|
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-
|
|
11
|
-
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-
|
|
9
|
+
import { C as ConsumedCredentialStore, L as LockPubkeyStateLoader } from '../credit-menu-BpPa43Co.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-BpPa43Co.js';
|
|
11
|
+
export { O as OutgoingMessage, S as StaleJobReapable, i as isStaleJobReapable } from '../job-store-p45j28px.js';
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-
|
|
13
|
+
export { f as LockPubkeyStoreLockPubkey, t as lockPubkeyStoreToLockPubkey } from '../lightning-backend-DO7G7VqP.js';
|
|
14
14
|
import 'mppx';
|
|
15
15
|
import '@x402/evm/batch-settlement/server';
|
|
16
16
|
import '@x402/core/types';
|
|
17
17
|
import 'viem';
|
|
18
18
|
import '@cashu/cashu-ts';
|
|
19
|
-
import '../fx-
|
|
19
|
+
import '../fx-DfzQ0Lge.js';
|
|
20
20
|
|
|
21
21
|
declare function verifyWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<VerifyResponse>;
|
|
22
22
|
declare function settleWithFacilitator(payload: PaymentPayload, requirements: PaymentRequirementsV1 | PaymentRequirementsV2, config?: Pick<X402Config, "facilitator" | "facilitatorAuth">, createAuthHeaders?: FacilitatorConfig["createAuthHeaders"] | undefined): Promise<SettleResponse>;
|
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-NWOSJFZX.js";
|
|
65
65
|
import "../chunk-XRLKGCAW.js";
|
|
66
66
|
import {
|
|
67
67
|
PayoutReporter
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
SIGNED_ENVELOPE_TYPES,
|
|
78
78
|
createDefaultReplayStore,
|
|
79
79
|
humanizeZodError
|
|
80
|
-
} from "../chunk-
|
|
80
|
+
} from "../chunk-A6AOE63A.js";
|
|
81
81
|
import {
|
|
82
82
|
createInstrumentedFetch,
|
|
83
83
|
isStaleJobReapable
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a9 as Message, V as UpfrontPayment, an as FundingMethod, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, aC as StepRecord, a5 as MessageType } from './step-cache-
|
|
1
|
+
import { a9 as Message, V as UpfrontPayment, an as FundingMethod, a3 as FundingReceipt, bZ as CreditSnapshot, a4 as JobReceipt, aC as StepRecord, a5 as MessageType } from './step-cache-CcCjpZm1.js';
|
|
2
2
|
import { ProofLike } from '@cashu/cashu-ts';
|
|
3
3
|
|
|
4
4
|
type JobStatus = "processing" | "completed" | "failed" | "awaiting-input" | "cancelled" | "working";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ai as CashuMode, bT as CreditLedgerQuerier, bU as CreditDrainEnqueue, bV as HostedSettlementReportObligations, w as ResolvedCreditConfig, bW as DVMAuthScheme, F as SignedRequestDomain, bX as CreditLedgerLike, bY as X402RefundSettlementGate, bZ as CreditSnapshot, b_ as CreditDrawRefundArgs, b$ as CreditDrawRefundResult, c0 as DrawResult, c1 as X402SettlementStatus, c2 as X402UnresolvedRefund, c3 as GrownDrawResult, c4 as DrawResolution, c5 as FundingRecord, c6 as CreditFundingEvidence, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, c9 as BlockedInvoiceCursor, ca as InvoiceReconciliation, cb as InvoiceWriteOff, cc as DrawRecord, cd as StalePendingDrawCursor, ce as TempoCreditLossEvidence, cf as TempoCreditLoss, cg as X402CreditLossEvidence, ch as X402CreditLoss, ci as DrainMethod, cj as DrainRequestResult, ck as BitcoinDepositLiability, bx as FundingLot, cl as CreditDrainRecord, cm as ChannelDrainCursor, cn as DrainWriteOff, co as DrainTransitionResult, cp as DrainReleaseResult, cq as DrainFulfilment, cr as HostingCleanupFence, aC as StepRecord, a4 as JobReceipt, a9 as Message, K as KVStore, M as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-
|
|
2
|
-
export { cs as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ct as ClientCompatibility, cu as ClientCompatibilityEnv, cv as ClientCompatibilityGate, cw as ClientCompatibilityRequirement, cx as ClientSemVer, g as CreateSignedRequestVerifierOpts, cy as CreditFundingBasis, cz as CreditInvoiceStatus, cA as CreditLedger, cB as CreditLedgerError, cC as CreditLedgerErrorCode, cD as CreditLedgerErrorDetails, cE as CreditLedgerPool, cF as CreditStatus, cG as DRAIN_DELIVERY_RESERVE_SATS, cH as DVM_PROTOCOL_VERSION, cI as DrainConflictReason, cJ as DrawRailValue, cK as DrawStatus, cL as HostedTempoCloseReportWriteOff, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cO as PostgresX402ChannelStorage, cP as ReplayStoreBackend, cQ as RevenueSkippedNoRailPayload, cR as RevenueSkippedNoRailReason, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, cS as Secp256k1AuthOpts, E as SignedRequestAudience, G as SignedRequestError, H as SignedRequestFailure, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, cT as TempoDrainDecision, cU as TempoDrainDecisionArgs, cV as TempoDrainDecisionResult, cW as TempoDrainHoldReason, V as UpfrontPayment, cX as X402ChannelStorageOpts, cY as X402RelayLockHolder, cZ as X402RelaySubmissionLock, c_ as X402RelaySubmissionLockError, c$ as allocateDrawValue, d0 as clientCompatibilityAttributes, d1 as clientCompatibilityMiddleware, d2 as clientUpgradeRequired, W as createSignedRequestVerifier, d3 as parseClientCapabilities, d4 as parseClientCompatibility, d5 as parseDvmClient, d6 as parseProtocolVersion, d7 as requireClientCompatibility, d8 as retryHostedTempoCloseReport, d9 as secp256k1Auth, da as signedRequestInput, Y as signedRequestStatementHeader, db as writeOffHostedTempoCloseReport } from '../step-cache-
|
|
1
|
+
import { ai as CashuMode, bT as CreditLedgerQuerier, bU as CreditDrainEnqueue, bV as HostedSettlementReportObligations, w as ResolvedCreditConfig, bW as DVMAuthScheme, F as SignedRequestDomain, bX as CreditLedgerLike, bY as X402RefundSettlementGate, bZ as CreditSnapshot, b_ as CreditDrawRefundArgs, b$ as CreditDrawRefundResult, c0 as DrawResult, c1 as X402SettlementStatus, c2 as X402UnresolvedRefund, c3 as GrownDrawResult, c4 as DrawResolution, c5 as FundingRecord, c6 as CreditFundingEvidence, c7 as CreditInvoiceRecord, c8 as InvoiceSettlement, c9 as BlockedInvoiceCursor, ca as InvoiceReconciliation, cb as InvoiceWriteOff, cc as DrawRecord, cd as StalePendingDrawCursor, ce as TempoCreditLossEvidence, cf as TempoCreditLoss, cg as X402CreditLossEvidence, ch as X402CreditLoss, ci as DrainMethod, cj as DrainRequestResult, ck as BitcoinDepositLiability, bx as FundingLot, cl as CreditDrainRecord, cm as ChannelDrainCursor, cn as DrainWriteOff, co as DrainTransitionResult, cp as DrainReleaseResult, cq as DrainFulfilment, cr as HostingCleanupFence, aC as StepRecord, a4 as JobReceipt, a9 as Message, K as KVStore, M as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../step-cache-CcCjpZm1.js';
|
|
2
|
+
export { cs as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, ct as ClientCompatibility, cu as ClientCompatibilityEnv, cv as ClientCompatibilityGate, cw as ClientCompatibilityRequirement, cx as ClientSemVer, g as CreateSignedRequestVerifierOpts, cy as CreditFundingBasis, cz as CreditInvoiceStatus, cA as CreditLedger, cB as CreditLedgerError, cC as CreditLedgerErrorCode, cD as CreditLedgerErrorDetails, cE as CreditLedgerPool, cF as CreditStatus, cG as DRAIN_DELIVERY_RESERVE_SATS, cH as DVM_PROTOCOL_VERSION, cI as DrainConflictReason, cJ as DrawRailValue, cK as DrawStatus, cL as HostedTempoCloseReportWriteOff, cM as JobCostReportPayload, cN as JobTerminalReportPayload, cO as PostgresX402ChannelStorage, cP as ReplayStoreBackend, cQ as RevenueSkippedNoRailPayload, cR as RevenueSkippedNoRailReason, z as SIGNED_REQUEST_AUTH_ID, B as SIGNED_REQUEST_STATEMENT_VERSION, cS as Secp256k1AuthOpts, E as SignedRequestAudience, G as SignedRequestError, H as SignedRequestFailure, N as SignedRequestSignOpts, O as SignedRequestStatementHeader, T as SignedRequestVerifier, cT as TempoDrainDecision, cU as TempoDrainDecisionArgs, cV as TempoDrainDecisionResult, cW as TempoDrainHoldReason, V as UpfrontPayment, cX as X402ChannelStorageOpts, cY as X402RelayLockHolder, cZ as X402RelaySubmissionLock, c_ as X402RelaySubmissionLockError, c$ as allocateDrawValue, d0 as clientCompatibilityAttributes, d1 as clientCompatibilityMiddleware, d2 as clientUpgradeRequired, W as createSignedRequestVerifier, d3 as parseClientCapabilities, d4 as parseClientCompatibility, d5 as parseDvmClient, d6 as parseProtocolVersion, d7 as requireClientCompatibility, d8 as retryHostedTempoCloseReport, d9 as secp256k1Auth, da as signedRequestInput, Y as signedRequestStatementHeader, db as writeOffHostedTempoCloseReport } from '../step-cache-CcCjpZm1.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-BpPa43Co.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-BpPa43Co.js';
|
|
6
6
|
import { Context, Hono } from 'hono';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FxFetcher } from '../fx-
|
|
9
|
-
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-
|
|
10
|
-
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-
|
|
11
|
-
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-
|
|
12
|
-
export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-
|
|
8
|
+
import { F as FxFetcher } from '../fx-DfzQ0Lge.js';
|
|
9
|
+
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters, b as JobStore } from '../job-store-p45j28px.js';
|
|
10
|
+
export { a as JobStatus, h as isStreamableJobStore } from '../job-store-p45j28px.js';
|
|
11
|
+
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-COnj0QKi.js';
|
|
12
|
+
export { b as ContentHold, c as ContentHoldError, d as ContentHoldEvent, e as ContentHoldStore, f as ContentHoldsResponse, J as JobContentMetadata, g as baselineContentExpiry, h as contentMetadata, i as isContentHoldStore } from '../content-retention-COnj0QKi.js';
|
|
13
13
|
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';
|
|
14
14
|
import { Env, BlankSchema } from 'hono/types';
|
|
15
15
|
import 'mppx';
|
|
@@ -17,7 +17,7 @@ import '@x402/core/server';
|
|
|
17
17
|
import '@x402/evm/batch-settlement/server';
|
|
18
18
|
import '@x402/core/types';
|
|
19
19
|
import 'viem';
|
|
20
|
-
import '../lightning-backend-
|
|
20
|
+
import '../lightning-backend-DO7G7VqP.js';
|
|
21
21
|
import '@cashu/cashu-ts';
|
|
22
22
|
|
|
23
23
|
/** Default lifetime of a per-call implicit credit: 90 days before the ledger refuses new draws. */
|
package/dist/server/index.js
CHANGED
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
toCreditView,
|
|
83
83
|
unknownRouteNotFound,
|
|
84
84
|
writeOffHostedTempoCloseReport
|
|
85
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-NWOSJFZX.js";
|
|
86
86
|
import {
|
|
87
87
|
MemoryProcessedPaymentStore,
|
|
88
88
|
PostgresProcessedPaymentStore,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
createDefaultReplayStore,
|
|
102
102
|
createSignedRequestVerifier,
|
|
103
103
|
signedRequestInput
|
|
104
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-A6AOE63A.js";
|
|
105
105
|
import {
|
|
106
106
|
isStreamableJobStore
|
|
107
107
|
} from "../chunk-6RJAE332.js";
|
|
@@ -6042,11 +6042,19 @@ interface CashuConfig {
|
|
|
6042
6042
|
* floor instead, so a longer unsigned floor would protect nothing.
|
|
6043
6043
|
*/
|
|
6044
6044
|
unsignedMinLocktimeSeconds?: number;
|
|
6045
|
+
/**
|
|
6046
|
+
* Wait for an unsigned NUT-24 paid submit's result, including replays.
|
|
6047
|
+
* Default 10 seconds; 0 disables waiting. An integer from 0 to 20.
|
|
6048
|
+
* The ceiling leaves room for a cold machine wake within the roughly
|
|
6049
|
+
* 30-second request deadline commonly enforced by an HTTP proxy.
|
|
6050
|
+
*/
|
|
6051
|
+
unsignedResultWaitSeconds?: number;
|
|
6045
6052
|
}
|
|
6046
|
-
/** A {@link CashuConfig} with
|
|
6053
|
+
/** A {@link CashuConfig} with refund floors and the result wait filled from their defaults. */
|
|
6047
6054
|
interface ResolvedCashuConfig {
|
|
6048
6055
|
minLocktimeSeconds: number;
|
|
6049
6056
|
unsignedMinLocktimeSeconds: number;
|
|
6057
|
+
unsignedResultWaitSeconds: number;
|
|
6050
6058
|
}
|
|
6051
6059
|
/** Platform default for {@link CreditConfig.min} — a dust floor below which rail fees dominate. */
|
|
6052
6060
|
declare const DEFAULT_CREDIT_MIN: PriceValue;
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-
|
|
2
|
-
import { a4 as JobReceipt, a9 as Message, a5 as MessageType, K as KVStore, L as Logger, x as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-
|
|
3
|
-
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-
|
|
1
|
+
import { C as ContentHoldHistory, a as ContentHoldMutation } from '../content-retention-COnj0QKi.js';
|
|
2
|
+
import { a4 as JobReceipt, a9 as Message, a5 as MessageType, K as KVStore, L as Logger, x as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../step-cache-CcCjpZm1.js';
|
|
3
|
+
import { c as StreamableJobStore, R as ReceiptIssuingStore, J as JobRecord, d as RequestIdClaim, e as RequestIdClaimResult, f as JobRetentionCursor, O as OutgoingMessage, A as AppendOutgoingOptions, P as PaymentCreditDelta, V as VerifyAndCreditResult, g as JobCounters } from '../job-store-p45j28px.js';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import 'mppx';
|
|
6
6
|
import '@x402/core/server';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "SDK for building Digital Vending Machines: pay-per-use HTTPS services AI agents can find, pay, and call with no account or API key",
|
|
5
5
|
"author": "DVM Technologies Ltd",
|
|
6
6
|
"keywords": [
|