Documentation
¶
Index ¶
- func CreateDHTKeyFromPrivateKey(privateKey *btcec.PrivateKey) (string, error)
- func CreateDHTKeyFromPublicKey(publicKey *btcec.PublicKey) (string, error)
- func DeriveKeyFromNsec(nsec string) (string, error)
- func GenerateDHTKey(privateKeyHex string) (string, error)
- func GetDHTKeyForPubkey(pubkey string) (string, error)
- func SignRelayList(relayList []string, nsec string) (string, error)
- func VerifyRelayList(relayList []string, signature string, pubkey string) (bool, error)
- type RelayList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDHTKeyFromPrivateKey ¶
func CreateDHTKeyFromPrivateKey(privateKey *btcec.PrivateKey) (string, error)
CreateDHTKeyFromPrivateKey creates a DHT key from a btcec.PrivateKey
func CreateDHTKeyFromPublicKey ¶
CreateDHTKeyFromPublicKey creates a DHT key from a btcec.PublicKey
func DeriveKeyFromNsec ¶
DeriveKeyFromNsec derives a DHT key from a user's nsec (private key) This provides a consistent way to generate DHT keys from private keys using the same approach as GenerateDHTKey for consistency
func GenerateDHTKey ¶
GenerateDHTKey generates a DHT key from a private key hex string
func GetDHTKeyForPubkey ¶
GetDHTKeyForPubkey derives a DHT key for a given public key This is useful when you only have the public key and need to find the corresponding DHT key to retrieve data
func SignRelayList ¶
SignRelayList signs a relay list with the user's private key The signature can be verified to ensure the relay list was created by the owner