@safe-global/relay-kit 3.4.3 → 4.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/cjs/src/index.cjs +1497 -0
  2. package/dist/cjs/test-utils/index.cjs +1360 -0
  3. package/dist/esm/src/index.mjs +1487 -0
  4. package/dist/esm/test-utils/index.mjs +1348 -0
  5. package/dist/src/RelayKitBasePack.d.ts +1 -0
  6. package/dist/src/RelayKitBasePack.d.ts.map +1 -0
  7. package/dist/src/constants.d.ts +1 -0
  8. package/dist/src/constants.d.ts.map +1 -0
  9. package/dist/src/deprecated.d.ts +1 -0
  10. package/dist/src/deprecated.d.ts.map +1 -0
  11. package/dist/src/index.d.ts +6 -1
  12. package/dist/src/index.d.ts.map +1 -0
  13. package/dist/src/packs/gelato/GelatoRelayPack.d.ts +1 -0
  14. package/dist/src/packs/gelato/GelatoRelayPack.d.ts.map +1 -0
  15. package/dist/src/packs/gelato/types.d.ts +1 -0
  16. package/dist/src/packs/gelato/types.d.ts.map +1 -0
  17. package/dist/src/packs/safe-4337/BaseSafeOperation.d.ts +18 -0
  18. package/dist/src/packs/safe-4337/BaseSafeOperation.d.ts.map +1 -0
  19. package/dist/src/packs/safe-4337/Safe4337Pack.d.ts +17 -17
  20. package/dist/src/packs/safe-4337/Safe4337Pack.d.ts.map +1 -0
  21. package/dist/src/packs/safe-4337/SafeOperationFactory.d.ts +13 -0
  22. package/dist/src/packs/safe-4337/SafeOperationFactory.d.ts.map +1 -0
  23. package/dist/src/packs/safe-4337/SafeOperationV06.d.ts +16 -0
  24. package/dist/src/packs/safe-4337/SafeOperationV06.d.ts.map +1 -0
  25. package/dist/src/packs/safe-4337/SafeOperationV07.d.ts +16 -0
  26. package/dist/src/packs/safe-4337/SafeOperationV07.d.ts.map +1 -0
  27. package/dist/src/packs/safe-4337/constants.d.ts +11 -3
  28. package/dist/src/packs/safe-4337/constants.d.ts.map +1 -0
  29. package/dist/src/packs/safe-4337/estimators/index.d.ts +2 -1
  30. package/dist/src/packs/safe-4337/estimators/index.d.ts.map +1 -0
  31. package/dist/src/packs/safe-4337/estimators/pimlico/PimlicoFeeEstimator.d.ts +13 -0
  32. package/dist/src/packs/safe-4337/estimators/pimlico/PimlicoFeeEstimator.d.ts.map +1 -0
  33. package/dist/src/packs/safe-4337/estimators/pimlico/types.d.ts +48 -0
  34. package/dist/src/packs/safe-4337/estimators/pimlico/types.d.ts.map +1 -0
  35. package/dist/src/packs/safe-4337/types.d.ts +50 -44
  36. package/dist/src/packs/safe-4337/types.d.ts.map +1 -0
  37. package/dist/src/packs/safe-4337/utils/encodeNonce.d.ts +5 -0
  38. package/dist/src/packs/safe-4337/utils/encodeNonce.d.ts.map +1 -0
  39. package/dist/src/packs/safe-4337/utils/entrypoint.d.ts +4 -0
  40. package/dist/src/packs/safe-4337/utils/entrypoint.d.ts.map +1 -0
  41. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.d.ts +1 -0
  42. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.d.ts.map +1 -0
  43. package/dist/src/packs/safe-4337/utils/index.d.ts +22 -0
  44. package/dist/src/packs/safe-4337/utils/index.d.ts.map +1 -0
  45. package/dist/src/packs/safe-4337/utils/signing.d.ts +37 -0
  46. package/dist/src/packs/safe-4337/utils/signing.d.ts.map +1 -0
  47. package/dist/src/packs/safe-4337/utils/userOperations.d.ts +27 -0
  48. package/dist/src/packs/safe-4337/utils/userOperations.d.ts.map +1 -0
  49. package/dist/{src/packs/safe-4337/testing-utils → test-utils}/fixtures.d.ts +28 -5
  50. package/dist/test-utils/fixtures.d.ts.map +1 -0
  51. package/dist/{src/packs/safe-4337/testing-utils → test-utils}/helpers.d.ts +3 -2
  52. package/dist/test-utils/helpers.d.ts.map +1 -0
  53. package/dist/test-utils/index.d.ts +4 -0
  54. package/dist/test-utils/index.d.ts.map +1 -0
  55. package/dist/tsconfig.build.tsbuildinfo +1 -1
  56. package/package.json +22 -6
  57. package/dist/src/RelayKitBasePack.js +0 -26
  58. package/dist/src/RelayKitBasePack.js.map +0 -1
  59. package/dist/src/constants.js +0 -12
  60. package/dist/src/constants.js.map +0 -1
  61. package/dist/src/deprecated.js +0 -3
  62. package/dist/src/deprecated.js.map +0 -1
  63. package/dist/src/index.js +0 -30
  64. package/dist/src/index.js.map +0 -1
  65. package/dist/src/packs/gelato/GelatoRelayPack.js +0 -327
  66. package/dist/src/packs/gelato/GelatoRelayPack.js.map +0 -1
  67. package/dist/src/packs/gelato/types.js +0 -3
  68. package/dist/src/packs/gelato/types.js.map +0 -1
  69. package/dist/src/packs/safe-4337/Safe4337Pack.js +0 -644
  70. package/dist/src/packs/safe-4337/Safe4337Pack.js.map +0 -1
  71. package/dist/src/packs/safe-4337/SafeOperation.d.ts +0 -22
  72. package/dist/src/packs/safe-4337/SafeOperation.js +0 -68
  73. package/dist/src/packs/safe-4337/SafeOperation.js.map +0 -1
  74. package/dist/src/packs/safe-4337/constants.js +0 -55
  75. package/dist/src/packs/safe-4337/constants.js.map +0 -1
  76. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.d.ts +0 -8
  77. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.js +0 -49
  78. package/dist/src/packs/safe-4337/estimators/PimlicoFeeEstimator.js.map +0 -1
  79. package/dist/src/packs/safe-4337/estimators/index.js +0 -6
  80. package/dist/src/packs/safe-4337/estimators/index.js.map +0 -1
  81. package/dist/src/packs/safe-4337/testing-utils/fixtures.js +0 -128
  82. package/dist/src/packs/safe-4337/testing-utils/fixtures.js.map +0 -1
  83. package/dist/src/packs/safe-4337/testing-utils/helpers.js +0 -58
  84. package/dist/src/packs/safe-4337/testing-utils/helpers.js.map +0 -1
  85. package/dist/src/packs/safe-4337/types.js +0 -3
  86. package/dist/src/packs/safe-4337/types.js.map +0 -1
  87. package/dist/src/packs/safe-4337/utils/entrypoint.js +0 -23
  88. package/dist/src/packs/safe-4337/utils/entrypoint.js.map +0 -1
  89. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.js +0 -6
  90. package/dist/src/packs/safe-4337/utils/getRelayKitVersion.js.map +0 -1
  91. package/dist/src/packs/safe-4337/utils.d.ts +0 -91
  92. package/dist/src/packs/safe-4337/utils.js +0 -190
  93. package/dist/src/packs/safe-4337/utils.js.map +0 -1
