- Notifications
You must be signed in to change notification settings - Fork0
This project is a Go language implementation of the Coinkite Tap Cards NFC protocol, specifically focusing on the Satscard functionality.
License
schjonhaug/tapcards
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project is a Go language implementation of theTap Cards protocol, specifically focusing on theSatscard functionality. It does not coverTapsigner orSatschip functionalities at this time.
Implemented commands for Satscard include:
The first action with a card is anISOAppletSelectRequest
. The library manages APDU complexities, allowing direct sending of raw bytes. The card’s response should be processed throughParseResponse
. This step is not necessary to repeat as long as the card remains powered in the RF field.
Subsequently, run aRequest
command to generate a byte array for the card. Multiple interactions may be necessary for some commands, with byte arrays fromParseResponse
being resent to the card as needed. OnceParseResponse
yields no further data, useSatscard
to access card information, private keys, etc.
Always verify the factory certificate of the card before trusting any data from it. To do this, runCertsRequest
which check the authenticity of the card. This command will also run theread
command, which will expose the current receiving address.
The Go library can be compiled for mobile platforms, supporting Objective-C on iOS and Java on Android.
Requires macOS withCommand Line Tools orXcode.
RequiresAndroid Studio orCommand Line Tools, and the installation ofAndroid NDK.
go install golang.org/x/mobile/cmd/gomobile@latestgo install golang.org/x/mobile/bindgomobile initgomobilebind -target=iosgomobilebind -o tapcards.aar -androidapi<API VERSION> -target=android github.com/schjonhaug/tapcards
In theexamples folder, there are two projects using this module. One using the emulator, and the other using physical Satscards.
For the ongoing development and upkeep of this library, it is beneficial to utilise thePython emulator provided by Coinkite. You can integrate the emulator with the library by executingUseEmulator()
. Additionally, invokingEnableDebugLogging()
will provide valuable information for debugging.
About
This project is a Go language implementation of the Coinkite Tap Cards NFC protocol, specifically focusing on the Satscard functionality.