account

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ERC20Key

func ERC20Key(token string) string

func SwapperKey

func SwapperKey(token string) string

Types

type Accounts

type Accounts interface {
	GetBitcoinAccount(password string) (libbtc.Account, error)
	GetEthereumAccount(password string) (beth.Account, error)
}

func New

func New(mnemonic string, config Config) Accounts

type Config

type Config struct {
	Ethereum EthereumConfig `json:"ethereum"`
	Bitcoin  string         `json:"bitcoin"`
}

type EthereumConfig

type EthereumConfig struct {
	URL     string          `json:"url"`
	Network string          `json:"network"`
	Swapper string          `json:"swapper"`
	Tokens  []EthereumToken `json:"tokens"`
}

type EthereumToken

type EthereumToken struct {
	Name    string `json:"name"`
	ERC20   string `json:"erc20"`
	Swapper string `json:"swapper"`
}

Jump to

Keyboard shortcuts

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