Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

This project is a Go language implementation of the Coinkite Tap Cards NFC protocol, specifically focusing on the Satscard functionality.

License

NotificationsYou must be signed in to change notification settings

schjonhaug/tapcards

Repository files navigation

Gopher Logo

Go Reference

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.

Available Satscard Commands

Implemented commands for Satscard include:

Usage Guide

Initial Steps

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.

Building Mobile Libraries

The Go library can be compiled for mobile platforms, supporting Objective-C on iOS and Java on Android.

Setup Requirements

For iOS

Requires macOS withCommand Line Tools orXcode.

For Android

RequiresAndroid Studio orCommand Line Tools, and the installation ofAndroid NDK.

Mobile Compilation Steps

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

Examples

In theexamples folder, there are two projects using this module. One using the emulator, and the other using physical Satscards.

Development and debug

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp