mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-07 01:13:11 +02:00
refactor: companion FrameServer and related (substantive only, no Black)
Reapply refactor from ce8381a (replace monolithic FrameServer with thin pymc_core subclass, re-export constants, SQLite persistence hooks) while preserving pre-refactor whitespace where patch applied cleanly. Remaining files match refactor commit exactly. Diff vs ce8381a is whitespace-only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,17 +79,17 @@ key_bytes = bytes.fromhex(key_hex)
|
||||
# Verify with pyMC if available
|
||||
try:
|
||||
from nacl.bindings import crypto_scalarmult_ed25519_base_noclamp
|
||||
|
||||
|
||||
scalar = key_bytes[:32]
|
||||
pubkey = crypto_scalarmult_ed25519_base_noclamp(scalar)
|
||||
|
||||
|
||||
print(f"Derived public key: {pubkey.hex()}")
|
||||
|
||||
|
||||
# Calculate address (MeshCore uses first byte of pubkey directly, not SHA256)
|
||||
address = pubkey[0]
|
||||
print(f"Node address: 0x{address:02x}")
|
||||
print()
|
||||
|
||||
|
||||
except ImportError:
|
||||
print("Warning: PyNaCl not available, skipping verification")
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user