P2PKH#
- class defichain.transactions.address.P2PKH(network: Any, address: str)#
- static from_publicKey(network: Any, publicKey: str) P2PKH #
Generates a P2PKH address object from the given public key
- Parameters:
network (Network) – (required) The network in witch the public key should be used
publicKey (str) – (required) public key
- Returns:
P2PKH - returns the P2PKH address object
- static from_privateKey(network: Any, privateKey: str) P2PKH #
Generates a P2PKH address object from the given private key
- Parameters:
network (Network) – (required) The network in witch the private key should be used
privateKey (str) – (required) private key
- Returns:
P2PKH - returns the P2PKH address object
- static from_scriptPublicKey(network: Any, scriptPublicKey: str) P2PKH #
Generates a P2PKH address object from the given script private key
- Parameters:
network (Network) – (required) The network in witch the script public key should be used
scriptPublicKey (str) – (required) script public key
- Returns:
P2PKH - returns the P2PKH address object
- get_addressType() str #
Gets the address type
- Returns:
AddressType
- get_scriptPublicKey() str #
Calculates the script public key
- Returns:
string - script public key
- get_redeemScript() str #
Calculates the redeem script
- Returns:
string - redeem script
- get_bytes_scriptPublicKey() bytes #
Calculates the script public key
- Returns:
bytes - script public key
- get_bytes_redeemScript() bytes #
Calculates the redeem script
- Returns:
bytes - redeem script