Documentation
¶
Index ¶
- Variables
- func CheckMerkleChain(leaf []byte, index uint32, merkleHashes [][]byte, merkleRoot []byte) error
- func KeysAndAddressFromHexString(s string, chainParams *chaincfg.Params) (*dcrsecp256k1.PrivateKey, *dcrsecp256k1.PublicKey, *btcutil.AddressPubKeyHash, ...)
- func MerkleRootFromBlockHeader(bh *BlockHeader) []byte
- func PrivKeyFromHexString(s string) (*dcrsecp256k1.PrivateKey, error)
- func SignTx(btx *wire.MsgTx, payToScript []byte, privateKey *dcrsecp256k1.PrivateKey, ...) error
- func ValidateMerkleRoot(txHashEncoded string, merkleProofEncoded []string, txIndex uint32, ...) error
- type BlockHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMerkle = errors.New("invalid merkle")
Functions ¶
func CheckMerkleChain ¶
func KeysAndAddressFromHexString ¶
func KeysAndAddressFromHexString(s string, chainParams *chaincfg.Params) (*dcrsecp256k1.PrivateKey, *dcrsecp256k1.PublicKey, *btcutil.AddressPubKeyHash, 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. |
Click to show internal directories.
Click to hide internal directories.