Storage Providers
The Document Vault uses IPFS for decentralized file storage, with Pinata as the pinning and gateway provider. This guide covers what Pinata provides and how storage works.
Default Provider: Pinata
Pinata is the IPFS pinning service used by the Document Vault. It provides:
- Reliable pinning: Files remain available on IPFS as long as they are pinned.
- Private gateway: Authenticated access to files without exposing them on the public IPFS DHT.
- Pin management: Programmatic control over file pinning and unpinning.
- CDN-backed delivery: Fast file retrieval through Pinata's content delivery network.
What Pinata Does for the Vault
| Service | Purpose |
|---|---|
| Pinning | Encrypted files are pinned to IPFS through Pinata to ensure availability |
| Private Gateway | Files are served only through authenticated requests, not the public DHT |
| CDN Delivery | Fast, reliable retrieval from Pinata's CDN infrastructure |
| Unpin Management | When documents are deleted, the vault unpins files through Pinata's API |
Private Gateway
The vault uses Pinata's private gateway. This means:
- Files are not discoverable on the public IPFS network.
- Access requires authentication through Pinata's API.
- While files are already encrypted (AES-256-GCM), the private gateway adds a defense-in-depth layer by limiting who can access the ciphertext.
How Pinata Is Used
The vault interacts with Pinata for:
- Uploading: Encrypted files are uploaded to IPFS through Pinata and receive a CID.
- Downloading: Encrypted files are fetched from IPFS through Pinata's private gateway using the CID.
- Unpinning: When a document is deleted, the file is unpinned from Pinata, making it eligible for IPFS garbage collection.
No Protocol Fees
Hadinet does not charge protocol fees for vault operations. The underlying storage costs are borne by the Pinata plan and on-chain transaction fees.
Alternative Storage Backends
While Pinata is the current storage provider, the vault's architecture separates storage concerns such that alternative IPFS providers or storage backends could potentially be supported in the future.
Pinata is the only currently supported storage backend. Any alternative provider would need to be evaluated for compatibility, security, and reliability before integration.