parse hex and encode to npub/nprofile/etc.

This commit is contained in:
fiatjaf
2023-03-25 09:39:02 -03:00
parent 18524fe613
commit 268022800d
4 changed files with 77 additions and 25 deletions

View File

@@ -90,10 +90,11 @@ object Main extends IOWebApp {
div(
cls := "w-full flex my-5",
store.result.map {
case Left(msg) => div(msg)
case Right(event: Event) => renderEvent(event, store)
case Right(pp: ProfilePointer) => renderProfilePointer(pp)
case Right(evp: EventPointer) => renderEventPointer(evp)
case Left(msg) => div(msg)
case Right(bytes: ByteVector32) => render32Bytes(bytes)
case Right(event: Event) => renderEvent(event, store)
case Right(pp: ProfilePointer) => renderProfilePointer(pp)
case Right(evp: EventPointer) => renderEventPointer(evp)
case Right(sk: PrivateKey) =>
renderProfilePointer(
ProfilePointer(pubkey = sk.publicKey.xonly),