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.
Extract media files from BSV blockchain transactions using txex CLI or access them via the ORDFS gateway.
| Method | Best For | How |
|---|---|---|
| txex CLI | Raw extraction, offline archival, batch processing | txex <txid> — downloads files to disk |
| ORDFS Gateway | HTTP access, embedding in apps, streaming | https://ordfs.network/<outpoint> or https://api.1sat.app/1sat/content/<path> |
# Install
bun add -g txex
# Extract all media from a transaction
txex <txid>
# Extract to specific output directory
txex <txid> -o /path/to/output
bun run /path/to/skills/extract-blockchain-media/scripts/extract.ts <txid> [output-dir]
Files are saved with auto-detected extensions based on content type.
For programmatic or browser access, use the ORDFS gateway instead of extracting to disk:
// 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 <img>, <video>, and <audio> tags directly.
<img src="..."> tags