Skip to main content
This release is 20 versions behind 1.4.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
94%
Published
3 months ago (1.2.0)

HTTP Signatures implementation.

Functions

f
attachSignature

Attaches a LD signature to the given JSON-LD document.

f
createProof

Creates a proof for the given object.

f
createSignature

Creates a LD signature for the given JSON-LD document.

f
detachSignature

Detaches Linked Data Signatures from the given JSON-LD document.

f
doesActorOwnKey

Checks if the actor of the given activity owns the specified key.

f
exportJwk

Exports a key in JWK format.

f
generateCryptoKeyPair

Generates a key pair which is appropriate for Fedify.

f
getKeyOwner

Gets the actor that owns the specified key. Returns null if the key has no known owner.

f
importJwk

Imports a key from JWK format.

f
signJsonLd

Signs the given JSON-LD document with the private key and returns the signed JSON-LD document.

f
signObject

Signs the given object with the private key and returns the signed object.

f
signRequest

Signs a request using the given private key.

f
verifyJsonLd

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.

f
verifyObject

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.

f
verifyProof

Verifies the given proof for the object.

f
verifyRequest

Verifies the signature of a request.

f
verifySignature

Verifies Linked Data Signatures of the given JSON-LD document.

Interfaces

Add Package

deno add jsr:@fedify/fedify

Import symbol

import * as mod from "@fedify/fedify/sig";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@fedify/fedify/sig";

Add Package

npx jsr add @fedify/fedify

Import symbol

import * as mod from "@fedify/fedify/sig";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import * as mod from "@fedify/fedify/sig";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import * as mod from "@fedify/fedify/sig";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import * as mod from "@fedify/fedify/sig";