Documentation
¶
Index ¶
- Variables
- func ReadUint(b []byte) (uint64, []byte, error)
- func WriteUint(b []byte, v uint64) []byte
- type Block
- type BlockHeader
- type Transaction
- type TransactionIn
- type TransactionInGenesis
- type TransactionInToKey
- type TransactionInToScript
- type TransactionInToScriptHash
- type TransactionOut
- type TransactionOutToKey
- type TransactionOutToScript
- type TransactionOutToScriptHash
- type TransactionPrefix
- type TxExtra
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNonceTooLong = errors.New("nonce is too long to insert into the transaction data field")
Functions ¶
Types ¶
type Block ¶
type Block struct {
BlockHeader
MinerTxn Transaction
TxnHashes [][32]byte
}
type BlockHeader ¶
type BlockHeader struct {
MajorVersion uint8
MinorVersion uint8
Timestamp uint64
PreviousID [32]byte
Nonce uint32
}
func (BlockHeader) Serialize ¶
func (bh BlockHeader) Serialize() []byte
type Transaction ¶
type Transaction struct {
TransactionPrefix
Signatures [][32]byte
}
func (Transaction) Serialize ¶
func (t Transaction) Serialize() []byte
type TransactionIn ¶
type TransactionIn struct {
Genesis TransactionInGenesis
Script TransactionInToScript
ScriptHash TransactionInToScriptHash
Key TransactionInToKey
}
func (TransactionIn) Serialize ¶
func (ti TransactionIn) Serialize() []byte
type TransactionInGenesis ¶
Transaction Inputs
func (TransactionInGenesis) Serialize ¶
func (tig TransactionInGenesis) Serialize() []byte
type TransactionInToKey ¶
type TransactionInToScript ¶
type TransactionInToScriptHash ¶
type TransactionInToScriptHash struct {
PreviousHash [32]byte
PreviousOutput uint64
Script TransactionOutToScript
SignatureSet []uint8
Used bool
}
type TransactionOut ¶
type TransactionOut struct {
Amount uint64
Script TransactionOutToScript
ScriptHash TransactionOutToScriptHash
Key TransactionOutToKey
}
func (TransactionOut) Serialize ¶
func (to TransactionOut) Serialize() []byte
type TransactionOutToKey ¶
func (TransactionOutToKey) Serialize ¶
func (totk TransactionOutToKey) Serialize() []byte
type TransactionOutToScript ¶
Transaction Outputs
type TransactionPrefix ¶
type TransactionPrefix struct {
Version uint64
UnlockTime uint64
TransactionsIn []TransactionIn
TransactionsOut []TransactionOut
Extra TxExtra
}
func (TransactionPrefix) Serialize ¶
func (tp TransactionPrefix) Serialize() []byte
type TxExtra ¶
type TxExtra struct {
Padding *[]byte // TX_EXTRA_TAG_PADDING - 0x00
PubKey []byte // TX_EXTRA_TAG_PUBKEY - 0x01
Nonce []byte // TX_EXTRA_NONCE - 0x02
MergeMiningTag *[]byte // TX_EXTRA_MERGE_MINING_TAG - 0x03
AddlPubKeys *[]byte // TX_EXTRA_TAG_ADDITIONAL_PUBKEYS - 0x04
MystMGTag *[]byte // TX_EXTRA_MYSTERIOUS_MINERGATE_TAG - 0x0e
}
func ConstructTXExtra ¶
func (*TxExtra) UpdateNonce ¶
Click to show internal directories.
Click to hide internal directories.