summaryrefslogtreecommitdiff
path: root/src/common/remote/activitypub/renderer/key.ts
blob: 7148c59745082a92d78d9bb84fe8fa2c861973d7 (plain)
1
2
3
4
5
6
7
8
9
import config from '../../../../conf';
import { extractPublic } from '../../../../crypto_key';
import { ILocalAccount } from '../../../../models/user';

export default ({ username, account }) => ({
	type: 'Key',
	owner: `${config.url}/@${username}`,
	publicKeyPem: extractPublic((account as ILocalAccount).keypair)
});