abstractionkit 0.3.1 → 0.3.3

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/index.d.cts CHANGED
@@ -2,17 +2,6 @@ import { AbiCoder } from "ethers";
2
2
 
3
3
  //#region \0rolldown/runtime.js
4
4
  //#endregion
5
- //#region src/account/SmartAccount.d.ts
6
- declare abstract class SmartAccount {
7
- readonly accountAddress: string;
8
- static readonly proxyByteCode: string;
9
- static readonly initializerFunctionSelector: string;
10
- static readonly initializerFunctionInputAbi: string[];
11
- static readonly executorFunctionSelector: string;
12
- static readonly executorFunctionInputAbi: string[];
13
- constructor(accountAddress: string);
14
- }
15
- //#endregion
16
5
  //#region src/utils7702.d.ts
17
6
  type Authorization7702 = {
18
7
  chainId: bigint;
@@ -144,6 +133,15 @@ type SponsorMetadata = {
144
133
  url: string;
145
134
  icons: string[];
146
135
  };
136
+ type TokenQuote = {
137
+ token: string;
138
+ exchangeRate: bigint;
139
+ tokenCost: bigint;
140
+ };
141
+ type SponsorInfo = {
142
+ name: string;
143
+ icon?: string;
144
+ };
147
145
  type PmUserOperationV7Result = {
148
146
  paymaster: string;
149
147
  paymasterVerificationGasLimit: bigint;
@@ -154,7 +152,7 @@ type PmUserOperationV7Result = {
154
152
  preVerificationGas?: bigint;
155
153
  maxFeePerGas?: bigint;
156
154
  maxPriorityFeePerGas?: bigint;
157
- sponsorMetadata?: SponsorMetadata;
155
+ sponsor?: SponsorInfo;
158
156
  };
159
157
  type PmUserOperationV6Result = {
160
158
  paymasterAndData: string;
@@ -163,7 +161,7 @@ type PmUserOperationV6Result = {
163
161
  verificationGasLimit?: bigint;
164
162
  maxFeePerGas?: bigint;
165
163
  maxPriorityFeePerGas?: bigint;
166
- sponsorMetadata?: SponsorMetadata;
164
+ sponsor?: SponsorInfo;
167
165
  };
168
166
  declare enum Operation {
169
167
  Call = 0,
@@ -242,6 +240,81 @@ interface ParallelPaymasterInitValues {
242
240
  paymasterData: string;
243
241
  }
244
242
  //#endregion
243
+ //#region src/paymaster/types.d.ts
244
+ type AnyUserOperation = UserOperationV9 | UserOperationV8 | UserOperationV7 | UserOperationV6;
245
+ type SameUserOp<T extends AnyUserOperation> = T extends UserOperationV9 ? UserOperationV9 : T extends UserOperationV8 ? UserOperationV8 : T extends UserOperationV7 ? UserOperationV7 : UserOperationV6;
246
+ interface CandidePaymasterContext {
247
+ token?: string;
248
+ sponsorshipPolicyId?: string;
249
+ signingPhase?: "commit" | "finalize";
250
+ }
251
+ interface SmartAccountWithEntrypoint {
252
+ readonly entrypointAddress: string;
253
+ }
254
+ interface PrependTokenPaymasterApproveAccount extends SmartAccountWithEntrypoint {
255
+ prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
256
+ }
257
+ type Erc7677Provider = "pimlico" | "candide" | null;
258
+ interface Erc7677PaymasterConstructorOptions {
259
+ chainId?: bigint;
260
+ provider?: "auto" | Erc7677Provider;
261
+ }
262
+ interface BasePaymasterUserOperationOverrides {
263
+ entrypoint?: string;
264
+ resetApproval?: boolean;
265
+ }
266
+ interface GasPaymasterUserOperationOverrides extends BasePaymasterUserOperationOverrides {
267
+ callGasLimit?: bigint;
268
+ verificationGasLimit?: bigint;
269
+ preVerificationGas?: bigint;
270
+ callGasLimitPercentageMultiplier?: number;
271
+ verificationGasLimitPercentageMultiplier?: number;
272
+ preVerificationGasPercentageMultiplier?: number;
273
+ state_override_set?: StateOverrideSet;
274
+ }
275
+ //#endregion
276
+ //#region src/signer/types.d.ts
277
+ interface TypedData {
278
+ domain: {
279
+ name?: string;
280
+ version?: string;
281
+ chainId?: number | bigint;
282
+ verifyingContract?: `0x${string}`;
283
+ salt?: `0x${string}`;
284
+ };
285
+ types: Record<string, Array<{
286
+ name: string;
287
+ type: string;
288
+ }>>;
289
+ primaryType: string;
290
+ message: Record<string, unknown>;
291
+ }
292
+ type SigningScheme = "hash" | "typedData";
293
+ interface SignContext<T extends BaseUserOperation = BaseUserOperation> {
294
+ readonly userOperation: T;
295
+ readonly chainId: bigint;
296
+ readonly entryPoint: string;
297
+ }
298
+ interface MultiOpSignContext<T extends BaseUserOperation = BaseUserOperation> {
299
+ readonly userOperations: ReadonlyArray<{
300
+ readonly userOperation: T;
301
+ readonly chainId: bigint;
302
+ }>;
303
+ readonly entryPoint: string;
304
+ }
305
+ interface SignerBase {
306
+ readonly address: `0x${string}`;
307
+ }
308
+ type SignHashFn<C = SignContext> = (hash: `0x${string}`, context: C) => Promise<`0x${string}`>;
309
+ type SignTypedDataFn<C = SignContext> = (data: TypedData, context: C) => Promise<`0x${string}`>;
310
+ type Signer<C = SignContext> = SignerBase & ({
311
+ signHash: SignHashFn<C>;
312
+ signTypedData?: SignTypedDataFn<C>;
313
+ } | {
314
+ signHash?: SignHashFn<C>;
315
+ signTypedData: SignTypedDataFn<C>;
316
+ });
317
+ //#endregion
245
318
  //#region src/Bundler.d.ts
246
319
  declare class Bundler {
247
320
  readonly rpcUrl: string;
@@ -264,6 +337,17 @@ declare class SendUseroperationResponse {
264
337
  included(timeoutInSeconds?: number, requestIntervalInSeconds?: number): Promise<UserOperationReceiptResult>;
265
338
  }
266
339
  //#endregion
340
+ //#region src/account/SmartAccount.d.ts
341
+ declare abstract class SmartAccount {
342
+ readonly accountAddress: string;
343
+ static readonly proxyByteCode: string;
344
+ static readonly initializerFunctionSelector: string;
345
+ static readonly initializerFunctionInputAbi: string[];
346
+ static readonly executorFunctionSelector: string;
347
+ static readonly executorFunctionInputAbi: string[];
348
+ constructor(accountAddress: string);
349
+ }
350
+ //#endregion
267
351
  //#region src/account/simple/Simple7702Account.d.ts
268
352
  interface SimpleMetaTransaction {
269
353
  to: string;
@@ -284,6 +368,7 @@ interface CreateUserOperationOverrides {
284
368
  maxFeePerGasPercentageMultiplier?: number;
285
369
  maxPriorityFeePerGasPercentageMultiplier?: number;
286
370
  state_override_set?: StateOverrideSet;
371
+ skipGasEstimation?: boolean;
287
372
  dummySignature?: string;
288
373
  gasLevel?: GasOption;
289
374
  polygonGasStation?: PolygonChain;
@@ -329,6 +414,8 @@ declare class BaseSimple7702Account extends SmartAccount {
329
414
  dummySignature?: string;
330
415
  }): Promise<[bigint, bigint, bigint]>;
331
416
  protected baseSignUserOperation(useroperation: UserOperationV8 | UserOperationV9, privateKey: string, chainId: bigint): string;
417
+ static readonly ACCEPTED_SIGNING_SCHEMES: readonly SigningScheme[];
418
+ protected baseSignUserOperationWithSigner<T extends UserOperationV8 | UserOperationV9>(useroperation: T, signer: Signer, chainId: bigint): Promise<string>;
332
419
  protected baseSendUserOperation(userOperation: UserOperationV8 | UserOperationV9, bundlerRpc: string): Promise<SendUseroperationResponse>;
333
420
  prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
334
421
  static prependTokenPaymasterApproveToCallDataStatic(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
@@ -345,27 +432,39 @@ declare class Simple7702Account extends BaseSimple7702Account {
345
432
  dummySignature?: string;
346
433
  }): Promise<[bigint, bigint, bigint]>;
347
434
  signUserOperation(useroperation: UserOperationV8, privateKey: string, chainId: bigint): string;
435
+ signUserOperationWithSigner(useroperation: UserOperationV8, signer: Signer, chainId: bigint): Promise<string>;
348
436
  sendUserOperation(userOperation: UserOperationV8, bundlerRpc: string): Promise<SendUseroperationResponse>;
349
437
  }
350
438
  //#endregion
351
- //#region src/account/simple/Simple7702AccountV09.d.ts
352
- declare class Simple7702AccountV09 extends BaseSimple7702Account {
353
- static readonly DEFAULT_DELEGATEE_ADDRESS = "0xa46cc63eBF4Bd77888AA327837d20b23A63a56B5";
354
- constructor(accountAddress: string, overrides?: {
355
- entrypointAddress?: string;
356
- delegateeAddress?: string;
357
- });
358
- createUserOperation(transactions: SimpleMetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationOverrides): Promise<UserOperationV9>;
359
- estimateUserOperationGas(userOperation: UserOperationV9, bundlerRpc: string, overrides?: {
360
- stateOverrideSet?: StateOverrideSet;
361
- dummySignature?: string;
362
- }): Promise<[bigint, bigint, bigint]>;
363
- signUserOperation(useroperation: UserOperationV9, privateKey: string, chainId: bigint): string;
364
- sendUserOperation(userOperation: UserOperationV9, bundlerRpc: string): Promise<SendUseroperationResponse>;
439
+ //#region src/account/Calibur/types.d.ts
440
+ declare enum CaliburKeyType {
441
+ P256 = 0,
442
+ WebAuthnP256 = 1,
443
+ Secp256k1 = 2
365
444
  }
366
- //#endregion
367
- //#region src/account/Safe/types.d.ts
368
- interface CreateBaseUserOperationOverrides {
445
+ interface CaliburKey {
446
+ keyType: CaliburKeyType;
447
+ publicKey: string;
448
+ }
449
+ interface CaliburKeySettings {
450
+ hook?: string;
451
+ expiration?: number;
452
+ isAdmin?: boolean;
453
+ }
454
+ interface CaliburKeySettingsResult {
455
+ hook: string;
456
+ expiration: number;
457
+ isAdmin: boolean;
458
+ }
459
+ interface WebAuthnSignatureData {
460
+ authenticatorData: string;
461
+ clientDataJSON: string;
462
+ challengeIndex: bigint;
463
+ typeIndex: bigint;
464
+ r: bigint;
465
+ s: bigint;
466
+ }
467
+ interface CaliburCreateUserOperationOverrides {
369
468
  nonce?: bigint;
370
469
  callData?: string;
371
470
  callGasLimit?: bigint;
@@ -379,62 +478,289 @@ interface CreateBaseUserOperationOverrides {
379
478
  maxFeePerGasPercentageMultiplier?: number;
380
479
  maxPriorityFeePerGasPercentageMultiplier?: number;
381
480
  state_override_set?: StateOverrideSet;
382
- dummySignerSignaturePairs?: SignerSignaturePair[];
383
- webAuthnSharedSigner?: string;
384
- webAuthnSignerFactory?: string;
385
- webAuthnSignerSingleton?: string;
386
- webAuthnSignerProxyCreationCode?: string;
387
- eip7212WebAuthnPrecompileVerifier?: string;
388
- eip7212WebAuthnContractVerifier?: string;
389
- safeModuleExecutorFunctionSelector?: SafeModuleExecutorFunctionSelector;
390
- multisendContractAddress?: string;
481
+ skipGasEstimation?: boolean;
482
+ dummySignature?: string;
391
483
  gasLevel?: GasOption;
392
484
  polygonGasStation?: PolygonChain;
393
- expectedSigners?: Signer[];
394
- isMultiChainSignature?: boolean;
395
- parallelPaymasterInitValues?: {
396
- paymaster: string;
397
- paymasterVerificationGasLimit: bigint;
398
- paymasterPostOpGasLimit: bigint;
399
- paymasterData: string;
485
+ revertOnFailure?: boolean;
486
+ paymasterFields?: ParallelPaymasterInitValues;
487
+ eip7702Auth?: {
488
+ chainId: bigint;
489
+ address?: string;
490
+ nonce?: bigint;
491
+ yParity?: string;
492
+ r?: string;
493
+ s?: string;
400
494
  };
401
495
  }
402
- interface CreateUserOperationV6Overrides extends CreateBaseUserOperationOverrides {
403
- initCode?: string;
404
- }
405
- interface CreateUserOperationV7Overrides extends CreateBaseUserOperationOverrides {
406
- factory?: string;
407
- factoryData?: string;
496
+ interface CaliburSignatureOverrides {
497
+ hookData?: string;
498
+ keyHash?: string;
408
499
  }
409
- interface CreateUserOperationV9Overrides extends CreateUserOperationV7Overrides {}
410
- interface SafeAccountSingleton {
411
- singletonAddress: string;
412
- singletonInitHash: string;
500
+ //#endregion
501
+ //#region src/account/Calibur/Calibur7702Account.d.ts
502
+ declare class Calibur7702Account extends SmartAccount implements PrependTokenPaymasterApproveAccount {
503
+ static readonly executorFunctionSelector = "0x8dd7712f";
504
+ static readonly dummySignature: string;
505
+ static createDummyWebAuthnSignature(keyHash: string): string;
506
+ static wrapSignature(keyHash: string, rawSignature: string, hookData?: string): string;
507
+ readonly entrypointAddress: string;
508
+ readonly delegateeAddress: string;
509
+ constructor(accountAddress: string, overrides?: {
510
+ entrypointAddress?: string;
511
+ delegateeAddress?: string;
512
+ });
513
+ getUserOperationHash(userOperation: UserOperationV8, chainId: bigint): string;
514
+ static createAccountCallData(transactions: SimpleMetaTransaction[], revertOnFailure?: boolean): string;
515
+ createUserOperation(transactions: SimpleMetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CaliburCreateUserOperationOverrides): Promise<UserOperationV8>;
516
+ signUserOperation(userOperation: UserOperationV8, privateKey: string, chainId: bigint, overrides?: CaliburSignatureOverrides): string;
517
+ static readonly ACCEPTED_SIGNING_SCHEMES: readonly SigningScheme[];
518
+ signUserOperationWithSigner(userOperation: UserOperationV8, signer: Signer, chainId: bigint, overrides?: CaliburSignatureOverrides): Promise<string>;
519
+ formatWebAuthnSignature(keyHash: string, webAuthnAuth: WebAuthnSignatureData, overrides?: CaliburSignatureOverrides): string;
520
+ sendUserOperation(userOperation: UserOperationV8, bundlerRpc: string): Promise<SendUseroperationResponse>;
521
+ static createSecp256k1Key(address: string): CaliburKey;
522
+ static createWebAuthnP256Key(x: bigint, y: bigint): CaliburKey;
523
+ static createP256Key(x: bigint, y: bigint): CaliburKey;
524
+ static getKeyHash(key: CaliburKey): string;
525
+ static packKeySettings(settings: CaliburKeySettings): bigint;
526
+ static unpackKeySettings(packed: bigint): CaliburKeySettingsResult;
527
+ static createRegisterKeyMetaTransactions(key: CaliburKey, settings?: CaliburKeySettings): [SimpleMetaTransaction, SimpleMetaTransaction];
528
+ static createRevokeKeyMetaTransaction(keyHash: string): SimpleMetaTransaction;
529
+ createRevokeAllKeysMetaTransactions(providerRpc: string): Promise<SimpleMetaTransaction[]>;
530
+ createRevokeDelegationRawTransaction(chainId: bigint, eoaPrivateKey: string, providerRpc: string, overrides?: {
531
+ nonce?: bigint;
532
+ authorizationNonce?: bigint;
533
+ maxFeePerGas?: bigint;
534
+ maxPriorityFeePerGas?: bigint;
535
+ gasLimit?: bigint;
536
+ }): Promise<string>;
537
+ static createUpdateKeySettingsMetaTransaction(keyHash: string, settings: CaliburKeySettings): SimpleMetaTransaction;
538
+ static createInvalidateNonceMetaTransaction(newNonce: bigint): SimpleMetaTransaction;
539
+ isDelegatedToThisAccount(providerRpc: string): Promise<boolean>;
540
+ getNonce(providerRpc: string, sequenceKey?: number): Promise<bigint>;
541
+ isKeyRegistered(providerRpc: string, keyHash: string): Promise<boolean>;
542
+ getKeySettings(providerRpc: string, keyHash: string): Promise<CaliburKeySettingsResult>;
543
+ getKey(providerRpc: string, keyHash: string): Promise<CaliburKey>;
544
+ getKeys(providerRpc: string, overrides?: {
545
+ blockNumber?: bigint;
546
+ }): Promise<CaliburKey[]>;
547
+ prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
548
+ static prependTokenPaymasterApproveToCallDataStatic(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
413
549
  }
414
- interface InitCodeOverrides {
415
- threshold?: number;
416
- c2Nonce?: bigint;
417
- safe4337ModuleAddress?: string;
418
- safeModuleSetupAddress?: string;
419
- entrypointAddress?: string;
420
- safeAccountSingleton?: SafeAccountSingleton;
421
- safeAccountFactoryAddress?: string;
422
- multisendContractAddress?: string;
423
- webAuthnSharedSigner?: string;
424
- eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
425
- eip7212WebAuthnContractVerifierForSharedSigner?: string;
426
- onChainIdentifierParams?: OnChainIdentifierParamsType;
427
- onChainIdentifier?: string;
550
+ //#endregion
551
+ //#region src/account/Safe/modules/SafeModule.d.ts
552
+ declare abstract class SafeModule {
553
+ readonly moduleAddress: string;
554
+ protected readonly abiCoder: AbiCoder;
555
+ constructor(moduleAddress: string);
556
+ createEnableModuleMetaTransaction(accountAddress: string): MetaTransaction;
557
+ checkForEmptyResultAndRevert(result: string, requestName: string): void;
428
558
  }
429
- interface BaseInitOverrides {
430
- threshold?: number;
431
- c2Nonce?: bigint;
432
- safeAccountSingleton?: SafeAccountSingleton;
433
- safeAccountFactoryAddress?: string;
434
- multisendContractAddress?: string;
435
- webAuthnSharedSigner?: string;
436
- eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
437
- eip7212WebAuthnContractVerifierForSharedSigner?: string;
559
+ //#endregion
560
+ //#region src/account/Safe/modules/AllowanceModule.d.ts
561
+ declare const ALLOWANCE_MODULE_V0_1_0_ADDRESS = "0xAA46724893dedD72658219405185Fb0Fc91e091C";
562
+ declare class AllowanceModule extends SafeModule {
563
+ static readonly DEFAULT_ALLOWANCE_MODULE_ADDRESS = "0x691f59471Bfd2B7d639DCF74671a2d648ED1E331";
564
+ constructor(moduleAddress?: string);
565
+ createOneTimeAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, startAfterInMinutes: bigint): MetaTransaction;
566
+ createRecurringAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, recurringAllowanceValidityPeriodInMinutes: bigint, startAfterInMinutes: bigint): MetaTransaction;
567
+ createBaseSetAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, resetTimeMin: bigint, resetBaseMin: bigint): MetaTransaction;
568
+ createRenewAllowanceMetaTransaction(delegate: string, token: string): MetaTransaction;
569
+ createDeleteAllowanceMetaTransaction(delegate: string, token: string): MetaTransaction;
570
+ createAllowanceTransferMetaTransaction(allowanceSourceSafeAddress: string, token: string, to: string, amount: bigint, delegate: string, overrides?: {
571
+ delegateSignature?: string;
572
+ paymentToken?: string;
573
+ paymentAmount?: bigint;
574
+ }): MetaTransaction;
575
+ createBaseExecuteAllowanceTransferMetaTransaction(safeAddress: string, token: string, to: string, amount: bigint, paymentToken: string, payment: bigint, delegate: string, delegateSignature: string): MetaTransaction;
576
+ createAddDelegateMetaTransaction(delegate: string): MetaTransaction;
577
+ createRemoveDelegateMetaTransaction(delegate: string, removeAllowances: boolean): MetaTransaction;
578
+ getTokens(nodeRpcUrl: string, safeAddress: string, delegate: string): Promise<string[]>;
579
+ getTokensAllowance(nodeRpcUrl: string, safeAddress: string, delegate: string, token: string): Promise<Allowance>;
580
+ getDelegates(nodeRpcUrl: string, safeAddress: string, overrides?: {
581
+ start?: bigint;
582
+ maxNumberOfResults?: bigint;
583
+ }): Promise<string[]>;
584
+ baseGetDelegates(nodeRpcUrl: string, safeAddress: string, start: bigint, pageSize: bigint): Promise<{
585
+ results: string[];
586
+ next: bigint;
587
+ }>;
588
+ }
589
+ type Allowance = {
590
+ amount: bigint;
591
+ spent: bigint;
592
+ resetTimeMin: bigint;
593
+ lastResetMin: bigint;
594
+ nonce: bigint;
595
+ };
596
+ //#endregion
597
+ //#region src/account/Safe/modules/SocialRecoveryModule.d.ts
598
+ declare enum SocialRecoveryModuleGracePeriodSelector {
599
+ After3Minutes = "0x949d01d424bE050D09C16025dd007CB59b3A8c66",
600
+ After3Days = "0x38275826E1933303E508433dD5f289315Da2541c",
601
+ After7Days = "0x088f6cfD8BB1dDb1BB069CCb3fc1A98927D233f2",
602
+ After14Days = "0x9BacD92F4687Db306D7ded5d4513a51EA05df25b"
603
+ }
604
+ declare class SocialRecoveryModule extends SafeModule {
605
+ static readonly DEFAULT_SOCIAL_RECOVERY_ADDRESS = SocialRecoveryModuleGracePeriodSelector.After3Days;
606
+ constructor(moduleAddress?: string);
607
+ createConfirmRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number, execute: boolean): MetaTransaction;
608
+ createMultiConfirmRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number, signaturePairList: RecoverySignaturePair[], execute: boolean): MetaTransaction;
609
+ createExecuteRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number): MetaTransaction;
610
+ createFinalizeRecoveryMetaTransaction(accountAddress: string): MetaTransaction;
611
+ createCancelRecoveryMetaTransaction(): MetaTransaction;
612
+ createAddGuardianWithThresholdMetaTransaction(guardianAddress: string, threshold: bigint): MetaTransaction;
613
+ createRevokeGuardianWithThresholdMetaTransaction(nodeRpcUrl: string, accountAddress: string, guardianAddress: string, threshold: bigint, overrides?: {
614
+ prevGuardianAddress?: string;
615
+ }): Promise<MetaTransaction>;
616
+ createStandardRevokeGuardianWithThresholdMetaTransaction(prevGuardianAddress: string, guardianAddress: string, threshold: bigint): MetaTransaction;
617
+ createChangeThresholdMetaTransaction(threshold: bigint): MetaTransaction;
618
+ getRecoveryHash(nodeRpcUrl: string, accountAddress: string, newOwners: string[], newThreshold: number, nonce: bigint): Promise<string>;
619
+ getRecoveryRequest(nodeRpcUrl: string, accountAddress: string): Promise<RecoveryRequest>;
620
+ getRecoveryApprovals(nodeRpcUrl: string, accountAddress: string, newOwners: string[], newThreshold: number): Promise<bigint>;
621
+ hasGuardianApproved(nodeRpcUrl: string, accountAddress: string, guardian: string, newOwners: string[], newThreshold: number): Promise<boolean>;
622
+ isGuardian(nodeRpcUrl: string, accountAddress: string, guardian: string): Promise<boolean>;
623
+ guardiansCount(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
624
+ threshold(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
625
+ getGuardians(nodeRpcUrl: string, accountAddress: string): Promise<string[]>;
626
+ nonce(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
627
+ getRecoveryRequestEip712Data(rpcNode: string, chainId: bigint, accountAddress: string, newOwners: string[], newThreshold: bigint, overrides?: {
628
+ recoveryNonce?: bigint;
629
+ }): Promise<{
630
+ domain: RecoveryRequestTypedDataDomain;
631
+ types: Record<string, {
632
+ name: string;
633
+ type: string;
634
+ }[]>;
635
+ messageValue: RecoveryRequestTypedMessageValue;
636
+ }>;
637
+ }
638
+ type RecoveryRequest = {
639
+ guardiansApprovalCount: bigint;
640
+ newThreshold: bigint;
641
+ executeAfter: bigint;
642
+ newOwners: string[];
643
+ };
644
+ type RecoverySignaturePair = {
645
+ signer: string;
646
+ signature: string;
647
+ };
648
+ declare const EXECUTE_RECOVERY_PRIMARY_TYPE = "ExecuteRecovery";
649
+ type RecoveryRequestTypedDataDomain = {
650
+ name: string;
651
+ version: string;
652
+ chainId: number;
653
+ verifyingContract: string;
654
+ };
655
+ type RecoveryRequestTypedMessageValue = {
656
+ wallet: string;
657
+ newOwners: string[];
658
+ newThreshold: bigint;
659
+ nonce: bigint;
660
+ };
661
+ declare const EIP712_RECOVERY_MODULE_TYPE: {
662
+ ExecuteRecovery: {
663
+ type: string;
664
+ name: string;
665
+ }[];
666
+ };
667
+ //#endregion
668
+ //#region src/account/Safe/safeMessage.d.ts
669
+ declare const SAFE_MESSAGE_PRIMARY_TYPE = "SafeMessage";
670
+ declare const SAFE_MESSAGE_MODULE_TYPE: {
671
+ SafeMessage: {
672
+ type: string;
673
+ name: string;
674
+ }[];
675
+ };
676
+ type SafeMessageTypedDataDomain = {
677
+ chainId: number;
678
+ verifyingContract: string;
679
+ };
680
+ type SafeMessageTypedMessageValue = {
681
+ message: string;
682
+ };
683
+ declare function getSafeMessageEip712Data(accountAddress: string, chainId: bigint, message: string): {
684
+ domain: SafeMessageTypedDataDomain;
685
+ types: Record<string, {
686
+ name: string;
687
+ type: string;
688
+ }[]>;
689
+ messageValue: SafeMessageTypedMessageValue;
690
+ };
691
+ //#endregion
692
+ //#region src/account/Safe/types.d.ts
693
+ interface CreateBaseUserOperationOverrides {
694
+ nonce?: bigint;
695
+ callData?: string;
696
+ callGasLimit?: bigint;
697
+ verificationGasLimit?: bigint;
698
+ preVerificationGas?: bigint;
699
+ maxFeePerGas?: bigint;
700
+ maxPriorityFeePerGas?: bigint;
701
+ callGasLimitPercentageMultiplier?: number;
702
+ verificationGasLimitPercentageMultiplier?: number;
703
+ preVerificationGasPercentageMultiplier?: number;
704
+ maxFeePerGasPercentageMultiplier?: number;
705
+ maxPriorityFeePerGasPercentageMultiplier?: number;
706
+ state_override_set?: StateOverrideSet;
707
+ skipGasEstimation?: boolean;
708
+ dummySignerSignaturePairs?: SignerSignaturePair[];
709
+ webAuthnSharedSigner?: string;
710
+ webAuthnSignerFactory?: string;
711
+ webAuthnSignerSingleton?: string;
712
+ webAuthnSignerProxyCreationCode?: string;
713
+ eip7212WebAuthnPrecompileVerifier?: string;
714
+ eip7212WebAuthnContractVerifier?: string;
715
+ safeModuleExecutorFunctionSelector?: SafeModuleExecutorFunctionSelector;
716
+ multisendContractAddress?: string;
717
+ gasLevel?: GasOption;
718
+ polygonGasStation?: PolygonChain;
719
+ expectedSigners?: Signer$1[];
720
+ isMultiChainSignature?: boolean;
721
+ parallelPaymasterInitValues?: {
722
+ paymaster: string;
723
+ paymasterVerificationGasLimit: bigint;
724
+ paymasterPostOpGasLimit: bigint;
725
+ paymasterData: string;
726
+ };
727
+ }
728
+ interface CreateUserOperationV6Overrides extends CreateBaseUserOperationOverrides {
729
+ initCode?: string;
730
+ }
731
+ interface CreateUserOperationV7Overrides extends CreateBaseUserOperationOverrides {
732
+ factory?: string;
733
+ factoryData?: string;
734
+ }
735
+ interface CreateUserOperationV9Overrides extends CreateUserOperationV7Overrides {}
736
+ interface SafeAccountSingleton {
737
+ singletonAddress: string;
738
+ singletonInitHash: string;
739
+ }
740
+ interface InitCodeOverrides {
741
+ threshold?: number;
742
+ c2Nonce?: bigint;
743
+ safe4337ModuleAddress?: string;
744
+ safeModuleSetupAddress?: string;
745
+ entrypointAddress?: string;
746
+ safeAccountSingleton?: SafeAccountSingleton;
747
+ safeAccountFactoryAddress?: string;
748
+ multisendContractAddress?: string;
749
+ webAuthnSharedSigner?: string;
750
+ eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
751
+ eip7212WebAuthnContractVerifierForSharedSigner?: string;
752
+ onChainIdentifierParams?: OnChainIdentifierParamsType;
753
+ onChainIdentifier?: string;
754
+ }
755
+ interface BaseInitOverrides {
756
+ threshold?: number;
757
+ c2Nonce?: bigint;
758
+ safeAccountSingleton?: SafeAccountSingleton;
759
+ safeAccountFactoryAddress?: string;
760
+ multisendContractAddress?: string;
761
+ webAuthnSharedSigner?: string;
762
+ eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
763
+ eip7212WebAuthnContractVerifierForSharedSigner?: string;
438
764
  }
439
765
  interface WebAuthnSignatureOverrides {
440
766
  isInit?: boolean;
@@ -494,14 +820,14 @@ interface WebauthnPublicKey {
494
820
  x: bigint;
495
821
  y: bigint;
496
822
  }
497
- type Signer = ECDSAPublicAddress | WebauthnPublicKey;
823
+ type Signer$1 = ECDSAPublicAddress | WebauthnPublicKey;
498
824
  interface WebauthnSignatureData {
499
825
  authenticatorData: ArrayBuffer;
500
826
  clientDataFields: string;
501
827
  rs: [bigint, bigint];
502
828
  }
503
829
  interface SignerSignaturePair {
504
- signer: Signer;
830
+ signer: Signer$1;
505
831
  signature: string;
506
832
  isContractSignature?: boolean;
507
833
  }
@@ -532,30 +858,6 @@ interface MultiChainSignatureMerkleTreeRootTypedMessageValue {
532
858
  merkleTreeRoot: string;
533
859
  }
534
860
  //#endregion
535
- //#region src/account/Safe/safeMessage.d.ts
536
- declare const SAFE_MESSAGE_PRIMARY_TYPE = "SafeMessage";
537
- declare const SAFE_MESSAGE_MODULE_TYPE: {
538
- SafeMessage: {
539
- type: string;
540
- name: string;
541
- }[];
542
- };
543
- type SafeMessageTypedDataDomain = {
544
- chainId: number;
545
- verifyingContract: string;
546
- };
547
- type SafeMessageTypedMessageValue = {
548
- message: string;
549
- };
550
- declare function getSafeMessageEip712Data(accountAddress: string, chainId: bigint, message: string): {
551
- domain: SafeMessageTypedDataDomain;
552
- types: Record<string, {
553
- name: string;
554
- type: string;
555
- }[]>;
556
- messageValue: SafeMessageTypedMessageValue;
557
- };
558
- //#endregion
559
861
  //#region src/account/Safe/SafeAccount.d.ts
560
862
  declare class SafeAccount extends SmartAccount {
561
863
  static readonly DEFAULT_WEB_AUTHN_SHARED_SIGNER: string;
@@ -625,7 +927,7 @@ declare class SafeAccount extends SmartAccount {
625
927
  name: string;
626
928
  type: string;
627
929
  }[]>;
628
- messageValue: SafeUserOperationV6TypedMessageValue | SafeUserOperationV6TypedMessageValue;
930
+ messageValue: SafeUserOperationV6TypedMessageValue | SafeUserOperationV7TypedMessageValue | SafeUserOperationV9TypedMessageValue;
629
931
  };
630
932
  static getUserOperationEip712Data_V6(useroperation: UserOperationV6, chainId: bigint, overrides?: {
631
933
  validAfter?: bigint;
@@ -677,7 +979,7 @@ declare class SafeAccount extends SmartAccount {
677
979
  name: string;
678
980
  type: string;
679
981
  }[]>;
680
- messageValue: SafeUserOperationV6TypedMessageValue;
982
+ messageValue: SafeUserOperationV9TypedMessageValue;
681
983
  };
682
984
  static getUserOperationEip712Hash_V9(useroperation: UserOperationV9, chainId: bigint, overrides?: {
683
985
  validAfter?: bigint;
@@ -691,16 +993,16 @@ declare class SafeAccount extends SmartAccount {
691
993
  isMultiChainSignature?: boolean;
692
994
  }): string;
693
995
  sendUserOperation(userOperation: UserOperationV6 | UserOperationV7 | UserOperationV9, bundlerRpc: string): Promise<SendUseroperationResponse>;
694
- protected static createAccountAddressAndFactoryAddressAndData(owners: Signer[], overrides: BaseInitOverrides, safe4337ModuleAddress: string, safeModuleSetupAddress: string): [string, string, string];
695
- protected static createBaseInitializerCallData(owners: Signer[], threshold: number, safe4337ModuleAddress: string, safeModuleSetupAddress: string, multisendContractAddress?: string, webAuthnSharedSigner?: string, eip7212WebAuthnPrecompileVerifierForSharedSigner?: string, eip7212WebAuthnContractVerifierForSharedSigner?: string): string;
696
- protected static createFactoryAddressAndData(owners: Signer[], overrides: BaseInitOverrides | undefined, safe4337ModuleAddress: string, safeModuleSetupAddress: string): [string, string];
996
+ protected static createAccountAddressAndFactoryAddressAndData(owners: Signer$1[], overrides: BaseInitOverrides, safe4337ModuleAddress: string, safeModuleSetupAddress: string): [string, string, string];
997
+ protected static createBaseInitializerCallData(owners: Signer$1[], threshold: number, safe4337ModuleAddress: string, safeModuleSetupAddress: string, multisendContractAddress?: string, webAuthnSharedSigner?: string, eip7212WebAuthnPrecompileVerifierForSharedSigner?: string, eip7212WebAuthnContractVerifierForSharedSigner?: string): string;
998
+ protected static createFactoryAddressAndData(owners: Signer$1[], overrides: BaseInitOverrides | undefined, safe4337ModuleAddress: string, safeModuleSetupAddress: string): [string, string];
697
999
  prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint, overrides?: {
698
1000
  multisendContractAddress?: string;
699
1001
  }): string;
700
1002
  baseEstimateUserOperationGas(userOperation: UserOperationV6 | UserOperationV7, bundlerRpc: string, overrides?: {
701
1003
  stateOverrideSet?: StateOverrideSet;
702
1004
  dummySignerSignaturePairs?: SignerSignaturePair[];
703
- expectedSigners?: Signer[];
1005
+ expectedSigners?: Signer$1[];
704
1006
  webAuthnSharedSigner?: string;
705
1007
  webAuthnSignerFactory?: string;
706
1008
  webAuthnSignerSingleton?: string;
@@ -710,11 +1012,17 @@ declare class SafeAccount extends SmartAccount {
710
1012
  isMultiChainSignature?: boolean;
711
1013
  }): Promise<[bigint, bigint, bigint]>;
712
1014
  protected createBaseUserOperationAndFactoryAddressAndFactoryData(transactions: MetaTransaction[], isV06: boolean, providerRpc?: string, bundlerRpc?: string, overrides?: CreateBaseUserOperationOverrides): Promise<[BaseUserOperation, string | null, string | null]>;
713
- static baseSignSingleUserOperation(useroperation: UserOperationV6 | UserOperationV7, privateKeys: string[], chainId: bigint, entrypointAddress: string, safe4337ModuleAddress: string, overrides?: {
1015
+ protected static baseSignSingleUserOperation(useroperation: UserOperationV6 | UserOperationV7, privateKeys: string[], chainId: bigint, entrypointAddress: string, safe4337ModuleAddress: string, overrides?: {
714
1016
  validAfter?: bigint;
715
1017
  validUntil?: bigint;
716
1018
  isMultiChainSignature?: boolean;
717
1019
  }): string;
1020
+ static readonly ACCEPTED_SIGNING_SCHEMES: readonly SigningScheme[];
1021
+ protected static baseSignUserOperationWithSigners<T extends UserOperationV6 | UserOperationV7 | UserOperationV9, C>(useroperation: T, signers: ReadonlyArray<Signer<C>>, chainId: bigint, entrypointAddress: string, safe4337ModuleAddress: string, context: C, overrides?: {
1022
+ validAfter?: bigint;
1023
+ validUntil?: bigint;
1024
+ isMultiChainSignature?: boolean;
1025
+ }): Promise<string>;
718
1026
  static createWebAuthnSignerVerifierAddress(x: bigint, y: bigint, overrides?: {
719
1027
  eip7212WebAuthnPrecompileVerifier?: string;
720
1028
  eip7212WebAuthnContractVerifier?: string;
@@ -723,11 +1031,11 @@ declare class SafeAccount extends SmartAccount {
723
1031
  webAuthnSignerProxyCreationCode?: string;
724
1032
  }): string;
725
1033
  static formatSignaturesToUseroperationSignature(signerSignaturePairs: SignerSignaturePair[], overrides?: WebAuthnSignatureOverrides): string;
726
- static getSignerLowerCaseAddress(signer: Signer, overrides?: WebAuthnSignatureOverrides): string;
1034
+ static getSignerLowerCaseAddress(signer: Signer$1, overrides?: WebAuthnSignatureOverrides): string;
727
1035
  static sortSignatures(signerSignaturePairs: SignerSignaturePair[], overrides?: WebAuthnSignatureOverrides): void;
728
1036
  static buildSignaturesFromSingerSignaturePairs(signerSignaturePairs: SignerSignaturePair[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): string;
729
1037
  static createWebAuthnSignature(signatureData: WebauthnSignatureData): string;
730
- createSwapOwnerMetaTransactions(nodeRpcUrl: string, newOwner: Signer, oldOwner: Signer, overrides?: {
1038
+ createSwapOwnerMetaTransactions(nodeRpcUrl: string, newOwner: Signer$1, oldOwner: Signer$1, overrides?: {
731
1039
  prevOwner?: string;
732
1040
  eip7212WebAuthnPrecompileVerifier?: string;
733
1041
  eip7212WebAuthnContractVerifier?: string;
@@ -735,7 +1043,7 @@ declare class SafeAccount extends SmartAccount {
735
1043
  webAuthnSignerSingleton?: string;
736
1044
  webAuthnSignerProxyCreationCode?: string;
737
1045
  }): Promise<MetaTransaction[]>;
738
- createRemoveOwnerMetaTransaction(nodeRpcUrl: string, ownerToDelete: Signer, threshold: number, overrides?: {
1046
+ createRemoveOwnerMetaTransaction(nodeRpcUrl: string, ownerToDelete: Signer$1, threshold: number, overrides?: {
739
1047
  prevOwner?: string;
740
1048
  eip7212WebAuthnPrecompileVerifier?: string;
741
1049
  eip7212WebAuthnContractVerifier?: string;
@@ -743,7 +1051,7 @@ declare class SafeAccount extends SmartAccount {
743
1051
  webAuthnSignerSingleton?: string;
744
1052
  webAuthnSignerProxyCreationCode?: string;
745
1053
  }): Promise<MetaTransaction>;
746
- createAddOwnerWithThresholdMetaTransactions(newOwner: Signer, threshold: number, overrides?: {
1054
+ createAddOwnerWithThresholdMetaTransactions(newOwner: Signer$1, threshold: number, overrides?: {
747
1055
  nodeRpcUrl?: string;
748
1056
  eip7212WebAuthnPrecompileVerifier?: string;
749
1057
  eip7212WebAuthnContractVerifier?: string;
@@ -768,7 +1076,7 @@ declare class SafeAccount extends SmartAccount {
768
1076
  pageSize?: bigint;
769
1077
  }): Promise<[string[], string]>;
770
1078
  isModuleEnabled(nodeRpcUrl: string, moduleAddress: string): Promise<boolean>;
771
- static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
1079
+ static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer$1[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
772
1080
  static verifyWebAuthnSignatureForMessageHash(nodeRpcUrl: string, signer: WebauthnPublicKey, messageHash: string, signature: string, overrides?: {
773
1081
  eip7212WebAuthnPrecompileVerifier?: string;
774
1082
  eip7212WebAuthnContractVerifier?: string;
@@ -803,33 +1111,37 @@ declare class SafeAccount extends SmartAccount {
803
1111
  };
804
1112
  }
805
1113
  //#endregion
806
- //#region src/account/Safe/SafeMultiChainSigAccount.d.ts
807
- declare class SafeMultiChainSigAccountV1 extends SafeAccount {
808
- static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x433709009B8330FDa32311DF1C2AFA402eD8D009";
809
- static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "0x22939E839e3c0F479B713eAF95e0df128554AEAd";
810
- static readonly DEFAULT_SAFE_MODULE_SETUP_ADDRESS = "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47";
811
- static readonly DEFAULT_WEB_AUTHN_SHARED_SIGNER: string;
812
- static readonly DEFAULT_WEB_AUTHN_SIGNER_SINGLETON: string;
813
- static readonly DEFAULT_WEB_AUTHN_SIGNER_FACTORY: string;
814
- static readonly DEFAULT_WEB_AUTHN_SIGNER_PROXY_CREATION_CODE = "0x610100346100ad57601f6101b538819003918201601f19168301916001600160401b038311848410176100b2578084926080946040528339810103126100ad578051906001600160a01b03821682036100ad5760208101516040820151606090920151926001600160b01b03841684036100ad5760805260a05260c05260e05260405160ec90816100c98239608051816082015260a05181604d015260c051816027015260e0518160010152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe7f000000000000000000000000000000000000000000000000000000000000000060b63601527f000000000000000000000000000000000000000000000000000000000000000060a03601527f000000000000000000000000000000000000000000000000000000000000000036608001523660006080376000806056360160807f00000000000000000000000000000000000000000000000000000000000000005af43d600060803e60b1573d6080fd5b3d6080f3fea26469706673582212201660515548d15702d720bbc046b457ca85e941a4559ab9f9518488e4c82e5ee964736f6c634300081a0033";
815
- static readonly DEFAULT_WEB_AUTHN_PRECOMPILE: string;
816
- static readonly DEFAULT_WEB_AUTHN_DAIMO_VERIFIER: string;
1114
+ //#region src/account/Safe/SafeAccountV0_2_0.d.ts
1115
+ declare class SafeAccountV0_2_0 extends SafeAccount {
1116
+ static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
1117
+ static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "0xa581c4A4DB7175302464fF3C06380BC3270b4037";
1118
+ static readonly DEFAULT_SAFE_MODULE_SETUP_ADDRESS = "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb";
817
1119
  constructor(accountAddress: string, overrides?: {
818
1120
  safe4337ModuleAddress?: string;
819
1121
  entrypointAddress?: string;
820
1122
  onChainIdentifierParams?: OnChainIdentifierParamsType;
821
1123
  onChainIdentifier?: string;
822
- safeAccountSingleton?: SafeAccountSingleton;
823
1124
  });
824
- static createAccountAddress(owners: Signer[], overrides?: InitCodeOverrides): string;
825
- static initializeNewAccount(owners: Signer[], overrides?: InitCodeOverrides): SafeMultiChainSigAccountV1;
826
- static getUserOperationEip712Hash(useroperation: UserOperationV9, chainId: bigint, overrides?: {
1125
+ static createAccountAddress(owners: Signer$1[], overrides?: {
1126
+ threshold?: number;
1127
+ c2Nonce?: bigint;
1128
+ safe4337ModuleAddress?: string;
1129
+ safeModuleSetupAddress?: string;
1130
+ safeAccountSingleton?: SafeAccountSingleton;
1131
+ safeAccountFactoryAddress?: string;
1132
+ multisendContractAddress?: string;
1133
+ webAuthnSharedSigner?: string;
1134
+ eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
1135
+ eip7212WebAuthnContractVerifierForSharedSigner?: string;
1136
+ }): string;
1137
+ static initializeNewAccount(owners: Signer$1[], overrides?: InitCodeOverrides): SafeAccountV0_2_0;
1138
+ static getUserOperationEip712Hash(useroperation: UserOperationV6, chainId: bigint, overrides?: {
827
1139
  validAfter?: bigint;
828
1140
  validUntil?: bigint;
829
1141
  entrypointAddress?: string;
830
1142
  safe4337ModuleAddress?: string;
831
1143
  }): string;
832
- static getUserOperationEip712Data(useroperation: UserOperationV9, chainId: bigint, overrides?: {
1144
+ static getUserOperationEip712Data(useroperation: UserOperationV6, chainId: bigint, overrides?: {
833
1145
  validAfter?: bigint;
834
1146
  validUntil?: bigint;
835
1147
  entrypointAddress?: string;
@@ -840,9 +1152,10 @@ declare class SafeMultiChainSigAccountV1 extends SafeAccount {
840
1152
  name: string;
841
1153
  type: string;
842
1154
  }[]>;
843
- messageValue: SafeUserOperationV9TypedMessageValue;
1155
+ messageValue: SafeUserOperationV6TypedMessageValue;
844
1156
  };
845
- static createInitializerCallData(owners: Signer[], threshold: number, overrides?: {
1157
+ static createAccountAddressAndInitCode(owners: Signer$1[], overrides?: InitCodeOverrides): [string, string];
1158
+ static createInitializerCallData(owners: Signer$1[], threshold: number, overrides?: {
846
1159
  safe4337ModuleAddress?: string;
847
1160
  safeModuleSetupAddress?: string;
848
1161
  multisendContractAddress?: string;
@@ -850,363 +1163,7 @@ declare class SafeMultiChainSigAccountV1 extends SafeAccount {
850
1163
  eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
851
1164
  eip7212WebAuthnContractVerifierForSharedSigner?: string;
852
1165
  }): string;
853
- static createFactoryAddressAndData(owners: Signer[], overrides?: InitCodeOverrides): [string, string];
854
- createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationV9Overrides): Promise<UserOperationV9>;
855
- signUserOperation(userOperation: UserOperationV9, privateKeys: string[], chainId: bigint, overrides?: {
856
- validAfter?: bigint;
857
- validUntil?: bigint;
858
- }): string;
859
- signUserOperations(userOperationsToSign: UserOperationToSign[], privateKeys: string[]): string[];
860
- static getMultiChainSingleSignatureUserOperationsEip712Hash(userOperationsToSignsToSign: UserOperationToSign[], overrides?: {
861
- safe4337ModuleAddress?: string;
862
- }): string;
863
- static getMultiChainSingleSignatureUserOperationsEip712Data(userOperationsToSign: UserOperationToSign[], overrides?: {
864
- safe4337ModuleAddress?: string;
865
- entrypointAddress?: string;
866
- }): {
867
- domain: MultiChainSignatureMerkleTreeRootTypedDataDomain;
868
- types: Record<string, {
869
- name: string;
870
- type: string;
871
- }[]>;
872
- messageValue: MultiChainSignatureMerkleTreeRootTypedMessageValue;
873
- };
874
- static formatSignaturesToUseroperationsSignatures(userOperationsToSign: UserOperationToSignWithOverrides[], signerSignaturePairs: SignerSignaturePair[]): string[];
875
- static createWebAuthnSignerVerifierAddress(x: bigint, y: bigint, overrides?: {
876
- eip7212WebAuthnPrecompileVerifier?: string;
877
- eip7212WebAuthnContractVerifier?: string;
878
- webAuthnSignerFactory?: string;
879
- webAuthnSignerSingleton?: string;
880
- webAuthnSignerProxyCreationCode?: string;
881
- }): string;
882
- static createDeployWebAuthnVerifierMetaTransaction(x: bigint, y: bigint, overrides?: {
883
- eip7212WebAuthnPrecompileVerifier?: string;
884
- eip7212WebAuthnContractVerifier?: string;
885
- webAuthnSignerFactory?: string;
886
- }): MetaTransaction;
887
- static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
888
- static verifyWebAuthnSignatureForMessageHash(nodeRpcUrl: string, signer: WebauthnPublicKey, messageHash: string, signature: string, overrides?: {
889
- eip7212WebAuthnPrecompileVerifier?: string;
890
- eip7212WebAuthnContractVerifier?: string;
891
- webAuthnSignerSingleton?: string;
892
- }): Promise<boolean>;
893
- }
894
- //#endregion
895
- //#region src/paymaster/types.d.ts
896
- type AnyUserOperation = UserOperationV9 | UserOperationV8 | UserOperationV7 | UserOperationV6;
897
- type SameUserOp<T extends AnyUserOperation> = T extends UserOperationV9 ? UserOperationV9 : T extends UserOperationV8 ? UserOperationV8 : T extends UserOperationV7 ? UserOperationV7 : UserOperationV6;
898
- interface CandidePaymasterContext {
899
- token?: string;
900
- sponsorshipPolicyId?: string;
901
- signingPhase?: 'commit' | 'finalize';
902
- }
903
- interface SmartAccountWithEntrypoint {
904
- readonly entrypointAddress: string;
905
- }
906
- interface PrependTokenPaymasterApproveAccount extends SmartAccountWithEntrypoint {
907
- prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
908
- }
909
- type Erc7677Provider = "pimlico" | "candide" | null;
910
- interface Erc7677PaymasterConstructorOptions {
911
- chainId?: bigint;
912
- provider?: "auto" | Erc7677Provider;
913
- }
914
- interface BasePaymasterUserOperationOverrides {
915
- entrypoint?: string;
916
- resetApproval?: boolean;
917
- }
918
- interface GasPaymasterUserOperationOverrides extends BasePaymasterUserOperationOverrides {
919
- callGasLimit?: bigint;
920
- verificationGasLimit?: bigint;
921
- preVerificationGas?: bigint;
922
- callGasLimitPercentageMultiplier?: number;
923
- verificationGasLimitPercentageMultiplier?: number;
924
- preVerificationGasPercentageMultiplier?: number;
925
- state_override_set?: StateOverrideSet;
926
- context?: CandidePaymasterContext;
927
- }
928
- //#endregion
929
- //#region src/account/Calibur/types.d.ts
930
- declare enum CaliburKeyType {
931
- P256 = 0,
932
- WebAuthnP256 = 1,
933
- Secp256k1 = 2
934
- }
935
- interface CaliburKey {
936
- keyType: CaliburKeyType;
937
- publicKey: string;
938
- }
939
- interface CaliburKeySettings {
940
- hook?: string;
941
- expiration?: number;
942
- isAdmin?: boolean;
943
- }
944
- interface CaliburKeySettingsResult {
945
- hook: string;
946
- expiration: number;
947
- isAdmin: boolean;
948
- }
949
- interface WebAuthnSignatureData {
950
- authenticatorData: string;
951
- clientDataJSON: string;
952
- challengeIndex: bigint;
953
- typeIndex: bigint;
954
- r: bigint;
955
- s: bigint;
956
- }
957
- interface CaliburCreateUserOperationOverrides {
958
- nonce?: bigint;
959
- callData?: string;
960
- callGasLimit?: bigint;
961
- verificationGasLimit?: bigint;
962
- preVerificationGas?: bigint;
963
- maxFeePerGas?: bigint;
964
- maxPriorityFeePerGas?: bigint;
965
- callGasLimitPercentageMultiplier?: number;
966
- verificationGasLimitPercentageMultiplier?: number;
967
- preVerificationGasPercentageMultiplier?: number;
968
- maxFeePerGasPercentageMultiplier?: number;
969
- maxPriorityFeePerGasPercentageMultiplier?: number;
970
- state_override_set?: StateOverrideSet;
971
- dummySignature?: string;
972
- gasLevel?: GasOption;
973
- polygonGasStation?: PolygonChain;
974
- revertOnFailure?: boolean;
975
- paymasterFields?: ParallelPaymasterInitValues;
976
- eip7702Auth?: {
977
- chainId: bigint;
978
- address?: string;
979
- nonce?: bigint;
980
- yParity?: string;
981
- r?: string;
982
- s?: string;
983
- };
984
- }
985
- interface CaliburSignatureOverrides {
986
- hookData?: string;
987
- keyHash?: string;
988
- }
989
- type SignerFunction = (hash: string) => Promise<string>;
990
- //#endregion
991
- //#region src/account/Calibur/Calibur7702Account.d.ts
992
- declare class Calibur7702Account extends SmartAccount implements PrependTokenPaymasterApproveAccount {
993
- static readonly executorFunctionSelector = "0x8dd7712f";
994
- static readonly dummySignature: string;
995
- static createDummyWebAuthnSignature(keyHash: string): string;
996
- static wrapSignature(keyHash: string, rawSignature: string, hookData?: string): string;
997
- readonly entrypointAddress: string;
998
- readonly delegateeAddress: string;
999
- constructor(accountAddress: string, overrides?: {
1000
- entrypointAddress?: string;
1001
- delegateeAddress?: string;
1002
- });
1003
- getUserOperationHash(userOperation: UserOperationV8, chainId: bigint): string;
1004
- static createAccountCallData(transactions: SimpleMetaTransaction[], revertOnFailure?: boolean): string;
1005
- createUserOperation(transactions: SimpleMetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CaliburCreateUserOperationOverrides): Promise<UserOperationV8>;
1006
- signUserOperation(userOperation: UserOperationV8, privateKey: string, chainId: bigint, overrides?: CaliburSignatureOverrides): string;
1007
- signUserOperationWithSigner(userOperation: UserOperationV8, signer: SignerFunction, chainId: bigint, overrides?: CaliburSignatureOverrides): Promise<string>;
1008
- formatWebAuthnSignature(keyHash: string, webAuthnAuth: WebAuthnSignatureData, overrides?: CaliburSignatureOverrides): string;
1009
- sendUserOperation(userOperation: UserOperationV8, bundlerRpc: string): Promise<SendUseroperationResponse>;
1010
- static createSecp256k1Key(address: string): CaliburKey;
1011
- static createWebAuthnP256Key(x: bigint, y: bigint): CaliburKey;
1012
- static createP256Key(x: bigint, y: bigint): CaliburKey;
1013
- static getKeyHash(key: CaliburKey): string;
1014
- static packKeySettings(settings: CaliburKeySettings): bigint;
1015
- static unpackKeySettings(packed: bigint): CaliburKeySettingsResult;
1016
- static createRegisterKeyMetaTransactions(key: CaliburKey, settings?: CaliburKeySettings): [SimpleMetaTransaction, SimpleMetaTransaction];
1017
- static createRevokeKeyMetaTransaction(keyHash: string): SimpleMetaTransaction;
1018
- createRevokeAllKeysMetaTransactions(providerRpc: string): Promise<SimpleMetaTransaction[]>;
1019
- createRevokeDelegationRawTransaction(chainId: bigint, eoaPrivateKey: string, providerRpc: string, overrides?: {
1020
- nonce?: bigint;
1021
- authorizationNonce?: bigint;
1022
- maxFeePerGas?: bigint;
1023
- maxPriorityFeePerGas?: bigint;
1024
- gasLimit?: bigint;
1025
- }): Promise<string>;
1026
- static createUpdateKeySettingsMetaTransaction(keyHash: string, settings: CaliburKeySettings): SimpleMetaTransaction;
1027
- static createInvalidateNonceMetaTransaction(newNonce: bigint): SimpleMetaTransaction;
1028
- isDelegatedToThisAccount(providerRpc: string): Promise<boolean>;
1029
- getNonce(providerRpc: string, sequenceKey?: number): Promise<bigint>;
1030
- isKeyRegistered(providerRpc: string, keyHash: string): Promise<boolean>;
1031
- getKeySettings(providerRpc: string, keyHash: string): Promise<CaliburKeySettingsResult>;
1032
- getKey(providerRpc: string, keyHash: string): Promise<CaliburKey>;
1033
- getKeys(providerRpc: string, overrides?: {
1034
- blockNumber?: bigint;
1035
- }): Promise<CaliburKey[]>;
1036
- prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
1037
- static prependTokenPaymasterApproveToCallDataStatic(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint): string;
1038
- }
1039
- //#endregion
1040
- //#region src/account/Safe/modules/SafeModule.d.ts
1041
- declare abstract class SafeModule {
1042
- readonly moduleAddress: string;
1043
- protected readonly abiCoder: AbiCoder;
1044
- constructor(moduleAddress: string);
1045
- createEnableModuleMetaTransaction(accountAddress: string): MetaTransaction;
1046
- checkForEmptyResultAndRevert(result: string, requestName: string): void;
1047
- }
1048
- //#endregion
1049
- //#region src/account/Safe/modules/SocialRecoveryModule.d.ts
1050
- declare enum SocialRecoveryModuleGracePeriodSelector {
1051
- After3Minutes = "0x949d01d424bE050D09C16025dd007CB59b3A8c66",
1052
- After3Days = "0x38275826E1933303E508433dD5f289315Da2541c",
1053
- After7Days = "0x088f6cfD8BB1dDb1BB069CCb3fc1A98927D233f2",
1054
- After14Days = "0x9BacD92F4687Db306D7ded5d4513a51EA05df25b"
1055
- }
1056
- declare class SocialRecoveryModule extends SafeModule {
1057
- static readonly DEFAULT_SOCIAL_RECOVERY_ADDRESS = SocialRecoveryModuleGracePeriodSelector.After3Days;
1058
- constructor(moduleAddress?: string);
1059
- createConfirmRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number, execute: boolean): MetaTransaction;
1060
- createMultiConfirmRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number, signaturePairList: RecoverySignaturePair[], execute: boolean): MetaTransaction;
1061
- createExecuteRecoveryMetaTransaction(accountAddress: string, newOwners: string[], newThreshold: number): MetaTransaction;
1062
- createFinalizeRecoveryMetaTransaction(accountAddress: string): MetaTransaction;
1063
- createCancelRecoveryMetaTransaction(): MetaTransaction;
1064
- createAddGuardianWithThresholdMetaTransaction(guardianAddress: string, threshold: bigint): MetaTransaction;
1065
- createRevokeGuardianWithThresholdMetaTransaction(nodeRpcUrl: string, accountAddress: string, guardianAddress: string, threshold: bigint, overrides?: {
1066
- prevGuardianAddress?: string;
1067
- }): Promise<MetaTransaction>;
1068
- createStandardRevokeGuardianWithThresholdMetaTransaction(prevGuardianAddress: string, guardianAddress: string, threshold: bigint): MetaTransaction;
1069
- createChangeThresholdMetaTransaction(threshold: bigint): MetaTransaction;
1070
- getRecoveryHash(nodeRpcUrl: string, accountAddress: string, newOwners: string[], newThreshold: number, nonce: bigint): Promise<string>;
1071
- getRecoveryRequest(nodeRpcUrl: string, accountAddress: string): Promise<RecoveryRequest>;
1072
- getRecoveryApprovals(nodeRpcUrl: string, accountAddress: string, newOwners: string[], newThreshold: number): Promise<bigint>;
1073
- hasGuardianApproved(nodeRpcUrl: string, accountAddress: string, guardian: string, newOwners: string[], newThreshold: number): Promise<boolean>;
1074
- isGuardian(nodeRpcUrl: string, accountAddress: string, guardian: string): Promise<boolean>;
1075
- guardiansCount(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
1076
- threshold(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
1077
- getGuardians(nodeRpcUrl: string, accountAddress: string): Promise<string[]>;
1078
- nonce(nodeRpcUrl: string, accountAddress: string): Promise<bigint>;
1079
- getRecoveryRequestEip712Data(rpcNode: string, chainId: bigint, accountAddress: string, newOwners: string[], newThreshold: bigint, overrides?: {
1080
- recoveryNonce?: bigint;
1081
- }): Promise<{
1082
- domain: RecoveryRequestTypedDataDomain;
1083
- types: Record<string, {
1084
- name: string;
1085
- type: string;
1086
- }[]>;
1087
- messageValue: RecoveryRequestTypedMessageValue;
1088
- }>;
1089
- }
1090
- type RecoveryRequest = {
1091
- guardiansApprovalCount: bigint;
1092
- newThreshold: bigint;
1093
- executeAfter: bigint;
1094
- newOwners: string[];
1095
- };
1096
- type RecoverySignaturePair = {
1097
- signer: string;
1098
- signature: string;
1099
- };
1100
- declare const EXECUTE_RECOVERY_PRIMARY_TYPE = "ExecuteRecovery";
1101
- type RecoveryRequestTypedDataDomain = {
1102
- name: string;
1103
- version: string;
1104
- chainId: number;
1105
- verifyingContract: string;
1106
- };
1107
- type RecoveryRequestTypedMessageValue = {
1108
- wallet: string;
1109
- newOwners: string[];
1110
- newThreshold: bigint;
1111
- nonce: bigint;
1112
- };
1113
- declare const EIP712_RECOVERY_MODULE_TYPE: {
1114
- ExecuteRecovery: {
1115
- type: string;
1116
- name: string;
1117
- }[];
1118
- };
1119
- //#endregion
1120
- //#region src/account/Safe/modules/AllowanceModule.d.ts
1121
- declare const ALLOWANCE_MODULE_V0_1_0_ADDRESS = "0xAA46724893dedD72658219405185Fb0Fc91e091C";
1122
- declare class AllowanceModule extends SafeModule {
1123
- static readonly DEFAULT_ALLOWANCE_MODULE_ADDRESS = "0x691f59471Bfd2B7d639DCF74671a2d648ED1E331";
1124
- constructor(moduleAddress?: string);
1125
- createOneTimeAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, startAfterInMinutes: bigint): MetaTransaction;
1126
- createRecurringAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, recurringAllowanceValidityPeriodInMinutes: bigint, startAfterInMinutes: bigint): MetaTransaction;
1127
- createBaseSetAllowanceMetaTransaction(delegate: string, token: string, allowanceAmount: bigint, resetTimeMin: bigint, resetBaseMin: bigint): MetaTransaction;
1128
- createRenewAllowanceMetaTransaction(delegate: string, token: string): MetaTransaction;
1129
- createDeleteAllowanceMetaTransaction(delegate: string, token: string): MetaTransaction;
1130
- createAllowanceTransferMetaTransaction(allowanceSourceSafeAddress: string, token: string, to: string, amount: bigint, delegate: string, overrides?: {
1131
- delegateSignature?: string;
1132
- paymentToken?: string;
1133
- paymentAmount?: bigint;
1134
- }): MetaTransaction;
1135
- createBaseExecuteAllowanceTransferMetaTransaction(safeAddress: string, token: string, to: string, amount: bigint, paymentToken: string, payment: bigint, delegate: string, delegateSignature: string): MetaTransaction;
1136
- createAddDelegateMetaTransaction(delegate: string): MetaTransaction;
1137
- createRemoveDelegateMetaTransaction(delegate: string, removeAllowances: boolean): MetaTransaction;
1138
- getTokens(nodeRpcUrl: string, safeAddress: string, delegate: string): Promise<string[]>;
1139
- getTokensAllowance(nodeRpcUrl: string, safeAddress: string, delegate: string, token: string): Promise<Allowance>;
1140
- getDelegates(nodeRpcUrl: string, safeAddress: string, overrides?: {
1141
- start?: bigint;
1142
- maxNumberOfResults?: bigint;
1143
- }): Promise<string[]>;
1144
- baseGetDelegates(nodeRpcUrl: string, safeAddress: string, start: bigint, pageSize: bigint): Promise<{
1145
- results: string[];
1146
- next: bigint;
1147
- }>;
1148
- }
1149
- type Allowance = {
1150
- amount: bigint;
1151
- spent: bigint;
1152
- resetTimeMin: bigint;
1153
- lastResetMin: bigint;
1154
- nonce: bigint;
1155
- };
1156
- //#endregion
1157
- //#region src/account/Safe/SafeAccountV0_2_0.d.ts
1158
- declare class SafeAccountV0_2_0 extends SafeAccount {
1159
- static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
1160
- static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "0xa581c4A4DB7175302464fF3C06380BC3270b4037";
1161
- static readonly DEFAULT_SAFE_MODULE_SETUP_ADDRESS = "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb";
1162
- constructor(accountAddress: string, overrides?: {
1163
- safe4337ModuleAddress?: string;
1164
- entrypointAddress?: string;
1165
- onChainIdentifierParams?: OnChainIdentifierParamsType;
1166
- onChainIdentifier?: string;
1167
- });
1168
- static createAccountAddress(owners: Signer[], overrides?: {
1169
- threshold?: number;
1170
- c2Nonce?: bigint;
1171
- safe4337ModuleAddress?: string;
1172
- safeModuleSetupAddress?: string;
1173
- safeAccountSingleton?: SafeAccountSingleton;
1174
- safeAccountFactoryAddress?: string;
1175
- multisendContractAddress?: string;
1176
- webAuthnSharedSigner?: string;
1177
- eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
1178
- eip7212WebAuthnContractVerifierForSharedSigner?: string;
1179
- }): string;
1180
- static initializeNewAccount(owners: Signer[], overrides?: InitCodeOverrides): SafeAccountV0_2_0;
1181
- static getUserOperationEip712Hash(useroperation: UserOperationV6, chainId: bigint, overrides?: {
1182
- validAfter?: bigint;
1183
- validUntil?: bigint;
1184
- entrypointAddress?: string;
1185
- safe4337ModuleAddress?: string;
1186
- }): string;
1187
- static getUserOperationEip712Data(useroperation: UserOperationV6, chainId: bigint, overrides?: {
1188
- validAfter?: bigint;
1189
- validUntil?: bigint;
1190
- entrypointAddress?: string;
1191
- safe4337ModuleAddress?: string;
1192
- }): {
1193
- domain: SafeUserOperationTypedDataDomain;
1194
- types: Record<string, {
1195
- name: string;
1196
- type: string;
1197
- }[]>;
1198
- messageValue: SafeUserOperationV6TypedMessageValue;
1199
- };
1200
- static createAccountAddressAndInitCode(owners: Signer[], overrides?: InitCodeOverrides): [string, string];
1201
- static createInitializerCallData(owners: Signer[], threshold: number, overrides?: {
1202
- safe4337ModuleAddress?: string;
1203
- safeModuleSetupAddress?: string;
1204
- multisendContractAddress?: string;
1205
- webAuthnSharedSigner?: string;
1206
- eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
1207
- eip7212WebAuthnContractVerifierForSharedSigner?: string;
1208
- }): string;
1209
- static createInitCode(owners: Signer[], overrides?: InitCodeOverrides): string;
1166
+ static createInitCode(owners: Signer$1[], overrides?: InitCodeOverrides): string;
1210
1167
  createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationV6Overrides): Promise<UserOperationV6>;
1211
1168
  createMigrateToSafeAccountV0_3_0MetaTransactions(nodeRpcUrl: string, overrides?: {
1212
1169
  safeV06ModuleAddress?: string;
@@ -1217,7 +1174,7 @@ declare class SafeAccountV0_2_0 extends SafeAccount {
1217
1174
  estimateUserOperationGas(userOperation: UserOperationV6, bundlerRpc: string, overrides?: {
1218
1175
  stateOverrideSet?: StateOverrideSet;
1219
1176
  dummySignerSignaturePairs?: SignerSignaturePair[];
1220
- expectedSigners?: Signer[];
1177
+ expectedSigners?: Signer$1[];
1221
1178
  webAuthnSharedSigner?: string;
1222
1179
  webAuthnSignerFactory?: string;
1223
1180
  webAuthnSignerSingleton?: string;
@@ -1229,6 +1186,11 @@ declare class SafeAccountV0_2_0 extends SafeAccount {
1229
1186
  validAfter?: bigint;
1230
1187
  validUntil?: bigint;
1231
1188
  }): string;
1189
+ signUserOperationWithSigners(useroperation: UserOperationV6, signers: ReadonlyArray<Signer>, chainId: bigint, overrides?: {
1190
+ validAfter?: bigint;
1191
+ validUntil?: bigint;
1192
+ isMultiChainSignature?: boolean;
1193
+ }): Promise<string>;
1232
1194
  }
1233
1195
  //#endregion
1234
1196
  //#region src/account/Safe/SafeAccountV0_3_0.d.ts
@@ -1243,8 +1205,8 @@ declare class SafeAccountV0_3_0 extends SafeAccount {
1243
1205
  onChainIdentifier?: string;
1244
1206
  safeAccountSingleton?: SafeAccountSingleton;
1245
1207
  });
1246
- static createAccountAddress(owners: Signer[], overrides?: InitCodeOverrides): string;
1247
- static initializeNewAccount(owners: Signer[], overrides?: InitCodeOverrides): SafeAccountV0_3_0;
1208
+ static createAccountAddress(owners: Signer$1[], overrides?: InitCodeOverrides): string;
1209
+ static initializeNewAccount(owners: Signer$1[], overrides?: InitCodeOverrides): SafeAccountV0_3_0;
1248
1210
  static getUserOperationEip712Hash(useroperation: UserOperationV7, chainId: bigint, overrides?: {
1249
1211
  validAfter?: bigint;
1250
1212
  validUntil?: bigint;
@@ -1264,7 +1226,7 @@ declare class SafeAccountV0_3_0 extends SafeAccount {
1264
1226
  }[]>;
1265
1227
  messageValue: SafeUserOperationV7TypedMessageValue;
1266
1228
  };
1267
- static createInitializerCallData(owners: Signer[], threshold: number, overrides?: {
1229
+ static createInitializerCallData(owners: Signer$1[], threshold: number, overrides?: {
1268
1230
  safe4337ModuleAddress?: string;
1269
1231
  safeModuleSetupAddress?: string;
1270
1232
  multisendContractAddress?: string;
@@ -1272,12 +1234,12 @@ declare class SafeAccountV0_3_0 extends SafeAccount {
1272
1234
  eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
1273
1235
  eip7212WebAuthnContractVerifierForSharedSigner?: string;
1274
1236
  }): string;
1275
- static createFactoryAddressAndData(owners: Signer[], overrides?: InitCodeOverrides): [string, string];
1237
+ static createFactoryAddressAndData(owners: Signer$1[], overrides?: InitCodeOverrides): [string, string];
1276
1238
  createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationV7Overrides): Promise<UserOperationV7>;
1277
1239
  estimateUserOperationGas(userOperation: UserOperationV7, bundlerRpc: string, overrides?: {
1278
1240
  stateOverrideSet?: StateOverrideSet;
1279
1241
  dummySignerSignaturePairs?: SignerSignaturePair[];
1280
- expectedSigners?: Signer[];
1242
+ expectedSigners?: Signer$1[];
1281
1243
  webAuthnSharedSigner?: string;
1282
1244
  webAuthnSignerFactory?: string;
1283
1245
  webAuthnSignerSingleton?: string;
@@ -1289,6 +1251,11 @@ declare class SafeAccountV0_3_0 extends SafeAccount {
1289
1251
  validAfter?: bigint;
1290
1252
  validUntil?: bigint;
1291
1253
  }): string;
1254
+ signUserOperationWithSigners(useroperation: UserOperationV7, signers: ReadonlyArray<Signer>, chainId: bigint, overrides?: {
1255
+ validAfter?: bigint;
1256
+ validUntil?: bigint;
1257
+ isMultiChainSignature?: boolean;
1258
+ }): Promise<string>;
1292
1259
  }
1293
1260
  //#endregion
1294
1261
  //#region src/account/Safe/SafeAccountV1_5_0_M_0_3_0.d.ts
@@ -1307,14 +1274,14 @@ declare class SafeAccountV1_5_0_M_0_3_0 extends SafeAccountV0_3_0 {
1307
1274
  safeFactoryAddress?: string;
1308
1275
  singletonInitHash?: string;
1309
1276
  }): string;
1310
- static initializeNewAccount(owners: Signer[], overrides?: InitCodeOverrides): SafeAccountV1_5_0_M_0_3_0;
1311
- static createAccountAddress(owners: Signer[], overrides?: InitCodeOverrides): string;
1312
- static createFactoryAddressAndData(owners: Signer[], overrides?: InitCodeOverrides): [string, string];
1277
+ static initializeNewAccount(owners: Signer$1[], overrides?: InitCodeOverrides): SafeAccountV1_5_0_M_0_3_0;
1278
+ static createAccountAddress(owners: Signer$1[], overrides?: InitCodeOverrides): string;
1279
+ static createFactoryAddressAndData(owners: Signer$1[], overrides?: InitCodeOverrides): [string, string];
1313
1280
  createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationV7Overrides): Promise<UserOperationV7>;
1314
1281
  estimateUserOperationGas(userOperation: UserOperationV7, bundlerRpc: string, overrides?: {
1315
1282
  stateOverrideSet?: StateOverrideSet;
1316
1283
  dummySignerSignaturePairs?: SignerSignaturePair[];
1317
- expectedSigners?: Signer[];
1284
+ expectedSigners?: Signer$1[];
1318
1285
  webAuthnSharedSigner?: string;
1319
1286
  webAuthnSignerFactory?: string;
1320
1287
  webAuthnSignerSingleton?: string;
@@ -1334,7 +1301,101 @@ declare class SafeAccountV1_5_0_M_0_3_0 extends SafeAccountV0_3_0 {
1334
1301
  eip7212WebAuthnContractVerifier?: string;
1335
1302
  webAuthnSignerFactory?: string;
1336
1303
  }): MetaTransaction;
1337
- static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
1304
+ static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer$1[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
1305
+ static verifyWebAuthnSignatureForMessageHash(nodeRpcUrl: string, signer: WebauthnPublicKey, messageHash: string, signature: string, overrides?: {
1306
+ eip7212WebAuthnPrecompileVerifier?: string;
1307
+ eip7212WebAuthnContractVerifier?: string;
1308
+ webAuthnSignerSingleton?: string;
1309
+ }): Promise<boolean>;
1310
+ }
1311
+ //#endregion
1312
+ //#region src/account/Safe/SafeMultiChainSigAccount.d.ts
1313
+ declare class SafeMultiChainSigAccountV1 extends SafeAccount {
1314
+ static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x433709009B8330FDa32311DF1C2AFA402eD8D009";
1315
+ static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "0x22939E839e3c0F479B713eAF95e0df128554AEAd";
1316
+ static readonly DEFAULT_SAFE_MODULE_SETUP_ADDRESS = "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47";
1317
+ static readonly DEFAULT_WEB_AUTHN_SHARED_SIGNER: string;
1318
+ static readonly DEFAULT_WEB_AUTHN_SIGNER_SINGLETON: string;
1319
+ static readonly DEFAULT_WEB_AUTHN_SIGNER_FACTORY: string;
1320
+ static readonly DEFAULT_WEB_AUTHN_SIGNER_PROXY_CREATION_CODE = "0x610100346100ad57601f6101b538819003918201601f19168301916001600160401b038311848410176100b2578084926080946040528339810103126100ad578051906001600160a01b03821682036100ad5760208101516040820151606090920151926001600160b01b03841684036100ad5760805260a05260c05260e05260405160ec90816100c98239608051816082015260a05181604d015260c051816027015260e0518160010152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe7f000000000000000000000000000000000000000000000000000000000000000060b63601527f000000000000000000000000000000000000000000000000000000000000000060a03601527f000000000000000000000000000000000000000000000000000000000000000036608001523660006080376000806056360160807f00000000000000000000000000000000000000000000000000000000000000005af43d600060803e60b1573d6080fd5b3d6080f3fea26469706673582212201660515548d15702d720bbc046b457ca85e941a4559ab9f9518488e4c82e5ee964736f6c634300081a0033";
1321
+ static readonly DEFAULT_WEB_AUTHN_PRECOMPILE: string;
1322
+ static readonly DEFAULT_WEB_AUTHN_DAIMO_VERIFIER: string;
1323
+ constructor(accountAddress: string, overrides?: {
1324
+ safe4337ModuleAddress?: string;
1325
+ entrypointAddress?: string;
1326
+ onChainIdentifierParams?: OnChainIdentifierParamsType;
1327
+ onChainIdentifier?: string;
1328
+ safeAccountSingleton?: SafeAccountSingleton;
1329
+ });
1330
+ static createAccountAddress(owners: Signer$1[], overrides?: InitCodeOverrides): string;
1331
+ static initializeNewAccount(owners: Signer$1[], overrides?: InitCodeOverrides): SafeMultiChainSigAccountV1;
1332
+ static getUserOperationEip712Hash(useroperation: UserOperationV9, chainId: bigint, overrides?: {
1333
+ validAfter?: bigint;
1334
+ validUntil?: bigint;
1335
+ entrypointAddress?: string;
1336
+ safe4337ModuleAddress?: string;
1337
+ }): string;
1338
+ static getUserOperationEip712Data(useroperation: UserOperationV9, chainId: bigint, overrides?: {
1339
+ validAfter?: bigint;
1340
+ validUntil?: bigint;
1341
+ entrypointAddress?: string;
1342
+ safe4337ModuleAddress?: string;
1343
+ }): {
1344
+ domain: SafeUserOperationTypedDataDomain;
1345
+ types: Record<string, {
1346
+ name: string;
1347
+ type: string;
1348
+ }[]>;
1349
+ messageValue: SafeUserOperationV9TypedMessageValue;
1350
+ };
1351
+ static createInitializerCallData(owners: Signer$1[], threshold: number, overrides?: {
1352
+ safe4337ModuleAddress?: string;
1353
+ safeModuleSetupAddress?: string;
1354
+ multisendContractAddress?: string;
1355
+ webAuthnSharedSigner?: string;
1356
+ eip7212WebAuthnPrecompileVerifierForSharedSigner?: string;
1357
+ eip7212WebAuthnContractVerifierForSharedSigner?: string;
1358
+ }): string;
1359
+ static createFactoryAddressAndData(owners: Signer$1[], overrides?: InitCodeOverrides): [string, string];
1360
+ createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationV9Overrides): Promise<UserOperationV9>;
1361
+ signUserOperation(userOperation: UserOperationV9, privateKeys: string[], chainId: bigint, overrides?: {
1362
+ validAfter?: bigint;
1363
+ validUntil?: bigint;
1364
+ }): string;
1365
+ signUserOperationWithSigners(userOperation: UserOperationV9, signers: ReadonlyArray<Signer>, chainId: bigint, overrides?: {
1366
+ validAfter?: bigint;
1367
+ validUntil?: bigint;
1368
+ }): Promise<string>;
1369
+ signUserOperations(userOperationsToSign: UserOperationToSign[], privateKeys: string[]): string[];
1370
+ signUserOperationsWithSigners(userOperationsToSign: UserOperationToSign[], signers: ReadonlyArray<Signer<MultiOpSignContext<UserOperationV9>>>): Promise<string[]>;
1371
+ static getMultiChainSingleSignatureUserOperationsEip712Hash(userOperationsToSignsToSign: UserOperationToSign[], overrides?: {
1372
+ safe4337ModuleAddress?: string;
1373
+ }): string;
1374
+ static getMultiChainSingleSignatureUserOperationsEip712Data(userOperationsToSign: UserOperationToSign[], overrides?: {
1375
+ safe4337ModuleAddress?: string;
1376
+ entrypointAddress?: string;
1377
+ }): {
1378
+ domain: MultiChainSignatureMerkleTreeRootTypedDataDomain;
1379
+ types: Record<string, {
1380
+ name: string;
1381
+ type: string;
1382
+ }[]>;
1383
+ messageValue: MultiChainSignatureMerkleTreeRootTypedMessageValue;
1384
+ };
1385
+ static formatSignaturesToUseroperationsSignatures(userOperationsToSign: UserOperationToSignWithOverrides[], signerSignaturePairs: SignerSignaturePair[]): string[];
1386
+ static createWebAuthnSignerVerifierAddress(x: bigint, y: bigint, overrides?: {
1387
+ eip7212WebAuthnPrecompileVerifier?: string;
1388
+ eip7212WebAuthnContractVerifier?: string;
1389
+ webAuthnSignerFactory?: string;
1390
+ webAuthnSignerSingleton?: string;
1391
+ webAuthnSignerProxyCreationCode?: string;
1392
+ }): string;
1393
+ static createDeployWebAuthnVerifierMetaTransaction(x: bigint, y: bigint, overrides?: {
1394
+ eip7212WebAuthnPrecompileVerifier?: string;
1395
+ eip7212WebAuthnContractVerifier?: string;
1396
+ webAuthnSignerFactory?: string;
1397
+ }): MetaTransaction;
1398
+ static createDummySignerSignaturePairForExpectedSigners(expectedSigners: Signer$1[], webAuthnSignatureOverrides?: WebAuthnSignatureOverrides): SignerSignaturePair[];
1338
1399
  static verifyWebAuthnSignatureForMessageHash(nodeRpcUrl: string, signer: WebauthnPublicKey, messageHash: string, signature: string, overrides?: {
1339
1400
  eip7212WebAuthnPrecompileVerifier?: string;
1340
1401
  eip7212WebAuthnContractVerifier?: string;
@@ -1342,6 +1403,85 @@ declare class SafeAccountV1_5_0_M_0_3_0 extends SafeAccountV0_3_0 {
1342
1403
  }): Promise<boolean>;
1343
1404
  }
1344
1405
  //#endregion
1406
+ //#region src/account/simple/Simple7702AccountV09.d.ts
1407
+ declare class Simple7702AccountV09 extends BaseSimple7702Account {
1408
+ static readonly DEFAULT_DELEGATEE_ADDRESS = "0xa46cc63eBF4Bd77888AA327837d20b23A63a56B5";
1409
+ constructor(accountAddress: string, overrides?: {
1410
+ entrypointAddress?: string;
1411
+ delegateeAddress?: string;
1412
+ });
1413
+ createUserOperation(transactions: SimpleMetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrides?: CreateUserOperationOverrides): Promise<UserOperationV9>;
1414
+ estimateUserOperationGas(userOperation: UserOperationV9, bundlerRpc: string, overrides?: {
1415
+ stateOverrideSet?: StateOverrideSet;
1416
+ dummySignature?: string;
1417
+ }): Promise<[bigint, bigint, bigint]>;
1418
+ signUserOperation(useroperation: UserOperationV9, privateKey: string, chainId: bigint): string;
1419
+ signUserOperationWithSigner(useroperation: UserOperationV9, signer: Signer, chainId: bigint): Promise<string>;
1420
+ sendUserOperation(userOperation: UserOperationV9, bundlerRpc: string): Promise<SendUseroperationResponse>;
1421
+ }
1422
+ //#endregion
1423
+ //#region src/constants.d.ts
1424
+ declare const ZeroAddress = "0x0000000000000000000000000000000000000000";
1425
+ declare const ENTRYPOINT_V9 = "0x433709009B8330FDa32311DF1C2AFA402eD8D009";
1426
+ declare const ENTRYPOINT_V8 = "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108";
1427
+ declare const ENTRYPOINT_V7 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1428
+ declare const ENTRYPOINT_V6 = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
1429
+ declare const BaseUserOperationDummyValues: {
1430
+ sender: string;
1431
+ nonce: bigint;
1432
+ callData: string;
1433
+ callGasLimit: bigint;
1434
+ verificationGasLimit: bigint;
1435
+ preVerificationGas: bigint;
1436
+ maxFeePerGas: bigint;
1437
+ maxPriorityFeePerGas: bigint;
1438
+ signature: string;
1439
+ };
1440
+ declare const EIP712_SAFE_OPERATION_PRIMARY_TYPE = "SafeOp";
1441
+ declare const EIP712_SAFE_OPERATION_V6_TYPE: {
1442
+ SafeOp: {
1443
+ type: string;
1444
+ name: string;
1445
+ }[];
1446
+ };
1447
+ declare const EIP712_SAFE_OPERATION_V7_TYPE: {
1448
+ SafeOp: {
1449
+ type: string;
1450
+ name: string;
1451
+ }[];
1452
+ };
1453
+ declare const EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE = "MerkleTreeRoot";
1454
+ declare const EIP712_MULTI_CHAIN_OPERATIONS_TYPE: {
1455
+ MerkleTreeRoot: {
1456
+ type: string;
1457
+ name: string;
1458
+ }[];
1459
+ };
1460
+ declare const DEFAULT_SECP256R1_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000100";
1461
+ declare const CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS = "0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00";
1462
+ declare const CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS = "0x71032285A847c4311Eb7ec2E7A636aB94A9805Aa";
1463
+ //#endregion
1464
+ //#region src/errors.d.ts
1465
+ type BasicErrorCode = "UNKNOWN_ERROR" | "TIMEOUT" | "BAD_DATA" | "BUNDLER_ERROR" | "PAYMASTER_ERROR";
1466
+ type BundlerErrorCode = "INVALID_FIELDS" | "SIMULATE_VALIDATION" | "SIMULATE_PAYMASTER_VALIDATION" | "OPCODE_VALIDATION" | "EXPIRE_SHORTLY" | "REPUTATION" | "INSUFFICIENT_STAKE" | "UNSUPPORTED_SIGNATURE_AGGREGATOR" | "INVALID_SIGNATURE" | "INVALID_USEROPERATION_HASH" | "EXECUTION_REVERTED";
1467
+ type JsonRpcErrorCode = "PARSE_ERROR" | "INVALID_REQUEST" | "METHOD_NOT_FOUND" | "INVALID_PARAMS" | "INTERNAL_ERROR" | "SERVER_ERROR" | "TENDERLY_SIMULATION_ERROR";
1468
+ type Jsonable = string | number | boolean | null | undefined | readonly Jsonable[] | {
1469
+ readonly [key: string]: Jsonable;
1470
+ } | {
1471
+ toJSON(): Jsonable;
1472
+ };
1473
+ declare class AbstractionKitError extends Error {
1474
+ readonly code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode;
1475
+ readonly context?: Jsonable;
1476
+ readonly errno?: number;
1477
+ constructor(code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode, message: string, options?: {
1478
+ cause?: Error;
1479
+ errno?: number;
1480
+ context?: Jsonable;
1481
+ });
1482
+ stringify(): string;
1483
+ }
1484
+ //#endregion
1345
1485
  //#region src/factory/SmartAccountFactory.d.ts
1346
1486
  declare class SmartAccountFactory {
1347
1487
  readonly address: string;
@@ -1360,6 +1500,14 @@ declare class SafeAccountFactory extends SmartAccountFactory {
1360
1500
  //#region src/paymaster/Paymaster.d.ts
1361
1501
  declare abstract class Paymaster {}
1362
1502
  //#endregion
1503
+ //#region src/paymaster/AllowAllPaymaster.d.ts
1504
+ declare class ExperimentalAllowAllParallelPaymaster extends Paymaster {
1505
+ readonly address: string;
1506
+ constructor(address?: string);
1507
+ getPaymasterFieldsInitValues(_chainId: bigint): Promise<ParallelPaymasterInitValues>;
1508
+ getApprovedPaymasterData(_userOperation: UserOperationV9): Promise<string>;
1509
+ }
1510
+ //#endregion
1363
1511
  //#region src/paymaster/CandidePaymaster.d.ts
1364
1512
  declare class CandidePaymaster extends Paymaster {
1365
1513
  readonly rpcUrl: string;
@@ -1388,8 +1536,14 @@ declare class CandidePaymaster extends Paymaster {
1388
1536
  private estimateAndApplyGasLimits;
1389
1537
  private applyPaymasterResult;
1390
1538
  private createPaymasterUserOperation;
1391
- createSponsorPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: SmartAccountWithEntrypoint, userOperation: T, bundlerRpc: string, sponsorshipPolicyId?: string, overrides?: GasPaymasterUserOperationOverrides): Promise<[SameUserOp<T>, SponsorMetadata | undefined]>;
1392
- createTokenPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: PrependTokenPaymasterApproveAccount, userOperation: T, tokenAddress: string, bundlerRpc: string, overrides?: GasPaymasterUserOperationOverrides): Promise<SameUserOp<T>>;
1539
+ createSponsorPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: SmartAccountWithEntrypoint, userOperation: T, bundlerRpc: string, sponsorshipPolicyId?: string, context?: CandidePaymasterContext, overrides?: GasPaymasterUserOperationOverrides): Promise<{
1540
+ userOperation: SameUserOp<T>;
1541
+ sponsorMetadata?: SponsorMetadata;
1542
+ }>;
1543
+ createTokenPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: PrependTokenPaymasterApproveAccount, userOperation: T, tokenAddress: string, bundlerRpc: string, context?: CandidePaymasterContext, overrides?: GasPaymasterUserOperationOverrides): Promise<{
1544
+ userOperation: SameUserOp<T>;
1545
+ tokenQuote?: TokenQuote;
1546
+ }>;
1393
1547
  calculateUserOperationErc20TokenMaxGasCost(smartAccount: SmartAccountWithEntrypoint, userOperation: AnyUserOperation, erc20TokenAddress: string, overrides?: {
1394
1548
  entrypoint?: string | null;
1395
1549
  }): Promise<bigint>;
@@ -1422,7 +1576,10 @@ declare class Erc7677Paymaster extends Paymaster {
1422
1576
  getPaymasterStubData(userOperation: AnyUserOperation, entrypoint: string, chainIdHex: string, context?: Erc7677Context): Promise<Erc7677StubDataResult>;
1423
1577
  getPaymasterData(userOperation: AnyUserOperation, entrypoint: string, chainIdHex: string, context?: Erc7677Context): Promise<Erc7677PaymasterFields>;
1424
1578
  sendRPCRequest(method: string, params?: unknown[]): Promise<unknown>;
1425
- createPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: SmartAccountWithEntrypoint, userOperation: T, bundlerRpc: string, context?: Erc7677Context, overrides?: GasPaymasterUserOperationOverrides): Promise<SameUserOp<T>>;
1579
+ createPaymasterUserOperation<T extends AnyUserOperation>(smartAccount: SmartAccountWithEntrypoint, userOperation: T, bundlerRpc: string, context?: Erc7677Context, overrides?: GasPaymasterUserOperationOverrides): Promise<{
1580
+ userOperation: SameUserOp<T>;
1581
+ tokenQuote?: TokenQuote;
1582
+ }>;
1426
1583
  private applyPaymasterFields;
1427
1584
  private estimateAndApplyGasLimits;
1428
1585
  private fetchPimlicoTokenQuote;
@@ -1435,14 +1592,6 @@ declare class Erc7677Paymaster extends Paymaster {
1435
1592
  private sponsoredFlow;
1436
1593
  }
1437
1594
  //#endregion
1438
- //#region src/paymaster/AllowAllPaymaster.d.ts
1439
- declare class ExperimentalAllowAllParallelPaymaster extends Paymaster {
1440
- readonly address: string;
1441
- constructor(address?: string);
1442
- getPaymasterFieldsInitValues(chainId: bigint): Promise<ParallelPaymasterInitValues>;
1443
- getApprovedPaymasterData(userOperation: UserOperationV9): Promise<string>;
1444
- }
1445
- //#endregion
1446
1595
  //#region src/paymaster/WorldIdPermissionlessPaymaster.d.ts
1447
1596
  declare class WorldIdPermissionlessPaymaster extends Paymaster {
1448
1597
  readonly address: string;
@@ -1458,6 +1607,51 @@ declare class WorldIdPermissionlessPaymaster extends Paymaster {
1458
1607
  }
1459
1608
  declare function createWorldIdSignal(accountAddress: string, accountNonce: bigint, chainId: bigint): string;
1460
1609
  //#endregion
1610
+ //#region src/signer/adapters.d.ts
1611
+ interface ViemLocalAccountLike {
1612
+ address: `0x${string}`;
1613
+ sign: (args: {
1614
+ hash: `0x${string}`;
1615
+ }) => Promise<`0x${string}`>;
1616
+ signTypedData: (args: {
1617
+ domain: TypedData["domain"];
1618
+ types: Record<string, Array<{
1619
+ name: string;
1620
+ type: string;
1621
+ }>>;
1622
+ primaryType: string;
1623
+ message: Record<string, unknown>;
1624
+ }) => Promise<`0x${string}`>;
1625
+ }
1626
+ interface ViemWalletClientLike {
1627
+ account?: {
1628
+ address: `0x${string}`;
1629
+ } | undefined;
1630
+ signTypedData: unknown;
1631
+ }
1632
+ interface EthersWalletLike {
1633
+ address: string;
1634
+ signingKey: {
1635
+ sign: (hash: string) => {
1636
+ serialized: string;
1637
+ };
1638
+ };
1639
+ signTypedData: (domain: {
1640
+ name?: string;
1641
+ version?: string;
1642
+ chainId?: number | bigint;
1643
+ verifyingContract?: string;
1644
+ salt?: string;
1645
+ }, types: Record<string, Array<{
1646
+ name: string;
1647
+ type: string;
1648
+ }>>, message: Record<string, unknown>) => Promise<string>;
1649
+ }
1650
+ declare function fromPrivateKey(privateKey: string): Signer<unknown>;
1651
+ declare function fromViem(account: ViemLocalAccountLike): Signer<unknown>;
1652
+ declare function fromViemWalletClient(client: ViemWalletClientLike): Signer<unknown>;
1653
+ declare function fromEthersWallet(wallet: EthersWalletLike): Signer<unknown>;
1654
+ //#endregion
1461
1655
  //#region src/utils.d.ts
1462
1656
  declare function createUserOperationHash(useroperation: UserOperationV6 | UserOperationV7 | UserOperationV8 | UserOperationV9, entrypointAddress: string, chainId: bigint): string;
1463
1657
  declare function createCallData(functionSelector: string, functionInputAbi: string[], functionInputParameters: AbiInputValue[]): string;
@@ -1539,7 +1733,7 @@ declare function callTenderlySimulateBundle(tenderlyAccountSlug: string, tenderl
1539
1733
  gasPrice?: number | null;
1540
1734
  value?: number | null;
1541
1735
  blockNumber?: number | null;
1542
- simulationType?: 'full' | 'quick' | 'abi';
1736
+ simulationType?: "full" | "quick" | "abi";
1543
1737
  stateOverrides?: OverrideType | null;
1544
1738
  transactionIndex?: number;
1545
1739
  save?: boolean;
@@ -1550,71 +1744,9 @@ declare function callTenderlySimulateBundle(tenderlyAccountSlug: string, tenderl
1550
1744
  address: string;
1551
1745
  }[];
1552
1746
  }[]): Promise<TenderlySimulationResult>;
1553
- //#endregion
1554
- //#region src/constants.d.ts
1555
- declare const ZeroAddress = "0x0000000000000000000000000000000000000000";
1556
- declare const ENTRYPOINT_V9 = "0x433709009B8330FDa32311DF1C2AFA402eD8D009";
1557
- declare const ENTRYPOINT_V8 = "0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108";
1558
- declare const ENTRYPOINT_V7 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1559
- declare const ENTRYPOINT_V6 = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
1560
- declare const BaseUserOperationDummyValues: {
1561
- sender: string;
1562
- nonce: bigint;
1563
- callData: string;
1564
- callGasLimit: bigint;
1565
- verificationGasLimit: bigint;
1566
- preVerificationGas: bigint;
1567
- maxFeePerGas: bigint;
1568
- maxPriorityFeePerGas: bigint;
1569
- signature: string;
1570
- };
1571
- declare const EIP712_SAFE_OPERATION_PRIMARY_TYPE = "SafeOp";
1572
- declare const EIP712_SAFE_OPERATION_V6_TYPE: {
1573
- SafeOp: {
1574
- type: string;
1575
- name: string;
1576
- }[];
1577
- };
1578
- declare const EIP712_SAFE_OPERATION_V7_TYPE: {
1579
- SafeOp: {
1580
- type: string;
1581
- name: string;
1582
- }[];
1583
- };
1584
- declare const EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE = "MerkleTreeRoot";
1585
- declare const EIP712_MULTI_CHAIN_OPERATIONS_TYPE: {
1586
- MerkleTreeRoot: {
1587
- type: string;
1588
- name: string;
1589
- }[];
1590
- };
1591
- declare const DEFAULT_SECP256R1_PRECOMPILE_ADDRESS = "0x0000000000000000000000000000000000000100";
1592
- declare const CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS = "0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00";
1593
- declare const CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS = "0x71032285A847c4311Eb7ec2E7A636aB94A9805Aa";
1594
- //#endregion
1595
- //#region src/errors.d.ts
1596
- type BasicErrorCode = "UNKNOWN_ERROR" | "TIMEOUT" | "BAD_DATA" | "BUNDLER_ERROR" | "PAYMASTER_ERROR";
1597
- type BundlerErrorCode = "INVALID_FIELDS" | "SIMULATE_VALIDATION" | "SIMULATE_PAYMASTER_VALIDATION" | "OPCODE_VALIDATION" | "EXPIRE_SHORTLY" | "REPUTATION" | "INSUFFICIENT_STAKE" | "UNSUPPORTED_SIGNATURE_AGGREGATOR" | "INVALID_SIGNATURE" | "INVALID_USEROPERATION_HASH" | "EXECUTION_REVERTED";
1598
- type JsonRpcErrorCode = "PARSE_ERROR" | "INVALID_REQUEST" | "METHOD_NOT_FOUND" | "INVALID_PARAMS" | "INTERNAL_ERROR" | "SERVER_ERROR" | "TENDERLY_SIMULATION_ERROR";
1599
- type Jsonable = string | number | boolean | null | undefined | readonly Jsonable[] | {
1600
- readonly [key: string]: Jsonable;
1601
- } | {
1602
- toJSON(): Jsonable;
1603
- };
1604
- declare class AbstractionKitError extends Error {
1605
- readonly code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode;
1606
- readonly context?: Jsonable;
1607
- readonly errno?: number;
1608
- constructor(code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode, message: string, options?: {
1609
- cause?: Error;
1610
- errno?: number;
1611
- context?: Jsonable;
1612
- });
1613
- stringify(): string;
1614
- }
1615
1747
  declare namespace abstractionkit_d_exports {
1616
- export { ALLOWANCE_MODULE_V0_1_0_ADDRESS, AbiInputValue, AbstractionKitError, Allowance, AllowanceModule, AnyUserOperation, Authorization7702, Authorization7702Hex, BaseUserOperationDummyValues, Bundler, CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS, CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS, Calibur7702Account, CaliburCreateUserOperationOverrides, CaliburKey, CaliburKeySettings, CaliburKeySettingsResult, CaliburKeyType, CaliburSignatureOverrides, CandidePaymaster, CandidePaymasterContext, CreateUserOperationV6Overrides, CreateUserOperationV7Overrides, CreateUserOperationV9Overrides, DEFAULT_SECP256R1_PRECOMPILE_ADDRESS, DepositInfo, ECDSAPublicAddress, EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE, EIP712_MULTI_CHAIN_OPERATIONS_TYPE, EIP712_RECOVERY_MODULE_TYPE, EIP712_SAFE_OPERATION_PRIMARY_TYPE, EIP712_SAFE_OPERATION_V6_TYPE, EIP712_SAFE_OPERATION_V7_TYPE, ENTRYPOINT_V6, ENTRYPOINT_V7, ENTRYPOINT_V8, ENTRYPOINT_V9, EOADummySignerSignaturePair, EXECUTE_RECOVERY_PRIMARY_TYPE, Erc7677Context, Erc7677Paymaster, Erc7677PaymasterConstructorOptions, Erc7677PaymasterFields, Erc7677Provider, Erc7677StubDataResult, ExperimentalAllowAllParallelPaymaster, GasEstimationResult, GasOption, GasPaymasterUserOperationOverrides, InitCodeOverrides, JsonRpcError, JsonRpcParam, JsonRpcResponse, JsonRpcResult, MetaTransaction, Operation, ParallelPaymasterInitValues, PolygonChain, PrependTokenPaymasterApproveAccount, RecoveryRequest, RecoveryRequestTypedDataDomain, RecoveryRequestTypedMessageValue, RecoverySignaturePair, SAFE_MESSAGE_MODULE_TYPE, SAFE_MESSAGE_PRIMARY_TYPE, SafeAccountFactory, SafeAccountV0_2_0, SafeAccountV0_3_0, SafeAccountV1_5_0_M_0_3_0, SafeMessageTypedDataDomain, SafeMessageTypedMessageValue, SafeModuleExecutorFunctionSelector, SafeMultiChainSigAccountV1, SafeUserOperationTypedDataDomain, SameUserOp, SendUseroperationResponse, Signer, SignerFunction, SignerSignaturePair, Simple7702Account, Simple7702AccountV09, SmartAccount, SmartAccountFactory, SocialRecoveryModule, SocialRecoveryModuleGracePeriodSelector, SponsorMetadata, StateOverrideSet, UserOperationByHashResult, UserOperationReceipt, UserOperationReceiptResult, UserOperationV6, UserOperationV7, UserOperationV8, UserOperationV9, WebAuthnSignatureData, WebauthnDummySignerSignaturePair, WebauthnPublicKey, WebauthnSignatureData, WorldIdPermissionlessPaymaster, ZeroAddress, calculateUserOperationMaxGasCost, callTenderlySimulateBundle, createAndSignEip7702DelegationAuthorization, createAndSignEip7702RawTransaction, createAndSignLegacyRawTransaction, createCallData, createEip7702DelegationAuthorizationHash, createEip7702TransactionHash, createUserOperationHash, createWorldIdSignal, fetchAccountNonce, fetchGasPrice, getBalanceOf, getDelegatedAddress, getDepositInfo, getFunctionSelector, getSafeMessageEip712Data, sendJsonRpcRequest, shareTenderlySimulationAndCreateLink, signHash, simulateSenderCallDataWithTenderly, simulateSenderCallDataWithTenderlyAndCreateShareLink, simulateUserOperationCallDataWithTenderly, simulateUserOperationCallDataWithTenderlyAndCreateShareLink, simulateUserOperationWithTenderly, simulateUserOperationWithTenderlyAndCreateShareLink };
1748
+ export { ALLOWANCE_MODULE_V0_1_0_ADDRESS, AbiInputValue, AbstractionKitError, Allowance, AllowanceModule, AnyUserOperation, Authorization7702, Authorization7702Hex, BaseUserOperationDummyValues, Bundler, CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS, CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS, Calibur7702Account, CaliburCreateUserOperationOverrides, CaliburKey, CaliburKeySettings, CaliburKeySettingsResult, CaliburKeyType, CaliburSignatureOverrides, CandidePaymaster, CandidePaymasterContext, CreateUserOperationV6Overrides, CreateUserOperationV7Overrides, CreateUserOperationV9Overrides, DEFAULT_SECP256R1_PRECOMPILE_ADDRESS, DepositInfo, ECDSAPublicAddress, EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE, EIP712_MULTI_CHAIN_OPERATIONS_TYPE, EIP712_RECOVERY_MODULE_TYPE, EIP712_SAFE_OPERATION_PRIMARY_TYPE, EIP712_SAFE_OPERATION_V6_TYPE, EIP712_SAFE_OPERATION_V7_TYPE, ENTRYPOINT_V6, ENTRYPOINT_V7, ENTRYPOINT_V8, ENTRYPOINT_V9, EOADummySignerSignaturePair, EXECUTE_RECOVERY_PRIMARY_TYPE, Erc7677Context, Erc7677Paymaster, Erc7677PaymasterConstructorOptions, Erc7677PaymasterFields, Erc7677Provider, Erc7677StubDataResult, ExperimentalAllowAllParallelPaymaster, Signer as ExternalSigner, GasEstimationResult, GasOption, GasPaymasterUserOperationOverrides, InitCodeOverrides, JsonRpcError, JsonRpcParam, JsonRpcResponse, JsonRpcResult, MetaTransaction, MultiOpSignContext, Operation, ParallelPaymasterInitValues, PolygonChain, PrependTokenPaymasterApproveAccount, RecoveryRequest, RecoveryRequestTypedDataDomain, RecoveryRequestTypedMessageValue, RecoverySignaturePair, SAFE_MESSAGE_MODULE_TYPE, SAFE_MESSAGE_PRIMARY_TYPE, SafeAccountFactory, SafeAccountV0_2_0, SafeAccountV0_3_0, SafeAccountV1_5_0_M_0_3_0, SafeMessageTypedDataDomain, SafeMessageTypedMessageValue, SafeModuleExecutorFunctionSelector, SafeMultiChainSigAccountV1, SafeUserOperationTypedDataDomain, SameUserOp, SendUseroperationResponse, SignContext, SignHashFn, SignTypedDataFn, Signer$1 as Signer, SignerSignaturePair, SigningScheme, Simple7702Account, Simple7702AccountV09, SmartAccount, SmartAccountFactory, SocialRecoveryModule, SocialRecoveryModuleGracePeriodSelector, SponsorInfo, SponsorMetadata, StateOverrideSet, TokenQuote, TypedData, UserOperationByHashResult, UserOperationReceipt, UserOperationReceiptResult, UserOperationV6, UserOperationV7, UserOperationV8, UserOperationV9, WebAuthnSignatureData, WebauthnDummySignerSignaturePair, WebauthnPublicKey, WebauthnSignatureData, WorldIdPermissionlessPaymaster, ZeroAddress, calculateUserOperationMaxGasCost, callTenderlySimulateBundle, createAndSignEip7702DelegationAuthorization, createAndSignEip7702RawTransaction, createAndSignLegacyRawTransaction, createCallData, createEip7702DelegationAuthorizationHash, createEip7702TransactionHash, createUserOperationHash, createWorldIdSignal, fetchAccountNonce, fetchGasPrice, fromEthersWallet, fromPrivateKey, fromViem, fromViemWalletClient, getBalanceOf, getDelegatedAddress, getDepositInfo, getFunctionSelector, getSafeMessageEip712Data, sendJsonRpcRequest, shareTenderlySimulationAndCreateLink, signHash, simulateSenderCallDataWithTenderly, simulateSenderCallDataWithTenderlyAndCreateShareLink, simulateUserOperationCallDataWithTenderly, simulateUserOperationCallDataWithTenderlyAndCreateShareLink, simulateUserOperationWithTenderly, simulateUserOperationWithTenderlyAndCreateShareLink };
1617
1749
  }
1618
1750
  //#endregion
1619
- export { ALLOWANCE_MODULE_V0_1_0_ADDRESS, type AbiInputValue, AbstractionKitError, type Allowance, AllowanceModule, type AnyUserOperation, type Authorization7702, type Authorization7702Hex, BaseUserOperationDummyValues, Bundler, CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS, CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS, Calibur7702Account, type CaliburCreateUserOperationOverrides, type CaliburKey, type CaliburKeySettings, type CaliburKeySettingsResult, CaliburKeyType, type CaliburSignatureOverrides, CandidePaymaster, type CandidePaymasterContext, type CreateUserOperationV6Overrides, type CreateUserOperationV7Overrides, type CreateUserOperationV9Overrides, DEFAULT_SECP256R1_PRECOMPILE_ADDRESS, type DepositInfo, type ECDSAPublicAddress, EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE, EIP712_MULTI_CHAIN_OPERATIONS_TYPE, EIP712_RECOVERY_MODULE_TYPE, EIP712_SAFE_OPERATION_PRIMARY_TYPE, EIP712_SAFE_OPERATION_V6_TYPE, EIP712_SAFE_OPERATION_V7_TYPE, ENTRYPOINT_V6, ENTRYPOINT_V7, ENTRYPOINT_V8, ENTRYPOINT_V9, EOADummySignerSignaturePair, EXECUTE_RECOVERY_PRIMARY_TYPE, type Erc7677Context, Erc7677Paymaster, type Erc7677PaymasterConstructorOptions, type Erc7677PaymasterFields, type Erc7677Provider, type Erc7677StubDataResult, ExperimentalAllowAllParallelPaymaster, type GasEstimationResult, GasOption, type GasPaymasterUserOperationOverrides, type InitCodeOverrides, type JsonRpcError, type JsonRpcParam, type JsonRpcResponse, type JsonRpcResult, type MetaTransaction, Operation, type ParallelPaymasterInitValues, PolygonChain, type PrependTokenPaymasterApproveAccount, type RecoveryRequest, type RecoveryRequestTypedDataDomain, type RecoveryRequestTypedMessageValue, type RecoverySignaturePair, SAFE_MESSAGE_MODULE_TYPE, SAFE_MESSAGE_PRIMARY_TYPE, SafeAccountFactory, SafeAccountV0_2_0, SafeAccountV0_3_0, SafeAccountV1_5_0_M_0_3_0, type SafeMessageTypedDataDomain, type SafeMessageTypedMessageValue, SafeModuleExecutorFunctionSelector, SafeMultiChainSigAccountV1, type SafeUserOperationTypedDataDomain, type SameUserOp, SendUseroperationResponse, type Signer, type SignerFunction, type SignerSignaturePair, Simple7702Account, Simple7702AccountV09, SmartAccount, SmartAccountFactory, SocialRecoveryModule, SocialRecoveryModuleGracePeriodSelector, type SponsorMetadata, type StateOverrideSet, type UserOperationByHashResult, type UserOperationReceipt, type UserOperationReceiptResult, type UserOperationV6, type UserOperationV7, type UserOperationV8, type UserOperationV9, type WebAuthnSignatureData, WebauthnDummySignerSignaturePair, type WebauthnPublicKey, type WebauthnSignatureData, WorldIdPermissionlessPaymaster, ZeroAddress, abstractionkit_d_exports as abstractionkit, calculateUserOperationMaxGasCost, callTenderlySimulateBundle, createAndSignEip7702DelegationAuthorization, createAndSignEip7702RawTransaction, createAndSignLegacyRawTransaction, createCallData, createEip7702DelegationAuthorizationHash, createEip7702TransactionHash, createUserOperationHash, createWorldIdSignal, fetchAccountNonce, fetchGasPrice, getBalanceOf, getDelegatedAddress, getDepositInfo, getFunctionSelector, getSafeMessageEip712Data, sendJsonRpcRequest, shareTenderlySimulationAndCreateLink, signHash, simulateSenderCallDataWithTenderly, simulateSenderCallDataWithTenderlyAndCreateShareLink, simulateUserOperationCallDataWithTenderly, simulateUserOperationCallDataWithTenderlyAndCreateShareLink, simulateUserOperationWithTenderly, simulateUserOperationWithTenderlyAndCreateShareLink };
1751
+ export { ALLOWANCE_MODULE_V0_1_0_ADDRESS, type AbiInputValue, AbstractionKitError, type Allowance, AllowanceModule, type AnyUserOperation, type Authorization7702, type Authorization7702Hex, BaseUserOperationDummyValues, Bundler, CALIBUR_CANDIDE_V0_1_0_SINGLETON_ADDRESS, CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS, Calibur7702Account, type CaliburCreateUserOperationOverrides, type CaliburKey, type CaliburKeySettings, type CaliburKeySettingsResult, CaliburKeyType, type CaliburSignatureOverrides, CandidePaymaster, type CandidePaymasterContext, type CreateUserOperationV6Overrides, type CreateUserOperationV7Overrides, type CreateUserOperationV9Overrides, DEFAULT_SECP256R1_PRECOMPILE_ADDRESS, type DepositInfo, type ECDSAPublicAddress, EIP712_MULTI_CHAIN_OPERATIONS_PRIMARY_TYPE, EIP712_MULTI_CHAIN_OPERATIONS_TYPE, EIP712_RECOVERY_MODULE_TYPE, EIP712_SAFE_OPERATION_PRIMARY_TYPE, EIP712_SAFE_OPERATION_V6_TYPE, EIP712_SAFE_OPERATION_V7_TYPE, ENTRYPOINT_V6, ENTRYPOINT_V7, ENTRYPOINT_V8, ENTRYPOINT_V9, EOADummySignerSignaturePair, EXECUTE_RECOVERY_PRIMARY_TYPE, type Erc7677Context, Erc7677Paymaster, type Erc7677PaymasterConstructorOptions, type Erc7677PaymasterFields, type Erc7677Provider, type Erc7677StubDataResult, ExperimentalAllowAllParallelPaymaster, type Signer as ExternalSigner, type GasEstimationResult, GasOption, type GasPaymasterUserOperationOverrides, type InitCodeOverrides, type JsonRpcError, type JsonRpcParam, type JsonRpcResponse, type JsonRpcResult, type MetaTransaction, type MultiOpSignContext, Operation, type ParallelPaymasterInitValues, PolygonChain, type PrependTokenPaymasterApproveAccount, type RecoveryRequest, type RecoveryRequestTypedDataDomain, type RecoveryRequestTypedMessageValue, type RecoverySignaturePair, SAFE_MESSAGE_MODULE_TYPE, SAFE_MESSAGE_PRIMARY_TYPE, SafeAccountFactory, SafeAccountV0_2_0, SafeAccountV0_3_0, SafeAccountV1_5_0_M_0_3_0, type SafeMessageTypedDataDomain, type SafeMessageTypedMessageValue, SafeModuleExecutorFunctionSelector, SafeMultiChainSigAccountV1, type SafeUserOperationTypedDataDomain, type SameUserOp, SendUseroperationResponse, type SignContext, type SignHashFn, type SignTypedDataFn, type Signer$1 as Signer, type SignerSignaturePair, type SigningScheme, Simple7702Account, Simple7702AccountV09, SmartAccount, SmartAccountFactory, SocialRecoveryModule, SocialRecoveryModuleGracePeriodSelector, type SponsorInfo, type SponsorMetadata, type StateOverrideSet, type TokenQuote, type TypedData, type UserOperationByHashResult, type UserOperationReceipt, type UserOperationReceiptResult, type UserOperationV6, type UserOperationV7, type UserOperationV8, type UserOperationV9, type WebAuthnSignatureData, WebauthnDummySignerSignaturePair, type WebauthnPublicKey, type WebauthnSignatureData, WorldIdPermissionlessPaymaster, ZeroAddress, abstractionkit_d_exports as abstractionkit, calculateUserOperationMaxGasCost, callTenderlySimulateBundle, createAndSignEip7702DelegationAuthorization, createAndSignEip7702RawTransaction, createAndSignLegacyRawTransaction, createCallData, createEip7702DelegationAuthorizationHash, createEip7702TransactionHash, createUserOperationHash, createWorldIdSignal, fetchAccountNonce, fetchGasPrice, fromEthersWallet, fromPrivateKey, fromViem, fromViemWalletClient, getBalanceOf, getDelegatedAddress, getDepositInfo, getFunctionSelector, getSafeMessageEip712Data, sendJsonRpcRequest, shareTenderlySimulationAndCreateLink, signHash, simulateSenderCallDataWithTenderly, simulateSenderCallDataWithTenderlyAndCreateShareLink, simulateUserOperationCallDataWithTenderly, simulateUserOperationCallDataWithTenderlyAndCreateShareLink, simulateUserOperationWithTenderly, simulateUserOperationWithTenderlyAndCreateShareLink };
1620
1752
  //# sourceMappingURL=index.d.cts.map