@metamask/smart-accounts-kit 1.4.0 → 1.6.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +57 -24
  2. package/dist/actions/index.cjs +9 -6
  3. package/dist/actions/index.cjs.map +1 -1
  4. package/dist/actions/index.d.cts +5 -3
  5. package/dist/actions/index.d.ts +5 -3
  6. package/dist/actions/index.mjs +8 -5
  7. package/dist/{caveats-BhjGBVHX.d.ts → caveats-B2OssjV4.d.ts} +1 -2
  8. package/dist/{caveats-CeHBbmt_.d.cts → caveats-gqMBZKkI.d.cts} +1 -2
  9. package/dist/{chunk-SOFB2MXG.cjs → chunk-2OS36DVV.cjs} +8 -1
  10. package/dist/chunk-2OS36DVV.cjs.map +1 -0
  11. package/dist/{chunk-6CEOFJY5.cjs → chunk-2ZOWIAP3.cjs} +266 -114
  12. package/dist/chunk-2ZOWIAP3.cjs.map +1 -0
  13. package/dist/{chunk-R2WT54GZ.mjs → chunk-AZYTTGON.mjs} +214 -62
  14. package/dist/chunk-AZYTTGON.mjs.map +1 -0
  15. package/dist/{chunk-MVBU3LRV.cjs → chunk-DCI2AN4N.cjs} +15 -17
  16. package/dist/chunk-DCI2AN4N.cjs.map +1 -0
  17. package/dist/{chunk-RR2AMG4A.cjs → chunk-EPU4O7FY.cjs} +158 -151
  18. package/dist/chunk-EPU4O7FY.cjs.map +1 -0
  19. package/dist/{chunk-QCULIK3O.mjs → chunk-GMGJRC3D.mjs} +8 -1
  20. package/dist/chunk-GMGJRC3D.mjs.map +1 -0
  21. package/dist/chunk-IMO6XNDJ.mjs +14 -0
  22. package/dist/chunk-IMO6XNDJ.mjs.map +1 -0
  23. package/dist/chunk-IQT6XFDT.cjs +14 -0
  24. package/dist/chunk-IQT6XFDT.cjs.map +1 -0
  25. package/dist/{chunk-SO5JAXGD.cjs → chunk-JKVSTPEC.cjs} +200 -18
  26. package/dist/chunk-JKVSTPEC.cjs.map +1 -0
  27. package/dist/{chunk-DVJX76J3.mjs → chunk-K7GTZGKJ.mjs} +2 -2
  28. package/dist/{chunk-HQHXGWNJ.mjs → chunk-L3EZCIY6.mjs} +67 -60
  29. package/dist/chunk-L3EZCIY6.mjs.map +1 -0
  30. package/dist/{chunk-XZ7UMCG3.cjs → chunk-PQPAEHJZ.cjs} +12 -12
  31. package/dist/{chunk-XZ7UMCG3.cjs.map → chunk-PQPAEHJZ.cjs.map} +1 -1
  32. package/dist/{chunk-EEIIVBNV.mjs → chunk-TNGQTVSY.mjs} +225 -53
  33. package/dist/chunk-TNGQTVSY.mjs.map +1 -0
  34. package/dist/{chunk-FG2CQGSE.mjs → chunk-UJQ3JN3U.mjs} +4 -6
  35. package/dist/{chunk-FG2CQGSE.mjs.map → chunk-UJQ3JN3U.mjs.map} +1 -1
  36. package/dist/{chunk-TMO23YRP.cjs → chunk-W6HPAK4M.cjs} +262 -90
  37. package/dist/chunk-W6HPAK4M.cjs.map +1 -0
  38. package/dist/{chunk-ZGBFPD4O.mjs → chunk-YVU66KSH.mjs} +188 -6
  39. package/dist/chunk-YVU66KSH.mjs.map +1 -0
  40. package/dist/contracts/index.cjs +5 -6
  41. package/dist/contracts/index.cjs.map +1 -1
  42. package/dist/contracts/index.d.cts +4 -3
  43. package/dist/contracts/index.d.ts +4 -3
  44. package/dist/contracts/index.mjs +4 -5
  45. package/dist/decodeRevertReason-CmmCpmZ_.d.cts +72 -0
  46. package/dist/decodeRevertReason-dOTpJx2h.d.ts +72 -0
  47. package/dist/experimental/index.cjs +364 -9
  48. package/dist/experimental/index.cjs.map +1 -1
  49. package/dist/experimental/index.d.cts +39 -3
  50. package/dist/experimental/index.d.ts +39 -3
  51. package/dist/experimental/index.mjs +357 -2
  52. package/dist/experimental/index.mjs.map +1 -1
  53. package/dist/index-B1Cmezvh.d.cts +61 -0
  54. package/dist/{index-DRKgDSZW.d.ts → index-BkgdU4LI.d.ts} +99 -92
  55. package/dist/{index-Cg-JakqA.d.ts → index-DUJmm8Wz.d.ts} +46 -5
  56. package/dist/{index-DzL9ccjU.d.cts → index-Dv4jPzhe.d.cts} +99 -92
  57. package/dist/index-LqiEgBjV.d.ts +61 -0
  58. package/dist/{index-BToRQKyJ.d.cts → index-X7Qn3JTg.d.cts} +46 -5
  59. package/dist/index.cjs +22 -24
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +8 -7
  62. package/dist/index.d.ts +8 -7
  63. package/dist/index.mjs +9 -11
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/{delegation-CR99q1-n.d.ts → resolveCaveats-A9xC29l8.d.cts} +160 -111
  66. package/dist/{delegation-DoVULGYE.d.cts → resolveCaveats-A9xC29l8.d.ts} +160 -111
  67. package/dist/utils/index.cjs +13 -6
  68. package/dist/utils/index.cjs.map +1 -1
  69. package/dist/utils/index.d.cts +8 -4
  70. package/dist/utils/index.d.ts +8 -4
  71. package/dist/utils/index.mjs +16 -9
  72. package/package.json +7 -6
  73. package/dist/chunk-4QXIOE7F.mjs +0 -79
  74. package/dist/chunk-4QXIOE7F.mjs.map +0 -1
  75. package/dist/chunk-6CEOFJY5.cjs.map +0 -1
  76. package/dist/chunk-EEIIVBNV.mjs.map +0 -1
  77. package/dist/chunk-HQHXGWNJ.mjs.map +0 -1
  78. package/dist/chunk-MOHCTPYQ.cjs +0 -79
  79. package/dist/chunk-MOHCTPYQ.cjs.map +0 -1
  80. package/dist/chunk-MVBU3LRV.cjs.map +0 -1
  81. package/dist/chunk-QCULIK3O.mjs.map +0 -1
  82. package/dist/chunk-R2WT54GZ.mjs.map +0 -1
  83. package/dist/chunk-RR2AMG4A.cjs.map +0 -1
  84. package/dist/chunk-SO5JAXGD.cjs.map +0 -1
  85. package/dist/chunk-SOFB2MXG.cjs.map +0 -1
  86. package/dist/chunk-TMO23YRP.cjs.map +0 -1
  87. package/dist/chunk-ZGBFPD4O.mjs.map +0 -1
  88. package/dist/types-BWaH4KH1.d.cts +0 -155
  89. package/dist/types-BWaH4KH1.d.ts +0 -155
  90. /package/dist/{chunk-DVJX76J3.mjs.map → chunk-K7GTZGKJ.mjs.map} +0 -0
