activitypress/module.d.ts

23 lines
647 B
TypeScript
Raw Normal View History

2023-12-25 18:49:16 +00:00
declare module "activitypub-express" {
function ActivitypubExpress(options: Record<string, any>);
export default ActivitypubExpress;
2023-12-26 02:33:18 +00:00
}
2023-12-27 14:18:26 +00:00
// Only enough here for what I need.
2023-12-26 02:33:18 +00:00
declare module "activitypub-http-signatures" {
export class Sha256Signer {
constructor(options: { publicKeyId: string, privateKey: string });
sign: (options: { url: string, method: string, headers: any[] }) => string;
};
2023-12-27 14:18:26 +00:00
2023-12-27 14:42:48 +00:00
type parse = (params: { url: string, method: string, headers: Record<string, string> }) => {
2023-12-27 14:18:26 +00:00
verify: (publicKey: string) => boolean;
};
2023-12-27 14:42:48 +00:00
export default {
Sha256Signer,
parse
};
2023-12-26 02:33:18 +00:00
}