keystore

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mainnet = account.Config{
	Bitcoin: "mainnet",
	Ethereum: account.EthereumConfig{
		URL:     "https://kovan.infura.io",
		Network: "kovan",
		Swapper: "0x2218fa20c33765e7e01671ee6aaca75fbaf3a974",
		Tokens: []account.EthereumToken{
			account.EthereumToken{
				Name:    "WBTC",
				ERC20:   "0xA1D3EEcb76285B4435550E4D963B8042A8bffbF0",
				Swapper: "0x2218fa20c33765e7e01671ee6aaca75fbaf3a974",
			},
		},
	},
}

Mainnet is the Swapperd's mainnet config object

View Source
var Testnet = account.Config{
	Bitcoin: "testnet",
	Ethereum: account.EthereumConfig{
		URL:     "https://kovan.infura.io",
		Network: "kovan",
		Swapper: "0x2218fa20c33765e7e01671ee6aaca75fbaf3a974",
		Tokens: []account.EthereumToken{
			account.EthereumToken{
				Name:    "WBTC",
				ERC20:   "0xA1D3EEcb76285B4435550E4D963B8042A8bffbF0",
				Swapper: "0x2218fa20c33765e7e01671ee6aaca75fbaf3a974",
			},
		},
	},
}

Testnet is the Swapperd's testnet config object

Functions

func Generate

func Generate(network, username, passwordHash string) (string, error)

func LoadAccounts

func LoadAccounts(network string) (account.Accounts, error)

func LoadAuthenticator

func LoadAuthenticator(network string) (auth.Authenticator, error)

Types

type Keystore

type Keystore struct {
	Username     string         `json:"username"`
	PasswordHash string         `json:"passwordHash"`
	Mnemonic     string         `json:"mnemonic"`
	Config       account.Config `json:"config"`
}

Jump to

Keyboard shortcuts

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