cosmoskey

package
v2.1.0-mercury-20230522 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 14 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 Cosmos 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

func New

func New() Key

New creates new Key

func (Key) GoString

func (key Key) GoString() string

func (Key) ID

func (key Key) ID() string

func (Key) PublicKey

func (key Key) PublicKey() (pubKey cryptotypes.PubKey)

func (Key) PublicKeyStr

func (key Key) PublicKeyStr() string

PublicKeyStr returns the cosmos address of the public key

func (Key) Raw

func (key Key) Raw() Raw

func (Key) String

func (key Key) String() string

func (Key) ToEncryptedJSON

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

ToEncryptedJSON returns encrypted JSON representing key

func (Key) ToPrivKey

func (key Key) ToPrivKey() cryptotypes.PrivKey

ToPrivKey returns the key usable for signing.

type Raw

type Raw []byte

func (Raw) GoString

func (raw Raw) GoString() string

func (Raw) Key

func (raw Raw) Key() Key

func (Raw) String

func (raw Raw) String() string

Jump to

Keyboard shortcuts

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