@dvmkit/sdk 0.1.0-rc.5 → 0.1.0-rc.7
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-F2L6KIMD.js → chunk-5URG56JJ.js} +5 -143
- package/dist/{chunk-ZMZTZFRC.js → chunk-7AKBC4PW.js} +754 -150
- package/dist/chunk-ANFX5HEG.js +186 -0
- package/dist/{chunk-ATQIII6K.js → chunk-CMDI3ENK.js} +342 -176
- package/dist/{chunk-AB3L6B52.js → chunk-FJDCFHW5.js} +26 -12
- package/dist/{chunk-AAJNGQMC.js → chunk-JGGI65I3.js} +1 -1
- package/dist/{chunk-4KB3LTOS.js → chunk-KSQEFVFJ.js} +532 -685
- package/dist/{chunk-XYTSDAPH.js → chunk-LDTWX7JW.js} +1 -1
- package/dist/chunk-MKI6OVW4.js +194 -0
- package/dist/{chunk-AZBXSXQT.js → chunk-P4RUVDU7.js} +1 -0
- package/dist/chunk-TSWKITGR.js +772 -0
- package/dist/{credit-menu-ClA1JyYW.d.ts → credit-menu-CYkETVM4.d.ts} +22 -3
- package/dist/{fx-ptKVFOwq.d.ts → fx-Pf4Ey4f_.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/internal/index.d.ts +4835 -24
- package/dist/internal/index.js +3731 -167
- package/dist/{job-store-DxFqDPYq.d.ts → job-store-BtCaLnvJ.d.ts} +23 -1
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +8 -21
- package/dist/tempo-lifecycle-SQL3KLEZ.js +13 -0
- package/dist/tempo-wallet-QOLEIPCV.js +31 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/{usd-Cha_j80I.d.ts → usd-D7fW2S7I.d.ts} +1 -1
- package/dist/{x402-3VQ64MCS.js → x402-FTG2GRAQ.js} +6 -4
- package/package.json +2 -2
|
@@ -650,6 +650,26 @@ declare function isPaymentRequestMessage(msg: Message): msg is MessageBase & {
|
|
|
650
650
|
type: "payment-request";
|
|
651
651
|
content: PaymentRequestContent;
|
|
652
652
|
};
|
|
653
|
+
/** Type guard: message is a text message. */
|
|
654
|
+
declare function isTextMessage(msg: Message): msg is MessageBase & {
|
|
655
|
+
type: "text";
|
|
656
|
+
content: TextContent;
|
|
657
|
+
};
|
|
658
|
+
/** Type guard: message signals completion. */
|
|
659
|
+
declare function isCompleteMessage(msg: Message): msg is MessageBase & {
|
|
660
|
+
type: "complete";
|
|
661
|
+
content: CompleteContent;
|
|
662
|
+
};
|
|
663
|
+
/** Type guard: message is a cancellation. */
|
|
664
|
+
declare function isCancelMessage(msg: Message): msg is MessageBase & {
|
|
665
|
+
type: "cancel";
|
|
666
|
+
content: CancelContent;
|
|
667
|
+
};
|
|
668
|
+
/** Type guard: message is a working signal. */
|
|
669
|
+
declare function isWorkingMessage(msg: Message): msg is MessageBase & {
|
|
670
|
+
type: "working";
|
|
671
|
+
content: WorkingContent;
|
|
672
|
+
};
|
|
653
673
|
|
|
654
674
|
/** Auth identifier advertised by DVMs using audience-bound caller proofs. */
|
|
655
675
|
declare const SIGNED_REQUEST_AUTH_ID: "secp256k1-schnorr-v2";
|
|
@@ -680,6 +700,8 @@ interface SignedRequestStatementHeader {
|
|
|
680
700
|
}
|
|
681
701
|
/** Build the versioned header persisted beside a caller's flat input envelope. */
|
|
682
702
|
declare function signedRequestStatementHeader(domain: SignedRequestDomain): SignedRequestStatementHeader;
|
|
703
|
+
/** Canonicalize a concrete request path: leading slash, no query or fragment. */
|
|
704
|
+
declare function canonicalRequestPath(pathOrUrl: string): string;
|
|
683
705
|
|
|
684
706
|
/** Protocol version spoken by this SDK generation. */
|
|
685
707
|
declare const DVM_PROTOCOL_VERSION = "1";
|
|
@@ -6833,4 +6855,4 @@ interface StaleJobReapable {
|
|
|
6833
6855
|
/** Runtime type guard for StaleJobReapable. */
|
|
6834
6856
|
declare function isStaleJobReapable(store: JobStore): store is JobStore & StaleJobReapable;
|
|
6835
6857
|
|
|
6836
|
-
export { type PaymentRequired as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobRecord as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, type FundingReceipt as Y, type ZodLike as Z, type JobReceipt as _, type DVMDescriptor as a,
|
|
6858
|
+
export { type PaymentRequired as $, type ApprovalContent as A, type SignedRequestDomain as B, type Currency as C, type DVMConfig as D, SignedRequestError as E, type SignedRequestFailure as F, type SignedRequestReplayStore as G, type SignedRequestSignOpts as H, type IncomingMessage as I, type JobRecord as J, type KVStore as K, type Logger as L, type SignedRequestStatementHeader as M, type SignedRequestVerifier as N, createSignedRequestVerifier as O, type PaymentContent as P, type QuoteConfig as Q, type ResolvedCreditConfig as R, type SDKJobContext as S, isZodSchema as T, UnsupportedCurrencyError as U, signedRequestStatementHeader as V, validateCurrency as W, type JsonValue as X, type FundingReceipt as Y, type ZodLike as Z, type JobReceipt as _, type DVMDescriptor as a, X402_DEFAULT_NETWORK as a$, type X402Version as a0, type MppxCredential as a1, type Message as a2, type MessageType as a3, type MppxChallenge as a4, X402_BATCH_SETTLEMENT_SCHEME as a5, X402_EXACT_SCHEME as a6, type ReceiptCredit as a7, type X402Wallet as a8, type ResourceInfo as a9, type PaymentRequestContent as aA, type PaymentRequiredV2 as aB, type PaymentRequirements as aC, type PaymentRequirementsV1 as aD, type PaymentRequirementsV2 as aE, PayoutReporter as aF, PostgresTempoSessionStore as aG, type PromptContent as aH, RAIL_REFUNDABLE as aI, type ReceiptOutcome as aJ, type ReceiptPayment as aK, RevenueReporter as aL, SIGNED_ENVELOPE_FIELDS as aM, SIGNED_ENVELOPE_TYPES as aN, type SettleResponse as aO, type StaleJobReapable as aP, StepCache as aQ, type StepRecord as aR, type TextContent as aS, type UnsignedDrainReceipt as aT, type UnsignedFundingReceipt as aU, type UnsignedJobReceipt as aV, type VerifyResponse as aW, type WorkingContent as aX, type X402ResponseBody as aY, type X402SelfRelayRpcFailureReason as aZ, type X402TrackedChannel as a_, type X402Config as aa, type X402ExactVersionSupport as ab, type X402Receipt as ac, type TransactionalPayoutHook as ad, type CashuMeltCompleted as ae, type BuildPaymentRequirementsOpts as af, type CapabilityDescriptor as ag, type CashuMode as ah, type CompleteContent as ai, type CreditDepositPayload as aj, type DrainReceipt as ak, type DrainReceiptEvent as al, type ExactEvmPayload as am, type ExactEvmPayloadAuthorization as an, type FundingLot as ao, type FundingMethod as ap, type LotDebit as aq, type LotDepletion as ar, type MessageFrom as as, type MppxServer as at, NON_CHANNEL_BITCOIN_RAILS as au, type NonChannelBitcoinRail as av, type OutgoingMessage as aw, type PaymentPayload as ax, type PaymentPayloadV1 as ay, type PaymentPayloadV2 as az, type ArtifactContent as b, type InvoiceSettlement as b$, X402_V1_VERSION as b0, X402_VERSION as b1, _testing as b2, buildPaymentRequiredV2 as b3, buildPaymentRequirements as b4, caip2ToX402Network as b5, canonicalRequestPath as b6, canonicaliseForSigning as b7, canonicalize as b8, chainIdFromCaip2 as b9, paymentRequiredV2FromV1 as bA, settleWithFacilitator as bB, signDrainReceipt as bC, signFundingReceipt as bD, signReceipt as bE, usdcContractByCaip2 as bF, usdcContractFor as bG, usdcDomainNameFor as bH, usdcDomainVersionFor as bI, verifyDrainReceipt as bJ, verifyFundingReceipt as bK, verifyReceipt as bL, verifyWithFacilitator as bM, wrapMppx as bN, x402NetworkToCaip2 as bO, type CreditDrainEnqueue as bP, type DVMAuthScheme as bQ, type CreditLedgerLike as bR, type X402RefundSettlementGate as bS, type CreditSnapshot as bT, type DrawResult as bU, type X402SettlementStatus as bV, type X402UnresolvedRefund as bW, type GrownDrawResult as bX, type DrawResolution as bY, type FundingRecord as bZ, type CreditInvoiceRecord as b_, computeResultHash as ba, createDefaultReplayStore as bb, decodePayment as bc, decodePaymentRequiredHeader as bd, depleteLots as be, encodePayment as bf, encodePaymentRequiredHeader as bg, encodeSettleResponseHeader as bh, exactEvmAuthorization as bi, fifoOrder as bj, inKindDrawMsats as bk, isArtifactMessage as bl, isCancelMessage as bm, isCompleteMessage as bn, isDrainReceipt as bo, isFundingReceipt as bp, isInKindDepletion as bq, isNonChannelBitcoinRail as br, isPaymentRequestMessage as bs, isPromptMessage as bt, isSignedJobReceipt as bu, isStaleJobReapable as bv, isTextMessage as bw, isWorkingMessage as bx, lotOwedSats as by, netOwedSats as bz, type CancelContent as c, parseProtocolVersion as c$, type BlockedInvoiceCursor as c0, type InvoiceReconciliation as c1, type InvoiceWriteOff as c2, type DrawRecord as c3, type StalePendingDrawCursor as c4, type TempoCreditLossEvidence as c5, type CreditLedgerQuerier as c6, type TempoCreditLoss as c7, type X402CreditLossEvidence as c8, type X402CreditLoss as c9, CreditLedgerError as cA, type CreditLedgerErrorCode as cB, type CreditLedgerErrorDetails as cC, type CreditLedgerPool as cD, type CreditStatus as cE, DRAIN_DELIVERY_RESERVE_SATS as cF, DVM_PROTOCOL_VERSION as cG, type DrainConflictReason as cH, type DrawRailValue as cI, type DrawStatus as cJ, PostgresX402ChannelStorage as cK, type ReplayStoreBackend as cL, type RevenueSkippedNoRailPayload as cM, type RevenueSkippedNoRailReason as cN, type Secp256k1AuthOpts as cO, type X402ChannelStorageOpts as cP, type X402RelayLockHolder as cQ, type X402RelaySubmissionLock as cR, X402RelaySubmissionLockError as cS, allocateDrawValue as cT, clientCompatibilityAttributes as cU, clientCompatibilityMiddleware as cV, clientUpgradeRequired as cW, isStreamableJobStore as cX, parseClientCapabilities as cY, parseClientCompatibility as cZ, parseDvmClient as c_, type DrainMethod as ca, type DrainRequestResult as cb, type BitcoinDepositLiability as cc, type CreditDrainRecord as cd, type ChannelDrainCursor as ce, type DrainWriteOff as cf, type DrainReleaseResult as cg, type DrainFulfilment as ch, type DrainTransitionResult as ci, type StreamableJobStore as cj, type ReceiptIssuingStore as ck, type RequestIdClaim as cl, type RequestIdClaimResult as cm, type AppendOutgoingOptions as cn, type PaymentCreditDelta as co, type VerifyAndCreditResult as cp, type JobCounters as cq, CLIENT_COMPATIBILITY_HEADERS as cr, type ClientCompatibility as cs, type ClientCompatibilityEnv as ct, type ClientCompatibilityGate as cu, type ClientCompatibilityRequirement as cv, type ClientSemVer as cw, type CreditFundingBasis as cx, type CreditInvoiceStatus as cy, CreditLedger as cz, type CanonicalEnvelope as d, requireClientCompatibility as d0, secp256k1Auth as d1, signedRequestInput as d2, type CreditDepositEnqueue as d3, type TopUpCapUnenforcedReason as d4, type X402SettlementIntent as d5, type X402SettlementCursor as d6, type X402SettlementWriteOff as d7, type X402FacilitatorAuth as d8, type X402BatchSettlementConfig as d9, type X402PayoutObserver as da, type X402SettlementReconciliationReason as db, type CreditDrawReleaseEnqueue as dc, type CreateSignedRequestVerifierOpts as e, type CreditConfig as f, type CreditView as g, DEFAULT_CREDIT_MAX as h, DEFAULT_CREDIT_MIN as i, DEFAULT_CREDIT_TTL_SECONDS as j, type DVMRouteContext as k, type InputType as l, InvalidCurrencyError as m, type JobStatus as n, type JobStore as o, type PaymentMethod as p, type PriceValue as q, type ProgressContent as r, type PromptOpts as s, type QuoteContext as t, type QuoteResult as u, type ResponseContent as v, type SDKPaymentRequestOpts as w, SIGNED_REQUEST_AUTH_ID as x, SIGNED_REQUEST_STATEMENT_VERSION as y, type SignedRequestAudience as z };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { ah as CashuMode, bP as CreditDrainEnqueue, R as ResolvedCreditConfig, bQ as DVMAuthScheme, B as SignedRequestDomain, bR as CreditLedgerLike, bS as X402RefundSettlementGate, bT as CreditSnapshot, bU as DrawResult, bV as X402SettlementStatus, bW as X402UnresolvedRefund, bX as GrownDrawResult, bY as DrawResolution, bZ as FundingRecord, Y as FundingReceipt, b_ as CreditInvoiceRecord, b$ as InvoiceSettlement, c0 as BlockedInvoiceCursor, c1 as InvoiceReconciliation, c2 as InvoiceWriteOff, c3 as DrawRecord, c4 as StalePendingDrawCursor, c5 as TempoCreditLossEvidence, c6 as CreditLedgerQuerier, c7 as TempoCreditLoss, c8 as X402CreditLossEvidence, c9 as X402CreditLoss, ca as DrainMethod, cb as DrainRequestResult, cc as BitcoinDepositLiability, ao as FundingLot, cd as CreditDrainRecord, ce as ChannelDrainCursor, cf as DrainWriteOff, cg as DrainReleaseResult, ch as DrainFulfilment, ci as DrainTransitionResult, cj as StreamableJobStore, ck as ReceiptIssuingStore, J as JobRecord, cl as RequestIdClaim, cm as RequestIdClaimResult, _ as JobReceipt, aw as OutgoingMessage, cn as AppendOutgoingOptions, co as PaymentCreditDelta, cp as VerifyAndCreditResult, cq as JobCounters, a2 as Message, K as KVStore, G as SignedRequestReplayStore, Z as ZodLike, a as DVMDescriptor } from '../job-store-BtCaLnvJ.js';
|
|
2
|
+
export { cr as CLIENT_COMPATIBILITY_HEADERS, d as CanonicalEnvelope, cs as ClientCompatibility, ct as ClientCompatibilityEnv, cu as ClientCompatibilityGate, cv as ClientCompatibilityRequirement, cw as ClientSemVer, e as CreateSignedRequestVerifierOpts, cx as CreditFundingBasis, cy as CreditInvoiceStatus, cz as CreditLedger, cA as CreditLedgerError, cB as CreditLedgerErrorCode, cC as CreditLedgerErrorDetails, cD as CreditLedgerPool, cE as CreditStatus, cF as DRAIN_DELIVERY_RESERVE_SATS, cG as DVM_PROTOCOL_VERSION, cH as DrainConflictReason, cI as DrawRailValue, cJ as DrawStatus, n as JobStatus, o as JobStore, cK as PostgresX402ChannelStorage, cL as ReplayStoreBackend, cM as RevenueSkippedNoRailPayload, cN as RevenueSkippedNoRailReason, x as SIGNED_REQUEST_AUTH_ID, y as SIGNED_REQUEST_STATEMENT_VERSION, cO as Secp256k1AuthOpts, z as SignedRequestAudience, E as SignedRequestError, F as SignedRequestFailure, H as SignedRequestSignOpts, M as SignedRequestStatementHeader, N as SignedRequestVerifier, cP as X402ChannelStorageOpts, cQ as X402RelayLockHolder, cR as X402RelaySubmissionLock, cS as X402RelaySubmissionLockError, cT as allocateDrawValue, cU as clientCompatibilityAttributes, cV as clientCompatibilityMiddleware, cW as clientUpgradeRequired, O as createSignedRequestVerifier, cX as isStreamableJobStore, cY as parseClientCapabilities, cZ as parseClientCompatibility, c_ as parseDvmClient, c$ as parseProtocolVersion, d0 as requireClientCompatibility, d1 as secp256k1Auth, d2 as signedRequestInput, V as signedRequestStatementHeader } from '../job-store-BtCaLnvJ.js';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
4
|
+
import { aH as CreditMenu, g as AppEnv, U as UpfrontPaymentOpts, q as PaymentInfo, aI as ReceiptIssuer, aJ as LightningReceive, aK as TempoSettlementReadiness, aL as DVMHostOpts } from '../credit-menu-CYkETVM4.js';
|
|
5
|
+
export { aM as BuildCreditMenuArgs, aN as BuilderIdentity, aO as CREDIT_ENVELOPE_KEYS, e as ConsumedCredentialStore, aP as CreateX402BatchSettlementServerOpts, aQ as CreditEnvelope, aR as CreditEnvelopeError, aS as CreditFundCommitment, aT as CreditTerms, aU as DEFAULT_INVOICE_TTL_SECONDS, aV as DVMHost, aW as JobManager, aX as JobManagerOpts, aY as LightningReceiveConfig, aZ as MIN_INVOICE_TTL_SECONDS, a_ as MemoryConsumedCredentialStore, a$ as MemoryConsumedCredentialStoreOpts, b0 as MemoryProcessedPaymentStore, b1 as MemoryX402ExactSettlementStore, b2 as MountOpts, b3 as OwnerDisplay, b4 as PlatformReporterOpts, b5 as PostgresProcessedPaymentStore, b6 as PostgresX402ExactSettlementStore, b7 as PriceFiat, b8 as ProcessedPaymentQuerier, b9 as ProcessedPaymentRail, ba as ProcessedPaymentRecord, bb as ProcessedPaymentReplayError, bc as ProcessedPaymentStore, bd as X402BatchAcceptance, be as X402BatchFunding, bf as X402BatchRefusal, bg as X402BatchSettlementServer, bh as X402ExactAcceptance, bi as X402ExactIntentConflictError, bj as X402ExactSettlementAttempt, bk as X402ExactSettlementChainEvidence, bl as X402ExactSettlementEffect, bm as X402ExactSettlementEvidenceMissingError, bn as X402ExactSettlementEvidenceReader, bo as X402ExactSettlementIntent, bp as X402ExactSettlementNotReadyError, bq as X402ExactSettlementServer, br as X402ExactSettlementServerOpts, bs as X402ExactSettlementStatus, bt as X402ExactSettlementStore, bu as X402SettlementChainEvidence, bv as X402SettlementEvidenceReader, bw as X402SettlementSubmissionError, bx as X402_BATCH_AUTO_SETTLEMENT, by as X402_BATCH_MIN_WITHDRAW_DELAY_SECONDS, bz as X402_BATCH_SETTLEMENT_NETWORK, bA as attachCreditMenu, bB as buildCreditMenu, bC as createDVMHost, bD as createX402BatchSettlementServer, bE as creditEnvelopeIgnoreFields, bF as drawSettlementRef, bG as extractCreditEnvelope, bH as fundingCommitment, bI as selectPrimaryCredit, bJ as stripCreditEnvelope, bK as toCreditView } from '../credit-menu-CYkETVM4.js';
|
|
6
6
|
import { Context } from 'hono';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { F as FxFetcher } from '../fx-
|
|
8
|
+
import { F as FxFetcher } from '../fx-Pf4Ey4f_.js';
|
|
9
9
|
export { P as PinnedFetch, S as SSRFError, a as SSRFGuardOpts, b as SSRFReason, c as SSRFResolver, d as assertSafeUrl, e as createPinnedFetch } from '../ssrf-DbFkpDv0.js';
|
|
10
10
|
import '@cashu/cashu-ts';
|
|
11
11
|
import 'mppx';
|
package/dist/server/index.js
CHANGED
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
hasInvalidRequestId,
|
|
56
56
|
initLockPubkeyTable,
|
|
57
57
|
initWalletAccumulatorTable,
|
|
58
|
+
isTestMintUrl,
|
|
58
59
|
parseClientCapabilities,
|
|
59
60
|
parseClientCompatibility,
|
|
60
61
|
parseDvmClient,
|
|
@@ -73,17 +74,19 @@ import {
|
|
|
73
74
|
unknownRouteNotFound,
|
|
74
75
|
validateX402Env,
|
|
75
76
|
withNwcPool
|
|
76
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-CMDI3ENK.js";
|
|
77
78
|
import {
|
|
78
79
|
X402_DEFAULT_FACILITATOR,
|
|
79
80
|
X402_DEFAULT_NETWORK,
|
|
80
81
|
assertSupportedX402Network,
|
|
81
82
|
x402NetworkToCaip2
|
|
82
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-JGGI65I3.js";
|
|
84
|
+
import {
|
|
85
|
+
IMPLICIT_CREDIT_TTL_MS
|
|
86
|
+
} from "../chunk-5URG56JJ.js";
|
|
83
87
|
import {
|
|
84
|
-
IMPLICIT_CREDIT_TTL_MS,
|
|
85
88
|
resolveRpcOverride
|
|
86
|
-
} from "../chunk-
|
|
89
|
+
} from "../chunk-MKI6OVW4.js";
|
|
87
90
|
import {
|
|
88
91
|
MemoryCreditLedger
|
|
89
92
|
} from "../chunk-EXHBXA4U.js";
|
|
@@ -95,7 +98,7 @@ import {
|
|
|
95
98
|
createSignedRequestVerifier,
|
|
96
99
|
signedRequestInput,
|
|
97
100
|
signedRequestStatementHeader
|
|
98
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-P4RUVDU7.js";
|
|
99
102
|
import {
|
|
100
103
|
MemoryKVStore,
|
|
101
104
|
initLoggers,
|
|
@@ -204,22 +207,6 @@ import { serve as honoServe } from "@hono/node-server";
|
|
|
204
207
|
import { Hono } from "hono";
|
|
205
208
|
import { privateKeyToAccount } from "viem/accounts";
|
|
206
209
|
|
|
207
|
-
// src/lib/mints.ts
|
|
208
|
-
function isTestMintUrl(url) {
|
|
209
|
-
let host;
|
|
210
|
-
try {
|
|
211
|
-
host = new URL(url).hostname.toLowerCase();
|
|
212
|
-
} catch {
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
if (host.startsWith("[") && host.endsWith("]")) host = host.slice(1, -1);
|
|
216
|
-
if (LOOPBACK_HOSTS.has(host)) return true;
|
|
217
|
-
if (host.endsWith(".localhost")) return true;
|
|
218
|
-
return TEST_MINT_HOSTS.has(host);
|
|
219
|
-
}
|
|
220
|
-
var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "0.0.0.0", "::1"]);
|
|
221
|
-
var TEST_MINT_HOSTS = /* @__PURE__ */ new Set(["testnut.cashu.space"]);
|
|
222
|
-
|
|
223
210
|
// src/sdk/server/lightning-rail-health.ts
|
|
224
211
|
var LIGHTNING_RAIL_HEALTH_REFRESH_TTL_MS = 5 * 60 * 1e3;
|
|
225
212
|
var LIGHTNING_RAIL_HEALTH_MAX_STALENESS_MS = 3 * 60 * 60 * 1e3;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertTempoWalletIdle
|
|
3
|
+
} from "./chunk-7AKBC4PW.js";
|
|
4
|
+
import "./chunk-ANFX5HEG.js";
|
|
5
|
+
import "./chunk-KSQEFVFJ.js";
|
|
6
|
+
import "./chunk-TSWKITGR.js";
|
|
7
|
+
import "./chunk-5URG56JJ.js";
|
|
8
|
+
import "./chunk-MKI6OVW4.js";
|
|
9
|
+
import "./chunk-FUJ36YDV.js";
|
|
10
|
+
import "./chunk-AT6V3SY7.js";
|
|
11
|
+
export {
|
|
12
|
+
assertTempoWalletIdle
|
|
13
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TEMPO_CHAIN_ID,
|
|
3
|
+
TEMPO_USDC_MAINNET,
|
|
4
|
+
connectedTempoAccount,
|
|
5
|
+
deriveTempoAddress,
|
|
6
|
+
generateTempoKey,
|
|
7
|
+
getTempoUsdcBalance,
|
|
8
|
+
resolveTempoAsset,
|
|
9
|
+
tempoBalanceCheckHint,
|
|
10
|
+
tempoTokenLabel,
|
|
11
|
+
tempoTokenReference,
|
|
12
|
+
tempoWrongAssetHint,
|
|
13
|
+
tryResolveTempoAsset
|
|
14
|
+
} from "./chunk-ANFX5HEG.js";
|
|
15
|
+
import "./chunk-TSWKITGR.js";
|
|
16
|
+
import "./chunk-MKI6OVW4.js";
|
|
17
|
+
import "./chunk-FUJ36YDV.js";
|
|
18
|
+
export {
|
|
19
|
+
TEMPO_CHAIN_ID,
|
|
20
|
+
TEMPO_USDC_MAINNET,
|
|
21
|
+
connectedTempoAccount,
|
|
22
|
+
deriveTempoAddress,
|
|
23
|
+
generateTempoKey,
|
|
24
|
+
getTempoUsdcBalance,
|
|
25
|
+
resolveTempoAsset,
|
|
26
|
+
tempoBalanceCheckHint,
|
|
27
|
+
tempoTokenLabel,
|
|
28
|
+
tempoTokenReference,
|
|
29
|
+
tempoWrongAssetHint,
|
|
30
|
+
tryResolveTempoAsset
|
|
31
|
+
};
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cj as StreamableJobStore, ck as ReceiptIssuingStore, J as JobRecord, cl as RequestIdClaim, cm as RequestIdClaimResult, _ as JobReceipt, aw as OutgoingMessage, cn as AppendOutgoingOptions, co as PaymentCreditDelta, cp as VerifyAndCreditResult, cq as JobCounters, a2 as Message, a3 as MessageType, K as KVStore, L as Logger, v as ResponseContent, P as PaymentContent, S as SDKJobContext } from '../job-store-BtCaLnvJ.js';
|
|
2
2
|
import '@cashu/cashu-ts';
|
|
3
3
|
import 'mppx';
|
|
4
4
|
import '@x402/core/server';
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
tryX402Payment,
|
|
12
12
|
verifyX402Payment,
|
|
13
13
|
x402WrongAssetHint
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-FJDCFHW5.js";
|
|
15
|
+
import "./chunk-KSQEFVFJ.js";
|
|
16
|
+
import "./chunk-TSWKITGR.js";
|
|
16
17
|
import {
|
|
17
18
|
X402_DEFAULT_FACILITATOR,
|
|
18
19
|
X402_DEFAULT_NETWORK,
|
|
@@ -37,8 +38,9 @@ import {
|
|
|
37
38
|
x402NetworkListForCopy,
|
|
38
39
|
x402NetworkToCaip2,
|
|
39
40
|
x402SupportedNetworksHint
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-JGGI65I3.js";
|
|
42
|
+
import "./chunk-5URG56JJ.js";
|
|
43
|
+
import "./chunk-MKI6OVW4.js";
|
|
42
44
|
import "./chunk-66HGCPBU.js";
|
|
43
45
|
import "./chunk-FUJ36YDV.js";
|
|
44
46
|
import "./chunk-AT6V3SY7.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvmkit/sdk",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.7",
|
|
4
4
|
"description": "SDK for building accountless, pay-per-use Digital Vending Machines",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@scure/bip39": "2.0.1",
|
|
68
68
|
"@x402/core": "2.21.0",
|
|
69
69
|
"@x402/evm": "2.21.0",
|
|
70
|
-
"hono": "4.12.
|
|
70
|
+
"hono": "4.12.34",
|
|
71
71
|
"jose": "6.2.1",
|
|
72
72
|
"mppx": "0.8.15",
|
|
73
73
|
"nostr-tools": "2.23.3",
|