Socket
Book a DemoInstallSign in
Socket

@agentcommercekit/keys

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentcommercekit/keys

Methods for dealing with cryptographic keys on multiple curves (secp256k1, Ed25519).

latest
Source
npmnpm
Version
0.9.0
Version published
Weekly downloads
435
-20.91%
Maintainers
3
Weekly downloads
 
Created
Source

@agentcommercekit/keys

Methods for dealing with cryptographic keys on multiple curves (secp256k1, Ed25519).

This package is part of the Agent Commerce Kit.

Installation

npm i @agentcommercekit/keys
# or
pnpm add @agentcommercekit/keys

Usage

import {
  generateKeypair,
  keypairToJwk,
  encodePublicKeyFromKeypair
} from "@agentcommercekit/keys"

// Generate and format keypairs
const keypair = await generateKeypair("secp256k1")
const jwkKeypair = keypairToJwk(keypair)

// Format public keys
const hexPublicKey = encodePublicKeyFromKeypair("hex", keypair)
const jwkPublicKey = encodePublicKeyFromKeypair("jwk", keypair)
const multibasePublicKey = encodePublicKeyFromKeypair("multibase", keypair)
const base58PublicKey = encodePublicKeyFromKeypair("base58", keypair)

API

Keypair Operations

  • generateKeypair(curve: KeyCurve, privateKeyBytes?: Uint8Array): Promise<Keypair>
  • keypairToJwk(keypair: Keypair): PrivateKeyJwk
  • jwkToKeypair(jwk: PrivateKeyJwk): Keypair

Public Key Formatting

  • encodePublicKeyFromKeypair<T extends PublicKeyEncoding>(encoding: T, keypair: Keypair): PublicKeyTypeMap[T]

Additional Exports

Encoding utilities are also available via subpath exports:

import { bytesToBase58, base58ToBytes } from "@agentcommercekit/keys/encoding"

License (MIT)

Copyright (c) 2025 Catena Labs, Inc.

FAQs

Package last updated on 13 Aug 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.