Interface CbfBuilderInterface
-
- All Implemented Interfaces:
public interface CbfBuilderInterfaceBuild a BIP 157/158 light client to fetch transactions for a
Wallet.Options:
List of
Peer: Bitcoin full-nodes for the light client to connect to. May be empty.connections: The number of connections for the light client to maintain.scan_type: Sync, recover, or start a new wallet. For more information see `ScanType`.data_dir: Optional directory to store block headers and peers.
A note on recovering wallets. Developers should allow users to provide an approximate recovery height and an estimated number of transactions for the wallet. When determining how many scripts to check filters for, the
Walletlookaheadvalue will be used. To ensure all transactions are recovered, thelookaheadshould be roughly the number of transactions in the wallet history.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCbfBuilderInterface.Companion
-
Method Summary
Modifier and Type Method Description abstract CbfComponentsbuild(Wallet wallet)Construct a `CbfComponents` for a `Wallet`. abstract CbfBuilderconnections(UByte connections)The number of connections for the light client to maintain. abstract CbfBuilderdataDir(String dataDir)Directory to store block headers and peers. abstract CbfBuilderdnsResolver(IpAddress dnsResolver)Configure a custom DNS resolver when querying DNS seeds. abstract CbfBuilderlogLevel(LogLevel logLevel)Set the log level for the node. abstract CbfBuilderpeers(List<Peer> peers)Bitcoin full-nodes to attempt a connection with. abstract CbfBuilderscanType(ScanType scanType)Select between syncing, recovering, or scanning for new wallets. -
-
Method Detail
-
build
abstract CbfComponents build(Wallet wallet)
Construct a `CbfComponents` for a `Wallet`.
-
connections
abstract CbfBuilder connections(UByte connections)
The number of connections for the light client to maintain. Default is two.
-
dataDir
abstract CbfBuilder dataDir(String dataDir)
Directory to store block headers and peers. If none is provided, the current working directory will be used.
-
dnsResolver
abstract CbfBuilder dnsResolver(IpAddress dnsResolver)
Configure a custom DNS resolver when querying DNS seeds. Default is
1.1.1.1managed by CloudFlare.
-
logLevel
abstract CbfBuilder logLevel(LogLevel logLevel)
Set the log level for the node. Production applications may want to omit
Debugmessages to avoid heap allocations.
-
peers
abstract CbfBuilder peers(List<Peer> peers)
Bitcoin full-nodes to attempt a connection with.
-
scanType
abstract CbfBuilder scanType(ScanType scanType)
Select between syncing, recovering, or scanning for new wallets.
-
-
-
-