Table of Contents

Class SettlementConfig

Namespace
NArk.Abstractions.Settlement
Assembly
NArk.Abstractions.dll

One settlement rule: when a wallet's available balance of SourceAsset reaches Threshold, sweep it to Destination.

public record SettlementConfig : IEquatable<SettlementConfig>
Inheritance
SettlementConfig
Implements
Inherited Members

Constructors

SettlementConfig(string, SettlementDestination, long, string, bool, long?)

One settlement rule: when a wallet's available balance of SourceAsset reaches Threshold, sweep it to Destination.

public SettlementConfig(string WalletId, SettlementDestination Destination, long Threshold, string SourceAsset = "BTC", bool Enabled = true, long? MaxAmount = null)

Parameters

WalletId string

The wallet this rule applies to.

Destination SettlementDestination

Where the settlement sends funds.

Threshold long

Balance at which the rule fires, in SourceAsset's atomic units — satoshis for BTC. The threshold gates when a settlement happens, not how much moves — a firing settlement sweeps the whole available balance of that asset (capped by MaxAmount). Zero fires as soon as anything is spendable.

SourceAsset string

What leaves the wallet, and what the threshold measures: Btc (the default) or the id of an Arkade-issued asset. BTC and assets are measured independently — an asset rule never fires on the wallet's satoshi balance, and a BTC rule never fires on the dust an asset carrier holds. Configure one rule per asset you settle.

Enabled bool

Set to false to keep the rule stored but inert.

MaxAmount long?

Upper bound on a single settlement, in SourceAsset's atomic units. Use it to stay under a rail's limit (a swap maximum, for example). null means unbounded.

Properties

Destination

Where the settlement sends funds.

public SettlementDestination Destination { get; init; }

Property Value

SettlementDestination

Enabled

Set to false to keep the rule stored but inert.

public bool Enabled { get; init; }

Property Value

bool

MaxAmount

Upper bound on a single settlement, in SourceAsset's atomic units. Use it to stay under a rail's limit (a swap maximum, for example). null means unbounded.

public long? MaxAmount { get; init; }

Property Value

long?

SourceAsset

What leaves the wallet, and what the threshold measures: Btc (the default) or the id of an Arkade-issued asset. BTC and assets are measured independently — an asset rule never fires on the wallet's satoshi balance, and a BTC rule never fires on the dust an asset carrier holds. Configure one rule per asset you settle.

public string SourceAsset { get; init; }

Property Value

string

Threshold

Balance at which the rule fires, in SourceAsset's atomic units — satoshis for BTC. The threshold gates when a settlement happens, not how much moves — a firing settlement sweeps the whole available balance of that asset (capped by MaxAmount). Zero fires as soon as anything is spendable.

public long Threshold { get; init; }

Property Value

long

WalletId

The wallet this rule applies to.

public string WalletId { get; init; }

Property Value

string