@dvmkit/dvm-cli 0.0.0 → 0.1.4
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/LICENSE +67 -0
- package/NOTICE +2 -0
- package/README.md +28 -3
- package/dist/_esm-M2HUAA3B.js +883 -0
- package/dist/_esm-NRGECLJ7.js +35 -0
- package/dist/accounts-S747UW3A.js +73 -0
- package/dist/ccip-XZ5F5J6R.js +18 -0
- package/dist/chains-PINFXYUE.js +1460 -0
- package/dist/channel-store-GOV7TEDN.js +62 -0
- package/dist/chunk-3PPOU55E.js +312 -0
- package/dist/chunk-3TBULV3F.js +551 -0
- package/dist/chunk-4AQ4G7L5.js +1447 -0
- package/dist/chunk-5BUV73FO.js +2351 -0
- package/dist/chunk-6AJ7H2VX.js +4387 -0
- package/dist/chunk-6UGZAFIR.js +1485 -0
- package/dist/chunk-7UPZZGC5.js +30063 -0
- package/dist/chunk-ACNNU5RY.js +5485 -0
- package/dist/chunk-BZNZWRBB.js +189 -0
- package/dist/chunk-EY5K4BM3.js +1780 -0
- package/dist/chunk-G3RLVJF5.js +19 -0
- package/dist/chunk-GIDSTROG.js +16614 -0
- package/dist/chunk-HPRIQEJS.js +258 -0
- package/dist/chunk-IC6OXFYW.js +6484 -0
- package/dist/chunk-IYHTITNZ.js +45 -0
- package/dist/chunk-KC4UPK44.js +113 -0
- package/dist/chunk-MMJR6N3J.js +2426 -0
- package/dist/chunk-MTBCEXJ6.js +4602 -0
- package/dist/chunk-ONQMRWY3.js +83 -0
- package/dist/chunk-PHZHPRQE.js +1181 -0
- package/dist/chunk-RA24J4QM.js +3717 -0
- package/dist/chunk-RWBYCM47.js +339 -0
- package/dist/chunk-SLDVIXCS.js +21369 -0
- package/dist/chunk-TO47XRK7.js +24890 -0
- package/dist/chunk-U5TNSUYW.js +1757 -0
- package/dist/chunk-UU6QMSTQ.js +171 -0
- package/dist/chunk-UXQCP26E.js +2691 -0
- package/dist/chunk-XGABM4H5.js +3339 -0
- package/dist/chunk-YZUBKHHA.js +15436 -0
- package/dist/chunk-ZELLQI7F.js +248 -0
- package/dist/chunk-ZGXCK43G.js +9868 -0
- package/dist/client-D3XFLWOK.js +52 -0
- package/dist/dist-7MMV3EZA.js +46 -0
- package/dist/dvm.js +33650 -0
- package/dist/lifecycle-5RLM5JMN.js +29 -0
- package/dist/mine.wasm-DNBKYCTQ.js +12 -0
- package/dist/pocket-refill-GDYSTECR.js +133 -0
- package/dist/secp256k1-4YWQEMGF.js +19 -0
- package/dist/tempo-lifecycle-DHZPQTSB.js +31 -0
- package/dist/tempo-wallet-5FEOI4CF.js +35 -0
- package/dist/wallet-G3VOUCL4.js +30 -0
- package/dist/x402-VNFA3DBY.js +91 -0
- package/package.json +71 -6
- package/skills/dvm/SKILL.md +71 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
DvmX402ChannelStorage,
|
|
6
|
+
X402_PENDING_STALE_MS,
|
|
7
|
+
acknowledgeX402ChannelOwner,
|
|
8
|
+
clearPendingX402ExactFunding,
|
|
9
|
+
clearPendingX402Funding,
|
|
10
|
+
findX402Channel,
|
|
11
|
+
listPendingX402Fundings,
|
|
12
|
+
listPendingX402FundingsForChannel,
|
|
13
|
+
listResumableX402ExactFundings,
|
|
14
|
+
listResumableX402Fundings,
|
|
15
|
+
listX402Channels,
|
|
16
|
+
loadResumableX402ExactFunding,
|
|
17
|
+
loadResumableX402Funding,
|
|
18
|
+
recordPendingX402ExactFunding,
|
|
19
|
+
recordPendingX402Funding,
|
|
20
|
+
recordX402ChannelMetadata,
|
|
21
|
+
retirePendingX402Funding,
|
|
22
|
+
withX402ChannelLock,
|
|
23
|
+
x402ChannelBalanceUnreconciledAt,
|
|
24
|
+
x402ExactFundingDead,
|
|
25
|
+
x402PendingBlockExpiresAt,
|
|
26
|
+
x402PendingDepositExpiresAt,
|
|
27
|
+
x402PendingFundingJson,
|
|
28
|
+
x402PendingRetired,
|
|
29
|
+
x402PendingStale,
|
|
30
|
+
x402PendingUnsettled
|
|
31
|
+
} from "./chunk-3TBULV3F.js";
|
|
32
|
+
import "./chunk-6UGZAFIR.js";
|
|
33
|
+
import "./chunk-U5TNSUYW.js";
|
|
34
|
+
import "./chunk-IYHTITNZ.js";
|
|
35
|
+
export {
|
|
36
|
+
DvmX402ChannelStorage,
|
|
37
|
+
X402_PENDING_STALE_MS,
|
|
38
|
+
acknowledgeX402ChannelOwner,
|
|
39
|
+
clearPendingX402ExactFunding,
|
|
40
|
+
clearPendingX402Funding,
|
|
41
|
+
findX402Channel,
|
|
42
|
+
listPendingX402Fundings,
|
|
43
|
+
listPendingX402FundingsForChannel,
|
|
44
|
+
listResumableX402ExactFundings,
|
|
45
|
+
listResumableX402Fundings,
|
|
46
|
+
listX402Channels,
|
|
47
|
+
loadResumableX402ExactFunding,
|
|
48
|
+
loadResumableX402Funding,
|
|
49
|
+
recordPendingX402ExactFunding,
|
|
50
|
+
recordPendingX402Funding,
|
|
51
|
+
recordX402ChannelMetadata,
|
|
52
|
+
retirePendingX402Funding,
|
|
53
|
+
withX402ChannelLock,
|
|
54
|
+
x402ChannelBalanceUnreconciledAt,
|
|
55
|
+
x402ExactFundingDead,
|
|
56
|
+
x402PendingBlockExpiresAt,
|
|
57
|
+
x402PendingDepositExpiresAt,
|
|
58
|
+
x402PendingFundingJson,
|
|
59
|
+
x402PendingRetired,
|
|
60
|
+
x402PendingStale,
|
|
61
|
+
x402PendingUnsettled
|
|
62
|
+
};
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __dvmCreateRequire } from "node:module";
|
|
3
|
+
const require = __dvmCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
maxAdvertisedMicro,
|
|
6
|
+
withinAdvertisedTolerance
|
|
7
|
+
} from "./chunk-G3RLVJF5.js";
|
|
8
|
+
import {
|
|
9
|
+
costAnchor,
|
|
10
|
+
fetchBtcUsdRate,
|
|
11
|
+
formatStaleness,
|
|
12
|
+
formatUsd,
|
|
13
|
+
getLastKnownBtcRate,
|
|
14
|
+
msatsToUsdc,
|
|
15
|
+
usdcToMsats
|
|
16
|
+
} from "./chunk-ZELLQI7F.js";
|
|
17
|
+
import {
|
|
18
|
+
X402_V1_VERSION,
|
|
19
|
+
X402_VERSION,
|
|
20
|
+
buildPaymentRequirements,
|
|
21
|
+
chainIdFromCaip2,
|
|
22
|
+
encodePayment,
|
|
23
|
+
ensureAddress,
|
|
24
|
+
usdcContractFor,
|
|
25
|
+
usdcDomainNameFor,
|
|
26
|
+
usdcDomainVersionFor,
|
|
27
|
+
x402NetworkToCaip2
|
|
28
|
+
} from "./chunk-EY5K4BM3.js";
|
|
29
|
+
import {
|
|
30
|
+
x402NetworkByCaip2
|
|
31
|
+
} from "./chunk-MTBCEXJ6.js";
|
|
32
|
+
import {
|
|
33
|
+
X402_EXACT_AUTHORIZATION_TTL_SECONDS
|
|
34
|
+
} from "./chunk-3TBULV3F.js";
|
|
35
|
+
import {
|
|
36
|
+
info
|
|
37
|
+
} from "./chunk-6UGZAFIR.js";
|
|
38
|
+
import {
|
|
39
|
+
DvmError
|
|
40
|
+
} from "./chunk-U5TNSUYW.js";
|
|
41
|
+
|
|
42
|
+
// src/lib/btc-rate.ts
|
|
43
|
+
async function resolveBtcUsdRate(purpose) {
|
|
44
|
+
try {
|
|
45
|
+
return { rate: await fetchBtcUsdRate(), stale: false };
|
|
46
|
+
} catch {
|
|
47
|
+
const cached = getLastKnownBtcRate();
|
|
48
|
+
if (cached) {
|
|
49
|
+
warnStaleRate(cached.cachedAt);
|
|
50
|
+
return { rate: cached.rate, stale: true, cachedAt: cached.cachedAt };
|
|
51
|
+
}
|
|
52
|
+
throw rateUnavailable(purpose);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function tryResolveBtcUsdRate() {
|
|
56
|
+
try {
|
|
57
|
+
return await resolveBtcUsdRate("conversion");
|
|
58
|
+
} catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function staleRateNotice(resolved) {
|
|
63
|
+
if (!resolved?.stale || resolved.cachedAt === void 0) return void 0;
|
|
64
|
+
const age = formatStaleness(resolved.cachedAt);
|
|
65
|
+
return {
|
|
66
|
+
cached_at: new Date(resolved.cachedAt).toISOString(),
|
|
67
|
+
age,
|
|
68
|
+
display: `Priced with a BTC/USD rate cached ${age} \u2014 the rate provider is unreachable, so dollar figures may have drifted.`
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var warnedStale = false;
|
|
72
|
+
function warnStaleRate(cachedAt) {
|
|
73
|
+
if (warnedStale) return;
|
|
74
|
+
warnedStale = true;
|
|
75
|
+
info(
|
|
76
|
+
`Warning: the BTC/USD rate provider is unreachable \u2014 using the last rate this machine saw (cached ${formatStaleness(cachedAt)}). Dollar figures may have drifted.`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function rateUnavailable(purpose) {
|
|
80
|
+
const outcome = purpose === "payment" ? "nothing was paid" : "no conversion was performed";
|
|
81
|
+
const noun = purpose === "payment" ? "payment" : "conversion";
|
|
82
|
+
const capped = outcome.charAt(0).toUpperCase() + outcome.slice(1);
|
|
83
|
+
return new DvmError(
|
|
84
|
+
"rate_unavailable",
|
|
85
|
+
`Could not price this ${noun}: the BTC/USD rate provider is unreachable and no cached rate is available.`,
|
|
86
|
+
`${capped}. The rate provider (CoinGecko) is rate-limiting or down, and this machine has never cached a rate. Retry in a minute; if it keeps failing, check network access to api.coingecko.com.${purpose === "payment" ? " Budgets are denominated in dollars, so a payment cannot be authorised without a rate." : ""}`,
|
|
87
|
+
{
|
|
88
|
+
display: `BTC/USD rate unavailable \u2014 ${outcome}.`,
|
|
89
|
+
anchor: "rate_unavailable",
|
|
90
|
+
purpose,
|
|
91
|
+
provider: "coingecko",
|
|
92
|
+
retryable: true
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// src/lib/x402/client.ts
|
|
98
|
+
import { randomBytes } from "crypto";
|
|
99
|
+
async function tryX402Payment(request, wallet) {
|
|
100
|
+
const selection = selectPaymentRequirement(request);
|
|
101
|
+
let networkSlug;
|
|
102
|
+
let networkCaip2;
|
|
103
|
+
let chainId;
|
|
104
|
+
let usdc;
|
|
105
|
+
try {
|
|
106
|
+
networkCaip2 = x402NetworkToCaip2(selection.network);
|
|
107
|
+
const mapped = x402NetworkByCaip2(networkCaip2);
|
|
108
|
+
networkSlug = mapped?.slug ?? selection.network;
|
|
109
|
+
chainId = chainIdFromCaip2(networkCaip2);
|
|
110
|
+
usdc = usdcContractFor(networkSlug);
|
|
111
|
+
} catch (err) {
|
|
112
|
+
throw new DvmError(
|
|
113
|
+
"x402_build_failed",
|
|
114
|
+
`Could not resolve x402 network from '${selection.network}': ${err instanceof Error ? err.message : String(err)}`,
|
|
115
|
+
"Check that the DVM's advertised x402.network is a CAIP-2 chain id (e.g. 'eip155:8453' for Base)."
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
if (!usdc) return null;
|
|
119
|
+
const rate = await priceableRate(request.btcRate);
|
|
120
|
+
if (rate === null) return null;
|
|
121
|
+
const localUsdcMicro = BigInt(msatsToUsdc(request.amountMsats, rate));
|
|
122
|
+
const requiredUsdcMicro = resolveRequiredUsdcMicro(selection.amount, localUsdcMicro);
|
|
123
|
+
const signedAmountMsats = usdcToMsats(Number(requiredUsdcMicro) / 1e6, rate);
|
|
124
|
+
try {
|
|
125
|
+
const w = await ensureAddress(wallet);
|
|
126
|
+
const validAfter = 0n;
|
|
127
|
+
const validBefore = BigInt(
|
|
128
|
+
Math.floor(Date.now() / 1e3) + X402_EXACT_AUTHORIZATION_TTL_SECONDS
|
|
129
|
+
);
|
|
130
|
+
const nonce = request.nonce ?? `0x${randomBytes(32).toString("hex")}`;
|
|
131
|
+
const domainName = selectedDomainField(selection.accepted?.extra?.name, "name") ?? usdcDomainNameFor(networkSlug) ?? "USD Coin";
|
|
132
|
+
const domainVersion = selectedDomainField(selection.accepted?.extra?.version, "version") ?? usdcDomainVersionFor(networkSlug) ?? "2";
|
|
133
|
+
const { signTypedData } = await import("./accounts-S747UW3A.js");
|
|
134
|
+
const signature = await signTypedData({
|
|
135
|
+
privateKey: w.privateKey,
|
|
136
|
+
domain: {
|
|
137
|
+
name: domainName,
|
|
138
|
+
version: domainVersion,
|
|
139
|
+
chainId,
|
|
140
|
+
verifyingContract: usdc
|
|
141
|
+
},
|
|
142
|
+
types: {
|
|
143
|
+
TransferWithAuthorization: [
|
|
144
|
+
{ name: "from", type: "address" },
|
|
145
|
+
{ name: "to", type: "address" },
|
|
146
|
+
{ name: "value", type: "uint256" },
|
|
147
|
+
{ name: "validAfter", type: "uint256" },
|
|
148
|
+
{ name: "validBefore", type: "uint256" },
|
|
149
|
+
{ name: "nonce", type: "bytes32" }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
primaryType: "TransferWithAuthorization",
|
|
153
|
+
message: {
|
|
154
|
+
from: w.address,
|
|
155
|
+
to: selection.payTo,
|
|
156
|
+
value: requiredUsdcMicro,
|
|
157
|
+
validAfter,
|
|
158
|
+
validBefore,
|
|
159
|
+
nonce
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
const exactPayload = {
|
|
163
|
+
signature,
|
|
164
|
+
payload: {
|
|
165
|
+
authorization: {
|
|
166
|
+
from: w.address,
|
|
167
|
+
to: selection.payTo,
|
|
168
|
+
value: requiredUsdcMicro.toString(),
|
|
169
|
+
validAfter: validAfter.toString(),
|
|
170
|
+
validBefore: validBefore.toString(),
|
|
171
|
+
nonce
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const payload = selection.version === X402_V1_VERSION ? {
|
|
176
|
+
x402Version: X402_V1_VERSION,
|
|
177
|
+
scheme: "exact",
|
|
178
|
+
network: networkSlug,
|
|
179
|
+
payload: { signature: exactPayload.signature, ...exactPayload.payload }
|
|
180
|
+
} : {
|
|
181
|
+
x402Version: X402_VERSION,
|
|
182
|
+
...selection.resource ? { resource: selection.resource } : {},
|
|
183
|
+
accepted: selection.accepted ?? buildPaymentRequirements({
|
|
184
|
+
x402Config: {
|
|
185
|
+
payTo: selection.payTo,
|
|
186
|
+
network: networkCaip2,
|
|
187
|
+
...selection.asset ? { asset: selection.asset } : {}
|
|
188
|
+
},
|
|
189
|
+
requiredUsdcMicro,
|
|
190
|
+
resource: selection.resource?.url ?? "",
|
|
191
|
+
version: X402_VERSION
|
|
192
|
+
}),
|
|
193
|
+
payload: { signature: exactPayload.signature, ...exactPayload.payload },
|
|
194
|
+
extensions: selection.extensions ?? {}
|
|
195
|
+
};
|
|
196
|
+
return {
|
|
197
|
+
paymentHeader: encodePayment(payload),
|
|
198
|
+
x402Version: selection.version,
|
|
199
|
+
amountUsdcMicro: requiredUsdcMicro.toString(),
|
|
200
|
+
amountMsats: signedAmountMsats,
|
|
201
|
+
btcRate: rate
|
|
202
|
+
};
|
|
203
|
+
} catch (err) {
|
|
204
|
+
throw new DvmError(
|
|
205
|
+
"x402_build_failed",
|
|
206
|
+
`Failed to build x402 payment: ${err instanceof Error ? err.message : String(err)}`,
|
|
207
|
+
"Check the configured x402 private key and RPC reachability for the target chain."
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function isSignableExactRequirement(requirement) {
|
|
212
|
+
const transferMethod = requirement.extra?.assetTransferMethod;
|
|
213
|
+
return requirement.scheme === "exact" && (transferMethod === void 0 || transferMethod === "eip3009");
|
|
214
|
+
}
|
|
215
|
+
function selectPaymentRequirement(request) {
|
|
216
|
+
const challenge = request.paymentRequired;
|
|
217
|
+
if (challenge?.x402Version === X402_VERSION) {
|
|
218
|
+
const accepted = challenge.accepts.find(isSignableExactRequirement);
|
|
219
|
+
if (!accepted) {
|
|
220
|
+
throw invalidChallenge("The DVM's v2 x402 challenge has no exact EIP-3009 requirement.");
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
version: X402_VERSION,
|
|
224
|
+
network: accepted.network,
|
|
225
|
+
amount: accepted.amount,
|
|
226
|
+
payTo: accepted.payTo,
|
|
227
|
+
asset: accepted.asset,
|
|
228
|
+
accepted,
|
|
229
|
+
resource: challenge.resource,
|
|
230
|
+
extensions: challenge.extensions
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
if (challenge?.x402Version === X402_V1_VERSION) {
|
|
234
|
+
const accepted = challenge.accepts.find((candidate) => candidate.scheme === "exact");
|
|
235
|
+
if (!accepted) throw invalidChallenge("The DVM's v1 x402 challenge has no exact requirement.");
|
|
236
|
+
return {
|
|
237
|
+
version: X402_V1_VERSION,
|
|
238
|
+
network: accepted.network,
|
|
239
|
+
amount: accepted.maxAmountRequired,
|
|
240
|
+
payTo: accepted.payTo,
|
|
241
|
+
asset: accepted.asset
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
version: request.x402Version ?? X402_V1_VERSION,
|
|
246
|
+
network: request.network,
|
|
247
|
+
amount: request.requiredUsdcMicro,
|
|
248
|
+
payTo: request.payTo,
|
|
249
|
+
asset: request.asset,
|
|
250
|
+
resource: request.resource
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function invalidChallenge(message) {
|
|
254
|
+
return new DvmError(
|
|
255
|
+
"x402_build_failed",
|
|
256
|
+
message,
|
|
257
|
+
"Ask the DVM operator to advertise an exact x402 payment requirement."
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function selectedDomainField(value, field) {
|
|
261
|
+
if (value === void 0 || value === null) return void 0;
|
|
262
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
263
|
+
throw invalidChallenge(`The DVM advertised an invalid x402 ${field}.`);
|
|
264
|
+
}
|
|
265
|
+
function resolveRequiredUsdcMicro(advertised, localUsdcMicro) {
|
|
266
|
+
if (advertised === void 0) return localUsdcMicro;
|
|
267
|
+
if (!/^[1-9]\d*$/.test(advertised)) {
|
|
268
|
+
throw new DvmError(
|
|
269
|
+
"x402_amount_invalid",
|
|
270
|
+
`The DVM advertised an invalid x402 maxAmountRequired: '${advertised}'.`,
|
|
271
|
+
"Do not sign this payment. Ask the DVM operator to return a positive integer number of USDC micro-units."
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
const required = BigInt(advertised);
|
|
275
|
+
if (withinAdvertisedTolerance(required, localUsdcMicro)) return required;
|
|
276
|
+
const advertisedUsd = Number(required) / 1e6;
|
|
277
|
+
const localUsd = Number(localUsdcMicro) / 1e6;
|
|
278
|
+
throw new DvmError(
|
|
279
|
+
"x402_amount_exceeds_limit",
|
|
280
|
+
`The DVM's x402 charge ($${formatUsd(advertisedUsd)} USDC) is more than 10% above the caller's local price ($${formatUsd(localUsd)} USDC).`,
|
|
281
|
+
"The payment was not signed. Refresh the quote or ask the DVM operator to check its BTC/USD rate.",
|
|
282
|
+
{
|
|
283
|
+
advertised_usdc_microunits: required.toString(),
|
|
284
|
+
local_usdc_microunits: localUsdcMicro.toString(),
|
|
285
|
+
max_usdc_microunits: maxAdvertisedMicro(localUsdcMicro).toString(),
|
|
286
|
+
anchor: costAnchor(advertisedUsd),
|
|
287
|
+
display: `Payment refused: $${formatUsd(advertisedUsd)} USDC exceeds the 10% safety margin over the caller's $${formatUsd(localUsd)} USDC estimate.`
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
async function priceableRate(btcRate) {
|
|
292
|
+
if (btcRate && btcRate > 0) return btcRate;
|
|
293
|
+
try {
|
|
294
|
+
return (await resolveBtcUsdRate("payment")).rate;
|
|
295
|
+
} catch (err) {
|
|
296
|
+
if (err instanceof DvmError && err.code === "rate_unavailable") {
|
|
297
|
+
info(
|
|
298
|
+
"Skipping the x402 rail: it prices in USDC and the BTC/USD rate is unavailable (no cached rate on this machine). Trying the remaining rails."
|
|
299
|
+
);
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
throw err;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export {
|
|
307
|
+
resolveBtcUsdRate,
|
|
308
|
+
tryResolveBtcUsdRate,
|
|
309
|
+
staleRateNotice,
|
|
310
|
+
tryX402Payment,
|
|
311
|
+
isSignableExactRequirement
|
|
312
|
+
};
|