blob: 85be7b136712fc58c88fbe0cd6266d1956d3db3a (
plain)
1
2
3
4
5
6
7
8
9
10
|
import config from '../../../config';
import { extractPublic } from '../../../crypto_key';
import { ILocalUser } from '../../../models/user';
export default (user: ILocalUser) => ({
id: `${config.url}/@${user.username}/publickey`,
type: 'Key',
owner: `${config.url}/@${user.username}`,
publicKeyPem: extractPublic(user.account.keypair)
});
|