@@ -1,6 +1,158 @@
1
- import { Hex, AbiFunction, Address, AbiParameter, TypedData } from 'viem';
2
- import { S as SmartAccountsEnvironment, C as Caveat, b as CaveatType, g as ScopeType, D as Delegation, P as PermissionContext } from './types-BWaH4KH1.js';
3
- import { BalanceChangeType } from '@metamask/delegation-core';
1
+ import { HybridDeleGator, MultiSigDeleGator, EIP7702StatelessDeleGator } from '@metamask/delegation-abis';
2
+ import { Account, Hex, WalletClient, Transport, Chain, PublicClient, NonceManager, OneOf, Address, AbiFunction } from 'viem';
3
+ import { WebAuthnAccount, SmartAccount, SmartAccountImplementation, entryPoint07Abi } from 'viem/account-abstraction';
4
+ import { Prettify } from 'viem/chains';
5
+ import { ApprovalRevocationTerms, BalanceChangeType } from '@metamask/delegation-core';
6
+
7
+ declare enum Implementation {
8
+ MultiSig = "MultiSig",
9
+ Hybrid = "Hybrid",
10
+ Stateless7702 = "Stateless7702"
11
+ }
12
+ declare enum TransferWindow {
13
+ Hourly = 3600,
14
+ Daily = 86400,
15
+ Weekly = 604800,
16
+ BiWeekly = 1209600,
17
+ Monthly = 2592000,
18
+ Quarterly = 7776000,
19
+ Yearly = 31536000
20
+ }
21
+ declare enum ScopeType {
22
+ Erc20TransferAmount = "erc20TransferAmount",
23
+ Erc20Streaming = "erc20Streaming",
24
+ Erc20PeriodTransfer = "erc20PeriodTransfer",
25
+ NativeTokenTransferAmount = "nativeTokenTransferAmount",
26
+ NativeTokenStreaming = "nativeTokenStreaming",
27
+ NativeTokenPeriodTransfer = "nativeTokenPeriodTransfer",
28
+ Erc721Transfer = "erc721Transfer",
29
+ OwnershipTransfer = "ownershipTransfer",
30
+ FunctionCall = "functionCall"
31
+ }
32
+ declare enum CaveatType {
33
+ AllowedMethods = "allowedMethods",
34
+ AllowedTargets = "allowedTargets",
35
+ ApprovalRevocation = "approvalRevocation",
36
+ Deployed = "deployed",
37
+ AllowedCalldata = "allowedCalldata",
38
+ Erc20BalanceChange = "erc20BalanceChange",
39
+ Erc721BalanceChange = "erc721BalanceChange",
40
+ Erc1155BalanceChange = "erc1155BalanceChange",
41
+ ValueLte = "valueLte",
42
+ LimitedCalls = "limitedCalls",
43
+ Id = "id",
44
+ Nonce = "nonce",
45
+ Timestamp = "timestamp",
46
+ BlockNumber = "blockNumber",
47
+ Erc20TransferAmount = "erc20TransferAmount",
48
+ Erc20Streaming = "erc20Streaming",
49
+ NativeTokenStreaming = "nativeTokenStreaming",
50
+ Erc721Transfer = "erc721Transfer",
51
+ NativeTokenTransferAmount = "nativeTokenTransferAmount",
52
+ NativeBalanceChange = "nativeBalanceChange",
53
+ Redeemer = "redeemer",
54
+ NativeTokenPayment = "nativeTokenPayment",
55
+ ArgsEqualityCheck = "argsEqualityCheck",
56
+ SpecificActionERC20TransferBatch = "specificActionERC20TransferBatch",
57
+ Erc20PeriodTransfer = "erc20PeriodTransfer",
58
+ NativeTokenPeriodTransfer = "nativeTokenPeriodTransfer",
59
+ ExactCalldataBatch = "exactCalldataBatch",
60
+ ExactCalldata = "exactCalldata",
61
+ ExactExecution = "exactExecution",
62
+ ExactExecutionBatch = "exactExecutionBatch",
63
+ MultiTokenPeriod = "multiTokenPeriod",
64
+ OwnershipTransfer = "ownershipTransfer"
65
+ }
66
+
67
+ type Caveat = {
68
+ enforcer: Hex;
69
+ terms: Hex;
70
+ args: Hex;
71
+ };
72
+ type Delegation = {
73
+ delegate: Hex;
74
+ delegator: Hex;
75
+ authority: Hex;
76
+ caveats: Caveat[];
77
+ salt: Hex;
78
+ signature: Hex;
79
+ };
80
+ type PermissionContext = Delegation[] | Hex;
81
+ type SmartAccountsEnvironment = {
82
+ DelegationManager: Hex;
83
+ EntryPoint: Hex;
84
+ SimpleFactory: Hex;
85
+ implementations: {
86
+ [implementation: string]: Hex;
87
+ };
88
+ caveatEnforcers: {
89
+ [enforcer: string]: Hex;
90
+ };
91
+ };
92
+ type MultiSigDeleGatorDeployParams = [signers: Hex[], threshold: bigint];
93
+ type HybridDeleGatorDeployParams = [
94
+ owner: Hex,
95
+ keyIds: string[],
96
+ xValues: bigint[],
97
+ yValues: bigint[]
98
+ ];
99
+ type DeployParams<TImplementation extends Implementation> = {
100
+ [Implementation.MultiSig]: MultiSigDeleGatorDeployParams;
101
+ [Implementation.Hybrid]: HybridDeleGatorDeployParams;
102
+ [Implementation.Stateless7702]: never;
103
+ }[TImplementation];
104
+ type ToMetaMaskSmartAccountParameters<TImplementation extends Implementation> = {
105
+ client: PublicClient;
106
+ implementation: TImplementation;
107
+ signer?: SignerConfigByImplementation<TImplementation>;
108
+ environment?: SmartAccountsEnvironment;
109
+ nonceKeyManager?: NonceManager;
110
+ } & OneOf<{
111
+ deployParams: DeployParams<TImplementation>;
112
+ deploySalt: Hex;
113
+ } | {
114
+ address: Address;
115
+ }>;
116
+ type SignUserOperationParams = Parameters<ToMetaMaskSmartAccountReturnType<Implementation>['signUserOperation']>[0];
117
+ type SignDelegationParams = {
118
+ delegation: Omit<Delegation, 'signature'>;
119
+ } & {
120
+ chainId?: number;
121
+ };
122
+ type MetaMaskSmartAccountImplementation<TImplementation extends Implementation> = SmartAccountImplementation<typeof entryPoint07Abi, '0.7', {
123
+ abi: {
124
+ [Implementation.Hybrid]: typeof HybridDeleGator;
125
+ [Implementation.MultiSig]: typeof MultiSigDeleGator;
126
+ [Implementation.Stateless7702]: typeof EIP7702StatelessDeleGator;
127
+ }[TImplementation];
128
+ signDelegation: (params: SignDelegationParams) => Promise<Hex>;
129
+ environment: SmartAccountsEnvironment;
130
+ }>;
131
+ type MetaMaskSmartAccount<TImplementation extends Implementation = Implementation> = ToMetaMaskSmartAccountReturnType<TImplementation>;
132
+ type ToMetaMaskSmartAccountReturnType<TImplementation extends Implementation> = Prettify<SmartAccount<MetaMaskSmartAccountImplementation<TImplementation>>>;
133
+ type WalletSignerConfig = {
134
+ walletClient: WalletClient<Transport, Chain | undefined, Account>;
135
+ };
136
+ type AccountSignerConfig = {
137
+ account: Pick<Account, 'signMessage' | 'signTypedData' | 'address'>;
138
+ };
139
+ type WebAuthnSignerConfig = {
140
+ webAuthnAccount: WebAuthnAccount;
141
+ keyId: Hex;
142
+ };
143
+ type HybridSignerConfig = WalletSignerConfig | AccountSignerConfig | WebAuthnSignerConfig;
144
+ type MultiSigSignerConfig = (WalletSignerConfig | AccountSignerConfig)[];
145
+ type Stateless7702SignerConfig = WalletSignerConfig | AccountSignerConfig;
146
+ type SignerConfigByImplementation<TImplementation extends Implementation> = {
147
+ [Implementation.Hybrid]: HybridSignerConfig;
148
+ [Implementation.MultiSig]: MultiSigSignerConfig;
149
+ [Implementation.Stateless7702]: Stateless7702SignerConfig;
150
+ }[TImplementation];
151
+ type Call = {
152
+ to: Hex;
153
+ data?: Hex | undefined;
154
+ value?: bigint | undefined;
155
+ };
4
156
 
