add script file for easier wallet access

This commit is contained in:
jonesmarvin8 2026-04-21 17:42:27 -04:00
parent eb9df0c224
commit d88d297574
4 changed files with 21 additions and 45 deletions

View File

@ -1,43 +0,0 @@
import keycard_wallet as keycard_wallet
import time # For testing
my_wallet = keycard_wallet.KeycardWallet()
print("Setup communication with card...", my_wallet.setup_communication())
#my_wallet.load_account_keys()
#pub_key = my_wallet.get_public_signing_key()
# TODO: now I want to specify LEE
#print(f"Public key: {list(pub_key)}")
#my_wallet.debug_key_export()
#priv_key = my_wallet.get_private_signing_key()
#print(f"Private key: {list(priv_key)}")
#my_wallet.remove_account_keys()
print("Disconnection", my_wallet.disconnect()) # To not do a stupid
"""
my_wallet.setup_communication()
# TODO: issues here
#priv_key = my_wallet.get_private_key()
#print(f"Private key: {list(priv_key)}")
#signature = my_wallet.sign_message_current_key()
#print(f"Signature: {signature.signature.hex()}")
#signature = my_wallet.sign_message_with_path("m/44'/60'/0'/0/1")
#print(f"Signature: {signature.signature.hex()}")
my_wallet.disconnect() # To not do a stupid
"""

View File

@ -10,8 +10,7 @@ pub fn add_python_path(py: Python) -> PyResult<()> {
let paths_to_add: Vec<PathBuf> = vec![
current_dir.join("python"),
current_dir.join("python").join("keycard-py-lee-schnorr"), // ← add this
//current_dir.join("python").join("keycard-py-lee-schnorr").join(".venv").join("Lib").join("site-packages"),
current_dir.join("python").join("keycard-py"),
];
// Sanity check — warns early if a path doesn't exist

20
wallet_with_keycard.sh Normal file
View File

@ -0,0 +1,20 @@
cargo install --path wallet --force
python3 -m venv venv
source venv/bin/activate
python3 -m pip install pyscard
python3 -m pip install mnemonic
python3 -m pip install ecdsa
python3 -m pip install pyaes
cd python
git clone --branch lee-schnorr --single-branch https://github.com/bitgamma/keycard-py.git
cd keycard-py
python3 -m venv venv
source venv/bin/activate
pip install -e .