Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Mainnet = Config{ Bitcoin: BlockchainConfig{ Network: Network{ Name: "mainnet", }, }, Ethereum: BlockchainConfig{ Network: Network{ Name: "mainnet", URL: "https://mainnet.infura.io", }, }, }
Mainnet is the Swapperd's mainnet config object
View Source
var Testnet = Config{ Bitcoin: BlockchainConfig{ Network: Network{ Name: "testnet", }, }, Ethereum: BlockchainConfig{ Network: Network{ Name: "kovan", URL: "https://kovan.infura.io", }, }, }
Testnet is the Swapperd's testnet config object
Functions ¶
This section is empty.
Types ¶
type BlockchainConfig ¶
type BlockchainConfig struct {
Network Network `json:"network"`
}
type Config ¶
type Config struct {
Mnemonic string `json:"mnemonic"`
Ethereum BlockchainConfig `json:"ethereum"`
Bitcoin BlockchainConfig `json:"bitcoin"`
}
type ECDSASigner ¶
type Wallet ¶
type Wallet interface {
ID(password, idType string) (string, error)
SupportedTokens() []tokens.Token
Balances(password string) (map[tokens.Name]blockchain.Balance, error)
Balance(password string, token tokens.Token) (blockchain.Balance, error)
Lookup(token tokens.Token, txHash string) (transfer.UpdateReceipt, error)
Transfer(password string, token tokens.Token, to string, amount *big.Int, speed blockchain.TxExecutionSpeed, senAll bool) (string, blockchain.Cost, error)
GetAddress(password string, blockchainName tokens.BlockchainName) (string, error)
Addresses(password string) (map[tokens.Name]string, error)
VerifyAddress(blockchain tokens.BlockchainName, address string) error
VerifyBalance(password string, token tokens.Token, balance *big.Int) error
EthereumAccount(password string) (libeth.Account, error)
BitcoinAccount(password string) (libbtc.Account, error)
ECDSASigner(password string) (ECDSASigner, error)
}
Click to show internal directories.
Click to hide internal directories.