@cometh/connect-react-hooks 0.0.2-dev.1 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs CHANGED
@@ -2043,7 +2043,13 @@ function useSetUpRecovery() {
2043
2043
  if (!smartAccountClient) {
2044
2044
  throw new Error("No smart account found");
2045
2045
  }
2046
- return smartAccountClient.setUpRecoveryModule({ ...variables });
2046
+ return smartAccountClient.setUpRecoveryModule({
2047
+ passKeyName: variables.passKeyName,
2048
+ rpcUrl: variables.rpcUrl,
2049
+ webAuthnOptions: variables.webAuthnOptions,
2050
+ // biome-ignore lint/suspicious/noExplicitAny: TODO: remove any
2051
+ middleware: variables.middleware
2052
+ });
2047
2053
  }
2048
2054
  },
2049
2055
  queryClient
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem_chains from 'viem/chains';
2
2
  import { Prettify } from 'viem/chains';
3
3
  import * as permissionless_types_entrypoint from 'permissionless/types/entrypoint';
4
- import { ENTRYPOINT_ADDRESS_V07_TYPE } from 'permissionless/types/entrypoint';
4
+ import { EntryPoint, ENTRYPOINT_ADDRESS_V07_TYPE } from 'permissionless/types/entrypoint';
5
5
  import * as permissionless_actions_smartAccount from 'permissionless/actions/smartAccount';
6
6
  import * as permissionless from 'permissionless';
7
7
  import * as permissionless__types_accounts from 'permissionless/_types/accounts';
@@ -501,7 +501,60 @@ declare const useAccount: () => {
501
501
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
502
502
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
503
503
  }) => Promise<viem.Hash>;
