mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add PasswordFund and PasswordSet transaction constructors.
This commit is contained in:
@@ -180,14 +180,13 @@ Transaction::pointer Transaction::setClaim(
|
||||
|
||||
Transaction::pointer Transaction::sharedClaim(
|
||||
const NewcoinAddress& naPublicKey, const NewcoinAddress& naPrivateKey,
|
||||
const NewcoinAddress& naSourceAccount,
|
||||
uint32 uSourceTag,
|
||||
const std::vector<unsigned char>& vucGenerator,
|
||||
const std::vector<unsigned char>& vucPubKey,
|
||||
const std::vector<unsigned char>& vucSignature)
|
||||
{
|
||||
pointer tResult = boost::make_shared<Transaction>(ttCLAIM,
|
||||
naPublicKey, naSourceAccount,
|
||||
naPublicKey, naPublicKey,
|
||||
0, // Sequence of 0.
|
||||
0, // Free.
|
||||
uSourceTag);
|
||||
@@ -262,6 +261,71 @@ Transaction::pointer Transaction::sharedCreditSet(
|
||||
return tResult->setCreditSet(naPrivateKey, naDstAccountID, saLimitAmount, uAcceptRate);
|
||||
}
|
||||
|
||||
//
|
||||
// PasswordFund
|
||||
//
|
||||
|
||||
Transaction::pointer Transaction::setPasswordFund(
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
const NewcoinAddress& naDstAccountID)
|
||||
{
|
||||
sign(naPrivateKey);
|
||||
|
||||
mTransaction->setITFieldAccount(sfDestination, naDstAccountID);
|
||||
|
||||
return shared_from_this();
|
||||
}
|
||||
|
||||
Transaction::pointer Transaction::sharedPasswordFund(
|
||||
const NewcoinAddress& naPublicKey, const NewcoinAddress& naPrivateKey,
|
||||
const NewcoinAddress& naSourceAccount,
|
||||
uint32 uSeq,
|
||||
const STAmount& saFee,
|
||||
uint32 uSourceTag,
|
||||
const NewcoinAddress& naDstAccountID)
|
||||
{
|
||||
pointer tResult = boost::make_shared<Transaction>(ttPASSWORD_FUND, naPublicKey, naSourceAccount, uSeq, saFee, uSourceTag);
|
||||
|
||||
return tResult->setPasswordFund(naPrivateKey, naDstAccountID);
|
||||
}
|
||||
|
||||
//
|
||||
// PasswordSet
|
||||
//
|
||||
|
||||
Transaction::pointer Transaction::setPasswordSet(
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
const NewcoinAddress& naAuthKeyID,
|
||||
const std::vector<unsigned char>& vucGenerator,
|
||||
const std::vector<unsigned char>& vucPubKey,
|
||||
const std::vector<unsigned char>& vucSignature)
|
||||
{
|
||||
mTransaction->setITFieldAccount(sfDestination, naAuthKeyID);
|
||||
mTransaction->setITFieldVL(sfGenerator, vucGenerator);
|
||||
mTransaction->setITFieldVL(sfPubKey, vucPubKey);
|
||||
mTransaction->setITFieldVL(sfSignature, vucSignature);
|
||||
|
||||
sign(naPrivateKey);
|
||||
|
||||
return shared_from_this();
|
||||
}
|
||||
|
||||
Transaction::pointer Transaction::sharedPasswordSet(
|
||||
const NewcoinAddress& naPublicKey, const NewcoinAddress& naPrivateKey,
|
||||
uint32 uSourceTag,
|
||||
const NewcoinAddress& naAuthKeyID,
|
||||
const std::vector<unsigned char>& vucGenerator,
|
||||
const std::vector<unsigned char>& vucPubKey,
|
||||
const std::vector<unsigned char>& vucSignature)
|
||||
{
|
||||
pointer tResult = boost::make_shared<Transaction>(ttPASSWORD_SET,
|
||||
naPublicKey, naPublicKey,
|
||||
0, // Sequence of 0.
|
||||
0, // Free.
|
||||
uSourceTag);
|
||||
|
||||
return tResult->setPasswordSet(naPrivateKey, naAuthKeyID, vucGenerator, vucPubKey, vucSignature);
|
||||
}
|
||||
//
|
||||
// Payment
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user