keyring

package
v0.0.0-...-f5f0bdb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceKeyRing

type InterfaceKeyRing interface {
	DecodeAddress(encoded []byte) ([]byte, error)
	EncodeAddress(key []byte) (string, error)
	SetAddressPrefix(prefix address.PrefixEnum) error
	AddPair(pair *pair.Pair) (*pair.Pair, error)
	AddFromAddress(addr []byte, meta keytypes.Meta, defaultEncoded []byte) (*pair.Pair, error)
	AddFromMnemonic(mn, password string, meta keytypes.Meta) (*pair.Pair, error)
	AddFromSeed(seed []byte, meta keytypes.Meta) (*pair.Pair, error)
	AddFromJSON(data []byte, password *string) (*pair.Pair, error)
	GetPair(addr []byte) (*pair.Pair, error)
	GetPairs() ([]*pair.Pair, error)
	GetPublicKeys() ([][32]byte, error)
	RemovePair(addr []byte) error
	// note: change to Marshal? Add Unmarshal?
	ToJSON(addr []byte, password *string) ([]byte, error)
}

InterfaceKeyRing ...

type KeyRing

type KeyRing struct {
	Pairs pair.InterfacePairs
}

KeyRing ...

func New

func New() (*KeyRing, error)

New ...

func (*KeyRing) AddFromAddress

func (k *KeyRing) AddFromAddress(addr []byte, meta keytypes.Meta, defaultEncoded []byte) (*pair.Pair, error)

AddFromAddress ...

func (*KeyRing) AddFromJSON

func (k *KeyRing) AddFromJSON(data []byte, password *string) (*pair.Pair, error)

AddFromJSON ...

func (*KeyRing) AddFromMnemonic

func (k *KeyRing) AddFromMnemonic(mn, password string, meta keytypes.Meta) (*pair.Pair, error)

AddFromMnemonic ...

func (*KeyRing) AddFromSeed

func (k *KeyRing) AddFromSeed(seed []byte, meta keytypes.Meta) (*pair.Pair, error)

AddFromSeed ...

func (*KeyRing) AddPair

func (k *KeyRing) AddPair(pair *pair.Pair) (*pair.Pair, error)

AddPair ...

func (*KeyRing) DecodeAddress

func (k *KeyRing) DecodeAddress(encoded []byte) ([]byte, error)

DecodeAddress ...

func (*KeyRing) EncodeAddress

func (k *KeyRing) EncodeAddress(key []byte) (string, error)

EncodeAddress ...

func (*KeyRing) GetPair

func (k *KeyRing) GetPair(addr []byte) (*pair.Pair, error)

GetPair ...

func (*KeyRing) GetPairs

func (k *KeyRing) GetPairs() ([]*pair.Pair, error)

GetPairs ...

func (*KeyRing) GetPublicKeys

func (k *KeyRing) GetPublicKeys() ([][32]byte, error)

GetPublicKeys ...

func (*KeyRing) RemovePair

func (k *KeyRing) RemovePair(addr []byte) error

RemovePair ...

func (*KeyRing) SetAddressPrefix

func (k *KeyRing) SetAddressPrefix(prefix address.PrefixEnum) error

SetAddressPrefix ...

func (*KeyRing) ToJSON

func (k *KeyRing) ToJSON(addr []byte, password *string) ([]byte, error)

ToJSON ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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