solkey

package
v2.15.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

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

Key represents Solana key

func FromEncryptedJSON

func FromEncryptedJSON(keyJSON []byte, password string) (Key, error)

FromEncryptedJSON gets key from json and password

func MustNewInsecure

func MustNewInsecure(reader io.Reader) Key

MustNewInsecure return Key if no error

func New

func New() (Key, error)

New creates new Key

func (Key) GetPublic

func (key Key) GetPublic() ed25519.PublicKey

GetPublic get Key's public key

func (Key) GoString

func (key Key) GoString() string

GoString wraps String()

func (Key) ID

func (key Key) ID() string

ID gets Key ID

func (Key) PublicKey

func (key Key) PublicKey() (pubKey solana.PublicKey)

PublicKey copies public key slice

func (Key) PublicKeyStr

func (key Key) PublicKeyStr() string

PublicKeyStr return base58 encoded public key

func (Key) Raw

func (key Key) Raw() Raw

Raw from private key

func (Key) Sign

func (key Key) Sign(msg []byte) ([]byte, error)

Sign is used to sign a message

func (Key) String

func (key Key) String() string

String is the print-friendly format of the Key

func (Key) ToEncryptedJSON

func (key Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)

ToEncryptedJSON returns encrypted JSON representing key

type Raw

type Raw []byte

Raw represents the Solana private key

func (Raw) GoString

func (raw Raw) GoString() string

GoString wraps String()

func (Raw) Key

func (raw Raw) Key() Key

Key gets the Key

func (Raw) String

func (raw Raw) String() string

String returns description

Jump to

Keyboard shortcuts

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