# @elizaos/plugin-0g

## Purpose

A plugin for storing data using the 0G protocol within the ElizaOS ecosystem, enabling seamless integration with the Zero Gravity (0G) protocol for decentralized file storage.

## Installation

```bash
bun install @elizaos/plugin-0g
```

## Configuration

The plugin requires the following environment variables:

```typescript
ZEROG_INDEXER_RPC=<0G indexer RPC endpoint>
ZEROG_EVM_RPC=<0G EVM RPC endpoint>
ZEROG_PRIVATE_KEY=<Private key for transactions>
ZEROG_FLOW_ADDRESS=<0G Flow contract address>
```

## Integration

```typescript
import { zgPlugin } from '@eliza/plugin-0g';
```

## Example Usage

```typescript
'Upload my document.pdf';
'Store this image.png on 0G';
'Save my resume.docx to Zero Gravity';
```

## Links

- [0G Documentation](https://docs.0g.xyz/)
- [IPFS Documentation](https://docs.ipfs.tech/)
- [Filecoin Docs](https://docs.filecoin.io/)
- [Flow Documentation](https://developers.flow.com/)
