A robust, end-to-end framework for authenticated digital art generation and provenance, leveraging Ethereum Sepolia and IPFS.
Penguin establishes a secure lineage for AI-generated content by combining cryptographic signing, steganographic watermarking, and blockchain-based immutable storage. It provides a complete "cDNA" (creative DNA) for digital assets, ensuring transparency and authenticity from creation to certification.
- Authenticated Generation: Deterministic AI art generation with embedded cryptographic proofs.
- Steganographic Watermarking: Unique, imperceptible noise patterns embedding creator identity.
- Immutable Provenance: On-chain manifest storage on Ethereum Sepolia for tamper-proof history.
- Decentralized Storage: Assets stored on IPFS via Pinata for reliable, distributed access.
- Browser Extension: Seamlessly capture and certify prompts directly from web interfaces.
- Public Verification: Open tools for verifying asset authenticity and lineage without requiring registration.
- Backend: Go (Echo Framework)
- Frontend: React, Vite, Tailwind CSS
- Smart Contracts: Solidity, Hardhat, Ethereum Sepolia
- Storage: Pinata (IPFS)
- Machine Learning: TorchServe (PyTorch)
- Cryptography: Ed25519, BLAKE3, SHA-256
Before you begin, ensure you have the following installed and configured:
- Go 1.22+
- Node.js 20+ (with npm or pnpm)
- Air: For backend hot-reloading (
go install github.com/air-verse/air@latest) - External Accounts:
- Pinata (for IPFS storage)
- Infura (for Ethereum RPC)
- Sepolia Faucet (for testnet ETH)
# Clone the repository
git clone https://github.com/yourusername/penguin.git
cd penguin
# Install root dependencies (Hardhat)
npm installCreate a .env file at the root to configure your blockchain credentials:
INFURA_PROJECT_ID=your_infura_id
PRIVATE_KEY=0x_your_wallet_private_keyDeploy the contract:
npx hardhat run scripts/deploy.js --network sepoliaNote: This will generate
api/internal/eth/abi.jsonandapi/internal/eth/contract_address.txt. Copy the contract address for the backend configuration.
Navigate to the API directory and configure the environment:
cd api
go mod tidy
cp .env.example .envEdit api/.env with your specific keys:
# Ethereum
INFURA_PROJECT_ID=your_infura_id
RPC_URL=https://sepolia.infura.io/v3/your_infura_id
PRIVATE_KEY=0x_your_private_key
CONTRACT_ADDRESS=0x_deployed_contract_address
# IPFS (Pinata)
PINATA_API_KEY=your_pinata_key
PINATA_API_SECRET=your_pinata_secretStart the backend server:
# Using Air (Recommended for dev)
air
# OR using Go directly
go run ./cmd/serverThe server runs on http://localhost:8787 and launches TorchServe on http://127.0.0.1:8080.
cd frontend
npm install
# Optional: Configure API URL
export VITE_API_URL="http://localhost:8787"
npm run devAccess the dashboard at http://localhost:5173.
cd extension
npm install
npm run buildLoad the dist/ directory as an unpacked extension in Chrome/Chromium (chrome://extensions).
POST /upload: Upload authentication manifest to IPFS and Ethereum.GET /verify?key=/ipfs/<cid>: verify an asset's signature and provenance.
POST /generate: Create new certified AI artwork.POST /certificate/:id: Retrieve proof certificate.POST /model/predict: Run authenticity checks against the local model.
POST /ext/push: Receive prompt data captured by the browser extension.
- Pinata IPFS & Ethereum Sepolia integration
- Watermarking & Certificate generation
- Session graph UI visualization
- Perceptual hashing (pHash)
- Multi-chain support (Polygon, Base)
License: MIT