prediction-market-agent-tooling 0.60.3__py3-none-any.whl → 0.60.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prediction_market_agent_tooling/tools/web3_utils.py +6 -0
- {prediction_market_agent_tooling-0.60.3.dist-info → prediction_market_agent_tooling-0.60.4.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.60.3.dist-info → prediction_market_agent_tooling-0.60.4.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.60.3.dist-info → prediction_market_agent_tooling-0.60.4.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.60.3.dist-info → prediction_market_agent_tooling-0.60.4.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.60.3.dist-info → prediction_market_agent_tooling-0.60.4.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,5 @@
|
|
1
1
|
import binascii
|
2
|
+
import secrets
|
2
3
|
from typing import Any, Optional, TypeVar
|
3
4
|
|
4
5
|
import base58
|
@@ -20,6 +21,7 @@ from prediction_market_agent_tooling.gtypes import (
|
|
20
21
|
HexStr,
|
21
22
|
IPFSCIDVersion0,
|
22
23
|
PrivateKey,
|
24
|
+
private_key_type,
|
23
25
|
xDai,
|
24
26
|
xdai_type,
|
25
27
|
)
|
@@ -31,6 +33,10 @@ ZERO_BYTES = HexBytes(HASH_ZERO)
|
|
31
33
|
NOT_REVERTED_ICASE_REGEX_PATTERN = "(?i)(?!.*reverted.*)"
|
32
34
|
|
33
35
|
|
36
|
+
def generate_private_key() -> PrivateKey:
|
37
|
+
return private_key_type("0x" + secrets.token_hex(32))
|
38
|
+
|
39
|
+
|
34
40
|
def private_key_to_public_key(private_key: SecretStr) -> ChecksumAddress:
|
35
41
|
account = Account.from_key(private_key.get_secret_value())
|
36
42
|
return verify_address(account.address)
|
@@ -116,9 +116,9 @@ prediction_market_agent_tooling/tools/tokens/auto_withdraw.py,sha256=25Y0H1p0hSD
|
|
116
116
|
prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=7JPgVF4RbiFzLDQVBkBuC--eUoM1AYOcJ4VygbmK5yo,822
|
117
117
|
prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
|
118
118
|
prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
|
119
|
-
prediction_market_agent_tooling/tools/web3_utils.py,sha256=
|
120
|
-
prediction_market_agent_tooling-0.60.
|
121
|
-
prediction_market_agent_tooling-0.60.
|
122
|
-
prediction_market_agent_tooling-0.60.
|
123
|
-
prediction_market_agent_tooling-0.60.
|
124
|
-
prediction_market_agent_tooling-0.60.
|
119
|
+
prediction_market_agent_tooling/tools/web3_utils.py,sha256=3wfqNxvMn44ivweFRoeKNVb9QRtFd7kFtp7VUY5juEE,12862
|
120
|
+
prediction_market_agent_tooling-0.60.4.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
121
|
+
prediction_market_agent_tooling-0.60.4.dist-info/METADATA,sha256=XUcZ1GvIf1NZJx1w-Ib0l-piJSX4xzZl78PzsvRpYjI,8629
|
122
|
+
prediction_market_agent_tooling-0.60.4.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
123
|
+
prediction_market_agent_tooling-0.60.4.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
124
|
+
prediction_market_agent_tooling-0.60.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|