Documentation ¶
Index ¶
- Constants
- func IsCoinBase(tx *externalapi.DomainTransaction) bool
- func NewNativeTransaction(version uint16, inputs []*externalapi.DomainTransactionInput, ...) *externalapi.DomainTransaction
- func NewSubnetworkTransaction(version uint16, inputs []*externalapi.DomainTransactionInput, ...) *externalapi.DomainTransaction
Constants ¶
const CoinbaseTransactionIndex = 0
CoinbaseTransactionIndex is the index of the coinbase transaction in every block
Variables ¶
This section is empty.
Functions ¶
func IsCoinBase ¶
func IsCoinBase(tx *externalapi.DomainTransaction) bool
IsCoinBase determines whether or not a transaction is a coinbase transaction. A coinbase transaction is a special transaction created by miners that distributes fees and block subsidy to the previous blocks' miners, and to specify the scriptPubKey that will be used to pay the current miner in future blocks. Each input of the coinbase transaction should set index to maximum value and reference the relevant block id, instead of previous transaction id.
func NewNativeTransaction ¶
func NewNativeTransaction(version uint16, inputs []*externalapi.DomainTransactionInput, outputs []*externalapi.DomainTransactionOutput) *externalapi.DomainTransaction
NewNativeTransaction returns a new native transaction
func NewSubnetworkTransaction ¶
func NewSubnetworkTransaction(version uint16, inputs []*externalapi.DomainTransactionInput, outputs []*externalapi.DomainTransactionOutput, subnetworkID *externalapi.DomainSubnetworkID, gas uint64, payload []byte) *externalapi.DomainTransaction
NewSubnetworkTransaction returns a new trsnactions in the specified subnetwork with specified gas and payload
Types ¶
This section is empty.