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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ddn/asset-evidence

v2.4.5

Published

DDN evidence

Downloads

69

Readme

DDN Evidence

交易体创建方法: ddnJS.assetPlugin.createPluginAsset(trsType, assetInfo, secret, secondSecret) 参数:   trsType: 创建交易的类型   assetInfo: 创建交易的具体内容   secret: 账号的密码   secondSecret: 二级密码;(可不传) 返回:   创建成功的交易体对象

提交存证数据

const evidencee = {
    short_hash: 'short_hash', // 短哈希,哈希截短后的哈希 非必填
    address: 'xx', // 区块链地址 必填
    description: ' has been evidence.', // 描述 非必填
    hash: 'f082022ee664008a1f15d62514811dfd', // 数据哈希
    tags: 'tag', //标签 必填
    author:'author',//作者 必填
    size: '2448kb',  //大小 非必填
    source_address:'source_address', // 原始数据地址 非必填
    type: 'html', //类型 必填
    metadata: 'metadata', // 元数据 非必填
    field: 'str_ext', // 时间 非必填
    field: 'str_ext' // 描述 非必填
  };

  // 其中password是在用户登录的时候记录下来的,secondPassword需要每次让用户输入
  // 可以通过user.secondPublicKey来判断用户是否有二级密码,如果没有,则不必输入,以下几个交易类型类似
  const transaction = await DdnJS.evidence.createEvidence(evidencee, secret, null);
  console.log(JSON.stringify({ transaction }));

  {
    "transaction":{
        "type":20,
        "nethash":"0ab796cd",
        "amount":"0",
        "fee":"10000000",
        "recipientId":null,
        "senderPublicKey":"daeee33def7eef0c7ba06ec66eda7204437ba88ace8f04e4a6aa4d7bfbd18bc1",
        "timestamp":93994165,
        "asset":{
            "evidence":{
               short_hash: 'short_hash', // 短哈希,哈希截短后的哈希 非必填
               address: 'xx', // 区块链地址 必填
               description: ' has been evidence.', // 描述 非必填
               hash: 'f082022ee664008a1f15d62514811dfd', // 数据哈希
               tags: 'tag', //标签 必填
               author:'author',//作者 必填
               size: '2448kb',  //大小 非必填
               source_address:'source_address', // 原始数据地址 非必填
               type: 'html', //类型 必填
               metadata: 'metadata', // 元数据 非必填
               field: 'str_ext', // 时间 非必填
               field: 'str_ext' // 描述 非必填
            }
        },
        "signature":"26bd82046495f3dc4b2ed9d4452aa0f25be2a5a542fc52c5561a34c06dc8e1ebec03f6fcdbca115517d898c319c56cb448b35596e61bdd677adf9dfd4a87350f",
        "id":"0ff3ba6dc2ceab676107f9a6a66c60d9ec17745a8cd53e3f25ff0da6829727da7d2fc6d470d43d85bd13923b7bdfe54bca6d4da97b0ac60ccd5b55b6a11b51b6"
    }
}