wallet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 49 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// InfuraAPIKey is the hard coded Infura API key
	InfuraAPIKey = "v3/91c82af0169c4115940c76d331410749"
	// EtherScanAPIKey is needed for all Eherscan requests
	EtherScanAPIKey = "KA15D8FCHGBFZ4CQ25Y4NZM24417AXWF7M"
)
View Source
const EscrowABI = "" /* 6068-byte string literal not displayed */

EscrowABI is the input ABI used to generate the binding from.

View Source
const EscrowBin = `` /* 34540-byte string literal not displayed */

EscrowBin is the compiled bytecode used for deploying new contracts.

View Source
const RegistryABI = "" /* 6023-byte string literal not displayed */

RegistryABI is the input ABI used to generate the binding from.

View Source
const RegistryBin = `` /* 21300-byte string literal not displayed */

RegistryBin is the compiled bytecode used for deploying new contracts.

View Source
const TokenABI = "" /* 2309-byte string literal not displayed */

TokenABI is the input ABI used to generate the binding from.

Variables

View Source
var (

	// EthCurrencyDefinition is eth defaults
	EthCurrencyDefinition = wi.CurrencyDefinition{
		Code:         "ETH",
		Divisibility: 18,
	}
)

Functions

func GenScriptHash

func GenScriptHash(script EthRedeemScript) ([32]byte, string, error)

GenScriptHash - used to generate script hash for eth as per escrow smart contract

func GenTokenScriptHash

func GenTokenScriptHash(script EthRedeemScript) ([32]byte, string, error)

GenTokenScriptHash - used to generate script hash for erc20 token as per escrow smart contract

func GenWallet

func GenWallet()

GenWallet creates a wallet

func NormalizeCurrencyCode

func NormalizeCurrencyCode(currencyCode string) string

NormalizeCurrencyCode standardizes the format for the given currency code

func SerializeEthScript

func SerializeEthScript(scrpt EthRedeemScript) ([]byte, error)

SerializeEthScript - used to serialize eth redeem script

func SerializePendingTxn

func SerializePendingTxn(pTxn PendingTxn) ([]byte, error)

SerializePendingTxn - used to serialize eth pending txn

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

Account represents ethereum keystore

func GenDefaultKeyStore

func GenDefaultKeyStore(passwd string) (*Account, error)

GenDefaultKeyStore will generate a default keystore

func NewAccountFromKeyfile

func NewAccountFromKeyfile(keyFile, password string) (*Account, error)

NewAccountFromKeyfile returns the account imported

func NewAccountFromMnemonic

func NewAccountFromMnemonic(mnemonic, password string, params *chaincfg.Params) (*Account, error)

NewAccountFromMnemonic returns generated account

func (*Account) Address

func (account *Account) Address() common.Address

Address returns the eth address

func (*Account) SignTransaction

func (account *Account) SignTransaction(signer types.Signer, tx *types.Transaction) (*types.Transaction, error)

SignTransaction will sign the txn

type BitfinexDecoder

type BitfinexDecoder struct{}

BitfinexDecoder - decoder with Bitfinex exchange as provider

type BittrexDecoder

type BittrexDecoder struct{}

BittrexDecoder - decoder with Bittrex exchange as provider

type ERC20Wallet

type ERC20Wallet struct {
	// contains filtered or unexported fields
}

ERC20Wallet is the wallet implementation for ethereum

func NewERC20Wallet

func NewERC20Wallet(cfg config.CoinConfig, params *chaincfg.Params, mnemonic string, proxy proxy.Dialer) (*ERC20Wallet, error)

NewERC20Wallet will return a reference to the ERC20 Wallet

func (*ERC20Wallet) AddTransactionListener

func (wallet *ERC20Wallet) AddTransactionListener(callback func(wi.TransactionCallback))

AddTransactionListener - add a txn listener

func (*ERC20Wallet) Balance

func (wallet *ERC20Wallet) Balance() (confirmed, unconfirmed int64)

Balance - Get the confirmed and unconfirmed balances

func (*ERC20Wallet) BumpFee

func (wallet *ERC20Wallet) BumpFee(txid chainhash.Hash) (*chainhash.Hash, error)

BumpFee - Bump the fee for the given transaction

func (*ERC20Wallet) ChainTip

func (wallet *ERC20Wallet) ChainTip() (uint32, chainhash.Hash)

ChainTip - Get the height and best hash of the blockchain

func (*ERC20Wallet) ChildKey

func (wallet *ERC20Wallet) ChildKey(keyBytes []byte, chaincode []byte, isPrivateKey bool) (*hd.ExtendedKey, error)

ChildKey Generate a child key using the given chaincode. The key is used in multisig transactions. For most implementations this should just be child key 0.

func (*ERC20Wallet) Close

func (wallet *ERC20Wallet) Close()

Close will stop the wallet daemon

func (*ERC20Wallet) CreateAddress

func (wallet *ERC20Wallet) CreateAddress() (common.Address, error)

CreateAddress - used to generate a new address

func (*ERC20Wallet) CreateMultisigSignature

func (wallet *ERC20Wallet) CreateMultisigSignature(ins []wi.TransactionInput, outs []wi.TransactionOutput, key *hd.ExtendedKey, redeemScript []byte, feePerByte uint64) ([]wi.Signature, error)

CreateMultisigSignature - Create a signature for a multisig transaction

func (*ERC20Wallet) CurrencyCode

func (wallet *ERC20Wallet) CurrencyCode() string

CurrencyCode returns symbol

func (*ERC20Wallet) CurrentAddress

func (wallet *ERC20Wallet) CurrentAddress(purpose wi.KeyPurpose) btcutil.Address

CurrentAddress - Get the current address for the given purpose

func (*ERC20Wallet) DecodeAddress

func (wallet *ERC20Wallet) DecodeAddress(addr string) (btcutil.Address, error)

DecodeAddress - Parse the address string and return an address interface

func (*ERC20Wallet) EstimateFee

func (wallet *ERC20Wallet) EstimateFee(ins []wi.TransactionInput, outs []wi.TransactionOutput, feePerByte uint64) uint64

EstimateFee - Calculates the estimated size of the transaction and returns the total fee for the given feePerByte

func (*ERC20Wallet) EstimateSpendFee

func (wallet *ERC20Wallet) EstimateSpendFee(amount int64, feeLevel wi.FeeLevel) (uint64, error)

EstimateSpendFee - Build a spend transaction for the amount and return the transaction fee

func (*ERC20Wallet) ExchangeRates

func (wallet *ERC20Wallet) ExchangeRates() wi.ExchangeRates

ExchangeRates - return the exchangerates

func (*ERC20Wallet) GenerateMultisigScript

func (wallet *ERC20Wallet) GenerateMultisigScript(keys []hd.ExtendedKey, threshold int, timeout time.Duration, timeoutKey *hd.ExtendedKey) (btcutil.Address, []byte, error)

GenerateMultisigScript - Generate a multisig script from public keys. If a timeout is included the returned script should be a timelocked escrow which releases using the timeoutKey.

func (*ERC20Wallet) GetBalance

func (wallet *ERC20Wallet) GetBalance() (*big.Int, error)

GetBalance returns the balance for the wallet

func (*ERC20Wallet) GetConfirmations

func (wallet *ERC20Wallet) GetConfirmations(txid chainhash.Hash) (confirms, atHeight uint32, err error)

GetConfirmations - Return the number of confirmations and the height for a transaction

func (*ERC20Wallet) GetFeePerByte

func (wallet *ERC20Wallet) GetFeePerByte(feeLevel wi.FeeLevel) uint64

GetFeePerByte - Get the current fee per byte

func (*ERC20Wallet) GetTransaction

func (wallet *ERC20Wallet) GetTransaction(txid chainhash.Hash) (wi.Txn, error)

GetTransaction - Get info on a specific transaction

func (*ERC20Wallet) GetUnconfirmedBalance

func (wallet *ERC20Wallet) GetUnconfirmedBalance() (*big.Int, error)

GetUnconfirmedBalance returns the unconfirmed balance for the wallet

func (*ERC20Wallet) HasKey

func (wallet *ERC20Wallet) HasKey(addr btcutil.Address) bool

HasKey - Returns if the wallet has the key for the given address

func (*ERC20Wallet) IsDust

func (wallet *ERC20Wallet) IsDust(amount int64) bool

IsDust Check if this amount is considered dust - 10000 wei

func (*ERC20Wallet) MasterPrivateKey

func (wallet *ERC20Wallet) MasterPrivateKey() *hd.ExtendedKey

MasterPrivateKey - Get the master private key

func (*ERC20Wallet) MasterPublicKey

func (wallet *ERC20Wallet) MasterPublicKey() *hd.ExtendedKey

MasterPublicKey - Get the master public key

func (*ERC20Wallet) Multisign

func (wallet *ERC20Wallet) Multisign(ins []wi.TransactionInput, outs []wi.TransactionOutput, sigs1 []wi.Signature, sigs2 []wi.Signature, redeemScript []byte, feePerByte uint64, broadcast bool) ([]byte, error)

Multisign - Combine signatures and optionally broadcast

func (*ERC20Wallet) NewAddress

func (wallet *ERC20Wallet) NewAddress(purpose wi.KeyPurpose) btcutil.Address

NewAddress - Returns a fresh address that has never been returned by this function

func (*ERC20Wallet) Params

func (wallet *ERC20Wallet) Params() *chaincfg.Params

Params - return nil to comply

func (*ERC20Wallet) ReSyncBlockchain

func (wallet *ERC20Wallet) ReSyncBlockchain(fromTime time.Time)

ReSyncBlockchain - Use this to re-download merkle blocks in case of missed transactions

func (*ERC20Wallet) ScriptToAddress

func (wallet *ERC20Wallet) ScriptToAddress(script []byte) (btcutil.Address, error)

ScriptToAddress - ?

func (*ERC20Wallet) Spend

