bitcoin

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMerkle = errors.New("invalid merkle")

Functions

func CheckMerkleChain

func CheckMerkleChain(leaf []byte, index uint32, merkleHashes [][]byte, merkleRoot []byte) error

func MerkleRootFromBlockHeader

func MerkleRootFromBlockHeader(bh *BlockHeader) []byte

func PrivKeyFromHexString

func PrivKeyFromHexString(s string) (*dcrsecp256k1.PrivateKey, error)

func SignTx

func SignTx(btx *wire.MsgTx, payToScript []byte, privateKey *dcrsecp256k1.PrivateKey, publicKey *dcrsecp256k1.PublicKey) error

func ValidateMerkleRoot

func ValidateMerkleRoot(txHashEncoded string, merkleProofEncoded []string, txIndex uint32, merkleRootEncoded string) error

ValidateMerkleRoot accepts encoded hashes of the hashes in question, i.e. the tx hash, merkle proof steps, and merkle root. and the index of the transaction. returns nil if the merkle proof is valid

Types

type BlockHeader

type BlockHeader [80]byte

func RawBlockHeaderFromSlice

func RawBlockHeaderFromSlice(s []byte) (*BlockHeader, error)

func (*BlockHeader) String

func (bh *BlockHeader) String() string

Directories

Path Synopsis
gozer
Package gozer provides an interface for accessing Bitcoin data.
Package gozer provides an interface for accessing Bitcoin data.
gozer/blockstream
Package blockstream implements gozer.Gozer and retrieves Bitcoin data from Blockstream (https://blockstream.info/).
Package blockstream implements gozer.Gozer and retrieves Bitcoin data from Blockstream (https://blockstream.info/).
gozer/tbcgozer
Package tbcgozer provides an implementation of gozer.Gozer which receives Bitcoin data from a TBC server over RPC.
Package tbcgozer provides an implementation of gozer.Gozer which receives Bitcoin data from a TBC server over RPC.
vinzclortho
Package vinzclortho handles creation and deriviation of Bitcoin addresses.
Package vinzclortho handles creation and deriviation of Bitcoin addresses.
zuul
Package zuul provides an interface for handling the storage of secret material.
Package zuul provides an interface for handling the storage of secret material.
zuul/memory
Package memory provides an in-memory implementation of zuul.Zuul.
Package memory provides an in-memory implementation of zuul.Zuul.

Jump to

Keyboard shortcuts

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