terrakey

package
v1.5.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedTerraKeyExport

type EncryptedTerraKeyExport struct {
	KeyType   string              `json:"keyType"`
	PublicKey string              `json:"publicKey"`
	Crypto    keystore.CryptoJSON `json:"crypto"`
}

EncryptedTerraKeyExport represents the Terra encrypted key

type Key

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

Key represents Terra 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 terra 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