@zerodev/sdk 5.3.25 → 5.4.0-beta.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.
- package/_cjs/accounts/index.js.map +1 -1
- package/_cjs/accounts/kernel/createKernelAccount.js +171 -199
- package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js +13 -9
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +18 -17
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js +12 -8
- package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/common/accountMetadata.js.map +1 -1
- package/_cjs/accounts/kernel/utils/common/getActionSelector.js +2 -2
- package/_cjs/accounts/kernel/utils/common/getActionSelector.js.map +1 -1
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +2 -2
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -1
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +1 -1
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -1
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +1 -1
- package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -1
- package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +2 -2
- package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -1
- package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +2 -2
- package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
- package/_cjs/accounts/kernel/v1/createKernelAccountV1.js +81 -94
- package/_cjs/accounts/kernel/v1/createKernelAccountV1.js.map +1 -1
- package/_cjs/accounts/kernel/v2/createKernelAccountV0_2.js +104 -110
- package/_cjs/accounts/kernel/v2/createKernelAccountV0_2.js.map +1 -1
- package/_cjs/accounts/utils/getCustomNonceKeyFromString.js +2 -4
- package/_cjs/accounts/utils/getCustomNonceKeyFromString.js.map +1 -1
- package/_cjs/accounts/utils/index.js +1 -7
- package/_cjs/accounts/utils/index.js.map +1 -1
- package/_cjs/accounts/utils/multisend.js.map +1 -1
- package/_cjs/accounts/utils/toKernelPluginManager.js +14 -16
- package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_cjs/actions/account-client/changeSudoValidator.js +27 -21
- package/_cjs/actions/account-client/changeSudoValidator.js.map +1 -1
- package/_cjs/actions/account-client/getKernelV3ModuleCurrentNonce.js +8 -6
- package/_cjs/actions/account-client/getKernelV3ModuleCurrentNonce.js.map +1 -1
- package/_cjs/actions/account-client/invalidateNonce.js +20 -15
- package/_cjs/actions/account-client/invalidateNonce.js.map +1 -1
- package/_cjs/actions/account-client/sendTransaction.js +42 -0
- package/_cjs/actions/account-client/sendTransaction.js.map +1 -0
- package/_cjs/actions/account-client/signMessage.js +15 -0
- package/_cjs/actions/account-client/signMessage.js.map +1 -0
- package/_cjs/actions/account-client/signTypedData.js +32 -0
- package/_cjs/actions/account-client/signTypedData.js.map +1 -0
- package/_cjs/actions/account-client/signUserOperation.js +7 -5
- package/_cjs/actions/account-client/signUserOperation.js.map +1 -1
- package/_cjs/actions/account-client/uninstallPlugin.js +13 -12
- package/_cjs/actions/account-client/uninstallPlugin.js.map +1 -1
- package/_cjs/actions/account-client/writeContract.js +21 -0
- package/_cjs/actions/account-client/writeContract.js.map +1 -0
- package/_cjs/actions/index.js +13 -3
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/paymaster/estimateGasInERC20.js +4 -4
- package/_cjs/actions/paymaster/estimateGasInERC20.js.map +1 -1
- package/_cjs/actions/paymaster/sponsorUserOperation.js +4 -6
- package/_cjs/actions/paymaster/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/public/getAccountNonce.js +38 -0
- package/_cjs/actions/public/getAccountNonce.js.map +1 -0
- package/_cjs/actions/public/getSenderAddress.js +166 -0
- package/_cjs/actions/public/getSenderAddress.js.map +1 -0
- package/_cjs/actions/public/index.js +8 -0
- package/_cjs/actions/public/index.js.map +1 -0
- package/_cjs/clients/decorators/kernel.js +17 -27
- package/_cjs/clients/decorators/kernel.js.map +1 -1
- package/_cjs/clients/fallbackKernelAccountClient.js.map +1 -1
- package/_cjs/clients/kernelAccountClient.js +27 -45
- package/_cjs/clients/kernelAccountClient.js.map +1 -1
- package/_cjs/clients/paymasterClient.js +7 -18
- package/_cjs/clients/paymasterClient.js.map +1 -1
- package/_cjs/errors/index.js +18 -0
- package/_cjs/errors/index.js.map +1 -0
- package/_cjs/gasTokenAddresses.js +2 -1
- package/_cjs/gasTokenAddresses.js.map +1 -1
- package/_cjs/index.js.map +1 -1
- package/_cjs/providers/KernelEIP1193Provider.js.map +1 -1
- package/_cjs/types/kernel.js.map +1 -1
- package/_cjs/utils.js +27 -7
- package/_cjs/utils.js.map +1 -1
- package/_esm/accounts/index.js.map +1 -1
- package/_esm/accounts/kernel/createKernelAccount.js +181 -217
- package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js +13 -9
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +18 -17
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js +12 -8
- package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -1
- package/_esm/accounts/kernel/utils/common/accountMetadata.js.map +1 -1
- package/_esm/accounts/kernel/utils/common/getActionSelector.js +2 -2
- package/_esm/accounts/kernel/utils/common/getActionSelector.js.map +1 -1
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +2 -2
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -1
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +1 -1
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -1
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +1 -1
- package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -1
- package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +2 -2
- package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -1
- package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +2 -2
- package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
- package/_esm/accounts/kernel/v1/createKernelAccountV1.js +91 -98
- package/_esm/accounts/kernel/v1/createKernelAccountV1.js.map +1 -1
- package/_esm/accounts/kernel/v2/createKernelAccountV0_2.js +105 -118
- package/_esm/accounts/kernel/v2/createKernelAccountV0_2.js.map +1 -1
- package/_esm/accounts/utils/getCustomNonceKeyFromString.js +2 -4
- package/_esm/accounts/utils/getCustomNonceKeyFromString.js.map +1 -1
- package/_esm/accounts/utils/index.js +0 -5
- package/_esm/accounts/utils/index.js.map +1 -1
- package/_esm/accounts/utils/multisend.js.map +1 -1
- package/_esm/accounts/utils/toKernelPluginManager.js +14 -16
- package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_esm/actions/account-client/changeSudoValidator.js +23 -17
- package/_esm/actions/account-client/changeSudoValidator.js.map +1 -1
- package/_esm/actions/account-client/getKernelV3ModuleCurrentNonce.js +8 -6
- package/_esm/actions/account-client/getKernelV3ModuleCurrentNonce.js.map +1 -1
- package/_esm/actions/account-client/invalidateNonce.js +20 -15
- package/_esm/actions/account-client/invalidateNonce.js.map +1 -1
- package/_esm/actions/account-client/sendTransaction.js +85 -0
- package/_esm/actions/account-client/sendTransaction.js.map +1 -0
- package/_esm/actions/account-client/signMessage.js +58 -0
- package/_esm/actions/account-client/signMessage.js.map +1 -0
- package/_esm/actions/account-client/signTypedData.js +127 -0
- package/_esm/actions/account-client/signTypedData.js.map +1 -0
- package/_esm/actions/account-client/signUserOperation.js +7 -5
- package/_esm/actions/account-client/signUserOperation.js.map +1 -1
- package/_esm/actions/account-client/uninstallPlugin.js +10 -9
- package/_esm/actions/account-client/uninstallPlugin.js.map +1 -1
- package/_esm/actions/account-client/writeContract.js +18 -0
- package/_esm/actions/account-client/writeContract.js.map +1 -0
- package/_esm/actions/index.js +6 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/paymaster/estimateGasInERC20.js +3 -3
- package/_esm/actions/paymaster/estimateGasInERC20.js.map +1 -1
- package/_esm/actions/paymaster/sponsorUserOperation.js +3 -5
- package/_esm/actions/paymaster/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/public/getAccountNonce.js +61 -0
- package/_esm/actions/public/getAccountNonce.js.map +1 -0
- package/_esm/actions/public/getSenderAddress.js +191 -0
- package/_esm/actions/public/getSenderAddress.js.map +1 -0
- package/_esm/actions/public/index.js +3 -0
- package/_esm/actions/public/index.js.map +1 -0
- package/_esm/clients/decorators/kernel.js +19 -28
- package/_esm/clients/decorators/kernel.js.map +1 -1
- package/_esm/clients/fallbackKernelAccountClient.js.map +1 -1
- package/_esm/clients/kernelAccountClient.js +28 -46
- package/_esm/clients/kernelAccountClient.js.map +1 -1
- package/_esm/clients/paymasterClient.js +8 -19
- package/_esm/clients/paymasterClient.js.map +1 -1
- package/_esm/errors/index.js +14 -0
- package/_esm/errors/index.js.map +1 -0
- package/_esm/gasTokenAddresses.js +2 -1
- package/_esm/gasTokenAddresses.js.map +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/providers/KernelEIP1193Provider.js.map +1 -1
- package/_esm/types/kernel.js.map +1 -1
- package/_esm/utils.js +29 -7
- package/_esm/utils.js.map +1 -1
- package/_types/accounts/index.d.ts +2 -2
- package/_types/accounts/index.d.ts.map +1 -1
- package/_types/accounts/kernel/createKernelAccount.d.ts +21 -18
- package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts +8 -3
- package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts +3 -2
- package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts +0 -1
- package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts +8 -3
- package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts +3 -2
- package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/common/accountMetadata.d.ts +2 -2
- package/_types/accounts/kernel/utils/common/accountMetadata.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/common/getActionSelector.d.ts +1 -1
- package/_types/accounts/kernel/utils/common/getActionSelector.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts +1 -1
- package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts +1 -1
- package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.d.ts +2 -3
- package/_types/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.d.ts +4 -5
- package/_types/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.d.ts +2 -3
- package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/types.d.ts +2 -2
- package/_types/accounts/kernel/utils/types.d.ts.map +1 -1
- package/_types/accounts/kernel/v1/createKernelAccountV1.d.ts +18 -9
- package/_types/accounts/kernel/v1/createKernelAccountV1.d.ts.map +1 -1
- package/_types/accounts/kernel/v2/createKernelAccountV0_2.d.ts +9 -7
- package/_types/accounts/kernel/v2/createKernelAccountV0_2.d.ts.map +1 -1
- package/_types/accounts/utils/getCustomNonceKeyFromString.d.ts +2 -2
- package/_types/accounts/utils/getCustomNonceKeyFromString.d.ts.map +1 -1
- package/_types/accounts/utils/index.d.ts +0 -2
- package/_types/accounts/utils/index.d.ts.map +1 -1
- package/_types/accounts/utils/multisend.d.ts +2 -2
- package/_types/accounts/utils/multisend.d.ts.map +1 -1
- package/_types/accounts/utils/toKernelPluginManager.d.ts +4 -4
- package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
- package/_types/actions/account-client/changeSudoValidator.d.ts +5 -11
- package/_types/actions/account-client/changeSudoValidator.d.ts.map +1 -1
- package/_types/actions/account-client/getKernelV3ModuleCurrentNonce.d.ts +2 -5
- package/_types/actions/account-client/getKernelV3ModuleCurrentNonce.d.ts.map +1 -1
- package/_types/actions/account-client/invalidateNonce.d.ts +4 -6
- package/_types/actions/account-client/invalidateNonce.d.ts.map +1 -1
- package/_types/actions/account-client/sendTransaction.d.ts +50 -0
- package/_types/actions/account-client/sendTransaction.d.ts.map +1 -0
- package/_types/actions/account-client/signMessage.d.ts +50 -0
- package/_types/actions/account-client/signMessage.d.ts.map +1 -0
- package/_types/actions/account-client/signTypedData.d.ts +104 -0
- package/_types/actions/account-client/signTypedData.d.ts.map +1 -0
- package/_types/actions/account-client/signUserOperation.d.ts +4 -6
- package/_types/actions/account-client/signUserOperation.d.ts.map +1 -1
- package/_types/actions/account-client/uninstallPlugin.d.ts +5 -7
- package/_types/actions/account-client/uninstallPlugin.d.ts.map +1 -1
- package/_types/actions/account-client/writeContract.d.ts +4 -0
- package/_types/actions/account-client/writeContract.d.ts.map +1 -0
- package/_types/actions/index.d.ts +6 -1
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/paymaster/estimateGasInERC20.d.ts +1305 -4
- package/_types/actions/paymaster/estimateGasInERC20.d.ts.map +1 -1
- package/_types/actions/paymaster/sponsorUserOperation.d.ts +1314 -10
- package/_types/actions/paymaster/sponsorUserOperation.d.ts.map +1 -1
- package/_types/actions/public/getAccountNonce.d.ts +34 -0
- package/_types/actions/public/getAccountNonce.d.ts.map +1 -0
- package/_types/actions/public/getSenderAddress.d.ts +46 -0
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -0
- package/_types/actions/public/index.d.ts +3 -0
- package/_types/actions/public/index.d.ts.map +1 -0
- package/_types/clients/decorators/kernel.d.ts +774 -20
- package/_types/clients/decorators/kernel.d.ts.map +1 -1
- package/_types/clients/fallbackKernelAccountClient.d.ts +255 -4
- package/_types/clients/fallbackKernelAccountClient.d.ts.map +1 -1
- package/_types/clients/kernelAccountClient.d.ts +34 -36
- package/_types/clients/kernelAccountClient.d.ts.map +1 -1
- package/_types/clients/paymasterClient.d.ts +10 -24
- package/_types/clients/paymasterClient.d.ts.map +1 -1
- package/_types/errors/index.d.ts +7 -0
- package/_types/errors/index.d.ts.map +1 -0
- package/_types/gasTokenAddresses.d.ts +1 -1
- package/_types/gasTokenAddresses.d.ts.map +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/providers/KernelEIP1193Provider.d.ts +3 -4
- package/_types/providers/KernelEIP1193Provider.d.ts.map +1 -1
- package/_types/types/index.d.ts +1 -0
- package/_types/types/index.d.ts.map +1 -1
- package/_types/types/kernel.d.ts +25 -27
- package/_types/types/kernel.d.ts.map +1 -1
- package/_types/utils.d.ts +1310 -4
- package/_types/utils.d.ts.map +1 -1
- package/accounts/index.ts +5 -2
- package/accounts/kernel/createKernelAccount.ts +312 -357
- package/accounts/kernel/utils/account/ep0_6/encodeCallData.ts +22 -12
- package/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.ts +6 -3
- package/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.ts +22 -19
- package/accounts/kernel/utils/account/ep0_7/encodeCallData.ts +21 -11
- package/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.ts +6 -3
- package/accounts/kernel/utils/common/accountMetadata.ts +2 -7
- package/accounts/kernel/utils/common/getActionSelector.ts +3 -3
- package/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.ts +3 -3
- package/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.ts +1 -1
- package/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.ts +1 -1
- package/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.ts +3 -3
- package/accounts/kernel/utils/ep0_7/encodeExecuteCall.ts +2 -2
- package/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.ts +2 -8
- package/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts +4 -10
- package/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts +2 -8
- package/accounts/kernel/utils/types.ts +2 -2
- package/accounts/kernel/v1/createKernelAccountV1.ts +147 -174
- package/accounts/kernel/v2/createKernelAccountV0_2.ts +135 -179
- package/accounts/utils/getCustomNonceKeyFromString.ts +3 -6
- package/accounts/utils/index.ts +0 -9
- package/accounts/utils/multisend.ts +5 -2
- package/accounts/utils/toKernelPluginManager.ts +23 -27
- package/actions/account-client/changeSudoValidator.ts +61 -85
- package/actions/account-client/getKernelV3ModuleCurrentNonce.ts +12 -51
- package/actions/account-client/invalidateNonce.ts +38 -67
- package/actions/account-client/sendTransaction.ts +134 -0
- package/actions/account-client/signMessage.ts +75 -0
- package/actions/account-client/signTypedData.ts +159 -0
- package/actions/account-client/signUserOperation.ts +31 -63
- package/actions/account-client/uninstallPlugin.ts +35 -54
- package/actions/account-client/writeContract.ts +72 -0
- package/actions/index.ts +15 -6
- package/actions/paymaster/estimateGasInERC20.ts +12 -8
- package/actions/paymaster/sponsorUserOperation.ts +52 -50
- package/actions/public/getAccountNonce.ts +77 -0
- package/actions/public/getSenderAddress.ts +276 -0
- package/actions/public/index.ts +9 -0
- package/clients/decorators/kernel.ts +363 -159
- package/clients/fallbackKernelAccountClient.ts +9 -11
- package/clients/kernelAccountClient.ts +142 -104
- package/clients/paymasterClient.ts +69 -43
- package/errors/index.ts +17 -0
- package/gasTokenAddresses.ts +3 -2
- package/index.ts +5 -2
- package/package.json +2 -3
- package/providers/KernelEIP1193Provider.ts +4 -7
- package/types/index.ts +2 -0
- package/types/kernel.ts +64 -63
- package/utils.ts +41 -13
- package/_cjs/actions/paymaster/sponsorUserOperationEip7677.js +0 -59
- package/_cjs/actions/paymaster/sponsorUserOperationEip7677.js.map +0 -1
- package/_esm/actions/paymaster/sponsorUserOperationEip7677.js +0 -58
- package/_esm/actions/paymaster/sponsorUserOperationEip7677.js.map +0 -1
- package/_types/actions/paymaster/sponsorUserOperationEip7677.d.ts +0 -16
- package/_types/actions/paymaster/sponsorUserOperationEip7677.d.ts.map +0 -1
- package/actions/paymaster/sponsorUserOperationEip7677.ts +0 -152
|
@@ -5,22 +5,26 @@ const constants_js_1 = require("../../../../../constants.js");
|
|
|
5
5
|
const encodeExecuteBatchCall_js_1 = require("../../ep0_7/encodeExecuteBatchCall.js");
|
|
6
6
|
const encodeExecuteDelegateCall_js_1 = require("../../ep0_7/encodeExecuteDelegateCall.js");
|
|
7
7
|
const encodeExecuteSingleCall_js_1 = require("../../ep0_7/encodeExecuteSingleCall.js");
|
|
8
|
-
const encodeCallData = async (
|
|
9
|
-
if (
|
|
10
|
-
if (
|
|
8
|
+
const encodeCallData = async (calls, callType, includeHooks) => {
|
|
9
|
+
if (calls.length > 1) {
|
|
10
|
+
if (callType === "delegatecall") {
|
|
11
11
|
throw new Error("Cannot batch delegatecall");
|
|
12
12
|
}
|
|
13
|
-
return (0, encodeExecuteBatchCall_js_1.encodeExecuteBatchCall)(
|
|
13
|
+
return (0, encodeExecuteBatchCall_js_1.encodeExecuteBatchCall)(calls, {
|
|
14
14
|
execType: constants_js_1.EXEC_TYPE.DEFAULT
|
|
15
15
|
}, includeHooks);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const call = calls.length === 0 ? undefined : calls[0];
|
|
18
|
+
if (!call) {
|
|
19
|
+
throw new Error("No calls to encode");
|
|
20
|
+
}
|
|
21
|
+
if (!callType || callType === "call") {
|
|
22
|
+
return (0, encodeExecuteSingleCall_js_1.encodeExecuteSingleCall)(call, {
|
|
19
23
|
execType: constants_js_1.EXEC_TYPE.DEFAULT
|
|
20
24
|
}, includeHooks);
|
|
21
25
|
}
|
|
22
|
-
if (
|
|
23
|
-
return (0, encodeExecuteDelegateCall_js_1.encodeExecuteDelegateCall)({ to:
|
|
26
|
+
if (callType === "delegatecall") {
|
|
27
|
+
return (0, encodeExecuteDelegateCall_js_1.encodeExecuteDelegateCall)({ to: call.to, data: call.data }, {
|
|
24
28
|
execType: constants_js_1.EXEC_TYPE.DEFAULT
|
|
25
29
|
}, includeHooks);
|
|
26
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeCallData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/encodeCallData.ts"],"names":[],"mappings":";;;AACA,8DAAuD;
|
|
1
|
+
{"version":3,"file":"encodeCallData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/encodeCallData.ts"],"names":[],"mappings":";;;AACA,8DAAuD;AAGvD,qFAA8E;AAC9E,2FAAoF;AACpF,uFAAgF;AAEzE,MAAM,cAAc,GAAG,KAAK,EAG/B,KAEI,EACJ,QAA+B,EAC/B,YAAsB,EACxB,EAAE;IACA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnB,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;QAChD,CAAC;QAED,OAAO,IAAA,kDAAsB,EACzB,KAAK,EACL;YACI,QAAQ,EAAE,wBAAS,CAAC,OAAO;SAC9B,EACD,YAAY,CACf,CAAA;IACL,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAEtD,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;IACzC,CAAC;IAGD,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACnC,OAAO,IAAA,oDAAuB,EAC1B,IAAI,EACJ;YACI,QAAQ,EAAE,wBAAS,CAAC,OAAO;SAC9B,EACD,YAAY,CACf,CAAA;IACL,CAAC;IAED,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;QAC9B,OAAO,IAAA,wDAAyB,EAC5B,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAChC;YACI,QAAQ,EAAE,wBAAS,CAAC,OAAO;SAC9B,EACD,YAAY,CACf,CAAA;IACL,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;AACxC,CAAC,CAAA;AAnDY,QAAA,cAAc,kBAmD1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeDeployCallData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/encodeDeployCallData.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"encodeDeployCallData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/encodeDeployCallData.ts"],"names":[],"mappings":";;;AAAA,+BAAuC;AAEvC,8DAA8E;AAE9E,kFAA2E;AAC3E,2FAAoF;AAG7E,MAAM,oBAAoB,GAAG,CAGhC,EAEI,EACN,EAAE;IACA,MAAM,kBAAkB,GAAqB;QACzC,EAAE,EAAE,oCAAqB;QACzB,IAAI,EAAE,IAAA,8CAAoB,EAAC,CAAC,EAAE,EAAE,IAAA,uBAAgB,EAAC,EAAE,CAAC,CAAC,CAAC;KACzD,CAAA;IACD,OAAO,IAAA,wDAAyB,EAAC,kBAAkB,EAAE;QACjD,QAAQ,EAAE,wBAAS,CAAC,OAAO;KAC9B,CAAC,CAAA;AACN,CAAC,CAAA;AAdY,QAAA,oBAAoB,wBAchC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountMetadata.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/common/accountMetadata.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"accountMetadata.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/common/accountMetadata.ts"],"names":[],"mappings":";;;AAAA,+BAMa;AACb,2DAAsD;AAEtD,2DAAoD;AAO7C,MAAM,eAAe,GAAG,KAAK,EAChC,MAAc,EACd,cAAuB,EACvB,aAAkC,EAClC,OAAgB,EACQ,EAAE;IAC1B,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAChC,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE;gBACJ;oBACI,EAAE,EAAE,cAAc;oBAClB,IAAI,EAAE,IAAA,yBAAkB,EAAC;wBACrB,GAAG,EAAE,0BAAU;wBACf,YAAY,EAAE,cAAc;qBAC/B,CAAC;iBACL;gBACD,QAAQ;aACX;SACJ,CAAC,CAAA;QACF,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClB,MAAM,OAAO,GAAG,IAAA,2BAAoB,EAAC;gBACjC,GAAG,EAAE,CAAC,GAAG,0BAAU,CAAC;gBACpB,YAAY,EAAE,cAAc;gBAC5B,IAAI,EAAE,MAAM;aACf,CAAC,CAAA;YACF,OAAO;gBACH,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;gBAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;gBACnB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;aACtB,CAAA;QACL,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC,CAAA,CAAC;IAClB,OAAO;QACH,IAAI,EAAE,0BAAW;QACjB,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;QACjE,OAAO,EAAE,MAAM,CACX,OAAO;YACH,CAAC,MAAM,CAAC,KAAK;gBACT,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBACjB,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,oBAAa,CAAC,CAAC,UAAU,EAAE,CAAC,CAC7D;KACJ,CAAA;AACL,CAAC,CAAA;AA3CY,QAAA,eAAe,mBA2C3B"}
|
|
@@ -5,10 +5,10 @@ const viem_1 = require("viem");
|
|
|
5
5
|
const KernelAccountAbi_js_1 = require("../../abi/KernelAccountAbi.js");
|
|
6
6
|
const KernelAccountAbi_js_2 = require("../../abi/kernel_v_3_0_0/KernelAccountAbi.js");
|
|
7
7
|
const getActionSelector = (entryPointVersion) => {
|
|
8
|
-
if (entryPointVersion === "
|
|
8
|
+
if (entryPointVersion === "0.6") {
|
|
9
9
|
return (0, viem_1.toFunctionSelector)((0, viem_1.getAbiItem)({ abi: KernelAccountAbi_js_1.KernelAccountAbi, name: "execute" }));
|
|
10
10
|
}
|
|
11
|
-
else if (entryPointVersion === "
|
|
11
|
+
else if (entryPointVersion === "0.7") {
|
|
12
12
|
return (0, viem_1.toFunctionSelector)((0, viem_1.getAbiItem)({ abi: KernelAccountAbi_js_2.KernelV3AccountAbi, name: "execute" }));
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getActionSelector.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/common/getActionSelector.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getActionSelector.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/common/getActionSelector.ts"],"names":[],"mappings":";;;AAAA,+BAA+D;AAE/D,uEAAgE;AAChE,sFAAiF;AAE1E,MAAM,iBAAiB,GAAG,CAC7B,iBAAoC,EACjC,EAAE;IACL,IAAI,iBAAiB,KAAK,KAAK,EAAE,CAAC;QAC9B,OAAO,IAAA,yBAAkB,EACrB,IAAA,iBAAU,EAAC,EAAE,GAAG,EAAE,sCAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CACzD,CAAA;IACL,CAAC;SAAM,IAAI,iBAAiB,KAAK,KAAK,EAAE,CAAC;QACrC,OAAO,IAAA,yBAAkB,EACrB,IAAA,iBAAU,EAAC,EAAE,GAAG,EAAE,wCAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAC3D,CAAA;IACL,CAAC;SAAM,CAAC;QACJ,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;IACtD,CAAC;AACL,CAAC,CAAA;AAdY,QAAA,iBAAiB,qBAc7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeExecuteBatchCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,sBAAsB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"encodeExecuteBatchCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,sBAAsB,GAAG,CAAC,IAAyB,EAAE,EAAE;IAChE,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,sCAAgB;QACrB,YAAY,EAAE,cAAc;QAC5B,IAAI,EAAE;YACF,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACb,OAAO;oBACH,EAAE,EAAE,GAAG,CAAC,EAAE;oBACV,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE;oBACtB,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI;iBACzB,CAAA;YACL,CAAC,CAAC;SACL;KACJ,CAAC,CAAA;AACN,CAAC,CAAA;AAdY,QAAA,sBAAsB,0BAclC"}
|
|
@@ -7,7 +7,7 @@ const encodeExecuteDelegateCall = (args) => {
|
|
|
7
7
|
return (0, viem_1.encodeFunctionData)({
|
|
8
8
|
abi: KernelAccountAbi_js_1.KernelExecuteAbi,
|
|
9
9
|
functionName: "executeDelegateCall",
|
|
10
|
-
args: [args.to, args.data]
|
|
10
|
+
args: [args.to, args.data || "0x"]
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
exports.encodeExecuteDelegateCall = encodeExecuteDelegateCall;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeExecuteDelegateCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,yBAAyB,GAAG,CAAC,IAAsB,EAAE,EAAE;IAChE,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,sCAAgB;QACrB,YAAY,EAAE,qBAAqB;QACnC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"encodeExecuteDelegateCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,yBAAyB,GAAG,CAAC,IAAsB,EAAE,EAAE;IAChE,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,sCAAgB;QACrB,YAAY,EAAE,qBAAqB;QACnC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC;KACrC,CAAC,CAAA;AACN,CAAC,CAAA;AANY,QAAA,yBAAyB,6BAMrC"}
|
|
@@ -7,7 +7,7 @@ const encodeExecuteSingleCall = (args) => {
|
|
|
7
7
|
return (0, viem_1.encodeFunctionData)({
|
|
8
8
|
abi: KernelAccountAbi_js_1.KernelExecuteAbi,
|
|
9
9
|
functionName: "execute",
|
|
10
|
-
args: [args.to, args.value, args.data, 0]
|
|
10
|
+
args: [args.to, args.value || 0n, args.data || "0x", 0]
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
exports.encodeExecuteSingleCall = encodeExecuteSingleCall;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeExecuteSingleCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,uBAAuB,GAAG,CAAC,IAAc,EAAE,EAAE;IACtD,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,sCAAgB;QACrB,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"encodeExecuteSingleCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.ts"],"names":[],"mappings":";;;AAAA,+BAAyC;AACzC,uEAAgE;AAGzD,MAAM,uBAAuB,GAAG,CAAC,IAAc,EAAE,EAAE;IACtD,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,sCAAgB;QACrB,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;KAC1D,CAAC,CAAA;AACN,CAAC,CAAA;AANY,QAAA,uBAAuB,2BAMnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeExecuteBatchCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.ts"],"names":[],"mappings":";;;AAAA,+BAA0C;AAC1C,2DAAoD;AAEpD,iEAG+B;AAExB,MAAM,sBAAsB,GAAG,CAClC,
|
|
1
|
+
{"version":3,"file":"encodeExecuteBatchCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.ts"],"names":[],"mappings":";;;AAAA,+BAA0C;AAC1C,2DAAoD;AAEpD,iEAG+B;AAExB,MAAM,sBAAsB,GAAG,CAClC,IAAyB,EACzB,OAA+C,EAC/C,YAAsB,EACxB,EAAE;IACA,MAAM,QAAQ,GAAG,IAAA,0BAAmB,EAChC;QACI;YACI,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACR;oBACI,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,SAAS;iBAClB;gBACD;oBACI,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;iBAClB;gBACD;oBACI,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,OAAO;iBAChB;aACJ;SACJ;KACJ,EACD;QACI,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,OAAO;gBACH,MAAM,EAAE,GAAG,CAAC,EAAE;gBACd,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE;gBACtB,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI;aAC7B,CAAA;QACL,CAAC,CAAC;KACL,CACJ,CAAA;IACD,OAAO,IAAA,wCAAiB,EACpB,EAAE,QAAQ,EAAE,EACZ;QACI,QAAQ,EAAE,wBAAS,CAAC,KAAK;QACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC7B,EACD,YAAY,CACf,CAAA;AACL,CAAC,CAAA;AA5CY,QAAA,sBAAsB,0BA4ClC"}
|
|
@@ -14,9 +14,9 @@ const encodeExecuteCall = (args, options, includeHooks = false) => {
|
|
|
14
14
|
calldata = (0, viem_1.concatHex)([
|
|
15
15
|
args.to,
|
|
16
16
|
options.callType !== constants_js_1.CALL_TYPE.DELEGATE_CALL
|
|
17
|
-
? (0, viem_1.toHex)(args.value, { size: 32 })
|
|
17
|
+
? (0, viem_1.toHex)(args.value || 0n, { size: 32 })
|
|
18
18
|
: "0x",
|
|
19
|
-
args.data
|
|
19
|
+
args.data || "0x"
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
22
|
const executeUserOpSig = (0, viem_1.toFunctionSelector)((0, viem_1.getAbiItem)({ abi: KernelAccountAbi_js_1.KernelV3ExecuteAbi, name: "executeUserOp" }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encodeExecuteCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_7/encodeExecuteCall.ts"],"names":[],"mappings":";;;AAAA,+BAOa;AACb,2DAAoD;AACpD,mDAAkD;AAClD,sFAAiF;AAa1E,MAAM,iBAAiB,GAAG,CAC7B,IAAqC,EACrC,OAAiB,EACjB,YAAY,GAAG,KAAK,EACtB,EAAE;IACA,IAAI,QAAa,CAAA;IACjB,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACrB,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IAC5B,CAAC;SAAM,CAAC;QACJ,QAAQ,GAAG,IAAA,gBAAS,EAAC;YACjB,IAAI,CAAC,EAAE;YACP,OAAO,CAAC,QAAQ,KAAK,wBAAS,CAAC,aAAa;gBACxC,CAAC,CAAC,IAAA,YAAK,EAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"encodeExecuteCall.js","sourceRoot":"","sources":["../../../../../accounts/kernel/utils/ep0_7/encodeExecuteCall.ts"],"names":[],"mappings":";;;AAAA,+BAOa;AACb,2DAAoD;AACpD,mDAAkD;AAClD,sFAAiF;AAa1E,MAAM,iBAAiB,GAAG,CAC7B,IAAqC,EACrC,OAAiB,EACjB,YAAY,GAAG,KAAK,EACtB,EAAE;IACA,IAAI,QAAa,CAAA;IACjB,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;QACrB,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IAC5B,CAAC;SAAM,CAAC;QACJ,QAAQ,GAAG,IAAA,gBAAS,EAAC;YACjB,IAAI,CAAC,EAAE;YACP,OAAO,CAAC,QAAQ,KAAK,wBAAS,CAAC,aAAa;gBACxC,CAAC,CAAC,IAAA,YAAK,EAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;gBACvC,CAAC,CAAC,IAAI;YACV,IAAI,CAAC,IAAI,IAAI,IAAI;SACpB,CAAC,CAAA;IACN,CAAC;IAED,MAAM,gBAAgB,GAAG,IAAA,yBAAkB,EACvC,IAAA,iBAAU,EAAC,EAAE,GAAG,EAAE,wCAAkB,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CACjE,CAAA;IAMD,IAAI,YAAY,EAAE,CAAC;QACf,OAAO,IAAA,gBAAS,EAAC;YACb,gBAAgB;YAChB,IAAA,yBAAkB,EAAC;gBACf,GAAG,EAAE,wCAAkB;gBACvB,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;aACzC,CAAC;SACL,CAAC,CAAA;IACN,CAAC;IAED,OAAO,IAAA,yBAAkB,EAAC;QACtB,GAAG,EAAE,wCAAkB;QACvB,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;KACzC,CAAC,CAAA;AACN,CAAC,CAAA;AA1CY,QAAA,iBAAiB,qBA0C7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEncodedPluginsData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getEncodedPluginsData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.ts"],"names":[],"mappings":";;;AAAA,+BAAiE;AACjE,4DAGsC;AAG/B,MAAM,qBAAqB,GAAG,KAAK,EAAE,EACxC,cAAc,EACd,eAAe,EACf,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,EAKQ,EAAE,EAAE;IACtB,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;IAChE,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAA;IAClD,OAAO,IAAA,aAAM,EAAC;QACV,wBAAa,CAAC,MAAM;QACpB,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QAChD,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACnC,IAAA,UAAG,EAAC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACpC,IAAA,UAAG,EAAC,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACjC,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAC1C,UAAU;QACV,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,eAAe,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACxD,eAAe;KAClB,CAAC,CAAA;AACN,CAAC,CAAA;AAzBY,QAAA,qBAAqB,yBAyBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginsEnableTypedData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getPluginsEnableTypedData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts"],"names":[],"mappings":";;;AAAA,+BAOa;AAWN,MAAM,yBAAyB,GAAG,KAAK,EAAE,EAC5C,cAAc,EACd,OAAO,EACP,aAAa,EACb,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,EAMQ,EAEpB,EAAE;IACA,OAAO;QACH,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,aAAa;YACtB,OAAO;YACP,iBAAiB,EAAE,cAAc;SACpC;QACD,KAAK,EAAE;YACH,iBAAiB,EAAE;gBACf,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC/B,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC1C,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;gBACrC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE;aACxC;SACJ;QACD,OAAO,EAAE;YACL,GAAG,EAAE,MAAM,CAAC,QAAQ;YACpB,aAAa,EAAE,IAAA,kBAAW,EACtB,IAAA,gBAAS,EAAC;gBACN,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,UAAU,IAAI,CAAC,CAAC,EAAE;oBACxB,IAAI,EAAE,CAAC;iBACV,CAAC;gBACF,IAAA,UAAG,EAAC,IAAA,YAAK,EAAC,UAAU,IAAI,CAAC,CAAC,EAAE;oBACxB,IAAI,EAAE,CAAC;iBACV,CAAC;gBACF,SAAS,CAAC,OAAO;aACpB,CAAC,EACF,EAAE,IAAI,EAAE,EAAE,EAAE,CACf;YACD,QAAQ,EAAE,MAAM,CAAC,OAAkB;YACnC,UAAU,EAAE,MAAM,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC;SAC5D;QACD,WAAW,EAAE,mBAAmB;KACnC,CAAA;AACL,CAAC,CAAA;AAlDY,QAAA,yBAAyB,6BAkDrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginsEnableTypedData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getPluginsEnableTypedData.js","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts"],"names":[],"mappings":";;;AAAA,+BAQa;AACb,8DAAuE;AAIhE,MAAM,yBAAyB,GAAG,KAAK,EAAE,EAC5C,cAAc,EACd,OAAO,EACP,aAAa,EACb,MAAM,EACN,IAAI,EACJ,SAAS,EACT,cAAc,EAOG,EAEnB,EAAE;IACA,OAAO;QACH,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;YACjE,OAAO;YACP,iBAAiB,EAAE,cAAc;SACpC;QACD,KAAK,EAAE;YACH,MAAM,EAAE;gBACJ,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;gBACzC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACjC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;gBACjC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE;gBACxC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;gBACnC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE;aAC1C;SACJ;QACD,OAAO,EAAE;YACL,YAAY,EAAE,IAAA,aAAM,EAAC;gBACjB,6BAAc,CAAC,SAAS,CAAC,aAAa,CAAC;gBACvC,IAAA,UAAG,EAAC,SAAS,CAAC,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;aAC7D,CAAC;YACF,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,kBAAW;YAC1C,aAAa,EAAE,MAAM,SAAS,CAAC,aAAa,CAAC,cAAc,CAAC;YAC5D,QAAQ,EAAE,CAAC,MAAM,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC,IAAI,IAAI;YAC7D,YAAY,EAAE,IAAA,aAAM,EAAC;gBACjB,MAAM,CAAC,QAAQ;gBACf,MAAM,CAAC,OAAO;gBACd,MAAM,CAAC,IAAI,EAAE,OAAO,IAAI,kBAAW;gBACnC,IAAA,0BAAmB,EACf,IAAA,yBAAkB,EACd,4CAA4C,CAC/C,EACD,CAAC,wBAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CACtC;aACJ,CAAC;SACL;QACD,WAAW,EAAE,QAAQ;KACxB,CAAA;AACL,CAAC,CAAA;AAzDY,QAAA,yBAAyB,6BAyDrC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createKernelAccountV1 = void 0;
|
|
4
|
-
const
|
|
5
|
-
const accounts_1 = require("permissionless/accounts");
|
|
4
|
+
const index_js_1 = require("../../../actions/public/index.js");
|
|
6
5
|
const viem_1 = require("viem");
|
|
7
|
-
const
|
|
6
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
7
|
+
const accounts_1 = require("viem/accounts");
|
|
8
8
|
const actions_1 = require("viem/actions");
|
|
9
|
-
const _6492_js_1 = require("../../utils/6492.js");
|
|
10
|
-
const index_js_1 = require("../../utils/index.js");
|
|
11
9
|
const multisend_js_1 = require("../../utils/multisend.js");
|
|
12
10
|
const createAccountAbi = [
|
|
13
11
|
{
|
|
@@ -45,106 +43,100 @@ const KERNEL_V1_ADDRESSES = {
|
|
|
45
43
|
FACTORY_ADDRESS: "0x4E4946298614FC299B50c947289F4aD0572CB9ce",
|
|
46
44
|
ENTRYPOINT_V0_6: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
|
|
47
45
|
};
|
|
48
|
-
async function createKernelAccountV1(client, { signer, entryPoint
|
|
49
|
-
const entryPointVersion = (0, permissionless_1.getEntryPointVersion)(entryPointAddress);
|
|
50
|
-
if (entryPointVersion !== "v0.6" ||
|
|
51
|
-
entryPointAddress !== permissionless_1.ENTRYPOINT_ADDRESS_V06) {
|
|
52
|
-
throw new Error("Only EntryPoint 0.6 is supported");
|
|
53
|
-
}
|
|
46
|
+
async function createKernelAccountV1(client, { signer, address, entryPoint, index = 0n }) {
|
|
54
47
|
const viemSigner = {
|
|
55
48
|
...signer,
|
|
56
49
|
signTransaction: (_, __) => {
|
|
57
|
-
throw new
|
|
50
|
+
throw new Error("Smart account signer doesn't need to sign transactions");
|
|
58
51
|
}
|
|
59
52
|
};
|
|
60
53
|
const chainId = await (0, actions_1.getChainId)(client);
|
|
61
54
|
const generateInitCode = async () => {
|
|
62
|
-
return (0, viem_1.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
args: [signer.address, index]
|
|
68
|
-
})
|
|
69
|
-
]);
|
|
55
|
+
return (0, viem_1.encodeFunctionData)({
|
|
56
|
+
abi: createAccountAbi,
|
|
57
|
+
functionName: "createAccount",
|
|
58
|
+
args: [signer.address, index]
|
|
59
|
+
});
|
|
70
60
|
};
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
const getFactoryArgs = async () => {
|
|
62
|
+
return {
|
|
63
|
+
factory: KERNEL_V1_ADDRESSES.FACTORY_ADDRESS,
|
|
64
|
+
factoryData: await generateInitCode()
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
let accountAddress = address ??
|
|
68
|
+
(await (async () => {
|
|
69
|
+
const { factory, factoryData } = await getFactoryArgs();
|
|
70
|
+
return await (0, index_js_1.getSenderAddress)(client, {
|
|
71
|
+
factory,
|
|
72
|
+
factoryData,
|
|
73
|
+
entryPointAddress: entryPoint.address
|
|
74
|
+
});
|
|
75
|
+
})());
|
|
76
76
|
if (!accountAddress)
|
|
77
77
|
throw new Error("Account address not found");
|
|
78
|
-
|
|
79
|
-
const account = (0, accounts_2.toAccount)({
|
|
78
|
+
const account = (0, accounts_1.toAccount)({
|
|
80
79
|
address: accountAddress,
|
|
81
80
|
async signMessage({ message }) {
|
|
82
|
-
|
|
83
|
-
(0, permissionless_1.isSmartAccountDeployed)(client, accountAddress),
|
|
84
|
-
signer.signMessage({ message })
|
|
85
|
-
]);
|
|
86
|
-
return create6492Signature(isDeployed, signature);
|
|
81
|
+
return viemSigner.signMessage({ message });
|
|
87
82
|
},
|
|
88
83
|
async signTransaction(_, __) {
|
|
89
|
-
throw new
|
|
84
|
+
throw new Error("Smart account signer doesn't need to sign transactions");
|
|
90
85
|
},
|
|
91
86
|
async signTypedData(typedData) {
|
|
92
|
-
return
|
|
93
|
-
account: viemSigner,
|
|
94
|
-
...typedData
|
|
95
|
-
});
|
|
87
|
+
return viemSigner.signTypedData(typedData);
|
|
96
88
|
}
|
|
97
89
|
});
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const [factoryAddress, factoryCalldata] = (0, index_js_1.parseFactoryAddressAndCallDataFromAccountInitCode)(await generateInitCode());
|
|
103
|
-
return (0, _6492_js_1.wrapSignatureWith6492)({
|
|
104
|
-
factoryAddress,
|
|
105
|
-
factoryCalldata,
|
|
106
|
-
signature
|
|
107
|
-
});
|
|
90
|
+
const _entryPoint = {
|
|
91
|
+
address: entryPoint?.address ?? account_abstraction_1.entryPoint06Address,
|
|
92
|
+
abi: account_abstraction_1.entryPoint06Abi,
|
|
93
|
+
version: entryPoint?.version ?? "0.6"
|
|
108
94
|
};
|
|
109
|
-
return {
|
|
95
|
+
return (0, account_abstraction_1.toSmartAccount)({
|
|
110
96
|
...account,
|
|
111
97
|
generateInitCode,
|
|
112
98
|
encodeModuleInstallCallData: async () => {
|
|
113
99
|
throw new Error("Not implemented");
|
|
114
100
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
source: "kernelSmartAccount",
|
|
119
|
-
async getFactory() {
|
|
120
|
-
if (smartAccountDeployed)
|
|
121
|
-
return undefined;
|
|
122
|
-
smartAccountDeployed = await (0, permissionless_1.isSmartAccountDeployed)(client, accountAddress);
|
|
123
|
-
if (smartAccountDeployed)
|
|
124
|
-
return undefined;
|
|
125
|
-
return KERNEL_V1_ADDRESSES.FACTORY_ADDRESS;
|
|
101
|
+
nonceKeyManager: (0, viem_1.createNonceManager)({ source: { get: () => 0, set: () => { } } }),
|
|
102
|
+
async sign({ hash }) {
|
|
103
|
+
return account.signMessage({ message: hash });
|
|
126
104
|
},
|
|
127
|
-
async
|
|
128
|
-
|
|
129
|
-
return undefined;
|
|
130
|
-
smartAccountDeployed = await (0, permissionless_1.isSmartAccountDeployed)(client, accountAddress);
|
|
131
|
-
if (smartAccountDeployed)
|
|
132
|
-
return undefined;
|
|
133
|
-
return (0, index_js_1.parseFactoryAddressAndCallDataFromAccountInitCode)(await generateInitCode())[1];
|
|
105
|
+
async signMessage({ message }) {
|
|
106
|
+
return account.signMessage({ message });
|
|
134
107
|
},
|
|
108
|
+
async signTypedData(typedData) {
|
|
109
|
+
return viemSigner.signTypedData(typedData);
|
|
110
|
+
},
|
|
111
|
+
async getAddress() {
|
|
112
|
+
if (accountAddress)
|
|
113
|
+
return accountAddress;
|
|
114
|
+
const { factory, factoryData } = await getFactoryArgs();
|
|
115
|
+
accountAddress = await (0, index_js_1.getSenderAddress)(client, {
|
|
116
|
+
factory,
|
|
117
|
+
factoryData,
|
|
118
|
+
entryPointAddress: entryPoint.address
|
|
119
|
+
});
|
|
120
|
+
return accountAddress;
|
|
121
|
+
},
|
|
122
|
+
getFactoryArgs,
|
|
123
|
+
client: client,
|
|
124
|
+
entryPoint: _entryPoint,
|
|
135
125
|
async getNonce() {
|
|
136
|
-
return (0,
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
return (0, index_js_1.getAccountNonce)(client, {
|
|
127
|
+
address: accountAddress,
|
|
128
|
+
entryPointAddress: entryPoint.address
|
|
139
129
|
});
|
|
140
130
|
},
|
|
141
131
|
async signUserOperation(userOperation) {
|
|
142
|
-
const hash = (0,
|
|
132
|
+
const hash = (0, account_abstraction_1.getUserOperationHash)({
|
|
143
133
|
userOperation: {
|
|
144
134
|
...userOperation,
|
|
135
|
+
sender: userOperation.sender ?? (await this.getAddress()),
|
|
145
136
|
signature: "0x"
|
|
146
137
|
},
|
|
147
|
-
|
|
138
|
+
entryPointAddress: entryPoint.address,
|
|
139
|
+
entryPointVersion: entryPoint.version,
|
|
148
140
|
chainId: chainId
|
|
149
141
|
});
|
|
150
142
|
const signature = await (0, actions_1.signMessage)(client, {
|
|
@@ -153,21 +145,15 @@ async function createKernelAccountV1(client, { signer, entryPoint: entryPointAdd
|
|
|
153
145
|
});
|
|
154
146
|
return signature;
|
|
155
147
|
},
|
|
156
|
-
async
|
|
157
|
-
if (
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return "0x";
|
|
162
|
-
return generateInitCode();
|
|
163
|
-
},
|
|
164
|
-
async encodeCallData(_tx) {
|
|
165
|
-
const tx = _tx;
|
|
166
|
-
if (Array.isArray(tx)) {
|
|
148
|
+
async encodeCalls(calls, callType) {
|
|
149
|
+
if (calls.length > 1) {
|
|
150
|
+
if (callType === "delegatecall") {
|
|
151
|
+
throw new Error("Cannot batch delegatecall");
|
|
152
|
+
}
|
|
167
153
|
const multiSendCallData = (0, viem_1.encodeFunctionData)({
|
|
168
154
|
abi: multisend_js_1.multiSendAbi,
|
|
169
155
|
functionName: "multiSend",
|
|
170
|
-
args: [(0, multisend_js_1.encodeMultiSend)(
|
|
156
|
+
args: [(0, multisend_js_1.encodeMultiSend)(calls)]
|
|
171
157
|
});
|
|
172
158
|
return (0, viem_1.encodeFunctionData)({
|
|
173
159
|
abi: executeAndRevertAbi,
|
|
@@ -175,32 +161,33 @@ async function createKernelAccountV1(client, { signer, entryPoint: entryPointAdd
|
|
|
175
161
|
args: [multisend_js_1.MULTISEND_ADDRESS, 0n, multiSendCallData, 1n]
|
|
176
162
|
});
|
|
177
163
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
164
|
+
const call = calls.length === 0 ? undefined : calls[0];
|
|
165
|
+
if (!call) {
|
|
166
|
+
throw new Error("No calls to encode");
|
|
167
|
+
}
|
|
168
|
+
if (!callType || callType === "call") {
|
|
169
|
+
if (call.to.toLowerCase() === accountAddress.toLowerCase()) {
|
|
170
|
+
return call.data || "0x";
|
|
181
171
|
}
|
|
182
172
|
return (0, viem_1.encodeFunctionData)({
|
|
183
173
|
abi: executeAndRevertAbi,
|
|
184
174
|
functionName: "executeAndRevert",
|
|
185
|
-
args: [
|
|
175
|
+
args: [call.to, call.value || 0n, call.data, 0n]
|
|
186
176
|
});
|
|
187
177
|
}
|
|
188
|
-
if (
|
|
178
|
+
if (callType === "delegatecall") {
|
|
189
179
|
return (0, viem_1.encodeFunctionData)({
|
|
190
180
|
abi: executeAndRevertAbi,
|
|
191
181
|
functionName: "executeAndRevert",
|
|
192
|
-
args: [
|
|
182
|
+
args: [call.to, call.value || 0n, call.data, 1n]
|
|
193
183
|
});
|
|
194
184
|
}
|
|
195
185
|
throw new Error("Invalid call type");
|
|
196
186
|
},
|
|
197
|
-
async
|
|
198
|
-
return "0x";
|
|
199
|
-
},
|
|
200
|
-
async getDummySignature() {
|
|
187
|
+
async getStubSignature() {
|
|
201
188
|
return "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
|
|
202
189
|
}
|
|
203
|
-
};
|
|
190
|
+
});
|
|
204
191
|
}
|
|
205
192
|
exports.createKernelAccountV1 = createKernelAccountV1;
|
|
206
193
|
//# sourceMappingURL=createKernelAccountV1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKernelAccountV1.js","sourceRoot":"","sources":["../../../../accounts/kernel/v1/createKernelAccountV1.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"createKernelAccountV1.js","sourceRoot":"","sources":["../../../../accounts/kernel/v1/createKernelAccountV1.ts"],"names":[],"mappings":";;;AAAA,+DAGyC;AACzC,+BAgBa;AACb,kEAOiC;AACjC,4CAAyC;AACzC,0CAAsD;AAEtD,2DAIiC;AAkBjC,MAAM,gBAAgB,GAAG;IACrB;QACI,MAAM,EAAE;YACJ,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YAC5D,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;SAC/D;QACD,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE;YACL;gBACI,YAAY,EAAE,uBAAuB;gBACrC,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACnB;CACJ,CAAA;AAED,MAAM,mBAAmB,GAAG;IACxB;QACI,MAAM,EAAE;YACJ,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;YACxD,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3D,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE;YACtD,EAAE,YAAY,E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