Select the types of activity you want to include in your feed.
crypto: use PublicKey() instead of Public()
Based on double-checking the crypto/ecdsa stdlib interface, Public() often returns a crypto.Public, and PublicKey() is used to return specifically the package-local PublicKey type.
···2828 if err != nil {
2929 panic("failed to generate key")
3030 }
3131- pub, err := priv.Public()
3131+ pub, err := priv.PublicKey()
3232 if err != nil {
3333 panic("failed to get public key")
3434 }
+1-1
atproto/crypto/k256.go
···7373}
74747575// Outputs the [PublicKey] corresponding to this [PrivateKeyK256]; it will be a [PublicKeyK256].
7676-func (k PrivateKeyK256) Public() (PublicKey, error) {
7676+func (k PrivateKeyK256) PublicKey() (PublicKey, error) {
7777 pub := PublicKeyK256{pubK256: k.privK256.PublicKey()}
7878 err := pub.ensureBytes()
7979 if err != nil {
+1-3
atproto/crypto/keys.go
···1313type PrivateKey interface {
1414 Equal(other PrivateKey) bool
15151616- // If necessary, pre-verifies that the public key curve point is valid and
1717- // will be possible to encode as bytes or a string later.
1818- Public() (PublicKey, error)
1616+ PublicKey() (PublicKey, error)
19172018 // Hashes the raw bytes using SHA-256, then signs the digest bytes.
2119 // Always returns a "low-S" signature (for elliptic curve systems where that is ambigious).