Inputs, that are used to enrich script context, but won't be spent by the transaction
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) ? - P2SH (rbcrmKEYduUvADj9Ts3dSVSG27h54pgrq5fPuwB) ? - P2S (Ms7smJwLGbUAjuWQ)
for mainnet:
9 - P2PK (9fRAWhdxEsTcdb8PhGNrZfwqa65zfkuYHAMmkQLcic1gdLSV5vA) ? - P2SH (8UApt8czfFVuTgQmMwtsRBZ4nfWquNiSwCWUjMg) ? - P2S (4MQyML64GnzMxZgm, BxKBaHkvrTvLZrDcZjcsxsF7aSsrN73ijeFZXtbj4CXZHHcvBtqSxQ)
Prefix byte = network type + address type
checksum = blake2b256(prefix byte ++ content bytes)
address = prefix byte ++ content bytes ++ checksum
Network-aware encoder for ErgoAddress <-> Base58String conversions.
Network-aware encoder for ErgoAddress <-> Base58String conversions.
network prefix value to be used in address encoding.
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.
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.
org.ergoplatform.ErgoBox for more details
Represents a script evaluation context to be passed to a prover and a verifier to execute and validate guarding proposition of input boxes of a transaction.
Signed version of ErgoLikeTransactionTemplate
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:
Fully signed transaction input
Fully signed transaction input
- id of a box to spent
- proof of spending correctness
Implementation of pay-to-public-key ErgoAddress.
Implementation of pay-to-script ErgoAddress.
Implementation of pay-to-script-hash ErgoAddress.
Unsigned version of ErgoLikeTransactionTemplate
Inputs of formed, but unsigned transaction
When interpreted evaluates to the singleton instance of special.sigma.Context.
When interpreted evaluates to the singleton instance of special.sigma.Context.
Corresponds to CONTEXT
variable in ErgoScript which can be used like CONTEXT.headers
.
When interpreted evaluates to the singleton instance of special.sigma.SigmaDslBuilder.
When interpreted evaluates to the singleton instance of special.sigma.SigmaDslBuilder.
Corresponds to Global
variable in ErgoScript which can be used like Global.groupGenerator
.
When interpreted evaluates to a IntConstant built from Context.currentHeight
When interpreted evaluates to a collection of BoxConstant built from Context.boxesToSpend
When interpreted evaluates to a AvlTreeConstant built from Context.lastBlockUtxoRoot
When interpreted evaluates to a ByteArrayConstant built from Context.minerPubkey
When interpreted evaluates to a collection of BoxConstant built from Context.spendingTransaction.outputs
When interpreted evaluates to a BoxConstant built from context.boxesToSpend(context.selfIndex)
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.
Inputs, that are used to enrich script context, but won't be spent by the transaction
- id of a box to add into context (should be in UTXO)