@@ -62,3 +62,4 @@ export declare abstract class RelayKitBasePack<T extends RelayKitBasePackTypes =
62
62
  abstract executeTransaction(props: T['ExecuteTransactionProps']): Promise<T['ExecuteTransactionResult']>;
63
63
  }
64
64
  export {};
65
+ //# sourceMappingURL=RelayKitBasePack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelayKitBasePack.d.ts","sourceRoot":"","sources":["../../src/RelayKitBasePack.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,KAAK,qBAAqB,GAAG;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,uBAAuB,EAAE,OAAO,CAAA;IAChC,uBAAuB,EAAE;QACvB,UAAU,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,CAAA;QAC5D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;IACD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,CAAA;AAED,KAAK,4BAA4B,GAAG;IAClC,uBAAuB,EAAE,OAAO,CAAA;IAChC,uBAAuB,EAAE;QACvB,UAAU,EAAE,4BAA4B,CAAC,yBAAyB,CAAC,CAAA;QACnE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KACvB,CAAA;CACF,CAAA;AAED;;;;;;;;;;GAUG;AACH,8BAAsB,gBAAgB,CACpC,CAAC,SAAS,qBAAqB,GAAG,4BAA4B;IAE9D;;OAEG;IACH,WAAW,EAAE,IAAI,CAAA;IAEjB;;;;OAIG;gBACS,WAAW,EAAE,IAAI;IAI7B;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAEtF;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,CACxB,KAAK,EAAE,CAAC,CAAC,wBAAwB,CAAC,GACjC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC;IAExC;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CACzB,KAAK,EAAE,CAAC,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;CAC1C"}
@@ -4,3 +4,4 @@ export declare const GELATO_RELAY_URL = "https://relay.gelato.digital";
4
4
  export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
5
5
  export declare const GELATO_GAS_EXECUTION_OVERHEAD = 150000;
6
6
  export declare const GELATO_TRANSFER_GAS_COST = 15000;
7
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,+CAA+C,CAAA;AAEvF,eAAO,MAAM,oBAAoB,+CAA+C,CAAA;AAEhF,eAAO,MAAM,gBAAgB,iCAAiC,CAAA;AAE9D,eAAO,MAAM,YAAY,+CAA+C,CAAA;AAGxE,eAAO,MAAM,6BAA6B,SAAU,CAAA;AAGpD,eAAO,MAAM,wBAAwB,QAAS,CAAA"}
@@ -11,3 +11,4 @@ SafeUserOperation,
11
11
  * @deprecated Please import { UserOperation } from @safe-global/types-kit
12
12
  */
13
13
  UserOperation } from '@safe-global/types-kit';
14
+ //# sourceMappingURL=deprecated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/deprecated.ts"],"names":[],"mappings":"AAAA,YAAY;AACV;;GAEG;AACH,eAAe;AACf;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,aAAa,EACd,MAAM,wBAAwB,CAAA"}
@@ -2,12 +2,17 @@ export * from './deprecated';
2
2
  export * from './packs/gelato/GelatoRelayPack';
3
3
  export * from './packs/gelato/types';
4
4
  export * from './packs/safe-4337/Safe4337Pack';
5
- export { default as EthSafeOperation } from './packs/safe-4337/SafeOperation';
5
+ export { default as BaseSafeOperation } from './packs/safe-4337/BaseSafeOperation';
6
+ export { default as SafeOperationV07 } from './packs/safe-4337/SafeOperationV07';
7
+ export { default as SafeOperationV06 } from './packs/safe-4337/SafeOperationV06';
8
+ export { default as SafeOperationFactory } from './packs/safe-4337/SafeOperationFactory';
6
9
  export * from './packs/safe-4337/estimators';
7
10
  export * from './packs/safe-4337/types';
