shafemtol on Nostr: The current specs could be much better even if sticking to "human language". E.g., ...
The current specs could be much better even if sticking to "human language". E.g., nowhere does NIP-01 say that created_at must be an integer, yet to
fiatjaf (npub180c…h6w6) that is apparently obvious. All NIP-01 says is that it's a unix timestamp in seconds. Go to the Wikipedia page for Unix time, and you'll see several non-integer examples.
Test vectors that cover all kinds of corner cases would definitely help.
Published at
2023-03-12 19:47:42Event JSON
{
"id": "81a8b8870ff3facfad9fc79a0136af434c87a7733c9592b121d08bcbaf379de2",
"pubkey": "ddcb597a5e9b982ffacec23cf4dcd9d7acd251e9c63b6df3202ca49f785bc2a9",
"created_at": 1678650462,
"kind": 1,
"tags": [
[
"e",
"b06249321805a1d132c5618ef9f0ddbf93418eab4b9df619944eff3a35ef55c5",
"",
"root"
],
[
"e",
"9adbdab1b251dfaa14b2029f4dc380438c7f2a606bc4f37588f0c97b75baf741",
"",
"reply"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
],
[
"p",
"9e1e498420bc7c35f3e3a78d20045b4c8343986dae48739759bccb2a27e88c53"
]
],
"content": "The current specs could be much better even if sticking to \"human language\". E.g., nowhere does NIP-01 say that created_at must be an integer, yet to #[2] that is apparently obvious. All NIP-01 says is that it's a unix timestamp in seconds. Go to the Wikipedia page for Unix time, and you'll see several non-integer examples.\n\nTest vectors that cover all kinds of corner cases would definitely help.",
"sig": "07357200dba2959a92c4658031686ebc4f65f8600180329ebb40efb8efa59031e23720aa3e77b21107dacc92269144b138be311a4f42c5c533b878a819410a6a"
}