package
0.0.0-20191201205449-f379a713d0c2
Repository: https://github.com/rjected/lit.git
Documentation: pkg.go.dev
# Packages
Package base58 provides an API for working with modified base58 and Base58Check
encodings.
Package blockchain implements bitcoin block handling and chain selection rules.
No description provided by the author
Package chaincfg defines chain configuration parameters.
Package database provides a block and metadata storage database.
Package hdkeychain provides an API for bitcoin hierarchical deterministic
extended keys (BIP0032).
Package txscript implements the bitcoin transaction script language.
Package txsort provides the transaction sorting according to BIP 69.
# Functions
AppDataDir returns an operating system specific directory to be used for storing application data for an application.
DecodeAddress decodes the string encoding of an address and returns the Address if addr is a valid encoding for a known address type.
DecodeWIF creates a new WIF structure by decoding the string encoding of the import format.
Hash160 calculates the hash ripemd160(sha256(b)).
NewAddressPubKey returns a new AddressPubKey which represents a pay-to-pubkey address.
NewAddressPubKeyHash returns a new AddressPubKeyHash.
NewAddressScriptHash returns a new AddressScriptHash.
NewAddressScriptHashFromHash returns a new AddressScriptHash.
NewAmount creates an Amount from a floating point value representing some value in bitcoin.
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.
NewTLSCertPair returns a new PEM-encoded x.509 certificate pair based on a 521-bit ECDSA private key.
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.
NewWIF creates a new WIF structure to export an address and its private key as a string encoded in the Wallet Import Format.
# Constants
These constants define various units used when describing a bitcoin monetary amount.
These constants define various units used when describing a bitcoin monetary amount.
These constants define various units used when describing a bitcoin monetary amount.
These constants define various units used when describing a bitcoin monetary amount.
These constants define various units used when describing a bitcoin monetary amount.
These constants define various units used when describing a bitcoin monetary amount.
BlockHeightUnknown is the value returned for a block height that is unknown.
MaxSatoshi is the maximum transaction amount allowed in satoshi.
PKFCompressed indicates the pay-to-pubkey address format is a compressed public key.
PKFHybrid indicates the pay-to-pubkey address format is a hybrid public key.
PKFUncompressed indicates the pay-to-pubkey address format is an uncompressed public key.
SatoshiPerBitcent is the number of satoshi in one bitcoin cent.
SatoshiPerBitcoin is the number of satoshi in one bitcoin (1 BTC).
TxIndexUnknown is the value returned for a transaction index that is unknown.
# Variables
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.
ErrMalformedPrivateKey describes an error where a WIF-encoded private key cannot be decoded due to being improperly formatted.
ErrUnknownAddressType describes an error where an address can not decoded as a specific address type due to the string encoding beginning with an identifier byte unknown to any standard or registered (via coinparam.Register) network.
# Structs
AddressPubKey is an Address for a pay-to-pubkey 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.
Block defines a bitcoin block that provides easier and more efficient manipulation of raw blocks.
Tx defines a bitcoin transaction that provides easier and more efficient manipulation of raw transactions.
WIF contains the individual components described by the Wallet Import Format (WIF).
# Interfaces
Address is an interface type for any type of destination a transaction output may spend to.
# Type aliases
Amount represents the base bitcoin monetary unit (colloquially referred to as a `Satoshi').
AmountUnit describes a method of converting an Amount to something other than the base unit of a bitcoin.
OutOfRangeError describes an error due to accessing an element that is out of range.
PubKeyFormat describes what format to use for a pay-to-pubkey address.