Table of Contents

Class SingleKeyAddressProvider

Namespace
NArk.Core.Wallet
Assembly
NArk.Core.dll
public class SingleKeyAddressProvider : IArkadeAddressProvider
Inheritance
SingleKeyAddressProvider
Implements
Inherited Members

Constructors

SingleKeyAddressProvider(IClientTransport, ArkWalletInfo, Network, ILogger?)

public SingleKeyAddressProvider(IClientTransport transport, ArkWalletInfo wallet, Network network, ILogger? logger = null)

Parameters

transport IClientTransport
wallet ArkWalletInfo
network Network
logger ILogger

Properties

Descriptor

public OutputDescriptor Descriptor { get; }

Property Value

OutputDescriptor

Methods

GetNextContract(NextContractPurpose, ContractActivityState, ArkContract[]?, CancellationToken)

Gets the next contract for the specified purpose.

public Task<(ArkContract contract, ArkContractEntity entity)> GetNextContract(NextContractPurpose purpose, ContractActivityState activityState, ArkContract[]? inputContracts = null, CancellationToken cancellationToken = default)

Parameters

purpose NextContractPurpose

Purpose of the contract

activityState ContractActivityState

Activity state for the contract

inputContracts ArkContract[]

Optional input contracts for descriptor recycling (SendToSelf only). When provided, HD wallets may reuse a descriptor from the inputs to avoid index bloat.

cancellationToken CancellationToken

Cancellation token

Returns

Task<(ArkContract contract, ArkContractEntity entity)>

A tuple of (contract, entity). The entity's activity state may be overridden for special cases (e.g., static sweep addresses).

GetNextSigningDescriptor(CancellationToken)

Returns the next unused signing descriptor without persisting a contract or advancing the gap counter.

public Task<OutputDescriptor> GetNextSigningDescriptor(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<OutputDescriptor>

IsOurs(OutputDescriptor, CancellationToken)

Returns true if the given descriptor belongs to this wallet.

public Task<bool> IsOurs(OutputDescriptor descriptor, CancellationToken cancellationToken = default)

Parameters

descriptor OutputDescriptor
cancellationToken CancellationToken

Returns

Task<bool>