eventstore tests.

This commit is contained in:
fiatjaf
2025-04-18 11:27:22 -03:00
parent 32efaa7c58
commit 92c2de6294
32 changed files with 355 additions and 652 deletions

View File

@@ -21,7 +21,7 @@ func Generate() SecretKey {
type SecretKey [32]byte
func (sk SecretKey) String() string { return hex.EncodeToString(sk[:]) }
func (sk SecretKey) String() string { return "sk::" + sk.Hex() }
func (sk SecretKey) Hex() string { return hex.EncodeToString(sk[:]) }
func (sk SecretKey) Public() PubKey { return GetPublicKey(sk) }
@@ -53,7 +53,7 @@ var ZeroPK = [32]byte{}
type PubKey [32]byte
func (pk PubKey) String() string { return hex.EncodeToString(pk[:]) }
func (pk PubKey) String() string { return "pk::" + pk.Hex() }
func (pk PubKey) Hex() string { return hex.EncodeToString(pk[:]) }
func PubKeyFromHex(pkh string) (PubKey, error) {