blinry on Nostr: But I'd really prefer a more type-safe way to send events to the Daemon, and get ...
But I'd really prefer a more type-safe way to send events to the Daemon, and get output back! One where it's impossible to send the "wrong" type to a connection (like it would be if the Vec<u8> type was replaced with a Data enum, for example).
I've been mulling over it for days, but haven't found a good solution yet. Any ideas?
Published at
2025-02-15 11:25:31Event JSON
{
"id": "786471cc310adabf1f9d79e5eec316c83804fe56cae682e7851f4f831b495a4f",
"pubkey": "35ca9beb10f6282bdc518bc22ac2966b915af41e372314e89f32f2db4a5a4689",
"created_at": 1739618731,
"kind": 1,
"tags": [
[
"e",
"3d0d52a3f5a67cccb5b68944744571bb63641576755eca692bc26766966e6511",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://chaos.social/users/blinry/statuses/114007653208553757",
"activitypub"
]
],
"content": "But I'd really prefer a more type-safe way to send events to the Daemon, and get output back! One where it's impossible to send the \"wrong\" type to a connection (like it would be if the Vec\u003cu8\u003e type was replaced with a Data enum, for example).\n\nI've been mulling over it for days, but haven't found a good solution yet. Any ideas?",
"sig": "997260beee6449e07ae291758930b1661b5c2833296fa2e41e1444907416e0a3684a8f64c04f3944b2aebe07541f4ea713c6acead8dd54afee48525acdbbf1e5"
}