From 6fc1627fcc2c4359c5119a49d603eb73b469b623 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 4 May 2023 08:22:17 -0300 Subject: [PATCH] json tags on pointers. --- pointers.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pointers.go b/pointers.go index 2daade0..9f4da04 100644 --- a/pointers.go +++ b/pointers.go @@ -1,19 +1,20 @@ package nostr type ProfilePointer struct { - PublicKey string - Relays []string + PublicKey string `json:"pubkey"` + Relays []string `json:"relays,omitempty"` } type EventPointer struct { - ID string - Relays []string - Author string + ID string `json:"id"` + Relays []string `json:"relays,omitempty"` + Author string `json:"author,omitempty"` + Kind int `json:"kind,omitempty"` } type EntityPointer struct { - PublicKey string - Kind int - Identifier string - Relays []string + PublicKey string `json:"pubkey"` + Kind int `json:"kind,omitempty"` + Identifier string `json:"identifier,omitempty"` + Relays []string `json:"relays,omitempty"` }