VeeFriends.Wallet.MagicLink
1.0.5
dotnet add package VeeFriends.Wallet.MagicLink --version 1.0.5
NuGet\Install-Package VeeFriends.Wallet.MagicLink -Version 1.0.5
<PackageReference Include="VeeFriends.Wallet.MagicLink" Version="1.0.5" />
paket add VeeFriends.Wallet.MagicLink --version 1.0.5
#r "nuget: VeeFriends.Wallet.MagicLink, 1.0.5"
// Install VeeFriends.Wallet.MagicLink as a Cake Addin #addin nuget:?package=VeeFriends.Wallet.MagicLink&version=1.0.5 // Install VeeFriends.Wallet.MagicLink as a Cake Tool #tool nuget:?package=VeeFriends.Wallet.MagicLink&version=1.0.5
VeeFriends.Wallet.MagicLink
This package has nothing todo with VeeFriends.com or Gary Vaynerchuk or NFTs.
Table of Contents
Getting Started
To get started with the VeeFriends.Wallet.MagicLink SDK, make sure you have a working environment with .NET and necessary tools installed to build and run C# applications.
Installation
To install the VeeFriends.Wallet.MagicLink SDK, you will need to reference it in your project. If the SDK is available as a NuGet package, you can install it using the NuGet Package Manager or the dotnet CLI:
$ dotnet add package VeeFriends.Wallet.MagicLink
Usage
Adding VeeFriends.Wallet.MagicLink to your service collection
To use VeeFriends.Wallet.MagicLink within your application, add it to your service collection during the configuration phase:
services.AddMagic(options =>
{
options.BaseAddress = new Uri("https://api.example.com/");
options.Secret = "your-api-secret";
options.ApiSecretHeader = "X-Api-Secret";
});
This extension method will configure the necessary HTTP clients and services required by the SDK to function.
Working with IdTokens
IdToken
is a critical component of the SDK. It represents a cryptographic proof of ownership of a claim.
// Parsing an IdToken from a string
var idToken = new IdToken("your-id-token-string");
// Retrieving the claim from the IdToken
var claim = idToken.GetClaim();
// Validating the token
bool isValid = idToken.Validate("your-client-id");
User Client Operations
The SDK provides an IUserClient
interface to interact with user data. Here's how you can use it in your application:
public class UserService
{
private readonly IUserClient _userClient;
public UserService(IUserClient userClient)
{
_userClient = userClient;
}
public async Task<UserInfo> GetUserMetadataByIssuer(string issuer)
{
return await _userClient.GetMetadataByIssuer(issuer, CancellationToken.None);
}
// Other operations...
}
Make sure to implement error handling and proper asynchronous programming practices when using these asynchronous methods.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
- Nethereum.Signer (>= 4.17.1)
- Nethereum.Util (>= 4.17.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.5 | 40,614 | 11/3/2023 |
1.0.4 | 127 | 11/3/2023 |
1.0.3 | 121 | 11/3/2023 |
1.0.2 | 122 | 11/3/2023 |
1.0.1 | 119 | 11/3/2023 |
0.0.0-gffc5147f9b | 101 | 11/3/2023 |
0.0.0-gdb517466a1 | 100 | 11/3/2023 |
0.0.0-gd5cd77b812 | 107 | 11/3/2023 |
0.0.0-g9593c0d2c8 | 108 | 11/3/2023 |
0.0.0-g6e4084a322 | 105 | 11/3/2023 |
0.0.0-g0d5857ed9d | 104 | 11/3/2023 |