sr25519

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSigner

func NewSigner(b []byte) (signature.Signer, error)

NewSigner creates a new Sr25519 signer using the given byte-serialized private key.

func NewSignerFromKeyPair

func NewSignerFromKeyPair(kp *sr25519.KeyPair) signature.Signer

NewSignerFromKeyPair creates a new Sr25519 signer using the given key pair.

Types

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

PublicKey is an Sr25519 public key.

func (PublicKey) Equal

func (pk PublicKey) Equal(other signature.PublicKey) bool

Equal compares vs another public key for equality.

func (PublicKey) MarshalBinary

func (pk PublicKey) MarshalBinary() ([]byte, error)

MarshalBinary encodes a public key into binary form.

func (PublicKey) MarshalText

func (pk PublicKey) MarshalText() ([]byte, error)

MarshalText encodes a public key into text form.

func (PublicKey) String

func (pk PublicKey) String() string

String returns a string representation of the public key.

func (*PublicKey) UnmarshalBinary

func (pk *PublicKey) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes a binary marshaled public key.

func (*PublicKey) UnmarshalText

func (pk *PublicKey) UnmarshalText(text []byte) error

UnmarshalText decodes a text marshaled public key.

func (PublicKey) Verify

func (pk PublicKey) Verify(context, message, signature []byte) bool

Verify returns true iff the signature is valid for the public key over the context and message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL