xuanyi-fu / ipfs-random-cid-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random CID Generator README

Introduction

Random CID Generator is a command-line utility that generates random content identifiers (CIDs) from the InterPlanetary File System (IPFS) by querying the IPFS Search with random keywords. This tool is useful for creating diverse sets of CIDs to enhance privacy measures when accessing content from the IPFS network.

Prerequisites

Before using the Random CID Generator, make sure you have the following installed on your machine:

Installation

To use the Random CID Generator, clone this repository to your local machine, navigate to the project directory, and install the necessary dependencies:

git clone https://github.com/xuanyi-fu/ipfs-random-cid-generator
cd ipfs-random-cid-generator
npm install

Usage

To generate random CIDs, use the following command:

node index.js -c <number-of-cids>

Replace <number-of-cids> with the number of random CIDs you want to generate. The program will display the generated CIDs on the console.

How It Works

The Random CID Generator works by querying the IPFS Search with random keywords generated by the random-words npm package. The search results, each associated with a unique CID, are then randomly selected based on the desired count of CIDs to generate. The selected CIDs are returned and displayed to the user.

The program uses the ipfs-search-client package to interact with the IPFS Search API and the commander package to handle command-line options.

Conclusion

The Random CID Generator is a useful tool for anyone looking to enhance their privacy when interacting with the IPFS network. By generating and using random CIDs, users can obfuscate their true content interests, adding an extra layer of privacy to their IPFS activities.

About


Languages

Language:JavaScript 100.0%