This repository hosts tools that help with the creation of Bolt Cards.
Content:
- BTCPayServer.NTag424 is the base library implementing the NTag424 protocol, this library is platform agnostic.
- BTCPayServer.NTag424.PCSC is a library implementing APDU transport via PCSC-Sharp for supporting Windows/Linux/Mac.
Plug in a smart card reader, such as the identiv utrust 3700 f, and place an NTag 424 smart card on it.
Reference the nuget package BTCPayServer.NTag424.PCSC in your project.
dotnet add package BTCPayServer.NTag424.PCSC
Then to use it:
using BTCPayServer.NTag424.PCSC;
using System;
using var ctx = PCSCContext.Create();
var ntag424 = ctx.CreateNTag424();
var key = AESKey(new byte[16]);
await ntag.AuthenticateEV2First(0, key);
var id = ntag.GetCardUID();
var idStr = Convert.ToHexString(id, 0, id.Length).ToLowerInvariant();
Console.WriteLine($"Card UID: {idStr}");
MIT