A context.
The origin of the federated server, including the scheme (http://
or
https://
) and the host (e.g., example.com:8080
).
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.
The hostname of the federated server (e.g., example.com
). This is
the same as the host without the port.
data: TContextData
The user-defined data associated with the context.
documentLoader: DocumentLoader
The document loader for loading remote JSON-LD documents.
contextLoader: DocumentLoader
The context loader for loading remote JSON-LD contexts.
Builds the URI of the NodeInfo document.
getActorUri(handle: string): URL
Builds the URI of an actor with the given handle.
getObjectUri<TObject extends Object>(): URL
Builds the URI of an object with the given class and values.
getOutboxUri(handle: string): URL
Builds the URI of an actor's outbox with the given handle.
getInboxUri(): URL
Builds the URI of the shared inbox.
getInboxUri(handle: string): URL
Builds the URI of an actor's inbox with the given handle.
getFollowingUri(handle: string): URL
Builds the URI of an actor's following collection with the given handle.
getFollowersUri(handle: string): URL
Builds the URI of an actor's followers collection with the given handle.
getLikedUri(handle: string): URL
Builds the URI of an actor's liked collection with the given handle.
getFeaturedUri(handle: string): URL
Builds the URI of an actor's featured collection with the given handle.
getFeaturedTagsUri(handle: string): URL
Builds the URI of an actor's featured tags collection with the given handle.
parseUri(uri: URL): ParseUriResult | null
Determines the type of the URI and extracts the associated data.
getActorKeyPairs(handle: string): Promise<ActorKeyPair[]>
Gets the key pairs for an actor.
getDocumentLoader(identity: { handle: string; }): Promise<DocumentLoader>
Gets an authenticated DocumentLoader for the given identity. Note that an authenticated document loader intentionally does not cache the fetched documents.
getDocumentLoader(identity: { keyId: URL; privateKey: CryptoKey; }): DocumentLoader
Gets an authenticated DocumentLoader for the given identity. Note that an authenticated document loader intentionally does not cache the fetched documents.
lookupObject(): Promise<Object | null>
Looks up an ActivityStreams object by its URI (including acct:
URIs)
or a fediverse handle (e.g., @user@server
or user@server
).
sendActivity(): Promise<void>
Sends an activity to recipients' inboxes.
sendActivity(sender: { handle: string; },recipients: "followers",activity: Activity,options?: SendActivityOptions,): Promise<void>
Sends an activity to the outboxes of the sender's followers.