Table of Contents

Class DefaultWalletProvider

Namespace
NArk.Core.Wallet
Assembly
NArk.Core.dll

Default implementation of IWalletProvider.

Signing capability is answered by asking — never by tagging the wallet: GetSignerAsync(string, CancellationToken) returns a local signer when Secret is present, a remote-signer proxy when an IRemoteSignerTransport is registered and claims the wallet, and null otherwise (watch-only). Address derivation always works from AccountDescriptor alone, regardless of signer availability.

public class DefaultWalletProvider : IWalletProvider
Inheritance
DefaultWalletProvider
Implements
Inherited Members

Constructors

DefaultWalletProvider(IClientTransport, ISafetyService, IWalletStorage, IContractStorage, ILogger<DefaultWalletProvider>?, IRemoteSignerTransport?)

Default implementation of IWalletProvider.

Signing capability is answered by asking — never by tagging the wallet: GetSignerAsync(string, CancellationToken) returns a local signer when Secret is present, a remote-signer proxy when an IRemoteSignerTransport is registered and claims the wallet, and null otherwise (watch-only). Address derivation always works from AccountDescriptor alone, regardless of signer availability.

public DefaultWalletProvider(IClientTransport clientTransport, ISafetyService safetyService, IWalletStorage walletStorage, IContractStorage contractStorage, ILogger<DefaultWalletProvider>? logger = null, IRemoteSignerTransport? remoteSignerTransport = null)

Parameters

clientTransport IClientTransport
safetyService ISafetyService
walletStorage IWalletStorage
contractStorage IContractStorage
logger ILogger<DefaultWalletProvider>
remoteSignerTransport IRemoteSignerTransport

Methods

GetAddressProviderAsync(string, CancellationToken)

Returns the address provider for the wallet, or null if none is registered.

public Task<IArkadeAddressProvider?> GetAddressProviderAsync(string identifier, CancellationToken cancellationToken = default)

Parameters

identifier string
cancellationToken CancellationToken

Returns

Task<IArkadeAddressProvider>

GetSignerAsync(string, CancellationToken)

Returns the signer for the wallet, or null if the wallet is watch-only.

public Task<IArkadeWalletSigner?> GetSignerAsync(string identifier, CancellationToken cancellationToken = default)

Parameters

identifier string
cancellationToken CancellationToken

Returns

Task<IArkadeWalletSigner>