mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-12 10:08:50 +00:00
accept bunker URIs in $NOSTR_SECRET_KEY, simplify.
fixes https://github.com/fiatjaf/nak/issues/66
This commit is contained in:
10
mcp.go
10
mcp.go
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
@@ -28,13 +27,10 @@ var mcpServer = &cli.Command{
|
||||
version,
|
||||
)
|
||||
|
||||
keyer, sk, err := gatherKeyerFromArguments(ctx, c)
|
||||
keyer, _, err := gatherKeyerFromArguments(ctx, c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if sk == nostr.KeyOne && !c.IsSet("sec") {
|
||||
keyer = nil
|
||||
}
|
||||
|
||||
s.AddTool(mcp.NewTool("publish_note",
|
||||
mcp.WithDescription("Publish a short note event to Nostr with the given text content"),
|
||||
@@ -46,10 +42,6 @@ var mcpServer = &cli.Command{
|
||||
mention, _ := optional[string](r, "mention")
|
||||
relay, _ := optional[string](r, "relay")
|
||||
|
||||
sk := os.Getenv("NOSTR_SECRET_KEY")
|
||||
if sk == "" {
|
||||
sk = "0000000000000000000000000000000000000000000000000000000000000001"
|
||||
}
|
||||
var relays []string
|
||||
|
||||
evt := nostr.Event{
|
||||
|
||||
Reference in New Issue
Block a user