
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@cometh/connect-sdk-4337
Advanced tools
This SDK help any dApps to get a smoother UX for your end-users (control a wallet with biometrics, pay for his gas fees, social recovery...)
bun add viem @cometh/connect-sdk-4337
//go to the root of the selected package and run
bun format
bun build
//for prod version
npm publish
// for dev version
npm publish --tag dev
import {
createComethPaymasterClient,
createSafeSmartAccount,
createSmartAccountClient,
} from "@cometh/connect-sdk-4337";
import { arbitrumSepolia } from "viem/chains";
import { http } from "viem";
const apiKey = process.env.NEXT_PUBLIC_COMETH_API_KEY;
const bundlerUrl = process.env.NEXT_PUBLIC_4337_BUNDLER_URL;
const smartAccount = await createSafeSmartAccount({
apiKey,
entryPoint: ENTRYPOINT_ADDRESS_V07,
});
const paymasterClient = await createComethPaymasterClient({
transport: http(paymasterUrl),
chain,
});
const smartAccountClient = createSmartAccountClient({
account: smartAccount,
chain,
bundlerTransport: http(bundlerUrl),
paymaster: paymasterClient,
userOperation: {
estimateFeesPerGas: async () => {
return await paymasterClient.getUserOperationGasPrice();
},
},
});
import { smartAccountClient } from "./client";
import countContractAbi from "../contract/counterABI.json";
const calldata = encodeFunctionData({
abi: countContractAbi,
functionName: "count",
});
const txHash = await smartAccountClient.sendTransaction({
to: COUNTER_CONTRACT_ADDRESS,
data: calldata,
});
import { smartAccountClient } from "./client";
import countContractAbi from "../contract/counterABI.json";
const calldata = encodeFunctionData({
abi: countContractAbi,
functionName: "count",
});
const txHash = await smartAccountClient.sendUserOperation({
calls: [
{
to: COUNTER_CONTRACT_ADDRESS,
data: calldata,
},
{
to: COUNTER_CONTRACT_ADDRESS,
data: calldata,
},
],
});
import { smartAccountClient } from "./client";
// get owners
const owners = await smartAccountClient.getOwners();
// get enriched owners (with passkey credentials)
const enrichedOwners = await smartAccountClient.getEnrichedOwners();
// add a new owner
await smartAccountClient.addOwner({ ownerToAdd: OWNER_ADDRESS_TO_ADD });
// remove an owner
await smartAccountClient.removeOwner({
ownerToRemove: OWNER_ADDRESS_TO_REMOVE,
});
FAQs
SDK Cometh Connect 4337
The npm package @cometh/connect-sdk-4337 receives a total of 372 weekly downloads. As such, @cometh/connect-sdk-4337 popularity was classified as not popular.
We found that @cometh/connect-sdk-4337 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.