Committing updates.
This commit is contained in:
@@ -154,6 +154,14 @@ namespace Apostol {
|
||||
return doCreate;
|
||||
} else if (S == "created") {
|
||||
return doCreated;
|
||||
} else if (S == "submit") {
|
||||
return doSubmit;
|
||||
} else if (S == "submitted") {
|
||||
return doSubmitted;
|
||||
} else if (S == "confirm") {
|
||||
return doConfirm;
|
||||
} else if (S == "confirmed") {
|
||||
return doConfirmed;
|
||||
} else if (S == "pay") {
|
||||
return doPay;
|
||||
} else if (S == "paid") {
|
||||
@@ -192,6 +200,14 @@ namespace Apostol {
|
||||
return "Create";
|
||||
case doCreated:
|
||||
return "Created";
|
||||
case doSubmit:
|
||||
return "Submit";
|
||||
case doSubmitted:
|
||||
return "Submitted";
|
||||
case doConfirm:
|
||||
return "Confirm";
|
||||
case doConfirmed:
|
||||
return "Confirmed";
|
||||
case doPay:
|
||||
return "Pay";
|
||||
case doPaid:
|
||||
@@ -291,15 +307,16 @@ namespace Apostol {
|
||||
|
||||
CString DealData::GetStringData() const {
|
||||
CString Data;
|
||||
CString S;
|
||||
|
||||
Data.Format("Type: %d;", (int) Type);
|
||||
Data.Format("URL: %s;", At.c_str());
|
||||
Data.Format("Date: %s;", Date.c_str());
|
||||
Data.Format("Seller: %s;", Seller.Address.c_str());
|
||||
Data.Format("Customer: %s;", Customer.Address.c_str());
|
||||
Data.Format("Until: %s;", Payment.Until.c_str());
|
||||
Data.Format("Sum: %s;", Payment.Sum.c_str());
|
||||
Data.Format("LeaveBefore: %s", FeedBack.LeaveBefore.c_str());
|
||||
Data = S.Format("Type: %d;", (int) Type);
|
||||
Data += S.Format("URL: %s;", At.c_str());
|
||||
Data += S.Format("Date: %s;", Date.c_str());
|
||||
Data += S.Format("Seller: %s;", Seller.Address.c_str());
|
||||
Data += S.Format("Customer: %s;", Customer.Address.c_str());
|
||||
Data += S.Format("Until: %s;", Payment.Until.c_str());
|
||||
Data += S.Format("Sum: %s;", Payment.Sum.c_str());
|
||||
Data += S.Format("LeaveBefore: %s", FeedBack.LeaveBefore.c_str());
|
||||
|
||||
return Data;
|
||||
}
|
||||
@@ -422,7 +439,7 @@ namespace Apostol {
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
std::string CDeal::get_payment_ek(const std::string &key1, const std::string &key2, std::string &key3,
|
||||
uint8_t version_key, uint8_t version_script) {
|
||||
uint8_t version_key, uint8_t version_script) {
|
||||
|
||||
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_ek(version_key) : ec_public(key3));
|
||||
|
||||
@@ -436,7 +453,7 @@ namespace Apostol {
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
std::string CDeal::get_payment_hd(const std::string &key1, const std::string &key2, std::string &key3,
|
||||
uint64_t prefixes, uint8_t version_script) {
|
||||
uint64_t prefixes, uint8_t version_script) {
|
||||
|
||||
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_hd(prefixes) : ec_public(key3));
|
||||
|
||||
@@ -450,7 +467,7 @@ namespace Apostol {
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
std::string CDeal::get_payment_witness(const std::string &key1, const std::string &key2, std::string &key3,
|
||||
uint64_t prefixes) {
|
||||
uint64_t prefixes) {
|
||||
|
||||
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_hd(prefixes) : ec_public(key3));
|
||||
|
||||
@@ -462,7 +479,7 @@ namespace Apostol {
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CString CDeal::GetPaymentEK(const CString &Key1, const CString &Key2, CString &Key3,
|
||||
uint8_t version_key, uint8_t version_script) {
|
||||
uint8_t version_key, uint8_t version_script) {
|
||||
|
||||
std::string key3(Key3);
|
||||
|
||||
@@ -475,7 +492,7 @@ namespace Apostol {
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CString CDeal::GetPaymentHD(const CString &Key1, const CString &Key2, CString &Key3,
|
||||
uint64_t prefixes, uint8_t version_script) {
|
||||
uint64_t prefixes, uint8_t version_script) {
|
||||
|
||||
std::string key3(Key3);
|
||||
|
||||
|
||||
@@ -162,8 +162,8 @@ namespace Apostol {
|
||||
enum CFeedBackStatus { fsNegative = -1, fsNeutral = 0, fsPositive = 1 };
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
enum CDealOrder { doCreate = 0, doCreated, doPay, doPaid, doComplete, doCompleted, doCancel, doCanceled,
|
||||
doExecute, doExecuted, doDelete, doDeleted, doFail, doFailed, doFeedback };
|
||||
enum CDealOrder { doCreate = 0, doCreated, doSubmit, doSubmitted, doConfirm, doConfirmed, doPay, doPaid, doComplete, doCompleted, doCancel, doCanceled,
|
||||
doExecute, doExecuted, doDelete, doDeleted, doFail, doFailed, doFeedback };
|
||||
//--------------------------------------------------------------------------------------------------------------
|
||||
|
||||
typedef struct DealData {
|
||||
@@ -319,7 +319,7 @@ namespace Apostol {
|
||||
uint8_t version_script = payment_address::mainnet_p2sh);
|
||||
|
||||
std::string get_payment_witness(const std::string &key1, const std::string &key2, std::string &key3,
|
||||
uint64_t prefixes = hd_private::mainnet);
|
||||
uint64_t prefixes = hd_private::mainnet);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user