Skip to content

Commit

Permalink
feat: export some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
yaniferhaoui committed Sep 17, 2024
1 parent e1acc43 commit 7ccd966
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/core/accounts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ export { KernelFactoryV2Abi } from "./kernel/v2/abi/KernelFactoryV2Abi.js"
export { EIP1271Abi } from "./kernel/abi/EIP1271Abi.js"
export { addressToEmptyAccount } from "./addressToEmptyAccount.js"
export * from "./utils/index.js"
export { accountMetadata } from "./kernel/utils/common/accountMetadata.js"
export { getActionSelector } from "./kernel/utils/common/getActionSelector.js"
export { getPluginsEnableTypedData } from "./kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js"
export { getKernelV3Nonce } from "./kernel/utils/account/ep0_7/getKernelV3Nonce.js"
6 changes: 6 additions & 0 deletions packages/core/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export {
type SignUserOperationReturnType
} from "./account-client/signUserOperation.js"

export {
type PrepareUserOperationParameters,
type PrepareUserOperationReturnType,
prepareUserOperation,
} from "./account-client/prepareUserOperation.js"

export {
getUserOperationGasPrice,
type GetUserOperationGasPriceReturnType
Expand Down
6 changes: 5 additions & 1 deletion packages/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export {
type KernelSmartAccount,
KERNEL_ADDRESSES,
addressToEmptyAccount,
EIP1271Abi
EIP1271Abi,
getKernelV3Nonce,
accountMetadata,
getActionSelector,
getPluginsEnableTypedData
} from "./accounts/index.js"
export {
sponsorUserOperation,
Expand Down
4 changes: 2 additions & 2 deletions plugins/permission/signers/toEmptyECDSASigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { toAccount } from "viem/accounts"
import { ECDSA_SIGNER_CONTRACT } from "../constants.js"
import type { ModularSigner } from "../types.js"

export function toEmptyECDSASigner(address: Address): ModularSigner {
export function toEmptyECDSASigner(address: Address, signerContractAddress: Address = ECDSA_SIGNER_CONTRACT): ModularSigner {
const account = toAccount({
address,
async signMessage() {
Expand All @@ -25,7 +25,7 @@ export function toEmptyECDSASigner(address: Address): ModularSigner {
})
return {
account,
signerContractAddress: ECDSA_SIGNER_CONTRACT,
signerContractAddress: signerContractAddress,
getSignerData: () => {
return address
},
Expand Down

0 comments on commit 7ccd966

Please sign in to comment.