Exemple #1
0
 def from_pem(cls, pem):
     """
     :param pem: A private key previously encoded as PEM.
     :type pem: ``bytes``
     :rtype: :class:`~bitsv.PrivateKeyTestnet`
     """
     return PrivateKeyTestnet(ECPrivateKey.from_pem(pem))
Exemple #2
0
 def from_pem(cls, pem, network='main'):
     """
     :param pem: A private key previously encoded as PEM.
     :type pem: ``bytes``
     :param network: 'main', 'test' or 'stn'
     :type network: ``str``
     :rtype: :class:`~bitsv.PrivateKey`
     """
     return PrivateKey(ECPrivateKey.from_pem(pem), network=network)