5
157
  type AllowedCalldataBuilderConfig = {
6
158
  startIndex: number;
@@ -19,6 +171,9 @@ type AllowedTargetsBuilderConfig = {
19
171
  };
20
172
  declare const allowedTargetsBuilder: (environment: SmartAccountsEnvironment, config: AllowedTargetsBuilderConfig) => Caveat;
21
173
 
174
+ type ApprovalRevocationBuilderConfig = ApprovalRevocationTerms;
175
+ declare const approvalRevocationBuilder: (environment: SmartAccountsEnvironment, config: ApprovalRevocationBuilderConfig) => Caveat;
176
+
22
177
  type ArgsEqualityCheckBuilderConfig = {
23
178
  args: Hex;
24
179
  };
@@ -243,6 +398,7 @@ declare const valueLteBuilder: (environment: SmartAccountsEnvironment, config: V
243
398
  type CoreCaveatMapByString = {
244
399
  allowedMethods: typeof allowedMethodsBuilder;
245
400
  allowedTargets: typeof allowedTargetsBuilder;
401
+ approvalRevocation: typeof approvalRevocationBuilder;
246
402
  deployed: typeof deployedBuilder;
247
403
  allowedCalldata: typeof allowedCalldataBuilder;
248
404
  erc20BalanceChange: typeof erc20BalanceChangeBuilder;
@@ -286,113 +442,6 @@ type CaveatConfiguration<TCaveatBuilder extends CaveatBuilder<any>, CaveatMap =
286
442
  type CoreCaveatConfiguration = CaveatConfiguration<CoreCaveatBuilder>;
287
443
  declare const createCaveatBuilder: (environment: SmartAccountsEnvironment, config?: CaveatBuilderConfig) => CoreCaveatBuilder;
288
444
 
289
- type Erc20PeriodicScopeConfig = {
290
- type: ScopeType.Erc20PeriodTransfer;
291
- } & Erc20PeriodTransferBuilderConfig;
292
-
293
- type Erc20StreamingScopeConfig = {
294
- type: ScopeType.Erc20Streaming;
295
- } & Erc20StreamingBuilderConfig;
296
-
297
- type Erc20TransferScopeConfig = {
298
- type: ScopeType.Erc20TransferAmount;
299
- } & Erc20TransferAmountBuilderConfig;
300
-
301
- type Erc721ScopeBaseConfig = {
302
- type: ScopeType.Erc721Transfer;
303
- };
304
- type Erc721ScopeConfig = Erc721ScopeBaseConfig & Erc721TransferBuilderConfig;
305
-
306
- type FunctionCallScopeBaseConfig = {
307
- type: ScopeType.FunctionCall;
308
- allowedCalldata?: AllowedCalldataBuilderConfig[];
309
- exactCalldata?: ExactCalldataBuilderConfig;
310
- valueLte?: ValueLteBuilderConfig;
311
- };
312
- type FunctionCallScopeConfig = FunctionCallScopeBaseConfig & AllowedTargetsBuilderConfig & AllowedMethodsBuilderConfig;
313
-
314
- type NativeTokenPeriodicScopeConfig = {
315
- type: ScopeType.NativeTokenPeriodTransfer;
316
- allowedCalldata?: AllowedCalldataBuilderConfig[];
317
- exactCalldata?: ExactCalldataBuilderConfig;
318
- } & NativeTokenPeriodTransferBuilderConfig;
319
-
320
- type NativeTokenStreamingScopeConfig = {
321
- type: ScopeType.NativeTokenStreaming;
322
- allowedCalldata?: AllowedCalldataBuilderConfig[];
323
- exactCalldata?: ExactCalldataBuilderConfig;
324
- } & NativeTokenStreamingBuilderConfig;
325
-
326
- type NativeTokenTransferScopeConfig = {
327
- type: ScopeType.NativeTokenTransferAmount;
328
- allowedCalldata?: AllowedCalldataBuilderConfig[];
329
- exactCalldata?: ExactCalldataBuilderConfig;
330
- } & NativeTokenTransferAmountBuilderConfig;
331
-
332
- type OwnershipScopeBaseConfig = {
333
- type: ScopeType.OwnershipTransfer;
334
- };
335
- type OwnershipScopeConfig = OwnershipScopeBaseConfig & OwnershipTransferBuilderConfig;
336
-
337
- type ConvertScopeConfigsToInputs<T extends {
338
- type: ScopeType;
339
- }> = T extends {
340
- type: ScopeType;
341
- } ? Omit<T, 'type'> & {
342
- type: T['type'] | `${T['type']}`;
343
- } : never;
344
- type ScopeConfigBase = Erc20TransferScopeConfig | Erc20StreamingScopeConfig | Erc20PeriodicScopeConfig | NativeTokenTransferScopeConfig | NativeTokenStreamingScopeConfig | NativeTokenPeriodicScopeConfig | Erc721ScopeConfig | OwnershipScopeConfig | FunctionCallScopeConfig;
345
- type ScopeConfig = ConvertScopeConfigsToInputs<ScopeConfigBase>;
346
-
347
445
  type Caveats = CaveatBuilder | (Caveat | CoreCaveatConfiguration)[];
348
446
 
349
- declare const DELEGATION_ABI_TYPE_COMPONENTS: ({
350
- type: string;
351
- name: string;
352
- components?: undefined;
353
- } | {
354
- type: string;
355
- name: string;
356
- components: {
357
- type: string;
358
- name: string;
359
- }[];
360
- })[];
361
- declare const toDelegationStruct: (delegation: Delegation) => DelegationStruct;
362
- declare const toDelegation: (delegationStruct: DelegationStruct) => Delegation;
363
- type DelegationStruct = Omit<Delegation, 'salt'> & {
364
- salt: bigint;
365
- };
366
- declare const encodeDelegations: (delegations: PermissionContext) => Hex;
367
- declare const encodeDelegation: (delegation: Delegation) => Hex;
368
- declare const decodeDelegations: (delegations: PermissionContext) => Delegation[];
369
- declare const decodeDelegation: (encoded: Hex) => Delegation;
370
- declare const SIGNABLE_DELEGATION_TYPED_DATA: TypedData;
371
- declare const DELEGATION_ARRAY_ABI_TYPE: AbiParameter;
372
- declare const DELEGATION_ABI_TYPE: AbiParameter;
373
- declare const hashDelegation: (input: Delegation) => Hex;
374
- type BaseCreateDelegationOptions = {
375
- environment: SmartAccountsEnvironment;
376
- scope: ScopeConfig;
377
- from: Hex;
378
- caveats?: Caveats;
379
- parentDelegation?: Delegation | Hex;
380
- salt?: Hex;
381
- };
382
- type CreateDelegationOptions = BaseCreateDelegationOptions & {
383
- to: Hex;
384
- };
385
- type CreateOpenDelegationOptions = BaseCreateDelegationOptions;
386
- declare const createDelegation: (options: CreateDelegationOptions) => Delegation;
387
- declare const createOpenDelegation: (options: CreateOpenDelegationOptions) => Delegation;
388
- declare const signDelegation: ({ privateKey, delegation, delegationManager, chainId, name, version, allowInsecureUnrestrictedDelegation, }: {
389
- privateKey: Hex;
390
- delegation: Omit<Delegation, "signature">;
391
- delegationManager: Address;
392
- chainId: number;
393
- name?: string;
394
- version?: string;
395
- allowInsecureUnrestrictedDelegation?: boolean;
396
- }) => Promise<`0x${string}`>;
397
-
398
- export { type CoreCaveatConfiguration as A, type Caveats as C, DELEGATION_ABI_TYPE as D, ExecutionMode as E, SIGNABLE_DELEGATION_TYPED_DATA as S, type CreateDelegationOptions as a, type CreateExecutionArgs as b, type CreateOpenDelegationOptions as c, type ExecutionStruct as d, createDelegation as e, createExecution as f, createOpenDelegation as g, CaveatBuilder as h, type CaveatBuilderConfig as i, type CoreCaveatBuilder as j, DELEGATION_ABI_TYPE_COMPONENTS as k, DELEGATION_ARRAY_ABI_TYPE as l, type DelegationStruct as m, createCaveatBuilder as n, decodeDelegation as o, decodeDelegations as p, encodeBatchExecution as q, encodeDelegation as r, signDelegation as s, encodeDelegations as t, encodeExecutionCalldata as u, encodeExecutionCalldatas as v, encodeSingleExecution as w, hashDelegation as x, toDelegation as y, toDelegationStruct as z };
447
+ export { type AccountSignerConfig as A, type Erc20PeriodTransferBuilderConfig as B, type Caveat as C, type Delegation as D, ExecutionMode as E, type Erc20StreamingBuilderConfig as F, type Erc20TransferAmountBuilderConfig as G, type HybridDeleGatorDeployParams as H, Implementation as I, type Erc721TransferBuilderConfig as J, type AllowedCalldataBuilderConfig as K, type ExactCalldataBuilderConfig as L, type MetaMaskSmartAccount as M, type AllowedTargetsBuilderConfig as N, type AllowedMethodsBuilderConfig as O, type PermissionContext as P, type NativeTokenPeriodTransferBuilderConfig as Q, type NativeTokenStreamingBuilderConfig as R, type SmartAccountsEnvironment as S, type ToMetaMaskSmartAccountParameters as T, type NativeTokenTransferAmountBuilderConfig as U, type ValueLteBuilderConfig as V, type WalletSignerConfig as W, type OwnershipTransferBuilderConfig as X, type ToMetaMaskSmartAccountReturnType as a, CaveatType as b, type Caveats as c, type CreateExecutionArgs as d, type ExecutionStruct as e, type HybridSignerConfig as f, type MetaMaskSmartAccountImplementation as g, type MultiSigDeleGatorDeployParams as h, type MultiSigSignerConfig as i, ScopeType as j, type SignDelegationParams as k, type SignUserOperationParams as l, TransferWindow as m, type WebAuthnSignerConfig as n, createExecution as o, type Call as p, type DeployParams as q, CaveatBuilder as r, type CaveatBuilderConfig as s, type CoreCaveatBuilder as t, createCaveatBuilder as u, encodeBatchExecution as v, encodeExecutionCalldata as w, encodeExecutionCalldatas as x, encodeSingleExecution as y, type CoreCaveatConfiguration as z };
@@ -1,6 +1,158 @@
1
- import { Hex, AbiFunction, Address, AbiParameter, TypedData } from 'viem';
2
- import { S as SmartAccountsEnvironment, C as Caveat, b as CaveatType, g as ScopeType, D as Delegation, P as PermissionContext } from './types-BWaH4KH1.cjs';
3
- import { BalanceChangeType } from '@metamask/delegation-core';
1
+ import { HybridDeleGator, MultiSigDeleGator, EIP7702StatelessDeleGator } from '@metamask/delegation-abis';
2
+ import { Account, Hex, WalletClient, Transport, Chain, PublicClient, NonceManager, OneOf, Address, AbiFunction } from 'viem';
3
+ import { WebAuthnAccount, SmartAccount, SmartAccountImplementation, entryPoint07Abi } from 'viem/account-abstraction';
4
+ import { Prettify } from 'viem/chains';
5
+ import { ApprovalRevocationTerms, BalanceChangeType } from '@metamask/delegation-core';
6
+
7
+ declare enum Implementation {
8
+ MultiSig = "MultiSig",
9
+ Hybrid = "Hybrid",
10
+ Stateless7702 = "Stateless7702"
11
+ }
12
+ declare enum TransferWindow {
13
+ Hourly = 3600,
14
+ Daily = 86400,
15
+ Weekly = 604800,
16
+ BiWeekly = 1209600,
17
+ Monthly = 2592000,
18
+ Quarterly = 7776000,
19
+ Yearly = 31536000
20
+ }
21
+ declare enum ScopeType {
22
+ Erc20TransferAmount = "erc20TransferAmount",
23
+ Erc20Streaming = "erc20Streaming",
24
+ Erc20PeriodTransfer = "erc20PeriodTransfer",
25
+ NativeTokenTransferAmount = "nativeTokenTransferAmount",
26
+ NativeTokenStreaming = "nativeTokenStreaming",
27
+ NativeTokenPeriodTransfer = "nativeTokenPeriodTransfer",
28
+ Erc721Transfer = "erc721Transfer",
29
+ OwnershipTransfer = "ownershipTransfer",
30
+ FunctionCall = "functionCall"
31
+ }
32
+ declare enum CaveatType {
33
+ AllowedMethods = "allowedMethods",
34
+ AllowedTargets = "allowedTargets",
35
+ ApprovalRevocation = "approvalRevocation",
36
+ Deployed = "deployed",
37
+ AllowedCalldata = "allowedCalldata",
38
+ Erc20BalanceChange = "erc20BalanceChange",
39
+ Erc721BalanceChange = "erc721BalanceChange",
40
+ Erc1155BalanceChange = "erc1155BalanceChange",
41
+ ValueLte = "valueLte",
42
+ LimitedCalls = "limitedCalls",
43
+ Id = "id",
44
+ Nonce = "nonce",
45
+ Timestamp = "timestamp",
46
+ BlockNumber = "blockNumber",
47
+ Erc20TransferAmount = "erc20TransferAmount",
48
+ Erc20Streaming = "erc20Streaming",
49
+ NativeTokenStreaming = "nativeTokenStreaming",
50
+ Erc721Transfer = "erc721Transfer",
51
+ NativeTokenTransferAmount = "nativeTokenTransferAmount",
52
+ NativeBalanceChange = "nativeBalanceChange",
53
+ Redeemer = "redeemer",
54
+ NativeTokenPayment = "nativeTokenPayment",
55
+ ArgsEqualityCheck = "argsEqualityCheck",
56
+ SpecificActionERC20TransferBatch = "specificActionERC20TransferBatch",
57
+ Erc20PeriodTransfer = "erc20PeriodTransfer",
58
+ NativeTokenPeriodTransfer = "nativeTokenPeriodTransfer",
59
+ ExactCalldataBatch = "exactCalldataBatch",
60
+ ExactCalldata = "exactCalldata",
61
+ ExactExecution = "exactExecution",
62
+ ExactExecutionBatch = "exactExecutionBatch",
63
+ MultiTokenPeriod = "multiTokenPeriod",
64
+ OwnershipTransfer = "ownershipTransfer"
65
+ }
66
+
67
+ type Caveat = {
68
+ enforcer: Hex;
69
+ terms: Hex;
70
+ args: Hex;
71
+ };
72
+ type Delegation = {
73
+ delegate: Hex;
74
+ delegator: Hex;
75
+ authority: Hex;
76
+ caveats: Caveat[];
77
+ salt: Hex;
78
+ signature: Hex;
79
+ };
80
+ type PermissionContext = Delegation[] | Hex;
81
+ type SmartAccountsEnvironment = {
82
+ DelegationManager: Hex;
83
+ EntryPoint: Hex;
84
+ SimpleFactory: Hex;
85
+ implementations: {
86
+ [implementation: string]: Hex;
87
+ };
88
+ caveatEnforcers: {
89
+ [enforcer: string]: Hex;
90
+ };
91
+ };
92
+ type MultiSigDeleGatorDeployParams = [signers: Hex[], threshold: bigint];
93
+ type HybridDeleGatorDeployParams = [
94
+ owner: Hex,
95
+ keyIds: string[],
96
+ xValues: bigint[],
97
+ yValues: bigint[]
98
+ ];
99
+ type DeployParams<TImplementation extends Implementation> = {
100
+ [Implementation.MultiSig]: MultiSigDeleGatorDeployParams;
101
+ [Implementation.Hybrid]: HybridDeleGatorDeployParams;
102
+ [Implementation.Stateless7702]: never;
103
+ }[TImplementation];
104
+ type ToMetaMaskSmartAccountParameters<TImplementation extends Implementation> = {
105
+ client: PublicClient;
106
+ implementation: TImplementation;
107
+ signer?: SignerConfigByImplementation<TImplementation>;
108
+ environment?: SmartAccountsEnvironment;
109
+ nonceKeyManager?: NonceManager;
110
+ } & OneOf<{
111
+ deployParams: DeployParams<TImplementation>;
112
+ deploySalt: Hex;
113
+ } | {
114
+ address: Address;
115
+ }>;
116
+ type SignUserOperationParams = Parameters<ToMetaMaskSmartAccountReturnType<Implementation>['signUserOperation']>[0];
117
+ type SignDelegationParams = {
118
+ delegation: Omit<Delegation, 'signature'>;
119
+ } & {
120
+ chainId?: number;
121
+ };
122
+ type MetaMaskSmartAccountImplementation<TImplementation extends Implementation> = SmartAccountImplementation<typeof entryPoint07Abi, '0.7', {
123
+ abi: {
124
+ [Implementation.Hybrid]: typeof HybridDeleGator;
125
+ [Implementation.MultiSig]: typeof MultiSigDeleGator;
126
+ [Implementation.Stateless7702]: typeof EIP7702StatelessDeleGator;
127
+ }[TImplementation];
128
+ signDelegation: (params: SignDelegationParams) => Promise<Hex>;
129
+ environment: SmartAccountsEnvironment;
130
+ }>;
131
+ type MetaMaskSmartAccount<TImplementation extends Implementation = Implementation> = ToMetaMaskSmartAccountReturnType<TImplementation>;
132
+ type ToMetaMaskSmartAccountReturnType<TImplementation extends Implementation> = Prettify<SmartAccount<MetaMaskSmartAccountImplementation<TImplementation>>>;
133
+ type WalletSignerConfig = {
134
+ walletClient: WalletClient<Transport, Chain | undefined, Account>;
135
+ };
136
+ type AccountSignerConfig = {
137
+ account: Pick<Account, 'signMessage' | 'signTypedData' | 'address'>;
138
+ };
139
+ type WebAuthnSignerConfig = {
140
+ webAuthnAccount: WebAuthnAccount;
141
+ keyId: Hex;
142
+ };
143
+ type HybridSignerConfig = WalletSignerConfig | AccountSignerConfig | WebAuthnSignerConfig;
144
+ type MultiSigSignerConfig = (WalletSignerConfig | AccountSignerConfig)[];
145
+ type Stateless7702SignerConfig = WalletSignerConfig | AccountSignerConfig;
146
+ type SignerConfigByImplementation<TImplementation extends Implementation> = {
147
+ [Implementation.Hybrid]: HybridSignerConfig;
148
+ [Implementation.MultiSig]: MultiSigSignerConfig;
149
+ [Implementation.Stateless7702]: Stateless7702SignerConfig;
150
+ }[TImplementation];
151
+ type Call = {
152
+ to: Hex;
153
+ data?: Hex | undefined;
154
+ value?: bigint | undefined;
155
+ };
4
156
 
5
157
  type AllowedCalldataBuilderConfig = {
6
158
  startIndex: number;
@@ -19,6 +171,9 @@ type AllowedTargetsBuilderConfig = {
19
171
  };
20
172
  declare const allowedTargetsBuilder: (environment: SmartAccountsEnvironment, config: AllowedTargetsBuilderConfig) => Caveat;
21
173
 
174
+ type ApprovalRevocationBuilderConfig = ApprovalRevocationTerms;
175
+ declare const approvalRevocationBuilder: (environment: SmartAccountsEnvironment, config: ApprovalRevocationBuilderConfig) => Caveat;
176
+
22
177
  type ArgsEqualityCheckBuilderConfig = {
23
178
  args: Hex;
24
179
  };
@@ -243,6 +398,7 @@ declare const valueLteBuilder: (environment: SmartAccountsEnvironment, config: V
243
398
  type CoreCaveatMapByString = {
244
399
  allowedMethods: typeof allowedMethodsBuilder;
245
400
  allowedTargets: typeof allowedTargetsBuilder;
401
+ approvalRevocation: typeof approvalRevocationBuilder;
246
402
  deployed: typeof deployedBuilder;
247
403
  allowedCalldata: typeof allowedCalldataBuilder;
248
404
  erc20BalanceChange: typeof erc20BalanceChangeBuilder;
@@ -286,113 +442,6 @@ type CaveatConfiguration<TCaveatBuilder extends CaveatBuilder<any>, CaveatMap =
286
442
  type CoreCaveatConfiguration = CaveatConfiguration<CoreCaveatBuilder>;
287
443
  declare const createCaveatBuilder: (environment: SmartAccountsEnvironment, config?: CaveatBuilderConfig) => CoreCaveatBuilder;
288
444
 
289
- type Erc20PeriodicScopeConfig = {
290
- type: ScopeType.Erc20PeriodTransfer;
291
- } & Erc20PeriodTransferBuilderConfig;
292
-
293
- type Erc20StreamingScopeConfig = {
294
- type: ScopeType.Erc20Streaming;
295
- } & Erc20StreamingBuilderConfig;
296
-
297
- type Erc20TransferScopeConfig = {
298
- type: ScopeType.Erc20TransferAmount;
299
- } & Erc20TransferAmountBuilderConfig;
300
-
301
- type Erc721ScopeBaseConfig = {
302
- type: ScopeType.Erc721Transfer;
303
- };
304
- type Erc721ScopeConfig = Erc721ScopeBaseConfig & Erc721TransferBuilderConfig;
305
-
306
- type FunctionCallScopeBaseConfig = {
307
- type: ScopeType.FunctionCall;
308
- allowedCalldata?: AllowedCalldataBuilderConfig[];
309
- exactCalldata?: ExactCalldataBuilderConfig;
310
- valueLte?: ValueLteBuilderConfig;
311
- };
312
- type FunctionCallScopeConfig = FunctionCallScopeBaseConfig & AllowedTargetsBuilderConfig & AllowedMethodsBuilderConfig;
313
-
314
- type NativeTokenPeriodicScopeConfig = {
315
- type: ScopeType.NativeTokenPeriodTransfer;
316
- allowedCalldata?: AllowedCalldataBuilderConfig[];
317
- exactCalldata?: ExactCalldataBuilderConfig;
318
- } & NativeTokenPeriodTransferBuilderConfig;
319
-
320
- type NativeTokenStreamingScopeConfig = {
321
- type: ScopeType.NativeTokenStreaming;
322
- allowedCalldata?: AllowedCalldataBuilderConfig[];
323
- exactCalldata?: ExactCalldataBuilderConfig;
324
- } & NativeTokenStreamingBuilderConfig;
325
-
326
- type NativeTokenTransferScopeConfig = {
327
- type: ScopeType.NativeTokenTransferAmount;
328
- allowedCalldata?: AllowedCalldataBuilderConfig[];
329
- exactCalldata?: ExactCalldataBuilderConfig;
330
- } & NativeTokenTransferAmountBuilderConfig;
331
-
332
- type OwnershipScopeBaseConfig = {
333
- type: ScopeType.OwnershipTransfer;
334
- };
335
- type OwnershipScopeConfig = OwnershipScopeBaseConfig & OwnershipTransferBuilderConfig;
336
-
337
- type ConvertScopeConfigsToInputs<T extends {
338
- type: ScopeType;
339
- }> = T extends {
340
- type: ScopeType;
341
- } ? Omit<T, 'type'> & {
342
- type: T['type'] | `${T['type']}`;
343
- } : never;
344
- type ScopeConfigBase = Erc20TransferScopeConfig | Erc20StreamingScopeConfig | Erc20PeriodicScopeConfig | NativeTokenTransferScopeConfig | NativeTokenStreamingScopeConfig | NativeTokenPeriodicScopeConfig | Erc721ScopeConfig | OwnershipScopeConfig | FunctionCallScopeConfig;
345
- type ScopeConfig = ConvertScopeConfigsToInputs<ScopeConfigBase>;
346
-
347
445
  type Caveats = CaveatBuilder | (Caveat | CoreCaveatConfiguration)[];
348
446
 
349
- declare const DELEGATION_ABI_TYPE_COMPONENTS: ({
350
- type: string;
351
- name: string;
352
- components?: undefined;
353
- } | {
354
- type: string;
355
- name: string;
356
- components: {
357
- type: string;
358
- name: string;
359
- }[];
360
- })[];
361
- declare const toDelegationStruct: (delegation: Delegation) => DelegationStruct;
362
- declare const toDelegation: (delegationStruct: DelegationStruct) => Delegation;
363
- type DelegationStruct = Omit<Delegation, 'salt'> & {
364
- salt: bigint;
365
- };
366
- declare const encodeDelegations: (delegations: PermissionContext) => Hex;
367
- declare const encodeDelegation: (delegation: Delegation) => Hex;
368
- declare const decodeDelegations: (delegations: PermissionContext) => Delegation[];
369
- declare const decodeDelegation: (encoded: Hex) => Delegation;
370
- declare const SIGNABLE_DELEGATION_TYPED_DATA: TypedData;
371
- declare const DELEGATION_ARRAY_ABI_TYPE: AbiParameter;
372
- declare const DELEGATION_ABI_TYPE: AbiParameter;
373
- declare const hashDelegation: (input: Delegation) => Hex;
374
- type BaseCreateDelegationOptions = {
375
- environment: SmartAccountsEnvironment;
376
- scope: ScopeConfig;
377
- from: Hex;
378
- caveats?: Caveats;
379
- parentDelegation?: Delegation | Hex;
380
- salt?: Hex;
381
- };
382
- type CreateDelegationOptions = BaseCreateDelegationOptions & {
383
- to: Hex;
384
- };
385
- type CreateOpenDelegationOptions = BaseCreateDelegationOptions;
386
- declare const createDelegation: (options: CreateDelegationOptions) => Delegation;
387
- declare const createOpenDelegation: (options: CreateOpenDelegationOptions) => Delegation;
388
- declare const signDelegation: ({ privateKey, delegation, delegationManager, chainId, name, version, allowInsecureUnrestrictedDelegation, }: {
389
- privateKey: Hex;
390
- delegation: Omit<Delegation, "signature">;
391
- delegationManager: Address;
392
- chainId: number;
393
- name?: string;
394
- version?: string;
395
- allowInsecureUnrestrictedDelegation?: boolean;
396
- }) => Promise<`0x${string}`>;
397
-
398
- export { type CoreCaveatConfiguration as A, type Caveats as C, DELEGATION_ABI_TYPE as D, ExecutionMode as E, SIGNABLE_DELEGATION_TYPED_DATA as S, type CreateDelegationOptions as a, type CreateExecutionArgs as b, type CreateOpenDelegationOptions as c, type ExecutionStruct as d, createDelegation as e, createExecution as f, createOpenDelegation as g, CaveatBuilder as h, type CaveatBuilderConfig as i, type CoreCaveatBuilder as j, DELEGATION_ABI_TYPE_COMPONENTS as k, DELEGATION_ARRAY_ABI_TYPE as l, type DelegationStruct as m, createCaveatBuilder as n, decodeDelegation as o, decodeDelegations as p, encodeBatchExecution as q, encodeDelegation as r, signDelegation as s, encodeDelegations as t, encodeExecutionCalldata as u, encodeExecutionCalldatas as v, encodeSingleExecution as w, hashDelegation as x, toDelegation as y, toDelegationStruct as z };
447
+ export { type AccountSignerConfig as A, type Erc20PeriodTransferBuilderConfig as B, type Caveat as C, type Delegation as D, ExecutionMode as E, type Erc20StreamingBuilderConfig as F, type Erc20TransferAmountBuilderConfig as G, type HybridDeleGatorDeployParams as H, Implementation as I, type Erc721TransferBuilderConfig as J, type AllowedCalldataBuilderConfig as K, type ExactCalldataBuilderConfig as L, type MetaMaskSmartAccount as M, type AllowedTargetsBuilderConfig as N, type AllowedMethodsBuilderConfig as O, type PermissionContext as P, type NativeTokenPeriodTransferBuilderConfig as Q, type NativeTokenStreamingBuilderConfig as R, type SmartAccountsEnvironment as S, type ToMetaMaskSmartAccountParameters as T, type NativeTokenTransferAmountBuilderConfig as U, type ValueLteBuilderConfig as V, type WalletSignerConfig as W, type OwnershipTransferBuilderConfig as X, type ToMetaMaskSmartAccountReturnType as a, CaveatType as b, type Caveats as c, type CreateExecutionArgs as d, type ExecutionStruct as e, type HybridSignerConfig as f, type MetaMaskSmartAccountImplementation as g, type MultiSigDeleGatorDeployParams as h, type MultiSigSignerConfig as i, ScopeType as j, type SignDelegationParams as k, type SignUserOperationParams as l, TransferWindow as m, type WebAuthnSignerConfig as n, createExecution as o, type Call as p, type DeployParams as q, CaveatBuilder as r, type CaveatBuilderConfig as s, type CoreCaveatBuilder as t, createCaveatBuilder as u, encodeBatchExecution as v, encodeExecutionCalldata as w, encodeExecutionCalldatas as x, encodeSingleExecution as y, type CoreCaveatConfiguration as z };
@@ -1,21 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _chunkIQT6XFDTcjs = require('../chunk-IQT6XFDT.cjs');
3
4
 
4
5
 
5
6
 
6
- var _chunkMVBU3LRVcjs = require('../chunk-MVBU3LRV.cjs');
7
7
 
8
8
 
9
+ var _chunkDCI2AN4Ncjs = require('../chunk-DCI2AN4N.cjs');
9
10
 
10
11
 
11
- var _chunkSOFB2MXGcjs = require('../chunk-SOFB2MXG.cjs');
12
- require('../chunk-SO5JAXGD.cjs');
13
12
 
14
13
 
14
+ var _chunk2OS36DVVcjs = require('../chunk-2OS36DVV.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkMOHCTPYQcjs = require('../chunk-MOHCTPYQ.cjs');
18
+ var _chunkJKVSTPECcjs = require('../chunk-JKVSTPEC.cjs');
19
19
 
20
20
 
21
21
 
@@ -32,11 +32,11 @@ var _chunkMOHCTPYQcjs = require('../chunk-MOHCTPYQ.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkTMO23YRPcjs = require('../chunk-TMO23YRP.cjs');
36
35
 
37
36
 
38
37
 
39
38
 
39
+ var _chunkW6HPAK4Mcjs = require('../chunk-W6HPAK4M.cjs');
40
40
 
41
41
 
42
42
 
@@ -60,5 +60,12 @@ var _chunkTMO23YRPcjs = require('../chunk-TMO23YRP.cjs');
60
60
 
61
61
 
62
62
 
63
- exports.CaveatBuilder = _chunkTMO23YRPcjs.CaveatBuilder; exports.DELEGATION_ABI_TYPE = _chunkTMO23YRPcjs.DELEGATION_ABI_TYPE; exports.DELEGATION_ABI_TYPE_COMPONENTS = _chunkTMO23YRPcjs.DELEGATION_ABI_TYPE_COMPONENTS; exports.DELEGATION_ARRAY_ABI_TYPE = _chunkTMO23YRPcjs.DELEGATION_ARRAY_ABI_TYPE; exports.DELEGATION_TYPEHASH = _chunkTMO23YRPcjs.DELEGATION_TYPEHASH; exports.SIGNABLE_DELEGATION_TYPED_DATA = _chunkTMO23YRPcjs.SIGNABLE_DELEGATION_TYPED_DATA; exports.SIGNABLE_USER_OP_TYPED_DATA = _chunkSOFB2MXGcjs.SIGNABLE_USER_OP_TYPED_DATA; exports.SIGNATURE_ABI_PARAMS = _chunkMVBU3LRVcjs.SIGNATURE_ABI_PARAMS; exports.createCaveatBuilder = _chunkTMO23YRPcjs.createCaveatBuilder; exports.decodeCaveat = _chunkTMO23YRPcjs.decodeCaveat; exports.decodeDelegation = _chunkTMO23YRPcjs.decodeDelegation; exports.decodeDelegations = _chunkTMO23YRPcjs.decodeDelegations; exports.deploySmartAccountsEnvironment = _chunkSOFB2MXGcjs.deploySmartAccountsEnvironment; exports.encodeBatchExecution = _chunkMOHCTPYQcjs.encodeBatchExecution; exports.encodeCalls = _chunkMVBU3LRVcjs.encodeCalls; exports.encodeCallsForCaller = _chunkMVBU3LRVcjs.encodeCallsForCaller; exports.encodeDelegation = _chunkTMO23YRPcjs.encodeDelegation; exports.encodeDelegations = _chunkTMO23YRPcjs.encodeDelegations; exports.encodeExecutionCalldata = _chunkMOHCTPYQcjs.encodeExecutionCalldata; exports.encodeExecutionCalldatas = _chunkMOHCTPYQcjs.encodeExecutionCalldatas; exports.encodeSingleExecution = _chunkMOHCTPYQcjs.encodeSingleExecution; exports.getCounterfactualAccountData = _chunkMVBU3LRVcjs.getCounterfactualAccountData; exports.hashDelegation = _chunkTMO23YRPcjs.hashDelegation; exports.overrideDeployedEnvironment = _chunkSOFB2MXGcjs.overrideDeployedEnvironment; exports.toDelegation = _chunkTMO23YRPcjs.toDelegation; exports.toDelegationStruct = _chunkTMO23YRPcjs.toDelegationStruct;
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+ exports.CaveatBuilder = _chunkW6HPAK4Mcjs.CaveatBuilder; exports.DELEGATION_ABI_TYPE = _chunkW6HPAK4Mcjs.DELEGATION_ABI_TYPE; exports.DELEGATION_ABI_TYPE_COMPONENTS = _chunkW6HPAK4Mcjs.DELEGATION_ABI_TYPE_COMPONENTS; exports.DELEGATION_ARRAY_ABI_TYPE = _chunkW6HPAK4Mcjs.DELEGATION_ARRAY_ABI_TYPE; exports.DELEGATION_TYPEHASH = _chunkW6HPAK4Mcjs.DELEGATION_TYPEHASH; exports.SIGNABLE_DELEGATION_TYPED_DATA = _chunkW6HPAK4Mcjs.SIGNABLE_DELEGATION_TYPED_DATA; exports.SIGNABLE_USER_OP_TYPED_DATA = _chunk2OS36DVVcjs.SIGNABLE_USER_OP_TYPED_DATA; exports.SIGNATURE_ABI_PARAMS = _chunkDCI2AN4Ncjs.SIGNATURE_ABI_PARAMS; exports.createCaveatBuilder = _chunkW6HPAK4Mcjs.createCaveatBuilder; exports.decodeCaveat = _chunkW6HPAK4Mcjs.decodeCaveat; exports.decodeDelegation = _chunkW6HPAK4Mcjs.decodeDelegation; exports.decodeDelegations = _chunkW6HPAK4Mcjs.decodeDelegations; exports.decodeRevertData = _chunkJKVSTPECcjs.decodeRevertData; exports.decodeRevertReason = _chunkJKVSTPECcjs.decodeRevertReason; exports.deploySmartAccountsEnvironment = _chunk2OS36DVVcjs.deploySmartAccountsEnvironment; exports.encodeBatchExecution = _chunkW6HPAK4Mcjs.encodeBatchExecution; exports.encodeCalls = _chunkDCI2AN4Ncjs.encodeCalls; exports.encodeCallsForCaller = _chunkDCI2AN4Ncjs.encodeCallsForCaller; exports.encodeDelegation = _chunkW6HPAK4Mcjs.encodeDelegation; exports.encodeDelegations = _chunkW6HPAK4Mcjs.encodeDelegations; exports.encodeExecutionCalldata = _chunkW6HPAK4Mcjs.encodeExecutionCalldata; exports.encodeExecutionCalldatas = _chunkW6HPAK4Mcjs.encodeExecutionCalldatas; exports.encodeSingleExecution = _chunkW6HPAK4Mcjs.encodeSingleExecution; exports.generateSalt = _chunkIQT6XFDTcjs.generateSalt; exports.getCounterfactualAccountData = _chunkDCI2AN4Ncjs.getCounterfactualAccountData; exports.hashDelegation = _chunkW6HPAK4Mcjs.hashDelegation; exports.overrideDeployedEnvironment = _chunk2OS36DVVcjs.overrideDeployedEnvironment; exports.toDelegation = _chunkW6HPAK4Mcjs.toDelegation; exports.toDelegationStruct = _chunkW6HPAK4Mcjs.toDelegationStruct;
64
71
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/utils/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,q0DAAC","file":"/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/utils/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/utils/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,8/DAAC","file":"/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/utils/index.cjs"}