Table of Contents

Class ArkadeIntentPolicy

Namespace
NArk.ArkadeIntents.Services
Assembly
NArk.ArkadeIntents.dll

Decides the next move for a swap from its kind and status alone.

public static class ArkadeIntentPolicy
Inheritance
ArkadeIntentPolicy
Inherited Members

Remarks

Kept as a pure function so the decision is testable at its exact boundary, the same way the corridors' funding gates are. It answers only one question — "would a caller with no further information be right to act now?" — and the bar for yes is deliberately high.

The line it draws is between a consequence and a decision. Claiming a funded receive swap and refunding a send swap past its locktime are consequences: the money is already ours, the window is finite, and nobody else is coming to do it. Cancelling a pending asset swap is a decision — it is still waiting to be filled, which is exactly what was asked for, and an automation that cancelled it would destroy the thing it was meant to look after.

Methods

NextAction(ArkadeSwapIntent)

The action this swap calls for right now.

public static ArkadeIntentAction NextAction(ArkadeSwapIntent intent)

Parameters

intent ArkadeSwapIntent

The swap.

Returns

ArkadeIntentAction

What to do, or None.