Remove Cashu Access Token (CAT) system entirely (v0.52.3)
Some checks are pending
Go / build-and-release (push) Waiting to run
Some checks are pending
Go / build-and-release (push) Waiting to run
- Delete pkg/cashu/ package (BDHKE, issuer, verifier, keyset, token) - Delete pkg/interfaces/cashu/ interface definitions - Delete pkg/bunker/acl_adapter.go CAT authorization checker - Delete app/handle-cashu.go HTTP handlers for mint endpoints - Delete docs/NIP-XX-CASHU-ACCESS-TOKENS.md specification - Remove Cashu config fields from app/config/config.go - Remove CashuIssuer/CashuVerifier from app/server.go - Remove CAT initialization and NRC Cashu verifier from app/main.go - Remove token extraction from app/handle-websocket.go - Remove CAT permission checks from app/handle-event.go - Remove CashuEnabled from bunker info response - Remove UseCashu field from NRC connections - Remove AuthModeCAT from NRC protocol - Remove CAT UI from BunkerView.svelte and RelayConnectView.svelte - Remove cashu-client.js from web UI - Add missing bunker worker stores to stores.js Files modified: - app/config/config.go: Removed Cashu config fields - app/server.go: Removed Cashu issuer/verifier - app/main.go: Removed Cashu initialization - app/handle-*.go: Removed CAT checks and handlers - app/listener.go: Removed cashuToken field - pkg/database/nrc.go: Removed UseCashu field - pkg/protocol/nrc/: Removed CAT auth mode and handling - pkg/event/authorization/: Removed CAT import - app/web/src/: Removed CAT UI components and logic - main.go: Removed CAT help text Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,8 +35,6 @@ import (
|
||||
"next.orly.dev/pkg/protocol/nip43"
|
||||
"next.orly.dev/pkg/protocol/publish"
|
||||
"next.orly.dev/pkg/bunker"
|
||||
"next.orly.dev/pkg/cashu/issuer"
|
||||
"next.orly.dev/pkg/cashu/verifier"
|
||||
"next.orly.dev/pkg/protocol/nrc"
|
||||
"next.orly.dev/pkg/ratelimit"
|
||||
"next.orly.dev/pkg/spider"
|
||||
@@ -93,10 +91,6 @@ type Server struct {
|
||||
bunkerServer *bunker.Server
|
||||
subnetPool *wireguard.SubnetPool
|
||||
|
||||
// Cashu access token system (NIP-XX)
|
||||
CashuIssuer *issuer.Issuer
|
||||
CashuVerifier *verifier.Verifier
|
||||
|
||||
// NRC (Nostr Relay Connect) bridge for remote relay access
|
||||
nrcBridge *nrc.Bridge
|
||||
|
||||
@@ -432,14 +426,6 @@ func (s *Server) UserInterface() {
|
||||
s.mux.HandleFunc("/api/bunker/url", s.handleBunkerURL)
|
||||
s.mux.HandleFunc("/api/bunker/info", s.handleBunkerInfo)
|
||||
|
||||
// Cashu access token endpoints (NIP-XX)
|
||||
s.mux.HandleFunc("/cashu/mint", s.handleCashuMint)
|
||||
s.mux.HandleFunc("/cashu/keysets", s.handleCashuKeysets)
|
||||
s.mux.HandleFunc("/cashu/info", s.handleCashuInfo)
|
||||
if s.CashuIssuer != nil {
|
||||
log.Printf("Cashu access token API enabled at /cashu")
|
||||
}
|
||||
|
||||
// NRC (Nostr Relay Connect) management endpoints
|
||||
s.mux.HandleFunc("/api/nrc/connections", s.handleNRCConnectionsRouter)
|
||||
s.mux.HandleFunc("/api/nrc/connections/", s.handleNRCConnectionsRouter)
|
||||
@@ -1510,10 +1496,11 @@ func (s *Server) InitEventServices() {
|
||||
|
||||
// Initialize authorization service
|
||||
authCfg := &authorization.Config{
|
||||
AuthRequired: s.Config.AuthRequired,
|
||||
AuthToWrite: s.Config.AuthToWrite,
|
||||
Admins: s.Admins,
|
||||
Owners: s.Owners,
|
||||
AuthRequired: s.Config.AuthRequired,
|
||||
AuthToWrite: s.Config.AuthToWrite,
|
||||
NIP46BypassAuth: s.Config.NIP46BypassAuth,
|
||||
Admins: s.Admins,
|
||||
Owners: s.Owners,
|
||||
}
|
||||
s.eventAuthorizer = authorization.New(
|
||||
authCfg,
|
||||
|
||||
Reference in New Issue
Block a user