ResearchCave Technology

ResearchCave.Wallet.Client (1.0.0)

Published 2026-10-12 19:37:19 +03:00 by admin

Installation

dotnet nuget add source --name ResearchCave --username your_username --password your_token https://git.researchcave.com/api/packages/ResearchCave/nuget/index.json
dotnet add package --source ResearchCave --version 1.0.0 ResearchCave.Wallet.Client

About this package

Typed service client for ResearchCave Wallet assets and reward-backed reservations.

ResearchCave.Wallet.Client

Typed service client for ResearchCave Wallet.

builder.Services.AddResearchCaveWalletClient(builder.Configuration);

Configuration:

{
  "Services": {
    "Wallet": {
      "BaseUrl": "https+http://researchcave-wallet",
      "PublicBaseUrl": "https://wallet.researchcave.com",
      "UseServiceAuthentication": true,
      "Scope": "wallet.rewards",
      "TimeoutSeconds": 15,
      "CurrencyCacheSeconds": 30
    }
  }
}

BaseUrl is used for server-to-server calls. PublicBaseUrl converts Wallet-owned relative asset image paths, such as /img/coin/tbt.svg, into URLs that browser-facing consumers can use.

GetCurrenciesAsync reads the public Wallet currency catalog without a service token. The client caches successful responses in process for CurrencyCacheSeconds (1–300 seconds) and merges concurrent cache misses into one request. The API also caches its database snapshot for 30 seconds and clears that snapshot when an admin changes a currency.

GetAvailableAssetsAsync returns the canonical asset code, gateway asset identifier, symbol, display name, decimals, active state, icon filename, Wallet-hosted icon URL, chain, and Wallet-managed display Priority. Results are ordered by descending priority and then asset code, so consuming services should preserve the returned order. Consumers should use AssetCode when creating Wallet operations, Symbol and Name for display, and Decimals to validate amounts.

IsReadyAsync probes Wallet's unauthenticated /health readiness endpoint. A non-success response returns false; connection and timeout failures remain exceptions so callers can log the dependency failure.

When service authentication is enabled, the client obtains a client-credentials token from oidc:Authority using oidc:ClientId and oidc:ClientSecret.

Dependencies

ID Version Target Framework
Microsoft.Extensions.Caching.Memory 10.0.12 net10.0
Microsoft.Extensions.Http 10.0.12 net10.0
Microsoft.Extensions.Options.ConfigurationExtensions 10.0.12 net10.0
Details
NuGet
2026-10-12 19:37:19 +03:00
2
ResearchCave.Wallet.Client
36 KiB
Assets (2)
Versions (1) View all
1.0.0 2026-10-12