Documentation ¶
Index ¶
- type Account
- func (a *Account) HasNewAddressesToWatch() bool
- func (a *Account) MarkAddressAsUsed(hash []byte)
- func (a *Account) NewPayment() *Payment
- func (a *Account) NextChangeAddress() []byte
- func (a *Account) NextFree(list []string) *Address
- func (a *Account) NextReceiveAddress() []byte
- func (a *Account) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (a *Account) SetTxInventory(inv UnspentTxOutputter)
- func (a *Account) SpendableOutputs() []*spendable
- func (a *Account) UnusedAddresses(list []string) int
- func (a *Account) UpdateBalances()
- func (a *Account) WatchObjects() [][]byte
- type Address
- type OutputsByTxHash
- type Payment
- type UnspentTxOutputter
- type Wallet
- func (w *Wallet) HasNewAddressesToWatch() bool
- func (w *Wallet) MarkAddressAsUsed(hash []byte)
- func (w *Wallet) NewPayment() *Payment
- func (wallet *Wallet) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (w *Wallet) SetTxInventory(inv UnspentTxOutputter)
- func (w *Wallet) WatchObjects() [][]byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccount ¶
func (*Account) HasNewAddressesToWatch ¶
hasNewAddressesToWatch returns true if additional addresses has been added since last call of WatchObjects.
func (*Account) MarkAddressAsUsed ¶
func (*Account) NewPayment ¶
func (*Account) NextChangeAddress ¶
func (*Account) NextReceiveAddress ¶
func (*Account) SetTxInventory ¶
func (a *Account) SetTxInventory(inv UnspentTxOutputter)
func (*Account) SpendableOutputs ¶
func (a *Account) SpendableOutputs() []*spendable
SpendableOutputs reads outputs from a central storage and returns the ones that are spendable by this acount.
func (*Account) UnusedAddresses ¶
UnusedAddresses returne the number of unused addresses at the end of the address space currently watched, ie. not counting those in gaps.
func (*Account) UpdateBalances ¶
func (a *Account) UpdateBalances()
UpdateBalances will update the list of spendable outputs and hence the balance of all active addresses.
func (*Account) WatchObjects ¶
type OutputsByTxHash ¶
func (OutputsByTxHash) Len ¶
func (slice OutputsByTxHash) Len() int
func (OutputsByTxHash) Less ¶
func (slice OutputsByTxHash) Less(i, j int) bool
func (OutputsByTxHash) Swap ¶
func (slice OutputsByTxHash) Swap(i, j int)
type Payment ¶
type Payment struct {
// contains filtered or unexported fields
}
func (*Payment) AddDataOutput ¶
AddDataOutput adds up to 40 bytes of arbitrary data using the OP_RETURN op code.
func (*Payment) AddInputsAndFee ¶
AddInputsAndFee to payment adds spendable inputs from the account until the value of the inputs matches or surpases the outputs. If the inputs become larger than the outputs, a change output from the account is added. No more outputs should be added after calling this.
func (*Payment) AddOutput ¶
AddOutput adds a standard pay to public key hash output to a payment transaction.
func (*Payment) Transactions ¶
func (p *Payment) Transactions() []*messages.Transaction
type UnspentTxOutputter ¶
Storage object that gives unspent outputs, some of which may be spendable by a certain account.
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
func (*Wallet) HasNewAddressesToWatch ¶
func (*Wallet) MarkAddressAsUsed ¶
func (*Wallet) SetTxInventory ¶
func (w *Wallet) SetTxInventory(inv UnspentTxOutputter)