Documentation ¶
Index ¶
- Constants
- func ConvertPubKeyToLibp2pPubKey(publicKey *secp256k1.PublicKey) (*crypto.PubKey, error)
- func DecodeKey(serializedKey string) ([]byte, error)
- func DeserializePrivateKey(serializedKey string) (*secp256k1.PrivateKey, *secp256k1.PublicKey, error)
- func DeserializePublicKey(serializedKey string) (*secp256k1.PublicKey, error)
- func GeneratePrivateKey() (*secp256k1.PrivateKey, error)
- func SerializePrivateKey(privateKey *secp256k1.PrivateKey) (*string, error)
- func SerializePrivateKeyBech32(privateKey *secp256k1.PrivateKey) (*string, error)
- func SerializePublicKey(publicKey *secp256k1.PublicKey) (*string, error)
- func SerializePublicKeyBech32(publicKey *secp256k1.PublicKey) (*string, error)
- func SignCID(cid cid.Cid, privateKey *btcec.PrivateKey) (*schnorr.Signature, error)
- func SignData(data []byte, privateKey *btcec.PrivateKey) (*schnorr.Signature, error)
- func TrimPrivateKey(privateKey string) string
- func TrimPublicKey(publicKey string) string
- func VerifyCIDSignature(signature *schnorr.Signature, cid cid.Cid, publicKey *secp256k1.PublicKey) error
- func VerifySignature(signature *schnorr.Signature, data []byte, publicKey *secp256k1.PublicKey) error
Constants ¶
View Source
const PrivateKeyPrefix = "nsec1"
View Source
const PublicKeyPrefix = "npub1"
Variables ¶
This section is empty.
Functions ¶
func DeserializePrivateKey ¶
func DeserializePublicKey ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*secp256k1.PrivateKey, error)
func SerializePrivateKey ¶
func SerializePublicKey ¶
func TrimPrivateKey ¶
func TrimPublicKey ¶
func VerifyCIDSignature ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.