Exemple #1
0
def registerSecondSecret(secondSecret):
    """
    Build a second secret registration transaction.

    Arguments:
        secondSecret (str): passphrase
    Returns:
        transaction object
    """
    return registerSecondPublicKey(crypto.getKeys(secondSecret)["publicKey"],
                                   version=cfg.txversion)
Exemple #2
0
def registerSecondSecret(secondSecret):
    """
    Build a second secret registration transaction.

    Args:
        secondSecret (str): passphrase.

    Returns:
        dposlib.ark.tx.Transaction: orphan transaction.
    """
    return registerSecondPublicKey(crypto.getKeys(secondSecret)["publicKey"])
Exemple #3
0
    def _finalizeTx(self, tx):
        if "fee" not in tx or self._fee is not None:
            tx.fee = self._fee
        tx.feeIncluded = self._fee_included
        tx["senderPublicKey"] = self.publicKey
        tx["signature"] = ldgr.sendApdu(ldgr.buildSignatureApdu(
            serialize(tx), self._dongle_path, "tx", self._schnorr),
                                        debug=self._debug)

        if tx._secondPublicKey is not None:
            try:
                k2 = crypto.getKeys(getpass.getpass("second secret > "))
                while k2.get("publicKey", None) != tx._secondPublicKey:
                    k2 = crypto.getKeys(getpass.getpass("second secret > "))
            except KeyboardInterrupt:
                raise Exception("transaction cancelled")
            else:
                tx["signSignature"] = crypto.getSignature(tx, k2["privateKey"])

        tx.identify()
        return tx
Exemple #4
0
def registerSecondSecret(secondSecret):
    return registerSecondPublicKey(crypto.getKeys(secondSecret)["publicKey"])