mirror of
https://github.com/mmlado/keycard-nim
synced 2026-01-01 23:11:18 +00:00
No description
| example | ||
| src | ||
| tests | ||
| .gitignore | ||
| keycard.nimble | ||
| LICENSE | ||
| README.md | ||
keycard-nim
A Nim SDK to interact with the Status Keycard - a hardware wallet implementation on JavaCard.
Installation
git clone https://github.com/mmlado/keycard-nim.git
cd keycard-nim
nimble install
Dependencies
- pcsc-nim - PC/SC library for smart card access
- Nim >= 1.6.14
Quick Start
import keycard/keycard
import keycard/commands/select
import keycard/transport
# Create keycard instance
let t = newTransport()
var card = newKeycard(t)
# Connect to first reader
let readers = card.listReaders()
card.connect(readers[0])
defer: card.close()
# Select the Keycard applet
let result = card.select()
if result.success:
echo "Card version: ", card.version()
echo "Initialized: ", card.isInitialized()
echo "Secure channel: ", card.hasSecureChannel()
Testing
Run tests with mock PC/SC (no hardware required):
nimble test
Run example with real card:
nimble example
Clean build artifacts:
nimble clean
Contributing
Contributions welcome! Please:
- Run tests before submitting (
nimble test) - Follow existing code style
- Add tests for new features
- Update this README with implementation status
License
MIT