Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
ActivityPub relay support for Fedify
Functions
Factory function to create a relay instance.
Interfaces
Public interface for ActivityPub relay implementations. Use createRelay to create a relay instance.
- fetch(request: Request): Promise<Response>
Handle incoming HTTP requests.
- getActorUri(): Promise<URL>
Gets the URI of the relay actor.
- getFollower(actorId: string): Promise<RelayFollower | null>
Gets a specific follower by actor ID.
- getSharedInboxUri(): Promise<URL>
Gets the shared inbox URI of the relay.
- listFollowers(): AsyncIterableIterator<RelayFollower>
Lists all followers of the relay.
A follower of the relay with validated Actor instance. This is the public API type returned by follower query methods.
Configuration options for the ActivityPub relay.
- authenticatedDocumentLoaderFactory: AuthenticatedDocumentLoaderFactory
Factory function for creating an authenticated document loader that signs HTTP requests when fetching remote objects.
- documentLoaderFactory: DocumentLoaderFactory
Factory function for creating a document loader to fetch remote ActivityPub objects.
- kv: KvStore
Key-value store for persisting relay data such as follower information and cryptographic keys.
- name: string
Display name for the relay actor. Defaults to
"ActivityPub Relay". - origin: string
The origin URL where the relay is hosted. Must be a full URL including the protocol (e.g.,
"https://relay.example.com"). - queue: MessageQueue
Message queue for background activity processing. Recommended for production to handle activity forwarding asynchronously.
- subscriptionHandler: SubscriptionRequestHandler
Handler function that determines whether to approve or reject subscription requests from remote actors. Return
trueto approve orfalseto reject.
Type Aliases
Supported relay types.
Handler for subscription requests (Follow/Undo activities).