beemgraphenebase.bip32¶
-
class
beemgraphenebase.bip32.
BIP32Key
(secret, chain, depth, index, fpr, public=False, testnet=False)¶ Bases:
object
-
Address
()¶ Return compressed public key address
-
CKDpriv
(i)¶ Create a child key of index ‘i’.
If the most significant bit of ‘i’ is set, then select from the hardened key set, otherwise, select a regular child key.
Returns a BIP32Key constructed with the child key parameters, or None if i index would result in an invalid key.
-
CKDpub
(i)¶ Create a publicly derived child key of index ‘i’.
If the most significant bit of ‘i’ is set, this is an error.
Returns a BIP32Key constructed with the child key parameters, or None if index would result in invalid key.
-
ChainCode
()¶ Return chain code as string
-
ChildKey
(i)¶ Create and return a child key of this one at index ‘i’.
The index ‘i’ should be summed with BIP32_HARDEN to indicate to use the private derivation algorithm.
-
ExtendedKey
(private=True, encoded=True)¶ Return extended private or public key as string, optionally base58 encoded
-
Fingerprint
()¶ Return key fingerprint as string
-
Identifier
()¶ Return key identifier as string
-
P2WPKHoP2SHAddress
()¶ Return P2WPKH over P2SH segwit address
-
PrivateKey
()¶ Return private key as string
-
PublicKey
()¶ Return compressed public key encoding
-
SetPublic
()¶ Convert a private BIP32Key into a public one
-
WalletImportFormat
()¶ Returns private key encoded for wallet import
-
dump
()¶ Dump key fields mimicking the BIP0032 test vector format
-
static
fromEntropy
(entropy, public=False, testnet=False)¶ Create a BIP32Key using supplied entropy >= MIN_ENTROPY_LEN
-
static
fromExtendedKey
(xkey, public=False)¶ Create a BIP32Key by importing from extended private or public key string
If public is True, return a public-only key regardless of input type.
-
hmac
(data)¶ Calculate the HMAC-SHA512 of input data using the chain code as key.
Returns a tuple of the left and right halves of the HMAC
-
-
beemgraphenebase.bip32.
int_to_hex
(x)¶
-
beemgraphenebase.bip32.
parse_path
(nstr, as_bytes=False)¶
-
beemgraphenebase.bip32.
test
()¶