SKILL: extract-blockchain-media Slug: extract-blockchain-media Version: 1.0.0 Author: A4PYmuKGG61WCjjBaRpuSEbqytG Author BAP ID: A4PYmuKGG61WCjjB...uSEbqytG DESCRIPTION: This skill should be used when extracting media files from BSV blockchain transactions — downloading inscribed ordinals, retrieving on-chain images/videos/files, or accessing ORDFS content. Triggers on 'extract inscription', 'download ordinal', 'get on-chain file', 'ORDFS content', 'txex', 'blockchain media', or 'inscribed content'. Uses txex CLI for raw extraction, ORDFS gateway for HTTP access. STATS: Stars: 0 Downloads (30d): 0 Downloads (all-time): 0 SKILL.md: -------------------------------------------------------------------------------- # Extract Blockchain Media Extract media files from BSV blockchain transactions using `txex` CLI or access them via the ORDFS gateway. ## Two Approaches | Method | Best For | How | |--------|----------|-----| | **txex CLI** | Raw extraction, offline archival, batch processing | `txex ` — downloads files to disk | | **ORDFS Gateway** | HTTP access, embedding in apps, streaming | `https://ordfs.network/` or `https://api.1sat.app/1sat/content/` | ## txex CLI ```bash # Install bun add -g txex # Extract all media from a transaction txex # Extract to specific output directory txex -o /path/to/output ``` ### Using the Skill Script ```bash bun run /path/to/skills/extract-blockchain-media/scripts/extract.ts [output-dir] ``` ### What Gets Extracted - Images (PNG, JPG, GIF, WEBP) - Videos (MP4, WEBM) - Audio files (MP3, WAV, OGG) - Text/JSON/Markdown data - Any binary data inscribed in the transaction Files are saved with auto-detected extensions based on content type. ## ORDFS Gateway (HTTP Access) For programmatic or browser access, use the ORDFS gateway instead of extracting to disk: ```typescript // By outpoint (txid_vout) const url = 'https://ordfs.network/abc123...def456_0' // Via 1sat-stack const url = 'https://api.1sat.app/1sat/content/abc123...def456_0' // Stream content const url = 'https://api.1sat.app/1sat/ordfs/stream/abc123...def456_0' // Get metadata only const url = 'https://api.1sat.app/1sat/ordfs/metadata/abc123...def456_0' const res = await fetch(url) const contentType = res.headers.get('content-type') // e.g., 'image/png' const data = await res.arrayBuffer() ``` ORDFS serves content with correct `Content-Type` headers, making it suitable for ``, `