Package

org.ergoplatform.wallet

boxes

Permalink

package boxes

Visibility
  1. Public
  2. All

Type Members

  1. trait BoxSelector extends ScorexLogging

    Permalink

    An interface which is exposing a method to select unspent boxes according to target amounts in Ergo tokens and assets and possible user-defined filter.

    An interface which is exposing a method to select unspent boxes according to target amounts in Ergo tokens and assets and possible user-defined filter. The interface could have many instantiations implementing different strategies.

  2. sealed abstract class ChainStatus extends AnyRef

    Permalink
  3. class DefaultBoxSelector extends BoxSelector

    Permalink

    Default implementation of the box selector.

    Default implementation of the box selector. It simply picks boxes till sum of their monetary values meets target Ergo balance, then it checks which assets are not fulfilled and adds boxes till target asset values are met.

  4. case class ReemissionData(reemissionNftId: ModifierId, reemissionTokenId: ModifierId) extends Product with Serializable

    Permalink

    Re-emission settings which are needed in order to construct transactions (any of them, except ones using re-emission contract (as this class does not have all the needed data to obtain re-emission contract.

    Re-emission settings which are needed in order to construct transactions (any of them, except ones using re-emission contract (as this class does not have all the needed data to obtain re-emission contract. However, it is possible to use re-emission contracts in apps using Ergo Wallet API by providing re-emission contract from outside).

  5. class ReplaceCompactCollectBoxSelector extends DefaultBoxSelector

    Permalink

    A box selector which is parameterized by maximum number of inputs a transaction can have, and optimal number of inputs.

    A box selector which is parameterized by maximum number of inputs a transaction can have, and optimal number of inputs.

    Say, the selector is given boxes denoted by their values (1,2,3,4,...10). Then the selector is working as follows:

    1) the selector first picking up boxes in given order (1,2,3,4,...) by using DefaultBoxSelector 2) if number of inputs exceeds the limit, the selector is sorting remaining boxes(actually, only 10*maximum boxes) by value in descending order and replaces small-value boxes in the inputs by big-value from the tail (1,2,3,4 => 10) 3) if the number of inputs still exceeds the limit, the selector is trying to throw away the dust if possible. E.g. if inputs are (100, 200, 1, 2, 1000), target value is 1300 and maximum number of inputs is 3, the selector kicks out (1, 2) 4) if number of inputs after the previous steps is below optimal, the selector is trying to append the dust, by sorting remaining boxes in ascending order and appending them till optimal number of inputs.

  6. sealed abstract class SpendingStatus extends AnyRef

    Permalink
  7. case class TrackedBox(creationTxId: ModifierId, creationOutIndex: Short, inclusionHeightOpt: Option[Int], spendingTxIdOpt: Option[ModifierId], spendingHeightOpt: Option[Int], box: ErgoBox, scans: Set[ScanId]) extends ErgoBoxAssets with Product with Serializable

    Permalink

    A box tracked by a wallet that contains Ergo box itself as well as its state (e.g.

    A box tracked by a wallet that contains Ergo box itself as well as its state (e.g. spent or not, confirmed or not etc).

    creationTxId

    - Id of transaction created the box

    creationOutIndex

    - Output index in the creation transaction

    inclusionHeightOpt

    - Height the transaction was included into blockchain

    spendingTxIdOpt

    - Id of transaction which spends the box if exists and known

    spendingHeightOpt

    - Height of the spending transaction block in blockchain if known

    box

    - Underlying Ergo box

    scans

    - Identifiers of scans the box refers to

Value Members

  1. object BoxSelector

    Permalink
  2. object ChainStatus

    Permalink
  3. object DefaultBoxSelector

    Permalink
  4. object ErgoBoxAssetExtractor

    Permalink
  5. object ErgoBoxSerializer extends Serializer[ErgoBox, ErgoBox, Reader, Writer] with ErgoWalletSerializer[ErgoBox]

    Permalink
  6. object ReplaceCompactCollectBoxSelector

    Permalink
  7. object SpendingStatus

    Permalink
  8. object TrackedBox extends Serializable

    Permalink
  9. object TrackedBoxSerializer extends Serializer[TrackedBox, TrackedBox, Reader, Writer] with ErgoWalletSerializer[TrackedBox]

    Permalink

Ungrouped