accounts

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 7 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 {
	Address string `json:"address"`
	URL     URL
}

type KeyStoreWallets

type KeyStoreWallets interface {
	Accounts() ([]Account, error)

	BuildAndSign(txbuilder authtxb.TxBuilder, addr string, passphrase string, msgs []sdk.Msg) ([]byte, error)

	Sign(txbuilder authtxb.TxBuilder, addr string, passphrase string, msg authtxb.StdSignMsg) ([]byte, error)

	SignStdTx(txbuilder authtxb.TxBuilder, stdTx auth.StdTx, addr string, passphrase string) (signedStdTx auth.StdTx, err error)

	GetPrivKey(addr string) (string, error)
}

type KeyStores

type KeyStores interface {
	NewKey(passphrase string) (string, error)

	RecoverKey(strPrivKey string, passPhrase string) error

	RecoverKeyByMnemonic(mnemonic string, bip39Passphrase string, passPhrase string, account, index uint32) error
}

type URL

type URL struct {
	Scheme string // Protocol scheme to identify a capable account backend
	Path   string // Path for the backend to identify a unique entity
}

func (URL) Cmp

func (u URL) Cmp(url URL) int

Cmp compares x and y and returns:

-1 if x <  y
 0 if x == y
+1 if x >  y

func (URL) MarshalJSON

func (u URL) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (URL) String

func (u URL) String() string

String implements the stringer interface.

func (URL) TerminalString

func (u URL) TerminalString() string

TerminalString implements the log.TerminalStringer interface.

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(input []byte) error

UnmarshalJSON parses url.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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