nip11: add "supported_grasps" special field.

This commit is contained in:
fiatjaf
2025-11-25 06:55:15 -03:00
parent 4df9ffa4c8
commit 6367bd71d4
2 changed files with 6 additions and 0 deletions

View File

@@ -51,6 +51,9 @@ func New(rl *khatru.Relay, repositoryDir string) *GraspServer {
},
}
rl.Info.AddSupportedNIP(34)
rl.Info.SupportedGrasps = append(rl.Info.SupportedGrasps, "GRASP-01")
base := rl.Router()
mux := http.NewServeMux()

View File

@@ -28,6 +28,9 @@ type RelayInformationDocument struct {
Retention []*RelayRetentionDocument `json:"retention,omitempty"`
Icon string `json:"icon,omitempty"`
Banner string `json:"banner,omitempty"`
// nip-34 grasp stuff
SupportedGrasps []string `json:"supported_grasps,omitempty"`
}
func (info *RelayInformationDocument) AddSupportedNIP(number int) {