nips/34seen.md

27 lines
541 B
Markdown
Raw Normal View History

2023-06-27 11:11:06 -04:00
NIP-34seen
==========
Seen At
-------
`draft` `optional` `author:arthurfranca` `author:mikedilger`
Events are desc sorted by first seen at timestamp.
## Motivation
Some `clients` may want to check if `relay` has recently received old events
created before last time they checked.
## Implementation
`Relay` computes `nip34seen` field once upon receiving the event.
The event field is set with the timestamp of the moment the `relay` first became aware of it.
### Javascript
```js
event.nip34seen = Math.floor(Date.now() / 1000)
2023-06-27 11:11:06 -04:00
```