11
+ export * from './packs/safe-4337/utils';
8
12
  export * from './RelayKitBasePack';
9
13
  declare module 'abitype' {
10
14
  interface Register {
11
15
  AddressType: string;
12
16
  }
13
17
  }
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAE5B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,sBAAsB,CAAA;AAEpC,cAAc,gCAAgC,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAClF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAExF,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AAEvC,cAAc,oBAAoB,CAAA;AAElC,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAiB,QAAQ;QACvB,WAAW,EAAE,MAAM,CAAA;KACpB;CACF"}
@@ -101,3 +101,4 @@ export declare class GelatoRelayPack extends RelayKitBasePack<{
101
101
  */
102
102
  executeTransaction({ executable: safeTransaction, options }: GelatoExecuteTransactionProps): Promise<RelayResponse>;
103
103
  }
104
+ //# sourceMappingURL=GelatoRelayPack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GelatoRelayPack.d.ts","sourceRoot":"","sources":["../../../../src/packs/gelato/GelatoRelayPack.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAEb,yBAAyB,EAC1B,MAAM,0BAA0B,CAAA;AAQjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAQ1E,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAEhB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACd,MAAM,SAAS,CAAA;AAEhB,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC;IACpD,gBAAgB,EAAE,sBAAsB,CAAA;IACxC,iBAAiB,EAAE,uBAAuB,CAAA;IAC1C,sBAAsB,EAAE,4BAA4B,CAAA;IACpD,uBAAuB,EAAE,eAAe,CAAA;IACxC,uBAAuB,EAAE,6BAA6B,CAAA;IACtD,yBAAyB,EAAE,aAAa,CAAA;CACzC,CAAC;;gBAIY,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,aAAa;IAOlD,OAAO,CAAC,YAAY;IAIpB,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACG,cAAc,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACrF;;;;;OAKG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ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23
23
  };
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/packs/gelato/types.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAA;AAE5C,MAAM,MAAM,4BAA4B,GAAG;IACzC,YAAY,EAAE,mBAAmB,EAAE,CAAA;IACnC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,sBAAsB,CAAA;IAChC,gGAAgG;IAChG,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,eAAe,CAAA;IAC3B,OAAO,CAAC,EAAE,sBAAsB,CAAA;CACjC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { EstimateGasData, SafeOperation, SafeOperationOptions, SafeSignature, SafeUserOperation, UserOperation } from '@safe-global/types-kit';
2
+ import { EIP712_SAFE_OPERATION_TYPE_V06, EIP712_SAFE_OPERATION_TYPE_V07 } from '../../packs/safe-4337/constants';
3
+ declare abstract class BaseSafeOperation implements SafeOperation {
4
+ userOperation: UserOperation;
5
+ options: SafeOperationOptions;
6
+ signatures: Map<string, SafeSignature>;
7
+ constructor(userOperation: UserOperation, options: SafeOperationOptions);
8
+ abstract addEstimations(estimations: EstimateGasData): void;
9
+ abstract getSafeOperation(): SafeUserOperation;
10
+ getSignature(signer: string): SafeSignature | undefined;
11
+ addSignature(signature: SafeSignature): void;
12
+ encodedSignatures(): string;
13
+ getUserOperation(): UserOperation;
14
+ getHash(): string;
15
+ abstract getEIP712Type(): typeof EIP712_SAFE_OPERATION_TYPE_V06 | typeof EIP712_SAFE_OPERATION_TYPE_V07;
16
+ }
17
+ export default BaseSafeOperation;
18
+ //# sourceMappingURL=BaseSafeOperation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseSafeOperation.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/BaseSafeOperation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACd,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,kDAAkD,CAAA;AAEzD,uBAAe,iBAAkB,YAAW,aAAa;IACvD,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,oBAAoB,CAAA;IAC7B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAY;gBAEtC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,oBAAoB;IAKvE,QAAQ,CAAC,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAE3D,QAAQ,CAAC,gBAAgB,IAAI,iBAAiB;IAE9C,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIvD,YAAY,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI;IAI5C,iBAAiB,IAAI,MAAM;IAI3B,gBAAgB,IAAI,aAAa;IAcjC,OAAO,IAAI,MAAM;IAYjB,QAAQ,CAAC,aAAa,IAClB,OAAO,8BAA8B,GACrC,OAAO,8BAA8B;CAC1C;AAED,eAAe,iBAAiB,CAAA"}
@@ -1,8 +1,7 @@
1
- import { SigningMethod } from '@safe-global/protocol-kit';
2
1
  import { RelayKitBasePack } from '../../RelayKitBasePack';
3
- import { SafeOperationResponse } from '@safe-global/types-kit';
4
- import EthSafeOperation from './SafeOperation';
5
- import { EstimateFeeProps, Safe4337CreateTransactionProps, Safe4337ExecutableProps, Safe4337InitOptions, Safe4337Options, UserOperationReceipt, UserOperationWithPayload } from './types';
2
+ import { SafeOperationResponse, SigningMethod } from '@safe-global/types-kit';
3
+ import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
4
+ import { EstimateFeeProps, Safe4337CreateTransactionProps, Safe4337ExecutableProps, Safe4337InitOptions, Safe4337Options, UserOperationReceipt, UserOperationWithPayload } from '../../packs/safe-4337/types';
6
5
  /**
7
6
  * Safe4337Pack class that extends RelayKitBasePack.
8
7
  * This class provides an implementation of the ERC-4337 that enables Safe accounts to wrk with UserOperations.
@@ -14,9 +13,9 @@ import { EstimateFeeProps, Safe4337CreateTransactionProps, Safe4337ExecutablePro
14
13
  */
