@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
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
authorizeProtectedRemoval,
|
|
3
2
|
fundingReachableAt,
|
|
4
3
|
info,
|
|
5
|
-
isValidEvmPrivateKey,
|
|
6
4
|
listCredits,
|
|
7
|
-
loadConfig,
|
|
8
5
|
maxAdvertisedMicro,
|
|
9
|
-
updateConfig,
|
|
10
6
|
withinAdvertisedTolerance
|
|
11
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KSQEFVFJ.js";
|
|
8
|
+
import {
|
|
9
|
+
authorizeProtectedRemoval,
|
|
10
|
+
isValidEvmPrivateKey,
|
|
11
|
+
loadConfig,
|
|
12
|
+
updateConfig
|
|
13
|
+
} from "./chunk-TSWKITGR.js";
|
|
12
14
|
import {
|
|
13
15
|
X402_DEFAULT_NETWORK,
|
|
14
16
|
X402_V1_VERSION,
|
|
@@ -29,21 +31,23 @@ import {
|
|
|
29
31
|
x402NetworkByCaip2,
|
|
30
32
|
x402NetworkToCaip2,
|
|
31
33
|
x402SupportedNetworksHint
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JGGI65I3.js";
|
|
33
35
|
import {
|
|
34
|
-
DvmError,
|
|
35
|
-
X402_CHANNELS_FILE,
|
|
36
36
|
costAnchor,
|
|
37
|
-
ensureConfigDir,
|
|
38
37
|
fetchBtcUsdRate,
|
|
39
38
|
formatStaleness,
|
|
40
39
|
formatUsd,
|
|
41
40
|
getLastKnownBtcRate,
|
|
42
41
|
msatsToUsdc,
|
|
43
|
-
resolveRpcHttpTransportOptions,
|
|
44
|
-
resolveRpcOverride,
|
|
45
42
|
usdcToMsats
|
|
46
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-5URG56JJ.js";
|
|
44
|
+
import {
|
|
45
|
+
DvmError,
|
|
46
|
+
X402_CHANNELS_FILE,
|
|
47
|
+
ensureConfigDir,
|
|
48
|
+
resolveRpcHttpTransportOptions,
|
|
49
|
+
resolveRpcOverride
|
|
50
|
+
} from "./chunk-MKI6OVW4.js";
|
|
47
51
|
import {
|
|
48
52
|
callerLoggers
|
|
49
53
|
} from "./chunk-66HGCPBU.js";
|
|
@@ -96,6 +100,15 @@ async function tryResolveBtcUsdRate() {
|
|
|
96
100
|
return null;
|
|
97
101
|
}
|
|
98
102
|
}
|
|
103
|
+
function staleRateNotice(resolved) {
|
|
104
|
+
if (!resolved?.stale || resolved.cachedAt === void 0) return void 0;
|
|
105
|
+
const age = formatStaleness(resolved.cachedAt);
|
|
106
|
+
return {
|
|
107
|
+
cached_at: new Date(resolved.cachedAt).toISOString(),
|
|
108
|
+
age,
|
|
109
|
+
display: `Priced with a BTC/USD rate cached ${age} \u2014 the rate provider is unreachable, so dollar figures may have drifted.`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
99
112
|
var warnedStale = false;
|
|
100
113
|
function warnStaleRate(cachedAt) {
|
|
101
114
|
if (warnedStale) return;
|
|
@@ -1048,6 +1061,7 @@ export {
|
|
|
1048
1061
|
x402WrongAssetHint,
|
|
1049
1062
|
resolveBtcUsdRate,
|
|
1050
1063
|
tryResolveBtcUsdRate,
|
|
1064
|
+
staleRateNotice,
|
|
1051
1065
|
X402_EXACT_AUTHORIZATION_TTL_SECONDS,
|
|
1052
1066
|
X402_REFUSAL_TRANSACTION_DISCOVERY_WINDOW_MS,
|
|
1053
1067
|
x402ExactFundingDead,
|