bcnutil

package
v0.0.0-...-1c6a2bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatBytecoin    = Format(0)
	FormatElectroneum = Format(1)
)

Variables

This section is empty.

Functions

func BinRootBlockPoWHashingData

func BinRootBlockPoWHashingData(root bytecoin.BinRootBlock) (data []byte, err error)

func BlockHash

func BlockHash(tmpl bytecoin.BinBlockTemplate, format Format) (hash bytecoin.Hash, err error)

func BlockHeaderPreHash

func BlockHeaderPreHash(tmpl bytecoin.BinBlockTemplate) (hash bytecoin.Hash, err error)

func BlockPoWHashingData

func BlockPoWHashingData(tmpl bytecoin.BinBlockTemplate, format Format) (data []byte, err error)

func BlockTemplateToRootBlock

func BlockTemplateToRootBlock(tmpl bytecoin.BinBlockTemplate, format Format) bytecoin.BinRootBlock

func CoinbaseTreeBranch

func CoinbaseTreeBranch(hashes []bytecoin.Hash) []bytecoin.Hash

func CoinbaseTreeDepth

func CoinbaseTreeDepth(count int) int

func ExtraExtraNonce

func ExtraExtraNonce(extraNonce []byte) []byte

func ExtraMergeMiningTag

func ExtraMergeMiningTag(mmRoot bytecoin.Hash, mmDepth byte) []byte

func FastHash

func FastHash(blobs ...[]byte) bytecoin.Hash

func FillMergeMiningBranches

func FillMergeMiningBranches(items []MergeMiningItem) bytecoin.Hash

func MarshalBlockTemplate

func MarshalBlockTemplate(tmpl bytecoin.BinBlockTemplate, format Format) (data []byte, err error)

func TreeHash

func TreeHash(hashes []bytecoin.Hash) bytecoin.Hash

func TreeHashFromBranch

func TreeHashFromBranch(branch []bytecoin.Hash, depth int, leaf bytecoin.Hash, path bytecoin.Hash) bytecoin.Hash

func UnmarshalBlockTemplate

func UnmarshalBlockTemplate(blob []byte, format Format) (tmpl bytecoin.BinBlockTemplate, err error)

func VerifyAddress

func VerifyAddress(addr string, tags ...uint64) error

Types

type BinBlockBodyProxy

type BinBlockBodyProxy struct {
	TransactionsMerkleRoot bytecoin.Hash
	TransactionCount       int
}

type ExtraFields

type ExtraFields struct {
	Padding           int
	PublicKey         *bytecoin.PublicKey
	PaymentId         *bytecoin.Hash
	ExtraNonce        bytecoin.HexBlob
	ExtraNonceText    string
	MMRoot            *bytecoin.Hash
	MMDepth           int
	BlockCapacityVote *uint64
	EncryptedMessages []ExtraMessage
	SplitExtra        []bytecoin.HexBlob
}

func ParseExtra

func ParseExtra(extra []byte) ExtraFields

type ExtraMessage

type ExtraMessage struct {
	Output  bytecoin.BinTransactionOutput
	Message bytecoin.HexBlob
}

type Format

type Format int

type MergeMiningItem

type MergeMiningItem struct {
	Leaf   bytecoin.Hash
	Path   bytecoin.Hash
	Branch []bytecoin.Hash
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL