Documentation
¶
Overview ¶
Package efleg hands a settlement leg every transaction with its inputs' source transactions attached. A leg that takes Extended Format (BRC-30), arcade and a fabric ingress, needs each input's source; a transaction rebuilt from its recorded bytes (a token, a hold transaction or a settlement sent again, an advertisement resent after a restart) has none, and such a leg refuses it (arcade: 460, not extended format). Each missing source is read from the node by its txid and held to it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hydrate ¶
func Hydrate(ctx context.Context, asset *nodeapi.Asset, tx *transaction.Transaction) *transaction.Transaction
Hydrate is tx, or a shallow copy of it with the missing input sources read from asset. tx itself is never changed.
Types ¶
type Settler ¶
Settler is a leg whose transactions get their inputs' sources first.
func (*Settler) Submit ¶
func (s *Settler) Submit(ctx context.Context, tx *transaction.Transaction) error
Submit sends a copy of tx whose every input has its source transaction: the caller's own when it has one, else the node's, held to the txid. An input whose source the node does not answer is sent as it is, and the leg decides.