示例#1
0
  void TransactionImpl::setTransactionSecretKey(const SecretKey& key) {
    const auto& sk = reinterpret_cast<const SecretKey&>(key);
    PublicKey pk;
    PublicKey txPubKey;

    secret_key_to_public_key(sk, pk);
    extra.getPublicKey(txPubKey);

    if (txPubKey != pk) {
      throw std::runtime_error("Secret transaction key does not match public key");
    }

    secretKey = key;
  }
示例#2
0
 PublicKey TransactionImpl::getTransactionPublicKey() const {
   PublicKey pk(NULL_PUBLIC_KEY);
   extra.getPublicKey(pk);
   return pk;
 }
PublicKey TransactionPrefixImpl::getTransactionPublicKey() const {
    Crypto::PublicKey pk(NULL_PUBLIC_KEY);
    m_extra.getPublicKey(pk);
    return pk;
}