152 if (lInput == m_lOpeningTransNo)
return true;
154 for (
const auto& it : m_mapPartyAccounts) {
157 "Unexpected nullptr partyaccount pointer in party map.");
167 if (m_lOpeningTransNo > 0) numlistOutput.Add(m_lOpeningTransNo);
169 for (
const auto& it : m_mapPartyAccounts) {
172 "Unexpected nullptr partyaccount pointer in party map.");
175 if (lTemp > 0) numlistOutput.Add(lTemp);
185 for (
const auto& it : m_mapPartyAccounts) {
188 "Unexpected nullptr partyaccount pointer in party map.");
192 if (strAgentName.
Compare(str_agent_name.c_str())) nCount++;
219 : m_pstr_party_name(nullptr)
220 , m_bPartyIsNym(false)
221 , m_lOpeningTransNo(0)
222 , m_pOwnerAgreement(nullptr)
227 const char* szAuthAgent,
bool bCreateAgent)
228 : m_pstr_party_name(nullptr)
229 , m_bPartyIsNym(bIsOwnerNym)
230 , m_str_owner_id(szOwnerID != nullptr ? szOwnerID :
"")
231 , m_str_authorizing_agent(szAuthAgent != nullptr ? szAuthAgent :
"")
232 , m_lOpeningTransNo(0)
233 , m_pOwnerAgreement(nullptr)
235 m_pstr_party_name =
new std::string(szName !=
nullptr ? szName :
"");
238 const OTString strName(m_str_authorizing_agent.c_str()), strNymID(
""),
239 strRoleID(
""), strGroupName(
"");
242 strName, strNymID, strRoleID, strGroupName);
246 otErr <<
"OTParty::OTParty: *** Failed *** while adding default "
247 "agent in CONSTRUCTOR! 2\n";
257 const std::string str_agent_name,
OTAccount* pAccount,
258 const std::string* pstr_account_name, int64_t lClosingTransNo)
259 : m_pstr_party_name(new std::string(str_PartyName))
260 , m_bPartyIsNym(true)
261 , m_lOpeningTransNo(0)
262 , m_pOwnerAgreement(nullptr)
273 m_str_owner_id = strNymID.
Get();
276 new OTAgent(str_agent_name, theNym);
281 otErr <<
"OTParty::OTParty: *** Failed *** while adding default agent "
287 m_str_authorizing_agent = str_agent_name;
292 if (
nullptr != pAccount) {
298 AddAccount(str_agent_name.c_str(), pstr_account_name->c_str(),
299 *pAccount, lClosingTransNo);
302 otErr <<
"OTParty::OTParty: *** Failed *** while adding default "
303 "account in CONSTRUCTOR!\n";
309 const std::string str_agent_name = theAgent.
GetName().
Get();
312 otErr <<
"OTParty::AddAgent: Failed validating Agent name.";
316 auto it = m_mapAgents.find(str_agent_name);
318 if (m_mapAgents.end() == it)
328 std::pair<std::string, OTAgent*>(str_agent_name, &theAgent));
336 otOut <<
"OTParty::AddAgent: Failed -- Agent was already there named "
337 << str_agent_name <<
".\n";
345 int64_t lClosingTransNo)
348 strName, strAgentName, strAcctID, strAssetTypeID, lClosingTransNo);
352 delete pPartyAccount;
360 OTAccount& theAccount, int64_t lClosingTransNo)
363 szAcctName, strAgentName, theAccount, lClosingTransNo);
367 delete pPartyAccount;
376 const std::string str_acct_name = thePartyAcct.
GetName().
Get();
379 otErr <<
"OTParty::AddAccount: Failed validating Account name.";
383 auto it = m_mapPartyAccounts.find(str_acct_name);
385 if (m_mapPartyAccounts.end() == it)
401 m_mapPartyAccounts.insert(std::pair<std::string, OTPartyAccount*>(
402 str_acct_name, &thePartyAcct));
410 otOut <<
"OTParty::AddAccount: Failed -- Account was already on party "
411 "named " << str_acct_name <<
".\n";
418 auto it = m_mapPartyAccounts.find(str_for_acct_name);
420 if (m_mapPartyAccounts.end() == it)
422 otOut <<
"OTParty::GetClosingTransNo: Failed -- Account wasn't found: "
423 << str_for_acct_name <<
".\n";
436 while (!m_mapAgents.empty()) {
437 OTAgent* pTemp = m_mapAgents.begin()->second;
441 m_mapAgents.erase(m_mapAgents.begin());
448 while (!m_mapPartyAccounts.empty()) {
453 m_mapPartyAccounts.erase(m_mapPartyAccounts.begin());
462 if (
nullptr != m_pstr_party_name)
delete m_pstr_party_name;
463 m_pstr_party_name =
nullptr;
465 m_pOwnerAgreement =
nullptr;
470 for (
auto& it : m_mapAgents) {
473 "Unexpected nullptr agent pointer in party map.");
478 for (
auto& it : m_mapPartyAccounts) {
481 "Unexpected nullptr partyaccount pointer in party map.");
491 std::string retVal(
"");
494 if (
nullptr == m_pstr_party_name) {
495 if (
nullptr != pBoolSuccess) *pBoolSuccess =
false;
500 if (
nullptr != pBoolSuccess) *pBoolSuccess =
true;
502 retVal = *m_pstr_party_name;
510 otErr <<
"OTParty::SetPartyName: Failed: Invalid name was passed in.\n";
514 if (
nullptr == m_pstr_party_name)
515 OT_ASSERT(
nullptr != (m_pstr_party_name =
new std::string));
517 *m_pstr_party_name = str_party_name_input;
529 return m_bPartyIsNym;
536 return !m_bPartyIsNym;
543 if (
IsNym() && (m_str_owner_id.size() > 0)) {
544 if (
nullptr != pBoolSuccess) *pBoolSuccess =
true;
546 return m_str_owner_id;
549 if (
nullptr != pBoolSuccess) *pBoolSuccess =
false;
551 std::string retVal(
"");
558 if (
IsEntity() && (m_str_owner_id.size() > 0)) {
559 if (
nullptr != pBoolSuccess) *pBoolSuccess =
true;
561 return m_str_owner_id;
564 if (
nullptr != pBoolSuccess) *pBoolSuccess =
false;
566 std::string retVal(
"");
597 for (
const auto& it : m_mapAgents) {
612 auto it = m_mapAgents.find(str_agent_name);
614 if (m_mapAgents.end() != it)
623 otErr << __FUNCTION__ <<
": Failed: str_agent_name is invalid...\n";
632 if (!((nIndex >= 0) &&
633 (nIndex < static_cast<int64_t>(m_mapAgents.size())))) {
634 otErr << __FUNCTION__ <<
": Index out of bounds: " << nIndex <<
"\n";
637 int32_t nLoopIndex = -1;
639 for (
auto& it : m_mapAgents) {
645 if (nLoopIndex == nIndex)
return pAgent;
659 auto it = m_mapPartyAccounts.find(str_acct_name);
661 if (m_mapPartyAccounts.end() != it)
670 otErr <<
"OTParty::GetAccount: Failed: str_acct_name is invalid.\n";
679 if (!((nIndex >= 0) &&
680 (nIndex < static_cast<int64_t>(m_mapPartyAccounts.size())))) {
681 otErr << __FUNCTION__ <<
": Index out of bounds: " << nIndex <<
"\n";
684 int32_t nLoopIndex = -1;
686 for (
auto& it : m_mapPartyAccounts) {
692 if (nLoopIndex == nIndex)
return pAcct;
704 for (
auto& it : m_mapPartyAccounts) {
713 otErr << __FUNCTION__ <<
": Failed: str_agent_name is invalid.\n";
723 for (
const auto& it : m_mapPartyAccounts) {
739 for (
const auto& it : m_mapPartyAccounts) {
744 if (
nullptr != ppPartyAccount) *ppPartyAccount = pAcct;
758 for (
const auto& it : m_mapPartyAccounts) {
763 if (
nullptr != ppPartyAccount) *ppPartyAccount = pAcct;
778 for (
const auto& it : m_mapAgents) {
783 if (
nullptr != ppAgent) *ppAgent = pAgent;
795 for (
const auto& it : m_mapAgents) {
800 if (
nullptr != ppAgent) *ppAgent = pAgent;
820 auto it = m_mapAgents.find(m_str_authorizing_agent);
822 if (m_mapAgents.end() != it)
832 if (
nullptr != ppAgent) *ppAgent = pAgent;
838 otErr <<
"OTParty::HasAuthorizingAgent: named agent wasn't found "
854 auto it = m_mapAgents.find(m_str_authorizing_agent);
856 if (m_mapAgents.end() != it)
866 if (
nullptr != ppAgent) *ppAgent = pAgent;
872 otErr <<
"OTParty::HasAuthorizingAgentByNymID: named agent wasn't "
881 for (
auto& it : m_mapAgents) {
903 auto it = m_mapAgents.find(m_str_authorizing_agent);
905 if (m_mapAgents.end() != it)
913 otErr <<
"OTParty::LoadAuthorizingAgentNym: This agent is not "
914 "an individual--there's no Nym to load.\n";
915 else if (
nullptr == (pNym = pAgent->
LoadNym(theSignerNym)))
916 otErr <<
"OTParty::LoadAuthorizingAgentNym: Failed loading "
927 otErr <<
"OTParty::LoadAuthorizingAgentNym: named agent wasn't "
940 std::string str_nym_id =
944 if (!bNymID || (str_nym_id.size() <= 0)) {
945 otErr <<
" OTParty::VerifyOwnershipOfAccount: Although party is a "
946 "Nym, unable to retrieve NymID!\n";
955 otErr <<
"OTParty::VerifyOwnershipOfAccount: Error: Entities have not "
956 "been implemented yet, "
957 "but somehow this party is an entity.\n";
959 otErr <<
"OTParty::VerifyOwnershipOfAccount: Error: Unknown party "
969 const int64_t& lNewTransactionNumber,
const OTString& strOrigCronItem,
972 bool bSuccess =
true;
973 const char* szFunc =
"OTParty::DropFinalReceiptToInboxes";
977 if (
nullptr == m_pOwnerAgreement) {
978 otErr << szFunc <<
": Missing pointer to owner agreement.\n";
981 else if (
nullptr == (pSmartContract = dynamic_cast<OTSmartContract*>(
982 m_pOwnerAgreement))) {
984 <<
": Can only drop finalReceipts for smart contracts.\n";
990 for (
auto& it : m_mapPartyAccounts) {
993 "Unexpected nullptr partyaccount pointer in party map.");
999 strServerID, theServerNym, *pSmartContract,
1000 lNewTransactionNumber, strOrigCronItem, pstrNote,
1003 <<
": Failed dropping final Receipt to agent's Inbox.\n";
1025 if (
nullptr == m_pOwnerAgreement) {
1026 otErr <<
"OTParty::DropFinalReceiptToNymboxes: Missing pointer to "
1027 "owner agreement.\n";
1030 else if (
nullptr == (pSmartContract = dynamic_cast<OTSmartContract*>(
1031 m_pOwnerAgreement))) {
1032 otErr <<
"OTParty::DropFinalReceiptToNymboxes: Can only drop "
1033 "finalReceipts for smart contracts.\n";
1039 for (
auto& it : m_mapAgents) {
1042 "Unexpected nullptr agent pointer in party map.");
1046 *pSmartContract, lNewTransactionNumber, strOrigCronItem,
1047 pstrNote, pstrAttachment, pActualNym))
1048 otErr <<
"OTParty::DropFinalReceiptToNymboxes: Failed dropping "
1049 "final Receipt to agent's Nymbox.\n";
1059 const int64_t& lNewTransactionNumber,
1067 if (
nullptr == m_pOwnerAgreement) {
1068 otErr << __FUNCTION__ <<
": Missing pointer to owner agreement.\n";
1074 if (lOpeningTransNo > 0) {
1075 for (
auto& it : m_mapAgents) {
1078 "Unexpected nullptr agent pointer in party map.");
1082 bSuccessMsg, theServerNym, theServerID,
1083 lNewTransactionNumber, lOpeningTransNo,
1084 strReference, pstrNote, pstrAttachment, pActualNym))
1085 otErr << __FUNCTION__
1086 <<
": Failed dropping server notice to agent's Nymbox.\n";
1098 std::set<std::string> theAcctIDSet;
1101 for (
auto& it_acct : m_mapPartyAccounts) {
1102 const std::string str_acct_name = it_acct.first;
1106 bool bHadToLoadtheAcctMyself =
true;
1111 if (!strAcctID.
Exists()) {
1112 otOut <<
"OTParty::LoadAndVerifyAssetAccounts: Bad: Acct ID is "
1113 "blank for account: " << str_acct_name
1121 auto it_acct_id = theAcctIDSet.find(strAcctID.
Get());
1123 if (theAcctIDSet.end() == it_acct_id)
1125 theAcctIDSet.insert(strAcctID.
Get());
1130 otOut <<
"OTParty::LoadAndVerifyAssetAccounts: Failure: Found a "
1131 "duplicate Acct ID (" << strAcctID
1132 <<
"), on acct: " << str_acct_name <<
".\n";
1136 auto it = map_Accts_Already_Loaded.find(
1140 if (map_Accts_Already_Loaded.end() != it)
1142 pAccount = it->second;
1148 const bool bIsPartyAcct = pPartyAcct->
IsAccount(*pAccount);
1150 otErr <<
"OTParty::LoadAndVerifyAssetAccounts: Failed call: "
1151 "pPartyAcct->IsAccount(*pAccount); \n";
1154 "OTParty::LoadAndVerifyAssetAccounts: Failed call: "
1155 "pPartyAcct->IsAccount(*pAccount); \n");
1161 bHadToLoadtheAcctMyself =
false;
1169 if (bHadToLoadtheAcctMyself ==
true) {
1170 if (
nullptr == (pAccount = pPartyAcct->
LoadAccount(
1171 theServerNym, strServerID)))
1177 otOut <<
"OTParty::LoadAndVerifyAssetAccounts: Failed loading "
1178 "Account with name: " << str_acct_name
1179 <<
" and ID: " << strAcctID <<
"\n";
1184 map_NewlyLoaded.insert(
1185 std::pair<std::string, OTAccount*>(strAcctID.
Get(), pAccount));
1201 const bool bIsNym =
IsNym();
1205 otErr <<
"OTParty::LoadAndVerifyAgents: Entities and roles have not "
1206 "been coded yet. Party owner MUST be a Nym. \n";
1214 otErr <<
"OTParty::LoadAndVerifyAgents: This party doesn't have a "
1215 "valid opening transaction number. Sorry. \n";
1226 bool bGotPartyNymID =
false;
1227 const std::string str_owner_id =
GetNymID(
1231 const OTString strServerNymID(theServerNym);
1233 for (
auto& it_agent : m_mapAgents) {
1234 OTAgent* pAgent = it_agent.second;
1236 "Unexpected nullptr agent pointer in party map.");
1239 otErr <<
"OTParty::LoadAndVerifyAgents: Entities and roles have "
1240 "not been coded yet. "
1241 "Agent needs to be an individual who represents himself, "
1242 "and Party owner needs to be the same Nym.\n";
1247 bool bGotAgentNymID = pAgent->
GetNymID(theNymID);
1249 const std::string str_agent_id =
1250 bGotAgentNymID ? strNymID.
Get()
1258 if (!(str_agent_id.compare(str_owner_id) ==
1262 otErr <<
"OTParty::LoadAndVerifyAgents: Nym supposedly represents "
1263 "himself (owner AND agent) yet "
1264 "they have different Nym IDs: " << str_owner_id <<
" / "
1265 << str_agent_id <<
".\n";
1270 if (str_agent_id.compare(strServerNymID.
Get()) ==
1273 otErr <<
"OTParty::LoadAndVerifyAgents: Server Nym is not allowed "
1274 "to serve as an agent for smart contracts. Sorry.\n";
1284 bool bHadToLoadtheNymMyself =
true;
1288 map_Nyms_Already_Loaded.find(str_agent_id);
1292 if (map_Nyms_Already_Loaded.end() != it)
1305 bHadToLoadtheNymMyself =
1312 if (bHadToLoadtheNymMyself) {
1313 if (
nullptr == (pNym = pAgent->
LoadNym(theServerNym))) {
1314 otErr <<
"OTParty::LoadAndVerifyAgents: Failed loading Nym "
1315 "with ID: " << str_agent_id <<
"\n";
1320 map_NewlyLoaded.insert(std::pair<std::string, OTPseudonym*>(
1321 str_agent_id, pNym));
1374 OT_ASSERT(
nullptr != m_pOwnerAgreement);
1376 bool bAllSuccessful =
true;
1382 for (
auto& it : m_mapPartyAccounts) {
1383 const std::string str_acct_name = it.first;
1386 "Unexpected nullptr partyaccount pointer in party map.");
1406 bAllSuccessful =
false;
1410 otOut <<
"OTParty::" << __FUNCTION__
1411 <<
": Ownership, agency, or potentially "
1412 "closing transaction # failed to verify on account: "
1413 << str_acct_name <<
" \n";
1417 return bAllSuccessful;
1426 otErr <<
"OTParty::" << __FUNCTION__
1427 <<
": Error: Authorizing agent name is blank.\n";
1433 if (
nullptr == pAgent) {
1434 otErr <<
"OTParty::" << __FUNCTION__
1435 <<
": Error: Unable to find Authorizing agent ("
1453 for (
auto& it : m_mapPartyAccounts) {
1456 "OTParty::HarvestClosingNumbers: "
1457 "Unexpected nullptr partyaccount pointer in "
1463 if (str_agent_name.size() <= 0) {
1464 otErr << __FUNCTION__ <<
": Missing agent name on party account: "
1470 if (
nullptr == pAgent)
1471 otErr << __FUNCTION__ <<
": Couldn't find agent (" << str_agent_name
1472 <<
") for asset account: " << pAcct->
GetName() <<
"\n";
1487 for (
auto& it : m_mapPartyAccounts) {
1490 "OTParty::HarvestClosingNumbers: "
1491 "Unexpected nullptr partyaccount pointer in "
1492 "partyaccount map.");
1497 if (str_agent_name.size() <= 0) {
1552 otErr <<
"OTParty::" << __FUNCTION__
1553 <<
": Error: Agent name doesn't match: "
1561 otOut <<
"OTParty::" << __FUNCTION__
1562 <<
": Nothing to harvest, it was already 0 for party: "
1571 otErr <<
"OTParty::" << __FUNCTION__
1572 <<
": Error: Authorizing agent name is blank.\n";
1577 if (
nullptr == pAgent)
1578 otErr <<
"OTParty::" << __FUNCTION__
1579 <<
": Error: Unable to find Authorizing agent ("
1599 otErr <<
"OTParty::" << __FUNCTION__
1600 <<
": Error: Authorizing agent name is blank.\n";
1605 if (
nullptr == pAgent)
1606 otErr <<
"OTParty::" << __FUNCTION__
1607 <<
": Error: Unable to find Authorizing agent ("
1614 otOut <<
"OTParty::" << __FUNCTION__
1615 <<
": Nothing to closeout, it was already 0 for party: "
1638 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: Authorizing "
1639 "agent's name is empty on this party: " <<
GetPartyName()
1646 if (
nullptr == pMainAgent) {
1647 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: Authorizing "
1658 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: Authorizing "
1660 <<
") didn't have an opening transaction #, on party: "
1672 for (
auto& it : m_mapPartyAccounts) {
1677 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: Authorized "
1678 "agent name is blank for account: "
1679 << pPartyAccount->
GetName() <<
" \n";
1689 if (
nullptr == pAgent) {
1690 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: Unable to "
1691 "locate Authorized agent for account: "
1692 << pPartyAccount->
GetName() <<
" \n";
1703 strServerID, *pPartyAccount))
1705 otOut <<
"OTParty::ReserveTransNumsForConfirm: Failure: "
1707 <<
") didn't have a closing transaction #, on party: "
1732 bool bSpecifyAssetID,
bool bSpecifyParties)
const
1735 "<party\n name=\"%s\"\n"
1736 " ownerType=\"%s\"\n"
1739 " openingTransNo=\"%lld\"\n"
1740 " signedCopyProvided=\"%s\"\n"
1741 " authorizingAgent=\"%s\"\n"
1743 " numAgents=\"%d\"\n"
1744 " numAccounts=\"%d\" >\n\n",
1746 bCalculatingID ?
"" : (m_bPartyIsNym ?
"nym" :
"entity"),
1747 (bCalculatingID && !bSpecifyParties) ?
"" : m_str_owner_id.c_str(),
1748 bCalculatingID ? 0 : m_lOpeningTransNo,
1749 (!bCalculatingID && m_strMySignedCopy.
Exists()) ?
"true" :
"false",
1750 bCalculatingID ?
"" : m_str_authorizing_agent.c_str(),
1751 bCalculatingID ? 0 : m_mapAgents.size(), m_mapPartyAccounts.size());
1753 if (!bCalculatingID) {
1754 for (
auto& it : m_mapAgents) {
1761 for (
auto& it : m_mapPartyAccounts) {
1764 pAcct->
Serialize(strAppend, bCalculatingID, bSpecifyAssetID);
1767 if (!bCalculatingID && m_strMySignedCopy.
Exists()) {
1769 strAppend.
Concatenate(
"<mySignedCopy>\n%s</mySignedCopy>\n\n",
1781 for (
auto& it : m_mapPartyAccounts) {
1782 const std::string str_acct_name = it.first;
1784 OT_ASSERT((
nullptr != pAccount) && (str_acct_name.size() > 0));
1797 <<
" / " << str_party_name <<
" \n";
1814 otOut <<
"OTParty::Compare: Opening transaction numbers don't match "
1822 otOut <<
"OTParty::Compare: Party IDs don't match for party "
1832 otOut <<
"OTParty::Compare: Authorizing agent names don't match for "
1844 otOut <<
"OTParty::Compare: Mismatched number of accounts when "
1849 for (
const auto& it : m_mapPartyAccounts) {
1850 const std::string str_acct_name = it.first;
1856 if (
nullptr == p2) {
1857 otOut <<
"OTParty::Compare: Unable to find Account "
1858 << str_acct_name <<
" on rhs, when comparing party "
1863 otOut <<
"OTParty::Compare: Accounts (" << str_acct_name
1864 <<
") don't match when comparing party " <<
GetPartyName()
1882 for (
const auto& it : m_mapPartyAccounts) {
1883 const std::string str_acct_name = it.first;
1892 <<
"OTParty::CopyAcctsToConfirmingParty: Unable to add Account "
1893 << str_acct_name <<
", when copying from *this party "
std::string GetNymID(bool *pBoolSuccess=nullptr) const
bool HasAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
bool DropFinalReceiptToNymboxes(const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
bool LoadAndVerifyAgentNyms(OTPseudonym &theServerNym, mapOfNyms &map_Nyms_Already_Loaded, mapOfNyms &map_NewlyLoaded)
static bool ValidateName(std::string str_name)
bool HasTransactionNum(const int64_t &lInput) const
bool SignContract(OTContract &theInput) const
EXPORT OTAgent * GetAgentByIndex(int32_t nIndex) const
bool AddAgent(OTAgent &theAgent)
bool VerifyAccountsWithTheirAgents(OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
EXPORT std::string GetPartyName(bool *pBoolSuccess=nullptr) const
bool LoadAndVerifyAssetAccounts(OTPseudonym &theServerNym, const OTString &strServerID, mapOfAccounts &map_Accts_Already_Loaded, mapOfAccounts &map_NewlyLoaded)
void RetrieveNymPointer(mapOfNyms &map_Nyms_Already_Loaded)
bool DropServerNoticeToNymbox(bool bSuccessMsg, OTPseudonym &theServerNym, const OTIdentifier &theServerID, const int64_t &lNewTransactionNumber, const int64_t &lInReferenceTo, const OTString &strReference, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
EXPORT void GetIdentifier(OTIdentifier &theIdentifier) const
void ClearTemporaryPointers()
void Serialize(OTString &strAppend, bool bCalculatingID=false, bool bSpecifyAssetID=false) const
EXPORT OTAgent * GetAgent(const std::string &str_agent_name) const
bool ReserveOpeningTransNum(const OTString &strServerID)
EXPORT bool GetNymID(OTIdentifier &theOutput) const
EXPORT bool VerifyOwnerByID(const OTIdentifier &nymId) const
void ClearTemporaryPointers()
bool ReserveTransNumsForConfirm(const OTString &strServerID)
EXPORT const OTString & GetName() const
bool SendNoticeToParty(bool bSuccessMsg, OTPseudonym &theServerNym, const OTIdentifier &theServerID, const int64_t &lNewTransactionNumber, const OTString &strReference, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
void ClearTemporaryPointers()
void CloseoutOpeningNumber(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
bool ReserveClosingTransNum(const OTString &strServerID, OTPartyAccount &thePartyAcct)
OTLOG_IMPORT OTLogStream otOut
OTPseudonym * LoadNym(OTPseudonym &theServerNym)
std::map< std::string, OTPseudonym * > mapOfNyms
bool VerifyOwnershipOfAccount(const OTAccount &theAccount) const
int64_t GetClosingTransNo(std::string str_for_acct_name) const
EXPORT bool IsValidSignerID(const OTIdentifier &theNymID)
bool AddAccount(OTPartyAccount &thePartyAcct)
bool RemoveIssuedNumber(const int64_t &lNumber, const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
void HarvestOpeningNumber(const OTString &strServerID)
EXPORT void Concatenate(const char *arg,...)
std::string GetEntityID(bool *pBoolSuccess=nullptr) const
bool VerifyPartyAcctAuthorization(OTPartyAccount &thePartyAcct, OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
void RegisterAccountsForExecution(OTScript &theScript)
EXPORT bool SignContract(OTContract &theInput) const
EXPORT bool Exists() const
EXPORT bool IsValidSigner(OTPseudonym &theNym)
void HarvestClosingNumbers(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
bool HasAccount(OTAccount &theAccount, OTPartyAccount **ppPartyAccount=nullptr) const
EXPORT bool Compare(const char *compare) const
EXPORT const OTString & GetName()
bool Compare(const OTParty &rhs) const
OTPseudonym * LoadAuthorizingAgentNym(OTPseudonym &theSignerNym, OTAgent **ppAgent=nullptr)
bool Compare(const OTPartyAccount &rhs) const
bool SetPartyName(const std::string &str_party_name_input)
bool HarvestTransactionNumber(const int64_t &lNumber, const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
#define OT_ASSERT_MSG(x, s)
std::map< std::string, OTAccount * > mapOfAccounts
bool HasAuthorizingAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
bool DoesRepresentHimself() const
const OTString & GetAgentName() const
bool HasAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
EXPORT OTPartyAccount * GetAccountByID(const OTIdentifier &theAcctID) const
bool HasAccountByID(const OTIdentifier &theAcctID, OTPartyAccount **ppPartyAccount=nullptr) const
EXPORT std::string GetPartyID(bool *pBoolSuccess=nullptr) const
bool DropFinalReceiptToInboxes(mapOfNyms *pNymMap, const OTString &strServerID, OTPseudonym &theServerNym, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr)
EXPORT OTPartyAccount * GetAccountByAgent(const std::string &str_agent_name)
bool DropFinalReceiptToNymbox(OTSmartContract &theSmartContract, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
EXPORT const char * Get() const
const std::string & GetAuthorizingAgentName() const
EXPORT bool IsAnIndividual() const
OTLOG_IMPORT OTLogStream otErr
EXPORT OTPartyAccount * GetAccount(const std::string &str_acct_name) const
void SetParty(OTParty &theOwnerParty)
void Serialize(OTString &strAppend, bool bCalculatingID=false, bool bSpecifyAssetID=false, bool bSpecifyParties=false) const
const OTString & GetAcctID() const
EXPORT void RegisterForExecution(OTScript &theScript)
bool DropFinalReceiptToInbox(mapOfNyms *pNymMap, const OTString &strServerID, OTPseudonym &theServerNym, OTSmartContract &theSmartContract, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr)
const OTString & GetAssetTypeID() const
bool IsAccountByID(const OTIdentifier &theAcctID) const
void Serialize(OTString &strAppend) const
int32_t GetAccountCount() const
int64_t GetOpeningTransNo() const
EXPORT bool CopyAcctsToConfirmingParty(OTParty &theParty) const
int64_t GetClosingTransNo() const
void HarvestAllTransactionNumbers(const OTString &strServerID)
bool IsAccount(OTAccount &theAccount)
bool HasActiveAgent() const
void SetParty(OTParty &theOwnerParty)
EXPORT OTPartyAccount * GetAccountByIndex(int32_t nIndex)
OTAccount * LoadAccount(OTPseudonym &theSignerNym, const OTString &strServerID)
void GetAllTransactionNumbers(OTNumList &numlistOutput) const
bool HasAuthorizingAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
void RetrieveNymPointers(mapOfNyms &map_Nyms_Already_Loaded)