Skip to content

ozfive/elcid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elcid

License: MIT standard-readme compliant

A tool for encoding and decoding content IDs

Table of Contents

Install

go get github.com/whyrusleeping/elcid

Usage

To use Elcid, you can either encode or decode CIDs.

Encoding

To encode content into a CID, use the following command:

echo "<content>" | elcid -type <input_type> e

The available input types are:

  • zcash-block
  • zcash-tx
  • bitcoin-block
  • bitcoin-tx
  • eth-block
  • eth-tx

Decoding

To decode a CID, use the following command:

echo "<cid>" | elcid d

The output will contain the codec name, multihash type, and raw hash of the CID.

Examples

me@home ~> echo 000000002f39739a41ee7ceb910d6b2d0084129719e95aa16f7af005380e370d | elcid -type=zcash-block e
z4QJh97xKVfG43tBcdLk31E1An5HD574Xp7fYxi7Mp1vXNGnxvj

me@home ~> echo zdpuAnXTsoojgUhScFpvU8vyMpdXswNCMUVB28gzy4NJtvUZc | elcid d
dag-cbor        sha2-256        1f426f7fdd365555ab7fea80e2f97f9293d9139834a2ba9efe63730e545da707

Maintainers

@whyrusleeping

Contribute

PRs are welcome!

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Jeromy Johnson

About

A cid encoder/decoder tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%