<!-- Generated by scripts/gen-api-reference.js — do not edit by hand. --> <!-- Run npm run gen:api-reference to regenerate. -->

Built-in API reference

This page lists every method in the static RPC manifests of the server's built-in plugins. It is generated from the shared plugin registry in lib/builtin-plugins.js, so it stays in lock-step with what the server actually mounts at startup. Hand-written summaries live in docs/api-notes.json.

Coverage and boundaries

Included: the root database (lib/db) and every RPC-bearing built-in plugin — the complete set of methods this server exposes from its own static manifests.

Excluded by design:

Methods that do not yet have prose are shown as _Not yet documented._. The coverage count in the footer tracks documentation progress.

Root database (lib/db)

Methods on the server's root object. These are called without a namespace prefix (e.g. publish, whoami).

getasync

Fetch a single message by its key (message id).

Arguments:

Example:

ssb-server get '%abc...=.sha256'

addasync

Append an already-formed, validly-signed message to the local store without re-signing it. Used when ingesting messages from other feeds.

Arguments:

publishasync

Publish a new message to the local feed using the current identity, signing and appending it to the log.

Arguments:

Example:

ssb-server publish --type post --text 'hello world'

delasync

Delete a message or feed from the local store. Destructive and local-only; it does not unpublish anything that has already been replicated to peers.

queueasync

Queue a raw message for validation and storage without immediately flushing it to disk.

flushasync

Flush any queued writes, calling back once they are durably stored.

searchasync

Low-level full-store search hook exposed by the database. Most callers should prefer messagesByType or links.

createLogStreamsource

Stream messages in the order the local node received them. Supports limit, reverse, live, gt/gte/lt/lte, and keys/values options.

Example:

ssb-server createLogStream --limit 10 --reverse

createFeedStreamsource

Stream messages ordered by their claimed timestamp. Honors gt/gte/lt/lte range filters on the timestamp, plus limit, reverse, and live.

createHistoryStreamsource

Stream the messages of a single feed in sequence order, optionally starting from a given sequence. This is the core replication read used over the wire.

Arguments:

Example:

ssb-server createHistoryStream --id '@me=.ed25519' --seq 1

createUserStreamsource

Stream one feed's messages much like createHistoryStream, with the log-stream option shape (limit, reverse, gt/lt on sequence).

createWriteStreamsink

Sink that accepts messages and adds each one to the local store, the streaming counterpart of add.

createSequenceStreamsource

Stream the local store's overall sequence as it advances; useful for tracking write progress.

messagesByTypesource

Stream every message of a given type across all known feeds. This is the primary index used by Decent and ssbski to build their feeds.

Arguments:

Example:

ssb-server messagesByType --type post --reverse --limit 20

linkssource

Traverse link relationships between messages and feeds (e.g. who mentioned a message). Filter by source, dest, rel, and values.

latestsource

Stream the latest sequence for every feed in the local database (not only followed feeds), emitting { id, sequence, ts } records.

getLatestasync

Get the latest message for a single feed.

Arguments:

latestSequenceasync

Get the latest known sequence number (and timestamp) for a feed without returning the whole message.

Arguments:

getVectorClockasync

Return a map of every known feed to its latest sequence — a vector clock of local replication state.

getAtSequenceasync

Fetch the message at a specific [feedId, sequence] position.

Arguments:

whoamisync

Return the current local identity as { id }.

Example:

ssb-server whoami

readysync

Report whether the database has finished its initial load and is ready to serve reads.

progresssync

Return indexing/replication progress counters, used to drive the startup progress bar.

statussync

Return a snapshot of runtime status, including database and (when available) local-peer state.

versionsync

Return the running server version (the package version).

helpsync

Return inline help describing the methods available on the root object.

plugins

Provided by the ssb-plugins plugin.

plugins.installsource

Install a user plugin from npm into the configuration directory and stream installation output. Restart is required for it to load.

plugins.uninstallsource

Remove a previously installed user plugin, streaming the npm output.

plugins.enableasync

Mark an installed user plugin as enabled so it loads on the next start.

plugins.disableasync

Mark an installed user plugin as disabled so it is skipped on the next start.

plugins.helpsync

Return inline help for the plugins namespace.

gossip

Provided by the ssb-gossip plugin.

gossip.addsync

Register a peer address in the gossip table so the server may connect to it.

Arguments:

gossip.removesync

Remove a peer from the gossip table.

gossip.connectasync

Connect immediately to a peer by multiserver address.

Arguments:

Example:

ssb-server gossip.connect 'net:1.2.3.4:8008~shs:KEY'

gossip.disconnectasync

Drop an existing connection to a peer.

gossip.changessource

Stream gossip table change events as peers are added, connected, or dropped.

gossip.reconnectsync

Reset connections so the server retries peers from scratch.

gossip.disablesync

Disable a gossip transport or behavior at runtime.

gossip.enablesync

Enable a gossip transport or behavior at runtime.

gossip.pingduplex

Duplex keep-alive used between connected peers to measure liveness and clock skew.

gossip.getsync

Look up the gossip table entry for a specific peer.

gossip.peerssync

Return the current list of known peers and their connection state.

Example:

