@haven_ai/sdk 0.6.0-alpha.0 → 0.8.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/edge.cjs CHANGED
@@ -1,299 +1,510 @@
1
1
  'use strict';
2
2
 
3
- var chunkCK4NLLMO_cjs = require('./chunk-CK4NLLMO.cjs');
4
- var chunkS42QSWJY_cjs = require('./chunk-S42QSWJY.cjs');
5
- var secp256k1 = require('@noble/curves/secp256k1');
6
- var accounts = require('viem/accounts');
7
- var viem = require('viem');
3
+ var chunkWJFDXCYP_cjs = require('./chunk-WJFDXCYP.cjs');
4
+ var chunkHX34HOW4_cjs = require('./chunk-HX34HOW4.cjs');
8
5
 
9
- var HALF_N = BigInt("0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0");
10
- function hexBytes(value, bytes, what) {
11
- if (!/^0x[0-9a-fA-F]+$/.test(value) || value.length !== 2 + bytes * 2) {
12
- throw new Error(`${what} must be a 0x-prefixed ${bytes}-byte hex string`);
13
- }
14
- return value.slice(2);
6
+ // src/sub-budget-guards.ts
7
+ var ERC20_PERIOD_TRANSFER_ENFORCER = "0x474e3Ae7E169e940607cC624Da8A15Eb120139aB";
8
+ var DELEGATION_DOMAIN_NAME = "DelegationManager";
9
+ var DELEGATION_DOMAIN_VERSION = "1";
10
+ var EXPECTED_DELEGATION_TYPES = {
11
+ Caveat: [
12
+ { name: "enforcer", type: "address" },
13
+ { name: "terms", type: "bytes" }
14
+ ],
15
+ Delegation: [
16
+ { name: "delegate", type: "address" },
17
+ { name: "delegator", type: "address" },
18
+ { name: "authority", type: "bytes32" },
19
+ { name: "caveats", type: "Caveat[]" },
20
+ { name: "salt", type: "uint256" }
21
+ ]
22
+ };
23
+ function same(a, b) {
24
+ return !!a && !!b && a.toLowerCase() === b.toLowerCase();
25
+ }
26
+ function sliceTerms(terms, start, end) {
27
+ const body = terms.startsWith("0x") ? terms.slice(2).toLowerCase() : terms.toLowerCase();
28
+ return end === void 0 ? body.slice(start * 2) : body.slice(start * 2, end * 2);
29
+ }
30
+ function findCaveat(caveats, enforcer) {
31
+ return caveats.find((c) => same(c.enforcer, enforcer));
32
+ }
33
+ function hashSubBudgetDelegation(delegation) {
34
+ return chunkWJFDXCYP_cjs.hashDelegation(delegation);
35
+ }
36
+ function refuseSubBudgetChild(what, detail) {
37
+ throw new chunkWJFDXCYP_cjs.HavenTypedDataRefusedError(
38
+ `Refusing to sign the sub-budget child: ${what}. ${detail} This signature opens a slice of the delegating agent budget for another agent, so it is verified locally against the expectation Haven declared, rather than trusted.`
39
+ );
15
40
  }
16
- function addressFromKey(privateKey) {
17
- try {
18
- return accounts.privateKeyToAddress(`0x${hexBytes(privateKey, 32, "private key")}`);
19
- } catch (err) {
20
- throw new chunkS42QSWJY_cjs.HavenSigningError(
21
- `Invalid private key: ${err instanceof Error ? err.message : String(err)}`
41
+ function assertOwnSubBudgetChild(typedData, expected, delegateAddress, now = Date.now()) {
42
+ const td = typedData;
43
+ if (td?.primaryType !== "Delegation") {
44
+ refuseSubBudgetChild("it is not a Delegation payload", `primaryType was '${String(td?.primaryType)}'.`);
45
+ }
46
+ if (!same(td.domain?.verifyingContract, chunkHX34HOW4_cjs.DELEGATION_MANAGER)) {
47
+ refuseSubBudgetChild(
48
+ "the EIP-712 domain names an unknown DelegationManager",
49
+ `Expected ${chunkHX34HOW4_cjs.DELEGATION_MANAGER}, got ${td.domain?.verifyingContract}.`
22
50
  );
23
51
  }
24
- }
25
- function signHash(privateKey, hash) {
26
- try {
27
- const { r, s, recovery } = secp256k1.secp256k1.sign(hexBytes(hash, 32, "hash"), hexBytes(privateKey, 32, "private key"), { lowS: true });
28
- return viem.serializeSignature({
29
- r: `0x${r.toString(16).padStart(64, "0")}`,
30
- s: `0x${s.toString(16).padStart(64, "0")}`,
31
- yParity: recovery
32
- });
33
- } catch (err) {
34
- throw new chunkS42QSWJY_cjs.HavenSigningError(
35
- `Failed to sign hash: ${err instanceof Error ? err.message : String(err)}`
52
+ if (td.domain?.name !== DELEGATION_DOMAIN_NAME || td.domain?.version !== DELEGATION_DOMAIN_VERSION) {
53
+ refuseSubBudgetChild(
54
+ "the EIP-712 domain name/version does not match the pinned DelegationManager domain",
55
+ `Expected name '${DELEGATION_DOMAIN_NAME}' version '${DELEGATION_DOMAIN_VERSION}'; got name '${String(td.domain?.name)}' version '${String(td.domain?.version)}'.`
36
56
  );
37
57
  }
38
- }
39
- function verifySignature(hash, signature, expectedAddress) {
40
- try {
41
- const sig = hexBytes(signature, 65, "signature");
42
- const hashHex = hexBytes(hash, 32, "hash");
43
- if (BigInt(`0x${sig.slice(64, 128)}`) > HALF_N) return false;
44
- const yParityOrV = Number.parseInt(sig.slice(128), 16);
45
- const recoveryBit = yParityOrV === 0 || yParityOrV === 27 ? 0 : yParityOrV === 1 || yParityOrV === 28 ? 1 : -1;
46
- if (recoveryBit < 0) return false;
47
- const publicKey = secp256k1.secp256k1.Signature.fromCompact(sig.slice(0, 128)).addRecoveryBit(recoveryBit).recoverPublicKey(hashHex).toHex(false);
48
- const recovered = accounts.publicKeyToAddress(`0x${publicKey}`);
49
- return recovered.toLowerCase() === expectedAddress.toLowerCase();
50
- } catch {
51
- return false;
58
+ if (JSON.stringify(td.types?.Caveat) !== JSON.stringify(EXPECTED_DELEGATION_TYPES.Caveat) || JSON.stringify(td.types?.Delegation) !== JSON.stringify(EXPECTED_DELEGATION_TYPES.Delegation)) {
59
+ refuseSubBudgetChild(
60
+ "its EIP-712 type definitions do not match the pinned Delegation/Caveat shape",
61
+ "A renamed, reordered, or additional field on Delegation or Caveat could change what the caveats below mean without changing this check's field-by-field comparisons."
62
+ );
63
+ }
64
+ const domainChain = Number(td.domain?.chainId);
65
+ if (!Number.isFinite(domainChain) || !chunkWJFDXCYP_cjs.DIRECT_PAYMENT_CHAIN_IDS.has(domainChain)) {
66
+ refuseSubBudgetChild(
67
+ "it is scoped to a chain the delegation rail has no pinned contracts for",
68
+ `Chains with pinned contracts: ${[...chunkWJFDXCYP_cjs.DIRECT_PAYMENT_CHAIN_IDS].join(", ")}; the child says ${String(td.domain?.chainId)}.`
69
+ );
70
+ }
71
+ if (domainChain !== expected.chainId) {
72
+ refuseSubBudgetChild(
73
+ "it is scoped to the wrong chain",
74
+ `Expected chain ${expected.chainId}; the child says ${td.domain?.chainId}.`
75
+ );
76
+ }
77
+ const ownAccount = chunkHX34HOW4_cjs.deriveDelegateAccountAddress(delegateAddress);
78
+ const delegator = td.message?.delegator;
79
+ if (typeof delegator !== "string" || !same(delegator, ownAccount)) {
80
+ refuseSubBudgetChild(
81
+ "it is not delegated by this agent's own account",
82
+ `Expected delegator ${ownAccount}; the child names ${String(delegator)}.`
83
+ );
84
+ }
85
+ if (!same(delegator, expected.delegateAccount)) {
86
+ refuseSubBudgetChild(
87
+ "its delegator does not match the account Haven declared",
88
+ `Expected ${expected.delegateAccount}; the child names ${String(delegator)}.`
89
+ );
90
+ }
91
+ const delegate = td.message?.delegate;
92
+ if (typeof delegate !== "string" || !same(delegate, expected.childDelegateAccount)) {
93
+ refuseSubBudgetChild(
94
+ "its delegate does not match the declared child delegate",
95
+ `Expected ${expected.childDelegateAccount}; the child names ${String(delegate)}.`
96
+ );
97
+ }
98
+ const authority = td.message?.authority;
99
+ if (typeof authority !== "string" || !/^0x[0-9a-fA-F]{64}$/.test(authority)) {
100
+ refuseSubBudgetChild("its authority is not a 32-byte delegation hash", `Got ${String(authority)}.`);
101
+ }
102
+ if (authority.toLowerCase() === chunkHX34HOW4_cjs.ROOT_AUTHORITY) {
103
+ refuseSubBudgetChild(
104
+ "it is a ROOT delegation, not a re-delegation of the delegating agent budget",
105
+ "A sub-budget always chains under the delegating agent budget delegation."
106
+ );
107
+ }
108
+ if (!same(authority, expected.parentDelegationHash)) {
109
+ refuseSubBudgetChild(
110
+ "it chains under a different parent delegation",
111
+ `Expected authority ${expected.parentDelegationHash}; the child says ${authority}.`
112
+ );
113
+ }
114
+ const caveats = td.message?.caveats ?? [];
115
+ if (findCaveat(caveats, chunkHX34HOW4_cjs.CAVEAT_ENFORCERS.erc20TransferAmount)) {
116
+ refuseSubBudgetChild(
117
+ "it carries a hard-cap transfer-amount caveat (the task-budget shape)",
118
+ "A sub-budget is period-scoped: its amount caveat must be an ERC20PeriodTransferEnforcer caveat slicing the parent period meter, never a lifetime cap."
119
+ );
120
+ }
121
+ const period = findCaveat(caveats, ERC20_PERIOD_TRANSFER_ENFORCER);
122
+ if (!period) {
123
+ refuseSubBudgetChild(
124
+ "it has no ERC-20 period-transfer caveat",
125
+ "Without it the child is not bounded to a per-period amount."
126
+ );
127
+ }
128
+ const token = `0x${sliceTerms(period.terms, 0, 20)}`;
129
+ if (!same(token, expected.tokenAddress)) {
130
+ refuseSubBudgetChild("it spends a different token", `Expected ${expected.tokenAddress}, child pins ${token}.`);
131
+ }
132
+ const periodAmount = BigInt(`0x${sliceTerms(period.terms, 20, 52)}`);
133
+ if (periodAmount !== BigInt(expected.periodAmountAtomic)) {
134
+ refuseSubBudgetChild(
135
+ "the period amount does not match",
136
+ `Expected ${expected.periodAmountAtomic}; the child allows ${periodAmount.toString()}.`
137
+ );
138
+ }
139
+ const periodDuration = Number(BigInt(`0x${sliceTerms(period.terms, 52, 84)}`));
140
+ if (periodDuration !== expected.periodDurationSeconds) {
141
+ refuseSubBudgetChild(
142
+ "its period duration does not match the parent window Haven declared",
143
+ `Expected ${expected.periodDurationSeconds}s; the child says ${periodDuration}s. A sub-budget is a slice of the parent period meter \u2014 same window, smaller amount \u2014 never a different clock.`
144
+ );
145
+ }
146
+ const startDate = Number(BigInt(`0x${sliceTerms(period.terms, 84, 116)}`));
147
+ if (startDate !== expected.startDate) {
148
+ refuseSubBudgetChild(
149
+ "its period start does not match the parent anchor Haven declared",
150
+ `Expected ${expected.startDate}; the child says ${startDate}.`
151
+ );
152
+ }
153
+ const timestamp = findCaveat(caveats, chunkHX34HOW4_cjs.CAVEAT_ENFORCERS.timestamp);
154
+ if (!timestamp) {
155
+ refuseSubBudgetChild("it never expires", "A sub-budget child without a timestamp caveat is open-ended.");
156
+ }
157
+ const beforeThreshold = Number(BigInt(`0x${sliceTerms(timestamp.terms, 16, 32)}`));
158
+ const nowSec = Math.floor(now / 1e3);
159
+ if (beforeThreshold <= nowSec) {
160
+ refuseSubBudgetChild("it has already expired", `Expiry ${beforeThreshold} is not in the future.`);
161
+ }
162
+ if (beforeThreshold !== expected.expiresAt) {
163
+ refuseSubBudgetChild(
164
+ "its expiry does not match what Haven declared",
165
+ `Expected ${expected.expiresAt}; the child says ${beforeThreshold}.`
166
+ );
167
+ }
168
+ const calldata = findCaveat(caveats, chunkHX34HOW4_cjs.CAVEAT_ENFORCERS.allowedCalldata);
169
+ if (expected.recipientAddress) {
170
+ if (!calldata) {
171
+ refuseSubBudgetChild(
172
+ "it has no recipient pin",
173
+ "The sub-budget was issued with a pinned recipient, so the child must carry one."
174
+ );
175
+ }
176
+ const startIndex = BigInt(`0x${sliceTerms(calldata.terms, 0, 32)}`);
177
+ if (startIndex !== 4n) {
178
+ refuseSubBudgetChild(
179
+ "the recipient pin points at the wrong calldata offset",
180
+ `Expected offset 4, got ${startIndex.toString()}.`
181
+ );
182
+ }
183
+ const paddedRecipient = sliceTerms(calldata.terms, 32, 64);
184
+ if (paddedRecipient.slice(0, 24) !== "0".repeat(24)) {
185
+ refuseSubBudgetChild("the pinned recipient is not a plain address", "Its 32-byte word is not a padded address.");
186
+ }
187
+ const recipient = `0x${paddedRecipient.slice(24)}`;
188
+ if (!same(recipient, expected.recipientAddress)) {
189
+ refuseSubBudgetChild(
190
+ "it pins a different recipient than Haven declared",
191
+ `Expected ${expected.recipientAddress}; the child pins ${recipient}.`
192
+ );
193
+ }
194
+ } else if (calldata) {
195
+ refuseSubBudgetChild(
196
+ "it pins a recipient the sub-budget was not issued with",
197
+ "This sub-budget is open (no recipient pin); the child must not add one."
198
+ );
52
199
  }
53
200
  }
201
+ function assertOwnSubBudgetCloseUserOp(typedData, expected, delegateAddress) {
202
+ chunkWJFDXCYP_cjs.assertOwnTaskBudgetCloseUserOp(typedData, expected, delegateAddress);
203
+ }
54
204
 
55
205
  Object.defineProperty(exports, "CAVEAT_TYPEHASH", {
56
206
  enumerable: true,
57
- get: function () { return chunkCK4NLLMO_cjs.CAVEAT_TYPEHASH; }
207
+ get: function () { return chunkWJFDXCYP_cjs.CAVEAT_TYPEHASH; }
58
208
  });
59
209
  Object.defineProperty(exports, "DELEGATION_TYPEHASH", {
60
210
  enumerable: true,
61
- get: function () { return chunkCK4NLLMO_cjs.DELEGATION_TYPEHASH; }
211
+ get: function () { return chunkWJFDXCYP_cjs.DELEGATION_TYPEHASH; }
62
212
  });
63
213
  Object.defineProperty(exports, "DIRECT_PAYMENT_CHAIN_IDS", {
64
214
  enumerable: true,
65
- get: function () { return chunkCK4NLLMO_cjs.DIRECT_PAYMENT_CHAIN_IDS; }
215
+ get: function () { return chunkWJFDXCYP_cjs.DIRECT_PAYMENT_CHAIN_IDS; }
66
216
  });
67
217
  Object.defineProperty(exports, "EXECUTE_ABI", {
68
218
  enumerable: true,
69
- get: function () { return chunkCK4NLLMO_cjs.EXECUTE_ABI; }
219
+ get: function () { return chunkWJFDXCYP_cjs.EXECUTE_ABI; }
70
220
  });
71
221
  Object.defineProperty(exports, "HAVEN_CLIENT_HEADER", {
72
222
  enumerable: true,
73
- get: function () { return chunkCK4NLLMO_cjs.HAVEN_CLIENT_HEADER; }
223
+ get: function () { return chunkWJFDXCYP_cjs.HAVEN_CLIENT_HEADER; }
74
224
  });
75
225
  Object.defineProperty(exports, "HAVEN_MINIMUM_NODE_VERSION", {
76
226
  enumerable: true,
77
- get: function () { return chunkCK4NLLMO_cjs.HAVEN_MINIMUM_NODE_VERSION; }
227
+ get: function () { return chunkWJFDXCYP_cjs.HAVEN_MINIMUM_NODE_VERSION; }
78
228
  });
79
229
  Object.defineProperty(exports, "HavenTypedDataRefusedError", {
80
230
  enumerable: true,
81
- get: function () { return chunkCK4NLLMO_cjs.HavenTypedDataRefusedError; }
231
+ get: function () { return chunkWJFDXCYP_cjs.HavenTypedDataRefusedError; }
82
232
  });
83
233
  Object.defineProperty(exports, "MAX_TASK_BUDGET_TTL_SECONDS", {
84
234
  enumerable: true,
85
- get: function () { return chunkCK4NLLMO_cjs.MAX_TASK_BUDGET_TTL_SECONDS; }
235
+ get: function () { return chunkWJFDXCYP_cjs.MAX_TASK_BUDGET_TTL_SECONDS; }
236
+ });
237
+ Object.defineProperty(exports, "TAX_DECLARATION_DOMAIN", {
238
+ enumerable: true,
239
+ get: function () { return chunkWJFDXCYP_cjs.TAX_DECLARATION_DOMAIN; }
240
+ });
241
+ Object.defineProperty(exports, "TAX_DECLARATION_PRIMARY_TYPE", {
242
+ enumerable: true,
243
+ get: function () { return chunkWJFDXCYP_cjs.TAX_DECLARATION_PRIMARY_TYPE; }
244
+ });
245
+ Object.defineProperty(exports, "TAX_DECLARATION_TYPES", {
246
+ enumerable: true,
247
+ get: function () { return chunkWJFDXCYP_cjs.TAX_DECLARATION_TYPES; }
86
248
  });
87
249
  Object.defineProperty(exports, "TYPED_DATA_NOT_ALLOWED", {
88
250
  enumerable: true,
89
- get: function () { return chunkCK4NLLMO_cjs.TYPED_DATA_NOT_ALLOWED; }
251
+ get: function () { return chunkWJFDXCYP_cjs.TYPED_DATA_NOT_ALLOWED; }
252
+ });
253
+ Object.defineProperty(exports, "TaxDeclarationRefusedError", {
254
+ enumerable: true,
255
+ get: function () { return chunkWJFDXCYP_cjs.TaxDeclarationRefusedError; }
256
+ });
257
+ Object.defineProperty(exports, "X_TAX_DECLARATION_HEADER", {
258
+ enumerable: true,
259
+ get: function () { return chunkWJFDXCYP_cjs.X_TAX_DECLARATION_HEADER; }
260
+ });
261
+ Object.defineProperty(exports, "addressFromKey", {
262
+ enumerable: true,
263
+ get: function () { return chunkWJFDXCYP_cjs.addressFromKey; }
90
264
  });
91
265
  Object.defineProperty(exports, "assertBoundDirectPaymentUserOp", {
92
266
  enumerable: true,
93
- get: function () { return chunkCK4NLLMO_cjs.assertBoundDirectPaymentUserOp; }
267
+ get: function () { return chunkWJFDXCYP_cjs.assertBoundDirectPaymentUserOp; }
94
268
  });
95
269
  Object.defineProperty(exports, "assertFundingLegPaysDelegate", {
96
270
  enumerable: true,
97
- get: function () { return chunkCK4NLLMO_cjs.assertFundingLegPaysDelegate; }
271
+ get: function () { return chunkWJFDXCYP_cjs.assertFundingLegPaysDelegate; }
98
272
  });
99
273
  Object.defineProperty(exports, "assertOwnSettlementChild", {
100
274
  enumerable: true,
101
- get: function () { return chunkCK4NLLMO_cjs.assertOwnSettlementChild; }
275
+ get: function () { return chunkWJFDXCYP_cjs.assertOwnSettlementChild; }
102
276
  });
103
277
  Object.defineProperty(exports, "assertOwnTaskBudgetCloseUserOp", {
104
278
  enumerable: true,
105
- get: function () { return chunkCK4NLLMO_cjs.assertOwnTaskBudgetCloseUserOp; }
279
+ get: function () { return chunkWJFDXCYP_cjs.assertOwnTaskBudgetCloseUserOp; }
106
280
  });
107
281
  Object.defineProperty(exports, "assertOwnTaskChild", {
108
282
  enumerable: true,
109
- get: function () { return chunkCK4NLLMO_cjs.assertOwnTaskChild; }
283
+ get: function () { return chunkWJFDXCYP_cjs.assertOwnTaskChild; }
284
+ });
285
+ Object.defineProperty(exports, "buildSignedTaxDeclaration", {
286
+ enumerable: true,
287
+ get: function () { return chunkWJFDXCYP_cjs.buildSignedTaxDeclaration; }
110
288
  });
111
289
  Object.defineProperty(exports, "buildSweepAuthorizationMessage", {
112
290
  enumerable: true,
113
- get: function () { return chunkCK4NLLMO_cjs.buildSweepAuthorizationMessage; }
291
+ get: function () { return chunkWJFDXCYP_cjs.buildSweepAuthorizationMessage; }
114
292
  });
115
293
  Object.defineProperty(exports, "buildSweepTypedData", {
116
294
  enumerable: true,
117
- get: function () { return chunkCK4NLLMO_cjs.buildSweepTypedData; }
295
+ get: function () { return chunkWJFDXCYP_cjs.buildSweepTypedData; }
118
296
  });
119
297
  Object.defineProperty(exports, "buildX402ExpectedMessage", {
120
298
  enumerable: true,
121
- get: function () { return chunkCK4NLLMO_cjs.buildX402ExpectedMessage; }
299
+ get: function () { return chunkWJFDXCYP_cjs.buildX402ExpectedMessage; }
122
300
  });
123
301
  Object.defineProperty(exports, "createNextStepBuilder", {
124
302
  enumerable: true,
125
- get: function () { return chunkCK4NLLMO_cjs.createNextStepBuilder; }
303
+ get: function () { return chunkWJFDXCYP_cjs.createNextStepBuilder; }
126
304
  });
127
305
  Object.defineProperty(exports, "decodeBase64Json", {
128
306
  enumerable: true,
129
- get: function () { return chunkCK4NLLMO_cjs.decodeBase64Json; }
307
+ get: function () { return chunkWJFDXCYP_cjs.decodeBase64Json; }
130
308
  });
131
309
  Object.defineProperty(exports, "encodeBase64Json", {
132
310
  enumerable: true,
133
- get: function () { return chunkCK4NLLMO_cjs.encodeBase64Json; }
311
+ get: function () { return chunkWJFDXCYP_cjs.encodeBase64Json; }
312
+ });
313
+ Object.defineProperty(exports, "encodeTaxDeclarationHeader", {
314
+ enumerable: true,
315
+ get: function () { return chunkWJFDXCYP_cjs.encodeTaxDeclarationHeader; }
134
316
  });
135
317
  Object.defineProperty(exports, "hashDelegation", {
136
318
  enumerable: true,
137
- get: function () { return chunkCK4NLLMO_cjs.hashDelegation; }
319
+ get: function () { return chunkWJFDXCYP_cjs.hashDelegation; }
138
320
  });
139
321
  Object.defineProperty(exports, "havenClientIdentity", {
140
322
  enumerable: true,
141
- get: function () { return chunkCK4NLLMO_cjs.havenClientIdentity; }
323
+ get: function () { return chunkWJFDXCYP_cjs.havenClientIdentity; }
142
324
  });
143
325
  Object.defineProperty(exports, "isSupportedNodeVersion", {
144
326
  enumerable: true,
145
- get: function () { return chunkCK4NLLMO_cjs.isSupportedNodeVersion; }
327
+ get: function () { return chunkWJFDXCYP_cjs.isSupportedNodeVersion; }
146
328
  });
147
329
  Object.defineProperty(exports, "isTaskChildTypedData", {
148
330
  enumerable: true,
149
- get: function () { return chunkCK4NLLMO_cjs.isTaskChildTypedData; }
331
+ get: function () { return chunkWJFDXCYP_cjs.isTaskChildTypedData; }
332
+ });
333
+ Object.defineProperty(exports, "principalAttributionHash", {
334
+ enumerable: true,
335
+ get: function () { return chunkWJFDXCYP_cjs.principalAttributionHash; }
150
336
  });
151
337
  Object.defineProperty(exports, "readClientUpdate", {
152
338
  enumerable: true,
153
- get: function () { return chunkCK4NLLMO_cjs.readClientUpdate; }
339
+ get: function () { return chunkWJFDXCYP_cjs.readClientUpdate; }
154
340
  });
155
341
  Object.defineProperty(exports, "selectStandardPaymentOption", {
156
342
  enumerable: true,
157
- get: function () { return chunkCK4NLLMO_cjs.selectStandardPaymentOption; }
343
+ get: function () { return chunkWJFDXCYP_cjs.selectStandardPaymentOption; }
344
+ });
345
+ Object.defineProperty(exports, "signHash", {
346
+ enumerable: true,
347
+ get: function () { return chunkWJFDXCYP_cjs.signHash; }
348
+ });
349
+ Object.defineProperty(exports, "taxPrincipalId", {
350
+ enumerable: true,
351
+ get: function () { return chunkWJFDXCYP_cjs.taxPrincipalId; }
158
352
  });
159
353
  Object.defineProperty(exports, "toStandardPaymentRequirements", {
160
354
  enumerable: true,
161
- get: function () { return chunkCK4NLLMO_cjs.toStandardPaymentRequirements; }
355
+ get: function () { return chunkWJFDXCYP_cjs.toStandardPaymentRequirements; }
162
356
  });
163
357
  Object.defineProperty(exports, "unsupportedNodeVersionMessage", {
164
358
  enumerable: true,
165
- get: function () { return chunkCK4NLLMO_cjs.unsupportedNodeVersionMessage; }
359
+ get: function () { return chunkWJFDXCYP_cjs.unsupportedNodeVersionMessage; }
360
+ });
361
+ Object.defineProperty(exports, "verifySignature", {
362
+ enumerable: true,
363
+ get: function () { return chunkWJFDXCYP_cjs.verifySignature; }
364
+ });
365
+ Object.defineProperty(exports, "verifyTaxDeclarationSignature", {
366
+ enumerable: true,
367
+ get: function () { return chunkWJFDXCYP_cjs.verifyTaxDeclarationSignature; }
166
368
  });
167
369
  Object.defineProperty(exports, "x402AuthorizationAmount", {
168
370
  enumerable: true,
169
- get: function () { return chunkCK4NLLMO_cjs.x402AuthorizationAmount; }
371
+ get: function () { return chunkWJFDXCYP_cjs.x402AuthorizationAmount; }
170
372
  });
171
373
  Object.defineProperty(exports, "x402V2PaymentEnvelope", {
172
374
  enumerable: true,
173
- get: function () { return chunkCK4NLLMO_cjs.x402V2PaymentEnvelope; }
375
+ get: function () { return chunkWJFDXCYP_cjs.x402V2PaymentEnvelope; }
174
376
  });
175
377
  Object.defineProperty(exports, "AgentPaymentFailureCode", {
176
378
  enumerable: true,
177
- get: function () { return chunkS42QSWJY_cjs.AgentPaymentFailureCode; }
379
+ get: function () { return chunkHX34HOW4_cjs.AgentPaymentFailureCode; }
178
380
  });
179
381
  Object.defineProperty(exports, "AgentPaymentNextAction", {
180
382
  enumerable: true,
181
- get: function () { return chunkS42QSWJY_cjs.AgentPaymentNextAction; }
383
+ get: function () { return chunkHX34HOW4_cjs.AgentPaymentNextAction; }
182
384
  });
183
385
  Object.defineProperty(exports, "CAVEAT_ENFORCERS", {
184
386
  enumerable: true,
185
- get: function () { return chunkS42QSWJY_cjs.CAVEAT_ENFORCERS; }
387
+ get: function () { return chunkHX34HOW4_cjs.CAVEAT_ENFORCERS; }
186
388
  });
187
389
  Object.defineProperty(exports, "DELEGATION_MANAGER", {
188
390
  enumerable: true,
189
- get: function () { return chunkS42QSWJY_cjs.DELEGATION_MANAGER; }
391
+ get: function () { return chunkHX34HOW4_cjs.DELEGATION_MANAGER; }
190
392
  });
191
393
  Object.defineProperty(exports, "DELEGATION_TUPLE_COMPONENTS", {
192
394
  enumerable: true,
193
- get: function () { return chunkS42QSWJY_cjs.DELEGATION_TUPLE_COMPONENTS; }
395
+ get: function () { return chunkHX34HOW4_cjs.DELEGATION_TUPLE_COMPONENTS; }
194
396
  });
195
397
  Object.defineProperty(exports, "DIRECT_SIGN_CONTEXT_VERSION", {
196
398
  enumerable: true,
197
- get: function () { return chunkS42QSWJY_cjs.DIRECT_SIGN_CONTEXT_VERSION; }
399
+ get: function () { return chunkHX34HOW4_cjs.DIRECT_SIGN_CONTEXT_VERSION; }
198
400
  });
199
401
  Object.defineProperty(exports, "ENTRY_POINT_V07", {
200
402
  enumerable: true,
201
- get: function () { return chunkS42QSWJY_cjs.ENTRY_POINT_V07; }
403
+ get: function () { return chunkHX34HOW4_cjs.ENTRY_POINT_V07; }
202
404
  });
203
405
  Object.defineProperty(exports, "HAVEN_CONNECTOR_CHANNEL", {
204
406
  enumerable: true,
205
- get: function () { return chunkS42QSWJY_cjs.HAVEN_CONNECTOR_CHANNEL; }
407
+ get: function () { return chunkHX34HOW4_cjs.HAVEN_CONNECTOR_CHANNEL; }
206
408
  });
207
409
  Object.defineProperty(exports, "HYBRID_DELEGATOR_IMPLEMENTATION", {
208
410
  enumerable: true,
209
- get: function () { return chunkS42QSWJY_cjs.HYBRID_DELEGATOR_IMPLEMENTATION; }
411
+ get: function () { return chunkHX34HOW4_cjs.HYBRID_DELEGATOR_IMPLEMENTATION; }
210
412
  });
211
413
  Object.defineProperty(exports, "HavenApiError", {
212
414
  enumerable: true,
213
- get: function () { return chunkS42QSWJY_cjs.HavenApiError; }
415
+ get: function () { return chunkHX34HOW4_cjs.HavenApiError; }
214
416
  });
215
417
  Object.defineProperty(exports, "HavenError", {
216
418
  enumerable: true,
217
- get: function () { return chunkS42QSWJY_cjs.HavenError; }
419
+ get: function () { return chunkHX34HOW4_cjs.HavenError; }
218
420
  });
219
421
  Object.defineProperty(exports, "HavenSigningError", {
220
422
  enumerable: true,
221
- get: function () { return chunkS42QSWJY_cjs.HavenSigningError; }
423
+ get: function () { return chunkHX34HOW4_cjs.HavenSigningError; }
222
424
  });
223
425
  Object.defineProperty(exports, "HavenUnsupportedSignerVersionError", {
224
426
  enumerable: true,
225
- get: function () { return chunkS42QSWJY_cjs.HavenUnsupportedSignerVersionError; }
427
+ get: function () { return chunkHX34HOW4_cjs.HavenUnsupportedSignerVersionError; }
226
428
  });
227
429
  Object.defineProperty(exports, "HavenUserOpBindingError", {
228
430
  enumerable: true,
229
- get: function () { return chunkS42QSWJY_cjs.HavenUserOpBindingError; }
431
+ get: function () { return chunkHX34HOW4_cjs.HavenUserOpBindingError; }
230
432
  });
231
433
  Object.defineProperty(exports, "MAX_SETTLEMENT_WINDOW_SECONDS", {
232
434
  enumerable: true,
233
- get: function () { return chunkS42QSWJY_cjs.MAX_SETTLEMENT_WINDOW_SECONDS; }
435
+ get: function () { return chunkHX34HOW4_cjs.MAX_SETTLEMENT_WINDOW_SECONDS; }
234
436
  });
235
437
  Object.defineProperty(exports, "REDEEM_DELEGATIONS_ABI", {
236
438
  enumerable: true,
237
- get: function () { return chunkS42QSWJY_cjs.REDEEM_DELEGATIONS_ABI; }
439
+ get: function () { return chunkHX34HOW4_cjs.REDEEM_DELEGATIONS_ABI; }
238
440
  });
239
441
  Object.defineProperty(exports, "ROOT_AUTHORITY", {
240
442
  enumerable: true,
241
- get: function () { return chunkS42QSWJY_cjs.ROOT_AUTHORITY; }
443
+ get: function () { return chunkHX34HOW4_cjs.ROOT_AUTHORITY; }
242
444
  });
243
445
  Object.defineProperty(exports, "SIGNER_UPDATE_FALLBACK", {
244
446
  enumerable: true,
245
- get: function () { return chunkS42QSWJY_cjs.SIGNER_UPDATE_FALLBACK; }
447
+ get: function () { return chunkHX34HOW4_cjs.SIGNER_UPDATE_FALLBACK; }
246
448
  });
247
449
  Object.defineProperty(exports, "SIMPLE_FACTORY_ADDRESS", {
248
450
  enumerable: true,
249
- get: function () { return chunkS42QSWJY_cjs.SIMPLE_FACTORY_ADDRESS; }
451
+ get: function () { return chunkHX34HOW4_cjs.SIMPLE_FACTORY_ADDRESS; }
250
452
  });
251
453
  Object.defineProperty(exports, "SINGLE_DEFAULT_MODE", {
252
454
  enumerable: true,
253
- get: function () { return chunkS42QSWJY_cjs.SINGLE_DEFAULT_MODE; }
455
+ get: function () { return chunkHX34HOW4_cjs.SINGLE_DEFAULT_MODE; }
254
456
  });
255
457
  Object.defineProperty(exports, "SignerRefusalCode", {
256
458
  enumerable: true,
257
- get: function () { return chunkS42QSWJY_cjs.SignerRefusalCode; }
459
+ get: function () { return chunkHX34HOW4_cjs.SignerRefusalCode; }
460
+ });
461
+ Object.defineProperty(exports, "TASK_SIGN_CONTEXT_VERSION", {
462
+ enumerable: true,
463
+ get: function () { return chunkHX34HOW4_cjs.TASK_SIGN_CONTEXT_VERSION; }
258
464
  });
259
465
  Object.defineProperty(exports, "assertRedeemsOwnBudgetDelegation", {
260
466
  enumerable: true,
261
- get: function () { return chunkS42QSWJY_cjs.assertRedeemsOwnBudgetDelegation; }
467
+ get: function () { return chunkHX34HOW4_cjs.assertRedeemsOwnBudgetDelegation; }
262
468
  });
263
469
  Object.defineProperty(exports, "assertUserOpTypedDataBinding", {
264
470
  enumerable: true,
265
- get: function () { return chunkS42QSWJY_cjs.assertUserOpTypedDataBinding; }
471
+ get: function () { return chunkHX34HOW4_cjs.assertUserOpTypedDataBinding; }
266
472
  });
267
473
  Object.defineProperty(exports, "chainIdForNetwork", {
268
474
  enumerable: true,
269
- get: function () { return chunkS42QSWJY_cjs.chainIdForNetwork; }
475
+ get: function () { return chunkHX34HOW4_cjs.chainIdForNetwork; }
270
476
  });
271
477
  Object.defineProperty(exports, "connectorRerunCommand", {
272
478
  enumerable: true,
273
- get: function () { return chunkS42QSWJY_cjs.connectorRerunCommand; }
479
+ get: function () { return chunkHX34HOW4_cjs.connectorRerunCommand; }
480
+ });
481
+ Object.defineProperty(exports, "connectorUpgradeCommand", {
482
+ enumerable: true,
483
+ get: function () { return chunkHX34HOW4_cjs.connectorUpgradeCommand; }
274
484
  });
275
485
  Object.defineProperty(exports, "deriveDelegateAccountAddress", {
276
486
  enumerable: true,
277
- get: function () { return chunkS42QSWJY_cjs.deriveDelegateAccountAddress; }
487
+ get: function () { return chunkHX34HOW4_cjs.deriveDelegateAccountAddress; }
278
488
  });
279
489
  Object.defineProperty(exports, "isPackedUserOperationTypedData", {
280
490
  enumerable: true,
281
- get: function () { return chunkS42QSWJY_cjs.isPackedUserOperationTypedData; }
491
+ get: function () { return chunkHX34HOW4_cjs.isPackedUserOperationTypedData; }
282
492
  });
283
493
  Object.defineProperty(exports, "isSettlementChildTypedData", {
284
494
  enumerable: true,
285
- get: function () { return chunkS42QSWJY_cjs.isSettlementChildTypedData; }
495
+ get: function () { return chunkHX34HOW4_cjs.isSettlementChildTypedData; }
286
496
  });
287
497
  Object.defineProperty(exports, "packedUserOperationHash", {
288
498
  enumerable: true,
289
- get: function () { return chunkS42QSWJY_cjs.packedUserOperationHash; }
499
+ get: function () { return chunkHX34HOW4_cjs.packedUserOperationHash; }
290
500
  });
291
501
  Object.defineProperty(exports, "verifySettlementChild", {
292
502
  enumerable: true,
293
- get: function () { return chunkS42QSWJY_cjs.verifySettlementChild; }
503
+ get: function () { return chunkHX34HOW4_cjs.verifySettlementChild; }
294
504
  });
295
- exports.addressFromKey = addressFromKey;
296
- exports.signHash = signHash;
297
- exports.verifySignature = verifySignature;
505
+ exports.ERC20_PERIOD_TRANSFER_ENFORCER = ERC20_PERIOD_TRANSFER_ENFORCER;
506
+ exports.assertOwnSubBudgetChild = assertOwnSubBudgetChild;
507
+ exports.assertOwnSubBudgetCloseUserOp = assertOwnSubBudgetCloseUserOp;
508
+ exports.hashSubBudgetDelegation = hashSubBudgetDelegation;
298
509
  //# sourceMappingURL=edge.cjs.map
299
510
  //# sourceMappingURL=edge.cjs.map