NDK 2.4 is out!
I just hit the big red PUBLISH button on NDK 2.4.
(well, actually, I did it from the command line, the big red button is imaginary)
Codename: Safely Embrace the Chaos
Nostr is a, mostly, friendly environment with not too many developers and no ill-intent among them.
But this will not always be the case. Compatibility issues, mistakes, and all kinds of chaos is to be expected.
This version of NDK introduces validation at the library-level so that clients built using NDK can rely on some guarantees on handled-kinds that events they are consuming comply with what is defined on their respective NIPs.
An example?
NIP-88, recurring subscriptions, defines that Tier events should have amount tags of what subscribers are expected to pay and the cadence.
Prior to NDK 2.4 some malformed events would render like this:
https://i.nostr.build/Y4JG.png
But with NDK 2.4 the malformed parts of the events don’t reach the client code.
https://i.nostr.build/wAgJ.png
This is just a beginning, but event-validation is now moving into the library!
Published at
2024-01-31 15:00:00Event JSON
{
"id": "8c08ae69894f7805591dc98aa6908be6cf679a04561df637674cf3590cb31042",
"pubkey": "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52",
"created_at": 1706713200,
"kind": 30023,
"tags": [
[
"title",
"NDK 2.4 is out!"
],
[
"image",
"https://i.nostr.build/3Ldl.png"
],
[
"summary",
"NDK 2.4 is getting event validation!"
],
[
"h",
"fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"
],
[
"f",
"Free"
],
[
"f",
"Fans-eafht0"
],
[
"published_at",
"1706713200"
],
[
"d",
"NDK-2-4-is-out-nqjk33"
],
[
"client",
"highlighter",
"31990:4f7bd9c066a7b21d750b4e8dbf4440ef1e80c64864341550200b8481d530c5ce:1703282708172"
]
],
"content": "I just hit the big red PUBLISH button on NDK 2.4.\n\n(well, actually, I did it from the command line, the big red button is imaginary)\n\n## Codename: Safely Embrace the Chaos\n\nNostr is a, mostly, friendly environment with not too many developers and no ill-intent among them.\n\nBut this will not always be the case. Compatibility issues, mistakes, and all kinds of chaos is to be expected.\n\nThis version of NDK introduces validation at the library-level so that clients built using NDK can rely on some guarantees on handled-kinds that events they are consuming comply with what is defined on their respective NIPs.\n\nAn example?\n\nNIP-88, recurring subscriptions, defines that Tier events should have amount tags of what subscribers are expected to pay and the cadence.\n\nPrior to NDK 2.4 some malformed events would render like this:\n\nhttps://i.nostr.build/Y4JG.png \n\nBut with NDK 2.4 the malformed parts of the events don't reach the client code.\n\nhttps://i.nostr.build/wAgJ.png \n\nThis is just a beginning, but event-validation is now moving into the library!",
"sig": "2d03ebce763ff58d7af26f4274153b32f72b24a69664bcd7e83d99d35ed602e5094d26e3653bd6d28817950be27ca098ea064fd20a31b8d8a4299261b5132fb3"
}