## Generated by Codox

# Dog-and-duck 0.1.0-SNAPSHOT

# clj-activitypub.core

copied from Jahfer’s clj-activitypub library. If and when Jahfer issues a release of that library, this directory will be deleted and a dependency on that library will be added to the project.

### activity

#### multimethod

Produces a map representing an ActivityPub activity which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.

view source

### actor

`(actor {:keys [user-id username public-key]})`

Accepts a config, and returns a map in the form expected by the ActivityPub spec. See https://www.w3.org/TR/activitypub/#actor-objects for reference.

view source

### auth-headers

`(auth-headers config {:keys [body headers]})`

Given a config and request map of {:body … :headers …}, returns the original set of headers with Signature and Digest attributes appended.

view source

### config

`(config {:keys [domain username username-route public-key private-key], :or {username-route "/users/", public-key nil, private-key nil}})`

Creates hash of computed data relevant for most ActivityPub utilities.

view source

### fetch-user

`(fetch-user user-id)`

Fetches the customer account details located at user-id from a remote server. Will return cached results if they exist in memory.

view source

### gen-signature-header

`(gen-signature-header config headers)`

Generates a HTTP Signature string based on the provided map of headers.

view source

### obj

#### multimethod

Produces a map representing an ActivityPub object which can be serialized directly to JSON in the form expected by the ActivityStreams 2.0 spec. See https://www.w3.org/TR/activitystreams-vocabulary/ for reference.

view source

### parse-account

`(parse-account handle)`

Given an ActivityPub handle (e.g. @jahfer@mastodon.social), produces a map containing {:domain … :username …}.

view source

### signature-headers

TODO: write docs

view source

### with-config

`(with-config config)`

Returns curried forms of the #activity and #obj multimethods in the form {:activity … :obj …}, with the initial parameter set to config.

view source