activitypress/module.d.ts

23 lines
647 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 });
sign: (options: { url: string, method: string, headers: any[] }) => string;
};
type parse = (params: { url: string, method: string, headers: Record<string, string> }) => {
verify: (publicKey: string) => boolean;
};
export default {
Sha256Signer,
parse
};
}