Documentation ¶
Index ¶
- type Account
- func (account *Account) Balance() (*accounts.Balance, error)
- func (account *Account) CanVerifyAddresses() (bool, bool, error)
- func (account *Account) Close()
- func (account *Account) Code() string
- func (account *Account) Coin() coin.Coin
- func (account *Account) ConvertToLegacyAddress(string) (btcutil.Address, error)
- func (account *Account) FatalError() bool
- func (account *Account) FeeTargets() ([]accounts.FeeTarget, accounts.FeeTargetCode)
- func (account *Account) GetUnusedReceiveAddresses() []accounts.Address
- func (account *Account) Info() *accounts.Info
- func (account *Account) Initialize() error
- func (account *Account) Initialized() bool
- func (account *Account) Keystores() *keystore.Keystores
- func (account *Account) Name() string
- func (account *Account) Notifier() accounts.Notifier
- func (account *Account) Offline() bool
- func (account *Account) SendTx(recipientAddress string, amount coin.SendAmount, _ accounts.FeeTargetCode, ...) error
- func (account *Account) Transactions() ([]accounts.Transaction, error)
- func (account *Account) TxProposal(recipientAddress string, amount coin.SendAmount, _ accounts.FeeTargetCode, ...) (coin.Amount, coin.Amount, coin.Amount, error)
- func (account *Account) VerifyAddress(addressID string) (bool, error)
- type Address
- type Coin
- func (coin *Coin) BlockExplorerTransactionURLPrefix() string
- func (coin *Coin) Code() string
- func (coin *Coin) EtherScan() *etherscan.EtherScan
- func (coin *Coin) FormatAmount(amount coin.Amount) string
- func (coin *Coin) Initialize()
- func (coin *Coin) Net() *params.ChainConfig
- func (coin *Coin) SmallestUnit() string
- func (coin *Coin) String() string
- func (coin *Coin) ToUnit(amount coin.Amount) float64
- func (coin *Coin) Unit() string
- type TxProposal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
Account is an Ethereum account, with one address.
func NewAccount ¶
func NewAccount( accountCoin *Coin, dbFolder string, code string, name string, getSigningConfiguration func() (*signing.Configuration, error), keystores *keystore.Keystores, getNotifier func(*signing.Configuration) accounts.Notifier, onEvent func(accounts.Event), log *logrus.Entry, ) *Account
NewAccount creates a new account.
func (*Account) CanVerifyAddresses ¶
CanVerifyAddresses implements accounts.Interface.
func (*Account) ConvertToLegacyAddress ¶
ConvertToLegacyAddress implements accounts.Interface.
func (*Account) FatalError ¶
FatalError implements accounts.Interface.
func (*Account) FeeTargets ¶
func (account *Account) FeeTargets() ([]accounts.FeeTarget, accounts.FeeTargetCode)
FeeTargets implements accounts.Interface.
func (*Account) GetUnusedReceiveAddresses ¶
GetUnusedReceiveAddresses implements accounts.Interface.
func (*Account) Initialize ¶
Initialize implements accounts.Interface.
func (*Account) Initialized ¶
Initialized implements accounts.Interface.
func (*Account) SendTx ¶
func (account *Account) SendTx( recipientAddress string, amount coin.SendAmount, _ accounts.FeeTargetCode, _ map[wire.OutPoint]struct{}, data []byte) error
SendTx implements accounts.Interface.
func (*Account) Transactions ¶
func (account *Account) Transactions() ([]accounts.Transaction, error)
Transactions implements accounts.Interface.
type Address ¶
Address holds an Ethereum address and implements coin.Address.
func (Address) EncodeForHumans ¶
EncodeForHumans implements coin.Address.
type Coin ¶
type Coin struct { observable.Implementation // contains filtered or unexported fields }
Coin models an Ethereum coin.
func NewCoin ¶
func NewCoin( code string, net *params.ChainConfig, blockExplorerTxPrefix string, nodeURL string, ) *Coin
NewCoin creates a new coin with the given parameters.
func (*Coin) BlockExplorerTransactionURLPrefix ¶
BlockExplorerTransactionURLPrefix implements coin.Coin.
func (*Coin) FormatAmount ¶
FormatAmount implements coin.Coin.
func (*Coin) Net ¶
func (coin *Coin) Net() *params.ChainConfig
Net returns the network (mainnet, testnet, etc.).
func (*Coin) SmallestUnit ¶
SmallestUnit implements coin.Coin.
type TxProposal ¶
type TxProposal struct { Tx *types.Transaction Fee *big.Int // Signer contains the sighash algo, which depends on the block number. Signer types.Signer // KeyPath is the location of this account's address/pubkey/privkey. Keypath signing.AbsoluteKeypath }
TxProposal holds all info needed to create and sign a transacstion.