Documentation ¶
Index ¶
- func NewSigner(pk []byte) sdkSignature.Signer
- func PrepareSignerMessage(context, message []byte) ([]byte, error)
- type PublicKey
- func (pk PublicKey) Equal(other sdkSignature.PublicKey) bool
- func (pk PublicKey) MarshalBinary() ([]byte, error)
- func (pk PublicKey) MarshalBinaryUncompressedUntagged() ([]byte, error)
- func (pk PublicKey) MarshalText() ([]byte, error)
- func (pk PublicKey) String() string
- func (pk *PublicKey) UnmarshalBinary(data []byte) error
- func (pk *PublicKey) UnmarshalText(text []byte) error
- func (pk PublicKey) Verify(context, message, signature []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSigner ¶
func NewSigner(pk []byte) sdkSignature.Signer
NewSigner creates a new Secp256k1 signer using the given private key (S256 curve is assumed).
func PrepareSignerMessage ¶
PrepareSignerMessage prepares a context and message for signing by a Signer.
Types ¶
type PublicKey ¶
type PublicKey btcec.PublicKey
PublicKey is a Secp256k1 public key.
func NewPublicKey ¶ added in v0.2.0
NewPublicKey creates a new public key from the given Base64 representation or panics.
func (PublicKey) Equal ¶
func (pk PublicKey) Equal(other sdkSignature.PublicKey) bool
Equal compares vs another public key for equality.
func (PublicKey) MarshalBinary ¶
MarshalBinary encodes a public key into binary form.
func (PublicKey) MarshalBinaryUncompressedUntagged ¶ added in v0.2.0
MarshalBinaryUncompressedUntagged encodes a public key into an uncompressed untagged binary form.
func (PublicKey) MarshalText ¶
MarshalText encodes a public key into text form.
func (*PublicKey) UnmarshalBinary ¶
UnmarshalBinary decodes a binary marshaled public key.
func (*PublicKey) UnmarshalText ¶
UnmarshalText decodes a text marshaled public key.