ildella on Nostr: fiatjaf If I ask to verify a finalized event but change content and/or created_at, ...
fiatjaf (npub180c…h6w6)
If I ask to verify a finalized event but change content and/or created_at, anything at all actually... shouldn't the verification return false?
Or am I missing something huge? :/
```js
const secretKey = generateSecretKey()
const now = Math.floor(Date.now() / 1000)
const event = finalizeEvent({
kind: 1,
created_at: now,
content: 'hello',
tags: [],
}, secretKey)
const isGood = verifyEvent({...event, created_at: now - 10, content: 'something else'})
expect(isGood).toBe(false)
```
If I ask to verify a finalized event but change content and/or created_at, anything at all actually... shouldn't the verification return false?
Or am I missing something huge? :/
```js
const secretKey = generateSecretKey()
const now = Math.floor(Date.now() / 1000)
const event = finalizeEvent({
kind: 1,
created_at: now,
content: 'hello',
tags: [],
}, secretKey)
const isGood = verifyEvent({...event, created_at: now - 10, content: 'something else'})
expect(isGood).toBe(false)
```