Table of Contents

Class ArkadeSwapIntent

Namespace
NArk.ArkadeIntents.Models
Assembly
NArk.ArkadeIntents.dll
public class ArkadeSwapIntent
Inheritance
ArkadeSwapIntent
Inherited Members
Extension Methods

Properties

CreatedAt

public required DateTimeOffset CreatedAt { get; set; }

Property Value

DateTimeOffset

FromAssetId

Asset id deposited ("btc" for BTC).

public string? FromAssetId { get; set; }

Property Value

string

Id

Identity — the funding txid for an asset swap, the RFQ correlation id for a Lightning one.

public required string Id { get; set; }

Property Value

string

Metadata

Everything this swap keeps that only its own corridor understands — the offer TLV of an asset swap, the BOLT11 of a Lightning one, the L1 HTLC's terms on an off-board.

public Dictionary<string, string> Metadata { get; set; }

Property Value

Dictionary<string, string>

Remarks

A blob rather than a column each, because a column each makes the table a union of every corridor that has ever existed: eight nullable fields of which any one row uses three, and a schema migration every time a corridor is added. Read and write it through the typed views in ArkadeSwapIntentMetadataExtensions rather than by key, so a corridor's shape is stated once instead of at each call site.

OfferAmount

public required Money OfferAmount { get; set; }

Property Value

Money

PaymentHash

The invoice's payment hash (hex) — the natural key a solver dedupes a negotiation on.

public string? PaymentHash { get; set; }

Property Value

string

RefundLocktime

Unix seconds at which the covenant refund path opens (BtcToLightning only). The monitor needs it to tell a spend that can only be a fill from one that might be a refund.

public long? RefundLocktime { get; set; }

Property Value

long?

SpentTxid

The ark tx that fulfilled the swap (spent the covenant VTXO); set once Fulfilled.

public string? SpentTxid { get; set; }

Property Value

string

Status

public required ArkadeSwapIntentStatus Status { get; set; }

Property Value

ArkadeSwapIntentStatus

SwapAddress

The swap covenant's Arkade address (the funding target).

public required string SwapAddress { get; set; }

Property Value

string

SwapPkScript

Hex pkScript of the swap covenant contract — the key the monitor watches. VTXO changes on this script drive the intent's status (see ArkadeSwapIntentMonitoringService).

public required string SwapPkScript { get; set; }

Property Value

string

ToAssetId

Asset id received.

public string? ToAssetId { get; set; }

Property Value

string

Type

public required ArkadeSwapIntentType Type { get; set; }

Property Value

ArkadeSwapIntentType

WalletId

The wallet that owns this swap.

public required string WalletId { get; set; }

Property Value

string

WantAmount

public required Money WantAmount { get; set; }

Property Value

Money