key

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractKey

func ExtractKey(xnsContext *types.XnsContext, home string) (cryptotypes.PrivKey, error)

func GenerateKey

func GenerateKey(xnsContext *types.XnsContext) (string, error)

Types

type XnsGatewayKey

type XnsGatewayKey struct {
	Address string `json:"address"`
	PrivKey struct {
		Type  string `json:"type"`
		Kdf   string `json:"kdf"`
		Salt  string `json:"salt"`
		Value string `json:"value"`
	} `json:"priv_key"`
	PubKey struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"pub_key"`
}

The private key for signing transaction is sended to the chain. TODO - Change PEM file to json. XnsGatewayKey is unused.

func NewXnsGatewayKey

func NewXnsGatewayKey(addr, privKeyType, kdf, salt, privValue, pubKeytype, pubValue string) (xnsGatewayKey XnsGatewayKey)

Jump to

Keyboard shortcuts

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