@haven_ai/sdk 0.0.0-dev.202609250737.3bd5a51 → 0.0.0-dev.202609251409.98ed67a
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/{base64-Bw0qBf6v.d.cts → base64-Dm78eUFX.d.cts} +51 -1
- package/dist/{base64-Bw0qBf6v.d.ts → base64-Dm78eUFX.d.ts} +51 -1
- package/dist/{chunk-KQ757ZWS.js → chunk-AVKWY6JC.js} +2 -2
- package/dist/chunk-AVKWY6JC.js.map +1 -0
- package/dist/{chunk-C4BG4HER.cjs → chunk-MRPENBYE.cjs} +2 -2
- package/dist/chunk-MRPENBYE.cjs.map +1 -0
- package/dist/{chunk-XKGZLATE.cjs → chunk-NQ7EEHIV.cjs} +45 -16
- package/dist/chunk-NQ7EEHIV.cjs.map +1 -0
- package/dist/{chunk-5C4GDDG2.js → chunk-UVC2VUU7.js} +28 -4
- package/dist/chunk-UVC2VUU7.js.map +1 -0
- package/dist/edge.cjs +66 -54
- package/dist/edge.d.cts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +3 -3
- package/dist/index.cjs +329 -270
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +45 -6
- package/dist/index.js.map +1 -1
- package/dist/test-support.cjs +18 -18
- package/dist/test-support.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5C4GDDG2.js.map +0 -1
- package/dist/chunk-C4BG4HER.cjs.map +0 -1
- package/dist/chunk-KQ757ZWS.js.map +0 -1
- package/dist/chunk-XKGZLATE.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkNQ7EEHIV_cjs = require('./chunk-NQ7EEHIV.cjs');
|
|
4
|
+
var chunkMRPENBYE_cjs = require('./chunk-MRPENBYE.cjs');
|
|
5
5
|
var viem = require('viem');
|
|
6
6
|
var ethers = require('ethers');
|
|
7
7
|
var async_hooks = require('async_hooks');
|
|
@@ -14,7 +14,7 @@ function signHash(privateKey, hash) {
|
|
|
14
14
|
const sig = signingKey.sign(hash);
|
|
15
15
|
return sig.serialized;
|
|
16
16
|
} catch (err) {
|
|
17
|
-
throw new
|
|
17
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
18
18
|
`Failed to sign hash: ${err instanceof Error ? err.message : String(err)}`
|
|
19
19
|
);
|
|
20
20
|
}
|
|
@@ -30,7 +30,7 @@ async function signTypedDataVerbatim(privateKey, typedData, label) {
|
|
|
30
30
|
typedData.message
|
|
31
31
|
);
|
|
32
32
|
} catch (err) {
|
|
33
|
-
throw new
|
|
33
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
34
34
|
`Failed to sign ${label}: ${err instanceof Error ? err.message : String(err)}`
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -45,7 +45,7 @@ function addressFromKey(privateKey) {
|
|
|
45
45
|
try {
|
|
46
46
|
return new ethers.ethers.Wallet(privateKey).address;
|
|
47
47
|
} catch (err) {
|
|
48
|
-
throw new
|
|
48
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
49
49
|
`Invalid private key: ${err instanceof Error ? err.message : String(err)}`
|
|
50
50
|
);
|
|
51
51
|
}
|
|
@@ -60,17 +60,41 @@ function verifySignature(hash, signature, expectedAddress) {
|
|
|
60
60
|
}
|
|
61
61
|
var DEFAULT_BASE_URL = "http://localhost:3001";
|
|
62
62
|
var DEFAULT_REQUEST_TIMEOUT = 3e4;
|
|
63
|
+
function withoutClientHeader(headers) {
|
|
64
|
+
const target = chunkNQ7EEHIV_cjs.HAVEN_CLIENT_HEADER.toLowerCase();
|
|
65
|
+
return Object.fromEntries(Object.entries(headers).filter(([name]) => name.toLowerCase() !== target));
|
|
66
|
+
}
|
|
63
67
|
var HavenApiTransport = class {
|
|
64
68
|
apiKey;
|
|
65
69
|
baseUrl;
|
|
66
70
|
requestTimeout;
|
|
67
71
|
defaultHeaders;
|
|
72
|
+
clientIdentity;
|
|
68
73
|
requestContext = new async_hooks.AsyncLocalStorage();
|
|
74
|
+
lastClientUpdate;
|
|
69
75
|
constructor(config) {
|
|
70
76
|
this.apiKey = config.apiKey;
|
|
71
77
|
this.baseUrl = (config.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
72
78
|
this.requestTimeout = config.requestTimeout ?? DEFAULT_REQUEST_TIMEOUT;
|
|
73
79
|
this.defaultHeaders = { ...config.defaultHeaders ?? {} };
|
|
80
|
+
this.clientIdentity = config.clientIdentity ?? chunkNQ7EEHIV_cjs.SDK_CLIENT_IDENTITY;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The newest `client_update` the backend sent (#3303): inside a
|
|
84
|
+
* `withRequestContext` dispatch, the one that dispatch's own requests
|
|
85
|
+
* received; outside one, the latest this transport has seen.
|
|
86
|
+
*/
|
|
87
|
+
clientUpdate() {
|
|
88
|
+
const store = this.requestContext.getStore();
|
|
89
|
+
return store ? store.clientUpdate : this.lastClientUpdate;
|
|
90
|
+
}
|
|
91
|
+
recordClientUpdate(data) {
|
|
92
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) return;
|
|
93
|
+
const hint = chunkNQ7EEHIV_cjs.readClientUpdate(data.client_update);
|
|
94
|
+
if (!hint) return;
|
|
95
|
+
this.lastClientUpdate = hint;
|
|
96
|
+
const store = this.requestContext.getStore();
|
|
97
|
+
if (store) store.clientUpdate = hint;
|
|
74
98
|
}
|
|
75
99
|
/** Run `fn` with extra headers scoped to its asynchronous Haven API work. */
|
|
76
100
|
withRequestContext(headers, fn) {
|
|
@@ -93,28 +117,34 @@ var HavenApiTransport = class {
|
|
|
93
117
|
headers: {
|
|
94
118
|
"Content-Type": "application/json",
|
|
95
119
|
"Authorization": `Bearer ${this.apiKey}`,
|
|
96
|
-
...this.defaultHeaders,
|
|
97
|
-
...contextHeaders
|
|
120
|
+
...withoutClientHeader(this.defaultHeaders),
|
|
121
|
+
...withoutClientHeader(contextHeaders),
|
|
122
|
+
// Last, and any other spelling of it dropped above (fetch would
|
|
123
|
+
// JOIN `x-haven-client` and `X-Haven-Client` into one unparseable
|
|
124
|
+
// value), so neither `defaultHeaders` nor a dispatch context can
|
|
125
|
+
// misname the client; `clientIdentity` is the one way to set it.
|
|
126
|
+
[chunkNQ7EEHIV_cjs.HAVEN_CLIENT_HEADER]: this.clientIdentity
|
|
98
127
|
},
|
|
99
128
|
body: body ? JSON.stringify(body) : void 0,
|
|
100
129
|
signal: controller.signal
|
|
101
130
|
});
|
|
102
131
|
const data = await res.json();
|
|
132
|
+
this.recordClientUpdate(data);
|
|
103
133
|
if (!res.ok) {
|
|
104
134
|
const record = data;
|
|
105
135
|
const errorText = typeof record.error === "string" ? record.error : void 0;
|
|
106
136
|
const rawDetails = record.details ?? record.detail;
|
|
107
137
|
const detailsText = typeof rawDetails === "string" ? rawDetails : rawDetails != null ? JSON.stringify(rawDetails) : void 0;
|
|
108
138
|
const message = errorText && detailsText ? `${errorText}: ${detailsText}` : errorText ?? detailsText ?? "API request failed";
|
|
109
|
-
throw new
|
|
139
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(message, res.status, data);
|
|
110
140
|
}
|
|
111
141
|
return data;
|
|
112
142
|
} catch (err) {
|
|
113
|
-
if (err instanceof
|
|
143
|
+
if (err instanceof chunkMRPENBYE_cjs.HavenApiError) throw err;
|
|
114
144
|
if (err instanceof Error && err.name === "AbortError") {
|
|
115
|
-
throw new
|
|
145
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(`Request to ${path} timed out`, 408);
|
|
116
146
|
}
|
|
117
|
-
throw new
|
|
147
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
118
148
|
`Request to ${path} failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
119
149
|
0
|
|
120
150
|
);
|
|
@@ -261,29 +291,29 @@ function paymentStateStatusCode(status, fallback = 502) {
|
|
|
261
291
|
return PAYMENT_STATE_STATUS_CODES[status] ?? fallback;
|
|
262
292
|
}
|
|
263
293
|
function phaseForStatus(status) {
|
|
264
|
-
if (status === "pending_signature") return
|
|
265
|
-
if (status === "submitted") return
|
|
266
|
-
if (status === "confirmed") return
|
|
267
|
-
if (status === "pending" || status === "pending_approval") return
|
|
268
|
-
if (status === "approved") return
|
|
269
|
-
if (status === "proposed") return
|
|
270
|
-
if (status === "executed") return
|
|
271
|
-
if (status === "rejected") return
|
|
272
|
-
if (status === "expired") return
|
|
273
|
-
if (status === "failed") return
|
|
294
|
+
if (status === "pending_signature") return chunkMRPENBYE_cjs.AgentPaymentPhase.AgentSignatureRequired;
|
|
295
|
+
if (status === "submitted") return chunkMRPENBYE_cjs.AgentPaymentPhase.PaymentSubmitted;
|
|
296
|
+
if (status === "confirmed") return chunkMRPENBYE_cjs.AgentPaymentPhase.PaymentConfirmed;
|
|
297
|
+
if (status === "pending" || status === "pending_approval") return chunkMRPENBYE_cjs.AgentPaymentPhase.UserApprovalRequired;
|
|
298
|
+
if (status === "approved") return chunkMRPENBYE_cjs.AgentPaymentPhase.UserExecutionRequired;
|
|
299
|
+
if (status === "proposed") return chunkMRPENBYE_cjs.AgentPaymentPhase.WaitingForAdditionalApprovals;
|
|
300
|
+
if (status === "executed") return chunkMRPENBYE_cjs.AgentPaymentPhase.FundingSent;
|
|
301
|
+
if (status === "rejected") return chunkMRPENBYE_cjs.AgentPaymentPhase.Rejected;
|
|
302
|
+
if (status === "expired") return chunkMRPENBYE_cjs.AgentPaymentPhase.Expired;
|
|
303
|
+
if (status === "failed") return chunkMRPENBYE_cjs.AgentPaymentPhase.Failed;
|
|
274
304
|
return null;
|
|
275
305
|
}
|
|
276
306
|
function nextActionForStatus(status) {
|
|
277
|
-
if (status === "pending_signature") return
|
|
278
|
-
if (status === "submitted") return
|
|
279
|
-
if (status === "confirmed") return
|
|
280
|
-
if (status === "pending" || status === "pending_approval") return
|
|
281
|
-
if (status === "approved") return
|
|
282
|
-
if (status === "proposed") return
|
|
283
|
-
if (status === "executed") return
|
|
284
|
-
if (status === "rejected") return
|
|
285
|
-
if (status === "expired") return
|
|
286
|
-
if (status === "failed") return
|
|
307
|
+
if (status === "pending_signature") return chunkMRPENBYE_cjs.AgentPaymentNextAction.SignAndSubmitPayment;
|
|
308
|
+
if (status === "submitted") return chunkMRPENBYE_cjs.AgentPaymentNextAction.CheckStatusLater;
|
|
309
|
+
if (status === "confirmed") return chunkMRPENBYE_cjs.AgentPaymentNextAction.None;
|
|
310
|
+
if (status === "pending" || status === "pending_approval") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
311
|
+
if (status === "approved") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
312
|
+
if (status === "proposed") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
313
|
+
if (status === "executed") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
314
|
+
if (status === "rejected") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
315
|
+
if (status === "expired") return chunkMRPENBYE_cjs.AgentPaymentNextAction.RequestAgainIfUserStillWantsIt;
|
|
316
|
+
if (status === "failed") return chunkMRPENBYE_cjs.AgentPaymentNextAction.StopAndTellUser;
|
|
287
317
|
return null;
|
|
288
318
|
}
|
|
289
319
|
function messageForState(label, status, paymentId, nextAction) {
|
|
@@ -357,17 +387,17 @@ function throwPaymentStateError(label, raw) {
|
|
|
357
387
|
const statusCode = paymentStateStatusCode(raw.status);
|
|
358
388
|
const state = paymentStateFromRaw(label, raw);
|
|
359
389
|
if (state) {
|
|
360
|
-
throw new
|
|
390
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(state.message, statusCode, state, raw);
|
|
361
391
|
}
|
|
362
392
|
if (raw.status === "pending_approval") {
|
|
363
|
-
throw new
|
|
393
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
364
394
|
`${label} exceeds the agent's on-chain budget and was declined; no approval is pending and none will arrive (payment_id: ${raw.payment_id}).`,
|
|
365
395
|
statusCode,
|
|
366
396
|
raw
|
|
367
397
|
);
|
|
368
398
|
}
|
|
369
399
|
if (raw.status === "expired") {
|
|
370
|
-
throw new
|
|
400
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
371
401
|
`${label} expired before it could be completed (payment_id: ${raw.payment_id}).`,
|
|
372
402
|
statusCode,
|
|
373
403
|
raw
|
|
@@ -375,7 +405,7 @@ function throwPaymentStateError(label, raw) {
|
|
|
375
405
|
}
|
|
376
406
|
const paymentId = raw.payment_id ? ` (payment_id: ${raw.payment_id})` : "";
|
|
377
407
|
const message = raw.error ?? `${label} ${raw.status}${paymentId}`;
|
|
378
|
-
throw new
|
|
408
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(message, statusCode, raw);
|
|
379
409
|
}
|
|
380
410
|
|
|
381
411
|
// src/x402-retry-target.ts
|
|
@@ -407,7 +437,7 @@ function isSecureX402RetryTarget(url) {
|
|
|
407
437
|
return RESERVED_SUFFIXES.some((suffix) => host.endsWith(suffix));
|
|
408
438
|
}
|
|
409
439
|
var INSECURE_RETRY_TARGET_CODE = "INSECURE_RETRY_TARGET";
|
|
410
|
-
var HavenInsecureRetryTargetError = class extends
|
|
440
|
+
var HavenInsecureRetryTargetError = class extends chunkMRPENBYE_cjs.HavenError {
|
|
411
441
|
constructor(url) {
|
|
412
442
|
super(
|
|
413
443
|
`Refusing to send a payment header to ${url}: the paid x402 retry must go to an https URL (or a loopback / reserved test host). The merchant's challenge declared this resource URL; retry with the https URL you quoted (pass it as \`url\`), and report a merchant whose challenge downgrades the scheme.`,
|
|
@@ -449,7 +479,7 @@ var McpMerchantTransport = class {
|
|
|
449
479
|
return await this.fetchImpl(url, { ...init, signal });
|
|
450
480
|
} catch (err) {
|
|
451
481
|
if (timeoutSignal.aborted) {
|
|
452
|
-
throw new
|
|
482
|
+
throw new chunkMRPENBYE_cjs.MerchantTimeoutError(`Merchant request timed out after ${timeoutMs}ms: ${url}`);
|
|
453
483
|
}
|
|
454
484
|
throw err;
|
|
455
485
|
}
|
|
@@ -586,8 +616,8 @@ var McpMerchantTransport = class {
|
|
|
586
616
|
async deliverPayment(url, init, paymentHeader) {
|
|
587
617
|
assertSecureX402RetryTarget(url);
|
|
588
618
|
const headers = new Headers(init?.headers);
|
|
589
|
-
const send =
|
|
590
|
-
for (const name of
|
|
619
|
+
const send = chunkNQ7EEHIV_cjs.x402PaymentHeaderNamesFor(paymentHeader);
|
|
620
|
+
for (const name of chunkNQ7EEHIV_cjs.X402_PAYMENT_HEADER_NAMES) {
|
|
591
621
|
if (send.includes(name)) headers.set(name, paymentHeader);
|
|
592
622
|
else headers.delete(name);
|
|
593
623
|
}
|
|
@@ -674,7 +704,7 @@ function mcpToolResultOf(value) {
|
|
|
674
704
|
function extractMcpPaymentRequired(toolResult) {
|
|
675
705
|
if (toolResult.isError !== true) return void 0;
|
|
676
706
|
if (isRecord(toolResult.structuredContent)) {
|
|
677
|
-
const parsed =
|
|
707
|
+
const parsed = chunkNQ7EEHIV_cjs.normalizePaymentRequired(toolResult.structuredContent);
|
|
678
708
|
if (parsed) return parsed;
|
|
679
709
|
}
|
|
680
710
|
if (Array.isArray(toolResult.content)) {
|
|
@@ -686,7 +716,7 @@ function extractMcpPaymentRequired(toolResult) {
|
|
|
686
716
|
} catch {
|
|
687
717
|
continue;
|
|
688
718
|
}
|
|
689
|
-
const parsed =
|
|
719
|
+
const parsed = chunkNQ7EEHIV_cjs.normalizePaymentRequired(candidate);
|
|
690
720
|
if (parsed) return parsed;
|
|
691
721
|
}
|
|
692
722
|
}
|
|
@@ -710,7 +740,7 @@ function withMcpPaymentMeta(init, paymentHeader) {
|
|
|
710
740
|
if (!request) return init;
|
|
711
741
|
let envelope;
|
|
712
742
|
try {
|
|
713
|
-
envelope =
|
|
743
|
+
envelope = chunkNQ7EEHIV_cjs.decodeBase64Json(paymentHeader);
|
|
714
744
|
} catch {
|
|
715
745
|
return init;
|
|
716
746
|
}
|
|
@@ -726,7 +756,7 @@ function withMcpPaymentMeta(init, paymentHeader) {
|
|
|
726
756
|
};
|
|
727
757
|
}
|
|
728
758
|
function encodeMcpSettlementReceipt(settlement) {
|
|
729
|
-
return
|
|
759
|
+
return chunkNQ7EEHIV_cjs.encodeBase64Json(settlement);
|
|
730
760
|
}
|
|
731
761
|
function parseJsonRpcToolsCall(body) {
|
|
732
762
|
if (typeof body !== "string") return void 0;
|
|
@@ -850,7 +880,7 @@ function deriveReadiness(status, allowances) {
|
|
|
850
880
|
return allowances.some((allowance) => safeBigInt(allowance.remainingAtomic) > 0n) ? "ready" : "needs_approval";
|
|
851
881
|
}
|
|
852
882
|
function formatRemainingDisplay(tokenAddress, tokenSymbol, remainingAtomic) {
|
|
853
|
-
const token =
|
|
883
|
+
const token = chunkNQ7EEHIV_cjs.resolveTokenFromAddress(tokenAddress);
|
|
854
884
|
return token ? `${formatAtomicAmount(safeBigInt(remainingAtomic), token.decimals)} ${tokenSymbol}` : `${remainingAtomic} ${tokenSymbol} (atomic; unknown decimals)`;
|
|
855
885
|
}
|
|
856
886
|
var AccountReads = class {
|
|
@@ -954,7 +984,7 @@ var AccountReads = class {
|
|
|
954
984
|
payment: payment2,
|
|
955
985
|
allowance: null,
|
|
956
986
|
warnings: [{
|
|
957
|
-
code:
|
|
987
|
+
code: chunkMRPENBYE_cjs.AgentPaymentWarningCode.AllowanceCheckUnavailable,
|
|
958
988
|
message: `Could not read the post-purchase allowance/budget for payment ${paymentId} (${detail}). The payment itself succeeded \u2014 the on-chain policy remains the actual spend gate; this only affects the remaining-budget figure reported here.`
|
|
959
989
|
}]
|
|
960
990
|
});
|
|
@@ -980,7 +1010,7 @@ var AccountReads = class {
|
|
|
980
1010
|
(allowance) => allowance.tokenAddress.toLowerCase() === tokenAddress.toLowerCase()
|
|
981
1011
|
);
|
|
982
1012
|
if (!match) return unavailable("no allowance/budget row matches the settled token", payment);
|
|
983
|
-
const token =
|
|
1013
|
+
const token = chunkNQ7EEHIV_cjs.resolveTokenFromAddress(match.tokenAddress);
|
|
984
1014
|
const remainingDisplay = token ? `${formatAtomicAmount(safeBigInt(match.onchain.remaining), token.decimals)} ${match.tokenSymbol}` : void 0;
|
|
985
1015
|
const rail = agentResult.value.executionRail;
|
|
986
1016
|
return {
|
|
@@ -1055,7 +1085,7 @@ function isWaitTimeout(err) {
|
|
|
1055
1085
|
async function waitForSweepTx(tx) {
|
|
1056
1086
|
let receipt;
|
|
1057
1087
|
try {
|
|
1058
|
-
receipt = await tx.wait(1,
|
|
1088
|
+
receipt = await tx.wait(1, chunkMRPENBYE_cjs.DEFAULT_CONFIRMATION_TIMEOUT_MS);
|
|
1059
1089
|
} catch (err) {
|
|
1060
1090
|
if (!isWaitTimeout(err)) throw err;
|
|
1061
1091
|
return { txHash: tx.hash, confirmation: "unconfirmed" };
|
|
@@ -1069,16 +1099,16 @@ var DelegateSweepApi = class {
|
|
|
1069
1099
|
}
|
|
1070
1100
|
options;
|
|
1071
1101
|
async sweepDelegate() {
|
|
1072
|
-
if (!this.options.delegateKey) throw new
|
|
1102
|
+
if (!this.options.delegateKey) throw new chunkMRPENBYE_cjs.HavenSigningError("delegateKey is required for sweepDelegate.");
|
|
1073
1103
|
const agent = await this.options.getAgent();
|
|
1074
|
-
if (!agent.delegateAddress) throw new
|
|
1104
|
+
if (!agent.delegateAddress) throw new chunkMRPENBYE_cjs.HavenApiError("Agent has no delegate address.", 422);
|
|
1075
1105
|
const rpcUrl = this.options.chainRpcs[agent.chainId];
|
|
1076
|
-
if (!rpcUrl) throw new
|
|
1106
|
+
if (!rpcUrl) throw new chunkMRPENBYE_cjs.HavenApiError(`chainRpcs[${agent.chainId}] must be configured to sweep the delegate wallet.`, 422);
|
|
1077
1107
|
const provider = createJsonRpcProvider(rpcUrl);
|
|
1078
1108
|
const wallet = createWallet(this.options.delegateKey, provider);
|
|
1079
1109
|
const transfers = [];
|
|
1080
|
-
if (
|
|
1081
|
-
const contract = createErc20Contract(
|
|
1110
|
+
if (chunkNQ7EEHIV_cjs.isSweepableChain(agent.chainId)) {
|
|
1111
|
+
const contract = createErc20Contract(chunkNQ7EEHIV_cjs.sweepUsdcAddress(agent.chainId), ["function balanceOf(address) view returns (uint256)", "function transfer(address to, uint256 amount) returns (bool)"], wallet);
|
|
1082
1112
|
const balance2 = await contract.balanceOf(agent.delegateAddress);
|
|
1083
1113
|
if (balance2 > 0n) {
|
|
1084
1114
|
const tx = await contract.transfer(agent.accountAddress, balance2);
|
|
@@ -1166,7 +1196,7 @@ function snapshotRequestBody(body) {
|
|
|
1166
1196
|
if (body == null) return void 0;
|
|
1167
1197
|
if (typeof body === "string") return body;
|
|
1168
1198
|
if (body instanceof URLSearchParams) return body.toString();
|
|
1169
|
-
throw new
|
|
1199
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1170
1200
|
"Quote helpers can only capture resumable request bodies that are strings or URLSearchParams. For streams, blobs, or binary bodies, preserve the original request yourself and call the matching resume method with fresh init.",
|
|
1171
1201
|
400
|
|
1172
1202
|
);
|
|
@@ -1187,25 +1217,25 @@ function requestInitFromSnapshot(request) {
|
|
|
1187
1217
|
};
|
|
1188
1218
|
}
|
|
1189
1219
|
function noCompatiblePaymentOptionError(accepts) {
|
|
1190
|
-
const erc7710Only =
|
|
1220
|
+
const erc7710Only = chunkNQ7EEHIV_cjs.selectErc7710PaymentOption(accepts) !== null;
|
|
1191
1221
|
const unsupportedOnly = !erc7710Only && accepts.some(
|
|
1192
|
-
(opt) => opt !== null && typeof opt === "object" && !
|
|
1222
|
+
(opt) => opt !== null && typeof opt === "object" && !chunkNQ7EEHIV_cjs.isErc7710Option(opt) && (chunkNQ7EEHIV_cjs.x402AssetTransferMethod(opt) !== null || opt.extra?.paymentFlow !== void 0)
|
|
1193
1223
|
);
|
|
1194
|
-
return new
|
|
1224
|
+
return new chunkMRPENBYE_cjs.HavenApiError(
|
|
1195
1225
|
"No compatible payment option found in x402 requirements. Haven supports standard x402 exact payments on Base USDC." + (erc7710Only ? " The only Haven-compatible option this merchant advertises is tagged extra.assetTransferMethod: 'erc7710' (direct settlement), which this EIP-3009 payment path cannot settle \u2014 the limitation is the settlement scheme, not the asset. Paying this merchant requires a delegation-rail erc7710 flow (settleX402Erc7710, or the hosted MCP purchase tools)." : unsupportedOnly ? " Every option this merchant advertises asks for a transfer method or payment flow Haven cannot construct (for example extra.assetTransferMethod: 'permit2', or an unrecognized extra.paymentFlow). No payment intent was created and no funds moved." : ""),
|
|
1196
1226
|
400
|
|
1197
1227
|
);
|
|
1198
1228
|
}
|
|
1199
1229
|
function buildX402Quote(paymentRequired, request, idempotencyKey, mcpTransport) {
|
|
1200
|
-
const standard =
|
|
1201
|
-
const option = standard ??
|
|
1230
|
+
const standard = chunkNQ7EEHIV_cjs.selectStandardPaymentOption(paymentRequired.accepts);
|
|
1231
|
+
const option = standard ?? chunkNQ7EEHIV_cjs.selectErc7710PaymentOption(paymentRequired.accepts);
|
|
1202
1232
|
if (!option) {
|
|
1203
1233
|
throw noCompatiblePaymentOptionError(paymentRequired.accepts);
|
|
1204
1234
|
}
|
|
1205
|
-
const token =
|
|
1235
|
+
const token = chunkNQ7EEHIV_cjs.resolveTokenFromAddress(option.asset, option.network);
|
|
1206
1236
|
return {
|
|
1207
1237
|
rail: "x402",
|
|
1208
|
-
idempotencyKey: idempotencyKey ??
|
|
1238
|
+
idempotencyKey: idempotencyKey ?? chunkNQ7EEHIV_cjs.buildX402IdempotencyKey(paymentRequired, option),
|
|
1209
1239
|
paymentRequired,
|
|
1210
1240
|
accepted: option,
|
|
1211
1241
|
acceptedScheme: standard ? "standard" : "erc7710",
|
|
@@ -1219,8 +1249,8 @@ function buildX402Quote(paymentRequired, request, idempotencyKey, mcpTransport)
|
|
|
1219
1249
|
resourceUrlDiffersFromRequest: paymentRequired.resource.url !== request.url,
|
|
1220
1250
|
description: paymentRequired.resource.description ?? option.description ?? null,
|
|
1221
1251
|
mimeType: paymentRequired.resource.mimeType ?? option.mimeType ?? null,
|
|
1222
|
-
amountAtomic:
|
|
1223
|
-
amount: decimalFromUsdcAtomic(
|
|
1252
|
+
amountAtomic: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option),
|
|
1253
|
+
amount: decimalFromUsdcAtomic(chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option)),
|
|
1224
1254
|
token: token?.symbol ?? "USDC",
|
|
1225
1255
|
// #1351: null when the asset is unrecognised on this network — the
|
|
1226
1256
|
// `token` fallback above is a LABEL, not evidence of 6 decimals, and a
|
|
@@ -1259,7 +1289,7 @@ function buildX402Receipt(input) {
|
|
|
1259
1289
|
payTo: input.merchantTo ?? input.accepted.payTo
|
|
1260
1290
|
},
|
|
1261
1291
|
x402: {
|
|
1262
|
-
amount:
|
|
1292
|
+
amount: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(input.accepted),
|
|
1263
1293
|
token: input.token,
|
|
1264
1294
|
network: input.accepted.network,
|
|
1265
1295
|
asset: input.accepted.asset,
|
|
@@ -1268,7 +1298,7 @@ function buildX402Receipt(input) {
|
|
|
1268
1298
|
};
|
|
1269
1299
|
}
|
|
1270
1300
|
function buildX402ResumeState(input) {
|
|
1271
|
-
const token =
|
|
1301
|
+
const token = chunkNQ7EEHIV_cjs.resolveTokenFromAddress(input.accepted.asset, input.accepted.network);
|
|
1272
1302
|
return {
|
|
1273
1303
|
rail: "x402",
|
|
1274
1304
|
paymentId: input.paymentId,
|
|
@@ -1279,8 +1309,8 @@ function buildX402ResumeState(input) {
|
|
|
1279
1309
|
request: input.request,
|
|
1280
1310
|
resourceUrl: input.paymentRequired.resource.url,
|
|
1281
1311
|
description: input.paymentRequired.resource.description ?? input.accepted.description ?? null,
|
|
1282
|
-
amountAtomic:
|
|
1283
|
-
amount: decimalFromUsdcAtomic(
|
|
1312
|
+
amountAtomic: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(input.accepted),
|
|
1313
|
+
amount: decimalFromUsdcAtomic(chunkNQ7EEHIV_cjs.x402AuthorizationAmount(input.accepted)),
|
|
1284
1314
|
token: token?.symbol ?? "USDC",
|
|
1285
1315
|
asset: input.accepted.asset,
|
|
1286
1316
|
network: input.accepted.network,
|
|
@@ -1289,7 +1319,7 @@ function buildX402ResumeState(input) {
|
|
|
1289
1319
|
};
|
|
1290
1320
|
}
|
|
1291
1321
|
function attachX402ResumeState(err, paymentRequired, accepted, idempotencyKey, request) {
|
|
1292
|
-
if (!(err instanceof
|
|
1322
|
+
if (!(err instanceof chunkMRPENBYE_cjs.HavenPaymentStateError)) return;
|
|
1293
1323
|
if (err.state.rail !== "x402") return;
|
|
1294
1324
|
err.resumeState = buildX402ResumeState({
|
|
1295
1325
|
paymentId: err.state.paymentId,
|
|
@@ -1310,17 +1340,17 @@ function attachResumeState(err, input) {
|
|
|
1310
1340
|
}
|
|
1311
1341
|
function assertCanResumeX402(status, paymentRequired, option) {
|
|
1312
1342
|
if (status.rail !== "x402") {
|
|
1313
|
-
throw new
|
|
1343
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(
|
|
1314
1344
|
`Payment ${status.paymentId} is ${status.rail}, not x402.`,
|
|
1315
1345
|
409,
|
|
1316
1346
|
status
|
|
1317
1347
|
);
|
|
1318
1348
|
}
|
|
1319
|
-
if (status.nextAction !==
|
|
1320
|
-
throw new
|
|
1349
|
+
if (status.nextAction !== chunkMRPENBYE_cjs.AgentPaymentNextAction.RetryOriginalX402Request) {
|
|
1350
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(status.message, paymentStateStatusCode(status.status, 409), status);
|
|
1321
1351
|
}
|
|
1322
1352
|
if (!status.txHash) {
|
|
1323
|
-
throw new
|
|
1353
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1324
1354
|
`x402 payment ${status.paymentId} is ready to retry but has no Haven transaction hash.`,
|
|
1325
1355
|
502,
|
|
1326
1356
|
status,
|
|
@@ -1328,7 +1358,7 @@ function assertCanResumeX402(status, paymentRequired, option) {
|
|
|
1328
1358
|
);
|
|
1329
1359
|
}
|
|
1330
1360
|
if (status.resourceUrl && status.resourceUrl !== paymentRequired.resource.url) {
|
|
1331
|
-
throw new
|
|
1361
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1332
1362
|
"x402 resume request does not match the approved resource URL.",
|
|
1333
1363
|
409,
|
|
1334
1364
|
{ status, paymentRequired },
|
|
@@ -1336,7 +1366,7 @@ function assertCanResumeX402(status, paymentRequired, option) {
|
|
|
1336
1366
|
);
|
|
1337
1367
|
}
|
|
1338
1368
|
if (status.merchantAddress && !sameAddress(status.merchantAddress, option.payTo)) {
|
|
1339
|
-
throw new
|
|
1369
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1340
1370
|
"x402 resume request does not match the approved merchant.",
|
|
1341
1371
|
409,
|
|
1342
1372
|
{ status, selectedPayment: option },
|
|
@@ -1345,7 +1375,7 @@ function assertCanResumeX402(status, paymentRequired, option) {
|
|
|
1345
1375
|
}
|
|
1346
1376
|
const optionChainId = chainIdFromNetwork(option.network);
|
|
1347
1377
|
if (status.chainId && optionChainId && status.chainId !== optionChainId) {
|
|
1348
|
-
throw new
|
|
1378
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1349
1379
|
"x402 resume request does not match the approved network.",
|
|
1350
1380
|
409,
|
|
1351
1381
|
{ status, selectedPayment: option },
|
|
@@ -1353,7 +1383,7 @@ function assertCanResumeX402(status, paymentRequired, option) {
|
|
|
1353
1383
|
);
|
|
1354
1384
|
}
|
|
1355
1385
|
if (status.token && status.token !== "USDC") {
|
|
1356
|
-
throw new
|
|
1386
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1357
1387
|
"x402 resume request does not match the approved token.",
|
|
1358
1388
|
409,
|
|
1359
1389
|
{ status, selectedPayment: option },
|
|
@@ -1361,9 +1391,9 @@ function assertCanResumeX402(status, paymentRequired, option) {
|
|
|
1361
1391
|
);
|
|
1362
1392
|
}
|
|
1363
1393
|
const approvedAmount = status.amount ? normalizeDecimal(status.amount) : "";
|
|
1364
|
-
const requestedAmount = normalizeDecimal(decimalFromUsdcAtomic(
|
|
1394
|
+
const requestedAmount = normalizeDecimal(decimalFromUsdcAtomic(chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option)));
|
|
1365
1395
|
if (approvedAmount && approvedAmount !== requestedAmount) {
|
|
1366
|
-
throw new
|
|
1396
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1367
1397
|
"x402 resume request does not match the approved amount.",
|
|
1368
1398
|
409,
|
|
1369
1399
|
{ status, selectedPayment: option },
|
|
@@ -1421,7 +1451,7 @@ var X402FundingLeg = class {
|
|
|
1421
1451
|
url: paymentRequired.resource.url,
|
|
1422
1452
|
payTo: this.delegateAddress,
|
|
1423
1453
|
merchantPayTo: option.payTo,
|
|
1424
|
-
amount:
|
|
1454
|
+
amount: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option),
|
|
1425
1455
|
asset: option.asset,
|
|
1426
1456
|
network: option.network,
|
|
1427
1457
|
description: paymentRequired.resource.description,
|
|
@@ -1432,17 +1462,17 @@ var X402FundingLeg = class {
|
|
|
1432
1462
|
settlementScheme: "eip3009"
|
|
1433
1463
|
});
|
|
1434
1464
|
const state = paymentStateFromRaw("x402 payment", raw);
|
|
1435
|
-
const executedReplay = raw.success && raw.tx_hash ? "idempotency-collision" : state?.nextAction ===
|
|
1465
|
+
const executedReplay = raw.success && raw.tx_hash ? "idempotency-collision" : state?.nextAction === chunkMRPENBYE_cjs.AgentPaymentNextAction.RetryOriginalX402Request ? "approval-resume" : null;
|
|
1436
1466
|
if (executedReplay) {
|
|
1437
1467
|
const canFund = await this.delegateCanFund(
|
|
1438
1468
|
raw.chain_id ?? state?.chainId ?? chainIdFromNetwork(option.network),
|
|
1439
1469
|
option.asset,
|
|
1440
|
-
|
|
1470
|
+
chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option)
|
|
1441
1471
|
);
|
|
1442
1472
|
const refuse = executedReplay === "idempotency-collision" ? canFund !== true : canFund === false;
|
|
1443
1473
|
if (refuse) {
|
|
1444
1474
|
const settledReceipt = state && executedReplay === "approval-resume" ? this.receiptFromStatus(paymentRequired, option, void 0, state) : this.receiptFromAuthorization(paymentRequired, option, void 0, raw);
|
|
1445
|
-
throw new
|
|
1475
|
+
throw new chunkMRPENBYE_cjs.X402AlreadySettledError(
|
|
1446
1476
|
canFund === false ? "This x402 payment already settled \u2014 the delegate no longer holds the funds to authorize it again. To buy the same item a second time, pass a distinct `idempotencyKey`; the synthesised key intentionally collapses repeat calls for the same product within a 5-minute window so a retried request cannot pay twice." : "This x402 payment already settled, and whether the delegate can still fund a new authorization could not be verified (no `chainRpcs` entry for this chain). Refusing rather than issue an authorization that may be unfundable. To buy the same item a second time, pass a distinct `idempotencyKey`; to finish an interrupted payment, resume it by `paymentId`.",
|
|
1447
1477
|
settledReceipt,
|
|
1448
1478
|
canFund === false ? "settled" : "unverifiable"
|
|
@@ -1455,14 +1485,14 @@ var X402FundingLeg = class {
|
|
|
1455
1485
|
this.cacheReceipt(idempotencyKey, paymentHeader, receipt2);
|
|
1456
1486
|
return receipt2;
|
|
1457
1487
|
}
|
|
1458
|
-
if (state?.nextAction ===
|
|
1488
|
+
if (state?.nextAction === chunkMRPENBYE_cjs.AgentPaymentNextAction.RetryOriginalX402Request) {
|
|
1459
1489
|
const receipt2 = this.receiptFromStatus(paymentRequired, option, paymentHeader, state);
|
|
1460
1490
|
this.cacheReceipt(idempotencyKey, paymentHeader, receipt2);
|
|
1461
1491
|
return receipt2;
|
|
1462
1492
|
}
|
|
1463
1493
|
this.assertSignableAuthorizationState("x402 payment", raw);
|
|
1464
1494
|
if (!raw.sign_data?.hash) {
|
|
1465
|
-
throw new
|
|
1495
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No sign_hash returned from x402/authorize", 500, raw);
|
|
1466
1496
|
}
|
|
1467
1497
|
const sig = await this.signForData(raw.sign_data);
|
|
1468
1498
|
const execResult = await this.post(
|
|
@@ -1483,25 +1513,25 @@ var X402FundingLeg = class {
|
|
|
1483
1513
|
// ── Header minting ───────────────────────────────────────────────
|
|
1484
1514
|
async createPaymentHeader(paymentRequired, option) {
|
|
1485
1515
|
if (!this.delegateKey) {
|
|
1486
|
-
throw new
|
|
1516
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError("delegateKey is required to sign x402 payment headers.");
|
|
1487
1517
|
}
|
|
1488
1518
|
const account = accounts.privateKeyToAccount(this.delegateKey);
|
|
1489
|
-
const requirements =
|
|
1519
|
+
const requirements = chunkNQ7EEHIV_cjs.toStandardPaymentRequirements(paymentRequired, option);
|
|
1490
1520
|
const header = await schemes.exact.evm.createPaymentHeader(
|
|
1491
1521
|
account,
|
|
1492
1522
|
paymentRequired.x402Version,
|
|
1493
1523
|
requirements
|
|
1494
1524
|
);
|
|
1495
1525
|
if (paymentRequired.x402Version < 2) return header;
|
|
1496
|
-
const payment =
|
|
1497
|
-
return
|
|
1526
|
+
const payment = chunkNQ7EEHIV_cjs.decodeBase64Json(header);
|
|
1527
|
+
return chunkNQ7EEHIV_cjs.encodeBase64Json(chunkNQ7EEHIV_cjs.x402V2PaymentEnvelope(paymentRequired, option, payment.payload));
|
|
1498
1528
|
}
|
|
1499
1529
|
// ── Receipt mapping ──────────────────────────────────────────────
|
|
1500
1530
|
receiptFromAuthorization(paymentRequired, option, paymentHeader, raw, execResult) {
|
|
1501
1531
|
const txHash = execResult?.tx_hash ?? raw.tx_hash ?? "";
|
|
1502
1532
|
const chainId = execResult?.chain_id ?? raw.chain_id ?? chainIdFromNetwork(option.network);
|
|
1503
1533
|
const token = execResult?.token ?? raw.token ?? "USDC";
|
|
1504
|
-
const amount = execResult?.amount ?? raw.amount ?? decimalFromUsdcAtomic(
|
|
1534
|
+
const amount = execResult?.amount ?? raw.amount ?? decimalFromUsdcAtomic(chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option));
|
|
1505
1535
|
const to = execResult?.to ?? raw.to ?? this.delegateAddress ?? "";
|
|
1506
1536
|
const explorerUrl = execResult?.explorer_url ?? raw.explorer_url ?? explorerUrlOrEmpty(chainId, txHash);
|
|
1507
1537
|
const merchantTo = execResult?.merchant_to ?? raw.merchant_to ?? option.payTo;
|
|
@@ -1523,7 +1553,7 @@ var X402FundingLeg = class {
|
|
|
1523
1553
|
}
|
|
1524
1554
|
receiptFromStatus(paymentRequired, option, paymentHeader, status) {
|
|
1525
1555
|
if (!status.txHash) {
|
|
1526
|
-
throw new
|
|
1556
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1527
1557
|
`x402 payment ${status.paymentId} is ready to retry but has no Haven transaction hash.`,
|
|
1528
1558
|
502,
|
|
1529
1559
|
status,
|
|
@@ -1534,7 +1564,7 @@ var X402FundingLeg = class {
|
|
|
1534
1564
|
paymentId: status.paymentId,
|
|
1535
1565
|
txHash: status.txHash,
|
|
1536
1566
|
token: status.token || "USDC",
|
|
1537
|
-
amount: status.amount || decimalFromUsdcAtomic(
|
|
1567
|
+
amount: status.amount || decimalFromUsdcAtomic(chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option)),
|
|
1538
1568
|
to: this.delegateAddress ?? "",
|
|
1539
1569
|
resourceUrl: paymentRequired.resource.url,
|
|
1540
1570
|
explorerUrl: explorerUrlOrEmpty(status.chainId, status.txHash),
|
|
@@ -1562,7 +1592,7 @@ var X402FundingLeg = class {
|
|
|
1562
1592
|
const provider = createJsonRpcProvider(rpcUrl);
|
|
1563
1593
|
const onChainReceipt = await provider.waitForTransaction(txHash, 1, timeoutMs);
|
|
1564
1594
|
if (!onChainReceipt || onChainReceipt.status !== 1) {
|
|
1565
|
-
throw new
|
|
1595
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1566
1596
|
"Funding tx did not confirm on-chain within the timeout window.",
|
|
1567
1597
|
500,
|
|
1568
1598
|
{ txHash, chainId }
|
|
@@ -1611,7 +1641,7 @@ var X402FundingLeg = class {
|
|
|
1611
1641
|
};
|
|
1612
1642
|
function getPaymentHeaderValidBefore(paymentHeader) {
|
|
1613
1643
|
try {
|
|
1614
|
-
const payment =
|
|
1644
|
+
const payment = chunkNQ7EEHIV_cjs.decodeBase64Json(
|
|
1615
1645
|
paymentHeader
|
|
1616
1646
|
);
|
|
1617
1647
|
const payload = payment.payload;
|
|
@@ -1666,7 +1696,7 @@ var X402Erc7710 = class {
|
|
|
1666
1696
|
*/
|
|
1667
1697
|
async settle(paymentRequired, options = {}) {
|
|
1668
1698
|
if (!this.delegateKey) {
|
|
1669
|
-
throw new
|
|
1699
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
1670
1700
|
"delegateKey is required for x402 payments. Pass it in the HavenClient config."
|
|
1671
1701
|
);
|
|
1672
1702
|
}
|
|
@@ -1691,21 +1721,21 @@ var X402Erc7710 = class {
|
|
|
1691
1721
|
async prepare(paymentRequired, options = {}) {
|
|
1692
1722
|
const delegationRail = options.delegationRail ?? (await this.getAgent()).executionRail === "delegation";
|
|
1693
1723
|
if (!delegationRail) {
|
|
1694
|
-
throw new
|
|
1724
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1695
1725
|
"erc7710 settlement requires a delegation-rail account; this one is not on it. Use authorizeX402() for the standard EIP-3009 path.",
|
|
1696
1726
|
400
|
|
1697
1727
|
);
|
|
1698
1728
|
}
|
|
1699
|
-
const selection =
|
|
1729
|
+
const selection = chunkNQ7EEHIV_cjs.selectX402SettlementScheme(paymentRequired.accepts, { delegationRail });
|
|
1700
1730
|
if (!selection || selection.scheme !== "erc7710") {
|
|
1701
|
-
throw new
|
|
1731
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1702
1732
|
"This merchant does not advertise an erc7710 settlement option (no accepts[] entry carries extra.assetTransferMethod: 'erc7710'). Use authorizeX402() for the standard EIP-3009 path.",
|
|
1703
1733
|
400
|
|
1704
1734
|
);
|
|
1705
1735
|
}
|
|
1706
1736
|
const option = selection.option;
|
|
1707
1737
|
const merchantPayTo = option.payTo;
|
|
1708
|
-
const amountAtomic =
|
|
1738
|
+
const amountAtomic = chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option);
|
|
1709
1739
|
const raw = await this.post("/x402", {
|
|
1710
1740
|
url: options.resourceUrl ?? paymentRequired.resource?.url,
|
|
1711
1741
|
// #2373: the full 402 challenge, persisted verbatim by the backend
|
|
@@ -1743,11 +1773,11 @@ var X402Erc7710 = class {
|
|
|
1743
1773
|
...options.mcpCallContext ? { mcpCallContext: options.mcpCallContext } : {}
|
|
1744
1774
|
});
|
|
1745
1775
|
if (!raw.payment_id) {
|
|
1746
|
-
throw new
|
|
1776
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No payment_id returned from x402/authorize", 500, raw);
|
|
1747
1777
|
}
|
|
1748
1778
|
const signData = raw.sign_data;
|
|
1749
1779
|
if (signData?.signature_scheme !== "eip712_delegation" || !signData.typed_data) {
|
|
1750
|
-
throw new
|
|
1780
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1751
1781
|
`x402/authorize did not return an erc7710 settlement child (signature_scheme was ${JSON.stringify(signData?.signature_scheme)}). Refusing to sign a payload this path did not ask for.`,
|
|
1752
1782
|
500,
|
|
1753
1783
|
raw
|
|
@@ -1780,7 +1810,7 @@ var X402Erc7710 = class {
|
|
|
1780
1810
|
{ signature }
|
|
1781
1811
|
);
|
|
1782
1812
|
if (!settled.payment_header) {
|
|
1783
|
-
throw new
|
|
1813
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1784
1814
|
"x402 settle returned no payment_header \u2014 the merchant cannot be retried.",
|
|
1785
1815
|
500,
|
|
1786
1816
|
settled
|
|
@@ -1790,9 +1820,9 @@ var X402Erc7710 = class {
|
|
|
1790
1820
|
}
|
|
1791
1821
|
};
|
|
1792
1822
|
function settlementExpectationFromQuote(settlement) {
|
|
1793
|
-
const chainId =
|
|
1823
|
+
const chainId = chunkMRPENBYE_cjs.chainIdForNetwork(settlement.network);
|
|
1794
1824
|
if (chainId === void 0) {
|
|
1795
|
-
throw new
|
|
1825
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
1796
1826
|
`Refusing to sign the x402 settlement child: the merchant's network ${JSON.stringify(settlement.network)} is not one this SDK can verify a settlement child on.`
|
|
1797
1827
|
);
|
|
1798
1828
|
}
|
|
@@ -1842,7 +1872,7 @@ function x402ToolReceipt(receipt) {
|
|
|
1842
1872
|
};
|
|
1843
1873
|
}
|
|
1844
1874
|
function toolError(err) {
|
|
1845
|
-
if (err instanceof
|
|
1875
|
+
if (err instanceof chunkMRPENBYE_cjs.HavenPaymentStateError) {
|
|
1846
1876
|
return {
|
|
1847
1877
|
success: false,
|
|
1848
1878
|
payment_id: err.state.paymentId,
|
|
@@ -1887,7 +1917,7 @@ function toolError(err) {
|
|
|
1887
1917
|
error: err.message
|
|
1888
1918
|
};
|
|
1889
1919
|
}
|
|
1890
|
-
if (err instanceof
|
|
1920
|
+
if (err instanceof chunkMRPENBYE_cjs.HavenApiError) {
|
|
1891
1921
|
return {
|
|
1892
1922
|
success: false,
|
|
1893
1923
|
status_code: err.statusCode,
|
|
@@ -1924,10 +1954,10 @@ var MerchantCompletion = class {
|
|
|
1924
1954
|
}
|
|
1925
1955
|
async retryRequest(url, initialInit, paymentRequired, receipt) {
|
|
1926
1956
|
if (!receipt.accepted) {
|
|
1927
|
-
throw new
|
|
1957
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No accepted x402 option was recorded for payment retry", 500);
|
|
1928
1958
|
}
|
|
1929
1959
|
if (!receipt.paymentHeader) {
|
|
1930
|
-
throw new
|
|
1960
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No x402 payment header was returned for payment retry", 500);
|
|
1931
1961
|
}
|
|
1932
1962
|
const retryResponse = await this.merchantTransport.deliverPaymentRecoveringSession(
|
|
1933
1963
|
url,
|
|
@@ -1952,7 +1982,7 @@ var MerchantCompletion = class {
|
|
|
1952
1982
|
delegate_to: receipt.to
|
|
1953
1983
|
}
|
|
1954
1984
|
});
|
|
1955
|
-
throw new
|
|
1985
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
1956
1986
|
"x402 retry failed after Haven funded the delegate wallet; reconciliation may be required.",
|
|
1957
1987
|
inBandRejection ? X402_RETRY_REJECTED_STATUS : merchant.merchant_status,
|
|
1958
1988
|
{
|
|
@@ -1985,7 +2015,7 @@ var MerchantCompletion = class {
|
|
|
1985
2015
|
merchantStatus: retryResponse.status,
|
|
1986
2016
|
challengePayload: paymentRequired,
|
|
1987
2017
|
selectedPayment: receipt.accepted,
|
|
1988
|
-
paymentProofHeaderName:
|
|
2018
|
+
paymentProofHeaderName: chunkNQ7EEHIV_cjs.x402PaymentHeaderNamesSent(receipt.paymentHeader),
|
|
1989
2019
|
paymentProofHeader: receipt.paymentHeader,
|
|
1990
2020
|
protocolReceiptHeaderName,
|
|
1991
2021
|
protocolReceiptHeader
|
|
@@ -2026,18 +2056,18 @@ var MerchantCompletion = class {
|
|
|
2026
2056
|
async resolveCompletionContext(input) {
|
|
2027
2057
|
const status = await this.getPaymentStatus(input.paymentId);
|
|
2028
2058
|
if (status.rail !== "x402") {
|
|
2029
|
-
throw new
|
|
2059
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(
|
|
2030
2060
|
`Payment ${status.paymentId} is ${status.rail}, not x402.`,
|
|
2031
2061
|
409,
|
|
2032
2062
|
status
|
|
2033
2063
|
);
|
|
2034
2064
|
}
|
|
2035
|
-
const readyForMerchantCompletion = input.noFundingLeg ? status.kind === "payment_intent" && status.status === "submitted" : status.nextAction ===
|
|
2065
|
+
const readyForMerchantCompletion = input.noFundingLeg ? status.kind === "payment_intent" && status.status === "submitted" : status.nextAction === chunkMRPENBYE_cjs.AgentPaymentNextAction.RetryOriginalX402Request || status.kind === "payment_intent" && status.status === "confirmed" && status.phase === chunkMRPENBYE_cjs.AgentPaymentPhase.PaymentConfirmed && status.nextAction === chunkMRPENBYE_cjs.AgentPaymentNextAction.None;
|
|
2036
2066
|
if (!readyForMerchantCompletion) {
|
|
2037
|
-
throw new
|
|
2067
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(status.message, paymentStateStatusCode(status.status, 409), status);
|
|
2038
2068
|
}
|
|
2039
2069
|
if (!input.noFundingLeg && !status.txHash) {
|
|
2040
|
-
throw new
|
|
2070
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
2041
2071
|
`x402 payment ${status.paymentId} is ready for merchant completion but has no Haven transaction hash.`,
|
|
2042
2072
|
502,
|
|
2043
2073
|
status,
|
|
@@ -2046,7 +2076,7 @@ var MerchantCompletion = class {
|
|
|
2046
2076
|
}
|
|
2047
2077
|
const approvedResourceUrl = status.resourceUrl ?? status.x402?.resourceUrl ?? null;
|
|
2048
2078
|
if (approvedResourceUrl && approvedResourceUrl !== input.url) {
|
|
2049
|
-
throw new
|
|
2079
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
2050
2080
|
"x402 merchant completion does not match the approved resource URL.",
|
|
2051
2081
|
409,
|
|
2052
2082
|
{ status, url: input.url },
|
|
@@ -2132,7 +2162,7 @@ var MerchantCompletion = class {
|
|
|
2132
2162
|
*/
|
|
2133
2163
|
async reportMerchantOutcome(input) {
|
|
2134
2164
|
if (!Number.isInteger(input.merchantStatus) || input.merchantStatus < 100 || input.merchantStatus > 599) {
|
|
2135
|
-
throw new
|
|
2165
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
2136
2166
|
`merchant_status must be an integer HTTP status from 100 to 599 (received ${input.merchantStatus}).`,
|
|
2137
2167
|
400,
|
|
2138
2168
|
void 0,
|
|
@@ -2141,7 +2171,7 @@ var MerchantCompletion = class {
|
|
|
2141
2171
|
}
|
|
2142
2172
|
const looksAccepted = input.merchantStatus >= 200 && input.merchantStatus < 300;
|
|
2143
2173
|
if (looksAccepted !== (input.outcome === "accepted")) {
|
|
2144
|
-
throw new
|
|
2174
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
2145
2175
|
`outcome "${input.outcome}" contradicts merchant_status ${input.merchantStatus}: report "accepted" only for a 2xx and "rejected" only for a non-2xx.`,
|
|
2146
2176
|
400,
|
|
2147
2177
|
void 0,
|
|
@@ -2150,14 +2180,14 @@ var MerchantCompletion = class {
|
|
|
2150
2180
|
}
|
|
2151
2181
|
const status = await this.getPaymentStatus(input.paymentId);
|
|
2152
2182
|
if (status.rail !== "x402") {
|
|
2153
|
-
throw new
|
|
2183
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(
|
|
2154
2184
|
`Payment ${status.paymentId} is ${status.rail}, not x402 \u2014 there is no merchant retry to report.`,
|
|
2155
2185
|
409,
|
|
2156
2186
|
status
|
|
2157
2187
|
);
|
|
2158
2188
|
}
|
|
2159
2189
|
if (status.status !== "confirmed" || !status.txHash) {
|
|
2160
|
-
throw new
|
|
2190
|
+
throw new chunkMRPENBYE_cjs.HavenPaymentStateError(
|
|
2161
2191
|
`Payment ${status.paymentId} has no confirmed Haven funding transaction to anchor a merchant report to (status ${status.status}). ${status.message}`,
|
|
2162
2192
|
paymentStateStatusCode(status.status, 409),
|
|
2163
2193
|
status
|
|
@@ -2165,7 +2195,7 @@ var MerchantCompletion = class {
|
|
|
2165
2195
|
}
|
|
2166
2196
|
const resourceUrl = status.resourceUrl ?? status.x402?.resourceUrl ?? null;
|
|
2167
2197
|
if (!resourceUrl) {
|
|
2168
|
-
throw new
|
|
2198
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
2169
2199
|
`Payment ${status.paymentId} has no recorded resource URL, so a merchant report cannot be stored.`,
|
|
2170
2200
|
409,
|
|
2171
2201
|
status,
|
|
@@ -2218,7 +2248,7 @@ var MerchantCompletion = class {
|
|
|
2218
2248
|
await this.post("/machine-payments/evidence", body);
|
|
2219
2249
|
return { outcome: "confirmed" };
|
|
2220
2250
|
} catch (err) {
|
|
2221
|
-
const statusCode = err instanceof
|
|
2251
|
+
const statusCode = err instanceof chunkMRPENBYE_cjs.HavenApiError ? err.statusCode : void 0;
|
|
2222
2252
|
const retryable = statusCode === EVIDENCE_RETRYABLE_STATUS;
|
|
2223
2253
|
if (!retryable) {
|
|
2224
2254
|
return { outcome: "refused", statusCode: statusCode ?? 0 };
|
|
@@ -2255,7 +2285,7 @@ var MerchantCompletion = class {
|
|
|
2255
2285
|
*/
|
|
2256
2286
|
async reportSettlementEvidence(paymentId, settlementTxHash) {
|
|
2257
2287
|
if (isZeroSettlementTxHash(settlementTxHash)) {
|
|
2258
|
-
throw new
|
|
2288
|
+
throw new chunkMRPENBYE_cjs.HavenZeroSettlementHashError(paymentId);
|
|
2259
2289
|
}
|
|
2260
2290
|
return this.reportEvidence({
|
|
2261
2291
|
paymentId,
|
|
@@ -2275,7 +2305,7 @@ function parseMerchantSettlement(header) {
|
|
|
2275
2305
|
}
|
|
2276
2306
|
function parseProtocolReceiptHeader(value) {
|
|
2277
2307
|
try {
|
|
2278
|
-
return
|
|
2308
|
+
return chunkNQ7EEHIV_cjs.decodeBase64Json(value);
|
|
2279
2309
|
} catch {
|
|
2280
2310
|
try {
|
|
2281
2311
|
return JSON.parse(value);
|
|
@@ -2292,7 +2322,7 @@ function x402TypedDataDigest(typedData) {
|
|
|
2292
2322
|
try {
|
|
2293
2323
|
return viem.hashTypedData(typedData);
|
|
2294
2324
|
} catch (err) {
|
|
2295
|
-
throw new
|
|
2325
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2296
2326
|
`The x402 funding intent carried a sign_data.typed_data that is not a valid EIP-712 payload (needs domain, types, primaryType, message), so its digest cannot be derived and no signer could accept it. Underlying error: ${err instanceof Error ? err.message : String(err)}`
|
|
2297
2327
|
);
|
|
2298
2328
|
}
|
|
@@ -2374,7 +2404,7 @@ var HavenClient = class {
|
|
|
2374
2404
|
});
|
|
2375
2405
|
this.x402Wallet = config.x402Wallet;
|
|
2376
2406
|
this.merchantTransport = new McpMerchantTransport({ merchantTimeout: config.merchantTimeout });
|
|
2377
|
-
this.confirmationTimeout = config.confirmationTimeout ??
|
|
2407
|
+
this.confirmationTimeout = config.confirmationTimeout ?? chunkMRPENBYE_cjs.DEFAULT_CONFIRMATION_TIMEOUT_MS;
|
|
2378
2408
|
this.pollingInterval = config.pollingInterval ?? DEFAULT_POLLING_INTERVAL;
|
|
2379
2409
|
this.chainRpcs = config.chainRpcs ?? {};
|
|
2380
2410
|
if (this.delegateKey) {
|
|
@@ -2422,6 +2452,15 @@ var HavenClient = class {
|
|
|
2422
2452
|
withRequestContext(headers, fn) {
|
|
2423
2453
|
return this.havenApi.withRequestContext(headers, fn);
|
|
2424
2454
|
}
|
|
2455
|
+
/**
|
|
2456
|
+
* The backend's newest `client_update` hint for this client (#3303): inside
|
|
2457
|
+
* a `withRequestContext` dispatch, the one that dispatch's own requests
|
|
2458
|
+
* received; outside one, the latest seen. Undefined when the client is
|
|
2459
|
+
* current or the backend predates #3303.
|
|
2460
|
+
*/
|
|
2461
|
+
clientUpdate() {
|
|
2462
|
+
return this.havenApi.clientUpdate();
|
|
2463
|
+
}
|
|
2425
2464
|
// ── High-Level API ───────────────────────────────────────────────
|
|
2426
2465
|
/**
|
|
2427
2466
|
* Send a payment in one call.
|
|
@@ -2434,7 +2473,7 @@ var HavenClient = class {
|
|
|
2434
2473
|
*/
|
|
2435
2474
|
async pay(request) {
|
|
2436
2475
|
if (!this.delegateKey) {
|
|
2437
|
-
throw new
|
|
2476
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2438
2477
|
"Cannot use pay() without a delegateKey. Use createIntent() + submitSignature() for manual signing."
|
|
2439
2478
|
);
|
|
2440
2479
|
}
|
|
@@ -2483,15 +2522,15 @@ var HavenClient = class {
|
|
|
2483
2522
|
* on-chain allowance — there is nothing to sign until the user approves.
|
|
2484
2523
|
*/
|
|
2485
2524
|
async createX402Intent(paymentRequired, options = {}) {
|
|
2486
|
-
const option =
|
|
2525
|
+
const option = chunkNQ7EEHIV_cjs.selectStandardPaymentOption(paymentRequired.accepts);
|
|
2487
2526
|
if (!option) {
|
|
2488
2527
|
throw noCompatiblePaymentOptionError(paymentRequired.accepts);
|
|
2489
2528
|
}
|
|
2490
2529
|
const fundingTo = options.delegateAddress ?? (await this.getAgent()).delegateAddress;
|
|
2491
2530
|
if (!fundingTo) {
|
|
2492
|
-
throw new
|
|
2531
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("Authenticated agent has no delegate address registered.", 502);
|
|
2493
2532
|
}
|
|
2494
|
-
const idempotencyKey = options.idempotencyKey ??
|
|
2533
|
+
const idempotencyKey = options.idempotencyKey ?? chunkNQ7EEHIV_cjs.buildX402IdempotencyKey(paymentRequired, option);
|
|
2495
2534
|
const raw = await this.post("/x402", {
|
|
2496
2535
|
url: paymentRequired.resource.url,
|
|
2497
2536
|
payTo: fundingTo,
|
|
@@ -2502,7 +2541,7 @@ var HavenClient = class {
|
|
|
2502
2541
|
// of a silent reroute to the erc7710 settlement branch (the #1358
|
|
2503
2542
|
// review's open-budget misroute). Legacy-rail backends ignore the field.
|
|
2504
2543
|
settlementScheme: "eip3009",
|
|
2505
|
-
amount:
|
|
2544
|
+
amount: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option),
|
|
2506
2545
|
asset: option.asset,
|
|
2507
2546
|
network: option.network,
|
|
2508
2547
|
description: paymentRequired.resource.description,
|
|
@@ -2520,15 +2559,15 @@ var HavenClient = class {
|
|
|
2520
2559
|
throwPaymentStateError("x402 payment", raw);
|
|
2521
2560
|
}
|
|
2522
2561
|
if (!raw.sign_data?.hash) {
|
|
2523
|
-
throw new
|
|
2562
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No sign_hash returned from x402/authorize", 500, raw);
|
|
2524
2563
|
}
|
|
2525
2564
|
if (raw.sign_data.signature_scheme !== void 0 && !raw.sign_data.typed_data) {
|
|
2526
|
-
throw new
|
|
2565
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2527
2566
|
`This account's x402 funding intent declares signature scheme '${raw.sign_data.signature_scheme}' but carried no typed_data to sign. Refusing to fall back to the bare hash \u2014 the account would reject that signature on-chain. This is a backend contract violation; report it rather than working around it.`
|
|
2528
2567
|
);
|
|
2529
2568
|
}
|
|
2530
2569
|
if (!raw.x402_expected_auth) {
|
|
2531
|
-
throw new
|
|
2570
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("No x402 expected-context binding returned from x402/authorize", 500, raw);
|
|
2532
2571
|
}
|
|
2533
2572
|
return {
|
|
2534
2573
|
paymentId: raw.payment_id,
|
|
@@ -2539,7 +2578,7 @@ var HavenClient = class {
|
|
|
2539
2578
|
accepted: option,
|
|
2540
2579
|
resourceUrl: paymentRequired.resource.url,
|
|
2541
2580
|
merchantTo: raw.merchant_to ?? option.payTo,
|
|
2542
|
-
amountAtomic:
|
|
2581
|
+
amountAtomic: chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option),
|
|
2543
2582
|
asset: option.asset,
|
|
2544
2583
|
network: option.network,
|
|
2545
2584
|
expectedAuth: raw.x402_expected_auth,
|
|
@@ -2564,13 +2603,13 @@ var HavenClient = class {
|
|
|
2564
2603
|
*/
|
|
2565
2604
|
sign(hash) {
|
|
2566
2605
|
if (!this.delegateKey) {
|
|
2567
|
-
throw new
|
|
2606
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2568
2607
|
"Cannot sign without a delegateKey. Pass the private key in HavenClient config, or sign externally."
|
|
2569
2608
|
);
|
|
2570
2609
|
}
|
|
2571
2610
|
const signature = signHash(this.delegateKey, hash);
|
|
2572
2611
|
if (!verifySignature(hash, signature, this.delegateAddress)) {
|
|
2573
|
-
throw new
|
|
2612
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2574
2613
|
"Local signature verification failed \u2014 recovered address does not match delegate key."
|
|
2575
2614
|
);
|
|
2576
2615
|
}
|
|
@@ -2588,24 +2627,24 @@ var HavenClient = class {
|
|
|
2588
2627
|
*/
|
|
2589
2628
|
async signForData(signData, settlementExpectation) {
|
|
2590
2629
|
if (!this.delegateKey) {
|
|
2591
|
-
throw new
|
|
2630
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2592
2631
|
"Cannot sign without a delegateKey. Pass the private key in HavenClient config, or sign externally."
|
|
2593
2632
|
);
|
|
2594
2633
|
}
|
|
2595
2634
|
const scheme = signData.signature_scheme;
|
|
2596
2635
|
if (scheme === "eip191_userop") {
|
|
2597
|
-
throw new
|
|
2636
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2598
2637
|
"The session rail is retired \u2014 'eip191_userop' intents can no longer be signed. Re-onboard the account on the delegation rail."
|
|
2599
2638
|
);
|
|
2600
2639
|
}
|
|
2601
2640
|
if (scheme === "eip712_userop") {
|
|
2602
2641
|
if (!signData.typed_data) {
|
|
2603
|
-
throw new
|
|
2642
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2604
2643
|
"sign_data.signature_scheme is eip712_userop but typed_data is missing \u2014 refusing to sign the bare hash (the account would reject it)."
|
|
2605
2644
|
);
|
|
2606
2645
|
}
|
|
2607
|
-
|
|
2608
|
-
|
|
2646
|
+
chunkMRPENBYE_cjs.assertUserOpTypedDataBinding(signData.typed_data, signData.hash);
|
|
2647
|
+
chunkNQ7EEHIV_cjs.assertBoundDirectPaymentUserOp(
|
|
2609
2648
|
signData.typed_data,
|
|
2610
2649
|
this.delegateAddress
|
|
2611
2650
|
);
|
|
@@ -2613,24 +2652,24 @@ var HavenClient = class {
|
|
|
2613
2652
|
}
|
|
2614
2653
|
if (scheme === "eip712_delegation") {
|
|
2615
2654
|
if (!signData.typed_data) {
|
|
2616
|
-
throw new
|
|
2655
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2617
2656
|
"sign_data.signature_scheme is eip712_delegation but typed_data is missing \u2014 refusing to sign the bare hash (the settlement would be rejected on redemption)."
|
|
2618
2657
|
);
|
|
2619
2658
|
}
|
|
2620
2659
|
if (!settlementExpectation) {
|
|
2621
|
-
throw new
|
|
2660
|
+
throw new chunkNQ7EEHIV_cjs.HavenTypedDataRefusedError(
|
|
2622
2661
|
"Refusing to sign an x402 settlement child without an independent expectation of what it must pay (the merchant's 402). Pay erc7710 merchants through settleX402Erc7710(), which supplies it."
|
|
2623
2662
|
);
|
|
2624
2663
|
}
|
|
2625
|
-
|
|
2664
|
+
chunkNQ7EEHIV_cjs.assertOwnSettlementChild(signData.typed_data, settlementExpectation, this.delegateAddress);
|
|
2626
2665
|
return signSettlementDelegationTypedData(this.delegateKey, signData.typed_data);
|
|
2627
2666
|
}
|
|
2628
2667
|
if (scheme === void 0) {
|
|
2629
|
-
throw new
|
|
2668
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2630
2669
|
"sign_data.signature_scheme is required \u2014 the legacy AllowanceModule rail that signed the bare hash is retired (#2850). Refusing to guess a signing scheme."
|
|
2631
2670
|
);
|
|
2632
2671
|
}
|
|
2633
|
-
throw new
|
|
2672
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2634
2673
|
`Unknown sign_data.signature_scheme '${scheme}' \u2014 refusing to guess a signing scheme. Update @haven_ai/sdk.`
|
|
2635
2674
|
);
|
|
2636
2675
|
}
|
|
@@ -2814,7 +2853,7 @@ var HavenClient = class {
|
|
|
2814
2853
|
*/
|
|
2815
2854
|
async getPaymentStatusWithPostPurchaseAllowance(paymentId) {
|
|
2816
2855
|
const status = await this.getPaymentStatus(paymentId);
|
|
2817
|
-
if (status.rail ===
|
|
2856
|
+
if (status.rail === chunkMRPENBYE_cjs.AgentPaymentRail.X402 && status.phase === chunkMRPENBYE_cjs.AgentPaymentPhase.PaymentConfirmed) {
|
|
2818
2857
|
const { allowance, warnings } = await this.getPostPurchaseAllowanceSummary(paymentId);
|
|
2819
2858
|
return { ...status, allowance, ...warnings.length > 0 ? { warnings } : {} };
|
|
2820
2859
|
}
|
|
@@ -2922,7 +2961,7 @@ var HavenClient = class {
|
|
|
2922
2961
|
}
|
|
2923
2962
|
await sleep(this.pollingInterval);
|
|
2924
2963
|
}
|
|
2925
|
-
throw new
|
|
2964
|
+
throw new chunkMRPENBYE_cjs.HavenTimeoutError(paymentId);
|
|
2926
2965
|
}
|
|
2927
2966
|
// ── x402 Protocol Support ────────────────────────────────────────
|
|
2928
2967
|
/**
|
|
@@ -2936,18 +2975,18 @@ var HavenClient = class {
|
|
|
2936
2975
|
*/
|
|
2937
2976
|
async authorizeX402(paymentRequired, options = {}) {
|
|
2938
2977
|
if (!this.delegateKey) {
|
|
2939
|
-
throw new
|
|
2978
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
2940
2979
|
"delegateKey is required for x402 payments. Pass it in the HavenClient config."
|
|
2941
2980
|
);
|
|
2942
2981
|
}
|
|
2943
2982
|
if (!this.delegateAddress) {
|
|
2944
|
-
throw new
|
|
2983
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError("delegateAddress could not be derived from delegateKey.");
|
|
2945
2984
|
}
|
|
2946
|
-
const option =
|
|
2985
|
+
const option = chunkNQ7EEHIV_cjs.selectStandardPaymentOption(paymentRequired.accepts);
|
|
2947
2986
|
if (!option) {
|
|
2948
2987
|
throw noCompatiblePaymentOptionError(paymentRequired.accepts);
|
|
2949
2988
|
}
|
|
2950
|
-
const idempotencyKey = options.idempotencyKey ??
|
|
2989
|
+
const idempotencyKey = options.idempotencyKey ?? chunkNQ7EEHIV_cjs.buildX402IdempotencyKey(paymentRequired, option);
|
|
2951
2990
|
const cached = this.fundingLeg.cachedReceipt(idempotencyKey);
|
|
2952
2991
|
if (cached) return cached;
|
|
2953
2992
|
const inFlight = this.inFlightX402.get(idempotencyKey);
|
|
@@ -2987,16 +3026,16 @@ var HavenClient = class {
|
|
|
2987
3026
|
} catch {
|
|
2988
3027
|
body = void 0;
|
|
2989
3028
|
}
|
|
2990
|
-
throw new
|
|
3029
|
+
throw new chunkMRPENBYE_cjs.X402UnexpectedStatusError(
|
|
2991
3030
|
`Expected an x402 quote response with HTTP 402, got HTTP ${response.status}.`,
|
|
2992
3031
|
response.status || 400,
|
|
2993
3032
|
body
|
|
2994
3033
|
);
|
|
2995
3034
|
}
|
|
2996
3035
|
if (response.headers.get("MACHINE-PAYMENT-CHALLENGE")) {
|
|
2997
|
-
throw new
|
|
3036
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("quoteX402 only supports standard x402 Payment Required responses.", 400);
|
|
2998
3037
|
}
|
|
2999
|
-
const paymentRequired = await
|
|
3038
|
+
const paymentRequired = await chunkNQ7EEHIV_cjs.parsePaymentRequiredResponse(response);
|
|
3000
3039
|
const mcpTransport = await this.merchantTransport.detect(url, paymentRequired, response);
|
|
3001
3040
|
return buildX402Quote(paymentRequired, request, options.idempotencyKey, mcpTransport);
|
|
3002
3041
|
}
|
|
@@ -3014,7 +3053,7 @@ var HavenClient = class {
|
|
|
3014
3053
|
const wallet = await this.merchantCompletion.resolveWalletForMerchantCall();
|
|
3015
3054
|
const sessionId = await this.merchantTransport.initialize(url, init, wallet);
|
|
3016
3055
|
if (!sessionId) {
|
|
3017
|
-
throw new
|
|
3056
|
+
throw new chunkMRPENBYE_cjs.HavenApiError(
|
|
3018
3057
|
"The merchant did not establish an MCP session before the x402 quote. No payment was created.",
|
|
3019
3058
|
502,
|
|
3020
3059
|
{ mcpSessionNotEstablished: true }
|
|
@@ -3088,18 +3127,18 @@ var HavenClient = class {
|
|
|
3088
3127
|
}
|
|
3089
3128
|
async resumeAuthorizedX402(input) {
|
|
3090
3129
|
if (!this.delegateKey) {
|
|
3091
|
-
throw new
|
|
3130
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError(
|
|
3092
3131
|
"delegateKey is required for x402 payments. Pass it in the HavenClient config."
|
|
3093
3132
|
);
|
|
3094
3133
|
}
|
|
3095
3134
|
if (!this.delegateAddress) {
|
|
3096
|
-
throw new
|
|
3135
|
+
throw new chunkMRPENBYE_cjs.HavenSigningError("delegateAddress could not be derived from delegateKey.");
|
|
3097
3136
|
}
|
|
3098
|
-
const option =
|
|
3137
|
+
const option = chunkNQ7EEHIV_cjs.selectStandardPaymentOption(input.paymentRequired.accepts);
|
|
3099
3138
|
if (!option) {
|
|
3100
3139
|
throw noCompatiblePaymentOptionError(input.paymentRequired.accepts);
|
|
3101
3140
|
}
|
|
3102
|
-
const idempotencyKey = input.idempotencyKey ??
|
|
3141
|
+
const idempotencyKey = input.idempotencyKey ?? chunkNQ7EEHIV_cjs.buildX402IdempotencyKey(input.paymentRequired, option);
|
|
3103
3142
|
const cached = this.fundingLeg.cachedReceipt(idempotencyKey);
|
|
3104
3143
|
if (cached) return cached;
|
|
3105
3144
|
const status = await this.getPaymentStatus(input.paymentId);
|
|
@@ -3107,10 +3146,10 @@ var HavenClient = class {
|
|
|
3107
3146
|
const canFund = await this.fundingLeg.delegateCanFund(
|
|
3108
3147
|
status.chainId ?? chainIdFromNetwork(option.network),
|
|
3109
3148
|
option.asset,
|
|
3110
|
-
|
|
3149
|
+
chunkNQ7EEHIV_cjs.x402AuthorizationAmount(option)
|
|
3111
3150
|
);
|
|
3112
3151
|
if (canFund === false) {
|
|
3113
|
-
throw new
|
|
3152
|
+
throw new chunkMRPENBYE_cjs.X402AlreadySettledError(
|
|
3114
3153
|
`x402 payment ${status.paymentId} has already settled \u2014 the delegate no longer holds the funds to authorize it again, so there is nothing left to resume.`,
|
|
3115
3154
|
this.fundingLeg.receiptFromStatus(input.paymentRequired, option, void 0, status),
|
|
3116
3155
|
"settled"
|
|
@@ -3131,13 +3170,13 @@ var HavenClient = class {
|
|
|
3131
3170
|
const url = input.url ?? input.request?.url;
|
|
3132
3171
|
if (!paymentRequired) {
|
|
3133
3172
|
if (!url) {
|
|
3134
|
-
throw new
|
|
3173
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("x402 resume requires the original URL or a captured request snapshot.", 400);
|
|
3135
3174
|
}
|
|
3136
3175
|
const response = await this.merchantTransport.fetch(url, initialInit);
|
|
3137
3176
|
if (response.status !== 402) {
|
|
3138
|
-
throw new
|
|
3177
|
+
throw new chunkMRPENBYE_cjs.HavenApiError("Expected the original x402 request to return HTTP 402 before resuming.", 400);
|
|
3139
3178
|
}
|
|
3140
|
-
paymentRequired = await
|
|
3179
|
+
paymentRequired = await chunkNQ7EEHIV_cjs.parsePaymentRequiredResponse(response);
|
|
3141
3180
|
}
|
|
3142
3181
|
const receipt = await this.resumeAuthorizedX402({
|
|
3143
3182
|
paymentId: input.paymentId,
|
|
@@ -3190,7 +3229,7 @@ var HavenClient = class {
|
|
|
3190
3229
|
nativeChallenge = true;
|
|
3191
3230
|
} else {
|
|
3192
3231
|
try {
|
|
3193
|
-
paymentRequired = await
|
|
3232
|
+
paymentRequired = await chunkNQ7EEHIV_cjs.parsePaymentRequiredResponse(response);
|
|
3194
3233
|
} catch {
|
|
3195
3234
|
return response;
|
|
3196
3235
|
}
|
|
@@ -3200,8 +3239,8 @@ var HavenClient = class {
|
|
|
3200
3239
|
if (mcpSessionId) requestInit = this.merchantTransport.withSessionHeaders(requestInit, mcpSessionId);
|
|
3201
3240
|
}
|
|
3202
3241
|
const request = snapshotX402Request(url, requestInit);
|
|
3203
|
-
const option =
|
|
3204
|
-
const idempotencyKey = options.idempotencyKey ?? (option ?
|
|
3242
|
+
const option = chunkNQ7EEHIV_cjs.selectStandardPaymentOption(paymentRequired.accepts);
|
|
3243
|
+
const idempotencyKey = options.idempotencyKey ?? (option ? chunkNQ7EEHIV_cjs.buildX402IdempotencyKey(paymentRequired, option) : void 0);
|
|
3205
3244
|
let receipt;
|
|
3206
3245
|
try {
|
|
3207
3246
|
receipt = await this.authorizeX402(paymentRequired, options);
|
|
@@ -3328,7 +3367,7 @@ var HavenClient = class {
|
|
|
3328
3367
|
txHash: evidenceTxHash,
|
|
3329
3368
|
resourceUrl: evidenceContext.resourceUrl,
|
|
3330
3369
|
merchantStatus: surfaced.status,
|
|
3331
|
-
paymentProofHeaderName:
|
|
3370
|
+
paymentProofHeaderName: chunkNQ7EEHIV_cjs.x402PaymentHeaderNamesSent(input.paymentHeader),
|
|
3332
3371
|
paymentProofHeader: input.paymentHeader,
|
|
3333
3372
|
protocolReceiptHeaderName,
|
|
3334
3373
|
protocolReceiptHeader
|
|
@@ -4325,415 +4364,435 @@ function sameUrl(a, b) {
|
|
|
4325
4364
|
|
|
4326
4365
|
Object.defineProperty(exports, "DEFAULT_NEXT_TOOL_BY_ACTION", {
|
|
4327
4366
|
enumerable: true,
|
|
4328
|
-
get: function () { return
|
|
4367
|
+
get: function () { return chunkNQ7EEHIV_cjs.DEFAULT_NEXT_TOOL_BY_ACTION; }
|
|
4329
4368
|
});
|
|
4330
4369
|
Object.defineProperty(exports, "ERC7710_ASSET_TRANSFER_METHOD", {
|
|
4331
4370
|
enumerable: true,
|
|
4332
|
-
get: function () { return
|
|
4371
|
+
get: function () { return chunkNQ7EEHIV_cjs.ERC7710_ASSET_TRANSFER_METHOD; }
|
|
4372
|
+
});
|
|
4373
|
+
Object.defineProperty(exports, "HAVEN_CLIENT_HEADER", {
|
|
4374
|
+
enumerable: true,
|
|
4375
|
+
get: function () { return chunkNQ7EEHIV_cjs.HAVEN_CLIENT_HEADER; }
|
|
4333
4376
|
});
|
|
4334
4377
|
Object.defineProperty(exports, "HAVEN_MINIMUM_NODE_VERSION", {
|
|
4335
4378
|
enumerable: true,
|
|
4336
|
-
get: function () { return
|
|
4379
|
+
get: function () { return chunkNQ7EEHIV_cjs.HAVEN_MINIMUM_NODE_VERSION; }
|
|
4337
4380
|
});
|
|
4338
4381
|
Object.defineProperty(exports, "HavenTypedDataRefusedError", {
|
|
4339
4382
|
enumerable: true,
|
|
4340
|
-
get: function () { return
|
|
4383
|
+
get: function () { return chunkNQ7EEHIV_cjs.HavenTypedDataRefusedError; }
|
|
4341
4384
|
});
|
|
4342
4385
|
Object.defineProperty(exports, "NEXT_TOOL_SERVER_NAMES", {
|
|
4343
4386
|
enumerable: true,
|
|
4344
|
-
get: function () { return
|
|
4387
|
+
get: function () { return chunkNQ7EEHIV_cjs.NEXT_TOOL_SERVER_NAMES; }
|
|
4345
4388
|
});
|
|
4346
4389
|
Object.defineProperty(exports, "NEXT_TOOL_SERVER_ROLES", {
|
|
4347
4390
|
enumerable: true,
|
|
4348
|
-
get: function () { return
|
|
4391
|
+
get: function () { return chunkNQ7EEHIV_cjs.NEXT_TOOL_SERVER_ROLES; }
|
|
4392
|
+
});
|
|
4393
|
+
Object.defineProperty(exports, "SDK_CLIENT_IDENTITY", {
|
|
4394
|
+
enumerable: true,
|
|
4395
|
+
get: function () { return chunkNQ7EEHIV_cjs.SDK_CLIENT_IDENTITY; }
|
|
4396
|
+
});
|
|
4397
|
+
Object.defineProperty(exports, "SDK_VERSION", {
|
|
4398
|
+
enumerable: true,
|
|
4399
|
+
get: function () { return chunkNQ7EEHIV_cjs.SDK_VERSION; }
|
|
4349
4400
|
});
|
|
4350
4401
|
Object.defineProperty(exports, "SWEEP_BASE_CHAIN_ID", {
|
|
4351
4402
|
enumerable: true,
|
|
4352
|
-
get: function () { return
|
|
4403
|
+
get: function () { return chunkNQ7EEHIV_cjs.SWEEP_BASE_CHAIN_ID; }
|
|
4353
4404
|
});
|
|
4354
4405
|
Object.defineProperty(exports, "SWEEP_BASE_SEPOLIA_CHAIN_ID", {
|
|
4355
4406
|
enumerable: true,
|
|
4356
|
-
get: function () { return
|
|
4407
|
+
get: function () { return chunkNQ7EEHIV_cjs.SWEEP_BASE_SEPOLIA_CHAIN_ID; }
|
|
4357
4408
|
});
|
|
4358
4409
|
Object.defineProperty(exports, "SWEEP_BASE_SEPOLIA_USDC_ADDRESS", {
|
|
4359
4410
|
enumerable: true,
|
|
4360
|
-
get: function () { return
|
|
4411
|
+
get: function () { return chunkNQ7EEHIV_cjs.SWEEP_BASE_SEPOLIA_USDC_ADDRESS; }
|
|
4361
4412
|
});
|
|
4362
4413
|
Object.defineProperty(exports, "SWEEP_BASE_USDC_ADDRESS", {
|
|
4363
4414
|
enumerable: true,
|
|
4364
|
-
get: function () { return
|
|
4415
|
+
get: function () { return chunkNQ7EEHIV_cjs.SWEEP_BASE_USDC_ADDRESS; }
|
|
4365
4416
|
});
|
|
4366
4417
|
Object.defineProperty(exports, "TRANSFER_WITH_AUTHORIZATION_TYPES", {
|
|
4367
4418
|
enumerable: true,
|
|
4368
|
-
get: function () { return
|
|
4419
|
+
get: function () { return chunkNQ7EEHIV_cjs.TRANSFER_WITH_AUTHORIZATION_TYPES; }
|
|
4369
4420
|
});
|
|
4370
4421
|
Object.defineProperty(exports, "TYPED_DATA_NOT_ALLOWED", {
|
|
4371
4422
|
enumerable: true,
|
|
4372
|
-
get: function () { return
|
|
4423
|
+
get: function () { return chunkNQ7EEHIV_cjs.TYPED_DATA_NOT_ALLOWED; }
|
|
4373
4424
|
});
|
|
4374
4425
|
Object.defineProperty(exports, "X402PaymentHeaderValidationError", {
|
|
4375
4426
|
enumerable: true,
|
|
4376
|
-
get: function () { return
|
|
4427
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402PaymentHeaderValidationError; }
|
|
4377
4428
|
});
|
|
4378
4429
|
Object.defineProperty(exports, "X402_LEGACY_PAYMENT_HEADER_NAME", {
|
|
4379
4430
|
enumerable: true,
|
|
4380
|
-
get: function () { return
|
|
4431
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_LEGACY_PAYMENT_HEADER_NAME; }
|
|
4381
4432
|
});
|
|
4382
4433
|
Object.defineProperty(exports, "X402_MAX_AUTHORIZATION_WINDOW_SECONDS", {
|
|
4383
4434
|
enumerable: true,
|
|
4384
|
-
get: function () { return
|
|
4435
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_MAX_AUTHORIZATION_WINDOW_SECONDS; }
|
|
4385
4436
|
});
|
|
4386
4437
|
Object.defineProperty(exports, "X402_PAYMENT_HEADER_NAME", {
|
|
4387
4438
|
enumerable: true,
|
|
4388
|
-
get: function () { return
|
|
4439
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_PAYMENT_HEADER_NAME; }
|
|
4389
4440
|
});
|
|
4390
4441
|
Object.defineProperty(exports, "X402_PAYMENT_HEADER_NAMES_SENT", {
|
|
4391
4442
|
enumerable: true,
|
|
4392
|
-
get: function () { return
|
|
4443
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_PAYMENT_HEADER_NAMES_SENT; }
|
|
4393
4444
|
});
|
|
4394
4445
|
Object.defineProperty(exports, "X402_PAYMENT_REQUIRED_HEADER_NAME", {
|
|
4395
4446
|
enumerable: true,
|
|
4396
|
-
get: function () { return
|
|
4447
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_PAYMENT_REQUIRED_HEADER_NAME; }
|
|
4397
4448
|
});
|
|
4398
4449
|
Object.defineProperty(exports, "X402_PAYMENT_RESPONSE_HEADER_NAME", {
|
|
4399
4450
|
enumerable: true,
|
|
4400
|
-
get: function () { return
|
|
4451
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_PAYMENT_RESPONSE_HEADER_NAME; }
|
|
4401
4452
|
});
|
|
4402
4453
|
Object.defineProperty(exports, "X402_SETTLEMENT_FORWARD_MARGIN_SECONDS", {
|
|
4403
4454
|
enumerable: true,
|
|
4404
|
-
get: function () { return
|
|
4455
|
+
get: function () { return chunkNQ7EEHIV_cjs.X402_SETTLEMENT_FORWARD_MARGIN_SECONDS; }
|
|
4405
4456
|
});
|
|
4406
4457
|
Object.defineProperty(exports, "assertBoundDirectPaymentUserOp", {
|
|
4407
4458
|
enumerable: true,
|
|
4408
|
-
get: function () { return
|
|
4459
|
+
get: function () { return chunkNQ7EEHIV_cjs.assertBoundDirectPaymentUserOp; }
|
|
4409
4460
|
});
|
|
4410
4461
|
Object.defineProperty(exports, "buildSweepAuthorizationMessage", {
|
|
4411
4462
|
enumerable: true,
|
|
4412
|
-
get: function () { return
|
|
4463
|
+
get: function () { return chunkNQ7EEHIV_cjs.buildSweepAuthorizationMessage; }
|
|
4413
4464
|
});
|
|
4414
4465
|
Object.defineProperty(exports, "buildSweepTypedData", {
|
|
4415
4466
|
enumerable: true,
|
|
4416
|
-
get: function () { return
|
|
4467
|
+
get: function () { return chunkNQ7EEHIV_cjs.buildSweepTypedData; }
|
|
4417
4468
|
});
|
|
4418
4469
|
Object.defineProperty(exports, "buildX402ExpectedMessage", {
|
|
4419
4470
|
enumerable: true,
|
|
4420
|
-
get: function () { return
|
|
4471
|
+
get: function () { return chunkNQ7EEHIV_cjs.buildX402ExpectedMessage; }
|
|
4421
4472
|
});
|
|
4422
4473
|
Object.defineProperty(exports, "compareNodeVersions", {
|
|
4423
4474
|
enumerable: true,
|
|
4424
|
-
get: function () { return
|
|
4475
|
+
get: function () { return chunkNQ7EEHIV_cjs.compareNodeVersions; }
|
|
4425
4476
|
});
|
|
4426
4477
|
Object.defineProperty(exports, "createNextStepBuilder", {
|
|
4427
4478
|
enumerable: true,
|
|
4428
|
-
get: function () { return
|
|
4479
|
+
get: function () { return chunkNQ7EEHIV_cjs.createNextStepBuilder; }
|
|
4429
4480
|
});
|
|
4430
4481
|
Object.defineProperty(exports, "decodeBase64Json", {
|
|
4431
4482
|
enumerable: true,
|
|
4432
|
-
get: function () { return
|
|
4483
|
+
get: function () { return chunkNQ7EEHIV_cjs.decodeBase64Json; }
|
|
4433
4484
|
});
|
|
4434
4485
|
Object.defineProperty(exports, "decodeBase64Utf8", {
|
|
4435
4486
|
enumerable: true,
|
|
4436
|
-
get: function () { return
|
|
4487
|
+
get: function () { return chunkNQ7EEHIV_cjs.decodeBase64Utf8; }
|
|
4437
4488
|
});
|
|
4438
4489
|
Object.defineProperty(exports, "defaultNextToolFor", {
|
|
4439
4490
|
enumerable: true,
|
|
4440
|
-
get: function () { return
|
|
4491
|
+
get: function () { return chunkNQ7EEHIV_cjs.defaultNextToolFor; }
|
|
4441
4492
|
});
|
|
4442
4493
|
Object.defineProperty(exports, "encodeBase64Json", {
|
|
4443
4494
|
enumerable: true,
|
|
4444
|
-
get: function () { return
|
|
4495
|
+
get: function () { return chunkNQ7EEHIV_cjs.encodeBase64Json; }
|
|
4445
4496
|
});
|
|
4446
4497
|
Object.defineProperty(exports, "encodeBase64Utf8", {
|
|
4447
4498
|
enumerable: true,
|
|
4448
|
-
get: function () { return
|
|
4499
|
+
get: function () { return chunkNQ7EEHIV_cjs.encodeBase64Utf8; }
|
|
4449
4500
|
});
|
|
4450
4501
|
Object.defineProperty(exports, "encodePaymentProof", {
|
|
4451
4502
|
enumerable: true,
|
|
4452
|
-
get: function () { return
|
|
4503
|
+
get: function () { return chunkNQ7EEHIV_cjs.encodePaymentProof; }
|
|
4504
|
+
});
|
|
4505
|
+
Object.defineProperty(exports, "havenClientIdentity", {
|
|
4506
|
+
enumerable: true,
|
|
4507
|
+
get: function () { return chunkNQ7EEHIV_cjs.havenClientIdentity; }
|
|
4453
4508
|
});
|
|
4454
4509
|
Object.defineProperty(exports, "isErc7710Option", {
|
|
4455
4510
|
enumerable: true,
|
|
4456
|
-
get: function () { return
|
|
4511
|
+
get: function () { return chunkNQ7EEHIV_cjs.isErc7710Option; }
|
|
4457
4512
|
});
|
|
4458
4513
|
Object.defineProperty(exports, "isSupportedNodeVersion", {
|
|
4459
4514
|
enumerable: true,
|
|
4460
|
-
get: function () { return
|
|
4515
|
+
get: function () { return chunkNQ7EEHIV_cjs.isSupportedNodeVersion; }
|
|
4461
4516
|
});
|
|
4462
4517
|
Object.defineProperty(exports, "isSweepableChain", {
|
|
4463
4518
|
enumerable: true,
|
|
4464
|
-
get: function () { return
|
|
4519
|
+
get: function () { return chunkNQ7EEHIV_cjs.isSweepableChain; }
|
|
4465
4520
|
});
|
|
4466
4521
|
Object.defineProperty(exports, "normalizePaymentRequired", {
|
|
4467
4522
|
enumerable: true,
|
|
4468
|
-
get: function () { return
|
|
4523
|
+
get: function () { return chunkNQ7EEHIV_cjs.normalizePaymentRequired; }
|
|
4469
4524
|
});
|
|
4470
4525
|
Object.defineProperty(exports, "parseNextTool", {
|
|
4471
4526
|
enumerable: true,
|
|
4472
|
-
get: function () { return
|
|
4527
|
+
get: function () { return chunkNQ7EEHIV_cjs.parseNextTool; }
|
|
4473
4528
|
});
|
|
4474
4529
|
Object.defineProperty(exports, "parsePaymentRequired", {
|
|
4475
4530
|
enumerable: true,
|
|
4476
|
-
get: function () { return
|
|
4531
|
+
get: function () { return chunkNQ7EEHIV_cjs.parsePaymentRequired; }
|
|
4477
4532
|
});
|
|
4478
4533
|
Object.defineProperty(exports, "parsePaymentRequiredResponse", {
|
|
4479
4534
|
enumerable: true,
|
|
4480
|
-
get: function () { return
|
|
4535
|
+
get: function () { return chunkNQ7EEHIV_cjs.parsePaymentRequiredResponse; }
|
|
4536
|
+
});
|
|
4537
|
+
Object.defineProperty(exports, "readClientUpdate", {
|
|
4538
|
+
enumerable: true,
|
|
4539
|
+
get: function () { return chunkNQ7EEHIV_cjs.readClientUpdate; }
|
|
4481
4540
|
});
|
|
4482
4541
|
Object.defineProperty(exports, "renderNextTool", {
|
|
4483
4542
|
enumerable: true,
|
|
4484
|
-
get: function () { return
|
|
4543
|
+
get: function () { return chunkNQ7EEHIV_cjs.renderNextTool; }
|
|
4485
4544
|
});
|
|
4486
4545
|
Object.defineProperty(exports, "resolveTokenFromAddress", {
|
|
4487
4546
|
enumerable: true,
|
|
4488
|
-
get: function () { return
|
|
4547
|
+
get: function () { return chunkNQ7EEHIV_cjs.resolveTokenFromAddress; }
|
|
4489
4548
|
});
|
|
4490
4549
|
Object.defineProperty(exports, "selectErc7710PaymentOption", {
|
|
4491
4550
|
enumerable: true,
|
|
4492
|
-
get: function () { return
|
|
4551
|
+
get: function () { return chunkNQ7EEHIV_cjs.selectErc7710PaymentOption; }
|
|
4493
4552
|
});
|
|
4494
4553
|
Object.defineProperty(exports, "selectPaymentOption", {
|
|
4495
4554
|
enumerable: true,
|
|
4496
|
-
get: function () { return
|
|
4555
|
+
get: function () { return chunkNQ7EEHIV_cjs.selectPaymentOption; }
|
|
4497
4556
|
});
|
|
4498
4557
|
Object.defineProperty(exports, "selectStandardPaymentOption", {
|
|
4499
4558
|
enumerable: true,
|
|
4500
|
-
get: function () { return
|
|
4559
|
+
get: function () { return chunkNQ7EEHIV_cjs.selectStandardPaymentOption; }
|
|
4501
4560
|
});
|
|
4502
4561
|
Object.defineProperty(exports, "selectX402SettlementScheme", {
|
|
4503
4562
|
enumerable: true,
|
|
4504
|
-
get: function () { return
|
|
4563
|
+
get: function () { return chunkNQ7EEHIV_cjs.selectX402SettlementScheme; }
|
|
4505
4564
|
});
|
|
4506
4565
|
Object.defineProperty(exports, "sweepUsdcAddress", {
|
|
4507
4566
|
enumerable: true,
|
|
4508
|
-
get: function () { return
|
|
4567
|
+
get: function () { return chunkNQ7EEHIV_cjs.sweepUsdcAddress; }
|
|
4509
4568
|
});
|
|
4510
4569
|
Object.defineProperty(exports, "sweepUsdcDomain", {
|
|
4511
4570
|
enumerable: true,
|
|
4512
|
-
get: function () { return
|
|
4571
|
+
get: function () { return chunkNQ7EEHIV_cjs.sweepUsdcDomain; }
|
|
4513
4572
|
});
|
|
4514
4573
|
Object.defineProperty(exports, "toStandardPaymentRequirements", {
|
|
4515
4574
|
enumerable: true,
|
|
4516
|
-
get: function () { return
|
|
4575
|
+
get: function () { return chunkNQ7EEHIV_cjs.toStandardPaymentRequirements; }
|
|
4517
4576
|
});
|
|
4518
4577
|
Object.defineProperty(exports, "unsupportedNodeVersionMessage", {
|
|
4519
4578
|
enumerable: true,
|
|
4520
|
-
get: function () { return
|
|
4579
|
+
get: function () { return chunkNQ7EEHIV_cjs.unsupportedNodeVersionMessage; }
|
|
4521
4580
|
});
|
|
4522
4581
|
Object.defineProperty(exports, "validateStandardX402PaymentHeader", {
|
|
4523
4582
|
enumerable: true,
|
|
4524
|
-
get: function () { return
|
|
4583
|
+
get: function () { return chunkNQ7EEHIV_cjs.validateStandardX402PaymentHeader; }
|
|
4525
4584
|
});
|
|
4526
4585
|
Object.defineProperty(exports, "x402AssetTransferMethod", {
|
|
4527
4586
|
enumerable: true,
|
|
4528
|
-
get: function () { return
|
|
4587
|
+
get: function () { return chunkNQ7EEHIV_cjs.x402AssetTransferMethod; }
|
|
4529
4588
|
});
|
|
4530
4589
|
Object.defineProperty(exports, "x402AuthorizationAmount", {
|
|
4531
4590
|
enumerable: true,
|
|
4532
|
-
get: function () { return
|
|
4591
|
+
get: function () { return chunkNQ7EEHIV_cjs.x402AuthorizationAmount; }
|
|
4533
4592
|
});
|
|
4534
4593
|
Object.defineProperty(exports, "x402FacilitatorAddresses", {
|
|
4535
4594
|
enumerable: true,
|
|
4536
|
-
get: function () { return
|
|
4595
|
+
get: function () { return chunkNQ7EEHIV_cjs.x402FacilitatorAddresses; }
|
|
4537
4596
|
});
|
|
4538
4597
|
Object.defineProperty(exports, "x402V2PaymentEnvelope", {
|
|
4539
4598
|
enumerable: true,
|
|
4540
|
-
get: function () { return
|
|
4599
|
+
get: function () { return chunkNQ7EEHIV_cjs.x402V2PaymentEnvelope; }
|
|
4541
4600
|
});
|
|
4542
4601
|
Object.defineProperty(exports, "AGENT_PAYMENT_FAILURE_CODE_VALUES", {
|
|
4543
4602
|
enumerable: true,
|
|
4544
|
-
get: function () { return
|
|
4603
|
+
get: function () { return chunkMRPENBYE_cjs.AGENT_PAYMENT_FAILURE_CODE_VALUES; }
|
|
4545
4604
|
});
|
|
4546
4605
|
Object.defineProperty(exports, "AGENT_PAYMENT_NEXT_ACTION_VALUES", {
|
|
4547
4606
|
enumerable: true,
|
|
4548
|
-
get: function () { return
|
|
4607
|
+
get: function () { return chunkMRPENBYE_cjs.AGENT_PAYMENT_NEXT_ACTION_VALUES; }
|
|
4549
4608
|
});
|
|
4550
4609
|
Object.defineProperty(exports, "AGENT_PAYMENT_PHASE_VALUES", {
|
|
4551
4610
|
enumerable: true,
|
|
4552
|
-
get: function () { return
|
|
4611
|
+
get: function () { return chunkMRPENBYE_cjs.AGENT_PAYMENT_PHASE_VALUES; }
|
|
4553
4612
|
});
|
|
4554
4613
|
Object.defineProperty(exports, "AGENT_PAYMENT_RAIL_VALUES", {
|
|
4555
4614
|
enumerable: true,
|
|
4556
|
-
get: function () { return
|
|
4615
|
+
get: function () { return chunkMRPENBYE_cjs.AGENT_PAYMENT_RAIL_VALUES; }
|
|
4557
4616
|
});
|
|
4558
4617
|
Object.defineProperty(exports, "AgentPaymentFailureCode", {
|
|
4559
4618
|
enumerable: true,
|
|
4560
|
-
get: function () { return
|
|
4619
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentFailureCode; }
|
|
4561
4620
|
});
|
|
4562
4621
|
Object.defineProperty(exports, "AgentPaymentFailureCodeDescriptions", {
|
|
4563
4622
|
enumerable: true,
|
|
4564
|
-
get: function () { return
|
|
4623
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentFailureCodeDescriptions; }
|
|
4565
4624
|
});
|
|
4566
4625
|
Object.defineProperty(exports, "AgentPaymentFailureCodeSchema", {
|
|
4567
4626
|
enumerable: true,
|
|
4568
|
-
get: function () { return
|
|
4627
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentFailureCodeSchema; }
|
|
4569
4628
|
});
|
|
4570
4629
|
Object.defineProperty(exports, "AgentPaymentNextAction", {
|
|
4571
4630
|
enumerable: true,
|
|
4572
|
-
get: function () { return
|
|
4631
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentNextAction; }
|
|
4573
4632
|
});
|
|
4574
4633
|
Object.defineProperty(exports, "AgentPaymentNextActionDescriptions", {
|
|
4575
4634
|
enumerable: true,
|
|
4576
|
-
get: function () { return
|
|
4635
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentNextActionDescriptions; }
|
|
4577
4636
|
});
|
|
4578
4637
|
Object.defineProperty(exports, "AgentPaymentNextActionSchema", {
|
|
4579
4638
|
enumerable: true,
|
|
4580
|
-
get: function () { return
|
|
4639
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentNextActionSchema; }
|
|
4581
4640
|
});
|
|
4582
4641
|
Object.defineProperty(exports, "AgentPaymentPhase", {
|
|
4583
4642
|
enumerable: true,
|
|
4584
|
-
get: function () { return
|
|
4643
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentPhase; }
|
|
4585
4644
|
});
|
|
4586
4645
|
Object.defineProperty(exports, "AgentPaymentPhaseDescriptions", {
|
|
4587
4646
|
enumerable: true,
|
|
4588
|
-
get: function () { return
|
|
4647
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentPhaseDescriptions; }
|
|
4589
4648
|
});
|
|
4590
4649
|
Object.defineProperty(exports, "AgentPaymentPhaseSchema", {
|
|
4591
4650
|
enumerable: true,
|
|
4592
|
-
get: function () { return
|
|
4651
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentPhaseSchema; }
|
|
4593
4652
|
});
|
|
4594
4653
|
Object.defineProperty(exports, "AgentPaymentRail", {
|
|
4595
4654
|
enumerable: true,
|
|
4596
|
-
get: function () { return
|
|
4655
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentRail; }
|
|
4597
4656
|
});
|
|
4598
4657
|
Object.defineProperty(exports, "AgentPaymentRailDescriptions", {
|
|
4599
4658
|
enumerable: true,
|
|
4600
|
-
get: function () { return
|
|
4659
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentRailDescriptions; }
|
|
4601
4660
|
});
|
|
4602
4661
|
Object.defineProperty(exports, "AgentPaymentRailSchema", {
|
|
4603
4662
|
enumerable: true,
|
|
4604
|
-
get: function () { return
|
|
4663
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentRailSchema; }
|
|
4605
4664
|
});
|
|
4606
4665
|
Object.defineProperty(exports, "AgentPaymentWarningCode", {
|
|
4607
4666
|
enumerable: true,
|
|
4608
|
-
get: function () { return
|
|
4667
|
+
get: function () { return chunkMRPENBYE_cjs.AgentPaymentWarningCode; }
|
|
4609
4668
|
});
|
|
4610
4669
|
Object.defineProperty(exports, "CONNECTOR_PACKAGE_NAME", {
|
|
4611
4670
|
enumerable: true,
|
|
4612
|
-
get: function () { return
|
|
4671
|
+
get: function () { return chunkMRPENBYE_cjs.CONNECTOR_PACKAGE_NAME; }
|
|
4613
4672
|
});
|
|
4614
4673
|
Object.defineProperty(exports, "DEFAULT_CONFIRMATION_TIMEOUT_MS", {
|
|
4615
4674
|
enumerable: true,
|
|
4616
|
-
get: function () { return
|
|
4675
|
+
get: function () { return chunkMRPENBYE_cjs.DEFAULT_CONFIRMATION_TIMEOUT_MS; }
|
|
4617
4676
|
});
|
|
4618
4677
|
Object.defineProperty(exports, "DIRECT_SIGN_CONTEXT_VERSION", {
|
|
4619
4678
|
enumerable: true,
|
|
4620
|
-
get: function () { return
|
|
4679
|
+
get: function () { return chunkMRPENBYE_cjs.DIRECT_SIGN_CONTEXT_VERSION; }
|
|
4621
4680
|
});
|
|
4622
4681
|
Object.defineProperty(exports, "ENTRY_POINT_V07", {
|
|
4623
4682
|
enumerable: true,
|
|
4624
|
-
get: function () { return
|
|
4683
|
+
get: function () { return chunkMRPENBYE_cjs.ENTRY_POINT_V07; }
|
|
4625
4684
|
});
|
|
4626
4685
|
Object.defineProperty(exports, "HAVEN_CONNECTOR_CHANNEL", {
|
|
4627
4686
|
enumerable: true,
|
|
4628
|
-
get: function () { return
|
|
4687
|
+
get: function () { return chunkMRPENBYE_cjs.HAVEN_CONNECTOR_CHANNEL; }
|
|
4629
4688
|
});
|
|
4630
4689
|
Object.defineProperty(exports, "HYBRID_DELEGATOR_DOMAIN_NAME", {
|
|
4631
4690
|
enumerable: true,
|
|
4632
|
-
get: function () { return
|
|
4691
|
+
get: function () { return chunkMRPENBYE_cjs.HYBRID_DELEGATOR_DOMAIN_NAME; }
|
|
4633
4692
|
});
|
|
4634
4693
|
Object.defineProperty(exports, "HYBRID_DELEGATOR_DOMAIN_VERSION", {
|
|
4635
4694
|
enumerable: true,
|
|
4636
|
-
get: function () { return
|
|
4695
|
+
get: function () { return chunkMRPENBYE_cjs.HYBRID_DELEGATOR_DOMAIN_VERSION; }
|
|
4637
4696
|
});
|
|
4638
4697
|
Object.defineProperty(exports, "HavenApiError", {
|
|
4639
4698
|
enumerable: true,
|
|
4640
|
-
get: function () { return
|
|
4699
|
+
get: function () { return chunkMRPENBYE_cjs.HavenApiError; }
|
|
4641
4700
|
});
|
|
4642
4701
|
Object.defineProperty(exports, "HavenError", {
|
|
4643
4702
|
enumerable: true,
|
|
4644
|
-
get: function () { return
|
|
4703
|
+
get: function () { return chunkMRPENBYE_cjs.HavenError; }
|
|
4645
4704
|
});
|
|
4646
4705
|
Object.defineProperty(exports, "HavenPaymentStateError", {
|
|
4647
4706
|
enumerable: true,
|
|
4648
|
-
get: function () { return
|
|
4707
|
+
get: function () { return chunkMRPENBYE_cjs.HavenPaymentStateError; }
|
|
4649
4708
|
});
|
|
4650
4709
|
Object.defineProperty(exports, "HavenSigningError", {
|
|
4651
4710
|
enumerable: true,
|
|
4652
|
-
get: function () { return
|
|
4711
|
+
get: function () { return chunkMRPENBYE_cjs.HavenSigningError; }
|
|
4653
4712
|
});
|
|
4654
4713
|
Object.defineProperty(exports, "HavenTimeoutError", {
|
|
4655
4714
|
enumerable: true,
|
|
4656
|
-
get: function () { return
|
|
4715
|
+
get: function () { return chunkMRPENBYE_cjs.HavenTimeoutError; }
|
|
4657
4716
|
});
|
|
4658
4717
|
Object.defineProperty(exports, "HavenUnsupportedSignerVersionError", {
|
|
4659
4718
|
enumerable: true,
|
|
4660
|
-
get: function () { return
|
|
4719
|
+
get: function () { return chunkMRPENBYE_cjs.HavenUnsupportedSignerVersionError; }
|
|
4661
4720
|
});
|
|
4662
4721
|
Object.defineProperty(exports, "HavenUserOpBindingError", {
|
|
4663
4722
|
enumerable: true,
|
|
4664
|
-
get: function () { return
|
|
4723
|
+
get: function () { return chunkMRPENBYE_cjs.HavenUserOpBindingError; }
|
|
4665
4724
|
});
|
|
4666
4725
|
Object.defineProperty(exports, "HavenZeroSettlementHashError", {
|
|
4667
4726
|
enumerable: true,
|
|
4668
|
-
get: function () { return
|
|
4727
|
+
get: function () { return chunkMRPENBYE_cjs.HavenZeroSettlementHashError; }
|
|
4669
4728
|
});
|
|
4670
4729
|
Object.defineProperty(exports, "MerchantTimeoutError", {
|
|
4671
4730
|
enumerable: true,
|
|
4672
|
-
get: function () { return
|
|
4731
|
+
get: function () { return chunkMRPENBYE_cjs.MerchantTimeoutError; }
|
|
4673
4732
|
});
|
|
4674
4733
|
Object.defineProperty(exports, "PACKED_USER_OPERATION_FIELDS", {
|
|
4675
4734
|
enumerable: true,
|
|
4676
|
-
get: function () { return
|
|
4735
|
+
get: function () { return chunkMRPENBYE_cjs.PACKED_USER_OPERATION_FIELDS; }
|
|
4677
4736
|
});
|
|
4678
4737
|
Object.defineProperty(exports, "ROOT_AUTHORITY", {
|
|
4679
4738
|
enumerable: true,
|
|
4680
|
-
get: function () { return
|
|
4739
|
+
get: function () { return chunkMRPENBYE_cjs.ROOT_AUTHORITY; }
|
|
4681
4740
|
});
|
|
4682
4741
|
Object.defineProperty(exports, "SIGNER_UPDATE_FALLBACK", {
|
|
4683
4742
|
enumerable: true,
|
|
4684
|
-
get: function () { return
|
|
4743
|
+
get: function () { return chunkMRPENBYE_cjs.SIGNER_UPDATE_FALLBACK; }
|
|
4685
4744
|
});
|
|
4686
4745
|
Object.defineProperty(exports, "SignerRefusalCode", {
|
|
4687
4746
|
enumerable: true,
|
|
4688
|
-
get: function () { return
|
|
4747
|
+
get: function () { return chunkMRPENBYE_cjs.SignerRefusalCode; }
|
|
4689
4748
|
});
|
|
4690
4749
|
Object.defineProperty(exports, "X402AlreadySettledError", {
|
|
4691
4750
|
enumerable: true,
|
|
4692
|
-
get: function () { return
|
|
4751
|
+
get: function () { return chunkMRPENBYE_cjs.X402AlreadySettledError; }
|
|
4693
4752
|
});
|
|
4694
4753
|
Object.defineProperty(exports, "X402UnexpectedStatusError", {
|
|
4695
4754
|
enumerable: true,
|
|
4696
|
-
get: function () { return
|
|
4755
|
+
get: function () { return chunkMRPENBYE_cjs.X402UnexpectedStatusError; }
|
|
4697
4756
|
});
|
|
4698
4757
|
Object.defineProperty(exports, "assertUserOpTypedDataBinding", {
|
|
4699
4758
|
enumerable: true,
|
|
4700
|
-
get: function () { return
|
|
4759
|
+
get: function () { return chunkMRPENBYE_cjs.assertUserOpTypedDataBinding; }
|
|
4701
4760
|
});
|
|
4702
4761
|
Object.defineProperty(exports, "connectorRerunCommand", {
|
|
4703
4762
|
enumerable: true,
|
|
4704
|
-
get: function () { return
|
|
4763
|
+
get: function () { return chunkMRPENBYE_cjs.connectorRerunCommand; }
|
|
4705
4764
|
});
|
|
4706
4765
|
Object.defineProperty(exports, "connectorSpec", {
|
|
4707
4766
|
enumerable: true,
|
|
4708
|
-
get: function () { return
|
|
4767
|
+
get: function () { return chunkMRPENBYE_cjs.connectorSpec; }
|
|
4709
4768
|
});
|
|
4710
4769
|
Object.defineProperty(exports, "deriveDelegateAccountAddress", {
|
|
4711
4770
|
enumerable: true,
|
|
4712
|
-
get: function () { return
|
|
4771
|
+
get: function () { return chunkMRPENBYE_cjs.deriveDelegateAccountAddress; }
|
|
4713
4772
|
});
|
|
4714
4773
|
Object.defineProperty(exports, "isConnectorChannel", {
|
|
4715
4774
|
enumerable: true,
|
|
4716
|
-
get: function () { return
|
|
4775
|
+
get: function () { return chunkMRPENBYE_cjs.isConnectorChannel; }
|
|
4717
4776
|
});
|
|
4718
4777
|
Object.defineProperty(exports, "isPackedUserOperationTypedData", {
|
|
4719
4778
|
enumerable: true,
|
|
4720
|
-
get: function () { return
|
|
4779
|
+
get: function () { return chunkMRPENBYE_cjs.isPackedUserOperationTypedData; }
|
|
4721
4780
|
});
|
|
4722
4781
|
Object.defineProperty(exports, "packedUserOperationHash", {
|
|
4723
4782
|
enumerable: true,
|
|
4724
|
-
get: function () { return
|
|
4783
|
+
get: function () { return chunkMRPENBYE_cjs.packedUserOperationHash; }
|
|
4725
4784
|
});
|
|
4726
4785
|
Object.defineProperty(exports, "resolveConnectorChannel", {
|
|
4727
4786
|
enumerable: true,
|
|
4728
|
-
get: function () { return
|
|
4787
|
+
get: function () { return chunkMRPENBYE_cjs.resolveConnectorChannel; }
|
|
4729
4788
|
});
|
|
4730
4789
|
Object.defineProperty(exports, "signerUpdateFallback", {
|
|
4731
4790
|
enumerable: true,
|
|
4732
|
-
get: function () { return
|
|
4791
|
+
get: function () { return chunkMRPENBYE_cjs.signerUpdateFallback; }
|
|
4733
4792
|
});
|
|
4734
4793
|
Object.defineProperty(exports, "verifySettlementChild", {
|
|
4735
4794
|
enumerable: true,
|
|
4736
|
-
get: function () { return
|
|
4795
|
+
get: function () { return chunkMRPENBYE_cjs.verifySettlementChild; }
|
|
4737
4796
|
});
|
|
4738
4797
|
exports.AGENT_APPROVAL_RELAY_JSON_SENTENCE = AGENT_APPROVAL_RELAY_JSON_SENTENCE;
|
|
4739
4798
|
exports.AGENT_APPROVAL_RELAY_PROSE_SENTENCE = AGENT_APPROVAL_RELAY_PROSE_SENTENCE;
|