From 7df4cdcb4fe8ed5e6064f8f5a3bce131be125429 Mon Sep 17 00:00:00 2001 From: Kay Date: Sat, 8 Feb 2025 12:21:01 +0000 Subject: [PATCH] nip-86: stat. --- nip86/methods.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nip86/methods.go b/nip86/methods.go index 5d860b7..df60614 100644 --- a/nip86/methods.go +++ b/nip86/methods.go @@ -168,6 +168,8 @@ func DecodeRequest(req Request) (MethodParams, error) { Pubkey: pubkey, DisallowMethods: disallowedMethods, }, nil + case "stats": + return Stats{}, nil default: return nil, fmt.Errorf("unknown method '%s'", req.Method) } @@ -200,6 +202,7 @@ var ( _ MethodParams = (*ListDisallowedKinds)(nil) _ MethodParams = (*GrantAdmin)(nil) _ MethodParams = (*RevokeAdmin)(nil) + _ MethodParams = (*Stats)(nil) ) type SupportedMethods struct{} @@ -323,3 +326,7 @@ type RevokeAdmin struct { } func (RevokeAdmin) MethodName() string { return "revokeadmin" } + +type Stats struct{} + +func (Stats) MethodName() string { return "stats" }