504
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
504
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
505
+ passKeyName?: string;
506
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
507
+ rpcUrl?: string;
508
+ middleware?: {
509
+ gasPrice?: () => Promise<{
510
+ maxFeePerGas: bigint;
511
+ maxPriorityFeePerGas: bigint;
512
+ }>;
513
+ sponsorUserOperation?: ((args: {
514
+ userOperation: {
515
+ sender: Address;
516
+ nonce: bigint;
517
+ factory?: Address;
518
+ factoryData?: viem.Hex;
519
+ callData: viem.Hex;
520
+ callGasLimit: bigint;
521
+ verificationGasLimit: bigint;
522
+ preVerificationGas: bigint;
523
+ maxFeePerGas: bigint;
524
+ maxPriorityFeePerGas: bigint;
525
+ paymaster?: Address;
526
+ paymasterVerificationGasLimit?: bigint;
527
+ paymasterPostOpGasLimit?: bigint;
528
+ paymasterData?: viem.Hex;
529
+ signature: viem.Hex;
530
+ initCode?: never;
531
+ paymasterAndData?: never;
532
+ };
533
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
534
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
535
+ } | ((args: {
536
+ userOperation: {
537
+ sender: Address;
538
+ nonce: bigint;
539
+ factory?: Address;
540
+ factoryData?: viem.Hex;
541
+ callData: viem.Hex;
542
+ callGasLimit: bigint;
543
+ verificationGasLimit: bigint;
544
+ preVerificationGas: bigint;
545
+ maxFeePerGas: bigint;
546
+ maxPriorityFeePerGas: bigint;
547
+ paymaster?: Address;
548
+ paymasterVerificationGasLimit?: bigint;
549
+ paymasterPostOpGasLimit?: bigint;
550
+ paymasterData?: viem.Hex;
551
+ signature: viem.Hex;
552
+ initCode?: never;
553
+ paymasterAndData?: never;
554
+ };
555
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
556
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
557
+ }) => Promise<viem.Hash>;
505
558
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
506
559
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
507
560
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -739,7 +792,60 @@ declare const useAccount: () => {
739
792
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
740
793
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
741
794
  }) => Promise<viem.Hash>;
742
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
795
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
796
+ passKeyName?: string;
797
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
798
+ rpcUrl?: string;
799
+ middleware?: {
800
+ gasPrice?: () => Promise<{
801
+ maxFeePerGas: bigint;
802
+ maxPriorityFeePerGas: bigint;
803
+ }>;
804
+ sponsorUserOperation?: ((args: {
805
+ userOperation: {
806
+ sender: Address;
807
+ nonce: bigint;
808
+ factory?: Address;
809
+ factoryData?: viem.Hex;
810
+ callData: viem.Hex;
811
+ callGasLimit: bigint;
812
+ verificationGasLimit: bigint;
813
+ preVerificationGas: bigint;
814
+ maxFeePerGas: bigint;
815
+ maxPriorityFeePerGas: bigint;
816
+ paymaster?: Address;
817
+ paymasterVerificationGasLimit?: bigint;
818
+ paymasterPostOpGasLimit?: bigint;
819
+ paymasterData?: viem.Hex;
820
+ signature: viem.Hex;
821
+ initCode?: never;
822
+ paymasterAndData?: never;
823
+ };
824
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
825
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
826
+ } | ((args: {
827
+ userOperation: {
828
+ sender: Address;
829
+ nonce: bigint;
830
+ factory?: Address;
831
+ factoryData?: viem.Hex;
832
+ callData: viem.Hex;
833
+ callGasLimit: bigint;
834
+ verificationGasLimit: bigint;
835
+ preVerificationGas: bigint;
836
+ maxFeePerGas: bigint;
837
+ maxPriorityFeePerGas: bigint;
838
+ paymaster?: Address;
839
+ paymasterVerificationGasLimit?: bigint;
840
+ paymasterPostOpGasLimit?: bigint;
841
+ paymasterData?: viem.Hex;
842
+ signature: viem.Hex;
843
+ initCode?: never;
844
+ paymasterAndData?: never;
845
+ };
846
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
847
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
848
+ }) => Promise<viem.Hash>;
743
849
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
744
850
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
745
851
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -965,7 +1071,60 @@ declare const useAccount: () => {
965
1071
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
966
1072
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
967
1073
  }) => Promise<viem.Hash>;
968
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
1074
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
1075
+ passKeyName?: string;
1076
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
1077
+ rpcUrl?: string;
1078
+ middleware?: {
1079
+ gasPrice?: () => Promise<{
1080
+ maxFeePerGas: bigint;
1081
+ maxPriorityFeePerGas: bigint;
1082
+ }>;
1083
+ sponsorUserOperation?: ((args: {
1084
+ userOperation: {
1085
+ sender: Address;
1086
+ nonce: bigint;
1087
+ factory?: Address;
1088
+ factoryData?: viem.Hex;
1089
+ callData: viem.Hex;
1090
+ callGasLimit: bigint;
1091
+ verificationGasLimit: bigint;
1092
+ preVerificationGas: bigint;
1093
+ maxFeePerGas: bigint;
1094
+ maxPriorityFeePerGas: bigint;
1095
+ paymaster?: Address;
1096
+ paymasterVerificationGasLimit?: bigint;
1097
+ paymasterPostOpGasLimit?: bigint;
1098
+ paymasterData?: viem.Hex;
1099
+ signature: viem.Hex;
1100
+ initCode?: never;
1101
+ paymasterAndData?: never;
1102
+ };
1103
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1104
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
1105
+ } | ((args: {
1106
+ userOperation: {
1107
+ sender: Address;
1108
+ nonce: bigint;
1109
+ factory?: Address;
1110
+ factoryData?: viem.Hex;
1111
+ callData: viem.Hex;
1112
+ callGasLimit: bigint;
1113
+ verificationGasLimit: bigint;
1114
+ preVerificationGas: bigint;
1115
+ maxFeePerGas: bigint;
1116
+ maxPriorityFeePerGas: bigint;
1117
+ paymaster?: Address;
1118
+ paymasterVerificationGasLimit?: bigint;
1119
+ paymasterPostOpGasLimit?: bigint;
1120
+ paymasterData?: viem.Hex;
1121
+ signature: viem.Hex;
1122
+ initCode?: never;
1123
+ paymasterAndData?: never;
1124
+ };
1125
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1126
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1127
+ }) => Promise<viem.Hash>;
969
1128
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
970
1129
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
971
1130
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -1205,7 +1364,60 @@ declare const useAccount: () => {
1205
1364
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1206
1365
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1207
1366
  }) => Promise<viem.Hash>;
1208
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
1367
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
1368
+ passKeyName?: string;
1369
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
1370
+ rpcUrl?: string;
1371
+ middleware?: {
1372
+ gasPrice?: () => Promise<{
1373
+ maxFeePerGas: bigint;
1374
+ maxPriorityFeePerGas: bigint;
1375
+ }>;
1376
+ sponsorUserOperation?: ((args: {
1377
+ userOperation: {
1378
+ sender: Address;
1379
+ nonce: bigint;
1380
+ factory?: Address;
1381
+ factoryData?: viem.Hex;
1382
+ callData: viem.Hex;
1383
+ callGasLimit: bigint;
1384
+ verificationGasLimit: bigint;
1385
+ preVerificationGas: bigint;
1386
+ maxFeePerGas: bigint;
1387
+ maxPriorityFeePerGas: bigint;
1388
+ paymaster?: Address;
1389
+ paymasterVerificationGasLimit?: bigint;
1390
+ paymasterPostOpGasLimit?: bigint;
1391
+ paymasterData?: viem.Hex;
1392
+ signature: viem.Hex;
1393
+ initCode?: never;
1394
+ paymasterAndData?: never;
1395
+ };
1396
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1397
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
1398
+ } | ((args: {
1399
+ userOperation: {
1400
+ sender: Address;
1401
+ nonce: bigint;
1402
+ factory?: Address;
1403
+ factoryData?: viem.Hex;
1404
+ callData: viem.Hex;
1405
+ callGasLimit: bigint;
1406
+ verificationGasLimit: bigint;
1407
+ preVerificationGas: bigint;
1408
+ maxFeePerGas: bigint;
1409
+ maxPriorityFeePerGas: bigint;
1410
+ paymaster?: Address;
1411
+ paymasterVerificationGasLimit?: bigint;
1412
+ paymasterPostOpGasLimit?: bigint;
1413
+ paymasterData?: viem.Hex;
1414
+ signature: viem.Hex;
1415
+ initCode?: never;
1416
+ paymasterAndData?: never;
1417
+ };
1418
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1419
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1420
+ }) => Promise<viem.Hash>;
1209
1421
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
1210
1422
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
1211
1423
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -2050,7 +2262,7 @@ type UseSignMessageReturn = QueryResultType & {
2050
2262
  };
2051
2263
  declare function useSignMessage(): UseSignMessageReturn;
2052
2264
 
2053
- type UseSetUpRecoveryModuleProps = SetUpRecoveryModuleParams;
2265
+ type UseSetUpRecoveryModuleProps = SetUpRecoveryModuleParams<EntryPoint>;
2054
2266
  type SetUpRecoveryModuleMutate = (variables: UseSetUpRecoveryModuleProps) => void;
2055
2267
  type SetUpRecoveryModuleMutateAsync = (variables: UseSetUpRecoveryModuleProps) => Promise<Hex>;
2056
2268
  type UseSetUpRecoveryModuleReturn = QueryResultType & {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as viem_chains from 'viem/chains';
2
2
  import { Prettify } from 'viem/chains';
3
3
  import * as permissionless_types_entrypoint from 'permissionless/types/entrypoint';
4
- import { ENTRYPOINT_ADDRESS_V07_TYPE } from 'permissionless/types/entrypoint';
4
+ import { EntryPoint, ENTRYPOINT_ADDRESS_V07_TYPE } from 'permissionless/types/entrypoint';
5
5
  import * as permissionless_actions_smartAccount from 'permissionless/actions/smartAccount';
6
6
  import * as permissionless from 'permissionless';
7
7
  import * as permissionless__types_accounts from 'permissionless/_types/accounts';
@@ -501,7 +501,60 @@ declare const useAccount: () => {
501
501
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
502
502
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
503
503
  }) => Promise<viem.Hash>;
504
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
504
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
505
+ passKeyName?: string;
506
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
507
+ rpcUrl?: string;
508
+ middleware?: {
509
+ gasPrice?: () => Promise<{
510
+ maxFeePerGas: bigint;
511
+ maxPriorityFeePerGas: bigint;
512
+ }>;
513
+ sponsorUserOperation?: ((args: {
514
+ userOperation: {
515
+ sender: Address;
516
+ nonce: bigint;
517
+ factory?: Address;
518
+ factoryData?: viem.Hex;
519
+ callData: viem.Hex;
520
+ callGasLimit: bigint;
521
+ verificationGasLimit: bigint;
522
+ preVerificationGas: bigint;
523
+ maxFeePerGas: bigint;
524
+ maxPriorityFeePerGas: bigint;
525
+ paymaster?: Address;
526
+ paymasterVerificationGasLimit?: bigint;
527
+ paymasterPostOpGasLimit?: bigint;
528
+ paymasterData?: viem.Hex;
529
+ signature: viem.Hex;
530
+ initCode?: never;
531
+ paymasterAndData?: never;
532
+ };
533
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
534
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
535
+ } | ((args: {
536
+ userOperation: {
537
+ sender: Address;
538
+ nonce: bigint;
539
+ factory?: Address;
540
+ factoryData?: viem.Hex;
541
+ callData: viem.Hex;
542
+ callGasLimit: bigint;
543
+ verificationGasLimit: bigint;
544
+ preVerificationGas: bigint;
545
+ maxFeePerGas: bigint;
546
+ maxPriorityFeePerGas: bigint;
547
+ paymaster?: Address;
548
+ paymasterVerificationGasLimit?: bigint;
549
+ paymasterPostOpGasLimit?: bigint;
550
+ paymasterData?: viem.Hex;
551
+ signature: viem.Hex;
552
+ initCode?: never;
553
+ paymasterAndData?: never;
554
+ };
555
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
556
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
557
+ }) => Promise<viem.Hash>;
505
558
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
506
559
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
507
560
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -739,7 +792,60 @@ declare const useAccount: () => {
739
792
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
740
793
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
741
794
  }) => Promise<viem.Hash>;
742
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
795
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
796
+ passKeyName?: string;
797
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
798
+ rpcUrl?: string;
799
+ middleware?: {
800
+ gasPrice?: () => Promise<{
801
+ maxFeePerGas: bigint;
802
+ maxPriorityFeePerGas: bigint;
803
+ }>;
804
+ sponsorUserOperation?: ((args: {
805
+ userOperation: {
806
+ sender: Address;
807
+ nonce: bigint;
808
+ factory?: Address;
809
+ factoryData?: viem.Hex;
810
+ callData: viem.Hex;
811
+ callGasLimit: bigint;
812
+ verificationGasLimit: bigint;
813
+ preVerificationGas: bigint;
814
+ maxFeePerGas: bigint;
815
+ maxPriorityFeePerGas: bigint;
816
+ paymaster?: Address;
817
+ paymasterVerificationGasLimit?: bigint;
818
+ paymasterPostOpGasLimit?: bigint;
819
+ paymasterData?: viem.Hex;
820
+ signature: viem.Hex;
821
+ initCode?: never;
822
+ paymasterAndData?: never;
823
+ };
824
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
825
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
826
+ } | ((args: {
827
+ userOperation: {
828
+ sender: Address;
829
+ nonce: bigint;
830
+ factory?: Address;
831
+ factoryData?: viem.Hex;
832
+ callData: viem.Hex;
833
+ callGasLimit: bigint;
834
+ verificationGasLimit: bigint;
835
+ preVerificationGas: bigint;
836
+ maxFeePerGas: bigint;
837
+ maxPriorityFeePerGas: bigint;
838
+ paymaster?: Address;
839
+ paymasterVerificationGasLimit?: bigint;
840
+ paymasterPostOpGasLimit?: bigint;
841
+ paymasterData?: viem.Hex;
842
+ signature: viem.Hex;
843
+ initCode?: never;
844
+ paymasterAndData?: never;
845
+ };
846
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
847
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
848
+ }) => Promise<viem.Hash>;
743
849
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
744
850
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
745
851
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -965,7 +1071,60 @@ declare const useAccount: () => {
965
1071
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
966
1072
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
967
1073
  }) => Promise<viem.Hash>;
968
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
1074
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
1075
+ passKeyName?: string;
1076
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
1077
+ rpcUrl?: string;
1078
+ middleware?: {
1079
+ gasPrice?: () => Promise<{
1080
+ maxFeePerGas: bigint;
1081
+ maxPriorityFeePerGas: bigint;
1082
+ }>;
1083
+ sponsorUserOperation?: ((args: {
1084
+ userOperation: {
1085
+ sender: Address;
1086
+ nonce: bigint;
1087
+ factory?: Address;
1088
+ factoryData?: viem.Hex;
1089
+ callData: viem.Hex;
1090
+ callGasLimit: bigint;
1091
+ verificationGasLimit: bigint;
1092
+ preVerificationGas: bigint;
1093
+ maxFeePerGas: bigint;
1094
+ maxPriorityFeePerGas: bigint;
1095
+ paymaster?: Address;
1096
+ paymasterVerificationGasLimit?: bigint;
1097
+ paymasterPostOpGasLimit?: bigint;
1098
+ paymasterData?: viem.Hex;
1099
+ signature: viem.Hex;
1100
+ initCode?: never;
1101
+ paymasterAndData?: never;
1102
+ };
1103
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1104
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
1105
+ } | ((args: {
1106
+ userOperation: {
1107
+ sender: Address;
1108
+ nonce: bigint;
1109
+ factory?: Address;
1110
+ factoryData?: viem.Hex;
1111
+ callData: viem.Hex;
1112
+ callGasLimit: bigint;
1113
+ verificationGasLimit: bigint;
1114
+ preVerificationGas: bigint;
1115
+ maxFeePerGas: bigint;
1116
+ maxPriorityFeePerGas: bigint;
1117
+ paymaster?: Address;
1118
+ paymasterVerificationGasLimit?: bigint;
1119
+ paymasterPostOpGasLimit?: bigint;
1120
+ paymasterData?: viem.Hex;
1121
+ signature: viem.Hex;
1122
+ initCode?: never;
1123
+ paymasterAndData?: never;
1124
+ };
1125
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1126
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1127
+ }) => Promise<viem.Hash>;
969
1128
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
970
1129
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
971
1130
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -1205,7 +1364,60 @@ declare const useAccount: () => {
1205
1364
  entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1206
1365
  }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1207
1366
  }) => Promise<viem.Hash>;
1208
- setUpRecoveryModule: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.SetUpRecoveryModuleParams>) => Promise<viem.Hex>>[1]) => Promise<viem.Hash>;
1367
+ setUpRecoveryModule: <TTransport extends viem.Transport>(args: {
1368
+ passKeyName?: string;
1369
+ webAuthnOptions?: _cometh_connect_sdk_4337.webAuthnOptions;
1370
+ rpcUrl?: string;
1371
+ middleware?: {
1372
+ gasPrice?: () => Promise<{
1373
+ maxFeePerGas: bigint;
1374
+ maxPriorityFeePerGas: bigint;
1375
+ }>;
1376
+ sponsorUserOperation?: ((args: {
1377
+ userOperation: {
1378
+ sender: Address;
1379
+ nonce: bigint;
1380
+ factory?: Address;
1381
+ factoryData?: viem.Hex;
1382
+ callData: viem.Hex;
1383
+ callGasLimit: bigint;
1384
+ verificationGasLimit: bigint;
1385
+ preVerificationGas: bigint;
1386
+ maxFeePerGas: bigint;
1387
+ maxPriorityFeePerGas: bigint;
1388
+ paymaster?: Address;
1389
+ paymasterVerificationGasLimit?: bigint;
1390
+ paymasterPostOpGasLimit?: bigint;
1391
+ paymasterData?: viem.Hex;
1392
+ signature: viem.Hex;
1393
+ initCode?: never;
1394
+ paymasterAndData?: never;
1395
+ };
1396
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1397
+ }) => Promise<permissionless_actions_smartAccount.SponsorUserOperationReturnType<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>) | undefined;
1398
+ } | ((args: {
1399
+ userOperation: {
1400
+ sender: Address;
1401
+ nonce: bigint;
1402
+ factory?: Address;
1403
+ factoryData?: viem.Hex;
1404
+ callData: viem.Hex;
1405
+ callGasLimit: bigint;
1406
+ verificationGasLimit: bigint;
1407
+ preVerificationGas: bigint;
1408
+ maxFeePerGas: bigint;
1409
+ maxPriorityFeePerGas: bigint;
1410
+ paymaster?: Address;
1411
+ paymasterVerificationGasLimit?: bigint;
1412
+ paymasterPostOpGasLimit?: bigint;
1413
+ paymasterData?: viem.Hex;
1414
+ signature: viem.Hex;
1415
+ initCode?: never;
1416
+ paymasterAndData?: never;
1417
+ };
1418
+ entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
1419
+ }) => Promise<permissionless.UserOperation<permissionless_types_entrypoint.GetEntryPointVersion<"0x0000000071727De22E5E9d8BAf0edAc6f37da032">>>) | undefined;
1420
+ }) => Promise<viem.Hash>;
1209
1421
  isRecoveryActive: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.IsRecoveryActiveParams>) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>>[1]) => Promise<_cometh_connect_sdk_4337.IsRecoveryActiveReturnType>;
1210
1422
  getRecoveryRequest: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args?: permissionless__types_types.Prettify<_cometh_connect_sdk_4337.GetRecoveryRequestParams>) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>>[1]) => Promise<_cometh_connect_sdk_4337.RecoveryParamsResponse | undefined>;
1211
1423
  verifySignature: <TTransport extends viem.Transport>(args: Parameters<(client: viem.Client<TTransport, viem.Chain, _cometh_connect_sdk_4337.SafeSmartAccount<"0x0000000071727De22E5E9d8BAf0edAc6f37da032", viem.Transport, viem.Chain>>, args: permissionless__types_types.Prettify<{
@@ -2050,7 +2262,7 @@ type UseSignMessageReturn = QueryResultType & {
2050
2262
  };
2051
2263
  declare function useSignMessage(): UseSignMessageReturn;
2052
2264
 
2053
- type UseSetUpRecoveryModuleProps = SetUpRecoveryModuleParams;
2265
+ type UseSetUpRecoveryModuleProps = SetUpRecoveryModuleParams<EntryPoint>;
2054
2266
  type SetUpRecoveryModuleMutate = (variables: UseSetUpRecoveryModuleProps) => void;
2055
2267
  type SetUpRecoveryModuleMutateAsync = (variables: UseSetUpRecoveryModuleProps) => Promise<Hex>;
2056
2268
  type UseSetUpRecoveryModuleReturn = QueryResultType & {
package/dist/index.js CHANGED
@@ -2043,7 +2043,13 @@ function useSetUpRecovery() {
2043
2043
  if (!smartAccountClient) {
2044
2044
  throw new Error("No smart account found");
2045
2045
  }
2046
- return smartAccountClient.setUpRecoveryModule({ ...variables });
2046
+ return smartAccountClient.setUpRecoveryModule({
2047
+ passKeyName: variables.passKeyName,
2048
+ rpcUrl: variables.rpcUrl,
2049
+ webAuthnOptions: variables.webAuthnOptions,
2050
+ // biome-ignore lint/suspicious/noExplicitAny: TODO: remove any
2051
+ middleware: variables.middleware
2052
+ });
2047
2053
  }
2048
2054
  },
2049
2055
  queryClient
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://twitter.com/slovaye"
8
8
  }
9
9
  ],
10
- "version": "0.0.2-dev.1",
10
+ "version": "0.0.4",
11
11
  "description": "React hooks Connect 4337",
12
12
  "repository": "https://github.com/cometh-game/connect-sdk-4337.git",
13
13
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "typescript": "^5"
59
59
  },
60
60
  "dependencies": {
61
- "@cometh/connect-sdk-4337": "^0.1.2-dev.2",
61
+ "@cometh/connect-sdk-4337": "0.1.4",
62
62
  "permissionless": "^0.1.31"
63
63
  }
64
64
  }