account

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name     string
	Address  string
	KeyStore KeyStore
	Identity Identity //todo: not added on init
	Password string
}

Account ...

func LoadAccount

func LoadAccount(cfg *config.Config) (*Account, error)

LoadAccount ...

func NewAccount

func NewAccount(cfg *config.Config) (*Account, error)

NewAccount ...

func (*Account) Check

func (acc *Account) Check() error

Check ...

func (*Account) Save

func (acc *Account) Save(cfg *config.Config) error

SaveNode ...

type CipherParams

type CipherParams struct {
	Iv string `json:"iv"`
}

CipherParams ...

type Crypto

type Crypto struct {
	Cipher       string       `json:"cipher"`
	CipherText   string       `json:"ciphertext"`
	CipherParams CipherParams `json:"cipherparams"`
	Kdf          string       `json:"kdf"`
	Kdfparams    KdfParams    `json:"kdfparams"`
	MAC          string       `json:"mac"`
}

Crypto ...

type Identity

type Identity struct {
	PeerID  string
	PrivKey string
}

Identity ...

type KdfParams

type KdfParams struct {
	Dklen int64  `json:"dklen"`
	N     int64  `json:"n"`
	P     int64  `json:"p"`
	R     int64  `json:"r"`
	Salt  string `json:"salt"`
}

KdfParams ...

type KeyStore

type KeyStore struct {
	Address string `json:"address"`
	Crypto  Crypto `json:"crypto"`
	ID      string `json:"id"`
	Version int64  `json:"version"`
}

KeyStore ...

Jump to

Keyboard shortcuts

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