Documentation ¶
Index ¶
- type TangleLedger
- func (t *TangleLedger) Detach()
- func (t *TangleLedger) EventTransactionBooked() *events.Event
- func (t *TangleLedger) GetHighGoFTransaction(txid ledgerstate.TransactionID, f func(ret *ledgerstate.Transaction)) (found bool)
- func (t *TangleLedger) GetOutput(outID ledgerstate.OutputID, f func(ledgerstate.Output)) bool
- func (t *TangleLedger) GetOutputMetadata(outID ledgerstate.OutputID, f func(*ledgerstate.OutputMetadata)) bool
- func (t *TangleLedger) GetUnspentOutputs(addr ledgerstate.Address, f func(output ledgerstate.Output))
- func (t *TangleLedger) PostTransaction(tx *ledgerstate.Transaction) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TangleLedger ¶
type TangleLedger struct {
// contains filtered or unexported fields
}
TangleLedger imlpements txstream.TangleLedger with the GoShimmer tangle as backend.
func New ¶
func New(tangleInstance *tangle.Tangle) *TangleLedger
New returns an implementation for txstream.Ledger.
func (*TangleLedger) EventTransactionBooked ¶
func (t *TangleLedger) EventTransactionBooked() *events.Event
EventTransactionBooked returns an event that triggers when a transaction is booked.
func (*TangleLedger) GetHighGoFTransaction ¶ added in v0.8.0
func (t *TangleLedger) 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 (*TangleLedger) GetOutput ¶
func (t *TangleLedger) GetOutput(outID ledgerstate.OutputID, f func(ledgerstate.Output)) bool
GetOutput finds an output by ID (either spent or unspent).
func (*TangleLedger) GetOutputMetadata ¶
func (t *TangleLedger) GetOutputMetadata(outID ledgerstate.OutputID, f func(*ledgerstate.OutputMetadata)) bool
GetOutputMetadata finds an output by ID and returns its metadata.
func (*TangleLedger) GetUnspentOutputs ¶
func (t *TangleLedger) GetUnspentOutputs(addr ledgerstate.Address, f func(output ledgerstate.Output))
GetUnspentOutputs returns the available UTXOs for an address.
func (*TangleLedger) PostTransaction ¶
func (t *TangleLedger) PostTransaction(tx *ledgerstate.Transaction) error
PostTransaction posts a transaction to the ledger.
Click to show internal directories.
Click to hide internal directories.