func (wallet *ERC20Wallet) Spend(amount big.Int, addr btcutil.Address, feeLevel wi.FeeLevel, referenceID string) (*chainhash.Hash, error)

Spend - Send ether to an external wallet

func (*ERC20Wallet) Start

func (wallet *ERC20Wallet) Start()

Start will start the wallet daemon

func (*ERC20Wallet) SweepAddress

func (wallet *ERC20Wallet) SweepAddress(utxos []wi.TransactionInput, address *btcutil.Address, key *hd.ExtendedKey, redeemScript *[]byte, feeLevel wi.FeeLevel) (*chainhash.Hash, error)

SweepAddress - Build and broadcast a transaction that sweeps all coins from an address. If it is a p2sh multisig, the redeemScript must be included

func (*ERC20Wallet) Transactions

func (wallet *ERC20Wallet) Transactions() ([]wi.Txn, error)

Transactions - Returns a list of transactions for this wallet

func (*ERC20Wallet) Transfer

func (wallet *ERC20Wallet) Transfer(to string, value *big.Int) (common.Hash, error)

Transfer will transfer the amount from this wallet to the spec address

type Escrow

type Escrow struct {
	EscrowCaller     // Read-only binding to the contract
	EscrowTransactor // Write-only binding to the contract
	EscrowFilterer   // Log filterer for contract events
}

Escrow is an auto generated Go binding around an Ethereum contract.

func DeployEscrow

func DeployEscrow(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Escrow, error)

DeployEscrow deploys a new Ethereum contract, binding an instance of Escrow to it.

func NewEscrow

func NewEscrow(address common.Address, backend bind.ContractBackend) (*Escrow, error)

NewEscrow creates a new instance of Escrow, bound to a specific deployed contract.

type EscrowCaller

type EscrowCaller struct {
	// contains filtered or unexported fields
}

EscrowCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewEscrowCaller

func NewEscrowCaller(address common.Address, caller bind.ContractCaller) (*EscrowCaller, error)

NewEscrowCaller creates a new read-only instance of Escrow, bound to a specific deployed contract.

func (*EscrowCaller) CalculateRedeemScriptHash

func (_Escrow *EscrowCaller) CalculateRedeemScriptHash(opts *bind.CallOpts, uniqueId [20]byte, threshold uint8, timeoutHours uint32, buyer common.Address, seller common.Address, moderator common.Address, tokenAddress common.Address) ([32]byte, error)

CalculateRedeemScriptHash is a free data retrieval call binding the contract method 0x46fbcdeb.

Solidity: function calculateRedeemScriptHash(uniqueId bytes20, threshold uint8, timeoutHours uint32, buyer address, seller address, moderator address, tokenAddress address) constant returns(hash bytes32)

func (*EscrowCaller) CheckBeneficiary

func (_Escrow *EscrowCaller) CheckBeneficiary(opts *bind.CallOpts, scriptHash [32]byte, beneficiary common.Address) (bool, error)

CheckBeneficiary is a free data retrieval call binding the contract method 0xb0550c66.

Solidity: function checkBeneficiary(scriptHash bytes32, beneficiary address) constant returns(check bool)

func (*EscrowCaller) CheckVote

func (_Escrow *EscrowCaller) CheckVote(opts *bind.CallOpts, scriptHash [32]byte, party common.Address) (bool, error)

CheckVote is a free data retrieval call binding the contract method 0xf0786562.

Solidity: function checkVote(scriptHash bytes32, party address) constant returns(vote bool)

func (*EscrowCaller) GetAllTransactionsForParty

func (_Escrow *EscrowCaller) GetAllTransactionsForParty(opts *bind.CallOpts, partyAddress common.Address) ([][32]byte, error)

GetAllTransactionsForParty is a free data retrieval call binding the contract method 0xbe84ceaf.

Solidity: function getAllTransactionsForParty(partyAddress address) constant returns(scriptHashes bytes32[])

func (*EscrowCaller) PartyVsTransaction

func (_Escrow *EscrowCaller) PartyVsTransaction(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) ([32]byte, error)

PartyVsTransaction is a free data retrieval call binding the contract method 0xf5dbe09c.

Solidity: function partyVsTransaction( address, uint256) constant returns(bytes32)

func (*EscrowCaller) TransactionCount

func (_Escrow *EscrowCaller) TransactionCount(opts *bind.CallOpts) (*big.Int, error)

TransactionCount is a free data retrieval call binding the contract method 0xb77bf600.

Solidity: function transactionCount() constant returns(uint256)

func (*EscrowCaller) Transactions

func (_Escrow *EscrowCaller) Transactions(opts *bind.CallOpts, arg0 [32]byte) (struct {
	ScriptHash      [32]byte
	Value           *big.Int
	LastModified    *big.Int
	Status          uint8
	TransactionType uint8
	Threshold       uint8
	TimeoutHours    uint32
	Buyer           common.Address
	Seller          common.Address
	TokenAddress    common.Address
	Moderator       common.Address
}, error)

Transactions is a free data retrieval call binding the contract method 0x642f2eaf.

Solidity: function transactions( bytes32) constant returns(scriptHash bytes32, value uint256, lastModified uint256, status uint8, transactionType uint8, threshold uint8, timeoutHours uint32, buyer address, seller address, tokenAddress address, moderator address)

type EscrowCallerRaw

type EscrowCallerRaw struct {
	Contract *EscrowCaller // Generic read-only contract binding to access the raw methods on
}

EscrowCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*EscrowCallerRaw) Call

