Documentation ¶
Index ¶
- type TangleLedger
- func (t *TangleLedger) Detach()
- func (t *TangleLedger) EventTransactionBooked() *events.Event
- func (t *TangleLedger) EventTransactionConfirmed() *events.Event
- func (t *TangleLedger) GetConfirmedTransaction(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) GetTxInclusionState(txid ledgerstate.TransactionID) (ledgerstate.InclusionState, error)
- 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 (*TangleLedger) EventTransactionBooked ¶
func (t *TangleLedger) EventTransactionBooked() *events.Event
EventTransactionBooked returns an event that triggers when a transaction is booked
func (*TangleLedger) EventTransactionConfirmed ¶
func (t *TangleLedger) EventTransactionConfirmed() *events.Event
EventTransactionConfirmed returns an event that triggers when a transaction is confirmed
func (*TangleLedger) GetConfirmedTransaction ¶
func (t *TangleLedger) GetConfirmedTransaction(txid ledgerstate.TransactionID, f func(ret *ledgerstate.Transaction)) (found bool)
GetConfirmedTransaction fetches a transaction by ID, and executes the given callback if found
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) GetTxInclusionState ¶
func (t *TangleLedger) GetTxInclusionState(txid ledgerstate.TransactionID) (ledgerstate.InclusionState, error)
GetTxInclusionState returns the inclusion state of the given transaction
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