Class DelegatingAddressProvider
Wraps an existing IArkadeAddressProvider to override contract derivation for Receive and SendToSelf purposes, producing ArkDelegateContract instead of ArkPaymentContract. Boarding contracts pass through unchanged.
public class DelegatingAddressProvider : IArkadeAddressProvider
- Inheritance
-
DelegatingAddressProvider
- Implements
- Inherited Members
Constructors
DelegatingAddressProvider(IArkadeAddressProvider, OutputDescriptor, OutputDescriptor, Sequence, LockTime?)
Wraps an existing IArkadeAddressProvider to override contract derivation for Receive and SendToSelf purposes, producing ArkDelegateContract instead of ArkPaymentContract. Boarding contracts pass through unchanged.
public DelegatingAddressProvider(IArkadeAddressProvider inner, OutputDescriptor delegateKey, OutputDescriptor serverKey, Sequence exitDelay, LockTime? cltvLocktime = null)
Parameters
innerIArkadeAddressProviderdelegateKeyOutputDescriptorserverKeyOutputDescriptorexitDelaySequencecltvLocktimeLockTime?
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
purposeNextContractPurposePurpose of the contract
activityStateContractActivityStateActivity state for the contract
inputContractsArkContract[]Optional input contracts for descriptor recycling (SendToSelf only). When provided, HD wallets may reuse a descriptor from the inputs to avoid index bloat. Inputs the wallet is still advertising as an inbound destination are never recycled, because recycling deactivates the reused script: that covers contracts still in Active and those whose
Sourcemetadata starts withinvoice:.cancellationTokenCancellationTokenCancellation 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
cancellationTokenCancellationToken
Returns
IsOurs(OutputDescriptor, CancellationToken)
Returns true if the given descriptor belongs to this wallet.
public Task<bool> IsOurs(OutputDescriptor descriptor, CancellationToken cancellationToken = default)
Parameters
descriptorOutputDescriptorcancellationTokenCancellationToken