mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-25 12:33:07 +02:00
10 lines
364 B
TypeScript
10 lines
364 B
TypeScript
import config from '../../../../conf';
|
|
import { extractPublic } from '../../../../crypto_key';
|
|
import { ILocalAccount } from '../../../../models/user';
|
|
|
|
export default ({ username, account }) => ({
|
|
id: `${config.url}/@${username}/publickey`,
|
|
type: 'Key',
|
|
owner: `${config.url}/@${username}`,
|
|
publicKeyPem: extractPublic((account as ILocalAccount).keypair)
|
|
});
|