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

prs-sdk

v0.0.5

Published

Social Identity / Publish System based on Blockchain.

Readme

简介

本 SDK 提供 PRS 服务端接口的 Node.js 封装,与 PRS REST API 通信。 目前 SDK 提供了以下功能:

  • DApp 的创建以及管理。
  • DApp 授权、取消授权。
  • 签名发布文件。
  • 创建合约以及提交交易。

目前 SDK 还相当早期,我们会不断更新实例和注释,帮助大家理解接入的细节。同时会根据开发者的需求,包装开放新的 API。

如何使用?

使用步骤

  1. 开发者前往 PRS 官网注册账号。(正式环境:https://press.one,测试环境:https://beta.press.one)
  2. 登录成功后进入开发者设置我的 DApp,完善开发者信息以及创建 DApp。
  3. 在项目中安装 SDK .
  4. DApp 在合适的时候引导用户进行授权。
  5. 授权成功后即可进行签名发布文件、创建合约等操作。

创建 DApp

进入我的 DApp,填写必要信息(名称、描述、主页 URL、授权回调 URL)即可创建 DApp,创建成功后,能够获取到对应的 privateKey、publicKey、address,用于之后的用户授权。

  • address: DApp 在 PRS 系统中的唯一标识。
  • privateKey: 创建 DApp 时生成的私钥,用户通过 Web 授权时,开发者需要通过 privateKey 换取 token。

安装

通过 npm 安装:

npm install prs-sdk --save

文档

  • 具体的每个步骤,都在/tests目录有实现参考;
  • 所有加密,签名,运算所需要的函数,都在/utility.js文件中可以找到参考实现。
  • 具体使用,请参考开发文档

初始化

在代码中通过 require 获得 SDK 的引用,之后创建 client 使用:

const PRS = require('prs-sdk');
//设置环境参数
const client = new PRS({ env: 'env', debug: true, address: authAddress, token: token });
  • env: 设置开发环境。正式环境为'prod', 开发环境为'dev'.
  • debug: 开启调试日志,开启后 SDK 会把网络请求、错误消息等信息输出到IDE的日志窗口。
  • address: 授权用户的 address.
  • token: 授权用户的 access token.
  • privateKey: 授权用户的 privateKey.

PRS 社区