utxodbledger

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UtxoDBLedger

type UtxoDBLedger struct {
	*utxodb.UtxoDB
	// contains filtered or unexported fields
}

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) Detach

func (u *UtxoDBLedger) Detach()

Detach detaches the event handlers.

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 added in v0.8.0

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.

Jump to

Keyboard shortcuts

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