Expand description
Box selection for transaction inputs
Structs§
- BoxSelection
- Selected boxes (by
BoxSelector
) - Check
Preservation Error - Error on checking if inputs are preserved
- Ergo
BoxAssets Data - Simple struct to hold ErgoBoxAssets values
- NotEnough
Coins ForChange Box - Not enough coins for change box(es)
- Simple
BoxSelector - Simple box selector, collects inputs(sorted by targeted assets) until target balance is reached
Enums§
- BoxSelector
Error - Errors of BoxSelector
Traits§
- BoxSelector
- Box selector
- Ergo
BoxAssets - Assets that ErgoBox holds
- Ergo
BoxId - id of the ergo box
Functions§
- subtract_
tokens - Subtract tokens2 from tokens1 subtracting amounts of the same token or removing the token if amount is the same Returns an error if trying to subtract more tokens than there are in tokens1
- sum_
tokens - Returns the total token amounts (all tokens combined)
- sum_
tokens_ from_ boxes - Returns the total token amounts (all tokens combined) of the given boxes
- sum_
tokens_ from_ hashmaps - Sums two hashmaps of tokens (summing amounts of the same token)
- sum_
value - Returns the total value of the given boxes
Type Aliases§
- Selected
Boxes - Bounded vec with minimum 1 element and max i16::MAX elements