ssb-server gossip.peers

gossip.helpsync

Return inline help for the gossip namespace.

replicate — stub

Provided by the ssb-replicate-stub plugin. This is a compatibility stub; its methods are present for protocol compatibility but do little or no work in this build.

replicate.requestsync

Stub / no-op in this build. Historically, ask the replicator to (stop) replicating a feed. Replication here is handled by ebt.

replicate.blocksync

Stub / no-op in this build. Historically, mark a feed as blocked from replication. Retained for compatibility; blocking is expressed through the social graph.

ebt

Provided by the ssb-ebt plugin.

ebt.replicateduplex

Epidemic broadcast tree replication: the duplex stream peers use to exchange feed updates efficiently.

ebt.requestsync

Tell EBT to start or stop replicating a given feed.

Arguments:

ebt.blocksync

Tell EBT to refuse replicating a feed for a given peer relationship.

ebt.peerStatussync

Return EBT's view of replication progress for each peer and feed.

friends

Provided by the friends plugin.

friends.hopStreamsource

Stream changes to the hop-distance graph as follows and blocks are processed.

friends.onEdgesync

Subscribe to individual follow/block edge changes in the social graph.

friends.isFollowingasync

Report whether one feed follows another.

Arguments:

friends.isBlockingasync

Report whether one feed blocks another.

Arguments:

friends.hopsasync

Return a map of feed id to hop distance from the local identity (0 = self, 1 = followed, etc.), the set used to decide what to replicate.

Example:

ssb-server friends.hops

friends.helpsync

Return inline help for the friends namespace.

friends.getasync

Return the raw follow/block graph as nested { source: { dest: state } } maps.

Example:

ssb-server friends.get

friends.createFriendStreamsource

Stream feed ids within a hop range, optionally live, as the graph grows.

friends.streamsource

Stream the full hops state and subsequent updates as a single live view.

blobs

Provided by the ssb-blobs plugin.

blobs.getsource

Stream the bytes of a blob by its hash id.

Arguments:

Example:

ssb-server blobs.get '&abc...=.sha256'

blobs.getSlicesource

Stream a byte range of a blob, given { key, start, end }.

blobs.addsink

Sink that stores incoming bytes as a content-addressed blob and calls back with its hash. The CLI blobs.add wrapper feeds a file or stdin into it.

Example:

cat photo.png | ssb-server blobs.add

blobs.rmasync

Remove a blob from the local store.

blobs.lssource

Stream the hashes of all blobs currently held locally.

blobs.hasasync

Report whether one or more blobs are present locally.

Arguments:

blobs.sizeasync

Return the byte size of a locally-held blob, or null if absent.

blobs.metaasync

Return metadata about the blob store or a specific blob.

blobs.wantasync

Register interest in a blob so the server fetches it from peers that have it, calling back when it arrives.

Arguments:

Example:

ssb-server blobs.want '&abc...=.sha256'

blobs.pushasync

Actively push a blob out to peers rather than waiting for them to want it.

blobs.changessource

Stream notifications as blobs are added to the local store.

blobs.createWantssource

Stream the current want-list — blobs this node is seeking — used during peer exchange.

blobs.helpsync

Return inline help for the blobs namespace.

invite

Provided by the invite plugin.

invite.createasync

Create an invite code that another peer can redeem to connect to and be followed by this server.

Arguments:

Example:

ssb-server invite.create 1

invite.useasync

Server side of redemption: accept a redeeming peer, follow them, and confirm the invite.

Arguments:

invite.acceptasync

Client side of redemption: connect to the inviting pub using an invite code, request access, and publish a follow.

Arguments:

Example:

ssb-server invite.accept 'host:port:@key=.ed25519~SEED'

git

Provided by the git-server plugin.

git.createasync

Create a new git repository feed message, returning the repo id used by the git-over-SSB / git-over-HTTP server.

Example:

ssb-server git.create --name my-repo

query — stub

Provided by the ssb-query plugin. This is a compatibility stub; its methods are present for protocol compatibility but do little or no work in this build.

query.readsource

Stub / no-op in this build. Unsupported compatibility method. This fails with an explicit error in SQLite mode; use messagesByType or root links instead.

Arguments:

query.explainsync

Stub / no-op in this build. Return the index and plan a given query would use, for debugging query selection.

query.helpsync

Stub / no-op in this build. Return inline help for the query namespace.

links2

Provided by the ssb-links plugin.

links2.readsource

Stream link relationships between messages and feeds with filtering on source, dest, and rel. This is the working link index in this build (links on the root delegates to the same data).

Arguments:

links2.helpsync

Return inline help for the links2 namespace.

ooo — stub

Provided by the ssb-ooo-stub plugin. This is a compatibility stub; its methods are present for protocol compatibility but do little or no work in this build.

ooo.streamduplex

Stub / no-op in this build. Out-of-order message stream. This build ships a stub, so the stream yields nothing.

ooo.getasync

Stub / no-op in this build. Fetch an out-of-order message by id. Stubbed in this build.

ooo.helpsync

Stub / no-op in this build. Return inline help for the ooo namespace.


Coverage: 83 of 83 built-in static manifest methods documented.