Class DelegationService
Orchestrates VTXO delegation to an external delegator service (e.g. Fulmine). The client creates a partially signed intent and forfeit transactions, then sends them to the delegator which registers the intent and participates in batches on the owner's behalf before VTXOs expire.
public class DelegationService
- Inheritance
-
DelegationService
- Inherited Members
Constructors
DelegationService(IEnumerable<IDelegationTransformer>, IDelegatorProvider, ILogger<DelegationService>?)
Orchestrates VTXO delegation to an external delegator service (e.g. Fulmine). The client creates a partially signed intent and forfeit transactions, then sends them to the delegator which registers the intent and participates in batches on the owner's behalf before VTXOs expire.
public DelegationService(IEnumerable<IDelegationTransformer> transformers, IDelegatorProvider delegatorProvider, ILogger<DelegationService>? logger = null)
Parameters
transformersIEnumerable<IDelegationTransformer>delegatorProviderIDelegatorProviderloggerILogger<DelegationService>
Properties
Transformers
Returns the registered delegation transformers for checking contract eligibility.
public IEnumerable<IDelegationTransformer> Transformers { get; }
Property Value
Methods
DelegateAsync(string, string, string[], bool, CancellationToken)
Delegates the refresh of VTXOs by sending a partially signed intent and forfeit transactions to the delegator service. The delegator will register the intent and join batches on behalf of the owner when the VTXOs approach expiration.
public Task DelegateAsync(string intentMessage, string intentProof, string[] forfeitTxs, bool rejectReplace = false, CancellationToken cancellationToken = default)
Parameters
intentMessagestringThe intent message in plain-text (stringified JSON).
intentProofstringThe intent proof tx (PSBT in base64 format).
forfeitTxsstring[]Partially signed forfeit transactions.
rejectReplaceboolIf true, the delegator will not replace an existing delegation that includes at least one VTXO from this request.
cancellationTokenCancellationTokenCancellation token.
Returns
GetDelegatorInfoAsync(CancellationToken)
Returns information about the delegator service including its public key. Use the pubkey when constructing ArkDelegateContract scripts.
public Task<DelegatorInfo> GetDelegatorInfoAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken