aptoskey

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 10 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 Aptos key

func FromEncryptedJSON

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

FromEncryptedJSON gets key from json and password

func KeyFor

func KeyFor(raw internal.Raw) Key

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) ID

func (key Key) ID() string

ID gets Key ID

func (Key) PublicKeyStr

func (key Key) PublicKeyStr() string

PublicKeyStr returns hex encoded public key

func (Key) Raw

func (key Key) Raw() internal.Raw

Raw returns the seed from private key

func (Key) Sign

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

Sign is used to sign a message

func (Key) ToEncryptedJSON

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

ToEncryptedJSON returns encrypted JSON representing key

Jump to

Keyboard shortcuts

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