15
14
  export declare class Safe4337Pack extends RelayKitBasePack<{
16
15
  EstimateFeeProps: EstimateFeeProps;
17
- EstimateFeeResult: EthSafeOperation;
16
+ EstimateFeeResult: BaseSafeOperation;
18
17
  CreateTransactionProps: Safe4337CreateTransactionProps;
19
- CreateTransactionResult: EthSafeOperation;
18
+ CreateTransactionResult: BaseSafeOperation;
20
19
  ExecuteTransactionProps: Safe4337ExecutableProps;
21
20
  ExecuteTransactionResult: string;
22
21
  }> {
@@ -42,36 +41,36 @@ export declare class Safe4337Pack extends RelayKitBasePack<{
42
41
  * Estimates gas for the SafeOperation.
43
42
  *
44
43
  * @param {EstimateFeeProps} props - The parameters for the gas estimation.
45
- * @param {EthSafeOperation} props.safeOperation - The SafeOperation to estimate the gas.
44
+ * @param {BaseSafeOperation} props.safeOperation - The SafeOperation to estimate the gas.
46
45
  * @param {IFeeEstimator} props.feeEstimator - The function to estimate the gas.
47
- * @return {Promise<EthSafeOperation>} The Promise object that will be resolved into the gas estimation.
46
+ * @return {Promise<BaseSafeOperation>} The Promise object that will be resolved into the gas estimation.
48
47
  */
49
- getEstimateFee({ safeOperation, feeEstimator }: EstimateFeeProps): Promise<EthSafeOperation>;
48
+ getEstimateFee({ safeOperation, feeEstimator }: EstimateFeeProps): Promise<BaseSafeOperation>;
50
49
  /**
51
50
  * Creates a relayed transaction based on the provided parameters.
52
51
  *
53
52
  * @param {MetaTransactionData[]} transactions - The transactions to batch in a SafeOperation.
54
53
  * @param options - Optional configuration options for the transaction creation.
55
- * @return {Promise<EthSafeOperation>} The Promise object will resolve a SafeOperation.
54
+ * @return {Promise<BaseSafeOperation>} The Promise object will resolve a SafeOperation.
56
55
  */
57
- createTransaction({ transactions, options }: Safe4337CreateTransactionProps): Promise<EthSafeOperation>;
56
+ createTransaction({ transactions, options }: Safe4337CreateTransactionProps): Promise<BaseSafeOperation>;
58
57
  /**
59
58
  * Signs a safe operation.
60
59
  *
61
- * @param {EthSafeOperation | SafeOperationResponse} safeOperation - The SafeOperation to sign. It can be:
60
+ * @param {BaseSafeOperation | SafeOperationResponse} safeOperation - The SafeOperation to sign. It can be:
62
61
  * - A response from the API (Tx Service)
63
- * - An instance of EthSafeOperation
62
+ * - An instance of SafeOperation
64
63
  * @param {SigningMethod} signingMethod - The signing method to use.
65
- * @return {Promise<EthSafeOperation>} The Promise object will resolve to the signed SafeOperation.
64
+ * @return {Promise<BaseSafeOperation>} The Promise object will resolve to the signed SafeOperation.
66
65
  */
67
- signSafeOperation(safeOperation: EthSafeOperation | SafeOperationResponse, signingMethod?: SigningMethod): Promise<EthSafeOperation>;
66
+ signSafeOperation(safeOperation: BaseSafeOperation | SafeOperationResponse, signingMethod?: SigningMethod): Promise<BaseSafeOperation>;
68
67
  /**
69
68
  * Executes the relay transaction.
70
69
  *
71
70
  * @param {Safe4337ExecutableProps} props - The parameters for the transaction execution.
72
- * @param {EthSafeOperation | SafeOperationResponse} props.executable - The SafeOperation to execute. It can be:
71
+ * @param {BaseSafeOperation | SafeOperationResponse} props.executable - The SafeOperation to execute. It can be:
73
72
  * - A response from the API (Tx Service)
74
- * - An instance of EthSafeOperation
73
+ * - An instance of SafeOperation
75
74
  * @return {Promise<string>} The user operation hash.
76
75
  */
77
76
  executeTransaction({ executable }: Safe4337ExecutableProps): Promise<string>;
@@ -104,3 +103,4 @@ export declare class Safe4337Pack extends RelayKitBasePack<{
104
103
  getChainId(): Promise<string>;
105
104
  getOnchainIdentifier(): string;
106
105
  }
106
+ //# sourceMappingURL=Safe4337Pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Safe4337Pack.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/Safe4337Pack.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAC1E,OAAO,EAGL,qBAAqB,EAErB,aAAa,EACd,MAAM,wBAAwB,CAAA;AAO/B,OAAO,iBAAiB,MAAM,0DAA0D,CAAA;AAExF,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EAGzB,MAAM,8CAA8C,CAAA;AAsBrD;;;;;;;;GAQG;AACH,qBAAa,YAAa,SAAQ,gBAAgB,CAAC;IACjD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,sBAAsB,EAAE,8BAA8B,CAAA;IACtD,uBAAuB,EAAE,iBAAiB,CAAA;IAC1C,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,wBAAwB,EAAE,MAAM,CAAA;CACjC,CAAC;;IAeA;;;;OAIG;gBACS,EACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,+BAA+B,EAC/B,gBAAgB,EACjB,EAAE,eAAe;IAsBlB;;;;;;;;;OASG;WACU,IAAI,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAqQ1E;;;;;;;OAOG;IAEG,cAAc,CAAC,EACnB,aAAa,EACb,YAAwC,EACzC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA6ChD;;;;;;OAMG;IACG,iBAAiB,CAAC,EACtB,YAAY,EACZ,OAAY,EACb,EAAE,8BAA8B,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgF9D;;;;;;;;OAQG;IACG,iBAAiB,CACrB,aAAa,EAAE,iBAAiB,GAAG,qBAAqB,EACxD,aAAa,GAAE,aAAoD,GAClE,OAAO,CAAC,iBAAiB,CAAC;IAqF7B;;;;;;;;OAQG;IACG,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC;IAkBlF;;;;;OAKG;IACG,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAOnF;;;;;OAKG;IACG,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAOvF;;;;;OAKG;IACG,uBAAuB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAMlD;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,oBAAoB,IAAI,MAAM;CAG/B"}
@@ -0,0 +1,13 @@
1
+ import { UserOperation, SafeOperationOptions } from '@safe-global/types-kit';
2
+ import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
3
+ declare class SafeOperationFactory {
4
+ /**
5
+ * Creates a new SafeOperation with proper validation
6
+ * @param userOperation - The base user operation
7
+ * @param options - Configuration options
8
+ * @returns Validated SafeOperation instance
9
+ */
10
+ static createSafeOperation(userOperation: UserOperation, options: SafeOperationOptions): BaseSafeOperation;
11
+ }
12
+ export default SafeOperationFactory;
13
+ //# sourceMappingURL=SafeOperationFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeOperationFactory.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/SafeOperationFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,iBAAiB,MAAM,0DAA0D,CAAA;AAGxF,cAAM,oBAAoB;IACxB;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CACxB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,oBAAoB,GAC5B,iBAAiB;CAOrB;AAED,eAAe,oBAAoB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { UserOperationV06, EstimateGasData, SafeUserOperation, SafeOperationOptions } from '@safe-global/types-kit';
2
+ import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
3
+ declare class SafeOperationV06 extends BaseSafeOperation {
4
+ userOperation: UserOperationV06;
5
+ constructor(userOperation: UserOperationV06, options: SafeOperationOptions);
6
+ addEstimations(estimations: EstimateGasData): void;
7
+ getSafeOperation(): SafeUserOperation;
8
+ getEIP712Type(): {
9
+ SafeOp: {
10
+ type: string;
11
+ name: string;
12
+ }[];
13
+ };
14
+ }
15
+ export default SafeOperationV06;
16
+ //# sourceMappingURL=SafeOperationV06.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeOperationV06.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/SafeOperationV06.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,iBAAiB,MAAM,0DAA0D,CAAA;AAGxF,cAAM,gBAAiB,SAAQ,iBAAiB;IAC9C,aAAa,EAAG,gBAAgB,CAAA;gBAEpB,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,oBAAoB;IAI1E,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAoBlD,gBAAgB,IAAI,iBAAiB;IAkBrC,aAAa;;;;;;CAGd;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { UserOperationV07, EstimateGasData, SafeUserOperation, SafeOperationOptions } from '@safe-global/types-kit';
2
+ import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
3
+ declare class SafeOperationV07 extends BaseSafeOperation {
4
+ userOperation: UserOperationV07;
5
+ constructor(userOperation: UserOperationV07, options: SafeOperationOptions);
6
+ addEstimations(estimations: EstimateGasData): void;
7
+ getSafeOperation(): SafeUserOperation;
8
+ getEIP712Type(): {
9
+ SafeOp: {
10
+ type: string;
11
+ name: string;
12
+ }[];
13
+ };
14
+ }
15
+ export default SafeOperationV07;
16
+ //# sourceMappingURL=SafeOperationV07.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SafeOperationV07.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/SafeOperationV07.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,iBAAiB,MAAM,0DAA0D,CAAA;AAGxF,cAAM,gBAAiB,SAAQ,iBAAiB;IAC9C,aAAa,EAAG,gBAAgB,CAAA;gBAEpB,aAAa,EAAE,gBAAgB,EAAE,OAAO,EAAE,oBAAoB;IAI1E,cAAc,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IA2BlD,gBAAgB,IAAI,iBAAiB;IAsCrC,aAAa;;;;;;CAGd;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,6 +1,12 @@
1
1
  export declare const DEFAULT_SAFE_VERSION = "1.4.1";
2
- export declare const DEFAULT_SAFE_MODULES_VERSION = "0.2.0";
3
- export declare const EIP712_SAFE_OPERATION_TYPE: {
2
+ export declare const DEFAULT_SAFE_MODULES_VERSION = "0.3.0";
3
+ export declare const EIP712_SAFE_OPERATION_TYPE_V06: {
4
+ SafeOp: {
5
+ type: string;
6
+ name: string;
7
+ }[];
8
+ };
9
+ export declare const EIP712_SAFE_OPERATION_TYPE_V07: {
4
10
  SafeOp: {
5
11
  type: string;
6
12
  name: string;
@@ -98,5 +104,7 @@ export declare enum RPC_4337_CALLS {
98
104
  GET_USER_OPERATION_RECEIPT = "eth_getUserOperationReceipt",
99
105
  SUPPORTED_ENTRY_POINTS = "eth_supportedEntryPoints",
100
106
  CHAIN_ID = "eth_chainId",
101
- SPONSOR_USER_OPERATION = "pm_sponsorUserOperation"
107
+ GET_PAYMASTER_STUB_DATA = "pm_getPaymasterStubData",
108
+ GET_PAYMASTER_DATA = "pm_getPaymasterData"
102
109
  }
110
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,UAAU,CAAA;AAC3C,eAAO,MAAM,4BAA4B,UAAU,CAAA;AAEnD,eAAO,MAAM,8BAA8B;;;;;CAgB1C,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;CAgB1C,CAAA;AAED,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMd,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAWjB,CAAA;AAEV,eAAO,MAAM,sBAAsB,+CAA+C,CAAA;AAClF,eAAO,MAAM,sBAAsB,+CAA+C,CAAA;AAElF,oBAAY,cAAc;IACxB,2BAA2B,iCAAiC;IAC5D,mBAAmB,0BAA0B;IAC7C,0BAA0B,+BAA+B;IACzD,0BAA0B,gCAAgC;IAC1D,sBAAsB,6BAA6B;IACnD,QAAQ,gBAAgB;IACxB,uBAAuB,4BAA4B;IACnD,kBAAkB,wBAAwB;CAC3C"}
@@ -1,2 +1,3 @@
1
- import { PimlicoFeeEstimator } from './PimlicoFeeEstimator';
1
+ import { PimlicoFeeEstimator } from './pimlico/PimlicoFeeEstimator';
2
2
  export { PimlicoFeeEstimator };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packs/safe-4337/estimators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { EstimateGasData } from '@safe-global/types-kit';
2
+ import { EstimateFeeFunctionProps, IFeeEstimator } from '../../../../packs/safe-4337/types';
3
+ /**
4
+ * PimlicoFeeEstimator is a class that implements the IFeeEstimator interface. You can implement three optional methods that will be called during the estimation process:
5
+ * - preEstimateUserOperationGas: Setup the userOperation before calling the eth_estimateUserOperation gas method.
6
+ * - postEstimateUserOperationGas: Adjust the userOperation values returned after calling the eth_estimateUserOperation method.
7
+ */
8
+ export declare class PimlicoFeeEstimator implements IFeeEstimator {
9
+ #private;
10
+ preEstimateUserOperationGas({ bundlerUrl, userOperation, entryPoint, paymasterOptions }: EstimateFeeFunctionProps): Promise<EstimateGasData>;
11
+ postEstimateUserOperationGas({ userOperation, entryPoint, paymasterOptions }: EstimateFeeFunctionProps): Promise<EstimateGasData>;
12
+ }
13
+ //# sourceMappingURL=PimlicoFeeEstimator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PimlicoFeeEstimator.d.ts","sourceRoot":"","sources":["../../../../../../src/packs/safe-4337/estimators/pimlico/PimlicoFeeEstimator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAEL,wBAAwB,EACxB,aAAa,EAEd,MAAM,8CAA8C,CAAA;AAQrD;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,aAAa;;IACjD,2BAA2B,CAAC,EAChC,UAAU,EACV,aAAa,EACb,UAAU,EACV,gBAAgB,EACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC;IA6BhD,4BAA4B,CAAC,EACjC,aAAa,EACb,UAAU,EACV,gBAAgB,EACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC;CAgEvD"}
@@ -0,0 +1,48 @@
1
+ import { UserOperationStringValues } from '../../../../packs/safe-4337/types';
2
+ export declare enum PIMLICO_CUSTOM_RPC_4337_CALLS {
3
+ GET_USER_OPERATION_GAS_PRICE = "pimlico_getUserOperationGasPrice",
4
+ SPONSOR_USER_OPERATION = "pm_sponsorUserOperation"
5
+ }
6
+ export type PimlicoCustomRpcSchema = [
7
+ {
8
+ Method: PIMLICO_CUSTOM_RPC_4337_CALLS.GET_USER_OPERATION_GAS_PRICE;
9
+ Parameters: never;
10
+ ReturnType: {
11
+ slow: {
12
+ maxFeePerGas: string;
13
+ maxPriorityFeePerGas: string;
14
+ };
15
+ standard: {
16
+ maxFeePerGas: string;
17
+ maxPriorityFeePerGas: string;
18
+ };
19
+ fast: {
20
+ maxFeePerGas: string;
21
+ maxPriorityFeePerGas: string;
22
+ };
23
+ };
24
+ },
25
+ {
26
+ Method: PIMLICO_CUSTOM_RPC_4337_CALLS.SPONSOR_USER_OPERATION;
27
+ Parameters: [UserOperationStringValues, string, {
28
+ sponsorshipPolicyId: string;
29
+ }?];
30
+ ReturnType: {
31
+ paymasterAndData: string;
32
+ callGasLimit: string;
33
+ verificationGasLimit: string;
34
+ verificationGas: string;
35
+ preVerificationGas: string;
36
+ } | {
37
+ paymaster: string;
38
+ paymasterData: string;
39
+ callGasLimit: string;
40
+ verificationGasLimit: string;
41
+ verificationGas: string;
42
+ preVerificationGas: string;
43
+ paymasterVerificationGasLimit: string;
44
+ paymasterPostOpGasLimit: string;
45
+ };
46
+ }
47
+ ];
48
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/packs/safe-4337/estimators/pimlico/types.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import { Account, Address, Chain, Hash, Hex, PublicClient, PublicRpcSchema, Transport } from 'viem';
2
2
  import Safe, { DeploymentType, SafeProviderConfig, OnchainAnalyticsProps } from '@safe-global/protocol-kit';
3
3
  import { EstimateGasData, MetaTransactionData, SafeOperationResponse, SafeVersion, UserOperation } from '@safe-global/types-kit';
4
- import EthSafeOperation from './SafeOperation';
5
- import { RPC_4337_CALLS } from './constants';
4
+ import BaseSafeOperation from '../../packs/safe-4337/BaseSafeOperation';
5
+ import { RPC_4337_CALLS } from '../../packs/safe-4337/constants';
6
6
  type ExistingSafeOptions = {
7
7
  safeAddress: string;
8
8
  };
@@ -15,7 +15,6 @@ type PredictedSafeOptions = {
15
15
  };
16
16
  export type SponsoredPaymasterOption = {
17
17
  isSponsored: true;
18
- paymasterUrl: string;
19
18
  sponsorshipPolicyId?: string;
20
19
  };
21
20
  export type ERC20PaymasterOption = {
@@ -24,7 +23,9 @@ export type ERC20PaymasterOption = {
24
23
  paymasterTokenAddress: string;
25
24
  amountToApprove?: bigint;
26
25
  };
27
- export type PaymasterOptions = SponsoredPaymasterOption | ERC20PaymasterOption | undefined;
26
+ export type PaymasterOptions = ({
27
+ paymasterUrl: string;
28
+ } & (SponsoredPaymasterOption | ERC20PaymasterOption)) | undefined;
28
29
  export type Safe4337InitOptions = {
29
30
  provider: SafeProviderConfig['provider'];
30
31
  signer?: SafeProviderConfig['signer'];
@@ -33,7 +34,7 @@ export type Safe4337InitOptions = {
33
34
  customContracts?: {
34
35
  entryPointAddress?: string;
35
36
  safe4337ModuleAddress?: string;
36
- addModulesLibAddress?: string;
37
+ safeModulesSetupAddress?: string;
37
38
  safeWebAuthnSharedSignerAddress?: string;
38
39
  };
39
40
  options: ExistingSafeOptions | PredictedSafeOptions;
@@ -58,14 +59,18 @@ export type Safe4337CreateTransactionProps = {
58
59
  validUntil?: number;
59
60
  validAfter?: number;
60
61
  feeEstimator?: IFeeEstimator;
62
+ customNonce?: bigint;
61
63
  };
62
64
  };
63
65
  export type Safe4337ExecutableProps = {
64
- executable: EthSafeOperation | SafeOperationResponse;
66
+ executable: BaseSafeOperation | SafeOperationResponse;
65
67
  };
66
- export type EstimateSponsoredGasData = {
68
+ export type EstimateSponsoredGasData = ({
67
69
  paymasterAndData: string;
68
- } & EstimateGasData;
70
+ } | {
71
+ paymaster: string;
72
+ paymasterData: string;
73
+ }) & EstimateGasData;
69
74
  type Log = {
70
75
  logIndex: string;
71
76
  transactionIndex: string;
@@ -112,60 +117,52 @@ export type EstimateFeeFunctionProps = {
112
117
  userOperation: UserOperation;
113
118
  bundlerUrl: string;
114
119
  entryPoint: string;
120
+ paymasterOptions?: PaymasterOptions;
115
121
  };
116
- export type EstimateFeeFunction = ({ userOperation, bundlerUrl, entryPoint }: EstimateFeeFunctionProps) => Promise<EstimateGasData>;
117
- export type EstimateSponsoredFeeFunctionProps = {
118
- userOperation: UserOperation;
119
- paymasterUrl: string;
120
- entryPoint: string;
121
- sponsorshipPolicyId?: string;
122
- };
123
- export type EstimateSponsoredFeeFunction = ({ userOperation, paymasterUrl, entryPoint }: EstimateSponsoredFeeFunctionProps) => Promise<EstimateSponsoredGasData>;
122
+ export type EstimateFeeFunction = ({ userOperation, bundlerUrl, entryPoint, paymasterOptions }: EstimateFeeFunctionProps) => Promise<EstimateGasData>;
124
123
  export interface IFeeEstimator {
125
- setupEstimation?: EstimateFeeFunction;
126
- adjustEstimation?: EstimateFeeFunction;
127
- getPaymasterEstimation?: EstimateSponsoredFeeFunction;
124
+ preEstimateUserOperationGas?: EstimateFeeFunction;
125
+ postEstimateUserOperationGas?: EstimateFeeFunction;
128
126
  }
129
127
  export type EstimateFeeProps = {
130
- safeOperation: EthSafeOperation;
128
+ safeOperation: BaseSafeOperation;
131
129
  feeEstimator?: IFeeEstimator;
132
130
  };
133
- type UserOperationStringValues = Omit<UserOperation, 'callGasLimit' | 'verificationGasLimit' | 'preVerificationGas' | 'maxFeePerGas' | 'maxPriorityFeePerGas'> & {
131
+ export type UserOperationStringValues = Omit<UserOperation, 'callGasLimit' | 'verificationGasLimit' | 'preVerificationGas' | 'maxFeePerGas' | 'maxPriorityFeePerGas'> & {
134
132
  callGasLimit: string;
135
133
  verificationGasLimit: string;
136
134
  preVerificationGas: string;
137
135
  maxFeePerGas: string;
138
136
  maxPriorityFeePerGas: string;
139
137
  };
140
- export type PimlicoCustomRpcSchema = [
138
+ export type Safe4337RpcSchema = [
141
139
  {
142
- Method: 'pimlico_getUserOperationGasPrice';
143
- Parameters: never;
140
+ Method: RPC_4337_CALLS.GET_PAYMASTER_STUB_DATA;
141
+ Parameters: [UserOperationStringValues, string, string, {
142
+ token: string;
143
+ }?];
144
144
  ReturnType: {
145
- slow: {
146
- maxFeePerGas: string;
147
- maxPriorityFeePerGas: string;
148
- };
149
- standard: {
150
- maxFeePerGas: string;
151
- maxPriorityFeePerGas: string;
152
- };
153
- fast: {
154
- maxFeePerGas: string;
155
- maxPriorityFeePerGas: string;
156
- };
145
+ paymasterAndData: string;
146
+ } | {
147
+ paymaster: string;
148
+ paymasterData: string;
149
+ paymasterVerificationGasLimit?: string;
150
+ paymasterPostOpGasLimit?: string;
157
151
  };
158
152
  },
159
153
  {
160
- Method: 'pm_sponsorUserOperation';
161
- Parameters: [UserOperationStringValues, string, {
162
- sponsorshipPolicyId?: string;
154
+ Method: RPC_4337_CALLS.GET_PAYMASTER_DATA;
155
+ Parameters: [UserOperationStringValues, string, string, {
156
+ token: string;
163
157
  }?];
164
158
  ReturnType: {
165
159
  paymasterAndData: string;
166
- callGasLimit: string;
167
- verificationGasLimit: string;
168
160
  preVerificationGas: string;
161
+ verificationGasLimit: string;
162
+ callGasLimit: string;
163
+ } | {
164
+ paymaster: string;
165
+ paymasterData: string;
169
166
  };
170
167
  },
171
168
  {
@@ -180,6 +177,8 @@ export type PimlicoCustomRpcSchema = [
180
177
  callGasLimit: string;
181
178
  verificationGasLimit: string;
182
179
  preVerificationGas: string;
180
+ paymasterPostOpGasLimit?: string;
181
+ paymasterVerificationGasLimit?: string;
183
182
  };
184
183
  },
185
184
  {
@@ -204,8 +203,15 @@ export type PimlicoCustomRpcSchema = [
204
203
  ReturnType: UserOperationReceipt;
205
204
  }
206
205
  ];
207
- export type BundlerClient = PublicClient<Transport, Chain | undefined, Account | undefined, [
208
- ...PimlicoCustomRpcSchema,
209
- ...PublicRpcSchema
206
+ export type RpcSchemaEntry = {
207
+ Method: string;
208
+ Parameters: unknown[];
209
+ ReturnType: unknown;
210
+ };
211
+ export type BundlerClient<ProviderCustomRpcSchema extends RpcSchemaEntry[] = []> = PublicClient<Transport, Chain | undefined, Account | undefined, [
212
+ ...PublicRpcSchema,
213
+ ...Safe4337RpcSchema,
214
+ ...ProviderCustomRpcSchema
210
215
  ]>;
211
216
  export {};
217
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/packs/safe-4337/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACnG,OAAO,IAAI,EAAE,EACX,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,aAAa,EACd,MAAM,wBAAwB,CAAA;AAC/B,OAAO,iBAAiB,MAAM,0DAA0D,CAAA;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAA;AAEjF,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;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
1
+ export declare function encodeNonce(args: {
2
+ key: bigint;
3
+ sequence: bigint;
4
+ }): bigint;
5
+ //# sourceMappingURL=encodeNonce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodeNonce.d.ts","sourceRoot":"","sources":["../../../../../src/packs/safe-4337/utils/encodeNonce.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAK3E"}
@@ -1,4 +1,8 @@
1
+ import Safe from '@safe-global/protocol-kit';
1
2
  export declare const EQ_OR_GT_0_3_0 = ">=0.3.0";
2
3
  export declare function sameString(str1: string, str2: string): boolean;
3
4
  export declare function entryPointToSafeModules(entryPoint: string): "0.2.0" | ">=0.3.0";
4
5
  export declare function isEntryPointV6(address: string): boolean;
6
+ export declare function isEntryPointV7(address: string): boolean;
7
+ export declare function getSafeNonceFromEntrypoint(protocolKit: Safe, safeAddress: string, entryPointAddress: string): Promise<bigint>;
8
+ //# sourceMappingURL=entrypoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../../../../src/packs/safe-4337/utils/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAS5C,eAAO,MAAM,cAAc,YAAY,CAAA;AAEvC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,uBAOzD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,IAAI,EACjB,WAAW,EAAE,MAAM,EACnB,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,MAAM,CAAC,CAWjB"}
@@ -1 +1,2 @@
1
1
  export declare const getRelayKitVersion: () => string;
2
+ //# sourceMappingURL=getRelayKitVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRelayKitVersion.d.ts","sourceRoot":"","sources":["../../../../../src/packs/safe-4337/utils/getRelayKitVersion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,cAAgB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { MetaTransactionData } from '@safe-global/types-kit';
2
+ import { BundlerClient, RpcSchemaEntry } from '../../../packs/safe-4337/types';
3
+ /**
4
+ * Gets the EIP-4337 bundler provider.
5
+ *
6
+ * @param {string} bundlerUrl The EIP-4337 bundler URL.
7
+ * @return {BundlerClient} The EIP-4337 bundler provider.
8
+ */
9
+ export declare function createBundlerClient<ProviderCustomRpcSchema extends RpcSchemaEntry[] = []>(bundlerUrl: string): BundlerClient<ProviderCustomRpcSchema>;
10
+ /**
11
+ * Encodes multi-send data from transactions batch.
12
+ *
13
+ * @param {MetaTransactionData[]} transactions - an array of transaction to to be encoded.
14
+ * @return {string} The encoded data string.
15
+ */
16
+ export declare function encodeMultiSendCallData(transactions: MetaTransactionData[]): string;
17
+ export * from './entrypoint';
18
+ export * from './signing';
19
+ export * from './userOperations';
20
+ export * from './getRelayKitVersion';
21
+ export * from './encodeNonce';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packs/safe-4337/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAG3E,OAAO,EACL,aAAa,EACb,cAAc,EAEf,MAAM,8CAA8C,CAAA;AAErD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,uBAAuB,SAAS,cAAc,EAAE,GAAG,EAAE,EACvF,UAAU,EAAE,MAAM,GACjB,aAAa,CAAC,uBAAuB,CAAC,CAOxC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,mBAAmB,EAAE,GAAG,MAAM,CAUnF;AAED,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA"}