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.
- ๐ 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
npm install vipfsor
yarn add vipfs-protocolimport {
// 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 ๐ For full documentation, visit Github
npm installnpm run devnpm run cior
yarn cipublic/output.css after changes. Tailwind can generate many unused classes.
| 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. |
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
We welcome contributions! Please read our contributing guide and follow the code style defined in .eslintrc.
Coverage is generated in .coverage/index.html, and you can view it in your browser. To generate coverage, run:
yarn testThis is an example of the coverage report:
For questions, feedback, or business inquiries:
โ๏ธ Email: netzuleando@gmail.com
๐ Website: Github
Made with โค๏ธ by the @Netzulo
