
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@cometh/keystore-sdk
Advanced tools
The Keystore SDK is designed to facilitate cross-chain operations and interactions within dApps.
bun add @cometh/keystore-sdk
import { MOCK_ATTESTER_ADDRESS } from "@rhinestone/module-sdk";
import { createPublicClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { createPimlicoClient } from "permissionless/clients/pimlico";
import {
createPaymasterClient,
entryPoint07Address,
} from "viem/account-abstraction";
import { createSmartAccountClient } from "permissionless";
import { toSafeSmartAccount } from "permissionless/accounts";
import { erc7579Actions } from "permissionless/actions/erc7579";
const bundlerUrl = process.env.NEXT_PUBLIC_4337_BUNDLER_URL!;
const paymasterUrl = process.env.NEXT_PUBLIC_4337_PAYMASTER_URL!;
const ownerPK = process.env.NEXT_PUBLIC_PRIVATE_KEY!;
const rpc = process.env.NEXT_PUBLIC_RPC_URL!;
const masterOwner = privateKeyToAccount(ownerPK);
const publicClient = createPublicClient({
transport: http(rpc),
chain: baseSepolia,
});
const pimlicoClient = createPimlicoClient({
transport: http(bundlerUrl),
entryPoint: {
address: entryPoint07Address,
version: "0.7",
},
});
const paymasterClient = createPaymasterClient({
transport: http(paymasterUrl),
});
const safeAccount = await toSafeSmartAccount({
client: publicClient,
owners: [owner],
version: "1.4.1",
entryPoint: {
address: entryPoint07Address,
version: "0.7",
},
safe4337ModuleAddress: "0x7579EE8307284F293B1927136486880611F20002",
erc7579LaunchpadAddress: "0x7579011aB74c46090561ea277Ba79D510c6C00ff",
attesters: [
MOCK_ATTESTER_ADDRESS, // Mock Attester - do not use in production
],
attestersThreshold: 1,
});
const smartAccountClient = createSmartAccountClient({
account: safeAccount,
chain: publicClient.chain,
bundlerTransport: http(bundlerUrl),
paymaster: paymasterClient,
userOperation: {
estimateFeesPerGas: async () => {
return (await pimlicoClient.getUserOperationGasPrice()).fast;
},
},
}).extend(erc7579Actions());
import {
getOwners,
registerOwnerOnKeystore,
deleteOwnerOnKeystore,
} from "@cometh/keystore-sdk";
import { privateKeyToAccount } from "viem/accounts";
const ownerPK = privateKeyToAccount(PK as Hex);
const txHash = await registerOwnerOnKeystore({
smartAccountClient,
owner: masterOwner,
});
const owners = await getOwners({
smartAccountClient,
publicClient,
});
const txHash = await deleteOwnerOnKeystore({
smartAccountClient,
owner: masterOwner,
});
import { getCrosschainValidator } from "@cometh/keystore-sdk";
const crossChainValidator = getCrosschainValidator();
const opHash = await smartAccountClient.installModule(crossChainValidator);
await pimlicoClient.waitForUserOperationReceipt({
hash: opHash,
});
const userOpHash = await sendCrossChainTransaction({
smartAccountClient,
masterOwner,
contractAddress,
callData,
});
const receipt = await pimlicoClient.waitForUserOperationReceipt({
hash: userOpHash,
});
import { sendCrossChainCalls } from "@cometh/keystore-sdk";
const userOpHash = await sendCrossChainCalls({
smartAccountClient,
masterOwner,
calls: [
{
to: contractAddress,
data: callData1,
value: 0n,
},
{
to: contractAddress,
data: callData2,
value: 0n,
},
],
});
const receipt = await pimlicoClient.waitForUserOperationReceipt({
hash: userOpHash,
});
import { prepareCrossChainUserOperation } from "@cometh/keystore-sdk";
const userOperation = await prepareCrossChainUserOperation({
smartAccountClient,
masterOwner,
calls,
});
FAQs
SDK Cometh Keystore
We found that @cometh/keystore-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.