Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTParty.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OTParty.hpp
4  *
5  */
6 
7 /************************************************************
8  -----BEGIN PGP SIGNED MESSAGE-----
9  Hash: SHA1
10 
11  * OPEN TRANSACTIONS
12  *
13  * Financial Cryptography and Digital Cash
14  * Library, Protocol, API, Server, CLI, GUI
15  *
16  * -- Anonymous Numbered Accounts.
17  * -- Untraceable Digital Cash.
18  * -- Triple-Signed Receipts.
19  * -- Cheques, Vouchers, Transfers, Inboxes.
20  * -- Basket Currencies, Markets, Payment Plans.
21  * -- Signed, XML, Ricardian-style Contracts.
22  * -- Scripted smart contracts.
23  *
24  * Copyright (C) 2010-2013 by "Fellow Traveler" (A pseudonym)
25  *
26  * EMAIL:
28  *
29  * BITCOIN: 1NtTPVVjDsUfDWybS4BwvHpG2pdS9RnYyQ
30  *
31  * KEY FINGERPRINT (PGP Key in license file):
32  * 9DD5 90EB 9292 4B48 0484 7910 0308 00ED F951 BB8E
33  *
34  * OFFICIAL PROJECT WIKI(s):
35  * https://github.com/FellowTraveler/Moneychanger
36  * https://github.com/FellowTraveler/Open-Transactions/wiki
37  *
38  * WEBSITE:
39  * http://www.OpenTransactions.org/
40  *
41  * Components and licensing:
42  * -- Moneychanger..A Java client GUI.....LICENSE:.....GPLv3
43  * -- otlib.........A class library.......LICENSE:...LAGPLv3
44  * -- otapi.........A client API..........LICENSE:...LAGPLv3
45  * -- opentxs/ot....Command-line client...LICENSE:...LAGPLv3
46  * -- otserver......Server Application....LICENSE:....AGPLv3
47  * Github.com/FellowTraveler/Open-Transactions/wiki/Components
48  *
49  * All of the above OT components were designed and written by
50  * Fellow Traveler, with the exception of Moneychanger, which
51  * was contracted out to Vicky C ([email protected]).
52  * The open-source community has since actively contributed.
53  *
54  * -----------------------------------------------------
55  *
56  * LICENSE:
57  * This program is free software: you can redistribute it
58  * and/or modify it under the terms of the GNU Affero
59  * General Public License as published by the Free Software
60  * Foundation, either version 3 of the License, or (at your
61  * option) any later version.
62  *
63  * ADDITIONAL PERMISSION under the GNU Affero GPL version 3
64  * section 7: (This paragraph applies only to the LAGPLv3
65  * components listed above.) If you modify this Program, or
66  * any covered work, by linking or combining it with other
67  * code, such other code is not for that reason alone subject
68  * to any of the requirements of the GNU Affero GPL version 3.
69  * (==> This means if you are only using the OT API, then you
70  * don't have to open-source your code--only your changes to
71  * Open-Transactions itself must be open source. Similar to
72  * LGPLv3, except it applies to software-as-a-service, not
73  * just to distributing binaries.)
74  *
75  * Extra WAIVER for OpenSSL, Lucre, and all other libraries
76  * used by Open Transactions: This program is released under
77  * the AGPL with the additional exemption that compiling,
78  * linking, and/or using OpenSSL is allowed. The same is true
79  * for any other open source libraries included in this
80  * project: complete waiver from the AGPL is hereby granted to
81  * compile, link, and/or use them with Open-Transactions,
82  * according to their own terms, as long as the rest of the
83  * Open-Transactions terms remain respected, with regard to
84  * the Open-Transactions code itself.
85  *
86  * Lucre License:
87  * This code is also "dual-license", meaning that Ben Lau-
88  * rie's license must also be included and respected, since
89  * the code for Lucre is also included with Open Transactions.
90  * See Open-Transactions/src/otlib/lucre/LUCRE_LICENSE.txt
91  * The Laurie requirements are light, but if there is any
92  * problem with his license, simply remove the Lucre code.
93  * Although there are no other blind token algorithms in Open
94  * Transactions (yet. credlib is coming), the other functions
95  * will continue to operate.
96  * See Lucre on Github: https://github.com/benlaurie/lucre
97  * -----------------------------------------------------
98  * You should have received a copy of the GNU Affero General
99  * Public License along with this program. If not, see:
100  * http://www.gnu.org/licenses/
101  *
102  * If you would like to use this software outside of the free
103  * software license, please contact FellowTraveler.
104  * (Unfortunately many will run anonymously and untraceably,
105  * so who could really stop them?)
106  *
107  * DISCLAIMER:
108  * This program is distributed in the hope that it will be
109  * useful, but WITHOUT ANY WARRANTY; without even the implied
110  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
111  * PURPOSE. See the GNU Affero General Public License for
112  * more details.
113 
114  -----BEGIN PGP SIGNATURE-----
115  Version: GnuPG v1.4.9 (Darwin)
116 
117  iQIcBAEBAgAGBQJRSsfJAAoJEAMIAO35UbuOQT8P/RJbka8etf7wbxdHQNAY+2cC
118  vDf8J3X8VI+pwMqv6wgTVy17venMZJa4I4ikXD/MRyWV1XbTG0mBXk/7AZk7Rexk
119  KTvL/U1kWiez6+8XXLye+k2JNM6v7eej8xMrqEcO0ZArh/DsLoIn1y8p8qjBI7+m
120  aE7lhstDiD0z8mwRRLKFLN2IH5rAFaZZUvj5ERJaoYUKdn4c+RcQVei2YOl4T0FU
121  LWND3YLoH8naqJXkaOKEN4UfJINCwxhe5Ke9wyfLWLUO7NamRkWD2T7CJ0xocnD1
122  sjAzlVGNgaFDRflfIF4QhBx1Ddl6wwhJfw+d08bjqblSq8aXDkmFA7HeunSFKkdn
123  oIEOEgyj+veuOMRJC5pnBJ9vV+7qRdDKQWaCKotynt4sWJDGQ9kWGWm74SsNaduN
124  TPMyr9kNmGsfR69Q2Zq/FLcLX/j8ESxU+HYUB4vaARw2xEOu2xwDDv6jt0j3Vqsg
125  x7rWv4S/Eh18FDNDkVRChiNoOIilLYLL6c38uMf1pnItBuxP3uhgY6COm59kVaRh
126  nyGTYCDYD2TK+fI9o89F1297uDCwEJ62U0Q7iTDp5QuXCoxkPfv8/kX6lS6T3y9G
127  M9mqIoLbIQ1EDntFv7/t6fUTS2+46uCrdZWbQ5RjYXdrzjij02nDmJAm2BngnZvd
128  kamH0Y/n11lCvo1oQxM+
129  =uSzz
130  -----END PGP SIGNATURE-----
131  **************************************************************/
132 
133 #ifndef OPENTXS_CORE_SCRIPT_OTPARTY_HPP
134 #define OPENTXS_CORE_SCRIPT_OTPARTY_HPP
135 
136 #include "../OTString.hpp"
137 
138 namespace opentxs
139 {
140 
141 class OTAccount;
142 class OTAgent;
143 class OTIdentifier;
144 class OTNumList;
145 class OTPartyAccount;
146 class OTPseudonym;
147 class OTScript;
148 class OTScriptable;
149 
150 typedef std::map<std::string, OTAccount*> mapOfAccounts;
151 typedef std::map<std::string, OTAgent*> mapOfAgents;
152 typedef std::map<std::string, OTPseudonym*> mapOfNyms;
153 typedef std::map<std::string, OTPartyAccount*> mapOfPartyAccounts;
154 
155 // Party is always either an Owner Nym, or an Owner Entity formed by Contract.
156 //
157 // Either way, the agents are there to represent the interests of the parties.
158 //
159 // This is meant in the sense of "actually" since the agent is not just a
160 // trusted
161 // friend of the party, but is either the party himself (if party is a Nym), OR
162 // is
163 // a voting group or employee that belongs to the party. (If party is an
164 // entity.)
165 // Either way, the point is that in this context, the agent is ACTUALLY
166 // authorized
167 // by the party by virtue of its existence, versus being a "separate but
168 // authorized"
169 // party in the legal sense. No need exists to "grant" the authority since the
170 // authority is already INHERENT.
171 //
172 // A party may also have multiple agents.
173 //
174 class OTParty
175 {
176 private:
177  OTParty(const OTParty&);
178  OTParty& operator=(const OTParty&);
179 
180  std::string* m_pstr_party_name;
181 
182  bool m_bPartyIsNym; // true, is "nym". false, is "entity".
183 
184  std::string m_str_owner_id; // Nym ID or Entity ID.
185  std::string m_str_authorizing_agent; // Contains the name of the authorizing
186  // agent (the one who supplied the
187  // opening Trans#)
188 
189  mapOfAgents m_mapAgents; // These are owned.
190  mapOfPartyAccounts m_mapPartyAccounts; // These are owned. Each contains a
191  // Closing Transaction#.
192 
193  int64_t m_lOpeningTransNo; // Each party (to a smart contract anyway) must
194  // provide an opening transaction #.
195  OTString m_strMySignedCopy; // One party confirms it and sends it over. Then
196  // another confirms it,
197  // which adds his own transaction numbers and signs it. This, unfortunately,
198  // invalidates the original version,
199  // (since the digital signature ceases to verify, once you change the
200  // contents.) So... we store a copy of each
201  // signed agreement INSIDE each party. The server can do the hard work of
202  // comparing them all, though such will
203  // probably occur through a comparison function I'll have to add right here
204  // in this class.
205 
206  OTScriptable* m_pOwnerAgreement; // This Party is owned by an agreement
207  // (OTScriptable-derived.) Convenience
208  // pointer.
209 public:
210  OTParty();
211  EXPORT OTParty(const char* szName, bool bIsOwnerNym, const char* szOwnerID,
212  const char* szAuthAgent, bool bCreateAgent = false);
213  EXPORT OTParty(std::string str_PartyName,
214  OTPseudonym& theNym, // Nym is BOTH owner AND agent, when
215  // using this constructor.
216  std::string str_agent_name, OTAccount* pAccount = nullptr,
217  const std::string* pstr_account_name = nullptr,
218  int64_t lClosingTransNo = 0);
219  virtual ~OTParty();
220  void CleanupAgents();
221  void CleanupAccounts();
222  bool Compare(const OTParty& rhs) const;
223  void Serialize(OTString& strAppend, bool bCalculatingID = false,
224  bool bSpecifyAssetID = false,
225  bool bSpecifyParties = false) const;
226 
227  // Clears temp pointers when I'm done with them, so I don't get stuck
228  // with bad addresses.
229  //
230  void ClearTemporaryPointers();
231  bool SignContract(OTContract& theInput) const; // The party will use its
232  // authorizing agent.
233  // See if a certain transaction number is present.
234  // Checks opening number on party, and closing numbers on his accounts.
235  bool HasTransactionNum(const int64_t& lInput) const;
236  void GetAllTransactionNumbers(OTNumList& numlistOutput) const;
237  // Set aside all the necessary transaction #s from the various Nyms.
238  // (Assumes those Nym pointers are available inside their various agents.)
239  //
240  bool ReserveTransNumsForConfirm(const OTString& strServerID);
241  void HarvestAllTransactionNumbers(const OTString& strServerID);
242  void HarvestOpeningNumber(const OTString& strServerID);
243  void HarvestOpeningNumber(OTAgent& theAgent, const OTString& strServerID);
244  void HarvestOpeningNumber(OTPseudonym& theNym, const OTString& strServerID);
245  void CloseoutOpeningNumber(const OTString& strServerID, bool bSave = false,
246  OTPseudonym* pSignerNym = nullptr);
247  void HarvestClosingNumbers(const OTString& strServerID, bool bSave = false,
248  OTPseudonym* pSignerNym = nullptr);
249  void HarvestClosingNumbers(OTAgent& theAgent, const OTString& strServerID);
250  void HarvestClosingNumbers(OTPseudonym& theNym,
251  const OTString& strServerID);
252  // Iterates through the agents.
253  //
254  bool DropFinalReceiptToNymboxes(const int64_t& lNewTransactionNumber,
255  const OTString& strOrigCronItem,
256  OTString* pstrNote = nullptr,
257  OTString* pstrAttachment = nullptr,
258  OTPseudonym* pActualNym = nullptr);
259  // Iterates through the accounts.
260  //
261  bool DropFinalReceiptToInboxes(mapOfNyms* pNymMap,
262  const OTString& strServerID,
263  OTPseudonym& theServerNym,
264  const int64_t& lNewTransactionNumber,
265  const OTString& strOrigCronItem,
266  OTString* pstrNote = nullptr,
267  OTString* pstrAttachment = nullptr);
268  bool SendNoticeToParty(bool bSuccessMsg, OTPseudonym& theServerNym,
269  const OTIdentifier& theServerID,
270  const int64_t& lNewTransactionNumber,
271  // const int64_t& lInReferenceTo,
272  // We use GetOpenTransNo() now.
273  const OTString& strReference,
274  OTString* pstrNote = nullptr,
275  OTString* pstrAttachment = nullptr,
276  OTPseudonym* pActualNym = nullptr);
277  // This pointer isn't owned -- just stored for convenience.
278  //
280  {
281  return m_pOwnerAgreement;
282  }
284  {
285  m_pOwnerAgreement = &theOwner;
286  }
287  void SetMySignedCopy(const OTString& strMyCopy)
288  {
289  m_strMySignedCopy = strMyCopy;
290  }
292  {
293  return m_strMySignedCopy;
294  }
295  int64_t GetOpeningTransNo() const
296  {
297  return m_lOpeningTransNo;
298  }
299  void SetOpeningTransNo(const int64_t& theNumber)
300  {
301  m_lOpeningTransNo = theNumber;
302  }
303  // There is one of these for each asset account on the party.
304  // You need the acct name to look it up.
305  //
306  int64_t GetClosingTransNo(std::string str_for_acct_name) const;
307  // as used "IN THE SCRIPT."
308  //
309  EXPORT std::string GetPartyName(bool* pBoolSuccess = nullptr)
310  const; // "sales_director", "marketer", etc
311  bool SetPartyName(const std::string& str_party_name_input);
312  // ACTUAL PARTY OWNER (Only ONE of these can be true...)
313  // Debating whether these two functions should be private. (Should it matter
314  // to outsider?)
315  //
316  bool IsNym() const; // If the party is a Nym. (The party is the actual
317  // owner/beneficiary.)
318  bool IsEntity() const; // If the party is an Entity. (Either way, the AGENT
319  // carries out all wishes.)
320  // ACTUAL PARTY OWNER
321  //
322  std::string GetNymID(bool* pBoolSuccess = nullptr) const; // If the party is
323  // a Nym, this is
324  // the
325  // Nym's ID. Otherwise this is false.
326  std::string GetEntityID(bool* pBoolSuccess = nullptr) const; // If party is
327  // an
328  // entity, this is
329  // the entity's
330  // ID. Otherwise
331  // false.
332  // If party is a Nym, this is the NymID. Else return EntityID().
333  EXPORT std::string GetPartyID(bool* pBoolSuccess = nullptr) const;
334  // Some agents are passive (voting groups) and cannot behave actively, and
335  // so cannot do
336  // certain things that only Nyms can do. But they can still act as an agent
337  // in CERTAIN
338  // respects, so they are still allowed to do so. However, likely many
339  // functions will
340  // require that HasActiveAgent() be true for a party to do various actions.
341  // Attempts to
342  // do those actions otherwise will fail.
343  // It's almost a separate kind of party but not worthy of a separate class.
344  //
345  bool HasActiveAgent() const;
346  bool AddAgent(OTAgent& theAgent);
347  int32_t GetAgentCount() const
348  {
349  return static_cast<int32_t>(m_mapAgents.size());
350  }
351  EXPORT OTAgent* GetAgent(const std::string& str_agent_name) const;
352  EXPORT OTAgent* GetAgentByIndex(int32_t nIndex) const;
353  const std::string& GetAuthorizingAgentName() const
354  {
355  return m_str_authorizing_agent;
356  }
357  void SetAuthorizingAgentName(std::string str_agent_name)
358  {
359  m_str_authorizing_agent = str_agent_name;
360  }
361  // If Nym is authorizing agent for Party, set agent's pointer to Nym and
362  // return true.
363  //
364  bool HasAgent(OTPseudonym& theNym,
365  OTAgent** ppAgent = nullptr) const; // If Nym is agent for
366  // Party,
367  // set agent's pointer to Nym
368  // and return true.
369  bool HasAgentByNymID(const OTIdentifier& theNymID,
370  OTAgent** ppAgent = nullptr) const;
371  bool HasAuthorizingAgent(OTPseudonym& theNym,
372  OTAgent** ppAgent = nullptr) const;
373  bool HasAuthorizingAgentByNymID(const OTIdentifier& theNymID,
374  OTAgent** ppAgent = nullptr)
375  const; // ppAgent lets you get the agent ptr if it was there.
376  // Load the authorizing agent from storage. Set agent's pointer to Nym.
377  //
379  OTAgent** ppAgent = nullptr);
380  // Often we endeavor to avoid loading the same Nym twice, and a higher-level
381  // function
382  // will ask an OTParty for a list of all the Nym pointers that it already
383  // has,
384  // so they can be checked for various things if they are already loaded
385  // (when they are needed)
386  // without having to load them again in order to check those things, purely
387  // out of blindness
388  // to the fact that they had infact already been loaded and were floating
389  // around in memory somewhere.
390  //
391  void RetrieveNymPointers(mapOfNyms& map_Nyms_Already_Loaded);
392  bool AddAccount(OTPartyAccount& thePartyAcct);
393  EXPORT bool AddAccount(const OTString& strAgentName,
394  const OTString& strName, const OTString& strAcctID,
395  const OTString& strAssetTypeID,
396  int64_t lClosingTransNo);
397  EXPORT bool AddAccount(const OTString& strAgentName, const char* szAcctName,
398  OTAccount& theAccount, int64_t lClosingTransNo);
399 
400  int32_t GetAccountCount() const
401  {
402  return static_cast<int32_t>(m_mapPartyAccounts.size());
403  } // returns total of all accounts owned by this party.
404  int32_t GetAccountCount(std::string str_agent_name)
405  const; // Only counts accounts authorized for str_agent_name.
406  EXPORT OTPartyAccount* GetAccount(
407  const std::string& str_acct_name) const; // Get PartyAcct by name.
408  EXPORT OTPartyAccount* GetAccountByIndex(int32_t nIndex); // by index
410  const std::string& str_agent_name); // by agent name
412  const OTIdentifier& theAcctID) const; // by asset acct id
413  // If account is present for Party, set account's pointer to theAccount and
414  // return true.
415  //
416  bool HasAccount(OTAccount& theAccount,
417  OTPartyAccount** ppPartyAccount = nullptr) const;
418  bool HasAccountByID(const OTIdentifier& theAcctID,
419  OTPartyAccount** ppPartyAccount = nullptr) const;
420  bool VerifyOwnershipOfAccount(const OTAccount& theAccount) const;
421  bool VerifyAccountsWithTheirAgents(OTPseudonym& theSignerNym,
422  const OTString& strServerID,
423  bool bBurnTransNo = false);
424  EXPORT bool CopyAcctsToConfirmingParty(OTParty& theParty)
425  const; // When confirming a party, a new version replaces the original.
426  // This is part of that process.
427  void RegisterAccountsForExecution(OTScript& theScript);
428  bool LoadAndVerifyAgentNyms(OTPseudonym& theServerNym,
429  mapOfNyms& map_Nyms_Already_Loaded,
430  mapOfNyms& map_NewlyLoaded);
431 
432  bool LoadAndVerifyAssetAccounts(OTPseudonym& theServerNym,
433  const OTString& strServerID,
434  mapOfAccounts& map_Accts_Already_Loaded,
435  mapOfAccounts& map_NewlyLoaded);
436 
437  // ------------- OPERATIONS -------------
438 
439  // Below this point, have all the actions that a party might do.
440  //
441  // (The party will internally call the appropriate agent according to its
442  // own rules.
443  // the script should not care how the party chooses its agents. At the most,
444  // the script
445  // only cares that the party has an active agent, but does not actually
446  // speak directly
447  // to said agent.)
448 };
449 
450 } // namespace opentxs
451 
452 #endif // OPENTXS_CORE_SCRIPT_OTPARTY_HPP
std::string GetNymID(bool *pBoolSuccess=nullptr) const
Definition: OTParty.cpp:541
bool HasAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
Definition: OTParty.cpp:792
bool DropFinalReceiptToNymboxes(const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr)
Definition: OTParty.cpp:1014
bool LoadAndVerifyAgentNyms(OTPseudonym &theServerNym, mapOfNyms &map_Nyms_Already_Loaded, mapOfNyms &map_NewlyLoaded)
Definition: OTParty.cpp:1197
bool HasTransactionNum(const int64_t &lInput) const
Definition: OTParty.cpp:150
bool SignContract(OTContract &theInput) const
Definition: OTParty.cpp:1423
EXPORT OTAgent * GetAgentByIndex(int32_t nIndex) const
Definition: OTParty.cpp:630
bool AddAgent(OTAgent &theAgent)
Definition: OTParty.cpp:307
bool VerifyAccountsWithTheirAgents(OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
Definition: OTParty.cpp:1370
EXPORT std::string GetPartyName(bool *pBoolSuccess=nullptr) const
Definition: OTParty.cpp:489
bool LoadAndVerifyAssetAccounts(OTPseudonym &theServerNym, const OTString &strServerID, mapOfAccounts &map_Accts_Already_Loaded, mapOfAccounts &map_NewlyLoaded)
Definition: OTParty.cpp:1094
EXPORT OTAgent * GetAgent(const std::string &str_agent_name) const
Definition: OTParty.cpp:609
std::map< std::string, OTPartyAccount * > mapOfPartyAccounts
Definition: OTParty.hpp:153
void SetOwnerAgreement(OTScriptable &theOwner)
Definition: OTParty.hpp:283
void ClearTemporaryPointers()
Definition: OTParty.cpp:468
bool ReserveTransNumsForConfirm(const OTString &strServerID)
Definition: OTParty.cpp:1631
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)
Definition: OTParty.cpp:1057
void SetAuthorizingAgentName(std::string str_agent_name)
Definition: OTParty.hpp:357
bool IsEntity() const
Definition: OTParty.cpp:532
void CloseoutOpeningNumber(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
Definition: OTParty.cpp:1595
std::map< std::string, OTPseudonym * > mapOfNyms
Definition: OTWallet.hpp:161
bool VerifyOwnershipOfAccount(const OTAccount &theAccount) const
Definition: OTParty.cpp:934
int32_t GetAgentCount() const
Definition: OTParty.hpp:347
int64_t GetClosingTransNo(std::string str_for_acct_name) const
Definition: OTParty.cpp:416
bool IsNym() const
Definition: OTParty.cpp:526
bool AddAccount(OTPartyAccount &thePartyAcct)
Definition: OTParty.cpp:374
void HarvestOpeningNumber(const OTString &strServerID)
Definition: OTParty.cpp:1568
void CleanupAccounts()
Definition: OTParty.cpp:445
std::string GetEntityID(bool *pBoolSuccess=nullptr) const
Definition: OTParty.cpp:556
void RegisterAccountsForExecution(OTScript &theScript)
Definition: OTParty.cpp:1779
void HarvestClosingNumbers(const OTString &strServerID, bool bSave=false, OTPseudonym *pSignerNym=nullptr)
Definition: OTParty.cpp:1449
bool HasAccount(OTAccount &theAccount, OTPartyAccount **ppPartyAccount=nullptr) const
Definition: OTParty.cpp:755
void SetMySignedCopy(const OTString &strMyCopy)
Definition: OTParty.hpp:287
bool Compare(const OTParty &rhs) const
Definition: OTParty.cpp:1791
std::map< std::string, OTAgent * > mapOfAgents
Definition: OTParty.hpp:151
OTPseudonym * LoadAuthorizingAgentNym(OTPseudonym &theSignerNym, OTAgent **ppAgent=nullptr)
Definition: OTParty.cpp:899
virtual ~OTParty()
Definition: OTParty.cpp:457
bool SetPartyName(const std::string &str_party_name_input)
Definition: OTParty.cpp:507
std::map< std::string, OTAccount * > mapOfAccounts
Definition: OTWallet.hpp:157
void CleanupAgents()
Definition: OTParty.cpp:433
bool HasAuthorizingAgentByNymID(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
Definition: OTParty.cpp:845
bool HasAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
Definition: OTParty.cpp:776
EXPORT OTPartyAccount * GetAccountByID(const OTIdentifier &theAcctID) const
Definition: OTParty.cpp:721
bool HasAccountByID(const OTIdentifier &theAcctID, OTPartyAccount **ppPartyAccount=nullptr) const
Definition: OTParty.cpp:736
EXPORT std::string GetPartyID(bool *pBoolSuccess=nullptr) const
Definition: OTParty.cpp:571
bool DropFinalReceiptToInboxes(mapOfNyms *pNymMap, const OTString &strServerID, OTPseudonym &theServerNym, const int64_t &lNewTransactionNumber, const OTString &strOrigCronItem, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr)
Definition: OTParty.cpp:967
EXPORT OTPartyAccount * GetAccountByAgent(const std::string &str_agent_name)
Definition: OTParty.cpp:701
const std::string & GetAuthorizingAgentName() const
Definition: OTParty.hpp:353
EXPORT OTPartyAccount * GetAccount(const std::string &str_acct_name) const
Definition: OTParty.cpp:653
void Serialize(OTString &strAppend, bool bCalculatingID=false, bool bSpecifyAssetID=false, bool bSpecifyParties=false) const
Definition: OTParty.cpp:1731
const OTString & GetMySignedCopy()
Definition: OTParty.hpp:291
int32_t GetAccountCount() const
Definition: OTParty.hpp:400
int64_t GetOpeningTransNo() const
Definition: OTParty.hpp:295
EXPORT bool CopyAcctsToConfirmingParty(OTParty &theParty) const
Definition: OTParty.cpp:1877
void HarvestAllTransactionNumbers(const OTString &strServerID)
Definition: OTParty.cpp:1587
bool HasActiveAgent() const
Definition: OTParty.cpp:592
void SetOpeningTransNo(const int64_t &theNumber)
Definition: OTParty.hpp:299
EXPORT OTPartyAccount * GetAccountByIndex(int32_t nIndex)
Definition: OTParty.cpp:677
OTScriptable * GetOwnerAgreement()
Definition: OTParty.hpp:279
void GetAllTransactionNumbers(OTNumList &numlistOutput) const
Definition: OTParty.cpp:165
bool HasAuthorizingAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
Definition: OTParty.cpp:814
void RetrieveNymPointers(mapOfNyms &map_Nyms_Already_Loaded)
Definition: OTParty.cpp:879