Martti Malmi on Nostr: It's very simple. Private block: { kind: 16462, content: nip04.encrypt(myPriv, myPub, ...
It's very simple. Private block:
{
kind: 16462,
content: nip04.encrypt(myPriv, myPub, JSON.stringify(privateBlockedUsersArray))
}
Public block:
{
kind: 16463,
content: JSON.stringify(publicBlockedUsersArray)
}
I picked the kind by random from the replaceable events range.
Any improvements are welcome. One thing that comes to mind is recording the reason or expiry date for block. If such additional attributes are needed, object might be better than array.
{
kind: 16462,
content: nip04.encrypt(myPriv, myPub, JSON.stringify(privateBlockedUsersArray))
}
Public block:
{
kind: 16463,
content: JSON.stringify(publicBlockedUsersArray)
}
I picked the kind by random from the replaceable events range.
Any improvements are welcome. One thing that comes to mind is recording the reason or expiry date for block. If such additional attributes are needed, object might be better than array.