File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ All notable changes to the Aptos Python SDK will be captured in this file. This
44
55## Unreleased
66
7+ - ` PrivateKey.format_private_key ` can now format a AIP-80 compliant private key
8+ - Removed strictness warnnings for ` PrivateKey.parse_hex_input `
9+
710## 0.10.0
811
912- Added support for deserialize RawTransactionWithData
Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ def format_private_key(
5050
5151 key_value : str | None = None
5252 if isinstance (private_key , str ):
53- key_value = private_key
53+ if private_key .startswith (aip80_prefix ):
54+ key_value = private_key .split ("-" )[2 ]
55+ else :
56+ key_value = private_key
5457 elif isinstance (private_key , bytes ):
5558 key_value = f"0x{ private_key .hex ()} "
5659 else :
@@ -97,10 +100,6 @@ def parse_hex_input(
97100 )
98101 raise ValueError ("Invalid HexString input." )
99102 elif isinstance (value , bytes ):
100- if strict is None :
101- print (
102- "It is recommended that private keys are AIP-80 compliant (https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-80.md)."
103- )
104103 return value
105104 else :
106105 raise TypeError ("Input value must be a string or bytes." )
You can’t perform that action at this time.
0 commit comments