npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cometh/keystore-sdk

v0.0.1

Published

SDK Cometh Keystore

Readme

Keystore SDK

The Keystore SDK is designed to facilitate cross-chain operations and interactions within dApps.

Installation

bun add @cometh/keystore-sdk

Setup

Create Clients

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());

Slim Keystore contract

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,
});

Install Crosschain Validator

import { getCrosschainValidator } from "@cometh/keystore-sdk";

const crossChainValidator = getCrosschainValidator();

const opHash = await smartAccountClient.installModule(crossChainValidator);

await pimlicoClient.waitForUserOperationReceipt({
  hash: opHash,
});

Send a Cross-Chain Transaction

const userOpHash = await sendCrossChainTransaction({
  smartAccountClient,
  masterOwner,
  contractAddress,
  callData,
});

const receipt = await pimlicoClient.waitForUserOperationReceipt({
  hash: userOpHash,
});

Send Cross-Chain Batch Transactions

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,
});

Prepare a Cross-Chain Transaction

import { prepareCrossChainUserOperation } from "@cometh/keystore-sdk";

const userOperation = await prepareCrossChainUserOperation({
  smartAccountClient,
  masterOwner,
  calls,
});