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

@jccdex/ipfs-rpc-client

v0.1.4

Published

http rpc client for ipfs service

Readme

ipfs-rpc-client

IPFS RPC Client

基于 TypeScript 的 IPFS HTTP RPC 客户端,支持文件上传、下载、签名、加密等功能,适用于区块链和分布式存储场景。

特性

  • 支持 IPFS 文件的上传、下载、分享、加密存储
  • 支持 secp256k1 密钥对生成、签名与验签
  • 支持 ECIES 加解密
  • 提供类型安全的接口定义

安装

yarn add @jccdex/ipfs-rpc-client
# 或
npm install @jccdex/ipfs-rpc-client

快速上手

import { IpfsClient, generateKeyPair } from '@jccdex/ipfs-rpc-client';

// 生成密钥对
const { privateKey, publicKey } = generateKeyPair();

// 初始化客户端
const client = new IpfsClient({ baseURL: 'http://localhost:8080' });

// 上传文件
const file = new Blob(['Hello IPFS!']);
const signature = await client.sign(file, privateKey);
await client.writeFile({ file, name: 'hello.txt', publicKey, signature });

// 下载文件
const res = await client.readFile({ name: 'hello.txt', publicKey, signature });
console.log(res);

主要 API

  • IpfsClient:IPFS 客户端主类,支持文件操作、分享、加密等
  • generateKeyPair:生成 secp256k1 密钥对
  • sign:对数据进行 secp256k1 签名
  • encrypt / decrypt:ECIES 加解密

详细接口请查阅源码 src/ 目录及类型定义

目录结构

src/
	api/         # IPFS 业务接口实现
	http/        # HTTP 客户端封装
	interface/   # 类型定义
	utils/       # 签名、加密等工具
test/          # 单元测试

构建与测试

yarn build      # 构建
yarn test       # 运行测试

License

MIT