Skip to main content
This release is 9 versions behind 1.3.0 — 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
100%
Published
a month ago (1.2.0)
class DataIntegrityProof

A proof that can be added to any activity or object, allowing recipients to verify the identity of the actor and the integrity of the data.

Constructors

new
DataIntegrityProof(
values: { id?: URL | null; cryptosuite?: "eddsa-jcs-2022" | null; verificationMethod?:
Multikey
| URL
| null
; proofPurpose?:
"assertionMethod"
| "authentication"
| "capabilityInvocation"
| "capabilityDelegation"
| "keyAgreement"
| null
; proofValue?: Uint8Array | null; created?: Temporal.Instant | null; }
,
unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
)

Constructs a new instance of DataIntegrityProof with the given values.

Properties

protected
readonly
_contextLoader: DocumentLoader | undefined
protected
readonly
_documentLoader: DocumentLoader | undefined
readonly
created: Temporal.Instant | null

The date and time the proof was created.

readonly
cryptosuite: "eddsa-jcs-2022" | null

The cryptographic suite used to create the proof.

readonly
id: URL | null
readonly
proofPurpose:
"assertionMethod"
| "authentication"
| "capabilityInvocation"
| "capabilityDelegation"
| "keyAgreement"
| null

The reason the proof was created.

  • "assertionMethod"
  • "authentication"
  • "capabilityInvocation"
  • "capabilityDelegation"
  • "keyAgreement"
readonly
proofValue: Uint8Array | null

The proof value.

readonly
verificationMethodId: URL | null

Similar to DataIntegrityProof.getVerificationMethod, but returns its @id URL instead of the object itself.

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; cryptosuite?: "eddsa-jcs-2022" | null; verificationMethod?:
Multikey
| URL
| null
; proofPurpose?:
"assertionMethod"
| "authentication"
| "capabilityInvocation"
| "capabilityDelegation"
| "keyAgreement"
| null
; proofValue?: Uint8Array | null; created?: Temporal.Instant | null; }
,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): DataIntegrityProof

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

getVerificationMethod(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<Multikey | null>

A key owned by an actor according to FEP-521a: Representing actor's public keys.

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 DataIntegrityProof: https://w3id.org/security#DataIntegrityProof.

Static Methods

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

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

Add Package

deno add jsr:@fedify/fedify

Import symbol

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

---- OR ----

Import directly with a jsr specifier

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

Add Package

npx jsr add @fedify/fedify

Import symbol

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

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

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

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

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

Add Package

bunx jsr add @fedify/fedify

Import symbol

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