ZK Social Protocol
  • Introduction
  • UI Clients
  • 💻Developers
    • Overview
    • Identity
      • Pseudonymous Identity
    • Data
      • Schema
      • Simple Node
      • Archive
      • Eviction Policy
    • API
    • Libraries
      • zkitter-js
  • 📓FAQs
    • How to sign up with Metamask?
    • How to chat anonymously?
    • What is an Anonymous account?
    • How to create an anonymous user?
    • How to create a custom group?
    • How does moderation work?
    • What shows up in the global feed?
    • How to upload an image?
    • How to share a WebTorrent seed?
  • Resources
    • Links
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. Data

Archive

Not Implemented

We will first integrate with IPFS and provide simple ways for creators to periodically backup all messages.

To archive messages, the creator should upload all messages to IPFS as a directory using the following format, where each *.data file contain a buffer of the hex-encoded message:

.  
├── message  
│ ├── 42740f20aed483b69701a55ab295a2ed.data  
│ └── 38650f20aed483b69701a55ab291b7f4.data  

After the directory is uploaded, the creator should get back an IPFS hash, of which they should add it to their GUN as below:

const user = Gun.user();  
user.put({  
	archive: {  
		ipfs: "CABAB_1Dt0FJsxqsu_J4TodNCbCGvtFf1Uys_3EgzOlTcg"  
	}  
});  

Supporting other file protocol

We plan to integrate with other file protocols for archives based on user demand. As long as the file protocol support directory uploads in the archive formats described above, it should be fairly trivial to integrate with such protocol.

PreviousSimple NodeNextEviction Policy

Last updated 3 years ago

Was this helpful?

💻