chain

package
v1.24.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressLookup

type AddressLookup interface {
	// AddressHasTransactions returns true if the address has any confirmed or
	// unconfirmed transaction history.
	AddressHasTransactions(ctx context.Context, address string) (bool, error)
	// GetTransactionHex returns the raw hex of a confirmed or unconfirmed transaction.
	GetTransactionHex(ctx context.Context, txId string) (string, error)
	Close()
}

AddressLookup queries onchain data from the configured chain source.

func NewAddressLookup

func NewAddressLookup(ctx context.Context, cfg config.Config) (AddressLookup, error)

NewAddressLookup returns an AddressLookup backed by the same chain source LDK uses: esplora if LDK_ESPLORA_SERVER is set, otherwise electrum. Bitcoind has no address index, so bitcoind users also fall back to electrum.

Jump to

Keyboard shortcuts

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