All 10 build-order stages complete and unit-tested (49 tests). Verified live on mainnet: registration/address derivation, deposit crediting, a real 10 PLM bet (broadcast + confirmed + change credited). A full round close->draw->payout cycle was triggered live and was in progress at commit time. Withdrawal and RBF bump are unit-tested but not yet exercised against a live broadcast. Known gaps (scheduler doesn't resume mid-flight rounds after restart, payout has no retry, no deployment setup, etc.) are documented in CLAUDE.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
12 lines
310 B
Python
12 lines
310 B
Python
from cryptography.fernet import Fernet
|
|
|
|
from app.config import settings
|
|
|
|
|
|
def encrypt_xprv(xprv_base58: str) -> bytes:
|
|
return Fernet(settings.xprv_encryption_key).encrypt(xprv_base58.encode())
|
|
|
|
|
|
def decrypt_xprv(token: bytes) -> str:
|
|
return Fernet(settings.xprv_encryption_key).decrypt(token).decode()
|