blkbuilder

package
v0.0.0-...-5ed304f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerializeBitcoinBlock

func SerializeBitcoinBlock(header []byte, txHexes [][]byte) ([]byte, error)

func SerializeBitcoinBlockHeader

func SerializeBitcoinBlockHeader(
	nonce, nTime, version uint32,
	bits, prevHash string,
	txHashes [][]byte,
) ([]byte, []byte, error)

func SerializeKaspaBlockHeader

func SerializeKaspaBlockHeader(
	version uint16,
	parents [][]string,
	hashMerkleRoot, acceptedIDMerkleRoot, utxoCommitment string,
	timestamp int64,
	bits uint32,
	nonce, daaScore, blueScore uint64,
	blueWork, pruningPoint string,
) ([]byte, error)

Types

type EquihashBuilder

type EquihashBuilder struct {
	// contains filtered or unexported fields
}

func NewEquihashBuilder

func NewEquihashBuilder(
	version, nTime uint32,
	bits, prevHash, saplingRoot string,
	txHashes, txHexes [][]byte,
) (*EquihashBuilder, error)

func (*EquihashBuilder) PartialJob

func (b *EquihashBuilder) PartialJob() []interface{}

func (*EquihashBuilder) SerializeBlock

func (b *EquihashBuilder) SerializeBlock(work *types.StratumWork) ([]byte, error)

func (*EquihashBuilder) SerializeHeader

func (b *EquihashBuilder) SerializeHeader(work *types.StratumWork) ([]byte, []byte, error)

type ProgPowBuilder

type ProgPowBuilder struct {
	// contains filtered or unexported fields
}

func NewProgPowBuilder

func NewProgPowBuilder(
	version, nTime, height uint32,
	bits, prevHash string,
	txHashes, txHexes [][]byte,
) (*ProgPowBuilder, error)

func (*ProgPowBuilder) PartialJob

func (b *ProgPowBuilder) PartialJob() []interface{}

func (*ProgPowBuilder) SerializeBlock

func (b *ProgPowBuilder) SerializeBlock(work *types.StratumWork) ([]byte, error)

func (*ProgPowBuilder) SerializeHeader

func (b *ProgPowBuilder) SerializeHeader(work *types.StratumWork) ([]byte, []byte, error)

Jump to

Keyboard shortcuts

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