upload-file

Uploads files to 0G decentralized storage via Merkle-tree chunking and returns a root hash.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/gabrielfior/ai-village-open-agents --skill upload-file-gabrielfior
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upload-file
Source: https://github.com/gabrielfior/ai-village-open-agents/tree/main/.opencode/skills/upload-file
Command: npx skills add https://github.com/gabrielfior/ai-village-open-agents --skill upload-file-gabrielfior

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upload files to 0G decentralized storage using the ZgFile API and Indexer. Files are split into chunks, organized as a Merkle tree, and distributed across storage nodes. Returns a root hash for later retrieval.

Core Features & Use Cases

  • Merkle-tree based file uploads to distributed storage with verifiable root hashes
  • Handles large files by chunking and indexing via ZgFile and Indexer
  • Use Case: Store documents and retrieve by root hash for later verification

Quick Start

Install the required SDKs, configure environment variables, and run a sample upload to obtain the root hash.

Frequently Asked Questions about upload-file

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload files to 0G decentralized storage and get a root hash?

To upload files to 0G decentralized storage, the Skill uses the ZgFile API and Indexer to split files into chunks, organize them as a Merkle tree, and distribute them across storage nodes, returning a root hash for verifiable retrieval.

How does Merkle-tree based file chunking work for decentralized storage?

Merkle-tree based file chunking for decentralized storage works by splitting your data into segments, indexing them via ZgFile, and organizing the segments into a cryptographic tree structure distributed across nodes for secure, verifiable retrieval.

Do I need a funded wallet to upload to 0G storage?

Yes, uploading to 0G storage requires a funded wallet. You need to configure environment variables including PRIVATE_KEY, RPC_URL, and STORAGE_INDEXER, along with Node.js >= 18, the 0G TS SDK, and ethers to execute the Merkle-tree upload.

Can I use the 0G TS SDK for uploading large files?

You can use the 0G TS SDK to upload large files by chunking and indexing the data via the ZgFile API. This process handles large file distribution across storage nodes and generates a root hash for later verification.

What environment variables are required for 0G storage uploads?

Required environment variables for 0G storage uploads include PRIVATE_KEY, RPC_URL, and STORAGE_INDEXER. These must be configured alongside the 0G TS SDK and ethers within a Node.js >= 18 environment to process the Merkle-tree upload.

How do I retrieve documents stored on 0G storage after upload?

To retrieve documents stored on 0G storage after upload, you use the root hash returned by the Merkle-tree upload process. This root hash serves as a verifiable reference to locate and validate your chunked data across the distributed storage nodes.