Documentation
¶
Index ¶
- Constants
- func NewAddressFromPubKeyStr(netParam *chaincfg.Params, pubKeyHex string, addressType AddressType) (string, error)
- func NewAddressWithPubKey(netParam *chaincfg.Params, pubKey *btcec.PublicKey, compressed bool, ...) (btcutil.Address, error)
- type AddressType
- type FileHeader
- type Mempool
- type MempoolEntry
Constants ¶
const ( // Leave XOR-key empty MEMPOOL_DUMP_VERSION_NO_XOR_KEY = 1 MEMPOOL_DUMP_VERSION = 2 )
Variables ¶
This section is empty.
Functions ¶
func NewAddressFromPubKeyStr ¶
func NewAddressWithPubKey ¶
func NewAddressWithPubKey(netParam *chaincfg.Params, pubKey *btcec.PublicKey, compressed bool, addrType AddressType) (btcutil.Address, error)
NewAddressWithPubKey returns a new address based on the passed account, public key, and whether or not the public key should be compressed.
Types ¶
type AddressType ¶
type AddressType uint8
AddressType represents the various address types waddrmgr is currently able to generate, and maintain.
NOTE: These MUST be stable as they're used for scope address schema recognition within the database.
const ( // PubKeyHash is a regular p2pkh address. PubKeyHash AddressType = iota // Script reprints a raw script address. Script // RawPubKey is just raw public key to be used within scripts, This // type indicates that a scoped manager with this address type // shouldn't be consulted during historical rescans. RawPubKey // NestedWitnessPubKey represents a p2wkh output nested within a p2sh // output. Using this address type, the wallet can receive funds from // other wallet's which don't yet recognize the new segwit standard // output types. Receiving funds to this address maintains the // scalability, and malleability fixes due to segwit in a backwards // compatible manner. NestedWitnessPubKey // WitnessPubKey represents a p2wkh (pay-to-witness-key-hash) address // type. WitnessPubKey // WitnessScript represents a p2wsh (pay-to-witness-script-hash) address // type. WitnessScript // TaprootPubKey represents a p2tr (pay-to-taproot) address type that // uses BIP-0086 (for the derivation path and for calculating the tap // root hash/tweak). TaprootPubKey // TaprootScript represents a p2tr (pay-to-taproot) address type that // commits to a script and not just a single key. TaprootScript )
type FileHeader ¶
type FileHeader struct {
// contains filtered or unexported fields
}
FileHeader represents the mempool file header
func (FileHeader) GetTxCount ¶
func (header FileHeader) GetTxCount() int64
GetTxCount returns the number of transactions in the corresponding file
func (FileHeader) GetVersion ¶
func (header FileHeader) GetVersion() int64
GetVersion returns the mempool file version
func (FileHeader) String ¶
func (header FileHeader) String() string
returns the version and the number of transactions in the file
type Mempool ¶
type Mempool struct {
// contains filtered or unexported fields
}
Mempool represents a parsed mempool.dat file
func ReadMempoolFromPath ¶
ReadMempoolFromPath reads a mempool file from a given path and returns a Mempool type
func (Mempool) GetFileHeader ¶
func (mempool Mempool) GetFileHeader() FileHeader
GetFileHeader returns a the mempool file header
func (Mempool) GetMapDeltas ¶
GetMapDeltas returns a byte slice of not parsed mapDelta entries
func (Mempool) GetMempoolEntries ¶
func (mempool Mempool) GetMempoolEntries() []MempoolEntry
GetMempoolEntries returns a slice with mempool entries
type MempoolEntry ¶
type MempoolEntry struct {
// contains filtered or unexported fields
}
MempoolEntry represents a mempool entry
func (MempoolEntry) GetFeeDelta ¶
func (entry MempoolEntry) GetFeeDelta() int64
GetFeeDelta returns feeDelta of the entry
func (MempoolEntry) GetFirstSeen ¶
func (entry MempoolEntry) GetFirstSeen() int64
GetFirstSeen returns the firstSeen time of the entry as timestamp
func (MempoolEntry) Info ¶
func (entry MempoolEntry) Info() string
Info returns a string with information for a given MempoolEntry
func (MempoolEntry) IsSegWit ¶
func (entry MempoolEntry) IsSegWit() bool
func (MempoolEntry) String ¶
func (entry MempoolEntry) String() string
returns the transaction hash of the entry
func (MempoolEntry) Tx ¶
func (entry MempoolEntry) Tx() *wire.MsgTx