Add wallet key derivation and PSBT building
BIP84 derivation of per-user P2WPKH addresses and the pool address from the encrypted master xprv (app/wallet/hd.py, keystore.py), the PLM mainnet chain params (plm_network.py), and PSBT construction for bets/ payouts/withdrawals with change-output and fee-estimation logic (psbt_builder.py). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d2db762d96
commit
f1261584ff
9 files changed
+522
No files matched your search
@@ -0,0 +1,11 @@
|
||||
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()
|
||||
Reference in new issue
Block a user