Documentation
¶
Index ¶
- Constants
- func InitSecp256()
- func IsCompressedOrUncompressedPubKey(bytes []byte) bool
- func IsCompressedPubKey(bytes []byte) bool
- func IsDefineHashtypeSignature(vchSig []byte) bool
- func IsLowDERSignature(vchSig []byte) (bool, error)
- func IsValidSignatureEncoding(signs []byte) bool
- type PrivateKey
- type PublicKey
- func (publicKey *PublicKey) IsEqual(otherPublicKey *PublicKey) bool
- func (publicKey *PublicKey) SerializeCompressed() []byte
- func (publicKey *PublicKey) SerializeUncompressed() []byte
- func (publicKey *PublicKey) ToBytes() []byte
- func (publicKey *PublicKey) ToHexString() string
- func (publicKey *PublicKey) ToSecp256k() *secp256k1.PublicKey
- type Signature
Constants ¶
View Source
const ( SigHashAll = 1 SigHashNone = 2 SigHashSingle = 3 SigHashForkID = 0x40 SigHashAnyoneCanpay = 0x80 // SigHashMask defines the number of bits of the hash type which is used // to identify which outputs are signed. SigHashMask = 0x1f )
View Source
const ( PrivateKeyBytesLen = 32 DumpedPrivateKeyVersion = 128 )
Variables ¶
This section is empty.
Functions ¶
func InitSecp256 ¶
func InitSecp256()
func IsCompressedPubKey ¶
func IsLowDERSignature ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func DecodePrivateKey ¶
func DecodePrivateKey(encoded string) (*PrivateKey, error)
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(privateKeyBytes []byte) *PrivateKey
func (*PrivateKey) Encode ¶
func (privateKey *PrivateKey) Encode() []byte
func (*PrivateKey) PubKey ¶
func (privateKey *PrivateKey) PubKey() *PublicKey
func (*PrivateKey) ToString ¶
func (privateKey *PrivateKey) ToString() string
type PublicKey ¶
func ParsePubKey ¶
func (*PublicKey) SerializeCompressed ¶
func (*PublicKey) SerializeUncompressed ¶
func (*PublicKey) ToHexString ¶
func (*PublicKey) ToSecp256k ¶
type Signature ¶
type Signature secp256k1.EcdsaSignature
func ParseDERSignature ¶
func (*Signature) EcdsaNormalize ¶
Click to show internal directories.
Click to hide internal directories.