1 import { createPrivateAndPublicKeys } from '@server/helpers/peertube-crypto'
2 import { MActor } from '@server/types/models'
4 // Set account keys, this could be long so process after the account creation and do not block the client
5 async function generateAndSaveActorKeys <T extends MActor> (actor: T) {
6 const { publicKey, privateKey } = await createPrivateAndPublicKeys()
8 actor.publicKey = publicKey
9 actor.privateKey = privateKey
15 generateAndSaveActorKeys