iwallet

package
v0.0.0-...-376a440 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: LGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidSignAlgos = []string{"ed25519", "secp256k1"}

ValidSignAlgos ...

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetSignAlgoByName

func GetSignAlgoByName(name string) crypto.Algorithm

GetSignAlgoByName ...

func LoadAndSetAccountForSDK

func LoadAndSetAccountForSDK(s *sdk.AIOUDevSDK) error

LoadAndSetAccountForSDK load account from file

func LoadKeyPair

func LoadKeyPair(name string) (*account.KeyPair, error)

LoadKeyPair ...

func ParseAmountLimit

func ParseAmountLimit(limitStr string) ([]*rpcpb.AmountLimit, error)

ParseAmountLimit ...

func SaveAccount

func SaveAccount(name string, kp *account.KeyPair) error

SaveAccount save account to file

Types

type AccountInfo

type AccountInfo struct {
	Name     string                  `json:"name"`
	Keypairs map[string]*KeyPairInfo `json:"keypairs"`
}

AccountInfo ...

func NewAccountInfo

func NewAccountInfo() *AccountInfo

NewAccountInfo ...

type KeyPairInfo

type KeyPairInfo struct {
	RawKey        string `json:"raw_key,omitempty"`
	KeyType       string `json:"key_type"`
	PubKey        string `json:"public_key"`
	EncryptMethod string `json:"encrypt_method,omitempty"`
	Salt          string `json:"salt,omitempty"`
	EncryptedKey  string `json:"encrypted_key,omitempty"`
	Mac           string `json:"mac,omitempty"`
}

KeyPairInfo ...

func NewKeyPairInfo

func NewKeyPairInfo(rawKey string, keyType string) (*KeyPairInfo, error)

NewKeyPairInfo ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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