23 lines
677 B
TypeScript
23 lines
677 B
TypeScript
declare module "activitypub-express" {
|
|
function ActivitypubExpress(options: Record<string, any>);
|
|
export default ActivitypubExpress;
|
|
}
|
|
|
|
// Only enough here for what I need.
|
|
declare module "activitypub-http-signatures" {
|
|
export class Sha256Signer {
|
|
constructor(options: { publicKeyId: string, privateKey: string, headerNames?: string[] });
|
|
|
|
sign: (options: { url: string, method: string, headers: HeadersInit }) => string;
|
|
};
|
|
|
|
type parse = (params: { url: string, method: string, headers: Record<string, string> }) => {
|
|
verify: (publicKey: string) => boolean;
|
|
};
|
|
|
|
export default {
|
|
Sha256Signer,
|
|
parse
|
|
};
|
|
}
|