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
WalletIdstringThe wallet this rule applies to.
DestinationSettlementDestinationWhere the settlement sends funds.
ThresholdlongBalance 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 byMaxAmount). Zero fires as soon as anything is spendable.SourceAssetstringWhat 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.
EnabledboolSet to false to keep the rule stored but inert.
MaxAmountlong?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
Enabled
Set to false to keep the rule stored but inert.
public bool Enabled { get; init; }
Property Value
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
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
WalletId
The wallet this rule applies to.
public string WalletId { get; init; }