Skip to content

Commit eea77e1

Browse files
authored
Merge pull request #12 from InjectiveLabs/f/update-src
adds function to return a bytes object from a PK in hexadecimal values
2 parents acd3162 + 65dc7be commit eea77e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/injective/chain_client/_wallet.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ def generate_wallet(
3232
"address": address,
3333
}
3434

35+
def privkey_hex_to_bytes(privkey: hex) -> bytes:
36+
37+
pk_bytes = bytes.fromhex(privkey)
38+
return pk_bytes
39+
3540

3641
def seed_to_privkey(seed: str, path: str = DEFAULT_DERIVATION_PATH) -> bytes:
3742
"""Get a private key from a mnemonic seed and a derivation path.

0 commit comments

Comments
 (0)