19 lines
600 B
Python
19 lines
600 B
Python
class ClientSettings:
|
|
def __init__(self, wif: str = None, address: str = None):
|
|
"""
|
|
Initializes client settings with validation.
|
|
|
|
Args:
|
|
wif: Wallet import format string
|
|
address: FrostFS node host address
|
|
"""
|
|
self.wif = wif
|
|
self.address = address
|
|
|
|
# Perform validation after initialization
|
|
self.validate()
|
|
|
|
def validate(self):
|
|
"""Performs runtime validation of the settings"""
|
|
if not (self.address and self.wif):
|
|
raise ValueError("The value must be specified ADDRESS and WIF")
|