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

@govtechsg/tradetrust-cli

v1.0.7

Published

This CLI tool turns .json documents into .tt verifiable documents. It applies the OpenAttestation algorithm to produce a hash of the json document and then creates a .tt file with the data and proof of integrity.

Downloads

32

Readme

Document CLI tool

This CLI tool turns .json documents into .tt verifiable documents. It applies the OpenAttestation algorithm to produce a hash of the json document and then creates a .tt file with the data and proof of integrity.

Setup

npm install -g @govtechsg/tradetrust-cli

The above command will install the tradetrust CLI to your machine. You will need to have node.js installed to be able to run the command.

Batching Documents

This command process all documents in the input directory and issue all of them in a single batch. It will then add the signature to the individual documents.

tradetrust batch <PathToUnsignedDocuments> <PathToSignedDocuments>

Example:

tradetrust batch ./documents/raw-documents/ ./documents/processed-documents/

2019-02-11T08:37:44.848Z info: Batch Document Root: 0xf51030c5751a646284c898cff0f9d833c64a50d6f307b61f2c96c3c838b13bfc

Verifying All Signed Document in a Directory

This command verifies that the document (and all it's evidence) is valid and is part of the document batch. However, it does not verify that the batch's merkle root is stored on the blockchain. User will need to verify that the document has indeed been issued by checking with the issuer's smart contract.

tradetrust verify-all <PathToDocument>

Example:

tradetrust verify-all ./documents/processed-documents

2019-02-11T08:38:36.767Z info: All documents in ./documents/processed-documents is verified

Verifying Single Signed Document

sign This command verifies that the document (and all it's evidence) is valid and is part of the document batch. However, it does not verify that the batch's merkle root is stored on the blockchain. User will need to verify that the document has indeed been issued by checking with the issuer's smart contract.

tradetrust verify <PathToDocument>

Example:

tradetrust verify ./documents/processed-documents/urn:uuid:08b1f10a-6bf0-46c8-bbfd-64750b0d73ef.json

2019-02-11T08:41:17.301Z info: Document's signature is valid!
2019-02-11T08:41:17.302Z warn: Warning: Please verify this document on the blockchain with the issuer's document store.

Document privacy filter

This allows document holders to generate valid documents which hides certain evidences. Useful for hiding grades lol.

tradetrust filter <inputDocumentPath> <outputDocumentPath> [filters...]

Example:

tradetrust filter signed/example1.json signed/example1.out.json transcript.0.grade transcript.1.grade

2019-02-11T08:43:50.643Z info: Obfuscated document saved to: signed/example1.out.json

Version

tradetrust --version

Test

npm run test