Skip to main content
This release is 74 versions behind 1.5.1 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
6 months ago (1.1.0)
class DidService

Means of communicating or interacting with the DID subject or associated entities via one or more service endpoints. Examples include discovery services, agent services, social networking services, file storage services, and verifiable credential repository services.

Constructors

new
DidService(
values: { id?: URL | null; endpoint?: URL | null; endpoints?: (URL)[]; },
unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
)

Constructs a new instance of DidService with the given values.

Properties

protected
readonly
_contextLoader: DocumentLoader | undefined
protected
readonly
_documentLoader: DocumentLoader | undefined
readonly
endpoint: URL | null

A network address, such as an HTTP URL, at which services operate on behalf of a DID subject.

readonly
endpoints: (URL)[]

A network address, such as an HTTP URL, at which services operate on behalf of a DID subject.

readonly
id: URL | null

Methods

[Symbol.for("nodejs.util.inspect.custom")](
_depth: number,
options: unknown,
inspect: (
value: unknown,
options: unknown,
) => string
,
): string
protected
_getCustomInspectProxy(): Record<string, unknown>
clone(
values?: { id?: URL | null; endpoint?: URL | null; endpoints?: (URL)[]; },
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): DidService

Clones this instance, optionally updating it with the given values.

toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?:
string
| Record<string, string>
| (string | Record<string, string>)[]
; }
): Promise<unknown>

Converts this object to a JSON-LD structure.

Static Properties

readonly
typeId: URL

The type URI of DidService: https://www.w3.org/ns/did#Service.

Static Methods

fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Promise<DidService>

Converts a JSON-LD structure to an object of this type.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { DidService } from "@fedify/fedify";
or

Import directly with a jsr specifier

import { DidService } from "jsr:@fedify/fedify";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { DidService } from "@fedify/fedify";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { DidService } from "@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { DidService } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { DidService } from "@fedify/fedify";