solana-keyring-biometric 0.1.0

Biometric authentication (TouchID) for Solana keyring
Documentation
  • Coverage
  • 77.78%
    14 out of 18 items documented2 out of 10 items with examples
  • Size
  • Source code size: 22.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • macalinao/sign-agent
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • macalinao

solana-keyring-biometric

Crates.io Downloads Documentation License

Biometric authentication (TouchID) for Solana keyring on macOS.

Features

  • TouchID Integration: Native macOS LocalAuthentication framework
  • Passcode Fallback: Falls back to device passcode when biometrics unavailable
  • Cross-platform: No-op on non-macOS platforms (always succeeds)
  • Transaction Confirmation: Prompt users before signing

Installation

[dependencies]
solana-keyring-biometric = "0.1"

Usage

use solana_keyring_biometric::{authenticate, confirm_signing, AuthResult};

// Check availability
if solana_keyring_biometric::is_available() {
    // Request authentication
    match authenticate("Confirm your identity")? {
        AuthResult::Authenticated => println!("Success!"),
        AuthResult::Denied => println!("User cancelled"),
        AuthResult::NotAvailable => println!("Biometrics unavailable"),
    }
}

// Confirm transaction signing
match confirm_signing("my-wallet", "Transfer 1.5 SOL to ABC...")? {
    AuthResult::Authenticated => { /* proceed with signing */ }
    _ => { /* handle denial */ }
}

Platform Support

Platform Support
macOS Full TouchID/passcode support
Linux No-op (always returns Authenticated)
Windows No-op (always returns Authenticated)

License

Apache-2.0