An open API service indexing awesome lists of open source software.

https://github.com/netzulo/vipfs-protocol

Blockchain Cypher for Video Uploader to IPFS
https://github.com/netzulo/vipfs-protocol

blockchain cypher ipfs typescript uploader video

Last synced: 2 months ago
JSON representation

Blockchain Cypher for Video Uploader to IPFS

Awesome Lists containing this project

README

          

# VIPFS-Protocol

![GitHub stars](https://img.shields.io/github/stars/netzulo/vipfs-protocol.svg?style=social&label=Star)
[![npm](https://img.shields.io/npm/v/vipfs-protocol.svg)](https://www.npmjs.com/package/vipfs-protocol)
![GitHub issues](https://img.shields.io/github/issues/netzulo/vipfs-protocol.svg)
![License](https://img.shields.io/github/license/netzulo/vipfs-protocol)

A robust TypeScript library for fragmenting, encrypting and uploading large video files to IPFS, using Ethereum-derived keys for security. Generates a JSON index to ensure video can be safely reassembled and decrypted later.

---

## ๐Ÿš€ Features

- ๐Ÿ” Fragmentation and encryption of videos with Ethereum-derived keys
- ๐Ÿงฉ IPFS upload and index generation for decentralized storage
- โ™ป๏ธ Retry and resiliency system for reliable uploads
- โšก TypeScript-first, fully type-safe API
- ๐Ÿงช Modular design with unit tests for each step

---

## ๐Ÿ“ฆ Installation

```bash
npm install vipfs
```

or

```bash
yarn add vipfs-protocol
```

---

## ๐Ÿงช Usage

```tsx
import {
// helpers
// hooks
// services
VideoEncryptionManager,
} from 'vipfs-protocol'

const manager = new VideoEncryptionManager(myEthereumWallet)
const indexJson = await manager.encryptAndUpload('/path/to/video.mp4')
// Later, to reassemble the video:
const videoBuffer = await manager.downloadAndDecrypt(indexJson)
```

๐Ÿ“˜ For our website, visit [Github](https://github.com/netzulo/vipfs-protocol)
๐Ÿ“˜ For full documentation, visit [Github](https://github.com/netzulo/vipfs-protocol)

---

## ๐Ÿ› ๏ธ Development

### Setup

```bash
npm install
```

### Run dev server

```bash
npm run dev
```

### Full build & lint cycle

```bash
npm run ci
```

or

```bash
yarn ci
```

**โš ๏ธ Reminder**: Clean up unused CSS classes in `public/output.css` after changes. Tailwind can generate many unused classes.

---

## ๐Ÿ“œ NPM Scripts

| Script | Description |
|-----------------|--------------------------------------------------------------------------------------------------|
| `dev` | Starts the development server |
| `css` | Builds the CSS |
| `css:dev` | Builds CSS in watch/dev mode |
| `test` | Runs tests with coverage |
| `lint` | Runs ESLint |
| `lint:fix` | Fixes lint errors |
| `format` | Formats code using Prettier |
| `build` | Builds for production |
| `preview` | Previews the production build locally |
| `ci` | Runs tests, lint, and formatting |
| `clean` | Cleans `dist`, `node_modules`, `package-lock.json`, etc. |

---

## ๐Ÿงฉ Components / Modules

Each module has dedicated tests to ensure reliability and to simplify future extensions.

- **VideoFragmenter** โ€“ Splits video files into fixed-size binary chunks
- **FragmentEncryptor** โ€“ Encrypts/decrypts each chunk using Ethereum wallet-derived keys
- **IPFSUploader** โ€“ Uploads/downloads each encrypted chunk to/from IPFS
- **IndexManager** โ€“ Generates and updates the JSON index file with fragment metadata
- **EthereumWallet** โ€“ Derives secure keys from an Ethereum wallet for encryption

---

## ๐Ÿ‘ฅ Contributing

We welcome contributions! Please read our [contributing guide](CONTRIBUTING.md) and follow the code style defined in `.eslintrc`.

### Coverage

Coverage is generated in `.coverage/index.html`, and you can view it in your browser. To generate coverage, run:

```bash
yarn test
```

This is an example of the coverage report:

![Coverage](./docs/coverage.png)

---

## ๐Ÿ“„ License

[MIT](./LICENSE)

---

## ๐Ÿ“ฌ Contact Us

For questions, feedback, or business inquiries:

**โœ‰๏ธ Email**: [netzuleando@gmail.com](mailto:netzuleando@gmail.com)
**๐ŸŒ Website**: [Github](https://github.com/netzulo/vipfs-protocol)

---

## ๐Ÿ‘จโ€๐Ÿ’ป Authors

Made with โค๏ธ by the [@Netzulo](https://github.com/netzulo)