The N42 public chain provides a decentralized, efficient, and secure social protocol that supports social identity authentication, friend management, messaging, content sharing, and decentralized governance.
Powered by Decentralized Identity (DID), Zero-Knowledge Proofs (ZKP), and Smart Contracts, N42 enables a permissionless decentralized social network where users retain full control over their data, ensuring high privacy protection and strong interoperability.
The N42 social system consists of the following key components:
- Decentralized Identity (DID): A unique blockchain-based identity protocol that ensures user-controlled data sovereignty.
- Social Graph: A smart contract-based relationship storage system supporting friends, followers, and groups.
- Decentralized Messaging (P2P Messaging): End-to-end encrypted communications for text, images, videos, and on-chain transactions.
- Content Sharing: Blockchain/IPFS-based content publication and management.
- Reputation & Incentive Mechanism: On-chain reputation tracking to reward high-quality content creators.
- DAO-Based Governance: Community-driven voting for content moderation, social governance, and decision-making.
N42 provides REST and WebSocket-based social APIs for DApp integration.
| Endpoint | Method | Description |
|---|---|---|
/api/v1/social/did/create |
POST |
Create a Decentralized Identity (DID) |
/api/v1/social/profile/update |
POST |
Update user social profile |
/api/v1/social/friends/add |
POST |
Add a friend |
/api/v1/social/friends/list |
GET |
Retrieve the friend list |
/api/v1/social/messages/send |
POST |
Send a social message |
/api/v1/social/messages/fetch |
GET |
Fetch messages |
/api/v1/social/content/post |
POST |
Publish content |
/api/v1/social/content/feed |
GET |
Retrieve content feed |
/api/v1/social/reputation/query |
GET |
Query user reputation score |
/api/v1/social/dao/vote |
POST |
Participate in community governance voting |
Request Example
POST /api/v1/social/did/create
Content-Type: application/json
{
"public_key": "0xA1B2C3D4E5F6...",
"metadata": {
"username": "Alice",
"bio": "Web3 enthusiast",
"avatar": "https://ipfs.io/ipfs/Qm..."
}
}Response Example
{
"did": "did:n42:0x123456789ABCDEF...",
"status": "created",
"timestamp": 1710582937
}Request Example
POST /api/v1/social/profile/update
Content-Type: application/json
{
"did": "did:n42:0x123456789ABCDEF...",
"bio": "Decentralization advocate",
"avatar": "https://ipfs.io/ipfs/Qm...",
"website": "https://alice.me"
}Response Example
{
"status": "updated",
"timestamp": 1710583001
}Request Example
POST /api/v1/social/friends/add
Content-Type: application/json
{
"did": "did:n42:0x123456789ABCDEF...",
"friend_did": "did:n42:0xF6E5D4C3B2A1...",
"signature": "MEUCIQD...q9yz+Xf=="
}Response Example
{
"status": "pending",
"friendship_id": "0xABCDE12345",
"timestamp": 1710583056
}Request Example
GET /api/v1/social/friends/list?did=did:n42:0x123456789ABCDEF...Response Example
{
"friends": [
{
"did": "did:n42:0xF6E5D4C3B2A1...",
"username": "Bob",
"status": "confirmed"
}
]
}Request Example
POST /api/v1/social/messages/send
Content-Type: application/json
{
"sender_did": "did:n42:0x123456789ABCDEF...",
"recipient_did": "did:n42:0xF6E5D4C3B2A1...",
"message": "Hello, welcome to Web3!",
"timestamp": 1710583100,
"signature": "MEUCIQD...q9yz+Xf=="
}Response Example
{
"message_id": "0xMSG123456789",
"status": "sent"
}Request Example
GET /api/v1/social/messages/fetch?did=did:n42:0x123456789ABCDEF...Response Example
{
"messages": [
{
"sender_did": "did:n42:0xF6E5D4C3B2A1...",
"content": "Hello, welcome to Web3!",
"timestamp": 1710583100
}
]
}- Public-Private Key Encryption: Messages use ECDH key exchange + AES encryption to ensure privacy.
- Decentralized Storage: Content is stored on IPFS or Arweave to prevent data loss.
- Staking Mechanism: Users must stake N42 tokens to send messages, discouraging spam.
- Social Reputation System: Low-reputation users' messages may be automatically filtered.
- OAuth2 Authentication: All API requests require an
Authorizationtoken. - Whitelist Management: Restrict API access to trusted users.
- Use Decentralized Social Graphs to reduce on-chain storage costs.
- Leverage Off-Chain Indexing (zk-Rollup) for faster queries.
- Reputation Scores to limit malicious actors.
- DAO Governance for community-driven moderation.
- Decentralized AI-Powered Recommendations: Improve content discovery based on on-chain reputation and social interactions.
- Smart Contract-Based DAO Governance: Enable community-driven content moderation and algorithm adjustments.
The N42 social interface provides a complete decentralized social networking solution, supporting identity authentication, friend management, messaging, content publishing, and social governance.
By integrating smart contracts, DID, and zero-knowledge proofs, N42 empowers users to socialize freely without intermediaries, ensuring data sovereignty and privacy protection in the Web3 era.