Table of Contents

Class BoardingUtxoDiscoveryProvider

Namespace
NArk.Core.Recovery
Assembly
NArk.Core.dll

Discovery provider that asks the on-chain side (NBXplorer / Esplora, abstracted by IBitcoinBlockchain) whether the ArkBoardingContract derived from a given HD index ever received a UTXO. Boarding contracts are one-shot funding entry points onto the Ark — a historical hit at any index is unambiguous evidence of usage.

public class BoardingUtxoDiscoveryProvider : IContractDiscoveryProvider
Inheritance
BoardingUtxoDiscoveryProvider
Implements
Inherited Members

Remarks

IBitcoinBlockchain is optional in the SDK (the plugin provides one via NBXplorer). When no implementation is registered this provider is also not registered, so HD recovery still works without on-chain probing — just without boarding-address detection.

Constructors

BoardingUtxoDiscoveryProvider(IBitcoinBlockchain, IClientTransport, ILogger<BoardingUtxoDiscoveryProvider>?)

Discovery provider that asks the on-chain side (NBXplorer / Esplora, abstracted by IBitcoinBlockchain) whether the ArkBoardingContract derived from a given HD index ever received a UTXO. Boarding contracts are one-shot funding entry points onto the Ark — a historical hit at any index is unambiguous evidence of usage.

public BoardingUtxoDiscoveryProvider(IBitcoinBlockchain utxoProvider, IClientTransport clientTransport, ILogger<BoardingUtxoDiscoveryProvider>? logger = null)

Parameters

utxoProvider IBitcoinBlockchain
clientTransport IClientTransport
logger ILogger<BoardingUtxoDiscoveryProvider>

Remarks

IBitcoinBlockchain is optional in the SDK (the plugin provides one via NBXplorer). When no implementation is registered this provider is also not registered, so HD recovery still works without on-chain probing — just without boarding-address detection.

Properties

Name

Short identifier used in log lines and the recovery report (e.g. "indexer", "boarding").

public string Name { get; }

Property Value

string

Methods

DiscoverAsync(ArkWalletInfo, OutputDescriptor, int, CancellationToken)

Probe whether any contract derivable from userDescriptor at index has ever been used.

public Task<DiscoveryResult> DiscoverAsync(ArkWalletInfo wallet, OutputDescriptor userDescriptor, int index, CancellationToken cancellationToken = default)

Parameters

wallet ArkWalletInfo

The HD wallet being recovered.

userDescriptor OutputDescriptor

The output descriptor at the given index — concrete (no remaining /*), already derived from wallet.AccountDescriptor.

index int

The derivation index being probed.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<DiscoveryResult>

A DiscoveryResult describing whether the index was used and, if so, the reconstructed contracts to persist.