git ssb

2+

cel / scuttlebot.io



Tree: 13691e1ee2bb8b8cec137e18d9f495648fba6793

Files: 13691e1ee2bb8b8cec137e18d9f495648fba6793 / tmpl / apis / scuttlebot / blobs.md

1449 bytesRaw

scuttlebot blobs plugin

Send/receive files by content-hashes.

get: source

Get a blob by its ID.

get {blobid}
get(blobid)

has: async

Check if the blob of the given ID is stored in the DB.

has {blobid}
has(blobid, cb)

add: sink

Add a new blob to the DB.

cat ./file | add [hash]
pull(source, add(hash, cb))

rm: async

Remove a blob from the store.

rm hash
rm(hash, cb)

ls: source

List the hashes of the blobs in the DB.

ls
ls()

want: async

Begin searching the network for the blob of the given hash.

want {hash} [--nowait]
want(hash, { nowait: }, cb)

By default, want will not call the cb until the blob has been downloaded. If you want the cb to be called immediately, specify nowait: true. The cb will be called with true/false as the value, telling you if the blob was already present.

wants: sync

List the currently-wanted blobs' data-structures.

wants
wants()

changes: source

Listen for any newly-downloaded blobs.

changes
changes()

When a blob is downloaded, this stream will emit the hash of the blob.

Built with git-ssb-web