MCPcopy Create free account
hub / github.com/massCodeIO/massCode / activateLicense

Function activateLicense

src/main/license/index.ts:62–78  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

60}
61
62export function activateLicense(key: string): LicenseStatus {
63 const payload = verifyLicenseKey(key)
64
65 if (!payload) {
66 return { active: false, name: null, email: null }
67 }
68
69 const name = payload.name ?? null
70
71 store.app.set('license', {
72 key: key.trim(),
73 name,
74 email: payload.email,
75 })
76
77 return { active: true, name, email: payload.email }
78}
79
80// Страховка от ручной правки store-файла: невалидный ключ сбрасывается.
81export function validateStoredLicense() {

Callers 2

registerSystemHandlersFunction · 0.90
license.test.tsFile · 0.85

Calls 2

verifyLicenseKeyFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected