Package

org

ergoplatform

Permalink

package ergoplatform

Visibility
  1. Public
  2. All

Type Members

  1. case class DataInput(boxId: BoxId) extends Product with Serializable

    Permalink

    Inputs, that are used to enrich script context, but won't be spent by the transaction

    Inputs, that are used to enrich script context, but won't be spent by the transaction

    boxId

    - id of a box to add into context (should be in UTXO)

  2. sealed trait ErgoAddress extends AnyRef

    Permalink

    An address is a short string corresponding to some script used to protect a box.

    An address is a short string corresponding to some script used to protect a box. Unlike (string-encoded) binary representation of a script, an address has some useful characteristics:

    - Integrity of an address could be checked., as it is incorporating a checksum. - A prefix of address is showing network and an address type. - An address is using an encoding (namely, Base58) which is avoiding similarly l0Oking characters, friendly to double-clicking and line-breaking in emails.

    An address is encoding network type, address type, checksum, and enough information to watch for a particular scripts.

    Possible network types are: Mainnet - 0x00 Testnet - 0x10

    Address types are, semantics is described below: 0x01 - Pay-to-PublicKey(P2PK) address 0x02 - Pay-to-Script-Hash(P2SH) 0x03 - Pay-to-Script(P2S)

    For an address type, we form content bytes as follows:

    P2PK - serialized (compressed) public key P2SH - first 192 bits of the Blake2b256 hash of serialized script bytes P2S - serialized script

    Address examples for testnet:

    3 - P2PK (3WvsT2Gm4EpsM9Pg18PdY6XyhNNMqXDsvJTbbf6ihLvAmSb7u5RN) 8 - P2SH (8UmyuJuQ3FS9ts7j72fn3fKChXSGzbL9WC, 8LnSX95GAWdbDZWJZQ73Uth4uE8HqN3emJ) ? - P2S (imdaM2NzX, z4hAmfvfSnQJPChMWzfBzJjpB8ei2HoLCZ2RHTaNArMNHFirdJTc7E)

    for mainnet:

    9 - P2PK (9fRAWhdxEsTcdb8PhGNrZfwqa65zfkuYHAMmkQLcic1gdLSV5vA) 2 - P2SH (25qGdVWg2yyYho8uC1pLtc7KxFn4nEEAwD, 23NL9a8ngN28ovtLiKLgHexcdTKBbUMLhH) ? - P2S (7bwdkU5V8, BxKBaHkvrTvLZrDcZjcsxsF7aSsrN73ijeFZXtbj4CXZHHcvBtqSxQ)

    Prefix byte = network type + address type

    checksum = blake2b256(prefix byte ++ content bytes)

    address = prefix byte ++ content bytes ++ checksum

  3. case class ErgoAddressEncoder(networkPrefix: NetworkPrefix) extends Product with Serializable

    Permalink
  4. class ErgoBox extends ErgoBoxCandidate

    Permalink

    Box (aka coin, or an unspent output) is a basic concept of a UTXO-based cryptocurrency.

    Box (aka coin, or an unspent output) is a basic concept of a UTXO-based cryptocurrency. In Bitcoin, such an object is associated with some monetary value (arbitrary, but with predefined precision, so we use integer arithmetic to work with the value), and also a guarding script (aka proposition) to protect the box from unauthorized opening.

    In other way, a box is a state element locked by some proposition (ErgoTree).

    In Ergo, box is just a collection of registers, some with mandatory types and semantics, others could be used by applications in any way. We add additional fields in addition to amount and proposition~(which stored in the registers R0 and R1). Namely, register R2 contains additional tokens (a sequence of pairs (token identifier, value)). Register R3 contains height when block got included into the blockchain and also transaction identifier and box index in the transaction outputs. Registers R4-R9 are free for arbitrary usage.

    A transaction is unsealing a box. As a box can not be open twice, any further valid transaction can not be linked to the same box.

  5. class ErgoBoxCandidate extends AnyRef

    Permalink

    Contains the same fields as org.ergoplatform.ErgoBox, except if transaction id and index, that will be calculated after full transaction formation.

    Contains the same fields as org.ergoplatform.ErgoBox, except if transaction id and index, that will be calculated after full transaction formation.

    See also

    org.ergoplatform.ErgoBox for more details

  6. trait ErgoBoxReader extends AnyRef

    Permalink
  7. class ErgoLikeContext extends InterpreterContext

    Permalink

    TODO lastBlockUtxoRoot should be calculated from headers if it is nonEmpty

  8. class ErgoLikeInterpreter extends Interpreter

    Permalink
  9. class ErgoLikeTransaction extends ErgoLikeTransactionTemplate[Input]

    Permalink

    Signed version of ErgoLikeTransactionTemplate

  10. trait ErgoLikeTransactionTemplate[IT <: UnsignedInput] extends AnyRef

    Permalink

    Base trait of a real transaction to be used in Ergo network.

    Base trait of a real transaction to be used in Ergo network. May be in unsigned (UnsignedErgoLikeTransaction) or in signed (ErgoLikeTransaction) version.

    Consists of:

  11. case class Input(boxId: BoxId, spendingProof: ProverResult) extends UnsignedInput with Product with Serializable

    Permalink

    Fully signed transaction input

    Fully signed transaction input

    boxId

    - id of a box to spent

    spendingProof

    - proof of spending correctness

  12. trait JsonCodecs extends AnyRef

    Permalink
  13. class P2PKAddress extends ErgoAddress

    Permalink
  14. class Pay2SAddress extends ErgoAddress

    Permalink
  15. class Pay2SHAddress extends ErgoAddress

    Permalink
  16. case class SizeConstant[T](value: T, id: Short, description: String)(implicit evidence$1: Numeric[T]) extends Product with Serializable

    Permalink
  17. class UnsignedErgoLikeTransaction extends ErgoLikeTransactionTemplate[UnsignedInput]

    Permalink

    Unsigned version of ErgoLikeTransactionTemplate

  18. class UnsignedInput extends AnyRef

    Permalink

    Inputs of formed, but unsigned transaction

Value Members

  1. object Context extends NotReadyValue[SContext.type] with ValueCompanion with Product with Serializable

    Permalink
  2. object ErgoAddressEncoder extends Serializable

    Permalink
  3. object ErgoBox

    Permalink
  4. object ErgoBoxCandidate

    Permalink
  5. object ErgoLikeContext

    Permalink
  6. object ErgoLikeTransaction

    Permalink
  7. object ErgoLikeTransactionSerializer extends SigmaSerializer[ErgoLikeTransaction, ErgoLikeTransaction]

    Permalink
  8. object ErgoScriptPredef

    Permalink
  9. object Global extends NotReadyValue[SGlobal.type] with ValueCompanion with Product with Serializable

    Permalink
  10. object Height extends NotReadyValueInt with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a IntConstant built from Context.currentHeight

  11. object Input extends Serializable

    Permalink
  12. object Inputs extends LazyCollection[SBox.type] with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a collection of BoxConstant built from Context.boxesToSpend

  13. object LastBlockUtxoRootHash extends NotReadyValueAvlTree with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a AvlTreeConstant built from Context.lastBlockUtxoRoot

  14. object MinerPubkey extends NotReadyValueByteArray with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a ByteArrayConstant built from Context.minerPubkey

  15. object Outputs extends LazyCollection[SBox.type] with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a collection of BoxConstant built from Context.spendingTransaction.outputs

  16. object P2PKAddress

    Permalink
  17. object Pay2SAddress

    Permalink
  18. object Pay2SHAddress

    Permalink
  19. object Self extends NotReadyValueBox with ValueCompanion with Product with Serializable

    Permalink

    When interpreted evaluates to a BoxConstant built from context.boxesToSpend(context.selfIndex)

  20. object SigmaConstants

    Permalink

    Constants facade that provide access to the values used in sigma's logic and checks.

    Constants facade that provide access to the values used in sigma's logic and checks. All the constants are collected in a sequence. Each constant has id, value and description. The constant ids are stable and never change. Some constant values may be defined in terms of other more fundamental values. In the future versions of sigma, the values may change, but due to versioned execution, all versions of the values should be available simultaneously.

  21. object UnsignedErgoLikeTransaction

    Permalink
  22. package dsl

    Permalink
  23. package mining

    Permalink
  24. package settings

    Permalink
  25. package validation

    Permalink

Ungrouped