Class SettlementDestination
- Namespace
- NArk.Abstractions.Settlement
- Assembly
- NArk.Abstractions.dll
Where a settlement moves funds to: a network, an asset on that network, and an address on it.
Network and asset are free-form strings rather than enums on purpose — an application can settle to a network the SDK has never heard of (a stablecoin chain, an exchange deposit rail) by registering its own ISettlementService for it, with no change to the SDK.
public record SettlementDestination : IEquatable<SettlementDestination>
- Inheritance
-
SettlementDestination
- Implements
- Inherited Members
Constructors
SettlementDestination(string, string, string?)
Where a settlement moves funds to: a network, an asset on that network, and an address on it.
Network and asset are free-form strings rather than enums on purpose — an application can settle to a network the SDK has never heard of (a stablecoin chain, an exchange deposit rail) by registering its own ISettlementService for it, with no change to the SDK.
public SettlementDestination(string Network, string Asset, string? Address)
Parameters
NetworkstringNetwork identifier, compared case-insensitively. See SettlementNetworks.
AssetstringAsset identifier on that network, compared case-insensitively. See SettlementAssets.
AddressstringDestination address. null means "back to the settling wallet itself", which only the Arkade network supports.
Properties
Address
Destination address. null means "back to the settling wallet itself", which only the Arkade network supports.
public string? Address { get; init; }
Property Value
Asset
Asset identifier on that network, compared case-insensitively. See SettlementAssets.
public string Asset { get; init; }
Property Value
Network
Network identifier, compared case-insensitively. See SettlementNetworks.
public string Network { get; init; }
Property Value
Methods
Ark(string)
An Arkade address (ark1… / tark1…) receiving BTC.
public static SettlementDestination Ark(string address)
Parameters
addressstring
Returns
ArkAsset(string, string)
An Arkade address receiving an Arkade-issued asset.
public static SettlementDestination ArkAsset(string address, string assetId)
Parameters
addressstringArkade address of the recipient.
assetIdstringIdentifier of the Arkade-issued asset.
Returns
ArkSelf()
The settling wallet itself: funds are consolidated into a freshly derived Arkade address owned by the same wallet.
public static SettlementDestination ArkSelf()
Returns
BitcoinOnchain(string)
An on-chain Bitcoin address receiving BTC.
public static SettlementDestination BitcoinOnchain(string address)
Parameters
addressstring
Returns
Is(string, string)
True when this destination is asset on network, ignoring case.
public bool Is(string network, string asset)
Parameters
Returns
IsAsset(string)
True when this destination's asset is asset, ignoring case.
public bool IsAsset(string asset)
Parameters
assetstring
Returns
IsNetwork(string)
True when this destination is on network, ignoring case.
public bool IsNetwork(string network)
Parameters
networkstring