@etherspot/remote-signer
Version:
Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler
1 lines • 3.05 kB
Source Map (JSON)
{"version":3,"sources":["../../src/sdk/types/user-operation-types.ts"],"sourcesContent":["import { AccountSource, Address, CustomSource, Hex, InvalidAddressErrorType, IsAddressErrorType, JsonRpcAccount, LocalAccount } from \"viem\";\nimport { BigNumber, BigNumberish } from \"./bignumber\";\nimport { UserOperation } from \"../common\";\nimport { ErrorType } from \"node_modules/viem/_types/errors/utils\";\nimport { BytesLike } from \"./common-types\";\n\nexport type AccountType = 'erc7579-implementation'\n\nexport type PromiseOrValue<T> = T | Promise<T>;\n\nexport type BaseAccountUserOperationStruct = {\n sender: PromiseOrValue<string>;\n nonce: PromiseOrValue<BigNumberish>;\n initCode: PromiseOrValue<BytesLike>;\n callData: PromiseOrValue<BytesLike>;\n accountGasLimits: PromiseOrValue<BytesLike>;\n preVerificationGas: PromiseOrValue<BigNumberish>;\n gasFees: PromiseOrValue<BytesLike>;\n paymasterAndData: PromiseOrValue<BytesLike>;\n signature: PromiseOrValue<BytesLike>;\n};\n\nexport type UserOperationStruct = {\n sender: PromiseOrValue<string>;\n nonce: PromiseOrValue<BigNumberish>;\n initCode: PromiseOrValue<BytesLike>;\n callData: PromiseOrValue<BytesLike>;\n callGasLimit: PromiseOrValue<BigNumberish>;\n verificationGasLimit: PromiseOrValue<BigNumberish>;\n preVerificationGas: PromiseOrValue<BigNumberish>;\n maxFeePerGas: PromiseOrValue<BigNumberish>;\n maxPriorityFeePerGas: PromiseOrValue<BigNumberish>;\n paymasterAndData: PromiseOrValue<BytesLike>;\n signature: PromiseOrValue<BytesLike>;\n};\n\nexport interface FeeData {\n lastBaseFeePerGas: null | BigNumber;\n maxFeePerGas: null | BigNumber;\n maxPriorityFeePerGas: null | BigNumber;\n gasPrice: null | BigNumber;\n}\n\n// Extended LocalAccount type with a custom function\nexport type ExtendedLocalAccount<\n source extends string = string,\n address extends Address = Address,\n> = LocalAccount<source, address> & {\n //signUserOp: () => void\n signUserOpWithRemoteSigner(userOp: UserOperation) : Promise<UserOperation>\n}\n\n\nexport type GetAccountReturnType<accountSource extends AccountSource> =\n | (accountSource extends Address ? JsonRpcAccount : never)\n | (accountSource extends CustomSource ? LocalAccount : never)\n\nexport type ToAccountErrorType =\n | InvalidAddressErrorType\n | IsAddressErrorType\n | ErrorType\n\n\n export type InitialModules = {\n validators: Module[]\n executors: Module[]\n hooks: Module[]\n fallbacks: Module[]\n }\n \n export type ModuleType = 'validator' | 'executor' | 'fallback' | 'hook'\n \n export type Module = {\n module: Address\n data?: Hex\n additionalContext?: Hex\n type: ModuleType\n }\n \n export type ModuleTypeIds = {\n [index in ModuleType]: number\n }\n \n export const moduleTypeIds: ModuleTypeIds = {\n validator: 1,\n executor: 2,\n fallback: 3,\n hook: 4,\n }\n "],"mappings":";AAmFS,IAAM,gBAA+B;AAAA,EAC1C,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AACR;","names":[]}