An ActivityPub/fediverse server framework
Classes
Tracks reachability state for remote outbox delivery hosts.
- beforeSend(): Promise<CircuitBreakerBeforeSendDecision>remoteHost: string,message: { readonly circuitHeldSince?: string; }No documentation available
- capHeldDelay(): Temporal.DurationheldSince: Temporal.Instant,delay: Temporal.DurationNo documentation available
- dropActivity(): Promise<void>remoteHost: string,details: CircuitBreakerActivityDropNo documentation available
- getState(remoteHost: string): Promise<CircuitBreakerKvState | undefined>No documentation available
- options(): NormalizedCircuitBreakerOptionsNo documentation available
- pendingSweep(): Promise<void> | undefined
The currently running background legacy sweep, if any.
- recordFailure(remoteHost: string): Promise<CircuitBreakerStateChange | undefined>No documentation available
- recordReachableFailure(remoteHost: string): Promise<CircuitBreakerStateChange | undefined>No documentation available
- recordSuccess(remoteHost: string): Promise<CircuitBreakerStateChange | undefined>No documentation available
A message queue that processes messages in the same process. Do not use this in production as it does neither persist messages nor distribute them across multiple processes.
- enqueue(): Promise<void>message: any,options?: MessageQueueEnqueueOptionsNo documentation available
- enqueueMany(): Promise<void>messages: readonly any[],options?: MessageQueueEnqueueOptionsNo documentation available
- getDepth(): Promise<MessageQueueDepth>No documentation available
- listen(): Promise<void>handler: (message: any) => Promise<void> | void,options?: MessageQueueListenOptionsNo documentation available
- nativeRetrial: boolean
In-process message queue does not provide native retry mechanisms.
A key–value store that stores values in memory. Do not use this in production as it does not persist values.
- cas(): Promise<boolean>key: KvKey,expectedValue: unknown,newValue: unknown,options?: KvStoreSetOptions
{@inheritDoc KvStore.cas}
- delete(key: KvKey): Promise<void>
{@inheritDoc KvStore.delete}
- get<T = unknown>(key: KvKey): Promise<T | undefined>
{@inheritDoc KvStore.get}
- list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>
{@inheritDoc KvStore.list}
- set(): Promise<void>key: KvKey,value: unknown,options?: KvStoreSetOptions
{@inheritDoc KvStore.set}
A message queue that processes messages in parallel. It takes another MessageQueue, and processes messages in parallel up to a certain number of workers.
- enqueue(): Promise<void>message: any,options?: MessageQueueEnqueueOptionsNo documentation available
- enqueueMany(): Promise<void>messages: readonly any[],options?: MessageQueueEnqueueOptionsNo documentation available
- getDepth: () => Promise<MessageQueueDepth>No documentation available
- listen(): Promise<void>handler: (message: any) => Promise<void> | void,options?: MessageQueueListenOptionsNo documentation available
- nativeRetrial: boolean
Inherits the native retry capability from the wrapped queue.
- queue: MessageQueueNo documentation available
- workers: numberNo documentation available
An error that is thrown when an activity fails to send to a remote inbox. It contains structured information about the failure, including the HTTP status code, the inbox URL, and the response body.
- inbox: URL
The inbox URL that the activity was being sent to.
- responseBody: string
The response body from the inbox, if any. Note that this may be truncated to a maximum of 1 KiB to prevent excessive memory consumption when remote servers return large error pages (e.g., Cloudflare error pages). If truncated, the string will end with
"… (truncated)". - responseHeaders: Headers
The response headers from the inbox.
- statusCode: number
The HTTP status code returned by the inbox.
- add(): Set<string>template: string,name: string
Adds a new path rule to the router.
- build(): string | nullname: string,values: Record<string, string>
Constructs a URL/path from a path name and values.
- clone(): Router
Clones this router.
- has(name: string): boolean
Checks if a path name exists in the router.
- route(url: string): RouterRouteResult | null
Resolves a path name and values from a URL, if any match.
- trailingSlashInsensitive(): boolean
Whether to ignore trailing slashes when matching paths.
An error thrown by the Router.
Functions
An activity transformer that dehydrates the actor property of an activity so that it only contains the actor's URI. For example, suppose we have an activity like this:
Attaches a LD signature to the given JSON-LD document.
An activity transformer that assigns a new random ID to an activity if it does not already have one. This is useful for ensuring that activities have an ID before they are sent to other servers.
Builds Collection-Synchronization header content.
Creates an exponential backoff retry policy. The delay between retries
starts at the initialDelay and is multiplied by the factor for each
subsequent retry, up to the maxDelay. The policy will give up after
maxAttempts attempts. The actual delay is randomized to avoid
synchronization (jitter).
Create a new Federation instance.
Creates a new FederationBuilder instance.
Creates a proof for the given object.
Creates a LD signature for the given JSON-LD document.
Detaches Linked Data Signatures from the given JSON-LD document.
Calculates the partial follower collection digest.
Checks if the actor of the given activity owns the specified key.
Exports a key in JWK format.
Fetches a CryptographicKey or Multikey from the given URL.
If the given URL contains an Actor object, it tries to find
the corresponding key in the publicKey or assertionMethod property.
Fetches a CryptographicKey or Multikey from the given URL, preserving transport-level fetch failures for callers that need to inspect why the key could not be loaded.
Serializes an array of AcceptSignatureMember objects into an
Accept-Signature header value string (RFC 9421 §5.1).
Attempts to translate an AcceptSignatureMember challenge into RFC 9421 signing options that the local signer can fulfill.
Generates a key pair which is appropriate for Fedify.
Gets an authenticated DocumentLoader for the given identity. Note that an authenticated document loader intentionally does not cache the fetched documents.
Gets the default activity transformers that are applied to all outgoing activities.
Gets the actor that owns the specified key. Returns null if the key has no
known owner.
Fetches a NodeInfo document from the given URL.
Handles a WebFinger request. You would not typically call this function directly, but instead use Federation.fetch method.
Checks if the given JSON-LD document has a DataIntegrityProof-like object, without fully deserializing it into vocabulary classes.
Checks if the given JSON-LD document has a Linked Data Signature-like object, without restricting it to a single suite-specific shape.
Imports a key from JWK format.
Converts a NodeInfo object to a JSON value.
Normalizes user-provided circuit breaker options into the internal policy shape used while processing queued outbox deliveries.
Parses an Accept-Signature header value (RFC 9421 §5.1) into an
array of AcceptSignatureMember objects.
Parses a value loaded from the circuit breaker KV store.
Parses a NodeInfo document.
Responds with the given object in JSON-LD format.
Responds with the given object in JSON-LD format if the request accepts JSON-LD.
Signs the given JSON-LD document with the private key and returns the signed JSON-LD document.
Signs the given object with the private key and returns the signed object.
Signs a request using the given private key.
Filters out AcceptSignatureMember entries whose covered
components include response-only identifiers (@status) that are
not applicable to request-target messages, as required by
RFC 9421 §5.
Verify the authenticity of the given JSON-LD document using Linked Data
Signatures. If the document is signed, this function verifies the signature
and checks if the document is attributed to the owner of the public key.
If the document is not signed, this function returns false.
& { fromJsonLd(
Verifies the given object. It will verify all the proofs in the object, and succeed only if all the proofs are valid and all attributions and actors are authenticated by the proofs.
Verifies the given proof for the object.
Verifies the signature of a request.
Verifies the signature of a request and returns a structured failure reason when verification does not succeed.
Verifies Linked Data Signatures of the given JSON-LD document.
Interfaces
Represents a single member of the Accept-Signature Dictionary
Structured Field, as defined in
RFC 9421 §5.1.
- components: AcceptSignatureComponent[]
The exact list of covered component identifiers requested for the target signature, including all applicable component parameters, as required by RFC 9421 §5.1.
- label: string
The label that uniquely identifies the requested message signature within the context of the target HTTP message (e.g.,
"sig1"). - parameters: AcceptSignatureParameters
Optional signature metadata parameters requested by the verifier.
Signature metadata parameters that may appear in an
Accept-Signature member, as defined in
RFC 9421 §5.1.
- alg: string
If present, the signer is requested to use the indicated algorithm from the HTTP Signature Algorithms registry.
- created: true
If
true, the signer is requested to generate and include a creation timestamp. This parameter has no associated value in the wire format. - expires: true
If
true, the signer is requested to generate and include an expiration timestamp. This parameter has no associated value in the wire format. - keyid: string
If present, the signer is requested to use the indicated key material to create the target signature.
- nonce: string
If present, the signer is requested to include this value as the signature nonce in the target signature.
- tag: string
If present, the signer is requested to include this value as the signature tag in the target signature.
Additional settings for the actor dispatcher.
- authorize(predicate: AuthorizePredicate<TContextData>): ActorCallbackSetters<TContextData>
Specifies the conditions under which requests are authorized.
- mapActorAlias(): ActorCallbackSetters<TContextData>path: `/${string}`,identifier: string
Maps a fixed path to a sentinel identifier. It is useful for exposing a single, instance-level actor at a fixed path, such as
/actorfor a relay or/botfor a bot. - mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>
Sets the callback function that maps a WebFinger query to the corresponding actor's identifier or username. If it's omitted, the WebFinger handler only supports the actor URIs and
acct:URIs. If you want to support other queries, you should set this dispatcher. - mapHandle(mapper: ActorHandleMapper<TContextData>): ActorCallbackSetters<TContextData>
Sets the callback function that maps a WebFinger username to the corresponding actor's identifier. If it's omitted, the identifier is assumed to be the same as the WebFinger username, which makes your actors have the immutable handles. If you want to let your actors change their fediverse handles, you should set this dispatcher.
- setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>): ActorCallbackSetters<TContextData>
Sets the key pairs dispatcher for actors.
A pair of a public key and a private key in various formats.
- cryptographicKey: CryptographicKey
A CryptographicKey instance of the public key.
- keyId: URL
The URI of the public key for CryptographicKey, which is used for verifying HTTP Signatures and Linked Data Signatures. Note that this is the ID of the cryptographicKey, not of the multikey; the Multikey instance has a distinct ID of its own.
- multikey: Multikey
A Multikey instance of the public key.
Details passed to CircuitBreakerOptions.onActivityDrop when a held activity expires before the remote host recovers.
- activity: Activity
The activity that was dropped.
- activityId: string
The activity ID, when known.
- activityType: string
The activity type.
- actorIds: readonly URL[]
The actor IDs represented by this inbox.
- heldSince: Temporal.Instant
The time when Fedify first held this activity.
- inbox: URL
The inbox URL that would have received the activity.
The JSON-serializable state stored in the configured KvStore.
- failures: readonly string[]No documentation available
- halfOpened: stringNo documentation available
- opened: stringNo documentation available
- state: CircuitBreakerStateNo documentation available
A circuit breaker state transition.
- newState: CircuitBreakerStateNo documentation available
- previousState: CircuitBreakerStateNo documentation available
Additional settings for a collection dispatcher.
- authorize(predicate: AuthorizePredicate<TContextData>): CollectionCallbackSetters<TContext, TContextData, TFilter>
Specifies the conditions under which requests are authorized.
- setCounter(counter: CollectionCounter<TContextData, TFilter>): CollectionCallbackSetters<TContext, TContextData, TFilter>
Sets the counter for the collection.
- setFirstCursor(cursor: CollectionCursor<TContext, TContextData, TFilter>): CollectionCallbackSetters<TContext, TContextData, TFilter>
Sets the first cursor for the collection.
- setLastCursor(cursor: CollectionCursor<TContext, TContextData, TFilter>): CollectionCallbackSetters<TContext, TContextData, TFilter>
Sets the last cursor for the collection.
A context.
- canonicalOrigin: string
The canonical origin of the federated server, including the scheme (
http://orhttps://) and the host (e.g.,example.com:8080). - clone(data: TContextData): Context<TContextData>
Creates a new context with the same properties as this one, but with the given data.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- data: TContextData
The user-defined data associated with the context.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- federation: Federation<TContextData>
The federation object that this context belongs to.
- getActorKeyPairs(identifier: string): Promise<ActorKeyPair[]>
Gets the key pairs for an actor.
- getActorUri(identifier: string): URL
Builds the URI of an actor with the given identifier.
- getCollectionUri<TParam extends Record<string, string>>(): URLname: string | symbol,values: TParam
Builds the URI of a collection of objects with the given name and values.
- getDocumentLoader(identity: { identifier: string; } | { username: string; }): Promise<DocumentLoader>
Gets an authenticated DocumentLoader for the given identity. Note that an authenticated document loader intentionally does not cache the fetched documents.
- getFeaturedTagsUri(identifier: string): URL
Builds the URI of an actor's featured tags collection with the given identifier.
- getFeaturedUri(identifier: string): URL
Builds the URI of an actor's featured collection with the given identifier.
- getFollowersUri(identifier: string): URL
Builds the URI of an actor's followers collection with the given identifier.
- getFollowingUri(identifier: string): URL
Builds the URI of an actor's following collection with the given identifier.
- getInboxUri(): URL
Builds the URI of the shared inbox.
- getLikedUri(identifier: string): URL
Builds the URI of an actor's liked collection with the given identifier.
- getNodeInfoUri(): URL
Builds the URI of the NodeInfo document.
- getObjectUri<TObject extends Object>(): URLcls: ConstructorWithTypeId<TObject>,values: Record<string, string>
Builds the URI of an object with the given class and values.
- getOutboxUri(identifier: string): URL
Builds the URI of an actor's outbox with the given identifier.
- host: string
The host of the federated server, including the hostname (e.g.,
example.com) and the port following a colon (e.g.,:8080) if it is not the default port for the scheme. - hostname: string
The hostname of the federated server (e.g.,
example.com). This is the same as the host without the port. - lookupNodeInfo(): Promise<NodeInfo | undefined>url: URL | string,options?: GetNodeInfoOptions & { parse?: "strict" | "best-effort"; }
Fetches the NodeInfo document from the given URL.
- lookupObject(): Promise<Object | null>identifier: string | URL,options?: LookupObjectOptions
Looks up an ActivityStreams object by its URI (including
acct:URIs) or a fediverse handle (e.g.,@user@serveroruser@server). - lookupWebFinger(): Promise<ResourceDescriptor | null>resource: URL | string,options?: LookupWebFingerOptions
Looks up a WebFinger resource.
- meterProvider: MeterProvider
The OpenTelemetry meter provider.
- origin: string
The origin of the federated server, including the scheme (
http://orhttps://) and the host (e.g.,example.com:8080). - parseUri(uri: URL | null): ParseUriResult | null
Determines the type of the URI and extracts the associated data.
- routeActivity(): Promise<boolean>recipient: string | null,activity: Activity,options?: RouteActivityOptions
Manually routes an activity to the appropriate inbox listener.
- sendActivity(): Promise<void>sender:SenderKeyPair
| SenderKeyPair[]
| { identifier: string; }
| { username: string; },recipients: Recipient | Recipient[],activity: Activity,options?: SendActivityOptionsSends an activity to recipients' inboxes.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider.
- traverseCollection(): AsyncIterable<Object | Link>collection: Collection,options?: TraverseCollectionOptions
Traverses a collection, yielding each item in the collection. If the collection is paginated, it will fetch the next page automatically.
Options for createExponentialBackoffPolicy function.
- factor: number
The factor to multiply the previous delay by for each retry. Defaults to 2.
- initialDelay: Temporal.DurationLike
The initial delay before the first retry. Defaults to 1 second.
- jitter: boolean
Whether to add jitter to the delay to avoid synchronization. Turned on by default.
- maxAttempts: number
The maximum number of attempts before giving up. Defaults to 10.
- maxDelay: Temporal.DurationLike
The maximum delay between retries. Defaults to 12 hours.
Options for createProof.
- context:string
| Record<string, string>
| (string | Record<string, string>)[]The JSON-LD context to use for serializing the object to sign.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- created: Temporal.Instant
The time when the proof was created. If not specified, the current time will be used.
Options for creating Linked Data Signatures.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- created: Temporal.Instant
The time when the signature was created. If not specified, the current time will be used.
Additional settings for a custom collection dispatcher.
- authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>
Specifies the conditions under which requests are authorized.
- setCounter(counter: CustomCollectionCounter<TParam, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>
Sets the counter for the custom collection.
- setFirstCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>
Sets the first cursor for the custom collection.
- setLastCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>
Sets the last cursor for the custom collection.
Options for doesActorOwnKey.
- contextLoader: DocumentLoader
The context loader to use for JSON-LD context retrieval.
- documentLoader: DocumentLoader
The document loader to use for fetching the actor.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider to use for tracing. If omitted, the global tracer provider is used.
A common interface between Federation and FederationBuilder.
- setActorDispatcher(): ActorCallbackSetters<TContextData>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: ActorDispatcher<TContextData>
Registers an actor dispatcher.
- setCollectionDispatcher<TObject extends Object, TParam extends string>(): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>name: string | symbol,itemType: ConstructorWithTypeId<TObject>,path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`,dispatcher: CustomCollectionDispatcher<>TObject,TParam,RequestContext<TContextData>,TContextData
Registers a collection of objects dispatcher.
- setFeaturedDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<Object, RequestContext<TContextData>, TContextData, void>
Registers a featured collection dispatcher.
- setFeaturedTagsDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>
Registers a featured tags collection dispatcher.
- setFollowersDispatcher(): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>
Registers a followers collection dispatcher.
- setFollowingDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<>Actor | URL,RequestContext<TContextData>,TContextData,void
Registers a following collection dispatcher.
- setInboxDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>
Registers an inbox dispatcher.
- setInboxListeners(): InboxListenerSetters<TContextData>inboxPath: `${string}${Rfc6570Expression<"identifier">}${string}`,sharedInboxPath?: string
Assigns the URL path for the inbox and starts setting inbox listeners.
- setLikedDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<>Object | URL,RequestContext<TContextData>,TContextData,void
Registers a liked collection dispatcher.
- setNodeInfoDispatcher(): voidpath: string,dispatcher: NodeInfoDispatcher<TContextData>
Registers a NodeInfo dispatcher.
- setObjectDispatcher<TObject extends Object, TParam extends string>(): ObjectCallbackSetters<TContextData, TObject, TParam>cls: ConstructorWithTypeId<TObject>,path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`,dispatcher: ObjectDispatcher<TContextData, TObject, TParam>
Registers an object dispatcher.
- setOrderedCollectionDispatcher<TObject extends Object, TParam extends string>(): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>name: string | symbol,itemType: ConstructorWithTypeId<TObject>,path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`,dispatcher: CustomCollectionDispatcher<>TObject,TParam,RequestContext<TContextData>,TContextData
Registers an ordered collection of objects dispatcher.
- setOutboxDispatcher(): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>path: `${string}${Rfc6570Expression<"identifier">}${string}`,dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>
Registers an outbox dispatcher.
- setOutboxListeners(outboxPath: `${string}${Rfc6570Expression<"identifier">}${string}`): OutboxListenerSetters<TContextData>
Assigns the URL path for the outbox and starts setting outbox listeners.
- setOutboxPermanentFailureHandler(handler: OutboxPermanentFailureHandler<TContextData>): void
Registers a handler for permanent delivery failures.
- setWebFingerLinksDispatcher(dispatcher: WebFingerLinksDispatcher<TContextData>): void
Registers a links dispatcher to WebFinger
An object that registers federation-related business logic and dispatches requests to the appropriate handlers.
- createContext(): Context<TContextData>baseUrl: URL,contextData: TContextData
Create a new context.
- fetch(): Promise<Response>request: Request,options: FederationFetchOptions<TContextData>
Handles a request related to federation. If a request is not related to federation, the
onNotFoundoronNotAcceptablecallback is called. - processQueuedTask(): Promise<void>contextData: TContextData,message: Message
Processes a queued message task. This method handles different types of tasks such as fanout, outbox, and inbox messages.
- startQueue(): Promise<void>contextData: TContextData,options?: FederationStartQueueOptions
Manually start the task queue.
Options for cooperative benchmark mode.
- allowUnsafeTriggerRecipients: boolean
Whether the benchmark trigger endpoint may deliver to recipients outside FederationBenchmarkOptions.triggerSinks.
- triggerSinks: readonly (string | URL)[]
Server-controlled inbox URLs that the benchmark trigger endpoint may deliver to.
A builder for creating a Federation object. It defers the actual instantiation of the Federation object until the build method is called so that dispatchers and listeners can be registered before the Federation object is instantiated.
- build(options: FederationOptions<TContextData>): Promise<Federation<TContextData>>
Builds the federation object.
Parameters of Federation.fetch method.
- contextData: TContextData
The context data to pass to the Context.
- onNotAcceptable: (request: Request) => Response | Promise<Response>
A callback to handle a request when the request's
Acceptheader is not acceptable. If not provided, a 406 response is returned. - onNotFound: (request: Request) => Response | Promise<Response>
A callback to handle a request when the route is not found. If not provided, a 404 response is returned.
- onUnauthorized: (request: Request) => Response | Promise<Response>
A callback to handle a request when the request is unauthorized. If not provided, a 401 response is returned.
Prefixes for namespacing keys in the Deno KV store.
- acceptSignatureNonce: KvKey
The key prefix used for storing
Accept-Signaturechallenge nonces. Only used when InboxChallengePolicy.requestNonce istrue. - activityIdempotence: KvKey
The key prefix used for storing whether activities have already been processed or not.
- circuitBreaker: KvKey
The key prefix used for storing outbound delivery circuit breaker state.
- httpMessageSignaturesSpec: KvKey
The key prefix used for caching HTTP Message Signatures specs. The cached spec is used to reduce the number of requests to make signed requests ("double-knocking" technique).
- publicKey: KvKey
The key prefix used for caching public keys.
- remoteDocument: KvKey
The key prefix used for storing remote JSON-LD documents.
Options for creating a Federation object.
- activityTransformers: readonly ActivityTransformer<TContextData>[]
Activity transformers that are applied to outgoing activities. It is useful for adjusting outgoing activities to satisfy some ActivityPub implementations.
- allowPrivateAddress: boolean
Whether to allow fetching private network addresses in the document loader.
- authenticatedDocumentLoaderFactory: AuthenticatedDocumentLoaderFactory
A factory function that creates an authenticated document loader for a given identity. This is used for fetching documents that require authentication.
- benchmarkMode: boolean | FederationBenchmarkOptions
Whether to enable cooperative benchmark mode. This mode exposes benchmark-only endpoints and relaxes selected defaults for benchmark targets. Pass an object to configure benchmark trigger delivery. Do not enable this option in production.
- circuitBreaker: false | CircuitBreakerOptions
The circuit breaker for queued outbound activity delivery. When enabled, Fedify tracks repeated failures per remote host and temporarily holds queued activities instead of repeatedly hammering an unreachable server.
- contextLoaderFactory: DocumentLoaderFactory
A custom JSON-LD context loader factory. By default, this uses the same loader as the document loader.
- documentLoaderFactory: DocumentLoaderFactory
A custom JSON-LD document loader factory. By default, this uses the built-in cache-backed loader that fetches remote documents over HTTP(S).
- firstKnock: HttpMessageSignaturesSpec
The HTTP Signatures specification to use for the first signature attempt when communicating with unknown servers. This option affects the "double-knocking" mechanism as described in the ActivityPub HTTP Signature documentation.
- inboxChallengePolicy: InboxChallengePolicy
The policy for emitting
Accept-Signaturechallenges on inbox401responses (RFC 9421 §5). When enabled, failed HTTP Signature verification responses will include anAccept-Signatureheader telling the sender which components and parameters to include. - inboxRetryPolicy: RetryPolicy
The retry policy for processing incoming activities. By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours.
- kv: KvStore
The key–value store used for caching, outbox queues, and inbox idempotence.
- kvPrefixes: Partial<FederationKvPrefixes>
Prefixes for namespacing keys in the Deno KV store. By default, all keys are prefixed with
["_fedify"]. - manuallyStartQueue: boolean
Whether to start the task queue manually or automatically.
- meterProvider: MeterProvider
The OpenTelemetry meter provider for recording metrics. If not provided, the default global meter provider is used.
- onOutboxError: OutboxErrorHandler
A callback that handles errors during outbox processing. Note that this callback can be called multiple times for the same activity, because the delivery is retried according to the backoff schedule until it succeeds or reaches the maximum retry count.
- origin: string | FederationOrigin
The canonical base URL of the server. This is used for constructing absolute URLs and fediverse handles.
- outboxRetryPolicy: RetryPolicy
The retry policy for sending activities to recipients' inboxes. By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours.
- permanentFailureStatusCodes: readonly number[]
HTTP status codes that should be treated as permanent delivery failures. When an inbox returns one of these codes, the delivery will not be retried and the permanent failure handler (if registered via Federatable.setOutboxPermanentFailureHandler) will be called.
- queue: FederationQueueOptions | MessageQueue
The message queue for sending and receiving activities. If not provided, activities will not be queued and will be processed immediately.
- signatureTimeWindow: Temporal.Duration | Temporal.DurationLike | false
The time window for verifying HTTP Signatures of incoming requests. If the request is older or newer than this window, it is rejected. Or if it is
false, the request's timestamp is not checked at all. - skipSignatureVerification: boolean
Whether to skip HTTP Signatures verification for incoming activities. This is useful for testing purposes, but should not be used in production.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider for tracing operations. If not provided, the default global tracer provider is used.
- trailingSlashInsensitive: boolean
Whether the router should be insensitive to trailing slashes in the URL paths. For example, if this option is
true,/fooand/foo/are treated as the same path. Turned off by default. - userAgent: GetUserAgentOptions | string
Options for making
User-Agentstrings for HTTP requests. If a string is provided, it is used as theUser-Agentheader. If an object is provided, it is passed to the getUserAgent function.
Options for FederationOptions.origin when it is not a string.
- handleHost: string
The canonical hostname for fediverse handles (which are looked up through WebFinger). This is used for WebFinger lookups. It has to be a valid hostname, e.g.,
"example.com". - webOrigin: string
The canonical origin for web URLs. This is used for constructing absolute URLs. It has to start with either
"http://"or"https://", and must not contain a path or query string, e.g.,"https://example.com".
Configures the task queues for sending and receiving activities.
- fanout: MessageQueue
The message queue for fanning out outgoing activities. If not provided, outgoing activities will not be fanned out in the background, but will be fanned out immediately, which causes slow response times on Context.sendActivity calls.
- inbox: MessageQueue
The message queue for incoming activities. If not provided, incoming activities will not be queued and will be processed immediately.
- outbox: MessageQueue
The message queue for outgoing activities. If not provided, outgoing activities will not be queued and will be sent immediately.
Options for Federation.startQueue method.
The result of fetchKeyDetailed.
- fetchError: FetchKeyErrorResult
The error that occurred while fetching the key, if fetching failed before a document could be parsed.
Options for fetchKey.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- keyCache: KeyCache
The key cache to use for caching public keys.
- meterProvider: MeterProvider
The OpenTelemetry meter provider to use for recording
activitypub.key.lookupandactivitypub.key.lookup.duration. If omitted, the global meter provider is used. - tracerProvider: TracerProvider
The OpenTelemetry tracer provider to use for tracing. If omitted, the global tracer provider is used.
The result of fetchKey.
The result of fulfillAcceptSignature. This can be used directly
as the rfc9421 option of SignRequestOptions.
- components: AcceptSignatureComponent[]
The merged set of covered component identifiers, including all component parameters, ready to be passed to the signer.
- expires: true
If
true, the challenger requested that the signer generate and include an expiration timestamp in the signature parameters. - label: string
The label for the signature.
- nonce: string
The nonce requested by the challenge, if any.
- tag: string
The tag requested by the challenge, if any.
Options for RequestContext.getActor.
- tombstone: "suppress" | "passthrough"
Controls how tombstoned actors are returned.
Options for getKeyOwner.
- contextLoader: DocumentLoader
The context loader to use for JSON-LD context retrieval.
- documentLoader: DocumentLoader
The document loader to use for fetching the key and its owner.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider to use for tracing. If omitted, the global tracer provider is used.
Options for getNodeInfo function.
- direct: boolean
Whether to directly fetch the NodeInfo document from the given URL. Otherwise, the NodeInfo document will be fetched from the
.well-knownlocation of the given URL. - parse: "strict" | "best-effort" | "none"
How strictly to parse the NodeInfo document.
- userAgent: GetUserAgentOptions | string
The options for making
User-Agentheader. If a string is given, it is used as theUser-Agentheader value. If an object is given, it is passed to getUserAgent to generate theUser-Agentheader value.
Options for Context.getSignedKey method.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
A spec determiner for HTTP Message Signatures. It determines the spec to use for signing requests. It is used for double-knocking (see https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions).
- determineSpec(origin: string):HttpMessageSignaturesSpec
| Promise<HttpMessageSignaturesSpec>Determines the spec to use for signing requests.
- rememberSpec(): void | Promise<void>origin: string,spec: HttpMessageSignaturesSpec
Remembers the successfully used spec for the given origin.
Policy for emitting Accept-Signature challenges on inbox 401
responses, as defined in
RFC 9421 §5.
- components: string[]
The covered component identifiers to request. Only request-applicable identifiers should be used (
@statusis automatically excluded). - enabled: boolean
Whether to emit
Accept-Signatureheaders on401responses caused by HTTP Signature verification failures. - nonceTtlSeconds: number
The time-to-live (in seconds) for stored nonces. After this period, nonces expire and are no longer accepted.
- requestNonce: boolean
Whether to generate and require a one-time nonce for replay protection. When enabled, a cryptographically random nonce is included in each challenge and verified on subsequent requests. Requires a KvStore.
A context for inbox listeners.
- clone(data: TContextData): InboxContext<TContextData>
Creates a new context with the same properties as this one, but with the given data.
- forwardActivity(): Promise<void>forwarder:SenderKeyPair
| SenderKeyPair[]
| { identifier: string; }
| { username: string; },recipients: Recipient | Recipient[],options?: ForwardActivityOptionsForwards a received activity to the recipients' inboxes. The forwarded activity will be signed in HTTP Signatures by the forwarder, but its payload will not be modified, i.e., Linked Data Signatures and Object Integrity Proofs will not be added. Even when Fedify internally normalizes a Linked Data Signature activity for parsing, this method still forwards the original received payload so the sender's signatures/proofs are preserved as-is. Therefore, if the activity is not signed (i.e., it has neither Linked Data Signatures nor Object Integrity Proofs), the recipient probably will not trust the activity.
- recipient: string | null
The identifier of the recipient of the inbox. If the inbox is a shared inbox, it is
null.
Registry for inbox listeners for different activity types.
- on<TActivity extends Activity>(): InboxListenerSetters<TContextData>type: new (...args: any[]) => TActivity,listener: InboxListener<TContextData, TActivity>
Registers a listener for a specific incoming activity type.
- onError(handler: InboxErrorHandler<TContextData>): InboxListenerSetters<TContextData>
Registers an error handler for inbox listeners. Any exceptions thrown from the listeners are caught and passed to this handler.
- onUnverifiedActivity(handler: UnverifiedActivityHandler<TContextData>): InboxListenerSetters<TContextData>
Registers a callback for incoming activities whose HTTP signatures could not be verified.
- setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>
Configures a callback to dispatch the key pair for the authenticated document loader of the Context passed to the shared inbox listener.
- withIdempotency(strategy: IdempotencyStrategy | IdempotencyKeyCallback<TContextData>): InboxListenerSetters<TContextData>
Configures the strategy for handling activity idempotency in inbox processing.
Additional options for InProcessMessageQueue.
- pollInterval: Temporal.Duration | Temporal.DurationLike
The interval to poll for messages in the queue. 5 seconds by default.
A cache for storing cryptographic keys.
An abstract interface for a key–value store.
- cas: () => Promise<boolean>key: KvKey,expectedValue: unknown,newValue: unknown,options?: KvStoreSetOptions
Compare-and-swap (CAS) operation for the key–value store.
- delete(key: KvKey): Promise<void>
Deletes the value for the given key.
- get<T = unknown>(key: KvKey): Promise<T | undefined>
Gets the value for the given key.
- list(prefix?: KvKey): AsyncIterable<KvStoreListEntry>
Lists all entries in the store that match the given prefix. If no prefix is given, all entries are returned.
- set(): Promise<void>key: KvKey,value: unknown,options?: KvStoreSetOptions
Sets the value for the given key.
An entry returned by the KvStore.list method.
Additional options for setting a value in a key–value store.
- ttl: Temporal.Duration
The time-to-live (TTL) for the value.
An abstract interface for a message queue.
- enqueue(): Promise<void>message: any,options?: MessageQueueEnqueueOptions
Enqueues a message in the queue.
- enqueueMany: () => Promise<void>messages: readonly any[],options?: MessageQueueEnqueueOptions
Enqueues multiple messages in the queue. This operation is optional, and may not be supported by all implementations. If not supported, Fedify will invoke enqueue for each message.
- getDepth(): Promise<MessageQueueDepth>
Gets the number of messages waiting in the queue.
- listen(): Promise<void>handler: (message: any) => Promise<void> | void,options?: MessageQueueListenOptions
Listens for messages in the queue.
- nativeRetrial: boolean
Whether the message queue backend provides native retry mechanisms. When
true, Fedify will skip its own retry logic and rely on the backend to handle retries. Whenfalseor omitted, Fedify will handle retries using its own retry policies.
The number of messages waiting in a message queue.
Additional options for enqueuing a message in a queue.
- delay: Temporal.Duration
The delay before the message is enqueued. No delay by default.
- orderingKey: string
An optional key that ensures messages with the same ordering key are processed sequentially (one at a time). Messages with different ordering keys (or no ordering key) may be processed in parallel.
Additional options for listening to a message queue.
- signal: AbortSignal
The signal to abort listening to the message queue.
A NodeInfo object as defined in the NodeInfo 2.1 schema.
- metadata: Readonly<Record<string, JsonValue>>
Free form key value pairs for software specific values. Clients should not rely on any specific key present.
- openRegistrations: boolean
Whether this server allows open self-registration. Defaults to
false. - protocols: readonly Protocol[]
The protocols supported on this server. At least one protocol must be supported.
- services: Services
The third party sites this server can connect to via their application API.
- software: Software
Metadata about server software in use.
- usage: Usage
Usage statistics for this server.
Additional settings for an object dispatcher.
- authorize(predicate: ObjectAuthorizePredicate<TContextData, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>
Specifies the conditions under which requests are authorized.
A context for outbox listeners.
- clone(data: TContextData): OutboxContext<TContextData>
Creates a new context with the same properties as this one, but with the given data.
- forwardActivity(): Promise<void>forwarder:SenderKeyPair
| SenderKeyPair[]
| { identifier: string; }
| { username: string; },recipients: Recipient | Recipient[],options?: ForwardActivityOptionsForwards a posted activity to the recipients' inboxes without re-serializing the original payload. The forwarded activity will be signed in HTTP Signatures by the forwarder, but its payload will not be modified, i.e., Linked Data Signatures and Object Integrity Proofs will not be added. Therefore, if the posted activity is not signed (i.e., it has neither Linked Data Signatures nor Object Integrity Proofs), the recipients probably will not trust the activity.
- hasDeliveredActivity(): boolean
Indicates whether the posted activity has been delivered during the current outbox listener invocation.
- identifier: string
The identifier of the actor whose outbox received the POST.
Registry for outbox listeners for different activity types.
- authorize(predicate: AuthorizePredicate<TContextData>): OutboxListenerSetters<TContextData>
Registers a callback to authorize POST requests to the outbox.
- on<TActivity extends Activity>(): OutboxListenerSetters<TContextData>type: new (...args: any[]) => TActivity,listener: OutboxListener<TContextData, TActivity>
Registers a listener for a specific incoming activity type.
- onError(handler: OutboxListenerErrorHandler<TContextData>): OutboxListenerSetters<TContextData>
Registers an error handler for outbox listeners. Any exceptions thrown from the listeners are caught and passed to this handler.
A page of items.
- items: readonly TItem[]No documentation available
- nextCursor: string | nullNo documentation available
- prevCursor: string | nullNo documentation available
Options for parseNodeInfo function.
- tryBestEffort: boolean
Whether to try to parse the NodeInfo document even if it is invalid. If turned on, the function will return a best-effort result.
A context for a request.
- clone(data: TContextData): RequestContext<TContextData>
Creates a new context with the same properties as this one, but with the given data.
- getActor(identifier: string): Promise<Actor | null>
Gets an Actor object for the given identifier.
- getObject<TObject extends Object>(): Promise<TObject | null>cls: ConstructorWithTypeId<TObject>,values: Record<string, string>
Gets an object of the given class with the given values.
- getSignedKey(): Promise<CryptographicKey | null>
Gets the public key of the sender, if any exists and it is verified. Otherwise,
nullis returned. - getSignedKeyOwner(): Promise<Actor | null>
Gets the owner of the signed key, if any exists and it is verified. Otherwise,
nullis returned. - request: Request
The request object.
- url: URL
The URL of the request.
Options for the respondWithObject and respondWithObjectIfAcceptable functions.
- contextLoader: DocumentLoader
The document loader to use for compacting JSON-LD.
The context passed to a RetryPolicy callback.
- attempts: number
The number of attempts so far.
- elapsedTime: Temporal.Duration
The elapsed time since the first attempt.
Options for customizing the RFC 9421 signature label, covered components,
and metadata parameters. These are typically derived from an
Accept-Signature challenge.
- components: AcceptSignatureComponent[]
The covered component identifiers. When omitted, the default set
["@method", "@target-uri", "@authority", "host", "date"](plus"content-digest"when a body is present) is used. - expires: true
If
true, an expiration timestamp is generated and included in the signature parameters. The expiration time defaults to one hour after the signature creation time. - label: string
The label for the signature in
Signature-InputandSignatureheaders. - nonce: string
A nonce value to include in the signature parameters.
- tag: string
A tag value to include in the signature parameters.
Options for Context.routeActivity method.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- immediate: boolean
Whether to skip enqueuing the activity and invoke the listener immediately. If no inbox queue is available, this option is ignored and the activity will be always invoked immediately.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
Options for Context.sendActivity method.
- excludeBaseUris: readonly URL[]
The base URIs to exclude from the recipients' inboxes. It is useful for excluding the recipients having the same shared inbox with the sender.
- fanout: "auto" | "skip" | "force"
Determines how activities are queued when sent to multiple recipients.
- immediate: boolean
Whether to send the activity immediately, without enqueuing it. If
true, the activity will be sent immediately and the retrial policy will not be applied. - normalizeExistingProofs: boolean
Whether to apply Fedify's outgoing JSON-LD wire-format compatibility fixes to activities that already carry Object Integrity Proofs.
- orderingKey: string
An optional key to ensure ordered delivery of activities. Activities with the same
orderingKeyare guaranteed to be delivered in the order they were enqueued, per recipient server. - preferSharedInbox: boolean
Whether to prefer the shared inbox for the recipients.
Options for Context.sendActivity method when sending to a collection.
- syncCollection: boolean
Whether to synchronize the collection using
Collection-Synchronizationheader (FEP-8fcf).
A key pair for an actor who sends an activity.
- keyId: URL
The public key ID that corresponds to the private key.
- privateKey: CryptoKey
The actor's private key to sign the request.
The third party sites this server can connect to via their application API.
Options for signing JSON-LD documents.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider for tracing the signing process. If omitted, the global tracer provider is used.
Options for signObject.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
Options for signRequest.
- body: ArrayBuffer | null
The request body as ArrayBuffer. If provided, avoids cloning the request body.
- currentTime: Temporal.Instant
The current time. If not specified, the current time is used. This is useful for testing.
- rfc9421: Rfc9421SignRequestOptions
Options specific to the RFC 9421 signing path. These options are ignored when
specis"draft-cavage-http-signatures-12". - spec: HttpMessageSignaturesSpec
The HTTP message signatures specification to use for signing.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
Metadata about server software in use.
- homepage: URL
The URL of the homepage of this server software.
- name: string
The canonical name of this server software. This must comply with pattern
/^[a-z0-9-]+$/. - repository: URL
The URL of the source code repository of this server software.
- version: string
The version of this server software.
Usage statistics for this server.
- localComments: number
The amount of comments that were made by users that are registered on this server. This number has to be an integer greater than or equal to zero.
- localPosts: number
The amount of posts that were made by users that are registered on this server. This number has to be an integer greater than or equal to zero.
- users: { readonly total?: number; readonly activeHalfyear?: number; readonly activeMonth?: number; }
Statistics about the users of this server.
Options for verifying JSON-LD documents.
Options for verifyObject.
Options for verifyProof.
- contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
- documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
- keyCache: KeyCache
The key cache to use for caching public keys.
- meterProvider: MeterProvider
The OpenTelemetry meter provider. If omitted, the global meter provider is used.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
Options for verifyRequest.
- contextLoader: DocumentLoader
The context loader to use for JSON-LD context retrieval.
- currentTime: Temporal.Instant
The current time. If not specified, the current time is used. This is useful for testing.
- documentLoader: DocumentLoader
The document loader to use for fetching the public key.
- keyCache: KeyCache
The key cache to use for caching public keys.
- meterProvider: MeterProvider
The OpenTelemetry meter provider. If omitted, the global meter provider is used.
- spec: HttpMessageSignaturesSpec
The HTTP message signatures specification to use for verifying.
- timeWindow: Temporal.Duration | Temporal.DurationLike | false
The time window to allow for the request date. The actual time window is twice the value of this option, with the current time as the center. Or if it is
false, no time check is performed. - tracerProvider: TracerProvider
The OpenTelemetry tracer provider. If omitted, the global tracer provider is used.
Options for verifying Linked Data Signatures.
- contextLoader: DocumentLoader
The context loader to use for JSON-LD context retrieval.
- documentLoader: DocumentLoader
The document loader to use for fetching the public key.
- keyCache: KeyCache
The key cache to use for caching public keys.
- meterProvider: MeterProvider
The OpenTelemetry meter provider. If omitted, the global meter provider is used.
- tracerProvider: TracerProvider
The OpenTelemetry tracer provider for tracing the verification process. If omitted, the global tracer provider is used.
Parameters for handleWebFinger.
- actorAliasMapper: ActorAliasMapper<TContextData>
The callback for mapping a WebFinger query to the corresponding actor's internal identifier or username, or
nullif the query is not found. - actorDispatcher: ActorDispatcher<TContextData>
The callback for dispatching the actor.
- actorHandleMapper: ActorHandleMapper<TContextData>
The callback for mapping a WebFinger username to the corresponding actor's internal identifier, or
nullif the username is not found. - context: RequestContext<TContextData>
The request context.
- host: string
The canonical hostname of the server, if it's explicitly configured.
- meterProvider: MeterProvider
The OpenTelemetry meter provider used to record the
webfinger.handlecounter andwebfinger.handle.durationhistogram. When omitted, no WebFinger-specific measurements are emitted (the request still contributes tofedify.http.server.request.*because that metric is recorded one layer up inFederation.fetch). - onNotFound(request: Request): Response | Promise<Response>
The function to call when the actor is not found.
- span: Span
The span for the request.
- tracer: Tracer
The OpenTelemetry tracer.
- webFingerLinksDispatcher: WebFingerLinksDispatcher<TContextData>
The callback for dispatching the Links of webFinger.
Options for the Router.
The result of Router.route method.
Type Aliases
A function that transforms an activity object.
| { username: string; }
| null
| Promise<{ identifier: string; } | { username: string; } | null>
A callback that maps a WebFinger query to the corresponding actor's
internal identifier or username, or null if the query is not found.
A callback that dispatches an Actor object or a Tombstone.
A callback that maps a WebFinger username to the corresponding actor's
internal identifier, or null if the username is not found.
A callback that dispatches key pairs for an actor.
| { readonly failure?: never; readonly failureThreshold?: number; readonly failureWindow?: Temporal.Duration | Temporal.DurationLike; }
Configures how a remote host circuit opens after repeated delivery failures.
& { readonly recoveryDelay?: Temporal.Duration | Temporal.DurationLike; readonly heldActivityTtl?: Temporal.Duration | Temporal.DurationLike; readonly releaseInterval?: Temporal.Duration | Temporal.DurationLike; readonly stateTtl?: Temporal.Duration | Temporal.DurationLike; readonly onStateChange?: (
Options for Fedify's outbound activity circuit breaker.
The state of a remote host circuit breaker.
A callback that counts the number of items in a collection.
A callback that returns a cursor for a collection.
A callback that dispatches a collection.
Represents an object with a type ID, which is either a constructor or an instance of the object.
A callback that counts the number of items in a custom collection.
A callback that returns a cursor for a custom collection.
A callback that dispatches a custom collection.
| { readonly error: Error; }
Detailed fetch failure information from fetchKeyDetailed.
& { skipIfUnsigned: boolean; }
Options for InboxContext.forwardActivity method.
The standard to use for signing and verifying HTTP signatures.
A callback to generate a custom idempotency key for an activity. Returns the cache key to use, or null to skip idempotency checking.
The strategy for handling activity idempotency in inbox processing.
| "gnusocial"
| "imap"
| "pnut"
| "pop3"
| "pumpio"
| "rss2.0"
| "twitter"
The third party sites this server can retrieve messages from for combined display with regular traffic.
A callback that handles errors in an inbox.
A callback that listens for activities in an inbox.
| JsonValue[]
| string
| number
| boolean
| null
The type of the result of parsing JSON.
A key for a key–value store. An array of one or more strings.
A message that represents a task to be processed by the background worker.
The concrete type of the message depends on the type property.
A callback that dispatches a NodeInfo object.
A callback that dispatches an object.
| "blogger"
| "buddycloud"
| "diaspora"
| "dreamwidth"
| "drupal"
| "facebook"
| "friendica"
| "gnusocial"
| "google"
| "insanejournal"
| "libertree"
| "linkedin"
| "livejournal"
| "mediagoblin"
| "myspace"
| "pinterest"
| "pnut"
| "posterous"
| "pumpio"
| "redmatrix"
| "rss2.0"
| "smtp"
| "tent"
| "tumblr"
| "twitter"
| "wordpress"
| "xmpp"
The third party sites this server can publish messages to on the behalf of a user.
A callback that handles errors during outbox processing.
A callback that listens for activities in an outbox.
A callback that handles errors in an outbox listener.
A callback that handles permanent delivery failures when sending activities to remote inboxes.
| { readonly type: "object"; readonly class: ConstructorWithTypeId<Object>; readonly typeId: URL; readonly values: Record<string, string>; }
| { readonly type: "inbox"; readonly identifier: undefined; }
| { readonly type: "inbox"; readonly identifier: string; }
| { readonly type: "outbox"; readonly identifier: string; }
| { readonly type: "following"; readonly identifier: string; }
| { readonly type: "followers"; readonly identifier: string; }
| { readonly type: "liked"; readonly identifier: string; }
| { readonly type: "featured"; readonly identifier: string; }
| { readonly type: "featuredTags"; readonly identifier: string; }
| { readonly type: "collection"; readonly name: string | symbol; readonly class: ConstructorWithTypeId<Object>; readonly typeId: URL; readonly values: Record<string, string>; }
| { readonly type: "orderedCollection"; readonly name: string | symbol; readonly class: ConstructorWithTypeId<Object>; readonly typeId: URL; readonly values: Record<string, string>; }
A result of parsing an URI.
| "buddycloud"
| "dfrn"
| "diaspora"
| "libertree"
| "ostatus"
| "pumpio"
| "tent"
| "xmpp"
| "zot"
The protocols supported on this server.
A policy that determines the delay before the next retry.
| `{+${Param}}`
| `{#${Param}}`
| `{.${Param}}`
| `{/${Param}}`
| `{;${Param}}`
| `{?${Param}}`
| `{&${Param}}`
Defines a union of all valid RFC 6570 URI Template expressions for a given parameter name.
A callback that handles activities whose signatures could not be verified.
The reason why an incoming activity could not be verified.
| { readonly verified: false; readonly reason: VerifyRequestFailureReason; }
The detailed result of verifyRequestDetailed.
| { readonly type: "invalidSignature"; readonly keyId?: URL; }
| { readonly type: "noSignature"; }
The reason why verifyRequestDetailed could not verify a request.
A callback that dispatches a array of Link.