Table of Contents

Class ArkWalletInfo

Namespace
NArk.Abstractions.Wallets
Assembly
NArk.Abstractions.dll

Wallet information record used at the abstraction/interface boundary.

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

Constructors

ArkWalletInfo(string, string?, string?, WalletType, string?, int, IReadOnlyDictionary<string, string>?)

Wallet information record used at the abstraction/interface boundary.

public ArkWalletInfo(string Id, string? Secret, string? Destination, WalletType WalletType, string? AccountDescriptor, int LastUsedIndex, IReadOnlyDictionary<string, string>? Metadata = null)

Parameters

Id string

Wallet identifier.

Secret string

Local signing material, when present, interpreted according to WalletType: the nsec private key for SingleKey, the BIP-39 mnemonic for HD.

Null/empty means the wallet has no local key — it is either watch-only or remote-signed, distinguished at runtime by whether GetSignerAsync(string, CancellationToken) can produce a signer (e.g. via a registered IRemoteSignerTransport). Capability lives on the signer-provider boundary; it is not encoded in the data type.

Destination string

Destination address for swept funds.

WalletType WalletType

Key-derivation flavour — see WalletType.

AccountDescriptor string

For HD wallets: the account descriptor. For legacy: tr(pubkey).

LastUsedIndex int

For HD wallets: last used derivation index.

Metadata IReadOnlyDictionary<string, string>

Generic per-wallet key-value store (persisted as a JSON column). Used for per-wallet bookkeeping that doesn't warrant a dedicated column — e.g. "vtxo.lastFullPollAt" for the VTXO sync cursor. Use sparse-key updates via IWalletStorage.SetMetadataValue so concurrent writers for different concerns don't clobber each other.

Properties

AccountDescriptor

For HD wallets: the account descriptor. For legacy: tr(pubkey).

public string? AccountDescriptor { get; init; }

Property Value

string

Destination

Destination address for swept funds.

public string? Destination { get; init; }

Property Value

string

Id

Wallet identifier.

public string Id { get; init; }

Property Value

string

LastUsedIndex

For HD wallets: last used derivation index.

public int LastUsedIndex { get; init; }

Property Value

int

Metadata

Generic per-wallet key-value store (persisted as a JSON column). Used for per-wallet bookkeeping that doesn't warrant a dedicated column — e.g. "vtxo.lastFullPollAt" for the VTXO sync cursor. Use sparse-key updates via IWalletStorage.SetMetadataValue so concurrent writers for different concerns don't clobber each other.

public IReadOnlyDictionary<string, string>? Metadata { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Secret

Local signing material, when present, interpreted according to WalletType: the nsec private key for SingleKey, the BIP-39 mnemonic for HD.

Null/empty means the wallet has no local key — it is either watch-only or remote-signed, distinguished at runtime by whether GetSignerAsync(string, CancellationToken) can produce a signer (e.g. via a registered IRemoteSignerTransport). Capability lives on the signer-provider boundary; it is not encoded in the data type.

public string? Secret { get; init; }

Property Value

string

WalletType

Key-derivation flavour — see WalletType.

public WalletType WalletType { get; init; }

Property Value

WalletType