mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-22 17:25:08 +01:00
10 lines
343 B
TypeScript
10 lines
343 B
TypeScript
import config from '../../../conf';
|
|
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)
|
|
});
|