Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTSmartContract.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OTSmartContract.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_OTSMARTCONTRACT_HPP
134 #define OPENTXS_CORE_SCRIPT_OTSMARTCONTRACT_HPP
135 
136 #include "../AccountList.hpp"
137 #include "../cron/OTCronItem.hpp"
138 
139 namespace opentxs
140 {
141 
142 class OTAccount;
143 class OTParty;
144 class OTPseudonym;
145 class OTStash;
146 
147 typedef std::map<std::string, OTAccount*> mapOfAccounts;
148 typedef std::map<std::string, OTStash*> mapOfStashes;
149 
151 {
152 private: // Private prevents erroneous use by other classes.
153  typedef OTCronItem ot_super;
154 
155 private:
156  // In OTSmartContract, none of this normal crap is used.
157  // The Sender/Recipient are unused.
158  // The Opening and Closing Trans#s are unused.
159  //
160  // Instead, all that stuff goes through OTParty list (each with agents
161  // and accounts) and OTBylaw list (each with clauses and variables.)
162  // Todo: convert existing payment plan and markets to use this system since
163  // it is much cleaner.
164  //
165  // OTIdentifier m_RECIPIENT_ACCT_ID;
166  // OTIdentifier m_RECIPIENT_USER_ID;
167  // This is where the scripts inside the smart contract can stash money,
168  // after it starts operating.
169  //
170  mapOfStashes m_mapStashes; // The server will NOT allow any smart contract
171  // to be activated unless these lists are empty.
172  // A smart contract may have any number of "stashes" which are stored by
173  // name. Each stash
174  // can be queried for balance for ANY ASSET TYPE. So stash "alice" might
175  // have 5 asset types
176  // in it, AND stash "bob" might also have 5 asset types stored in it.
177  AccountList m_StashAccts; // The actual accounts where stash funds are
178  // stored
179  // (so they will turn up properly on an audit.)
180  // Assuming that Alice and Bob both use the same asset types, there will be
181  // 5 stash accounts here,
182  // not 10. That's because, even if you create a thousand stashes, if they
183  // use the same 2 asset types
184  // then OT is smart enough here to only create 2 stash accounts. The rest of
185  // the information is
186  // stored in m_mapStashes, not in the accounts themselves, which are only
187  // reserves for those stashes.
188  OTString m_strLastSenderUser; // These four strings are here so that each
189  // sender or recipient (of a transfer of
190  // funds)
191  OTString m_strLastSenderAcct; // is clearly saved in each inbox receipt.
192  // That way, if the receipt has a monetary
193  // value, then
194  OTString m_strLastRecipientUser; // we know who was sending and who was
195  // receiving. Also, if a STASH was the last
196  // action, then
197  OTString m_strLastRecipientAcct; // the sender (or recipient) will be blank,
198  // signifying that the source or
199  // destination was a stash.
200 
201  // If onProcess() is on a timer (say, to wake up in a week) then this will
202  // contain the
203  time64_t m_tNextProcessDate; // date that it WILL be, in a week. (Or zero.)
204 
205  // For moving money from one nym's account to another.
206  // it is also nearly identically copied in OTPaymentPlan.
207  bool MoveFunds(const mapOfNyms& map_NymsAlreadyLoaded,
208  const int64_t& lAmount, const OTIdentifier& SOURCE_ACCT_ID,
209  const OTIdentifier& SENDER_USER_ID,
210  const OTIdentifier& RECIPIENT_ACCT_ID,
211  const OTIdentifier& RECIPIENT_USER_ID);
212 
213 protected:
214  virtual void onActivate(); // called by OTCronItem::HookActivationOnCron().
215 
216  virtual void onFinalReceipt(OTCronItem& theOrigCronItem,
217  const int64_t& lNewTransactionNumber,
218  OTPseudonym& theOriginator,
219  OTPseudonym* pRemover);
220  virtual void onRemovalFromCron();
221  // Above are stored the user and acct IDs of the last sender and recipient
222  // of funds.
223  // (It's stored there so that the info will be available on receipts.)
224  // This function clears those values. Used internally to this class.
225  //
227  // (These two are lower level, and used by SetNextProcessTime).
228  void SetNextProcessDate(const time64_t& tNEXT_DATE)
229  {
230  m_tNextProcessDate = tNEXT_DATE;
231  }
233  {
234  return m_tNextProcessDate;
235  }
236 
237 public:
238  virtual void SetDisplayLabel(const std::string* pstrLabel = nullptr);
239  // FOR RECEIPTS
240  // These IDs are stored for cases where this Cron Item is sitting in a
241  // receipt
242  // in an inbox somewhere, so that, whether the payment was a success or
243  // failure,
244  // we can see the intended sender/recipient user/acct IDs. They are cleared
245  // and
246  // then set right when a MoveAcctFunds() or StashAcctFunds() is being
247  // performed.
248  //
250  {
251  return m_strLastSenderUser;
252  }
254  {
255  return m_strLastSenderAcct;
256  }
258  {
259  return m_strLastRecipientUser;
260  }
262  {
263  return m_strLastRecipientAcct;
264  }
265  int32_t GetCountStashes() const;
266  int32_t GetCountStashAccts() const;
267  // Merchant Nym is passed here so we can verify the signature before
268  // confirming.
269  // These notes are from OTAgreement/OTPaymentPlan but they are still
270  // relevant:
271  //
272  // This function verifies both Nyms and both signatures.
273  // Due to the peculiar nature of how OTAgreement/OTPaymentPlan works, there
274  // are two signed
275  // copies stored. The merchant signs first, adding his transaction numbers
276  // (2), and then he
277  // sends it to the customer, who also adds two numbers and signs. (Also
278  // resetting the creation date.)
279  // The problem is, adding the additional transaction numbers invalidates the
280  // first (merchant's)
281  // signature.
282  // The solution is, when the customer confirms the agreement, he stores an
283  // internal copy of the
284  // merchant's signed version. This way later, in VERIFY AGREEMENT, the
285  // internal copy can be loaded,
286  // and BOTH Nyms can be checked to verify that BOTH transaction numbers are
287  // valid for each.
288  // The two versions of the contract can also be compared to each other, to
289  // make sure that none of
290  // the vital terms, values, clauses, etc are different between the two.
291  //
292  virtual bool Compare(OTScriptable& rhs) const;
293  // From OTCronItem (parent class of this)
294  virtual bool CanRemoveItemFromCron(OTPseudonym& theNym);
295 
296  virtual void HarvestOpeningNumber(OTPseudonym& theNym); // Used on
297  // client-side.
298  virtual void HarvestClosingNumbers(OTPseudonym& theNym); // Used on
299  // client-side.
300 
302  OTPseudonym* pSignerNym = nullptr); // Server-side. Similar to below:
303  void HarvestClosingNumbers(OTPseudonym* pSignerNym = nullptr,
304  std::set<OTParty*>* pFailedParties =
305  nullptr); // Used on server-side. Assumes the
306  // related Nyms are already loaded and
307  // known to *this. Purpose of
308  // pSignerNymm is to pass in the
309  // server Nym, since internally a nullptr
310  // is automatically interpeted as
311  // "each nym signs for himself" (which
312  // you don't want, on the server
313  // side.)
314 
315  // Return True if should stay on OTCron's list for more processing.
316  // Return False if expired or otherwise should be removed.
317  virtual bool ProcessCron(); // OTCron calls this regularly, which is my
318  // chance to expire, etc.
319 
320  virtual bool HasTransactionNum(const int64_t& lInput) const;
321  virtual void GetAllTransactionNumbers(OTNumList& numlistOutput) const;
322 
323  virtual bool AddParty(OTParty& theParty); // Takes ownership. Overrides from
324  // OTScriptable.
325  virtual bool ConfirmParty(OTParty& theParty); // Takes ownership. Overrides
326  // from OTScriptable.
327  // OTSmartContract
328  //
329  // Returns true if it was empty (and thus successfully set).
330  EXPORT bool SetServerIDIfEmpty(const OTIdentifier& theID);
331 
332  EXPORT bool VerifySmartContract(OTPseudonym& theNym, OTAccount& theAcct,
333  OTPseudonym& theServerNym,
334  bool bBurnTransNo = false);
335 
336  // theNym is trying to activate the smart contract, and has
337  // supplied transaction numbers and a user/acct ID. theNym definitely IS the
338  // owner of the account... that is
339  // verified in OTServer::NotarizeTransaction(), before it even knows what
340  // KIND of transaction it is processing!
341  // (For all transactions.) So by the time OTServer::NotarizeSmartContract()
342  // is called, we know that much.
343  //
344  // But for all other parties, we do not know this, so we still need to loop
345  // them all, etc to verify this crap,
346  // at least once. (And then maybe I can lessen some of the double-checking,
347  // for optimization purposes, once
348  // we've run this gamut.)
349  //
350  // One thing we still do not know, until VerifySmartContract is called, is
351  // whether theNym really IS a valid
352  // agent for this contract, and whether all the other agents are valid, and
353  // whether the accounts are validly
354  // owned by the agents they list, and whether the authorizing agent for each
355  // party has signed their own copy,
356  // and whether the authorizing agent for each party provided a valid opening
357  // number--which must be recorded
358  // as consumed--and whether the authorized agent for each account provided a
359  // valid closing number, which likewise
360  // must be recorded.
361  //
362  // IN THE FUTURE, it should be possible to place restrictions in the
363  // contract, enforced by the server,
364  // which allow parties to trust additional things such as, XYZ account will
365  // only be used for this contract,
366  // or ABC party cannot do DEF action without triggering a notice, etc.
367  //
368  // We call this just before activation (in OT_API::activateSmartContract) in
369  // order
370  // to make sure that certain IDs and transaction #s are set, so the smart
371  // contract
372  // will interoperate with the old Cron Item system of doing things.
373  //
374  EXPORT void PrepareToActivate(const int64_t& lOpeningTransNo,
375  const int64_t& lClosingTransNo,
376  const OTIdentifier& theUserID,
377  const OTIdentifier& theAcctID);
378 
379  //
380  // HIGH LEVEL
381  //
382 
383  // CALLBACKS that OT server uses occasionally. (Smart Contracts can
384  // supply a special script that is activated for each callback.)
385 
386  // bool OTScriptable::CanExecuteClause(std::string str_party_name,
387  // std::string str_clause_name); // This calls (if available) the
388  // scripted clause: bool party_may_execute_clause(party_name, clause_name)
389  bool CanCancelContract(std::string str_party_name); // This calls (if
390  // available) the
391  // scripted
392  // clause:
393  // bool party_may_cancel_contract(party_name)
394  // OT NATIVE FUNCTIONS -- Available for scripts to call:
395 
396  void SetRemainingTimer(std::string str_seconds_from_now); // onProcess
397  // will
398  // trigger X
399  // seconds
400  // from
401  // now...
402  // (And not
403  // until
404  // then,
405  // either.)
406  std::string GetRemainingTimer() const; // returns seconds left on the timer,
407  // in string format, or "0".
408  // class member, with string parameter
409  bool MoveAcctFundsStr(std::string from_acct_name, std::string to_acct_name,
410  std::string str_Amount); // calls
411  // OTCronItem::MoveFunds()
412  bool StashAcctFunds(std::string from_acct_name, std::string to_stash_name,
413  std::string str_Amount); // calls StashFunds()
414  bool UnstashAcctFunds(std::string to_acct_name, std::string from_stash_name,
415  std::string str_Amount); // calls StashFunds(
416  // lAmount * (-1) )
417  std::string GetAcctBalance(std::string from_acct_name);
418  std::string GetStashBalance(std::string stash_name,
419  std::string asset_type_id);
420 
421  std::string GetAssetTypeIDofAcct(std::string from_acct_name);
422 
423  // Todo: someday add "rejection notice" here too.
424  // (Might be a demand for smart contracts to send failure notices.)
425  // We already send a failure notice to all parties in the cash where
426  // the smart contract fails to activate.
427  bool SendNoticeToParty(std::string party_name);
429 
431 
432  // LOW LEVEL
433 
434  // from OTScriptable:
435  // (Calls the parent FYI)
436  //
437  virtual void RegisterOTNativeCallsWithScript(OTScript& theScript);
438 
439  // Low-level.
440 
441  // The STASH:
442  // This is where the smart contract can store funds, internally.
443  //
444  // Done: Have a server backing account to double this record (like with cash
445  // withdrawals) so it will turn up properly on an audit.
446  //
447  OTStash* GetStash(std::string str_stash_name);
448 
449  // Low-level.
450  EXPORT void ExecuteClauses(mapOfClauses& theClauses,
451  OTString* pParam = nullptr);
452 
453  // Low level.
454  // This function (StashFunds) is called by StashAcctFunds() and
455  // UnstashAcctFunds(),
456  // In the same way that OTCronItem::MoveFunds() is called by
457  // OTSmartContract::MoveAcctFunds().
458  // Therefore this function is lower-level, and the proper way to use it,
459  // especially from
460  // a script, is to call StashAcctFunds() or UnstashAcctFunds() (BELOW)
461  //
462  EXPORT bool StashFunds(const mapOfNyms& map_NymsAlreadyLoaded,
463  const int64_t& lAmount, // negative amount here means
464  // UNstash. Positive means
465  // STASH.
466  const OTIdentifier& PARTY_ACCT_ID,
467  const OTIdentifier& PARTY_USER_ID,
468  OTStash& theStash);
469  EXPORT OTSmartContract();
470  EXPORT OTSmartContract(const OTIdentifier& SERVER_ID);
471 
472  EXPORT virtual ~OTSmartContract();
473 
474  void InitSmartContract();
475 
476  virtual void Release();
477  void Release_SmartContract();
478  void ReleaseStashes();
479 
480  static void CleanupNyms(mapOfNyms& theMap);
481  static void CleanupAccts(mapOfAccounts& theMap);
482  virtual bool IsValidOpeningNumber(const int64_t& lOpeningNum) const;
483 
484  virtual int64_t GetOpeningNumber(const OTIdentifier& theNymID) const;
485  virtual int64_t GetClosingNumber(const OTIdentifier& theAcctID) const;
486  // return -1 if error, 0 if nothing, and 1 if the node was processed.
487  virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader*& xml);
488 
489  virtual void UpdateContents(); // Before transmission or serialization, this
490  // is where the ledger saves its contents
491  virtual bool SaveContractWallet(std::ofstream& ofs) const;
492 };
493 
494 } // namespace opentxs
495 
496 #endif // OPENTXS_CORE_SCRIPT_OTSMARTCONTRACT_HPP
virtual void GetAllTransactionNumbers(OTNumList &numlistOutput) const
const OTString & GetLastRecipientUserID() const
int32_t GetCountStashAccts() const
const OTString & GetLastSenderAcctID() const
std::string GetRemainingTimer() const
EXPORT bool StashFunds(const mapOfNyms &map_NymsAlreadyLoaded, const int64_t &lAmount, const OTIdentifier &PARTY_ACCT_ID, const OTIdentifier &PARTY_USER_ID, OTStash &theStash)
OTStash * GetStash(std::string str_stash_name)
std::string GetAssetTypeIDofAcct(std::string from_acct_name)
EXPORT bool VerifySmartContract(OTPseudonym &theNym, OTAccount &theAcct, OTPseudonym &theServerNym, bool bBurnTransNo=false)
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
virtual void onFinalReceipt(OTCronItem &theOrigCronItem, const int64_t &lNewTransactionNumber, OTPseudonym &theOriginator, OTPseudonym *pRemover)
virtual void RegisterOTNativeCallsWithScript(OTScript &theScript)
const OTString & GetLastRecipientAcctID() const
virtual void HarvestOpeningNumber(OTPseudonym &theNym)
bool CanCancelContract(std::string str_party_name)
std::map< std::string, OTPseudonym * > mapOfNyms
Definition: OTWallet.hpp:161
std::string GetStashBalance(std::string stash_name, std::string asset_type_id)
std::map< std::string, OTClause * > mapOfClauses
Definition: OTBylaw.hpp:145
virtual void SetDisplayLabel(const std::string *pstrLabel=nullptr)
void CloseoutOpeningNumbers(OTPseudonym *pSignerNym=nullptr)
int64_t time64_t
Definition: Common.hpp:209
const time64_t & GetNextProcessDate() const
virtual bool CanRemoveItemFromCron(OTPseudonym &theNym)
void SetNextProcessDate(const time64_t &tNEXT_DATE)
EXPORT void PrepareToActivate(const int64_t &lOpeningTransNo, const int64_t &lClosingTransNo, const OTIdentifier &theUserID, const OTIdentifier &theAcctID)
virtual bool IsValidOpeningNumber(const int64_t &lOpeningNum) const
const OTString & GetLastSenderUserID() const
static void CleanupAccts(mapOfAccounts &theMap)
std::map< std::string, OTStash * > mapOfStashes
static void CleanupNyms(mapOfNyms &theMap)
std::map< std::string, OTAccount * > mapOfAccounts
Definition: OTWallet.hpp:157
int32_t GetCountStashes() const
virtual bool HasTransactionNum(const int64_t &lInput) const
virtual bool AddParty(OTParty &theParty)
virtual bool ConfirmParty(OTParty &theParty)
virtual void HarvestClosingNumbers(OTPseudonym &theNym)
virtual bool Compare(OTScriptable &rhs) const
EXPORT void ExecuteClauses(mapOfClauses &theClauses, OTString *pParam=nullptr)
virtual bool SaveContractWallet(std::ofstream &ofs) const
virtual int64_t GetOpeningNumber(const OTIdentifier &theNymID) const
void SetRemainingTimer(std::string str_seconds_from_now)
bool SendNoticeToParty(std::string party_name)
std::string GetAcctBalance(std::string from_acct_name)
bool UnstashAcctFunds(std::string to_acct_name, std::string from_stash_name, std::string str_Amount)
virtual EXPORT ~OTSmartContract()
virtual int64_t GetClosingNumber(const OTIdentifier &theAcctID) const
bool StashAcctFunds(std::string from_acct_name, std::string to_stash_name, std::string str_Amount)
bool MoveAcctFundsStr(std::string from_acct_name, std::string to_acct_name, std::string str_Amount)
EXPORT bool SetServerIDIfEmpty(const OTIdentifier &theID)