diff --git a/pyproject.toml b/pyproject.toml index 062a1c5..aebc796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "v0.13.2" +version = "v0.13.3" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later" diff --git a/sw_utils/tests/factories.py b/sw_utils/tests/factories.py index 46ce7e4..67bf1cd 100644 --- a/sw_utils/tests/factories.py +++ b/sw_utils/tests/factories.py @@ -21,6 +21,10 @@ def private_key(self) -> int: private_key = G2ProofOfPossession.KeyGen(seed) return private_key + def private_key_hex(self) -> HexStr: + # 32-byte private key as 0x-prefixed hex string + return Web3.to_hex(random.randbytes(32)) + def eth_address(self) -> ChecksumAddress: account = w3.eth.account.create() return account.address