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

dbx-chain-tools

v3.0.1

Published

DBX Wallet tools

Readme

API

  /**
   * 生成助记词
   *
   * @return {String} brainKey 16个助记词
   */
  generatorBrainKey()

  /**
   * 生成公私钥对
   *
   * @param  {String} seed 必传。助记词或密码
   *
   * @return {Object} {privateKey: 私钥, publicKey: 公钥, address: 钱包地址}
   *
   * @example
   *    generatorKeyFromSeed({seed: 'sjfhdj sjhdfhjdf shdfhjd'})
   *
   *    =>
   *
   *    {
   *      address: "DBX68HQ81ouwXi755F17cjfyj9qtWa7kop7H",
   *      privateKey: "5KjFvS1Bkd9zVurRtAaa7Nv2Ls1qSuKEL81s9Ft7HasKMsQ4VK4",
   *      publicKey: "DBX6iJ5JpAEnjBsDY1DQvY98BLoiYVgJSWxkiPcDkAc45QFHiXYag"
   *    }
   */
  generatorKeyFromSeed({seed})

  /**
   * 通过私钥生成公私钥对
   *
   * @param  {String} privKey 输入的私钥,必传
   *
   * @return {Object}         {privateKey: 私钥, publicKey: 公钥, address: 钱包地址}
   *
   * @example
   *    generatorKeyFromSeed({privKey: '5KjFvS1Bkd9zVurRtAaa7Nv2Ls1qSuKEL81s9Ft7HasKMsQ4VK4'})
   *
   *    =>
   *
   *    {
   *      address: "DBX68HQ81ouwXi755F17cjfyj9qtWa7kop7H",
   *      privateKey: "5KjFvS1Bkd9zVurRtAaa7Nv2Ls1qSuKEL81s9Ft7HasKMsQ4VK4",
   *      publicKey: "DBX6iJ5JpAEnjBsDY1DQvY98BLoiYVgJSWxkiPcDkAc45QFHiXYag"
   *    }
   */
  generatorKeyByPrivKey({privKey})

  /**
   * 加密备注信息
   *
   * @param  {String|PrivateKey} pKey 当前账户的私钥
   * @param  {String} fromKey  源账户的 memoKey 公钥
   * @param  {String} toKey 目标账户的 memoKey 公钥
   * @param  {String} memo 备注信息
   *
   * @return {Object} 加密后的备注信息 { from, to, nonce, message }
   */
  encodeMemo({pKey, fromKey, toKey, memo})

  /**
   * 解密备注信息
   *
   * @param  {String} privKey 当前账户的私钥
   * @param  {Object} memo 备注信息
   *
   * @return {String} 解密后的备注
   *
   * @example
   *          decodeMemo({
   *            privKey: "5JMujMZEZDbR6p8ZpEvf6Xpf5w9najS9Gkg3eLsPDYFshTzxTjR",
   *            memo: {
   *              from: "DBX7XNQEh5MXfbrVB8prkmDsS9dLuazesuhgTwRLYYtTqFmCZEy1W",
   *              to: "DBX5wYceNjjamwgBMXimJLPggvN6peiAvp9NYhwEkubg6rrLeNQQP",
   *              nonce: "393139950650709",
   *              message: "98889eb50931bea00fbed1089d28254376b59a5b3122271797ff9789161ecc08"
   *            }
   *          })
   *
   *          => ddjdidnd测试
   */
  decodeMemo({privKey, memo})

  /**
   * 交易数据签名
   *
   * @param  {String} privKey 当前账户的私钥
   * @param  {Object} from 源账户 { id: 账户ID,必传, memoKey: memo公钥 }
   * @param  {Object} to 目标账户 { id: 账户ID,必传, memoKey: memo公钥 }
   * @param  {Object} fee 手续费 { amount: 金额, assetId: 资产ID(币种)}
   * @param  {Object} amount 交易金额 { amount: 金额, assetId: 资产ID(币种)}
   * @param  {String} memo 备注信息
   * @param  {Object} blockHeader 交易块的块头信息 { time, head_block_number, head_block_id }
   * @param  {String} chainId 链ID
   *
   * @return {String} 签名后的JSON串
   */
  buildTransaction({privKey, from, to, fee, amount, memo, blockHeaer, chainId})