NOVA secure file-sharing
NOVA is a privacy-first, decentralized file-sharing primitive for NEAR dApps, empowering user-owned AI at scale. NOVA enables secure storage and sharing of sensitive data (e.g., datasets for AI agent fine-tuning) without centralized intermediaries, leveraging group key management, IPFS, and NEAR smart contracts.
NOVA fills critical gaps in NEARβs ecosystem βno native encrypted persistence for TEEs, Intents, or Shade Agentsβ while inheriting NEARβs strengths like sharding for scalability, low-cost transactions (~0.01 NEAR/gas), and AI-native tools (e.g., NEAR AI CLI). Whether you're building AI social platforms, DeFi apps, or autonomous agent workflows, NOVA provides a secure, verifiable data layer.
Why Use NOVA?
Privacy-First: Encrypt files with group keys, ensuring only authorized users or AI agents access data, critical for AI data pipelines where tampering could bias models.
Decentralized: Store files on IPFS, log metadata on NEARβs immutable ledger, and manage access via smart contracts. No central servers.
AI-Ready: Seamlessly integrates with NEARβs TEEs, Intents, and Shade Agents, enabling secure data for AI training and execution.
Developer-Friendly: Free-to-integrate SDK (Rust crate and JS package) with pay-per-action fees baked into the contract, blending into your dAppβs backend.
Key Features
Group Creation & Management: Owners (NEAR AccountIds) create groups via smart contracts, supporting collaborative AI training with multi-group membership.
Access Control: Smart contracts maintain a mapping table for group keys and members, ensuring only authorized users access files, vital for user-owned AI privacy.
Secure Storage: Files are encrypted with group keys and pinned to IPFS, optimized for AI dApps (e.g., datasets for fine-tuning).
Access Workflow: Authorized users query on-chain metadata, retrieve encrypted files from IPFS, and receive wrapped keys for local decryption, ensuring verifiable access.
Revocation & Key Rotation: Remove members and rotate keys with lazy re-encryption to minimize latency/gas costs for large groups.
Integrity & Trackability: Log signed transactions (with file hashes) on-chain for non-corruption guarantees, leveraging NEARβs ledger for verifiability.
Group Key Security
Keys are managed off-chain in verifiable TEEs via Shade Agents. Never published on-chain, NOVA file-sharing ensures unbreakable privacy against blockchain fetches.
In NOVA's design, group keys are generated, stored, and distributed exclusively within Trusted Execution Environments (TEEs) using Shade Agents. This eliminates any on-chain exposure:
Off-Chain Key Management: Keys are derived and encrypted in TEE-secure SQLite databases, accessible only by verified Shade workers (multi-instance with identical code hashes for redundancy and shared access).
No On-Chain Keys: The smart contract stores only group metadata and Shade attestations (checksums/code hashes)βno keys or decryptable data. RPC queries (e.g., view_state) reveal nothing sensitive.
Secure Distribution: Users request ephemeral nonce-based access tokens from the contract (gated by on-chain membership). Tokens incorporate a timestamp-derived SHA256 nonce (preventing replay attacks) and are verified in-TEE before key release, ensuring single-use validity without shared secrets.
Verification & Attestation: Every key operation returns a TEE checksum (via agentInfo), proving execution in genuine hardware with unmodified codeβno tampering possible.
Rotation & Revocation: On member removal, keys rotate in-TEE (new derivation), invalidating prior access without re-encryption overhead.
Attack Resistance: Even targeted attacks (e.g., indexing interactions or RPC dumps) can't extract keys: they're never on-chain. High-value targets (e.g., AI datasets) remain secure against nation-state or sophisticated threats.
NOVA's architecture combined with Shade/TEEs confidentiality provides bullet-proof security for your data: verifiable, private, and resilient, aligning with NEAR's user-owned AI vision.
NOVA x NEAR
NOVA complements NEARβs AI-focused tools:
TEEs: Secures data at rest/transit for confidential compute (e.g., private AI inference in Phala enclaves).
Intents: Gates solver access to encrypted payloads, enabling private, AI-driven fulfillment (e.g., cross-chain swaps).
Shade Agents: Persists off-chain data for autonomous workers, resolving the "oracle problem" with verified inputs (e.g., prediction markets).
Integration Options
Choose the integration that best fits your use case:
π€ MCP Server - AI Assistant Integration
For AI-assisted workflows using Claude or other MCP-compatible assistants.
pip install nova-mcp-server
Best for: Natural language file operations, AI agent workflows, conversational interfaces
Documentation: /mcp-server | GitBook
π¦ JavaScript SDK - Web & Node.js
For web applications, backend services, and Node.js environments.
npm install nova-sdk-js
Best for: Web dApps, API servers, browser applications, TypeScript projects
Documentation: /nova-sdk-js | GitBook
π¦ Rust SDK - System & Smart Contract Integration
For high-performance applications, blockchain integration, and system-level development.
[dependencies]
nova-sdk-rs = "0.1.0"
Best for: Smart contracts, CLI tools, high-performance services, native applications
Documentation: /nova-sdk-rs | GitBook
Quick Start Examples
MCP Server (Natural Language)
You: "Create a group called 'research_team' and upload this data securely"
Claude: [uses NOVA MCP tools to encrypt, upload to IPFS, and record on NEAR]
JavaScript SDK
import { NovaSdk } from 'nova-sdk-js';
const sdk = new NovaSdk(rpcUrl, contractId, pinataKey, pinataSecret);
await sdk.withSigner(privateKey, accountId);
const result = await sdk.compositeUpload(
'my_group', 'user.testnet', fileData, 'data.txt'
);
console.log('Uploaded:', result.cid);
Rust SDK
use nova_sdk_rs::NovaSdk;
let sdk = NovaSdk::new(rpc_url, contract_id, pinata_key, pinata_secret)
.with_signer(private_key, account_id)?;
let result = sdk.composite_upload(
"my_group", "user.testnet", "data", "file.txt"
).await?;
println!("Uploaded: {}", result.cid);
Architecture
βββββββββββββββββββ
β Your dApp β
β (MCP/JS/Rust) β
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ
β NOVA β
β SDK β
ββββββ¬βββββ
β
ββββββ΄ββββββββββββββββββββββββββββββββ
β β β
βββββΌβββββ βββββββΌββββββ βββββΌββββββββ
β IPFS β β NEAR β β Shade/TEE β
β(Pinata)β β Blockchainβ β β
ββββββββββ βββββββββββββ βββββββββββββ
Encrypted Access Control Key
Storage & Group Metadata Management
Client-Side Encryption: Files encrypted locally before upload
IPFS Storage: Encrypted files stored on decentralized IPFS
NEAR Blockchain: Access control groups and transaction logs
Key Management: Group keys managed off-chain in verifiable TEEs via Shade Agentsβnever exposed on-chain, distributed via nonce-based access tokens with attestation proofs.
Use Cases
π€ AI & Machine Learning
Dataset Sharing: Securely share training data between researchers
Model Fine-Tuning: Store and access sensitive data for AI agent training
TEE Integration: Provide encrypted inputs to confidential compute environments
π’ Enterprise & Collaboration
Document Sharing: Secure file sharing within organizations
Access Revocation: Remove member access and rotate keys automatically
Audit Trails: Immutable transaction logs on NEAR blockchain
π Privacy-Preserving Applications
Healthcare Records: HIPAA-compliant data sharing
Financial Data: Secure transmission of sensitive financial information
Identity Documents: User-controlled identity verification data
NEAR Token Requirements
Operations require small NEAR token deposits for storage:
Register group: ~0.1 NEAR
Add member: ~0.0005 NEAR
Revoke member: ~0.0005 NEAR
Store key: ~0.0005 NEAR
Record transaction: ~0.002 NEAR
Ensure your NEAR account has sufficient balance before operations.
Documentation
Comprehensive documentation is available on GitBook:
π NOVA Documentation
Quick Links
Security Considerations
β οΈ Important Security Notes:
Private Keys - Never commit NEAR private keys to version control
Key Storage - Store encryption keys securely using proper key management
IPFS Privacy - IPFS content is addressable by CID; encryption is essential
Access Control - Always verify user authorization before operations
Key Rotation - Revoked members cannot decrypt content uploaded after revocation
Client-Side Encryption - Files are encrypted locally, never exposing plaintext to IPFS
Future Roadmap
Potential SDK Enhancements
Pay-per-Action Model: Add fees to
#[payable]
methods, setup fees tonova-sdk.near
Agent Permissions: Extend file upload through
record_transaction
to agents/members (currently owner-only).Transaction Listing: Extend
get_transactions_for_group
calls to agents/members (currently owner-only).Member Discovery: Extend
group_members
view to agents/members (currently owner-only).Token-Gated Access: Reinforce access control with NFT/token holdings (Access Token NFTs)?
AI Metadata Extraction: Automate metadata extraction with AI for optimized IPFS indexing.
Dataset Monetization: Add pricing to file upload so file owners can monetize dataset access.
Multi-Party Upload: So far all members can upload, but a contract update (New method: grant_publish_rights(group_id: String, user_id: AccountId, can_publish: bool))could add per-member publish rights.
Group creation access: So far only contract owner can create groups. in this scenario people who want to create groups should deploy their own contract. Shall I allow anyone to create groups on this contract?
Contributing
Contributions are welcome! We accept contributions for:
Bug fixes and improvements
New SDK features
Documentation enhancements
Integration examples
Test coverage
How to Contribute
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature
)Add tests for new functionality
Ensure all tests pass
Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
See individual SDK directories for specific testing instructions.
Resources
NOVA Resources
NEAR Resources
Storage Resources
AI Integration
Support
Need help? We're here for you:
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: GitBook
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with β€οΈ for the NEAR ecosystem, leveraging:
NEAR Protocol for decentralized access control
IPFS/Pinata for decentralized storage
Model Context Protocol for AI integration
Ready to build privacy-first dApps? Choose your integration: MCP | JavaScript | Rust
Last updated