No description
Find a file
2025-11-10 17:16:48 +01:00
example Refactor example 2025-11-08 05:50:08 +01:00
src Code optimization 2025-11-07 18:27:04 +01:00
tests Code improvements 2025-11-06 19:34:16 +01:00
.gitignore Add init and reset commands 2025-10-27 19:27:50 +01:00
keycard.nimble Add LOAD_KEY and GENERATE_MNEMONIC commands 2025-11-05 12:02:35 +01:00
LICENSE Initial commit 2025-08-24 17:45:43 +00:00
README.md Add documentation link to the readme 2025-11-10 17:16:48 +01:00

keycard-nim

A Nim SDK to interact with the Status Keycard - a hardware wallet implementation on JavaCard.

Documentation

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:

  1. Run tests before submitting (nimble test)
  2. Follow existing code style
  3. Add tests for new features
  4. Update this README with implementation status

License

MIT

References