Documentation ¶
Index ¶
- type UtxoDBLedger
- func (u *UtxoDBLedger) Detach()
- func (u *UtxoDBLedger) EventTransactionBooked() *events.Event
- func (u *UtxoDBLedger) EventTransactionConfirmed() *events.Event
- func (u *UtxoDBLedger) GetHighGoFTransaction(txid ledgerstate.TransactionID, f func(ret *ledgerstate.Transaction)) (found bool)
- func (u *UtxoDBLedger) GetUnspentOutputs(addr ledgerstate.Address, f func(output ledgerstate.Output))
- func (u *UtxoDBLedger) PostTransaction(tx *ledgerstate.Transaction) error
- func (u *UtxoDBLedger) RequestFunds(target ledgerstate.Address) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UtxoDBLedger ¶
UtxoDBLedger implements txstream.Ledger by wrapping UTXODB.
func New ¶
func New(log *logger.Logger, tangleInstance *tangle.Tangle) *UtxoDBLedger
New creates a new empty ledger.
func (*UtxoDBLedger) EventTransactionBooked ¶
func (u *UtxoDBLedger) EventTransactionBooked() *events.Event
EventTransactionBooked returns an event that triggers when a transaction is booked.
func (*UtxoDBLedger) EventTransactionConfirmed ¶
func (u *UtxoDBLedger) EventTransactionConfirmed() *events.Event
EventTransactionConfirmed returns an event that triggers when a transaction is confirmed.
func (*UtxoDBLedger) GetHighGoFTransaction ¶
func (u *UtxoDBLedger) GetHighGoFTransaction(txid ledgerstate.TransactionID, f func(ret *ledgerstate.Transaction)) (found bool)
GetHighGoFTransaction fetches a transaction by ID, and executes the given callback if its GoF is high.
func (*UtxoDBLedger) GetUnspentOutputs ¶
func (u *UtxoDBLedger) GetUnspentOutputs(addr ledgerstate.Address, f func(output ledgerstate.Output))
GetUnspentOutputs returns the available UTXOs for an address.
func (*UtxoDBLedger) PostTransaction ¶
func (u *UtxoDBLedger) PostTransaction(tx *ledgerstate.Transaction) error
PostTransaction posts a transaction to the ledger.
func (*UtxoDBLedger) RequestFunds ¶
func (u *UtxoDBLedger) RequestFunds(target ledgerstate.Address) error
RequestFunds requests funds from the faucet.
Click to show internal directories.
Click to hide internal directories.