
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
@zkred/agent-id
Advanced tools
A package for agent identification and management.
npm install @zkred/agent-id
import zkredAgentId from "@zkred/agent-id";
// Generate a new private key
const privateKey = zkredAgentId.generatePrivateKey();
// Create an agent identity
const identity = await zkredAgentId.createIdentity(
privateKey,
"My Agent Description",
80002, // Polygon Amoy testnet
"https://my-agent-service.com"
);
generateDID(ethAddress, chain, network)Generates a Decentralized Identifier (DID) from an Ethereum address.
ethAddress: Ethereum address (0x-prefixed, 20 bytes)chain: Chain name (e.g., "polygon", "privado")network: Network name (e.g., "amoy", "main")did:iden3:chain:network:base58IdgetETHPublicKeyFromDID(didFull)Extracts the Ethereum public key from a DID.
didFull: Full DID string (e.g., "did:iden3:polygon:amoy:x6x5sor7zpyT5mmpg4fADaR47NADVbohtww4ppWZF")createIdentity(privateKey, description, chainId, serviceEndpoint, rpcUrl)Registers an agent to the central Registry using native token payment.
privateKey: Private key of wallet to registerdescription: Description of the agentchainId: Chain ID (80002 for Polygon Amoy, 296 for Hedera, 16602 for OG)serviceEndpoint: Service endpoint URLrpcUrl: (Optional) RPC URL for the chainvalidateAgent(did, chainId, rpcUrl)Validates an agent's registration.
did: DID of the agentchainId: Chain IDrpcUrl: (Optional) RPC URLregisterAgentByUSDC(privateKey, description, chainId, serviceEndpoint, rpcUrl)Registers an agent using USDC payment via x402 payment interceptor.
privateKey: Private key of wallet to registerdescription: Description of the agentchainId: Chain IDserviceEndpoint: Service endpoint URLrpcUrl: (Optional) RPC URLinitiateHandshake(initiatorDid, initiatorChainId, receiverDid, receiverChainId, initiatorRpcUrl, receiverRpcUrl)Initiates a handshake between two agents.
initiatorDid: DID of the initiating agentinitiatorChainId: Chain ID of the initiatorreceiverDid: DID of the receiving agentreceiverChainId: Chain ID of the receiverinitiatorRpcUrl: (Optional) RPC URL for initiator chainreceiverRpcUrl: (Optional) RPC URL for receiver chaincopmleteHandshake(privateKey, sessionId, receiverAgentCallbackEndPoint, challenge)Completes a handshake by signing the challenge.
privateKey: Private key for signingsessionId: Session ID from initiate handshakereceiverAgentCallbackEndPoint: Callback endpoint of receiverchallenge: Challenge to signverifySignature(sessionId, challenge, signature, did)Verifies a signature from a handshake.
sessionId: Session IDchallenge: Challenge that was signedsignature: Signature to verifydid: DID of the signergeneratePrivateKey()Generates a new random Ethereum private key.
generateChallenge(length)Generates a random challenge string for authentication.
length: (Optional) Length of challenge, default is 10FAQs
A package for zkred agent identification
We found that @zkred/agent-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.