# README
bchutil
Bitcoin Cash Utilities
Contains the bitcoin cash signing algorithm and some protocol configuration. This package removes the need to use a fork of btcd when working with Bitcoin Cash.
# Packages
No description provided by the author
# Functions
*
* Concatenate two byte arrays.
CheckDecode decodes a string that was encoded with CheckEncode and verifies the checksum.
No description provided by the author
No description provided by the author
*
* Create a checksum.
DecodeAddress decodes the string encoding of an address and returns the Address if addr is a valid encoding for a known address type.
DecodeAddress decodes the string encoding of an address and returns the Address if addr is a valid encoding for a known address type.
*
* Decode a cashaddr string.
*
* Encode a cashaddr string.
*
* Expand the address prefix for the checksum computation.
ExtractPkScriptAddrs returns the type of script, addresses and required signatures associated with the passed PkScript.
No description provided by the author
*
* Convert to lower case.
NewAddressPubKeyHash returns a new AddressPubKeyHash.
NewAddressScriptHash returns a new AddressScriptHash.
NewAddressScriptHashFromHash returns a new AddressScriptHash.
NewBlock returns a new instance of a bitcoin block given an underlying wire.MsgBlock.
NewBlockFromBlockAndBytes returns a new instance of a bitcoin block given an underlying wire.MsgBlock and the serialized bytes for it.
NewBlockFromBytes returns a new instance of a bitcoin block given the serialized bytes.
NewBlockFromReader returns a new instance of a bitcoin block given a Reader to deserialize the block.
NewAddressPubKeyHash returns a new AddressPubKeyHash.
NewAddressScriptHash returns a new AddressScriptHash.
NewAddressScriptHashFromHash returns a new AddressScriptHash.
NewAddressPubKeyHash returns a new AddressPubKeyHash.
NewAddressScriptHash returns a new AddressScriptHash.
NewAddressScriptHashFromHash returns a new AddressScriptHash.
NewTx returns a new instance of a bitcoin transaction given an underlying wire.MsgTx.
NewTxFromBytes returns a new instance of a bitcoin transaction given the serialized bytes.
NewTxFromReader returns a new instance of a bitcoin transaction given a Reader to deserialize the transaction.
No description provided by the author
*
* This function will compute what 8 5-bit values to XOR into the last 8 input
* values, in order to make the checksum 0.
RawTxInSignature returns the serialized ECDSA signature for the input idx of the given transaction, with hashType appended to it.
No description provided by the author
No description provided by the author
*
* Verify a checksum.
# Constants
BlockHeightUnknown is the value returned for a block height that is unknown.
*
* The cashaddr character set for encoding.
MainNet represents the main bitcoin network.
No description provided by the author
No description provided by the author
Regtest represents the regression test network.
Node_BitcoinCash service bit.
No description provided by the author
Testnet represents the test network (version 3).
TxIndexUnknown is the value returned for a transaction index that is unknown.
# Variables
*
* The cashaddr character set for decoding.
ErrAddressCollision describes an error where an address can not be uniquely determined as either a pay-to-pubkey-hash or pay-to-script-hash address since the leading identifier is used for describing both address kinds, but for different networks.
ErrChecksumMismatch describes an error where decoding failed due to a bad checksum.
ErrInvalidFormat describes an error where decoding failed due to invalid version.
ErrUnknownAddressType describes an error where an address can not decoded as a specific address type due to the string encoding begining with an identifier byte unknown to any standard or registered (via chaincfg.Register) network.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AddressPubKeyHash is an Address for a pay-to-pubkey-hash (P2PKH) transaction.
AddressScriptHash is an Address for a pay-to-script-hash (P2SH) transaction.
Block defines a bitcoin block that provides easier and more efficient manipulation of raw blocks.
AddressPubKeyHash is an Address for a pay-to-pubkey-hash (P2PKH) transaction.
AddressScriptHash is an Address for a pay-to-script-hash (P2SH) transaction.
AddressPubKeyHash is an Address for a pay-to-pubkey-hash (P2PKH) transaction.
AddressScriptHash is an Address for a pay-to-script-hash (P2SH) transaction.
Tx defines a bitcoin transaction that provides easier and more efficient manipulation of raw transactions.
# Type aliases
No description provided by the author
OutOfRangeError describes an error due to accessing an element that is out of range.
UnsupportedWitnessProgLenError describes an error where a segwit address being decoded has an unsupported witness program length.
UnsupportedWitnessVerError describes an error where a segwit address being decoded has an unsupported witness version.