Versions in this module Expand all Collapse all v0 v0.0.1 Dec 15, 2023 Changes in this version + const DomainHashSize + const DomainSubnetworkIDSize + func HashesEqual(a, b []*DomainHash) bool + func ParentsEqual(a, b []BlockLevelParents) bool + type AcceptanceData []*BlockAcceptanceData + func (ad AcceptanceData) Clone() AcceptanceData + func (ad AcceptanceData) Equal(other AcceptanceData) bool + type BaseBlockHeader interface + AcceptedIDMerkleRoot func() *DomainHash + Bits func() uint32 + BlockLevel func(maxBlockLevel int) int + BlueScore func() uint64 + BlueWork func() *big.Int + DAAScore func() uint64 + DirectParents func() BlockLevelParents + Equal func(other BaseBlockHeader) bool + HashMerkleRoot func() *DomainHash + Nonce func() uint64 + Parents func() []BlockLevelParents + PruningPoint func() *DomainHash + TimeInMilliseconds func() int64 + UTXOCommitment func() *DomainHash + Version func() uint16 + type BlockAcceptanceData struct + BlockHash *DomainHash + TransactionAcceptanceData []*TransactionAcceptanceData + func (bad *BlockAcceptanceData) Clone() *BlockAcceptanceData + func (bad *BlockAcceptanceData) Equal(other *BlockAcceptanceData) bool + type BlockAdded struct + Block *DomainBlock + type BlockGHOSTDAGData struct + func NewBlockGHOSTDAGData(blueScore uint64, blueWork *big.Int, selectedParent *DomainHash, ...) *BlockGHOSTDAGData + func (bgd *BlockGHOSTDAGData) BlueScore() uint64 + func (bgd *BlockGHOSTDAGData) BlueWork() *big.Int + func (bgd *BlockGHOSTDAGData) BluesAnticoneSizes() map[DomainHash]KType + func (bgd *BlockGHOSTDAGData) MergeSetBlues() []*DomainHash + func (bgd *BlockGHOSTDAGData) MergeSetReds() []*DomainHash + func (bgd *BlockGHOSTDAGData) SelectedParent() *DomainHash + type BlockGHOSTDAGDataHashPair struct + GHOSTDAGData *BlockGHOSTDAGData + Hash *DomainHash + type BlockHeader interface + ToMutable func() MutableBlockHeader + type BlockInfo struct + BlockStatus BlockStatus + BlueScore uint64 + BlueWork *big.Int + Exists bool + MergeSetBlues []*DomainHash + MergeSetReds []*DomainHash + SelectedParent *DomainHash + func (bi *BlockInfo) Clone() *BlockInfo + func (bi *BlockInfo) HasBody() bool + func (bi *BlockInfo) HasHeader() bool + type BlockLevelParents []*DomainHash + func CloneParents(parents []BlockLevelParents) []BlockLevelParents + func (sl BlockLevelParents) Clone() BlockLevelParents + func (sl BlockLevelParents) Contains(blockHash *DomainHash) bool + func (sl BlockLevelParents) Equal(other BlockLevelParents) bool + type BlockLocator []*DomainHash + func (locator BlockLocator) Clone() BlockLocator + type BlockStatus byte + const StatusDisqualifiedFromChain + const StatusHeaderOnly + const StatusInvalid + const StatusUTXOPendingVerification + const StatusUTXOValid + func (bs BlockStatus) Clone() BlockStatus + func (bs BlockStatus) Equal(other BlockStatus) bool + func (bs BlockStatus) String() string + type BlockWithTrustedData struct + Block *DomainBlock + DAAWindow []*TrustedDataDataDAAHeader + GHOSTDAGData []*BlockGHOSTDAGDataHashPair + type Consensus interface + Anticone func(blockHash *DomainHash) ([]*DomainHash, error) + AppendImportedPruningPointUTXOs func(outpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair) error + ApplyPruningPointProof func(pruningPointProof *PruningPointProof) error + ArePruningPointsViolatingFinality func(pruningPoints []BlockHeader) (bool, error) + BlockDAAWindowHashes func(blockHash *DomainHash) ([]*DomainHash, error) + BuildBlock func(coinbaseData *DomainCoinbaseData, transactions []*DomainTransaction) (*DomainBlock, error) + BuildBlockTemplate func(coinbaseData *DomainCoinbaseData, transactions []*DomainTransaction) (*DomainBlockTemplate, error) + BuildPruningPointProof func() (*PruningPointProof, error) + ClearImportedPruningPointData func() error + CreateBlockLocatorFromPruningPoint func(highHash *DomainHash, limit uint32) (BlockLocator, error) + CreateFullHeadersSelectedChainBlockLocator func() (BlockLocator, error) + CreateHeadersSelectedChainBlockLocator func(lowHash, highHash *DomainHash) (BlockLocator, error) + EstimateNetworkHashesPerSecond func(startHash *DomainHash, windowSize int) (uint64, error) + GetAnticone func(blockHash, contextHash *DomainHash, maxBlocks uint64) (hashes []*DomainHash, err error) + GetBlock func(blockHash *DomainHash) (*DomainBlock, bool, error) + GetBlockAcceptanceData func(blockHash *DomainHash) (AcceptanceData, error) + GetBlockEvenIfHeaderOnly func(blockHash *DomainHash) (*DomainBlock, error) + GetBlockHeader func(blockHash *DomainHash) (BlockHeader, error) + GetBlockInfo func(blockHash *DomainHash) (*BlockInfo, error) + GetBlockRelations func(blockHash *DomainHash) (parents []*DomainHash, children []*DomainHash, err error) + GetBlocksAcceptanceData func(blockHashes []*DomainHash) ([]AcceptanceData, error) + GetHashesBetween func(lowHash, highHash *DomainHash, maxBlocks uint64) (hashes []*DomainHash, actualHighHash *DomainHash, err error) + GetHeadersSelectedTip func() (*DomainHash, error) + GetMissingBlockBodyHashes func(highHash *DomainHash) ([]*DomainHash, error) + GetPruningPointUTXOs func(expectedPruningPointHash *DomainHash, fromOutpoint *DomainOutpoint, limit int) ([]*OutpointAndUTXOEntryPair, error) + GetSyncInfo func() (*SyncInfo, error) + GetVirtualDAAScore func() (uint64, error) + GetVirtualInfo func() (*VirtualInfo, error) + GetVirtualSelectedParent func() (*DomainHash, error) + GetVirtualSelectedParentChainFromBlock func(blockHash *DomainHash) (*SelectedChainPath, error) + GetVirtualUTXOs func(expectedVirtualParents []*DomainHash, fromOutpoint *DomainOutpoint, limit int) ([]*OutpointAndUTXOEntryPair, error) + ImportPruningPoints func(pruningPoints []BlockHeader) error + Init func(skipAddingGenesis bool) error + IsChainBlock func(blockHash *DomainHash) (bool, error) + IsInSelectedParentChainOf func(blockHashA *DomainHash, blockHashB *DomainHash) (bool, error) + IsNearlySynced func() (bool, error) + IsValidPruningPoint func(blockHash *DomainHash) (bool, error) + PopulateMass func(transaction *DomainTransaction) + PruningPoint func() (*DomainHash, error) + PruningPointAndItsAnticone func() ([]*DomainHash, error) + PruningPointHeaders func() ([]BlockHeader, error) + ResolveVirtual func(progressReportCallback func(uint64, uint64)) error + Tips func() ([]*DomainHash, error) + TrustedBlocnexesociatedGHOSTDAGDataBlockHashes func(blockHash *DomainHash) ([]*DomainHash, error) + TrustedDataDataDAAHeader func(trustedBlockHash, daaBlockHash *DomainHash, daaBlockWindowIndex uint64) (*TrustedDataDataDAAHeader, error) + TrustedGHOSTDAGData func(blockHash *DomainHash) (*BlockGHOSTDAGData, error) + ValidateAndInsertBlock func(block *DomainBlock, updateVirtual bool) error + ValidateAndInsertBlockWithTrustedData func(block *BlockWithTrustedData, validateUTXO bool) error + ValidateAndInsertImportedPruningPoint func(newPruningPoint *DomainHash) error + ValidatePruningPointProof func(pruningPointProof *PruningPointProof) error + ValidateTransactionAndPopulateWithConsensusData func(transaction *DomainTransaction) error + VirtualMergeDepthRoot func() (*DomainHash, error) + type ConsensusEvent interface + type DomainBlock struct + Header BlockHeader + Transactions []*DomainTransaction + func (block *DomainBlock) Clone() *DomainBlock + func (block *DomainBlock) Equal(other *DomainBlock) bool + type DomainBlockTemplate struct + Block *DomainBlock + CoinbaseData *DomainCoinbaseData + CoinbaseHasRedReward bool + IsNearlySynced bool + func (bt *DomainBlockTemplate) Clone() *DomainBlockTemplate + type DomainCoinbaseData struct + ExtraData []byte + ScriptPublicKey *ScriptPublicKey + func (dcd *DomainCoinbaseData) Clone() *DomainCoinbaseData + func (dcd *DomainCoinbaseData) Equal(other *DomainCoinbaseData) bool + type DomainHash struct + func CloneHashes(hashes []*DomainHash) []*DomainHash + func NewDomainHashFromByteArray(hashBytes *[DomainHashSize]byte) *DomainHash + func NewDomainHashFromByteSlice(hashBytes []byte) (*DomainHash, error) + func NewDomainHashFromString(hashString string) (*DomainHash, error) + func NewZeroHash() *DomainHash + func (hash *DomainHash) ByteArray() *[DomainHashSize]byte + func (hash *DomainHash) ByteSlice() []byte + func (hash *DomainHash) Equal(other *DomainHash) bool + func (hash *DomainHash) Less(other *DomainHash) bool + func (hash *DomainHash) LessOrEqual(other *DomainHash) bool + func (hash DomainHash) String() string + type DomainOutpoint struct + Index uint32 + TransactionID DomainTransactionID + func NewDomainOutpoint(id *DomainTransactionID, index uint32) *DomainOutpoint + func (op *DomainOutpoint) Clone() *DomainOutpoint + func (op *DomainOutpoint) Equal(other *DomainOutpoint) bool + func (op DomainOutpoint) String() string + type DomainSubnetworkID [DomainSubnetworkIDSize]byte + func (id *DomainSubnetworkID) Clone() *DomainSubnetworkID + func (id *DomainSubnetworkID) Equal(other *DomainSubnetworkID) bool + func (id DomainSubnetworkID) String() string + type DomainTransaction struct + Fee uint64 + Gas uint64 + ID *DomainTransactionID + Inputs []*DomainTransactionInput + LockTime uint64 + Mass uint64 + Outputs []*DomainTransactionOutput + Payload []byte + SubnetworkID DomainSubnetworkID + Version uint16 + func (tx *DomainTransaction) Clone() *DomainTransaction + func (tx *DomainTransaction) Equal(other *DomainTransaction) bool + type DomainTransactionID DomainHash + func NewDomainTransactionIDFromByteArray(transactionIDBytes *[DomainHashSize]byte) *DomainTransactionID + func NewDomainTransactionIDFromByteSlice(transactionIDBytes []byte) (*DomainTransactionID, error) + func NewDomainTransactionIDFromString(transactionIDString string) (*DomainTransactionID, error) + func (id *DomainTransactionID) ByteArray() *[DomainHashSize]byte + func (id *DomainTransactionID) ByteSlice() []byte + func (id *DomainTransactionID) Clone() *DomainTransactionID + func (id *DomainTransactionID) Equal(other *DomainTransactionID) bool + func (id *DomainTransactionID) Less(other *DomainTransactionID) bool + func (id *DomainTransactionID) LessOrEqual(other *DomainTransactionID) bool + func (id DomainTransactionID) String() string + type DomainTransactionInput struct + PreviousOutpoint DomainOutpoint + Sequence uint64 + SigOpCount byte + SignatureScript []byte + UTXOEntry UTXOEntry + func (input *DomainTransactionInput) Clone() *DomainTransactionInput + func (input *DomainTransactionInput) Equal(other *DomainTransactionInput) bool + type DomainTransactionOutput struct + ScriptPublicKey *ScriptPublicKey + Value uint64 + func (output *DomainTransactionOutput) Clone() *DomainTransactionOutput + func (output *DomainTransactionOutput) Equal(other *DomainTransactionOutput) bool + type KType byte + type MutableBlockHeader interface + SetHashMerkleRoot func(hashMerkleRoot *DomainHash) + SetNonce func(nonce uint64) + SetTimeInMilliseconds func(timeInMilliseconds int64) + ToImmutable func() BlockHeader + type MutableUTXODiff interface + AddTransaction func(transaction *DomainTransaction, blockDAAScore uint64) error + DiffFrom func(other UTXODiff) (UTXODiff, error) + ToAdd func() UTXOCollection + ToImmutable func() UTXODiff + ToRemove func() UTXOCollection + WithDiff func(other UTXODiff) (UTXODiff, error) + WithDiffInPlace func(other UTXODiff) error + type OutpointAndUTXOEntryPair struct + Outpoint *DomainOutpoint + UTXOEntry UTXOEntry + type PruningPointProof struct + Headers [][]BlockHeader + type ReadOnlyUTXOSetIterator interface + Close func() error + First func() bool + Get func() (outpoint *DomainOutpoint, utxoEntry UTXOEntry, err error) + Next func() bool + type ScriptPublicKey struct + Script []byte + Version uint16 + func NewScriptPublicKeyFromString(ScriptPublicKeyString string) *ScriptPublicKey + func (spk *ScriptPublicKey) Equal(other *ScriptPublicKey) bool + func (spk *ScriptPublicKey) String() string + type SelectedChainPath struct + Added []*DomainHash + Removed []*DomainHash + type SyncInfo struct + BlockCount uint64 + HeaderCount uint64 + func (si *SyncInfo) Clone() *SyncInfo + func (si *SyncInfo) Equal(other *SyncInfo) bool + type TransactionAcceptanceData struct + Fee uint64 + IsAccepted bool + Transaction *DomainTransaction + TransactionInputUTXOEntries []UTXOEntry + func (tad *TransactionAcceptanceData) Clone() *TransactionAcceptanceData + func (tad *TransactionAcceptanceData) Equal(other *TransactionAcceptanceData) bool + type TrustedDataDataDAAHeader struct + GHOSTDAGData *BlockGHOSTDAGData + Header BlockHeader + type UTXOCollection interface + Contains func(outpoint *DomainOutpoint) bool + Get func(outpoint *DomainOutpoint) (UTXOEntry, bool) + Iterator func() ReadOnlyUTXOSetIterator + Len func() int + type UTXODiff interface + CloneMutable func() MutableUTXODiff + DiffFrom func(other UTXODiff) (UTXODiff, error) + Reversed func() UTXODiff + ToAdd func() UTXOCollection + ToRemove func() UTXOCollection + WithDiff func(other UTXODiff) (UTXODiff, error) + type UTXOEntry interface + Amount func() uint64 + BlockDAAScore func() uint64 + Equal func(other UTXOEntry) bool + IsCoinbase func() bool + ScriptPublicKey func() *ScriptPublicKey + type VirtualChangeSet struct + VirtualDAAScore uint64 + VirtualParents []*DomainHash + VirtualSelectedParentBlueScore uint64 + VirtualSelectedParentChainChanges *SelectedChainPath + VirtualUTXODiff UTXODiff + type VirtualInfo struct + Bits uint32 + BlueScore uint64 + DAAScore uint64 + ParentHashes []*DomainHash + PastMedianTime int64