Documentation
¶
Overview ¶
Package bunker provides a NIP-46 remote signing service that listens only on the WireGuard VPN network for secure access.
Index ¶
Constants ¶
View Source
const ( MethodConnect = "connect" MethodGetPublicKey = "get_public_key" MethodSignEvent = "sign_event" MethodNIP04Encrypt = "nip04_encrypt" MethodNIP04Decrypt = "nip04_decrypt" MethodNIP44Encrypt = "nip44_encrypt" MethodNIP44Decrypt = "nip44_decrypt" MethodPing = "ping" )
NIP-46 method names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RelaySigner signer.I
RelayPubkey []byte
Netstack *netstack.Net
ListenAddr string // IP:port on WireGuard network
}
Config holds bunker server configuration.
type NIP46Request ¶
type NIP46Request struct {
ID string `json:"id"`
Method string `json:"method"`
Params json.RawMessage `json:"params"`
}
NIP46Request represents a NIP-46 request from a client.
type NIP46Response ¶
type NIP46Response struct {
ID string `json:"id"`
Result any `json:"result,omitempty"`
Error string `json:"error,omitempty"`
}
NIP46Response represents a NIP-46 response to a client.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the NIP-46 bunker server.
func (*Server) RelayPubkeyHex ¶
RelayPubkeyHex returns the relay's public key as hex.
func (*Server) SessionCount ¶
SessionCount returns the number of active sessions.
func (*Server) Start ¶
Start begins listening for bunker connections on the WireGuard network.
type Session ¶
type Session struct {
ID string
// contains filtered or unexported fields
}
Session represents a NIP-46 client session.
Source Files
¶
- server.go
- session.go
Click to show internal directories.
Click to hide internal directories.