func (_Escrow *EscrowCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type EscrowCallerSession

type EscrowCallerSession struct {
	Contract *EscrowCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

EscrowCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*EscrowCallerSession) CalculateRedeemScriptHash

func (_Escrow *EscrowCallerSession) CalculateRedeemScriptHash(uniqueId [20]byte, threshold uint8, timeoutHours uint32, buyer common.Address, seller common.Address, moderator common.Address, tokenAddress common.Address) ([32]byte, error)

CalculateRedeemScriptHash is a free data retrieval call binding the contract method 0x46fbcdeb.

Solidity: function calculateRedeemScriptHash(uniqueId bytes20, threshold uint8, timeoutHours uint32, buyer address, seller address, moderator address, tokenAddress address) constant returns(hash bytes32)

func (*EscrowCallerSession) CheckBeneficiary

func (_Escrow *EscrowCallerSession) CheckBeneficiary(scriptHash [32]byte, beneficiary common.Address) (bool, error)

CheckBeneficiary is a free data retrieval call binding the contract method 0xb0550c66.

Solidity: function checkBeneficiary(scriptHash bytes32, beneficiary address) constant returns(check bool)

func (*EscrowCallerSession) CheckVote

func (_Escrow *EscrowCallerSession) CheckVote(scriptHash [32]byte, party common.Address) (bool, error)

CheckVote is a free data retrieval call binding the contract method 0xf0786562.

Solidity: function checkVote(scriptHash bytes32, party address) constant returns(vote bool)

func (*EscrowCallerSession) GetAllTransactionsForParty

func (_Escrow *EscrowCallerSession) GetAllTransactionsForParty(partyAddress common.Address) ([][32]byte, error)

GetAllTransactionsForParty is a free data retrieval call binding the contract method 0xbe84ceaf.

Solidity: function getAllTransactionsForParty(partyAddress address) constant returns(scriptHashes bytes32[])

func (*EscrowCallerSession) PartyVsTransaction

func (_Escrow *EscrowCallerSession) PartyVsTransaction(arg0 common.Address, arg1 *big.Int) ([32]byte, error)

PartyVsTransaction is a free data retrieval call binding the contract method 0xf5dbe09c.

Solidity: function partyVsTransaction( address, uint256) constant returns(bytes32)

func (*EscrowCallerSession) TransactionCount

func (_Escrow *EscrowCallerSession) TransactionCount() (*big.Int, error)

TransactionCount is a free data retrieval call binding the contract method 0xb77bf600.

Solidity: function transactionCount() constant returns(uint256)

func (*EscrowCallerSession) Transactions

func (_Escrow *EscrowCallerSession) Transactions(arg0 [32]byte) (struct {
	ScriptHash      [32]byte
	Value           *big.Int
	LastModified    *big.Int
	Status          uint8
	TransactionType uint8
	Threshold       uint8
	TimeoutHours    uint32
	Buyer           common.Address
	Seller          common.Address
	TokenAddress    common.Address
	Moderator       common.Address
}, error)

Transactions is a free data retrieval call binding the contract method 0x642f2eaf.

Solidity: function transactions( bytes32) constant returns(scriptHash bytes32, value uint256, lastModified uint256, status uint8, transactionType uint8, threshold uint8, timeoutHours uint32, buyer address, seller address, tokenAddress address, moderator address)

type EscrowExecuted

type EscrowExecuted struct {
	ScriptHash   [32]byte
	Destinations []common.Address
	Amounts      []*big.Int
	Raw          types.Log // Blockchain specific contextual infos
}

EscrowExecuted represents a Executed event raised by the Escrow contract.

type EscrowExecutedIterator

type EscrowExecutedIterator struct {
	Event *EscrowExecuted // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EscrowExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the Escrow contract.

func (*EscrowExecutedIterator) Close

func (it *EscrowExecutedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*EscrowExecutedIterator) Error

func (it *EscrowExecutedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*EscrowExecutedIterator) Next

func (it *EscrowExecutedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EscrowFilterer

type EscrowFilterer struct {
	// contains filtered or unexported fields
}

EscrowFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewEscrowFilterer

func NewEscrowFilterer(address common.Address, filterer bind.ContractFilterer) (*EscrowFilterer, error)

NewEscrowFilterer creates a new log filterer instance of Escrow, bound to a specific deployed contract.

func (*EscrowFilterer) FilterExecuted

func (_Escrow *EscrowFilterer) FilterExecuted(opts *bind.FilterOpts) (*EscrowExecutedIterator, error)

FilterExecuted is a free log retrieval operation binding the contract event 0x688e2a1b34445bcd47b0e11ba2a9c8c4d850a1831b64199b59d1c70e29701545.

Solidity: e Executed(scriptHash bytes32, destinations address[], amounts uint256[])

func (*EscrowFilterer) FilterFundAdded

func (_Escrow *EscrowFilterer) FilterFundAdded(opts *bind.FilterOpts, from []common.Address) (*EscrowFundAddedIterator, error)

FilterFundAdded is a free log retrieval operation binding the contract event 0xf66fd2ae9e24a6a24b02e1b5b7512ffde5149a4176085fc0298ae228c9b9d729.

Solidity: e FundAdded(scriptHash bytes32, from indexed address, valueAdded uint256)

func (*EscrowFilterer) FilterFunded

func (_Escrow *EscrowFilterer) FilterFunded(opts *bind.FilterOpts, from []common.Address) (*EscrowFundedIterator, error)

FilterFunded is a free log retrieval operation binding the contract event 0xce7089d0668849fb9ca29778c0cbf1e764d9efb048d81fd71fb34c94f26db368.

Solidity: e Funded(scriptHash bytes32, from indexed address, value uint256)

func (*EscrowFilterer) WatchExecuted

func (_Escrow *EscrowFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *EscrowExecuted) (event.Subscription, error)

WatchExecuted is a free log subscription operation binding the contract event 0x688e2a1b34445bcd47b0e11ba2a9c8c4d850a1831b64199b59d1c70e29701545.

Solidity: e Executed(scriptHash bytes32, destinations address[], amounts uint256[])

func (*EscrowFilterer) WatchFundAdded

func (_Escrow *EscrowFilterer) WatchFundAdded(opts *bind.WatchOpts, sink chan<- *EscrowFundAdded, from []common.Address) (event.Subscription, error)

WatchFundAdded is a free log subscription operation binding the contract event 0xf66fd2ae9e24a6a24b02e1b5b7512ffde5149a4176085fc0298ae228c9b9d729.

Solidity: e FundAdded(scriptHash bytes32, from indexed address, valueAdded uint256)

func (*EscrowFilterer) WatchFunded

func (_Escrow *EscrowFilterer) WatchFunded(opts *bind.WatchOpts, sink chan<- *EscrowFunded, from []common.Address) (event.Subscription, error)

WatchFunded is a free log subscription operation binding the contract event 0xce7089d0668849fb9ca29778c0cbf1e764d9efb048d81fd71fb34c94f26db368.

Solidity: e Funded(scriptHash bytes32, from indexed address, value uint256)

type EscrowFundAdded

type EscrowFundAdded struct {
	ScriptHash [32]byte
	From       common.Address
	ValueAdded *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

EscrowFundAdded represents a FundAdded event raised by the Escrow contract.

type EscrowFundAddedIterator

type EscrowFundAddedIterator struct {
	Event *EscrowFundAdded // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EscrowFundAddedIterator is returned from FilterFundAdded and is used to iterate over the raw logs and unpacked data for FundAdded events raised by the Escrow contract.

func (*EscrowFundAddedIterator) Close

func (it *EscrowFundAddedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*EscrowFundAddedIterator) Error

func (it *EscrowFundAddedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*EscrowFundAddedIterator) Next

func (it *EscrowFundAddedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EscrowFunded

type EscrowFunded struct {
	ScriptHash [32]byte
	From       common.Address
	Value      *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

EscrowFunded represents a Funded event raised by the Escrow contract.

type EscrowFundedIterator

type EscrowFundedIterator struct {
	Event *EscrowFunded // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

EscrowFundedIterator is returned from FilterFunded and is used to iterate over the raw logs and unpacked data for Funded events raised by the Escrow contract.

func (*EscrowFundedIterator) Close

func (it *EscrowFundedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*EscrowFundedIterator) Error

func (it *EscrowFundedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*EscrowFundedIterator) Next

func (it *EscrowFundedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type EscrowRaw

type EscrowRaw struct {
	Contract *Escrow // Generic contract binding to access the raw methods on
}

EscrowRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*EscrowRaw) Call

func (_Escrow *EscrowRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*EscrowRaw) Transact

func (_Escrow *EscrowRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EscrowRaw) Transfer

func (_Escrow *EscrowRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EscrowSession

type EscrowSession struct {
	Contract     *Escrow           // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

EscrowSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*EscrowSession) AddFundsToTransaction

func (_Escrow *EscrowSession) AddFundsToTransaction(scriptHash [32]byte) (*types.Transaction, error)

AddFundsToTransaction is a paid mutator transaction binding the contract method 0x2d9ef96e.

Solidity: function addFundsToTransaction(scriptHash bytes32) returns()

func (*EscrowSession) AddTokenTransaction

func (_Escrow *EscrowSession) AddTokenTransaction(buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, value *big.Int, uniqueId [20]byte, tokenAddress common.Address) (*types.Transaction, error)

AddTokenTransaction is a paid mutator transaction binding the contract method 0x57bced76.

Solidity: function addTokenTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, value uint256, uniqueId bytes20, tokenAddress address) returns()

func (*EscrowSession) AddTokensToTransaction

func (_Escrow *EscrowSession) AddTokensToTransaction(scriptHash [32]byte, value *big.Int) (*types.Transaction, error)

AddTokensToTransaction is a paid mutator transaction binding the contract method 0xb719e280.

Solidity: function addTokensToTransaction(scriptHash bytes32, value uint256) returns()

func (*EscrowSession) AddTransaction

func (_Escrow *EscrowSession) AddTransaction(buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, uniqueId [20]byte) (*types.Transaction, error)

AddTransaction is a paid mutator transaction binding the contract method 0x23b6fd3f.

Solidity: function addTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, uniqueId bytes20) returns()

func (*EscrowSession) CalculateRedeemScriptHash

func (_Escrow *EscrowSession) CalculateRedeemScriptHash(uniqueId [20]byte, threshold uint8, timeoutHours uint32, buyer common.Address, seller common.Address, moderator common.Address, tokenAddress common.Address) ([32]byte, error)

CalculateRedeemScriptHash is a free data retrieval call binding the contract method 0x46fbcdeb.

Solidity: function calculateRedeemScriptHash(uniqueId bytes20, threshold uint8, timeoutHours uint32, buyer address, seller address, moderator address, tokenAddress address) constant returns(hash bytes32)

func (*EscrowSession) CheckBeneficiary

func (_Escrow *EscrowSession) CheckBeneficiary(scriptHash [32]byte, beneficiary common.Address) (bool, error)

CheckBeneficiary is a free data retrieval call binding the contract method 0xb0550c66.

Solidity: function checkBeneficiary(scriptHash bytes32, beneficiary address) constant returns(check bool)

func (*EscrowSession) CheckVote

func (_Escrow *EscrowSession) CheckVote(scriptHash [32]byte, party common.Address) (bool, error)

CheckVote is a free data retrieval call binding the contract method 0xf0786562.

Solidity: function checkVote(scriptHash bytes32, party address) constant returns(vote bool)

func (*EscrowSession) Execute

func (_Escrow *EscrowSession) Execute(sigV []uint8, sigR [][32]byte, sigS [][32]byte, scriptHash [32]byte, destinations []common.Address, amounts []*big.Int) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe4ec8b00.

Solidity: function execute(sigV uint8[], sigR bytes32[], sigS bytes32[], scriptHash bytes32, destinations address[], amounts uint256[]) returns()

func (*EscrowSession) GetAllTransactionsForParty

func (_Escrow *EscrowSession) GetAllTransactionsForParty(partyAddress common.Address) ([][32]byte, error)

GetAllTransactionsForParty is a free data retrieval call binding the contract method 0xbe84ceaf.

Solidity: function getAllTransactionsForParty(partyAddress address) constant returns(scriptHashes bytes32[])

func (*EscrowSession) PartyVsTransaction

func (_Escrow *EscrowSession) PartyVsTransaction(arg0 common.Address, arg1 *big.Int) ([32]byte, error)

PartyVsTransaction is a free data retrieval call binding the contract method 0xf5dbe09c.

Solidity: function partyVsTransaction( address, uint256) constant returns(bytes32)

func (*EscrowSession) TransactionCount

func (_Escrow *EscrowSession) TransactionCount() (*big.Int, error)

TransactionCount is a free data retrieval call binding the contract method 0xb77bf600.

Solidity: function transactionCount() constant returns(uint256)

func (*EscrowSession) Transactions

func (_Escrow *EscrowSession) Transactions(arg0 [32]byte) (struct {
	ScriptHash      [32]byte
	Value           *big.Int
	LastModified    *big.Int
	Status          uint8
	TransactionType uint8
	Threshold       uint8
	TimeoutHours    uint32
	Buyer           common.Address
	Seller          common.Address
	TokenAddress    common.Address
	Moderator       common.Address
}, error)

Transactions is a free data retrieval call binding the contract method 0x642f2eaf.

Solidity: function transactions( bytes32) constant returns(scriptHash bytes32, value uint256, lastModified uint256, status uint8, transactionType uint8, threshold uint8, timeoutHours uint32, buyer address, seller address, tokenAddress address, moderator address)

type EscrowTransactor

type EscrowTransactor struct {
	// contains filtered or unexported fields
}

EscrowTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewEscrowTransactor

func NewEscrowTransactor(address common.Address, transactor bind.ContractTransactor) (*EscrowTransactor, error)

NewEscrowTransactor creates a new write-only instance of Escrow, bound to a specific deployed contract.

func (*EscrowTransactor) AddFundsToTransaction

func (_Escrow *EscrowTransactor) AddFundsToTransaction(opts *bind.TransactOpts, scriptHash [32]byte) (*types.Transaction, error)

AddFundsToTransaction is a paid mutator transaction binding the contract method 0x2d9ef96e.

Solidity: function addFundsToTransaction(scriptHash bytes32) returns()

func (*EscrowTransactor) AddTokenTransaction

func (_Escrow *EscrowTransactor) AddTokenTransaction(opts *bind.TransactOpts, buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, value *big.Int, uniqueId [20]byte, tokenAddress common.Address) (*types.Transaction, error)

AddTokenTransaction is a paid mutator transaction binding the contract method 0x57bced76.

Solidity: function addTokenTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, value uint256, uniqueId bytes20, tokenAddress address) returns()

func (*EscrowTransactor) AddTokensToTransaction

func (_Escrow *EscrowTransactor) AddTokensToTransaction(opts *bind.TransactOpts, scriptHash [32]byte, value *big.Int) (*types.Transaction, error)

AddTokensToTransaction is a paid mutator transaction binding the contract method 0xb719e280.

Solidity: function addTokensToTransaction(scriptHash bytes32, value uint256) returns()

func (*EscrowTransactor) AddTransaction

func (_Escrow *EscrowTransactor) AddTransaction(opts *bind.TransactOpts, buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, uniqueId [20]byte) (*types.Transaction, error)

AddTransaction is a paid mutator transaction binding the contract method 0x23b6fd3f.

Solidity: function addTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, uniqueId bytes20) returns()

func (*EscrowTransactor) Execute

func (_Escrow *EscrowTransactor) Execute(opts *bind.TransactOpts, sigV []uint8, sigR [][32]byte, sigS [][32]byte, scriptHash [32]byte, destinations []common.Address, amounts []*big.Int) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe4ec8b00.

Solidity: function execute(sigV uint8[], sigR bytes32[], sigS bytes32[], scriptHash bytes32, destinations address[], amounts uint256[]) returns()

type EscrowTransactorRaw

type EscrowTransactorRaw struct {
	Contract *EscrowTransactor // Generic write-only contract binding to access the raw methods on
}

EscrowTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*EscrowTransactorRaw) Transact

func (_Escrow *EscrowTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*EscrowTransactorRaw) Transfer

func (_Escrow *EscrowTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type EscrowTransactorSession

type EscrowTransactorSession struct {
	Contract     *EscrowTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

EscrowTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*EscrowTransactorSession) AddFundsToTransaction

func (_Escrow *EscrowTransactorSession) AddFundsToTransaction(scriptHash [32]byte) (*types.Transaction, error)

AddFundsToTransaction is a paid mutator transaction binding the contract method 0x2d9ef96e.

Solidity: function addFundsToTransaction(scriptHash bytes32) returns()

func (*EscrowTransactorSession) AddTokenTransaction

func (_Escrow *EscrowTransactorSession) AddTokenTransaction(buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, value *big.Int, uniqueId [20]byte, tokenAddress common.Address) (*types.Transaction, error)

AddTokenTransaction is a paid mutator transaction binding the contract method 0x57bced76.

Solidity: function addTokenTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, value uint256, uniqueId bytes20, tokenAddress address) returns()

func (*EscrowTransactorSession) AddTokensToTransaction

func (_Escrow *EscrowTransactorSession) AddTokensToTransaction(scriptHash [32]byte, value *big.Int) (*types.Transaction, error)

AddTokensToTransaction is a paid mutator transaction binding the contract method 0xb719e280.

Solidity: function addTokensToTransaction(scriptHash bytes32, value uint256) returns()

func (*EscrowTransactorSession) AddTransaction

func (_Escrow *EscrowTransactorSession) AddTransaction(buyer common.Address, seller common.Address, moderator common.Address, threshold uint8, timeoutHours uint32, scriptHash [32]byte, uniqueId [20]byte) (*types.Transaction, error)

AddTransaction is a paid mutator transaction binding the contract method 0x23b6fd3f.

Solidity: function addTransaction(buyer address, seller address, moderator address, threshold uint8, timeoutHours uint32, scriptHash bytes32, uniqueId bytes20) returns()

func (*EscrowTransactorSession) Execute

func (_Escrow *EscrowTransactorSession) Execute(sigV []uint8, sigR [][32]byte, sigS [][32]byte, scriptHash [32]byte, destinations []common.Address, amounts []*big.Int) (*types.Transaction, error)

Execute is a paid mutator transaction binding the contract method 0xe4ec8b00.

Solidity: function execute(sigV uint8[], sigR bytes32[], sigS bytes32[], scriptHash bytes32, destinations address[], amounts uint256[]) returns()

type EthAddress

type EthAddress struct {
	// contains filtered or unexported fields
}

EthAddress implements the WalletAddress interface

func (EthAddress) EncodeAddress

func (addr EthAddress) EncodeAddress() string

EncodeAddress returns hex representation of the address

func (EthAddress) IsForNet

func (addr EthAddress) IsForNet(params *chaincfg.Params) bool

IsForNet returns true because EthAddress has to become btc.Address

func (EthAddress) ScriptAddress

func (addr EthAddress) ScriptAddress() []byte

ScriptAddress returns byte representation of address

func (EthAddress) String

func (addr EthAddress) String() string

String representation of eth address

type EthClient

type EthClient struct {
	*ethclient.Client
	// contains filtered or unexported fields
}

EthClient represents the eth client

func NewEthClient

func NewEthClient(url string) (*EthClient, error)

NewEthClient returns a new eth client wss://mainnet.infura.io/ws/v3/YOUR-PROJECT-ID

func (*EthClient) EstimateGasSpend

func (client *EthClient) EstimateGasSpend(from common.Address, value *big.Int) (*big.Int, error)

EstimateGasSpend - returns estimated gas

func (*EthClient) EstimateTxnGas

func (client *EthClient) EstimateTxnGas(from, to common.Address, value *big.Int) (*big.Int, error)

EstimateTxnGas - returns estimated gas

func (*EthClient) GetBalance

func (client *EthClient) GetBalance(destAccount common.Address) (*big.Int, error)

GetBalance - returns the balance for this account

func (*EthClient) GetEthGasStationEstimate

func (client *EthClient) GetEthGasStationEstimate() (*EthGasStationData, error)

GetEthGasStationEstimate get the latest data from https://ethgasstation.info/json/ethgasAPI.json

func (*EthClient) GetLatestBlock

func (client *EthClient) GetLatestBlock() (uint32, common.Hash, error)

GetLatestBlock - returns the latest block

func (*EthClient) GetTokenBalance

func (client *EthClient) GetTokenBalance(destAccount, tokenAddress common.Address) (*big.Int, error)

GetTokenBalance - returns the erc20 token balance for this account

func (*EthClient) GetTransaction

func (client *EthClient) GetTransaction(hash common.Hash) (*types.Transaction, bool, error)

GetTransaction - returns a eth txn for the specified hash

func (*EthClient) GetTxnNonce

func (client *EthClient) GetTxnNonce(txID string) (int32, error)

GetTxnNonce - used to fetch nonce for a submitted txn

func (*EthClient) GetUnconfirmedBalance

func (client *EthClient) GetUnconfirmedBalance(destAccount common.Address) (*big.Int, error)

GetUnconfirmedBalance - returns the unconfirmed balance for this account

func (*EthClient) Transfer

func (client *EthClient) Transfer(from *Account, destAccount common.Address, value *big.Int, spendAll bool, fee big.Int) (common.Hash, error)

Transfer will transfer eth from this user account to dest address

func (*EthClient) TransferToken

func (client *EthClient) TransferToken(from *Account, toAddress common.Address, tokenAddress common.Address, value *big.Int) (common.Hash, error)

TransferToken will transfer erc20 token from this user account to dest address

type EthConfiguration

type EthConfiguration struct {
	RopstenPPAddress string `yaml:"ROPSTEN_PPv2_ADDRESS"`
	RegistryAddress  string `yaml:"ROPSTEN_REGISTRY"`
}

EthConfiguration - used for eth specific configuration

type EthGasStationData

type EthGasStationData struct {
	Average     float64 `json:"average"`
	FastestWait float64 `json:"fastestWait"`
	FastWait    float64 `json:"fastWeight"`
	Fast        float64 `json:"Fast"`
	SafeLowWait float64 `json:"safeLowWait"`
	BlockNum    int64   `json:"blockNum"`
	AvgWait     float64 `json:"avgWait"`
	BlockTime   float64 `json:"block_time"`
	Speed       float64 `json:"speed"`
	Fastest     float64 `json:"fastest"`
	SafeLow     float64 `json:"safeLow"`
}

EthGasStationData represents ethgasstation api data https://ethgasstation.info/json/ethgasAPI.json {"average": 20.0, "fastestWait": 0.4, "fastWait": 0.4, "fast": 200.0, "safeLowWait": 10.6, "blockNum": 6684733, "avgWait": 2.0, "block_time": 13.056701030927835, "speed": 0.7529715304081577, "fastest": 410.0, "safeLow": 17.0}

type EthRedeemScript

type EthRedeemScript struct {
	TxnID           common.Address
	Threshold       uint8
	Timeout         uint32
	Buyer           common.Address
	Seller          common.Address
	Moderator       common.Address
	MultisigAddress common.Address
	TokenAddress    common.Address
}

EthRedeemScript - used to represent redeem script for eth wallet <uniqueId: 20><threshold:1><timeoutHours:4><buyer:20><seller:20> <moderator:20><multisigAddress:20><tokenAddress:20>

func DeserializeEthScript

func DeserializeEthScript(b []byte) (EthRedeemScript, error)

DeserializeEthScript - used to deserialize eth redeem script

type EthereumPriceFetcher

type EthereumPriceFetcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

EthereumPriceFetcher - get ETH prices from the providers (exchanges)

func NewEthereumPriceFetcher

func NewEthereumPriceFetcher(dialer proxy.Dialer) *EthereumPriceFetcher

NewEthereumPriceFetcher - instantiate a eth price fetcher

func (*EthereumPriceFetcher) GetAllRates

func (z *EthereumPriceFetcher) GetAllRates(cacheOK bool) (map[string]float64, error)

GetAllRates - refresh the cache

func (*EthereumPriceFetcher) GetExchangeRate

func (z *EthereumPriceFetcher) GetExchangeRate(currencyCode string) (float64, error)

GetExchangeRate - fetch the exchange rate for the specified currency

func (*EthereumPriceFetcher) GetLatestRate

func (z *EthereumPriceFetcher) GetLatestRate(currencyCode string) (float64, error)

GetLatestRate - refresh the cache and return the latest exchange rate for the specified currency

func (*EthereumPriceFetcher) UnitsPerCoin

func (z *EthereumPriceFetcher) UnitsPerCoin() int64

UnitsPerCoin - return weis in 1 ETH

type EthereumWallet

type EthereumWallet struct {
	// contains filtered or unexported fields
}

EthereumWallet is the wallet implementation for ethereum

func NewEthereumWallet

func NewEthereumWallet(cfg config.CoinConfig, params *chaincfg.Params, mnemonic string, proxy proxy.Dialer) (*EthereumWallet, error)

NewEthereumWallet will return a reference to the Eth Wallet

func NewEthereumWalletWithKeyfile

func NewEthereumWalletWithKeyfile(url, keyFile, passwd string) *EthereumWallet

NewEthereumWalletWithKeyfile will return a reference to the Eth Wallet

func (*EthereumWallet) AddTransactionListener

func (wallet *EthereumWallet) AddTransactionListener(callback func(wi.TransactionCallback))

AddTransactionListener will call the function callback when new transactions are discovered

func (*EthereumWallet) AddWatchedAddresses

func (wallet *EthereumWallet) AddWatchedAddresses(addrs ...btcutil.Address) error

AddWatchedAddresses - Add a script to the wallet and get notifications back when coins are received or spent from it

func (*EthereumWallet) AssociateTransactionWithOrder

func (wallet *EthereumWallet) AssociateTransactionWithOrder(txnCB wi.TransactionCallback)

func (*EthereumWallet) Balance

func (wallet *EthereumWallet) Balance() (confirmed, unconfirmed wi.CurrencyValue)

Balance - Get the confirmed and unconfirmed balances

func (*EthereumWallet) BumpFee

func (wallet *EthereumWallet) BumpFee(txid chainhash.Hash) (*chainhash.Hash, error)

BumpFee - Bump the fee for the given transaction

func (*EthereumWallet) ChainTip

func (wallet *EthereumWallet) ChainTip() (uint32, chainhash.Hash)

ChainTip - Get the height and best hash of the blockchain

func (*EthereumWallet) ChildKey

func (wallet *EthereumWallet) ChildKey(keyBytes []byte, chaincode []byte, isPrivateKey bool) (*hd.ExtendedKey, error)

ChildKey Generate a child key using the given chaincode. The key is used in multisig transactions. For most implementations this should just be child key 0.

func (*EthereumWallet) Close

func (wallet *EthereumWallet) Close()

Close will stop the wallet daemon

func (*EthereumWallet) CreateAddress

func (wallet *EthereumWallet) CreateAddress() (common.Address, error)

CreateAddress - used to generate a new address

func (*EthereumWallet) CreateMultisigSignature

func (wallet *EthereumWallet) CreateMultisigSignature(ins []wi.TransactionInput, outs []wi.TransactionOutput, key *hd.ExtendedKey, redeemScript []byte, feePerByte big.Int) ([]wi.Signature, error)

CreateMultisigSignature - Create a signature for a multisig transaction

func (*EthereumWallet) CurrencyCode

func (wallet *EthereumWallet) CurrencyCode() string

CurrencyCode returns ETH

func (*EthereumWallet) CurrentAddress

func (wallet *EthereumWallet) CurrentAddress(purpose wi.KeyPurpose) btcutil.Address

CurrentAddress - Get the current address for the given purpose

func (*EthereumWallet) DecodeAddress

func (wallet *EthereumWallet) DecodeAddress(addr string) (btcutil.Address, error)

DecodeAddress - Parse the address string and return an address interface

func (*EthereumWallet) EstimateFee

func (wallet *EthereumWallet) EstimateFee(ins []wi.TransactionInput, outs []wi.TransactionOutput, feePerByte big.Int) big.Int

EstimateFee - Calculates the estimated size of the transaction and returns the total fee for the given feePerByte

func (*EthereumWallet) EstimateSpendFee

func (wallet *EthereumWallet) EstimateSpendFee(amount big.Int, feeLevel wi.FeeLevel) (big.Int, error)

EstimateSpendFee - Build a spend transaction for the amount and return the transaction fee

func (*EthereumWallet) ExchangeRates

func (wallet *EthereumWallet) ExchangeRates() wi.ExchangeRates

ExchangeRates - return the exchangerates

func (*EthereumWallet) GenerateMultisigScript

func (wallet *EthereumWallet) GenerateMultisigScript(keys []hd.ExtendedKey, threshold int, timeout time.Duration, timeoutKey *hd.ExtendedKey) (btcutil.Address, []byte, error)

GenerateMultisigScript - Generate a multisig script from public keys. If a timeout is included the returned script should be a timelocked escrow which releases using the timeoutKey.

func (*EthereumWallet) GetBalance

func (wallet *EthereumWallet) GetBalance() (*big.Int, error)

GetBalance returns the balance for the wallet

func (*EthereumWallet) GetConfirmations

func (wallet *EthereumWallet) GetConfirmations(txid chainhash.Hash) (confirms, atHeight uint32, err error)

GetConfirmations - Return the number of confirmations and the height for a transaction

func (*EthereumWallet) GetFeePerByte

func (wallet *EthereumWallet) GetFeePerByte(feeLevel wi.FeeLevel) big.Int

GetFeePerByte - Get the current fee per byte

func (*EthereumWallet) GetTransaction

func (wallet *EthereumWallet) GetTransaction(txid chainhash.Hash) (wi.Txn, error)

GetTransaction - Get info on a specific transaction

func (*EthereumWallet) GetUnconfirmedBalance

func (wallet *EthereumWallet) GetUnconfirmedBalance() (*big.Int, error)

GetUnconfirmedBalance returns the unconfirmed balance for the wallet

func (*EthereumWallet) HasKey

func (wallet *EthereumWallet) HasKey(addr btcutil.Address) bool

HasKey - Returns if the wallet has the key for the given address

func (*EthereumWallet) IsDust

func (wallet *EthereumWallet) IsDust(amount big.Int) bool

IsDust Check if this amount is considered dust - 10000 wei

func (*EthereumWallet) MasterPrivateKey

func (wallet *EthereumWallet) MasterPrivateKey() *hd.ExtendedKey

MasterPrivateKey - Get the master private key

func (*EthereumWallet) MasterPublicKey

func (wallet *EthereumWallet) MasterPublicKey() *hd.ExtendedKey

MasterPublicKey - Get the master public key

func (*EthereumWallet) Multisign

func (wallet *EthereumWallet) Multisign(ins []wi.TransactionInput, outs []wi.TransactionOutput, sigs1 []wi.Signature, sigs2 []wi.Signature, redeemScript []byte, feePerByte big.Int, broadcast bool) ([]byte, error)

Multisign - Combine signatures and optionally broadcast

func (*EthereumWallet) NewAddress

func (wallet *EthereumWallet) NewAddress(purpose wi.KeyPurpose) btcutil.Address

NewAddress - Returns a fresh address that has never been returned by this function

func (*EthereumWallet) Params

func (wallet *EthereumWallet) Params() *chaincfg.Params

Params - return nil to comply

func (*EthereumWallet) PrintKeys

func (wallet *EthereumWallet) PrintKeys()

PrintKeys - used to print the keys for this wallet

func (*EthereumWallet) ReSyncBlockchain

func (wallet *EthereumWallet) ReSyncBlockchain(fromTime time.Time)

ReSyncBlockchain - Use this to re-download merkle blocks in case of missed transactions

func (*EthereumWallet) ScriptToAddress

func (wallet *EthereumWallet) ScriptToAddress(script []byte) (btcutil.Address, error)

ScriptToAddress - ?

func (*EthereumWallet) Spend

func (wallet *EthereumWallet) Spend(amount big.Int, addr btcutil.Address, feeLevel wi.FeeLevel, referenceID string, spendAll bool) (*chainhash.Hash, error)

Spend - Send ether to an external wallet

func (*EthereumWallet) Start

func (wallet *EthereumWallet) Start()

Start will start the wallet daemon

func (*EthereumWallet) SweepAddress

func (wallet *EthereumWallet) SweepAddress(utxos []wi.TransactionInput, address *btcutil.Address, key *hd.ExtendedKey, redeemScript *[]byte, feeLevel wi.FeeLevel) (*chainhash.Hash, error)

SweepAddress - Build and broadcast a transaction that sweeps all coins from an address. If it is a p2sh multisig, the redeemScript must be included

func (*EthereumWallet) Transactions

func (wallet *EthereumWallet) Transactions() ([]wi.Txn, error)

Transactions - Returns a list of transactions for this wallet

func (*EthereumWallet) TransactionsFromBlock

func (wallet *EthereumWallet) TransactionsFromBlock(startBlock *int) ([]wi.Txn, error)

TransactionsFromBlock - Returns a list of transactions for this wallet begining from the specified block

func (*EthereumWallet) Transfer

func (wallet *EthereumWallet) Transfer(to string, value *big.Int, spendAll bool, fee big.Int) (common.Hash, error)

Transfer will transfer the amount from this wallet to the spec address

type ExchangeRateDecoder

type ExchangeRateDecoder interface {
	// contains filtered or unexported methods
}

ExchangeRateDecoder - used for serializing/deserializing provider struct

type ExchangeRateProvider

type ExchangeRateProvider struct {
	// contains filtered or unexported fields
}

ExchangeRateProvider - used for looking up exchange rates for ETH

type KrakenDecoder

type KrakenDecoder struct{}

KrakenDecoder - decoder with Kraken exchange as provider

type OpenBazaarDecoder

type OpenBazaarDecoder struct{}

OpenBazaarDecoder - decoder to be used by OB

type PendingTxn

type PendingTxn struct {
	TxnID     common.Hash
	OrderID   string
	Amount    string
	Nonce     int32
	From      string
	To        string
	WithInput bool
}

PendingTxn used to record a pending eth txn

func DeserializePendingTxn

func DeserializePendingTxn(b []byte) (PendingTxn, error)

DeserializePendingTxn - used to deserialize eth pending txn

type PoloniexDecoder

type PoloniexDecoder struct{}

PoloniexDecoder - decoder with Poloniex exchange as provider

type Registry

type Registry struct {
	RegistryCaller     // Read-only binding to the contract
	RegistryTransactor // Write-only binding to the contract
	RegistryFilterer   // Log filterer for contract events
}

Registry is an auto generated Go binding around an Ethereum contract.

func DeployRegistry

func DeployRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Registry, error)

DeployRegistry deploys a new Ethereum contract, binding an instance of Registry to it.

func NewRegistry

func NewRegistry(address common.Address, backend bind.ContractBackend) (*Registry, error)

NewRegistry creates a new instance of Registry, bound to a specific deployed contract.

type RegistryCaller

type RegistryCaller struct {
	// contains filtered or unexported fields
}

RegistryCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewRegistryCaller

func NewRegistryCaller(address common.Address, caller bind.ContractCaller) (*RegistryCaller, error)

NewRegistryCaller creates a new read-only instance of Registry, bound to a specific deployed contract.

func (*RegistryCaller) GetContractAtIndex

func (_Registry *RegistryCaller) GetContractAtIndex(opts *bind.CallOpts, index *big.Int) (string, error)

GetContractAtIndex is a free data retrieval call binding the contract method 0x9b534f18.

Solidity: function getContractAtIndex(uint256 index) constant returns(string contractName)

func (*RegistryCaller) GetRecommendedVersion

func (_Registry *RegistryCaller) GetRecommendedVersion(opts *bind.CallOpts, contractName string) (struct {
	VersionName    string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetRecommendedVersion is a free data retrieval call binding the contract method 0x7e27634e.

Solidity: function getRecommendedVersion(string contractName) constant returns(string versionName, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistryCaller) GetTotalContractCount

func (_Registry *RegistryCaller) GetTotalContractCount(opts *bind.CallOpts) (*big.Int, error)

GetTotalContractCount is a free data retrieval call binding the contract method 0x751f592b.

Solidity: function getTotalContractCount() constant returns(uint256 count)

func (*RegistryCaller) GetVersionAtIndex

func (_Registry *RegistryCaller) GetVersionAtIndex(opts *bind.CallOpts, contractName string, index *big.Int) (string, error)

GetVersionAtIndex is a free data retrieval call binding the contract method 0xaf2c7fa3.

Solidity: function getVersionAtIndex(string contractName, uint256 index) constant returns(string versionName)

func (*RegistryCaller) GetVersionCountForContract

func (_Registry *RegistryCaller) GetVersionCountForContract(opts *bind.CallOpts, contractName string) (*big.Int, error)

GetVersionCountForContract is a free data retrieval call binding the contract method 0xff93dab4.

Solidity: function getVersionCountForContract(string contractName) constant returns(uint256 count)

func (*RegistryCaller) GetVersionDetails

func (_Registry *RegistryCaller) GetVersionDetails(opts *bind.CallOpts, contractName string, versionName string) (struct {
	VersionString  string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetVersionDetails is a free data retrieval call binding the contract method 0x8ad030c1.

Solidity: function getVersionDetails(string contractName, string versionName) constant returns(string versionString, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistryCaller) Owner

func (_Registry *RegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

type RegistryCallerRaw

type RegistryCallerRaw struct {
	Contract *RegistryCaller // Generic read-only contract binding to access the raw methods on
}

RegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*RegistryCallerRaw) Call

func (_Registry *RegistryCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type RegistryCallerSession

type RegistryCallerSession struct {
	Contract *RegistryCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts   // Call options to use throughout this session
}

RegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*RegistryCallerSession) GetContractAtIndex

func (_Registry *RegistryCallerSession) GetContractAtIndex(index *big.Int) (string, error)

GetContractAtIndex is a free data retrieval call binding the contract method 0x9b534f18.

Solidity: function getContractAtIndex(uint256 index) constant returns(string contractName)

func (*RegistryCallerSession) GetRecommendedVersion

func (_Registry *RegistryCallerSession) GetRecommendedVersion(contractName string) (struct {
	VersionName    string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetRecommendedVersion is a free data retrieval call binding the contract method 0x7e27634e.

Solidity: function getRecommendedVersion(string contractName) constant returns(string versionName, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistryCallerSession) GetTotalContractCount

func (_Registry *RegistryCallerSession) GetTotalContractCount() (*big.Int, error)

GetTotalContractCount is a free data retrieval call binding the contract method 0x751f592b.

Solidity: function getTotalContractCount() constant returns(uint256 count)

func (*RegistryCallerSession) GetVersionAtIndex

func (_Registry *RegistryCallerSession) GetVersionAtIndex(contractName string, index *big.Int) (string, error)

GetVersionAtIndex is a free data retrieval call binding the contract method 0xaf2c7fa3.

Solidity: function getVersionAtIndex(string contractName, uint256 index) constant returns(string versionName)

func (*RegistryCallerSession) GetVersionCountForContract

func (_Registry *RegistryCallerSession) GetVersionCountForContract(contractName string) (*big.Int, error)

GetVersionCountForContract is a free data retrieval call binding the contract method 0xff93dab4.

Solidity: function getVersionCountForContract(string contractName) constant returns(uint256 count)

func (*RegistryCallerSession) GetVersionDetails

func (_Registry *RegistryCallerSession) GetVersionDetails(contractName string, versionName string) (struct {
	VersionString  string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetVersionDetails is a free data retrieval call binding the contract method 0x8ad030c1.

Solidity: function getVersionDetails(string contractName, string versionName) constant returns(string versionString, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistryCallerSession) Owner

func (_Registry *RegistryCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

type RegistryFilterer

type RegistryFilterer struct {
	// contains filtered or unexported fields
}

RegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewRegistryFilterer

func NewRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*RegistryFilterer, error)

NewRegistryFilterer creates a new log filterer instance of Registry, bound to a specific deployed contract.

func (*RegistryFilterer) FilterOwnershipRenounced

func (_Registry *RegistryFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*RegistryOwnershipRenouncedIterator, error)

FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820.

Solidity: event OwnershipRenounced(address indexed previousOwner)

func (*RegistryFilterer) FilterOwnershipTransferred

func (_Registry *RegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*RegistryOwnershipTransferredIterator, error)

FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*RegistryFilterer) FilterRecommendedVersionRemoved

func (_Registry *RegistryFilterer) FilterRecommendedVersionRemoved(opts *bind.FilterOpts) (*RegistryRecommendedVersionRemovedIterator, error)

FilterRecommendedVersionRemoved is a free log retrieval operation binding the contract event 0x07b20feb74e0118ee3c73d4cb8d0eb4da169604c68aa233293b094cedcd225f2.

Solidity: event RecommendedVersionRemoved(string contractName)

func (*RegistryFilterer) FilterVersionAdded

func (_Registry *RegistryFilterer) FilterVersionAdded(opts *bind.FilterOpts, implementation []common.Address) (*RegistryVersionAddedIterator, error)

FilterVersionAdded is a free log retrieval operation binding the contract event 0x337b109e3f497728f2bdd27545c9ed1cb52ed4a4103cc94da88b868879c982e2.

Solidity: event VersionAdded(string contractName, string versionName, address indexed implementation)

func (*RegistryFilterer) FilterVersionRecommended

func (_Registry *RegistryFilterer) FilterVersionRecommended(opts *bind.FilterOpts) (*RegistryVersionRecommendedIterator, error)

FilterVersionRecommended is a free log retrieval operation binding the contract event 0xb318550bf93edf51de4bae84db3deabd2a866cc407435a72317ca2503e2a07a6.

Solidity: event VersionRecommended(string contractName, string versionName)

func (*RegistryFilterer) FilterVersionUpdated

func (_Registry *RegistryFilterer) FilterVersionUpdated(opts *bind.FilterOpts) (*RegistryVersionUpdatedIterator, error)

FilterVersionUpdated is a free log retrieval operation binding the contract event 0x0acf3e1a00b57bfc05ebf65957f42293847dc0938bfa1744660d6df56036d751.

Solidity: event VersionUpdated(string contractName, string versionName, uint8 status, uint8 bugLevel)

func (*RegistryFilterer) WatchOwnershipRenounced

func (_Registry *RegistryFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *RegistryOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error)

WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820.

Solidity: event OwnershipRenounced(address indexed previousOwner)

func (*RegistryFilterer) WatchOwnershipTransferred

func (_Registry *RegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *RegistryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error)

WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*RegistryFilterer) WatchRecommendedVersionRemoved

func (_Registry *RegistryFilterer) WatchRecommendedVersionRemoved(opts *bind.WatchOpts, sink chan<- *RegistryRecommendedVersionRemoved) (event.Subscription, error)

WatchRecommendedVersionRemoved is a free log subscription operation binding the contract event 0x07b20feb74e0118ee3c73d4cb8d0eb4da169604c68aa233293b094cedcd225f2.

Solidity: event RecommendedVersionRemoved(string contractName)

func (*RegistryFilterer) WatchVersionAdded

func (_Registry *RegistryFilterer) WatchVersionAdded(opts *bind.WatchOpts, sink chan<- *RegistryVersionAdded, implementation []common.Address) (event.Subscription, error)

WatchVersionAdded is a free log subscription operation binding the contract event 0x337b109e3f497728f2bdd27545c9ed1cb52ed4a4103cc94da88b868879c982e2.

Solidity: event VersionAdded(string contractName, string versionName, address indexed implementation)

func (*RegistryFilterer) WatchVersionRecommended

func (_Registry *RegistryFilterer) WatchVersionRecommended(opts *bind.WatchOpts, sink chan<- *RegistryVersionRecommended) (event.Subscription, error)

WatchVersionRecommended is a free log subscription operation binding the contract event 0xb318550bf93edf51de4bae84db3deabd2a866cc407435a72317ca2503e2a07a6.

Solidity: event VersionRecommended(string contractName, string versionName)

func (*RegistryFilterer) WatchVersionUpdated

func (_Registry *RegistryFilterer) WatchVersionUpdated(opts *bind.WatchOpts, sink chan<- *RegistryVersionUpdated) (event.Subscription, error)

WatchVersionUpdated is a free log subscription operation binding the contract event 0x0acf3e1a00b57bfc05ebf65957f42293847dc0938bfa1744660d6df56036d751.

Solidity: event VersionUpdated(string contractName, string versionName, uint8 status, uint8 bugLevel)

type RegistryOwnershipRenounced

type RegistryOwnershipRenounced struct {
	PreviousOwner common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

RegistryOwnershipRenounced represents a OwnershipRenounced event raised by the Registry contract.

type RegistryOwnershipRenouncedIterator

type RegistryOwnershipRenouncedIterator struct {
	Event *RegistryOwnershipRenounced // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Registry contract.

func (*RegistryOwnershipRenouncedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryOwnershipRenouncedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryOwnershipRenouncedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type RegistryOwnershipTransferred

type RegistryOwnershipTransferred struct {
	PreviousOwner common.Address
	NewOwner      common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

RegistryOwnershipTransferred represents a OwnershipTransferred event raised by the Registry contract.

type RegistryOwnershipTransferredIterator

type RegistryOwnershipTransferredIterator struct {
	Event *RegistryOwnershipTransferred // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Registry contract.

func (*RegistryOwnershipTransferredIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryOwnershipTransferredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryOwnershipTransferredIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type RegistryRaw

type RegistryRaw struct {
	Contract *Registry // Generic contract binding to access the raw methods on
}

RegistryRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*RegistryRaw) Call

func (_Registry *RegistryRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*RegistryRaw) Transact

func (_Registry *RegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*RegistryRaw) Transfer

func (_Registry *RegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type RegistryRecommendedVersionRemoved

type RegistryRecommendedVersionRemoved struct {
	ContractName string
	Raw          types.Log // Blockchain specific contextual infos
}

RegistryRecommendedVersionRemoved represents a RecommendedVersionRemoved event raised by the Registry contract.

type RegistryRecommendedVersionRemovedIterator

type RegistryRecommendedVersionRemovedIterator struct {
	Event *RegistryRecommendedVersionRemoved // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryRecommendedVersionRemovedIterator is returned from FilterRecommendedVersionRemoved and is used to iterate over the raw logs and unpacked data for RecommendedVersionRemoved events raised by the Registry contract.

func (*RegistryRecommendedVersionRemovedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryRecommendedVersionRemovedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryRecommendedVersionRemovedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type RegistrySession

type RegistrySession struct {
	Contract     *Registry         // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

RegistrySession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*RegistrySession) AddVersion

func (_Registry *RegistrySession) AddVersion(contractName string, versionName string, status uint8, implementation common.Address) (*types.Transaction, error)

AddVersion is a paid mutator transaction binding the contract method 0x3de5311a.

Solidity: function addVersion(string contractName, string versionName, uint8 status, address implementation) returns()

func (*RegistrySession) GetContractAtIndex

func (_Registry *RegistrySession) GetContractAtIndex(index *big.Int) (string, error)

GetContractAtIndex is a free data retrieval call binding the contract method 0x9b534f18.

Solidity: function getContractAtIndex(uint256 index) constant returns(string contractName)

func (*RegistrySession) GetRecommendedVersion

func (_Registry *RegistrySession) GetRecommendedVersion(contractName string) (struct {
	VersionName    string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetRecommendedVersion is a free data retrieval call binding the contract method 0x7e27634e.

Solidity: function getRecommendedVersion(string contractName) constant returns(string versionName, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistrySession) GetTotalContractCount

func (_Registry *RegistrySession) GetTotalContractCount() (*big.Int, error)

GetTotalContractCount is a free data retrieval call binding the contract method 0x751f592b.

Solidity: function getTotalContractCount() constant returns(uint256 count)

func (*RegistrySession) GetVersionAtIndex

func (_Registry *RegistrySession) GetVersionAtIndex(contractName string, index *big.Int) (string, error)

GetVersionAtIndex is a free data retrieval call binding the contract method 0xaf2c7fa3.

Solidity: function getVersionAtIndex(string contractName, uint256 index) constant returns(string versionName)

func (*RegistrySession) GetVersionCountForContract

func (_Registry *RegistrySession) GetVersionCountForContract(contractName string) (*big.Int, error)

GetVersionCountForContract is a free data retrieval call binding the contract method 0xff93dab4.

Solidity: function getVersionCountForContract(string contractName) constant returns(uint256 count)

func (*RegistrySession) GetVersionDetails

func (_Registry *RegistrySession) GetVersionDetails(contractName string, versionName string) (struct {
	VersionString  string
	Status         uint8
	BugLevel       uint8
	Implementation common.Address
	DateAdded      *big.Int
}, error)

GetVersionDetails is a free data retrieval call binding the contract method 0x8ad030c1.

Solidity: function getVersionDetails(string contractName, string versionName) constant returns(string versionString, uint8 status, uint8 bugLevel, address implementation, uint256 dateAdded)

func (*RegistrySession) MarkRecommendedVersion

func (_Registry *RegistrySession) MarkRecommendedVersion(contractName string, versionName string) (*types.Transaction, error)

MarkRecommendedVersion is a paid mutator transaction binding the contract method 0xca2e7cf3.

Solidity: function markRecommendedVersion(string contractName, string versionName) returns()

func (*RegistrySession) Owner

func (_Registry *RegistrySession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() constant returns(address)

func (*RegistrySession) RemoveRecommendedVersion

func (_Registry *RegistrySession) RemoveRecommendedVersion(contractName string) (*types.Transaction, error)

RemoveRecommendedVersion is a paid mutator transaction binding the contract method 0xacd820a8.

Solidity: function removeRecommendedVersion(string contractName) returns()

func (*RegistrySession) RenounceOwnership

func (_Registry *RegistrySession) RenounceOwnership() (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*RegistrySession) TransferOwnership

func (_Registry *RegistrySession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address _newOwner) returns()

func (*RegistrySession) UpdateVersion

func (_Registry *RegistrySession) UpdateVersion(contractName string, versionName string, status uint8, bugLevel uint8) (*types.Transaction, error)

UpdateVersion is a paid mutator transaction binding the contract method 0x5c047fa2.

Solidity: function updateVersion(string contractName, string versionName, uint8 status, uint8 bugLevel) returns()

type RegistryTransactor

type RegistryTransactor struct {
	// contains filtered or unexported fields
}

RegistryTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewRegistryTransactor

func NewRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*RegistryTransactor, error)

NewRegistryTransactor creates a new write-only instance of Registry, bound to a specific deployed contract.

func (*RegistryTransactor) AddVersion

func (_Registry *RegistryTransactor) AddVersion(opts *bind.TransactOpts, contractName string, versionName string, status uint8, implementation common.Address) (*types.Transaction, error)

AddVersion is a paid mutator transaction binding the contract method 0x3de5311a.

Solidity: function addVersion(string contractName, string versionName, uint8 status, address implementation) returns()

func (*RegistryTransactor) MarkRecommendedVersion

func (_Registry *RegistryTransactor) MarkRecommendedVersion(opts *bind.TransactOpts, contractName string, versionName string) (*types.Transaction, error)

MarkRecommendedVersion is a paid mutator transaction binding the contract method 0xca2e7cf3.

Solidity: function markRecommendedVersion(string contractName, string versionName) returns()

func (*RegistryTransactor) RemoveRecommendedVersion

func (_Registry *RegistryTransactor) RemoveRecommendedVersion(opts *bind.TransactOpts, contractName string) (*types.Transaction, error)

RemoveRecommendedVersion is a paid mutator transaction binding the contract method 0xacd820a8.

Solidity: function removeRecommendedVersion(string contractName) returns()

func (*RegistryTransactor) RenounceOwnership

func (_Registry *RegistryTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*RegistryTransactor) TransferOwnership

func (_Registry *RegistryTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address _newOwner) returns()

func (*RegistryTransactor) UpdateVersion

func (_Registry *RegistryTransactor) UpdateVersion(opts *bind.TransactOpts, contractName string, versionName string, status uint8, bugLevel uint8) (*types.Transaction, error)

UpdateVersion is a paid mutator transaction binding the contract method 0x5c047fa2.

Solidity: function updateVersion(string contractName, string versionName, uint8 status, uint8 bugLevel) returns()

type RegistryTransactorRaw

type RegistryTransactorRaw struct {
	Contract *RegistryTransactor // Generic write-only contract binding to access the raw methods on
}

RegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*RegistryTransactorRaw) Transact

func (_Registry *RegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*RegistryTransactorRaw) Transfer

func (_Registry *RegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type RegistryTransactorSession

type RegistryTransactorSession struct {
	Contract     *RegistryTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts   // Transaction auth options to use throughout this session
}

RegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*RegistryTransactorSession) AddVersion

func (_Registry *RegistryTransactorSession) AddVersion(contractName string, versionName string, status uint8, implementation common.Address) (*types.Transaction, error)

AddVersion is a paid mutator transaction binding the contract method 0x3de5311a.

Solidity: function addVersion(string contractName, string versionName, uint8 status, address implementation) returns()

func (*RegistryTransactorSession) MarkRecommendedVersion

func (_Registry *RegistryTransactorSession) MarkRecommendedVersion(contractName string, versionName string) (*types.Transaction, error)

MarkRecommendedVersion is a paid mutator transaction binding the contract method 0xca2e7cf3.

Solidity: function markRecommendedVersion(string contractName, string versionName) returns()

func (*RegistryTransactorSession) RemoveRecommendedVersion

func (_Registry *RegistryTransactorSession) RemoveRecommendedVersion(contractName string) (*types.Transaction, error)

RemoveRecommendedVersion is a paid mutator transaction binding the contract method 0xacd820a8.

Solidity: function removeRecommendedVersion(string contractName) returns()

func (*RegistryTransactorSession) RenounceOwnership

func (_Registry *RegistryTransactorSession) RenounceOwnership() (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*RegistryTransactorSession) TransferOwnership

func (_Registry *RegistryTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address _newOwner) returns()

func (*RegistryTransactorSession) UpdateVersion

func (_Registry *RegistryTransactorSession) UpdateVersion(contractName string, versionName string, status uint8, bugLevel uint8) (*types.Transaction, error)

UpdateVersion is a paid mutator transaction binding the contract method 0x5c047fa2.

Solidity: function updateVersion(string contractName, string versionName, uint8 status, uint8 bugLevel) returns()

type RegistryVersionAdded

type RegistryVersionAdded struct {
	ContractName   string
	VersionName    string
	Implementation common.Address
	Raw            types.Log // Blockchain specific contextual infos
}

RegistryVersionAdded represents a VersionAdded event raised by the Registry contract.

type RegistryVersionAddedIterator

type RegistryVersionAddedIterator struct {
	Event *RegistryVersionAdded // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryVersionAddedIterator is returned from FilterVersionAdded and is used to iterate over the raw logs and unpacked data for VersionAdded events raised by the Registry contract.

func (*RegistryVersionAddedIterator) Close

func (it *RegistryVersionAddedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryVersionAddedIterator) Error

func (it *RegistryVersionAddedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryVersionAddedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type RegistryVersionRecommended

type RegistryVersionRecommended struct {
	ContractName string
	VersionName  string
	Raw          types.Log // Blockchain specific contextual infos
}

RegistryVersionRecommended represents a VersionRecommended event raised by the Registry contract.

type RegistryVersionRecommendedIterator

type RegistryVersionRecommendedIterator struct {
	Event *RegistryVersionRecommended // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryVersionRecommendedIterator is returned from FilterVersionRecommended and is used to iterate over the raw logs and unpacked data for VersionRecommended events raised by the Registry contract.

func (*RegistryVersionRecommendedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryVersionRecommendedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryVersionRecommendedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type RegistryVersionUpdated

type RegistryVersionUpdated struct {
	ContractName string
	VersionName  string
	Status       uint8
	BugLevel     uint8
	Raw          types.Log // Blockchain specific contextual infos
}

RegistryVersionUpdated represents a VersionUpdated event raised by the Registry contract.

type RegistryVersionUpdatedIterator

type RegistryVersionUpdatedIterator struct {
	Event *RegistryVersionUpdated // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

RegistryVersionUpdatedIterator is returned from FilterVersionUpdated and is used to iterate over the raw logs and unpacked data for VersionUpdated events raised by the Registry contract.

func (*RegistryVersionUpdatedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*RegistryVersionUpdatedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*RegistryVersionUpdatedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service - used to represent WalletService

func NewWalletService

func NewWalletService(db wallet.Datastore, client *ethclient.Client, coinType wallet.CoinType) *Service

NewWalletService - used to create new wallet service

func (*Service) ChainTip

func (ws *Service) ChainTip() (uint32, chainhash.Hash)

ChainTip - get the chain tip

func (*Service) Start

func (ws *Service) Start()

Start - the wallet daemon

func (*Service) Stop

func (ws *Service) Stop()

Stop - the wallet daemon

func (*Service) UpdateState

func (ws *Service) UpdateState()

UpdateState - updates state

type Token

type Token struct {
	TokenCaller     // Read-only binding to the contract
	TokenTransactor // Write-only binding to the contract
	TokenFilterer   // Log filterer for contract events
}

Token is an auto generated Go binding around an Ethereum contract.

func NewToken

func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error)

NewToken creates a new instance of Token, bound to a specific deployed contract.

type TokenApproval

type TokenApproval struct {
	Owner   common.Address
	Spender common.Address
	Value   *big.Int
	Raw     types.Log // Blockchain specific contextual infos
}

TokenApproval represents a Approval event raised by the Token contract.

type TokenApprovalIterator

type TokenApprovalIterator struct {
	Event *TokenApproval // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Token contract.

func (*TokenApprovalIterator) Close

func (it *TokenApprovalIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*TokenApprovalIterator) Error

func (it *TokenApprovalIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TokenApprovalIterator) Next

func (it *TokenApprovalIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TokenCaller

type TokenCaller struct {
	// contains filtered or unexported fields
}

TokenCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewTokenCaller

func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error)

NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract.

func (*TokenCaller) Allowance

func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*TokenCaller) BalanceOf

func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*TokenCaller) Decimals

func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*TokenCaller) Name

func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*TokenCaller) Symbol

func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*TokenCaller) TotalSupply

func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type TokenCallerRaw

type TokenCallerRaw struct {
	Contract *TokenCaller // Generic read-only contract binding to access the raw methods on
}

TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*TokenCallerRaw) Call

func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type TokenCallerSession

type TokenCallerSession struct {
	Contract *TokenCaller  // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*TokenCallerSession) Allowance

func (_Token *TokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*TokenCallerSession) BalanceOf

func (_Token *TokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*TokenCallerSession) Decimals

func (_Token *TokenCallerSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*TokenCallerSession) Name

func (_Token *TokenCallerSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*TokenCallerSession) Symbol

func (_Token *TokenCallerSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*TokenCallerSession) TotalSupply

func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

type TokenDetail

type TokenDetail struct {
	// contains filtered or unexported fields
}

TokenDetail is used to capture ERC20 token details

type TokenFilterer

type TokenFilterer struct {
	// contains filtered or unexported fields
}

TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewTokenFilterer

func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error)

NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract.

func (*TokenFilterer) FilterApproval

func (_Token *TokenFilterer) FilterApproval(opts *bind.FilterOpts, _owner []common.Address, _spender []common.Address) (*TokenApprovalIterator, error)

FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*TokenFilterer) FilterTransfer

func (_Token *TokenFilterer) FilterTransfer(opts *bind.FilterOpts, _from []common.Address, _to []common.Address) (*TokenTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(_from indexed address, _to indexed address, _value uint256)

func (*TokenFilterer) WatchApproval

func (_Token *TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TokenApproval, _owner []common.Address, _spender []common.Address) (event.Subscription, error)

WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925.

Solidity: event Approval(_owner indexed address, _spender indexed address, _value uint256)

func (*TokenFilterer) WatchTransfer

func (_Token *TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TokenTransfer, _from []common.Address, _to []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(_from indexed address, _to indexed address, _value uint256)

type TokenRaw

type TokenRaw struct {
	Contract *Token // Generic contract binding to access the raw methods on
}

TokenRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*TokenRaw) Call

func (_Token *TokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*TokenRaw) Transact

func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TokenRaw) Transfer

func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TokenSession

type TokenSession struct {
	Contract     *Token            // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TokenSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*TokenSession) Allowance

func (_Token *TokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error)

Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.

Solidity: function allowance(_owner address, _spender address) constant returns(uint256)

func (*TokenSession) Approve

func (_Token *TokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*TokenSession) BalanceOf

func (_Token *TokenSession) BalanceOf(_owner common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(_owner address) constant returns(uint256)

func (*TokenSession) Decimals

func (_Token *TokenSession) Decimals() (uint8, error)

Decimals is a free data retrieval call binding the contract method 0x313ce567.

Solidity: function decimals() constant returns(uint8)

func (*TokenSession) Name

func (_Token *TokenSession) Name() (string, error)

Name is a free data retrieval call binding the contract method 0x06fdde03.

Solidity: function name() constant returns(string)

func (*TokenSession) Symbol

func (_Token *TokenSession) Symbol() (string, error)

Symbol is a free data retrieval call binding the contract method 0x95d89b41.

Solidity: function symbol() constant returns(string)

func (*TokenSession) TotalSupply

func (_Token *TokenSession) TotalSupply() (*big.Int, error)

TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.

Solidity: function totalSupply() constant returns(uint256)

func (*TokenSession) Transfer

func (_Token *TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*TokenSession) TransferFrom

func (_Token *TokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

type TokenTransactor

type TokenTransactor struct {
	// contains filtered or unexported fields
}

TokenTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewTokenTransactor

func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error)

NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract.

func (*TokenTransactor) Approve

func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*TokenTransactor) Transfer

func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*TokenTransactor) TransferFrom

func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

type TokenTransactorRaw

type TokenTransactorRaw struct {
	Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on
}

TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*TokenTransactorRaw) Transact

func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TokenTransactorRaw) Transfer

func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TokenTransactorSession

type TokenTransactorSession struct {
	Contract     *TokenTransactor  // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*TokenTransactorSession) Approve

func (_Token *TokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error)

Approve is a paid mutator transaction binding the contract method 0x095ea7b3.

Solidity: function approve(_spender address, _value uint256) returns(bool)

func (*TokenTransactorSession) Transfer

func (_Token *TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error)

Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.

Solidity: function transfer(_to address, _value uint256) returns(bool)

func (*TokenTransactorSession) TransferFrom

func (_Token *TokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error)

TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd.

Solidity: function transferFrom(_from address, _to address, _value uint256) returns(bool)

type TokenTransfer

type TokenTransfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
	Raw   types.Log // Blockchain specific contextual infos
}

TokenTransfer represents a Transfer event raised by the Token contract.

type TokenTransferIterator

type TokenTransferIterator struct {
	Event *TokenTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Token contract.

func (*TokenTransferIterator) Close

func (it *TokenTransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*TokenTransferIterator) Error

func (it *TokenTransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*TokenTransferIterator) Next

func (it *TokenTransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

Jump to

Keyboard shortcuts

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