Skip to content

Instantly share code, notes, and snippets.

View jj10133's full-sized avatar
🎯
Focusing

JJ jj10133

🎯
Focusing
View GitHub Profile
@lejeunerenard
lejeunerenard / blob-server.mjs
Created March 14, 2025 01:55
Example of using `hypercore-blob-server` to download hyperdrive files sparsely
import Hyperswarm from 'hyperswarm'
import Hypercore from 'hypercore'
import Corestore from 'corestore'
import BlobServer from 'hypercore-blob-server'
import b4a from 'b4a'
const keyInput = Bare.argv[2]
if (!keyInput) throw new Error('provide a key')
const key = b4a.from(keyInput, 'hex')