+ // Set account keys, this could be long so process after the account creation and do not block the client
+ const { publicKey, privateKey } = await createPrivateAndPublicKeys()
+ account.set('publicKey', publicKey)
+ account.set('privateKey', privateKey)
+ account.save().catch(err => logger.error('Cannot set public/private keys of local account %d.', account.id, err))
+
+ return { account, videoChannel }