Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTScriptable.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OTScriptable.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_OTSCRIPTABLE_HPP
134 #define OPENTXS_CORE_SCRIPT_OTSCRIPTABLE_HPP
135 
136 #include "../OTContract.hpp"
137 
138 namespace opentxs
139 {
140 
141 class OTAccount;
142 class OTAgent;
143 class OTBylaw;
144 class OTClause;
145 class OTParty;
146 class OTPartyAccount;
147 class OTScript;
149 
150 typedef std::map<std::string, OTBylaw*> mapOfBylaws;
151 typedef std::map<std::string, OTClause*> mapOfClauses;
152 typedef std::map<std::string, OTParty*> mapOfParties;
153 typedef std::map<std::string, OTVariable*> mapOfVariables;
154 
155 class OTScriptable : public OTContract
156 {
157 private: // Private prevents erroneous use by other classes.
158  typedef OTContract ot_super;
159 
160 protected:
161  mapOfParties m_mapParties; // The parties to the contract. Could be Nyms, or
162  // other entities. May be rep'd by an Agent.
163  mapOfBylaws m_mapBylaws; // The Bylaws for this contract.
164 
165  // While calculating the ID of smart contracts (and presumably other
166  // scriptables)
167  // we remove specifics such as asset types, asset accounts, Nym IDs,
168  // stashes, etc.
169  // We override OTContract::CalculateContractID(), where we set
170  // m_bCalculatingID to
171  // true (it's normally false). Then we call UpdateContents(), which knows to
172  // produce
173  // an empty version of the contract if m_bCalculatingID is true. Then we
174  // hash that
175  // in order to get the contract ID, and then we set m_bCalculatingID back to
176  // false
177  // again.
178  //
179  // HOWEVER, there may be more options than with baskets (which also use the
180  // above
181  // trick. Should the smart contract specify a specific asset type, or should
182  // it leave
183  // the asset type blank? Should it specify certain parties, or should it
184  // leave the
185  // parties blank? I think the accounts should always be blank for
186  // calculating ID.
187  // And the agents should. And stashes which should be blank in new contracts
188  // (always.)
189  // But for asset types and parties, shouldn't people be able to specify, for
190  // a smart
191  // contract template, whether the asset types are part of the contract or
192  // whether they
193  // are left blank?
194  // Furthermore, doesn't this mean that variables need to ALWAYS store their
195  // INITIAL
196  // value, since they can change over time? We DO want to figure the
197  // variable's initial
198  // value into the contract ID, but we do NOT want to figure the variable's
199  // CURRENT value
200  // into that ID (because then comparing the IDs will fail once the variables
201  // change.)
202  //
203  // Therefore, there needs to be a variable on the scriptable itself which
204  // determines
205  // the template type of the scriptable: m_bSpecifyAssetID and
206  // m_bSpecifyParties, which
207  // must each be saved individually on OTScriptable.
208  //
209  // Agents should be entirely removed during contract ID calculating process,
210  // since
211  // the Parties can already be specified, and since they can choose their
212  // agents at the
213  // time of signing -- which are otherwise irrelevant since only the parties
214  // are liable.
215  //
216  // Accounts, conversely, CAN exist on the contract while calculating its ID,
217  // but the
218  // actual account IDs will be left blank and the asset type IDs will be left
219  // blank
220  // if m_bSpecifyAssetID is false. (Just as Parties' Owner IDs will be left
221  // blank
222  // if m_bSpecifyParties is false.)
223  //
224  // Transaction numbers on parties AND accounts should be set to 0 during
225  // calculation
226  // of contract ID. Agent name should be left blank on both of those as well.
227  //
228  // On OTParty, signed copy can be excluded. All agents can be excluded.
229  // Authorizing agent
230  // can be excluded and Owner ID is conditional on m_bSpecifyParties. (Party
231  // name is kept.)
232  // m_bPartyIsNym is conditional and so is m_lOpeningTransNo.
233  //
234  bool m_bCalculatingID; // NOT serialized. Used during ID calculation.
235 
236  bool m_bSpecifyAssetID; // Serialized. See above note.
237  bool m_bSpecifyParties; // Serialized. See above note.
238 
239  // return -1 if error, 0 if nothing, and 1 if the node was processed.
240  virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader*& xml);
241 
242  OTString m_strLabel; // OTSmartContract can put its trans# here. (Allowing
243  // us to use it in the OTScriptable methods where any
244  // smart contract would normally want to log its
245  // transaction #, not just the clause name.)
246 public:
247  EXPORT virtual void SetDisplayLabel(const std::string* pstrLabel = nullptr);
248  int32_t GetPartyCount() const
249  {
250  return static_cast<int32_t>(m_mapParties.size());
251  }
252  int32_t GetBylawCount() const
253  {
254  return static_cast<int32_t>(m_mapBylaws.size());
255  }
256  EXPORT virtual bool AddParty(OTParty& theParty); // Takes ownership.
257  EXPORT virtual bool AddBylaw(OTBylaw& theBylaw); // takes ownership.
258  EXPORT virtual bool ConfirmParty(OTParty& theParty); // Takes ownership.
259  EXPORT OTParty* GetParty(std::string str_party_name) const;
260  EXPORT OTBylaw* GetBylaw(std::string str_bylaw_name) const;
261  EXPORT OTClause* GetClause(std::string str_clause_name) const;
262  EXPORT OTParty* GetPartyByIndex(int32_t nIndex) const;
263  EXPORT OTBylaw* GetBylawByIndex(int32_t nIndex) const;
265  OTPseudonym& theNym, OTAgent** ppAgent = nullptr) const;
267  OTPseudonym& theNym, OTAgent** ppAgent = nullptr) const;
269  OTAccount& theAccount, OTPartyAccount** ppPartyAccount = nullptr) const;
271  OTAgent** ppAgent = nullptr) const;
273  const OTIdentifier& theNymID, OTAgent** ppAgent = nullptr) const;
275  const OTIdentifier& theAcctID,
276  OTPartyAccount** ppPartyAccount = nullptr) const;
277  OTAgent* GetAgent(std::string str_agent_name) const;
278  OTPartyAccount* GetPartyAccount(std::string str_acct_name) const;
279  OTPartyAccount* GetPartyAccountByID(const OTIdentifier& theAcctID) const;
280  // This function returns the count of how many trans#s a Nym needs in order
281  // to confirm as
282  // a specific agent for a contract. (An opening number is needed for every
283  // party of which
284  // agent is the authorizing agent, plus a closing number for every acct of
285  // which agent is the
286  // authorized agent.)
287  //
288  EXPORT int32_t
289  GetCountTransNumsNeededForAgent(std::string str_agent_name) const;
290  // Verifies that Nym is actually an agent for this agreement.
291  // (Verifies that Nym has signed this agreement, if it's a trade or a
292  // payment plan, OR
293  // that the authorizing agent for Nym's party has done so,
294  // and in that case, that theNym is listed as an agent for that party.)
295  // Basically this means that the agreement's owner approves of theNym.
296  //
297  EXPORT virtual bool VerifyNymAsAgent(
298  OTPseudonym& theNym, OTPseudonym& theSignerNym,
299  mapOfNyms* pmap_ALREADY_LOADED = nullptr) const;
300 
301  // NEED TO CALL BOTH METHODS. (above / below)
302 
303  // Verifies that theNym is actually an agent for theAccount, according to
304  // the PARTY.
305  // Also verifies that theNym is an agent for theAccount, according to the
306  // ACCOUNT.
307  //
308  EXPORT virtual bool VerifyNymAsAgentForAccount(OTPseudonym& theNym,
309  OTAccount& theAccount) const;
311  OTParty& theParty, // The party that supposedly is authorized for this
312  // supposedly executed agreement.
313  OTPseudonym& theSignerNym, // For verifying signature on the authorizing
314  // Nym, when loading it
315  const OTString& strServerID, // For verifying issued num, need the
316  // serverID the # goes with.
317  mapOfNyms* pmap_ALREADY_LOADED = nullptr, // If some nyms are already
318  // loaded, pass them here so
319  // we don't
320  // load them twice on accident.
321  mapOfNyms* pmap_NEWLY_LOADED = nullptr, // If some nyms had to be
322  // loaded, then they will be
323  // deleted,
324  // too. UNLESS you pass a map here, in which case they will
325  // instead be added to this map. (But if you do that, then you
326  // must delete them yourself after calling this function.)
327  bool bBurnTransNo = false); // In OTServer::VerifySmartContract(), it
328  // not only wants to
329  // verify the # is properly issued, but it additionally
330  // wants to see that it hasn't been USED yet -- AND it wants
331  // to burn it, so it can't be used again! This bool allows
332  // you to tell the function whether or not to do that.
333 
335  OTPartyAccount& thePartyAcct, // The party is assumed to have been
336  // verified already via
337  // VerifyPartyAuthorization()
338  OTPseudonym& theSignerNym, // For verifying signature on the authorized
339  // Nym
340  const OTString& strServerID, // For verifying issued num, need the
341  // serverID the # goes with.
342  bool bBurnTransNo = false); // In OTServer::VerifySmartContract(), it
343  // not only wants to
344  // verify the closing # is properly issued, but it
345  // additionally wants to see that it hasn't been USED yet --
346  // AND it wants to burn it, so it can't be used again! This
347  // bool allows you to tell the function whether or not to do
348  // that.
350  EXPORT bool AllPartiesHaveSupposedlyConfirmed();
351  // Often we endeavor to avoid loading the same Nym twice, and a higher-level
352  // function
353  // will ask an OTScriptable for a list of all the Nym pointers that it
354  // already has,
355  // so they can be checked for various things if they are already loaded
356  // (when they are needed)
357  // without having to load them again in order to check those things, purely
358  // out of blindness
359  // to the fact that they had infact already been loaded and were floating
360  // around in memory somewhere.
361  //
362  void RetrieveNymPointers(mapOfNyms& map_Nyms_Already_Loaded);
363 
364  void ClearTemporaryPointers();
365  // Look up all clauses matching a specific hook.
366  // (Across all Bylaws) Automatically removes any duplicates.
367  // That is, you can have multiple clauses registered to the same
368  // hook name, but you can NOT have the same clause name repeated
369  // multiple times in theResults. Each clause can only trigger once.
370  //
371  bool GetHooks(std::string str_HookName, mapOfClauses& theResults);
372  OTClause* GetCallback(std::string str_CallbackName); // See if a
373  // scripted
374  // clause was
375  // provided for
376  // any given
377  // callback name.
378  OTVariable* GetVariable(std::string str_VarName); // See if a variable
379  // exists for a
380  // given variable
381  // name.
382  bool IsDirty() const; // So you can tell if any of the persistent or
383  // important variables have CHANGED since it was last
384  // set clean.
385  bool IsDirtyImportant() const; // So you can tell if ONLY the IMPORTANT
386  // variables have CHANGED since it was last
387  // set clean.
388  void SetAsClean(); // Sets the variables as clean, so you can check later
389  // and see if any have been changed (if it's DIRTY
390  // again.)
391  EXPORT bool SendNoticeToAllParties(
392  bool bSuccessMsg, OTPseudonym& theServerNym,
393  const OTIdentifier& theServerID, const int64_t& lNewTransactionNumber,
394  // const int64_t& lInReferenceTo, //
395  // each party has its own opening trans #.
396  const OTString& strReference, OTString* pstrNote = nullptr,
397  OTString* pstrAttachment = nullptr,
398  OTPseudonym* pActualNym = nullptr) const;
399  // This is an OT Native call party_may_execute_clause
400  // It returns true/false whether party is allowed to execute clause.
401  // The default return value, for a legitimate party, is true.
402  // If you want to override that behavior, add a script callback named
403  // callback_party_may_execute_clause to your OTScriptable.
404  // CanExecuteClause will call ExecuteCallback() if that script exists, so
405  // the script can reply true/false.
406  //
407  EXPORT bool CanExecuteClause(std::string str_party_name,
408  std::string str_clause_name); // This calls (if
409  // available) the
410  // scripted clause:
411  // bool party_may_execute_clause(party_name,
412  // clause_name)
413 
414  //
415  // Also: callback_party_may_execute_clause should expect two parameters:
416  // param_party_name and param_clause_name, both strings.
417  // Also: callback_party_may_execute_clause should return a bool.
418 
419  bool ExecuteCallback(OTClause& theCallbackClause,
420  mapOfVariables& theParameters,
421  OTVariable& varReturnVal);
422 
423  EXPORT virtual void RegisterOTNativeCallsWithScript(OTScript& theScript);
424  EXPORT virtual bool Compare(OTScriptable& rhs) const;
425  EXPORT static OTScriptable* InstantiateScriptable(const OTString& strInput);
426 
427  // Make sure a string contains only alpha, numeric, or '_'
428  // And make sure it's not blank. This is for script variable names, clause
429  // names, party names, etc.
430  //
431  static bool ValidateName(std::string str_name);
432  // For use from inside server-side scripts.
433  //
434  static std::string GetTime(); // Returns a string, containing seconds as
435  // int32_t. (Time in seconds.)
436  OTScriptable();
437  virtual ~OTScriptable();
438 
439  void UpdateContentsToString(OTString& strAppend, bool bCalculatingID) const;
440  EXPORT virtual void CalculateContractID(OTIdentifier& newID) const;
441 
442  virtual void Release();
443  void Release_Scriptable();
444  virtual void UpdateContents();
445  virtual bool SaveContractWallet(std::ofstream& ofs) const;
446 };
447 
448 } // namespace opentxs
449 
450 #endif // OPENTXS_CORE_SCRIPT_OTSCRIPTABLE_HPP
OTParty * FindPartyBasedOnNymIDAsAgent(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
EXPORT bool CanExecuteClause(std::string str_party_name, std::string str_clause_name)
static bool ValidateName(std::string str_name)
virtual EXPORT bool AddParty(OTParty &theParty)
EXPORT bool SendNoticeToAllParties(bool bSuccessMsg, OTPseudonym &theServerNym, const OTIdentifier &theServerID, const int64_t &lNewTransactionNumber, const OTString &strReference, OTString *pstrNote=nullptr, OTString *pstrAttachment=nullptr, OTPseudonym *pActualNym=nullptr) const
EXPORT bool VerifyThisAgainstAllPartiesSignedCopies()
EXPORT OTParty * FindPartyBasedOnNymAsAuthAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
static EXPORT OTScriptable * InstantiateScriptable(const OTString &strInput)
EXPORT bool AllPartiesHaveSupposedlyConfirmed()
virtual bool SaveContractWallet(std::ofstream &ofs) const
EXPORT OTBylaw * GetBylaw(std::string str_bylaw_name) const
std::map< std::string, OTVariable * > mapOfVariables
Definition: OTBylaw.hpp:146
virtual EXPORT void CalculateContractID(OTIdentifier &newID) const
virtual EXPORT void RegisterOTNativeCallsWithScript(OTScript &theScript)
EXPORT int32_t GetCountTransNumsNeededForAgent(std::string str_agent_name) const
std::map< std::string, OTPseudonym * > mapOfNyms
Definition: OTWallet.hpp:161
virtual EXPORT bool Compare(OTScriptable &rhs) const
std::map< std::string, OTClause * > mapOfClauses
Definition: OTBylaw.hpp:145
static std::string GetTime()
bool VerifyPartyAcctAuthorization(OTPartyAccount &thePartyAcct, OTPseudonym &theSignerNym, const OTString &strServerID, bool bBurnTransNo=false)
mapOfParties m_mapParties
EXPORT OTClause * GetClause(std::string str_clause_name) const
int32_t GetBylawCount() const
bool ExecuteCallback(OTClause &theCallbackClause, mapOfVariables &theParameters, OTVariable &varReturnVal)
int32_t GetPartyCount() const
bool VerifyPartyAuthorization(OTParty &theParty, OTPseudonym &theSignerNym, const OTString &strServerID, mapOfNyms *pmap_ALREADY_LOADED=nullptr, mapOfNyms *pmap_NEWLY_LOADED=nullptr, bool bBurnTransNo=false)
void UpdateContentsToString(OTString &strAppend, bool bCalculatingID) const
OTParty * FindPartyBasedOnAccountID(const OTIdentifier &theAcctID, OTPartyAccount **ppPartyAccount=nullptr) const
virtual EXPORT void SetDisplayLabel(const std::string *pstrLabel=nullptr)
void RetrieveNymPointers(mapOfNyms &map_Nyms_Already_Loaded)
OTParty * FindPartyBasedOnAccount(OTAccount &theAccount, OTPartyAccount **ppPartyAccount=nullptr) const
OTClause * GetCallback(std::string str_CallbackName)
OTVariable * GetVariable(std::string str_VarName)
EXPORT OTParty * GetParty(std::string str_party_name) const
virtual void UpdateContents()
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
virtual void Release()
virtual EXPORT bool VerifyNymAsAgent(OTPseudonym &theNym, OTPseudonym &theSignerNym, mapOfNyms *pmap_ALREADY_LOADED=nullptr) const
virtual EXPORT bool VerifyNymAsAgentForAccount(OTPseudonym &theNym, OTAccount &theAccount) const
bool IsDirtyImportant() const
EXPORT OTParty * FindPartyBasedOnNymAsAgent(OTPseudonym &theNym, OTAgent **ppAgent=nullptr) const
OTAgent * GetAgent(std::string str_agent_name) const
EXPORT OTParty * GetPartyByIndex(int32_t nIndex) const
bool GetHooks(std::string str_HookName, mapOfClauses &theResults)
OTParty * FindPartyBasedOnNymIDAsAuthAgent(const OTIdentifier &theNymID, OTAgent **ppAgent=nullptr) const
OTPartyAccount * GetPartyAccountByID(const OTIdentifier &theAcctID) const
EXPORT OTBylaw * GetBylawByIndex(int32_t nIndex) const
OTPartyAccount * GetPartyAccount(std::string str_acct_name) const
virtual EXPORT bool ConfirmParty(OTParty &theParty)
virtual EXPORT bool AddBylaw(OTBylaw &theBylaw)
std::map< std::string, OTBylaw * > mapOfBylaws
std::map< std::string, OTParty * > mapOfParties
Definition: OTScript.hpp:155