Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OpenTransactions.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OpenTransactions.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_CLIENT_OPENTRANSACTIONS_HPP
134 #define OPENTXS_CLIENT_OPENTRANSACTIONS_HPP
135 
137 
138 #ifndef SWIG
139 #ifndef NOT_SWIG
140 #define NOT_SWIG
141 #endif
142 #else
143 #ifndef EXPORT
144 #define EXPORT
145 #endif
146 #endif
147 
148 #ifdef NOT_SWIG
149 
150 #include <opentxs/core/OTString.hpp>
151 
152 namespace opentxs
153 {
154 
155 class TransportCallback;
156 class OT_API;
157 class OTAccount;
158 class OTAssetContract;
159 class Basket;
160 class OTCheque;
161 class OTClient;
162 class OTEnvelope;
163 class OTLedger;
164 class OTMessage;
165 class OTNumList;
166 class OTNym_or_SymmetricKey;
167 class OTPassword;
168 class OTPasswordData;
169 class OTPayment;
170 class OTPaymentPlan;
171 class OTServerContract;
172 class OTSocket;
173 class OTWallet;
174 class Mint;
175 class Purse;
176 class Token;
177 
178 // The C++ high-level interface to the Open Transactions client-side.
179 class OT_API
180 {
181 private:
182  OT_API(const OT_API&);
183  OT_API& operator=(const OT_API&);
184  static bool bInitOTApp;
185  static bool bCleanupOTApp;
186 
187 public:
188  EXPORT static bool InitOTApp();
189  EXPORT static bool CleanupOTApp();
190 
191 private:
192  class Pid;
193  Pid* const m_pPid; // only one pid reference per instance, must not change
194 
195  bool m_bInitialized;
196  bool m_bDefaultStore;
197 
198  TransportCallback* m_pTransportCallback;
199  OTSocket* m_pSocket;
200 
201  OTString m_strDataPath;
202  OTString m_strWalletFilename;
203  OTString m_strWalletFilePath;
204  OTString m_strConfigFilename;
205  OTString m_strConfigFilePath;
206 
207  OTWallet* m_pWallet;
208  OTClient* m_pClient;
209 
210 public:
211  EXPORT OT_API(); // calls Init();
212  EXPORT ~OT_API(); // calls Cleanup();
213 
214 private:
215  EXPORT bool Init(); // Per instance. (called automaticly by constructor)
216  EXPORT bool Cleanup(); // Per instance. (called automaticly by constructor)
217 
218 public:
219  EXPORT bool IsInitialized() const
220  {
221  return m_bInitialized;
222  }
223 
224  EXPORT bool SetTransportCallback(TransportCallback* pTransportCallback);
225  EXPORT TransportCallback* GetTransportCallback() const;
226  EXPORT bool TransportFunction(const OTServerContract& theServerContract,
227  const OTEnvelope& theEnvelope) const;
228  EXPORT bool GetWalletFilename(OTString& strPath) const;
229  EXPORT bool SetWalletFilename(const OTString& strPath);
230  EXPORT OTWallet* GetWallet(const char* szFuncName = nullptr) const;
231 
232  inline OTClient* GetClient() const
233  {
234  return m_pClient;
235  }
236 
237  EXPORT bool LoadConfigFile();
238  EXPORT bool SetWallet(const OTString& strFilename);
239  EXPORT bool WalletExists() const;
240  EXPORT bool LoadWallet() const;
241 
242  EXPORT time64_t GetTime() const;
243  EXPORT bool NumList_Add(OTNumList& theList,
244  const OTNumList& theNewNumbers) const;
245  EXPORT bool NumList_Remove(OTNumList& theList,
246  const OTNumList& theOldNumbers) const;
247  EXPORT bool NumList_VerifyQuery(const OTNumList& theList,
248  const OTNumList& theQueryNumbers) const;
249  EXPORT bool NumList_VerifyAll(const OTNumList& theList,
250  const OTNumList& theQueryNumbers) const;
251  EXPORT int32_t NumList_Count(const OTNumList& theList) const;
252  // Reading data about the local wallet.. presumably already loaded.
253 
254  EXPORT int32_t GetNymCount() const;
255  EXPORT int32_t GetServerCount() const;
256  EXPORT int32_t GetAssetTypeCount() const;
257  EXPORT int32_t GetAccountCount() const;
258 
259  EXPORT bool GetNym(int32_t iIndex, OTIdentifier& NYM_ID,
260  OTString& NYM_NAME) const;
261  EXPORT bool GetServer(int32_t iIndex, OTIdentifier& THE_ID,
262  OTString& THE_NAME) const;
263  EXPORT bool GetAssetType(int32_t iIndex, OTIdentifier& THE_ID,
264  OTString& THE_NAME) const;
265  EXPORT bool GetAccount(int32_t iIndex, OTIdentifier& THE_ID,
266  OTString& THE_NAME) const;
267  // In this case, the ID is input, the pointer is output.
268  // Gets the data from Wallet.
269  EXPORT OTPseudonym* GetNym(const OTIdentifier& NYM_ID,
270  const char* szFuncName = nullptr) const;
271  EXPORT OTServerContract* GetServer(const OTIdentifier& THE_ID,
272  const char* szFuncName = nullptr) const;
274  const OTIdentifier& THE_ID, const char* szFuncName = nullptr) const;
275  EXPORT OTAccount* GetAccount(const OTIdentifier& THE_ID,
276  const char* szFuncName = nullptr) const;
277 
279  const std::string PARTIAL_ID, const char* szFuncName = nullptr) const;
281  const std::string PARTIAL_ID, const char* szFuncName = nullptr) const;
283  const std::string PARTIAL_ID, const char* szFuncName = nullptr) const;
285  const std::string PARTIAL_ID, const char* szFuncName = nullptr) const;
287  const OTIdentifier& NYM_ID, const char* szFuncName = nullptr) const;
289  const OTIdentifier& NYM_ID, bool bChecking = false,
290  const char* szFuncName = nullptr,
291  const OTPasswordData* pPWData = nullptr,
292  const OTPassword* pImportPassword = nullptr) const;
293  EXPORT OTPseudonym* GetOrLoadNym(
294  const OTIdentifier& NYM_ID, bool bChecking = false,
295  const char* szFuncName = nullptr,
296  const OTPasswordData* pPWData = nullptr) const;
297 
298  EXPORT OTAccount* GetOrLoadAccount(const OTPseudonym& theNym,
299  const OTIdentifier& ACCT_ID,
300  const OTIdentifier& SERVER_ID,
301  const char* szFuncName = nullptr) const;
302 
303  EXPORT OTAccount* GetOrLoadAccount(const OTIdentifier& NYM_ID,
304  const OTIdentifier& ACCT_ID,
305  const OTIdentifier& SERVER_ID,
306  const char* szFuncName = nullptr) const;
307  // The name is basically just a client-side label.
308  // This function lets you change it.
309  EXPORT bool SetNym_Name(const OTIdentifier& NYM_ID,
310  const OTIdentifier& SIGNER_NYM_ID,
311  const OTString& NYM_NEW_NAME) const;
312 
313  EXPORT bool SetAccount_Name(const OTIdentifier& ACCT_ID,
314  const OTIdentifier& SIGNER_NYM_ID,
315  const OTString& ACCT_NEW_NAME) const;
316 
317  EXPORT bool SetAssetType_Name(const OTIdentifier& ASSET_ID,
318  const OTString& STR_NEW_NAME) const;
319 
320  EXPORT bool SetServer_Name(const OTIdentifier& SERVER_ID,
321  const OTString& STR_NEW_NAME) const;
322  // Accessing local storage...
323  // (Caller responsible to delete.)
324  EXPORT OTPseudonym* LoadPublicNym(const OTIdentifier& NYM_ID,
325  const char* szFuncName = nullptr) const;
326  EXPORT OTPseudonym* LoadPrivateNym(
327  const OTIdentifier& NYM_ID, bool bChecking = false,
328  const char* szFuncName = nullptr,
329  const OTPasswordData* pPWData = nullptr,
330  const OTPassword* pImportPassword = nullptr) const;
331 
332  EXPORT OTPseudonym* CreateNym(int32_t nKeySize = 1024,
333  const std::string str_id_source = "",
334  const std::string str_alt_location = "")
335  const; // returns a new nym (with key pair)
336  // and files created. (Or nullptr.) Adds
337  // to wallet.
338 
339  // This works by checking to see if the Nym has a request number for the
340  // given server.
341  // That's why it's important, when registering at a specific server, to
342  // immediately do a
343  // "get request number" since that's what locks in the clients ability to be
344  // able to tell
345  // that it's registered there.
346  EXPORT bool IsNym_RegisteredAtServer(const OTIdentifier& NYM_ID,
347  const OTIdentifier& SERVER_ID) const;
348  EXPORT bool Wallet_ChangePassphrase() const;
349 
350  EXPORT bool Wallet_CanRemoveServer(const OTIdentifier& SERVER_ID) const;
351  EXPORT bool Wallet_CanRemoveAssetType(const OTIdentifier& ASSET_ID) const;
352  EXPORT bool Wallet_CanRemoveNym(const OTIdentifier& NYM_ID) const;
353  EXPORT bool Wallet_CanRemoveAccount(const OTIdentifier& ACCOUNT_ID) const;
354 
355  EXPORT bool Wallet_RemoveServer(const OTIdentifier& SERVER_ID) const;
356  EXPORT bool Wallet_RemoveAssetType(const OTIdentifier& ASSET_ID) const;
357  EXPORT bool Wallet_RemoveNym(const OTIdentifier& NYM_ID) const;
358  // OT has the capability to export a Nym (normally stored in several files)
359  // as an encoded
360  // object (in base64-encoded form) and then import it again.
361  //
362  // Returns bool on success, and strOutput will contain the exported data.
363  EXPORT bool Wallet_ExportNym(const OTIdentifier& NYM_ID,
364  OTString& strOutput) const;
365  // OT has the capability to export a Nym (normally stored in several files)
366  // as an encoded
367  // object (in base64-encoded form) and then import it again.
368  //
369  // Returns bool on success, and if pNymID is passed in, will set it to the
370  // new NymID.
371  // Also on failure, if the Nym was already there with that ID, and if pNymID
372  // is passed,
373  // then it will be set to the ID that was already there.
374  EXPORT bool Wallet_ImportNym(const OTString& FILE_CONTENTS,
375  OTIdentifier* pNymID = nullptr) const;
376  // In this case, instead of importing a special "OT Nym all-in-one exported"
377  // file format,
378  // we are importing the public/private keys only, from their Cert file
379  // contents, and then
380  // creating a blank Nymfile to go along with it. This is for when people
381  // wish to import
382  // pre-existing keys to create a new Nym.
383  //
384  // Returns bool on success, and if pNymID is passed in, will set it to the
385  // new NymID.
386  // Also on failure, if the Nym was already there with that ID, and if pNymID
387  // is passed,
388  // then it will be set to the ID that was already there.
389  EXPORT bool Wallet_ImportCert(const OTString& DISPLAY_NAME,
390  const OTString& FILE_CONTENTS,
391  OTIdentifier* pNymID = nullptr) const;
392  // Removes master key and sets a normal passphrase on the Cert.
393  // Similar to ExportNym except it only exports the Cert portion.
394  EXPORT bool Wallet_ExportCert(const OTIdentifier& NYM_ID,
395  OTString& strOutput) const;
396  // First three arguments denote the existing purse.
397  // Fourth argument is the NEW purse being imported.
398  // (Which may have a different owner Nym, or be protected
399  // by a symmetric key instead of a Nym.)
400  bool Wallet_ImportPurse(
401  const OTIdentifier& SERVER_ID, const OTIdentifier& ASSET_TYPE_ID,
402  const OTIdentifier& SIGNER_ID, // We must know the SIGNER_ID in order to
403  // know which "old purse" to load and
404  // merge into. The New Purse may have a
405  // different one, but its ownership will
406  // be re-assigned in that case, as part
407  // of the merging process, to SIGNER_ID.
408  // Otherwise the New Purse might be
409  // symmetrically encrypted (instead of
410  // using a Nym) in which case again, its
411  // ownership will be re-assigned from
412  // that key, to SIGNER_ID, as part of the
413  // merging process.
414  const OTString& THE_PURSE, const OTString* pstrDisplay = nullptr);
415  //
416  // ENCODE, DECODE, SIGN, VERIFY, ENCRYPT, DECRYPT
417 
422  EXPORT bool Encode(const OTString& strPlaintext, OTString& strOutput,
423  bool bLineBreaks = true) const;
428  EXPORT bool Decode(const OTString& strEncoded, OTString& strOutput,
429  bool bLineBreaks = true) const;
434  EXPORT bool Encrypt(const OTIdentifier& theRecipientNymID,
435  const OTString& strPlaintext,
436  OTString& strOutput) const;
441  EXPORT bool Decrypt(const OTIdentifier& theRecipientNymID,
442  const OTString& strCiphertext,
443  OTString& strOutput) const;
450  bool FlatSign(const OTIdentifier& theSignerNymID, const OTString& strInput,
451  const OTString& strContractType, OTString& strOutput) const;
457  EXPORT bool SignContract(const OTIdentifier& theSignerNymID,
458  const OTString& strContract,
459  OTString& strOutput) const;
465  EXPORT bool AddSignature(const OTIdentifier& theSignerNymID,
466  const OTString& strContract,
467  OTString& strOutput) const;
471  EXPORT bool VerifySignature(
472  const OTString& strContract, const OTIdentifier& theSignerNymID,
473  OTContract** ppContract = nullptr) const; // If you use this optional
474  // parameter, then YOU are
475  // responsible to clean it up.
476 
478  EXPORT bool VerifyAndRetrieveXMLContents(const OTString& strContract,
479  const OTIdentifier& theSignerNymID,
480  OTString& strOutput);
486  EXPORT bool VerifyAccountReceipt(const OTIdentifier& SERVER_ID,
487  const OTIdentifier& USER_ID,
488  const OTIdentifier& ACCOUNT_ID) const;
489 
490  // Returns an OTCheque pointer, or nullptr.
491  // (Caller responsible to delete.)
492  EXPORT OTCheque* WriteCheque(
493  const OTIdentifier& SERVER_ID, const int64_t& CHEQUE_AMOUNT,
494  const time64_t& VALID_FROM, const time64_t& VALID_TO,
495  const OTIdentifier& SENDER_ACCT_ID, const OTIdentifier& SENDER_USER_ID,
496  const OTString& CHEQUE_MEMO,
497  const OTIdentifier* pRECIPIENT_USER_ID = nullptr) const;
498 
499  // DISCARD CHEQUE (recover the transaction number for re-use, so the
500  // cheque itself can be discarded.)
501  EXPORT bool DiscardCheque(const OTIdentifier& SERVER_ID,
502  const OTIdentifier& USER_ID,
503  const OTIdentifier& ACCT_ID,
504  const OTString& THE_CHEQUE) const;
505 
506  // PROPOSE PAYMENT PLAN (called by Merchant)
507  //
508  // Returns an OTPaymentPlan pointer, or nullptr.
509  // (Caller responsible to delete.)
510  //
511  // Payment Plan Delay, and Payment Plan Period, both default to 30 days (if
512  // you pass 0),
513  // measured in seconds.
514  //
515  // Payment Plan Length, and Payment Plan Max Payments, both default to 0,
516  // which means
517  // no maximum length and no maximum number of payments.
519  const OTIdentifier& SERVER_ID,
520  const time64_t& VALID_FROM, // 0 defaults to the current time in seconds
521  // since Jan 1970.
522  const time64_t& VALID_TO, // 0 defaults to "no expiry." Otherwise this
523  // value is ADDED to VALID_FROM. (It's a
524  // length.)
525  const OTIdentifier& SENDER_ACCT_ID, const OTIdentifier& SENDER_USER_ID,
526  const OTString& PLAN_CONSIDERATION, // like a memo.
527  const OTIdentifier& RECIPIENT_ACCT_ID,
528  const OTIdentifier& RECIPIENT_USER_ID,
529  // ---------------------------------------- // If it's above zero, the
530  // initial
531  const int64_t& INITIAL_PAYMENT_AMOUNT, // amount will be processed after
532  const time64_t& INITIAL_PAYMENT_DELAY, // delay (seconds from now.)
533  // ---------------------------------------- // AND SEPARATELY FROM
534  // THIS...
535  const int64_t& PAYMENT_PLAN_AMOUNT, // The regular amount charged,
536  const time64_t& PAYMENT_PLAN_DELAY, // which begins occuring after delay
537  const time64_t& PAYMENT_PLAN_PERIOD, // (seconds from now) and happens
538  // ---------------------------------------- // every period, ad
539  // infinitum, until
540  time64_t PAYMENT_PLAN_LENGTH = OT_TIME_ZERO, // after the length (in
541  // seconds)
542  int32_t PAYMENT_PLAN_MAX_PAYMENTS = 0 // expires, or after the maximum
543  ) const; // number of payments. These last
544 
545  // CONFIRM PAYMENT PLAN (called by Customer)
546  EXPORT bool ConfirmPaymentPlan(const OTIdentifier& SERVER_ID,
547  const OTIdentifier& SENDER_USER_ID,
548  const OTIdentifier& SENDER_ACCT_ID,
549  const OTIdentifier& RECIPIENT_USER_ID,
550  OTPaymentPlan& thePlan) const;
551  EXPORT Purse* LoadPurse(const OTIdentifier& SERVER_ID,
552  const OTIdentifier& ASSET_ID,
553  const OTIdentifier& USER_ID,
554  const OTString* pstrDisplay = nullptr) const;
555  EXPORT bool SavePurse(const OTIdentifier& SERVER_ID,
556  const OTIdentifier& ASSET_ID,
557  const OTIdentifier& USER_ID, Purse& THE_PURSE) const;
558  EXPORT Purse* CreatePurse(const OTIdentifier& SERVER_ID,
559  const OTIdentifier& ASSET_ID,
560  const OTIdentifier& OWNER_ID) const;
561  EXPORT Purse* CreatePurse_Passphrase(const OTIdentifier& SERVER_ID,
562  const OTIdentifier& ASSET_ID) const;
563  // This is a low-level utility function. Probably should
564  // make this private so people don't confuse it with the API.
565  // All the purse functions use this.
567  const OTIdentifier& theServerID, const OTIdentifier& theAssetTypeID,
568  const OTString& strPurse, Purse& thePurse, // output
569  OTPassword& thePassword, // Only used in the case of password-protected
570  // purses. Passed in so it won't go out of
571  // scope when return value has a member set to
572  // point to it.
573  bool bForEncrypting = true, // true==encrypting,false==decrypting.
574  const OTIdentifier* pOWNER_ID = nullptr, // This can be nullptr, **IF**
575  // purse is password-protected.
576  // (It's
577  // just ignored in that case.) Otherwise MUST contain the
578  // NymID for the Purse owner.
579  const OTString* pstrDisplay1 = nullptr,
580  const OTString* pstrDisplay2 = nullptr) const;
582  const OTString& strPurse, Purse& thePurse, // output
583  OTPassword& thePassword, // Only used in the case of password-protected
584  // purses. Passed in so it won't go out of
585  // scope when pOwner is set to point to it.
586  bool bCanBePublic = false, // true==private nym isn't mandatory.
587  // false==private nym IS mandatory.
588  // (Only relevant if there's an owner.)
589  const OTIdentifier* pOWNER_ID = nullptr, // This can be nullptr, **IF**
590  // purse is password-protected.
591  // (It's
592  // just ignored in that case.) Otherwise if it's
593  // Nym-protected, the purse will have a NymID on it already.
594  // If not (it's optional), then pOWNER_ID is the ID it will
595  // try next, before failing.
596  const OTString* pstrDisplay = nullptr) const;
597  EXPORT Token* Purse_Peek(
598  const OTIdentifier& SERVER_ID, const OTIdentifier& ASSET_TYPE_ID,
599  const OTString& THE_PURSE,
600  const OTIdentifier* pOWNER_ID = nullptr, // This can be nullptr, **IF**
601  // purse is password-protected.
602  // (It's
603  // just ignored in that case.) Otherwise MUST contain the
604  // NymID for the Purse owner (necessary to decrypt the token.)
605  const OTString* pstrDisplay = nullptr) const;
606 
607  EXPORT Purse* Purse_Pop(const OTIdentifier& SERVER_ID,
608  const OTIdentifier& ASSET_TYPE_ID,
609  const OTString& THE_PURSE,
610  const OTIdentifier* pOWNER_ID =
611  nullptr, // This can be nullptr, **IF** purse
612  // is
613  // password-protected. (It's just
614  // ignored in that case.) Otherwise MUST
615  // contain the NymID for the Purse owner
616  // (necessary to decrypt the token.)
617  const OTString* pstrDisplay = nullptr) const;
618 
619  EXPORT Purse* Purse_Empty(const OTIdentifier& SERVER_ID,
620  const OTIdentifier& ASSET_TYPE_ID,
621  const OTString& THE_PURSE,
622  const OTString* pstrDisplay = nullptr) const;
623 
624  EXPORT Purse* Purse_Push(
625  const OTIdentifier& SERVER_ID, const OTIdentifier& ASSET_TYPE_ID,
626  const OTString& THE_PURSE, const OTString& THE_TOKEN,
627  const OTIdentifier* pOWNER_ID = nullptr, // This can be nullptr, **IF**
628  // purse is password-protected.
629  // (It's
630  // just ignored in that case.) Otherwise MUST contain the
631  // NymID for the Purse owner (recipient. necessary to encrypt
632  // the token to him.)
633  const OTString* pstrDisplay = nullptr) const;
634 
635  EXPORT Token* Token_ChangeOwner(
636  const OTIdentifier& SERVER_ID, const OTIdentifier& ASSET_TYPE_ID,
637  const OTString& THE_TOKEN, const OTIdentifier& SIGNER_NYM_ID,
638  const OTString& OLD_OWNER, // Pass a NymID here, or a purse.
639  const OTString& NEW_OWNER, // Pass a NymID here, or a purse.
640  const OTString* pstrDisplay = nullptr) const;
641  EXPORT Mint* LoadMint(const OTIdentifier& SERVER_ID,
642  const OTIdentifier& ASSET_ID) const;
644  const OTIdentifier& ASSET_ID) const;
646  const OTIdentifier& SERVER_ID) const;
647  EXPORT bool IsBasketCurrency(
648  const OTIdentifier& BASKET_ASSET_TYPE_ID) const;
649 
650  EXPORT int64_t GetBasketMinimumTransferAmount(
651  const OTIdentifier& BASKET_ASSET_TYPE_ID) const;
652 
653  EXPORT int32_t
654  GetBasketMemberCount(const OTIdentifier& BASKET_ASSET_TYPE_ID) const;
655 
656  EXPORT bool GetBasketMemberType(const OTIdentifier& BASKET_ASSET_TYPE_ID,
657  int32_t nIndex,
658  OTIdentifier& theOutputMemberType) const;
659 
661  const OTIdentifier& BASKET_ASSET_TYPE_ID, int32_t nIndex) const;
662  EXPORT OTAccount* LoadAssetAccount(const OTIdentifier& SERVER_ID,
663  const OTIdentifier& USER_ID,
664  const OTIdentifier& ACCOUNT_ID) const;
665  EXPORT OTLedger* LoadNymbox(const OTIdentifier& SERVER_ID,
666  const OTIdentifier& USER_ID) const;
667 
668  EXPORT OTLedger* LoadNymboxNoVerify(const OTIdentifier& SERVER_ID,
669  const OTIdentifier& USER_ID) const;
670 
671  EXPORT OTLedger* LoadInbox(const OTIdentifier& SERVER_ID,
672  const OTIdentifier& USER_ID,
673  const OTIdentifier& ACCOUNT_ID) const;
674 
675  EXPORT OTLedger* LoadInboxNoVerify(const OTIdentifier& SERVER_ID,
676  const OTIdentifier& USER_ID,
677  const OTIdentifier& ACCOUNT_ID) const;
678 
679  EXPORT OTLedger* LoadOutbox(const OTIdentifier& SERVER_ID,
680  const OTIdentifier& USER_ID,
681  const OTIdentifier& ACCOUNT_ID) const;
682 
683  EXPORT OTLedger* LoadOutboxNoVerify(const OTIdentifier& SERVER_ID,
684  const OTIdentifier& USER_ID,
685  const OTIdentifier& ACCOUNT_ID) const;
686  EXPORT OTLedger* LoadPaymentInbox(const OTIdentifier& SERVER_ID,
687  const OTIdentifier& USER_ID) const;
688 
690  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID) const;
691  // LoadRecordBox
692  // Note: depending on the record type, the Account ID may contain the User
693  // ID.
694  EXPORT OTLedger* LoadRecordBox(const OTIdentifier& SERVER_ID,
695  const OTIdentifier& USER_ID,
696  const OTIdentifier& ACCOUNT_ID) const;
697 
699  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
700  const OTIdentifier& ACCOUNT_ID) const;
701 
702  EXPORT bool ClearRecord(
703  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
704  const OTIdentifier& ACCOUNT_ID, // USER_ID can be passed here as well.
705  int32_t nIndex, bool bClearAll = false // if true, nIndex is ignored.
706  ) const;
707  EXPORT OTLedger* LoadExpiredBox(const OTIdentifier& SERVER_ID,
708  const OTIdentifier& USER_ID) const;
709 
710  EXPORT OTLedger* LoadExpiredBoxNoVerify(const OTIdentifier& SERVER_ID,
711  const OTIdentifier& USER_ID) const;
712 
713  EXPORT bool ClearExpired(const OTIdentifier& SERVER_ID,
714  const OTIdentifier& USER_ID, int32_t nIndex,
715  bool bClearAll = false // if true, nIndex is
716  // ignored.
717  ) const;
718  // Note: if instrument is expired BEFORE being recorded, it will go into the
719  // expired box instead of the record box.
720  EXPORT bool RecordPayment(
721  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
722  bool bIsInbox, // true == payments inbox. false == payments outbox.
723  int32_t nIndex, // removes payment instrument (from payments in or out
724  // box) and moves to record box.
725  bool bSaveCopy) const; // If false, copy of instrument will NOT be
726  // saved.
727  // So the client side knows which ones he has in storage, vs which ones he
728  // still needs to download.
729  EXPORT bool DoesBoxReceiptExist(
730  const OTIdentifier& SERVER_ID,
731  const OTIdentifier& USER_ID, // Unused here for now, but still
732  // convention.
733  const OTIdentifier& ACCOUNT_ID, // If for Nymbox (vs inbox/outbox) then
734  // pass USER_ID in this field also.
735  int32_t nBoxType, // 0/nymbox, 1/inbox, 2/outbox
736  const int64_t& lTransactionNum) const;
737  // Incoming
738  EXPORT OTMessage* PopMessageBuffer(const int64_t& lRequestNumber,
739  const OTIdentifier& SERVER_ID,
740  const OTIdentifier& USER_ID) const;
741  void FlushMessageBuffer();
742  // Outgoing
743  EXPORT OTMessage* GetSentMessage(const int64_t& lRequestNumber,
744  const OTIdentifier& SERVER_ID,
745  const OTIdentifier& USER_ID) const;
746  EXPORT bool RemoveSentMessage(const int64_t& lRequestNumber,
747  const OTIdentifier& SERVER_ID,
748  const OTIdentifier& USER_ID) const;
749  EXPORT void FlushSentMessages(bool bHarvestingForRetry,
750  const OTIdentifier& SERVER_ID,
751  const OTIdentifier& USER_ID,
752  const OTLedger& THE_NYMBOX) const;
753 
754  EXPORT bool HaveAlreadySeenReply(const OTIdentifier& SERVER_ID,
755  const OTIdentifier& USER_ID,
756  const int64_t& lRequestNumber) const;
757 
758  EXPORT bool ResyncNymWithServer(OTPseudonym& theNym,
759  const OTLedger& theNymbox,
760  const OTPseudonym& theMessageNym) const;
761 
762  // These commands below send messages to the server:
763 
764  EXPORT int32_t checkServerID(const OTIdentifier& SERVER_ID,
765  const OTIdentifier& USER_ID) const;
766 
767  EXPORT int32_t createUserAccount(const OTIdentifier& SERVER_ID,
768  const OTIdentifier& USER_ID) const;
769 
770  EXPORT int32_t deleteUserAccount(const OTIdentifier& SERVER_ID,
771  const OTIdentifier& USER_ID) const;
772 
773  EXPORT int32_t checkUser(const OTIdentifier& SERVER_ID,
774  const OTIdentifier& USER_ID,
775  const OTIdentifier& USER_ID_CHECK) const;
776 
777  EXPORT int32_t usageCredits(const OTIdentifier& SERVER_ID,
778  const OTIdentifier& USER_ID,
779  const OTIdentifier& USER_ID_CHECK,
780  int64_t lAdjustment = 0) const;
781 
782  EXPORT int32_t getRequest(const OTIdentifier& SERVER_ID,
783  const OTIdentifier& USER_ID) const;
784 
785  EXPORT int32_t sendUserMessage(const OTIdentifier& SERVER_ID,
786  const OTIdentifier& USER_ID,
787  const OTIdentifier& USER_ID_RECIPIENT,
788  const OTString& RECIPIENT_PUBKEY,
789  const OTString& THE_MESSAGE) const;
790 
791  EXPORT int32_t sendUserInstrument(
792  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
793  const OTIdentifier& USER_ID_RECIPIENT, const OTString& RECIPIENT_PUBKEY,
794  const OTPayment& THE_INSTRUMENT,
795  const OTPayment* pINSTRUMENT_FOR_SENDER = nullptr) const;
796 
797  EXPORT int32_t issueAssetType(const OTIdentifier& SERVER_ID,
798  const OTIdentifier& USER_ID,
799  const OTString& THE_CONTRACT) const;
800 
801  EXPORT int32_t getContract(const OTIdentifier& SERVER_ID,
802  const OTIdentifier& USER_ID,
803  const OTIdentifier& ASSET_ID) const;
804 
805  EXPORT int32_t getMint(const OTIdentifier& SERVER_ID,
806  const OTIdentifier& USER_ID,
807  const OTIdentifier& ASSET_ID) const;
808 
809  EXPORT int32_t
810  getBoxReceipt(const OTIdentifier& SERVER_ID,
811  const OTIdentifier& USER_ID,
812  const OTIdentifier& ACCOUNT_ID, // If for Nymbox (vs
813  // inbox/outbox) then pass
814  // USER_ID in this field also.
815  int32_t nBoxType, // 0/nymbox, 1/inbox, 2/outbox
816  const int64_t& lTransactionNum) const;
817 
818  EXPORT int32_t queryAssetTypes(const OTIdentifier& SERVER_ID,
819  const OTIdentifier& USER_ID,
820  const OTASCIIArmor& ENCODED_MAP) const;
821 
822  EXPORT int32_t createAssetAccount(const OTIdentifier& SERVER_ID,
823  const OTIdentifier& USER_ID,
824  const OTIdentifier& ASSET_ID) const;
825 
826  EXPORT int32_t deleteAssetAccount(const OTIdentifier& SERVER_ID,
827  const OTIdentifier& USER_ID,
828  const OTIdentifier& ACCOUNT_ID) const;
829 
830  EXPORT int32_t getAccount(const OTIdentifier& SERVER_ID,
831  const OTIdentifier& USER_ID,
832  const OTIdentifier& ACCT_ID) const;
833 
834  EXPORT int32_t getAccountFiles(const OTIdentifier& SERVER_ID,
835  const OTIdentifier& USER_ID,
836  const OTIdentifier& ACCT_ID) const;
837 
839  const OTIdentifier& USER_ID,
840  int64_t MINIMUM_TRANSFER) const; // Must be above zero. If <= 0,
841  // defaults to 10.
842 
843  EXPORT bool AddBasketCreationItem(
844  const OTIdentifier& USER_ID, // for signature.
845  Basket& theBasket, // created in above call.
846  const OTIdentifier& ASSET_TYPE_ID, // Adding an asset type to the new
847  // basket.
848  int64_t MINIMUM_TRANSFER) const; // The amount of the asset type
849  // that is
850  // in the basket.
851 
852  EXPORT int32_t issueBasket(const OTIdentifier& SERVER_ID,
853  const OTIdentifier& USER_ID,
854  const OTString& BASKET_INFO) const;
855 
857  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
858  const OTIdentifier& BASKET_ASSET_TYPE_ID,
859  const OTIdentifier& BASKET_ASSET_ACCT_ID,
860  int32_t TRANSFER_MULTIPLE) const; // 1 2 3
861  // 5=2,3,4 OR 10=4,6,8 OR 15=6,9,12
862 
863  EXPORT bool AddBasketExchangeItem(const OTIdentifier& SERVER_ID,
864  const OTIdentifier& USER_ID,
865  Basket& theBasket,
866  const OTIdentifier& ASSET_TYPE_ID,
867  const OTIdentifier& ASSET_ACCT_ID) const;
868 
869  EXPORT int32_t exchangeBasket(const OTIdentifier& SERVER_ID,
870  const OTIdentifier& USER_ID,
871  const OTIdentifier& BASKET_ASSET_ID,
872  const OTString& BASKET_INFO,
873  bool bExchangeInOrOut) const;
874 
875  EXPORT int32_t getTransactionNumber(const OTIdentifier& SERVER_ID,
876  const OTIdentifier& USER_ID) const;
877 
878  EXPORT int32_t notarizeWithdrawal(const OTIdentifier& SERVER_ID,
879  const OTIdentifier& USER_ID,
880  const OTIdentifier& ACCT_ID,
881  const int64_t& AMOUNT) const;
882 
883  EXPORT int32_t notarizeDeposit(const OTIdentifier& SERVER_ID,
884  const OTIdentifier& USER_ID,
885  const OTIdentifier& ACCT_ID,
886  const OTString& THE_PURSE) const;
887 
888  EXPORT int32_t notarizeTransfer(const OTIdentifier& SERVER_ID,
889  const OTIdentifier& USER_ID,
890  const OTIdentifier& ACCT_FROM,
891  const OTIdentifier& ACCT_TO,
892  const int64_t& AMOUNT,
893  const OTString& NOTE) const;
894 
895  EXPORT int32_t getNymbox(const OTIdentifier& SERVER_ID,
896  const OTIdentifier& USER_ID) const;
897 
898  EXPORT int32_t getInbox(const OTIdentifier& SERVER_ID,
899  const OTIdentifier& USER_ID,
900  const OTIdentifier& ACCT_ID) const;
901 
902  EXPORT int32_t getOutbox(const OTIdentifier& SERVER_ID,
903  const OTIdentifier& USER_ID,
904  const OTIdentifier& ACCT_ID) const;
905 
906  // Returns:
907  // -1 if error.
908  // 0 if Nymbox is empty.
909  // 1 or more: Count of items in Nymbox before processing.
910  EXPORT int32_t processNymbox(const OTIdentifier& SERVER_ID,
911  const OTIdentifier& USER_ID) const;
912 
913  EXPORT int32_t processInbox(const OTIdentifier& SERVER_ID,
914  const OTIdentifier& USER_ID,
915  const OTIdentifier& ACCT_ID,
916  const OTString& ACCT_LEDGER) const;
917 
918  EXPORT int32_t withdrawVoucher(const OTIdentifier& SERVER_ID,
919  const OTIdentifier& USER_ID,
920  const OTIdentifier& ACCT_ID,
921  const OTIdentifier& RECIPIENT_USER_ID,
922  const OTString& CHEQUE_MEMO,
923  const int64_t& AMOUNT) const;
924 
925  EXPORT int32_t payDividend(
926  const OTIdentifier& SERVER_ID,
927  const OTIdentifier& ISSUER_USER_ID, // must be issuer of
928  // SHARES_ASSET_TYPE_ID
929  const OTIdentifier& DIVIDEND_FROM_ACCT_ID, // if dollars paid for pepsi
930  // shares, then this is the
931  // issuer's dollars account.
932  const OTIdentifier& SHARES_ASSET_TYPE_ID, // if dollars paid for pepsi
933  // shares,
934  // then this is the pepsi shares
935  // asset type id.
936  const OTString& DIVIDEND_MEMO, // user-configurable note that's added to
937  // the
938  // payout request message.
939  const int64_t& AMOUNT_PER_SHARE) const; // number of dollars to be paid
940  // out
941  // PER SHARE (multiplied by total
942  // number of shares issued.)
943 
944  EXPORT int32_t depositCheque(const OTIdentifier& SERVER_ID,
945  const OTIdentifier& USER_ID,
946  const OTIdentifier& ACCT_ID,
947  const OTString& THE_CHEQUE) const;
948 
949  EXPORT int32_t triggerClause(const OTIdentifier& SERVER_ID,
950  const OTIdentifier& USER_ID,
951  const int64_t& lTransactionNum,
952  const OTString& strClauseName,
953  const OTString* pStrParam = nullptr) const;
954 
955  EXPORT bool Create_SmartContract(
956  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
957  // signing at this point is only to
958  // cause a save.)
959  time64_t VALID_FROM, // Default (0 or nullptr) == NOW
960  time64_t VALID_TO, // Default (0 or nullptr) == no expiry / cancel
961  // anytime
962  OTString& strOutput) const;
963 
964  EXPORT bool SmartContract_AddBylaw(
965  const OTString& THE_CONTRACT, // The contract, about to have the bylaw
966  // added to it.
967  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
968  // signing at this point is only to
969  // cause a save.)
970  const OTString& BYLAW_NAME, // The Bylaw's NAME as referenced in the
971  // smart contract. (And the scripts...)
972  OTString& strOutput) const;
973 
974  EXPORT bool SmartContract_AddClause(
975  const OTString& THE_CONTRACT, // The contract, about to have the clause
976  // added to it.
977  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
978  // signing at this point is only to
979  // cause a save.)
980  const OTString& BYLAW_NAME, // Should already be on the contract. (This
981  // way we can find it.)
982  const OTString& CLAUSE_NAME, // The Clause's name as referenced in the
983  // smart contract. (And the scripts...)
984  const OTString& SOURCE_CODE, // The actual source code for the clause.
985  OTString& strOutput) const;
986 
987  EXPORT bool SmartContract_AddVariable(
988  const OTString& THE_CONTRACT, // The contract, about to have the clause
989  // added to it.
990  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
991  // signing at this point is only to
992  // cause a save.)
993  const OTString& BYLAW_NAME, // Should already be on the contract. (This
994  // way we can find it.)
995  const OTString& VAR_NAME, // The Variable's name as referenced in the
996  // smart contract. (And the scripts...)
997  const OTString& VAR_ACCESS, // "constant", "persistent", or "important".
998  const OTString& VAR_TYPE, // "string", "int64_t", or "bool"
999  const OTString& VAR_VALUE, // Contains a string. If type is int64_t,
1000  // atol() will be used to convert value to a
1001  // int64_t. If type is bool, the strings
1002  // "true" or "false" are expected here in
1003  // order to convert to a bool.
1004  OTString& strOutput) const;
1005 
1006  EXPORT bool SmartContract_AddCallback(
1007  const OTString& THE_CONTRACT, // The contract, about to have the clause
1008  // added to it.
1009  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1010  // signing at this point is only to
1011  // cause a save.)
1012  const OTString& BYLAW_NAME, // Should already be on the contract. (This
1013  // way we can find it.)
1014  const OTString& CALLBACK_NAME, // The Callback's name as referenced in
1015  // the smart contract. (And the
1016  // scripts...)
1017  const OTString& CLAUSE_NAME, // The actual clause that will be triggered
1018  // by the callback. (Must exist.)
1019  OTString& strOutput) const;
1020 
1021  EXPORT bool SmartContract_AddHook(
1022  const OTString& THE_CONTRACT, // The contract, about to have the clause
1023  // added to it.
1024  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1025  // signing at this point is only to
1026  // cause a save.)
1027  const OTString& BYLAW_NAME, // Should already be on the contract. (This
1028  // way we can find it.)
1029  const OTString& HOOK_NAME, // The Hook's name as referenced in the smart
1030  // contract. (And the scripts...)
1031  const OTString& CLAUSE_NAME, // The actual clause that will be triggered
1032  // by the hook. (You can call this multiple
1033  // times, and have multiple clauses trigger
1034  // on the same hook.)
1035  OTString& strOutput) const;
1036 
1037  EXPORT bool SmartContract_AddParty(
1038  const OTString& THE_CONTRACT, // The contract, about to have the bylaw
1039  // added to it.
1040  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1041  // signing at this point is only to
1042  // cause a save.)
1043  const OTString& PARTY_NAME, // The Party's NAME as referenced in the
1044  // smart contract. (And the scripts...)
1045  const OTString& AGENT_NAME, // An AGENT will be added by default for
1046  // this party. Need Agent NAME.
1047  OTString& strOutput) const;
1048 
1049  EXPORT bool SmartContract_AddAccount(
1050  const OTString& THE_CONTRACT, // The contract, about to have the clause
1051  // added to it.
1052  const OTIdentifier& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1053  // signing at this point is only to
1054  // cause a save.)
1055  const OTString& PARTY_NAME, // The Party's NAME as referenced in the
1056  // smart contract. (And the scripts...)
1057  const OTString& ACCT_NAME, // The Account's name as referenced in the
1058  // smart contract
1059  const OTString& ASSET_TYPE_ID, // Asset Type ID for the Account.
1060  OTString& strOutput) const;
1061 
1062  EXPORT int32_t SmartContract_CountNumsNeeded(
1063  const OTString& THE_CONTRACT, // The contract, about to have the bylaw
1064  // added to it.
1065  const OTString& AGENT_NAME) const; // An AGENT will be added by default
1066  // for
1067  // this party. Need Agent NAME.
1068 
1069  EXPORT bool SmartContract_ConfirmAccount(const OTString& THE_CONTRACT,
1070  const OTIdentifier& SIGNER_NYM_ID,
1071  const OTString& PARTY_NAME,
1072  const OTString& ACCT_NAME,
1073  const OTString& AGENT_NAME,
1074  const OTString& ACCT_ID,
1075  OTString& strOutput) const;
1076 
1077  EXPORT bool SmartContract_ConfirmParty(
1078  const OTString& THE_CONTRACT, // The smart contract, about to be changed
1079  // by this function.
1080  const OTString& PARTY_NAME, // Should already be on the contract. This
1081  // way we can find it.
1082  const OTIdentifier& NYM_ID, // Nym ID for the party, the actual owner,
1083  OTString& strOutput) const; // ===> AS WELL AS for the default AGENT of
1084  // that
1085  // party. (For now, until I code entities)
1086  EXPORT bool Msg_HarvestTransactionNumbers(
1087  const OTMessage& theMsg, const OTIdentifier& USER_ID,
1088  bool bHarvestingForRetry, bool bReplyWasSuccess, bool bReplyWasFailure,
1089  bool bTransactionWasSuccess, bool bTransactionWasFailure) const;
1090 
1091  EXPORT bool HarvestClosingNumbers(const OTIdentifier& SERVER_ID,
1092  const OTIdentifier& NYM_ID,
1093  const OTString& THE_CRON_ITEM) const;
1094 
1095  EXPORT bool HarvestAllNumbers(const OTIdentifier& SERVER_ID,
1096  const OTIdentifier& NYM_ID,
1097  const OTString& THE_CRON_ITEM) const;
1098  EXPORT int32_t
1099  activateSmartContract(const OTIdentifier& SERVER_ID,
1100  const OTIdentifier& USER_ID,
1101  const OTString& THE_SMART_CONTRACT) const;
1102 
1103  EXPORT int32_t depositPaymentPlan(const OTIdentifier& SERVER_ID,
1104  const OTIdentifier& USER_ID,
1105  const OTString& THE_PAYMENT_PLAN) const;
1106  EXPORT int32_t issueMarketOffer(
1107  const OTIdentifier& SERVER_ID, const OTIdentifier& USER_ID,
1108  const OTIdentifier& ASSET_ACCT_ID, const OTIdentifier& CURRENCY_ACCT_ID,
1109  const int64_t& MARKET_SCALE, // Defaults to minimum of 1. Market
1110  // granularity.
1111  const int64_t& MINIMUM_INCREMENT, // This will be multiplied by the
1112  // Scale. Min 1.
1113  const int64_t& TOTAL_ASSETS_ON_OFFER, // Total assets available for sale
1114  // or purchase. Will be multiplied
1115  // by minimum increment.
1116  const int64_t& PRICE_LIMIT, // Per Minimum Increment...
1117  bool bBuyingOrSelling, // BUYING == false, SELLING == true.
1118  time64_t tLifespanInSeconds = OT_TIME_DAY_IN_SECONDS, // 86400 seconds
1119  // == 1 day.
1120  char STOP_SIGN = 0, // For stop orders, set to '<' or '>'
1121  int64_t ACTIVATION_PRICE = 0) const; // For stop orders, set the
1122  // threshold price here.
1123  EXPORT int32_t getMarketList(const OTIdentifier& SERVER_ID,
1124  const OTIdentifier& USER_ID) const;
1125  EXPORT int32_t getMarketOffers(const OTIdentifier& SERVER_ID,
1126  const OTIdentifier& USER_ID,
1127  const OTIdentifier& MARKET_ID,
1128  const int64_t& lDepth) const;
1129  EXPORT int32_t getMarketRecentTrades(const OTIdentifier& SERVER_ID,
1130  const OTIdentifier& USER_ID,
1131  const OTIdentifier& MARKET_ID) const;
1132  EXPORT int32_t getNym_MarketOffers(const OTIdentifier& SERVER_ID,
1133  const OTIdentifier& USER_ID) const;
1134  // For cancelling market offers and payment plans.
1135  EXPORT int32_t cancelCronItem(const OTIdentifier& SERVER_ID,
1136  const OTIdentifier& USER_ID,
1137  const OTIdentifier& ASSET_ACCT_ID,
1138  const int64_t& lTransactionNum) const;
1139 
1140  EXPORT void AddServerContract(const OTServerContract& pContract) const;
1141  EXPORT void AddAssetContract(const OTAssetContract& theContract) const;
1142 };
1143 
1144 } // namespace opentxs
1145 
1146 #endif // NOT_SWIG
1147 
1148 #endif // OPENTXS_CLIENT_OPENTRANSACTIONS_HPP
EXPORT bool ResyncNymWithServer(OTPseudonym &theNym, const OTLedger &theNymbox, const OTPseudonym &theMessageNym) const
EXPORT int32_t NumList_Count(const OTNumList &theList) const
EXPORT int32_t deleteUserAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool VerifyAccountReceipt(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool AddSignature(const OTIdentifier &theSignerNymID, const OTString &strContract, OTString &strOutput) const
EXPORT bool Wallet_RemoveNym(const OTIdentifier &NYM_ID) const
EXPORT bool Wallet_CanRemoveAssetType(const OTIdentifier &ASSET_ID) const
EXPORT Purse * CreatePurse(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID, const OTIdentifier &OWNER_ID) const
EXPORT bool SetAccount_Name(const OTIdentifier &ACCT_ID, const OTIdentifier &SIGNER_NYM_ID, const OTString &ACCT_NEW_NAME) const
EXPORT bool Encrypt(const OTIdentifier &theRecipientNymID, const OTString &strPlaintext, OTString &strOutput) const
EXPORT bool SetWallet(const OTString &strFilename)
EXPORT int32_t issueBasket(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTString &BASKET_INFO) const
EXPORT void AddAssetContract(const OTAssetContract &theContract) const
EXPORT bool SmartContract_AddClause(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &BYLAW_NAME, const OTString &CLAUSE_NAME, const OTString &SOURCE_CODE, OTString &strOutput) const
static EXPORT bool InitOTApp()
EXPORT bool AddBasketExchangeItem(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, Basket &theBasket, const OTIdentifier &ASSET_TYPE_ID, const OTIdentifier &ASSET_ACCT_ID) const
static EXPORT bool CleanupOTApp()
EXPORT int32_t getMarketOffers(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &MARKET_ID, const int64_t &lDepth) const
EXPORT int32_t cancelCronItem(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ASSET_ACCT_ID, const int64_t &lTransactionNum) const
EXPORT int32_t createAssetAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ASSET_ID) const
EXPORT OTPseudonym * GetOrLoadNym(const OTIdentifier &NYM_ID, bool bChecking=false, const char *szFuncName=nullptr, const OTPasswordData *pPWData=nullptr) const
OTClient * GetClient() const
EXPORT bool SavePurse(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID, const OTIdentifier &USER_ID, Purse &THE_PURSE) const
EXPORT OTLedger * LoadRecordBox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool Wallet_RemoveAssetType(const OTIdentifier &ASSET_ID) const
EXPORT bool SmartContract_AddCallback(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &BYLAW_NAME, const OTString &CALLBACK_NAME, const OTString &CLAUSE_NAME, OTString &strOutput) const
EXPORT int64_t GetBasketMinimumTransferAmount(const OTIdentifier &BASKET_ASSET_TYPE_ID) const
EXPORT OTLedger * LoadNymboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t queryAssetTypes(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTASCIIArmor &ENCODED_MAP) const
EXPORT bool Decode(const OTString &strEncoded, OTString &strOutput, bool bLineBreaks=true) const
EXPORT bool Wallet_CanRemoveServer(const OTIdentifier &SERVER_ID) const
EXPORT OTLedger * LoadInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT int32_t checkServerID(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t issueMarketOffer(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ASSET_ACCT_ID, const OTIdentifier &CURRENCY_ACCT_ID, const int64_t &MARKET_SCALE, const int64_t &MINIMUM_INCREMENT, const int64_t &TOTAL_ASSETS_ON_OFFER, const int64_t &PRICE_LIMIT, bool bBuyingOrSelling, time64_t tLifespanInSeconds=OT_TIME_DAY_IN_SECONDS, char STOP_SIGN=0, int64_t ACTIVATION_PRICE=0) const
EXPORT int32_t GetServerCount() const
EXPORT time64_t GetTime() const
EXPORT bool SetNym_Name(const OTIdentifier &NYM_ID, const OTIdentifier &SIGNER_NYM_ID, const OTString &NYM_NEW_NAME) const
EXPORT int64_t GetBasketMemberMinimumTransferAmount(const OTIdentifier &BASKET_ASSET_TYPE_ID, int32_t nIndex) const
EXPORT int32_t notarizeTransfer(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_FROM, const OTIdentifier &ACCT_TO, const int64_t &AMOUNT, const OTString &NOTE) const
EXPORT Purse * CreatePurse_Passphrase(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID) const
EXPORT int32_t getMarketRecentTrades(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &MARKET_ID) const
EXPORT OTPseudonym * CreateNym(int32_t nKeySize=1024, const std::string str_id_source="", const std::string str_alt_location="") const
EXPORT bool SmartContract_AddParty(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &PARTY_NAME, const OTString &AGENT_NAME, OTString &strOutput) const
EXPORT bool Create_SmartContract(const OTIdentifier &SIGNER_NYM_ID, time64_t VALID_FROM, time64_t VALID_TO, OTString &strOutput) const
EXPORT int32_t getMint(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ASSET_ID) const
EXPORT int32_t payDividend(const OTIdentifier &SERVER_ID, const OTIdentifier &ISSUER_USER_ID, const OTIdentifier &DIVIDEND_FROM_ACCT_ID, const OTIdentifier &SHARES_ASSET_TYPE_ID, const OTString &DIVIDEND_MEMO, const int64_t &AMOUNT_PER_SHARE) const
EXPORT int32_t getInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID) const
EXPORT int32_t processInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const OTString &ACCT_LEDGER) const
EXPORT bool VerifySignature(const OTString &strContract, const OTIdentifier &theSignerNymID, OTContract **ppContract=nullptr) const
EXPORT bool SetServer_Name(const OTIdentifier &SERVER_ID, const OTString &STR_NEW_NAME) const
EXPORT bool DoesBoxReceiptExist(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID, int32_t nBoxType, const int64_t &lTransactionNum) const
EXPORT TransportCallback * GetTransportCallback() const
EXPORT OTWallet * GetWallet(const char *szFuncName=nullptr) const
EXPORT int32_t activateSmartContract(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTString &THE_SMART_CONTRACT) const
EXPORT bool AddBasketCreationItem(const OTIdentifier &USER_ID, Basket &theBasket, const OTIdentifier &ASSET_TYPE_ID, int64_t MINIMUM_TRANSFER) const
EXPORT bool SmartContract_AddBylaw(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &BYLAW_NAME, OTString &strOutput) const
EXPORT bool Encode(const OTString &strPlaintext, OTString &strOutput, bool bLineBreaks=true) const
EXPORT int32_t GetBasketMemberCount(const OTIdentifier &BASKET_ASSET_TYPE_ID) const
EXPORT bool Wallet_ChangePassphrase() const
EXPORT int32_t depositCheque(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const OTString &THE_CHEQUE) const
EXPORT bool Wallet_ImportNym(const OTString &FILE_CONTENTS, OTIdentifier *pNymID=nullptr) const
EXPORT OTLedger * LoadOutbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool HarvestClosingNumbers(const OTIdentifier &SERVER_ID, const OTIdentifier &NYM_ID, const OTString &THE_CRON_ITEM) const
EXPORT bool Wallet_ExportCert(const OTIdentifier &NYM_ID, OTString &strOutput) const
EXPORT int32_t withdrawVoucher(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const OTIdentifier &RECIPIENT_USER_ID, const OTString &CHEQUE_MEMO, const int64_t &AMOUNT) const
EXPORT bool ClearExpired(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, int32_t nIndex, bool bClearAll=false) const
EXPORT bool GetAssetType(int32_t iIndex, OTIdentifier &THE_ID, OTString &THE_NAME) const
EXPORT OTPseudonym * LoadPublicNym(const OTIdentifier &NYM_ID, const char *szFuncName=nullptr) const
EXPORT OTLedger * LoadPaymentInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool IsInitialized() const
EXPORT OTAccount * LoadAssetAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool NumList_Remove(OTNumList &theList, const OTNumList &theOldNumbers) const
EXPORT OTPseudonym * GetOrLoadPrivateNym(const OTIdentifier &NYM_ID, bool bChecking=false, const char *szFuncName=nullptr, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr) const
EXPORT bool DiscardCheque(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const OTString &THE_CHEQUE) const
int64_t time64_t
Definition: Common.hpp:209
EXPORT Token * Token_ChangeOwner(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTString &THE_TOKEN, const OTIdentifier &SIGNER_NYM_ID, const OTString &OLD_OWNER, const OTString &NEW_OWNER, const OTString *pstrDisplay=nullptr) const
EXPORT OTMessage * PopMessageBuffer(const int64_t &lRequestNumber, const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t getRequest(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool RemoveSentMessage(const int64_t &lRequestNumber, const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool HarvestAllNumbers(const OTIdentifier &SERVER_ID, const OTIdentifier &NYM_ID, const OTString &THE_CRON_ITEM) const
EXPORT Purse * Purse_Empty(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTString &THE_PURSE, const OTString *pstrDisplay=nullptr) const
EXPORT bool VerifyAndRetrieveXMLContents(const OTString &strContract, const OTIdentifier &theSignerNymID, OTString &strOutput)
Verify and Retrieve XML Contents.
EXPORT bool SmartContract_AddHook(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &BYLAW_NAME, const OTString &HOOK_NAME, const OTString &CLAUSE_NAME, OTString &strOutput) const
EXPORT bool GetAccount(int32_t iIndex, OTIdentifier &THE_ID, OTString &THE_NAME) const
EXPORT bool GetServer(int32_t iIndex, OTIdentifier &THE_ID, OTString &THE_NAME) const
EXPORT bool GetBasketMemberType(const OTIdentifier &BASKET_ASSET_TYPE_ID, int32_t nIndex, OTIdentifier &theOutputMemberType) const
EXPORT int32_t SmartContract_CountNumsNeeded(const OTString &THE_CONTRACT, const OTString &AGENT_NAME) const
EXPORT int32_t sendUserInstrument(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &USER_ID_RECIPIENT, const OTString &RECIPIENT_PUBKEY, const OTPayment &THE_INSTRUMENT, const OTPayment *pINSTRUMENT_FOR_SENDER=nullptr) const
EXPORT int32_t depositPaymentPlan(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTString &THE_PAYMENT_PLAN) const
EXPORT bool ClearRecord(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID, int32_t nIndex, bool bClearAll=false) const
EXPORT OTLedger * LoadPaymentInboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
#define OT_TIME_DAY_IN_SECONDS
Definition: Common.hpp:176
EXPORT bool SmartContract_ConfirmParty(const OTString &THE_CONTRACT, const OTString &PARTY_NAME, const OTIdentifier &NYM_ID, OTString &strOutput) const
EXPORT Basket * GenerateBasketExchange(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &BASKET_ASSET_TYPE_ID, const OTIdentifier &BASKET_ASSET_ACCT_ID, int32_t TRANSFER_MULTIPLE) const
EXPORT OTAssetContract * LoadAssetContract(const OTIdentifier &ASSET_ID) const
EXPORT bool LoadWallet() const
EXPORT Basket * GenerateBasketCreation(const OTIdentifier &USER_ID, int64_t MINIMUM_TRANSFER) const
EXPORT Purse * Purse_Pop(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTString &THE_PURSE, const OTIdentifier *pOWNER_ID=nullptr, const OTString *pstrDisplay=nullptr) const
EXPORT int32_t usageCredits(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &USER_ID_CHECK, int64_t lAdjustment=0) const
EXPORT OTServerContract * LoadServerContract(const OTIdentifier &SERVER_ID) const
EXPORT bool SetTransportCallback(TransportCallback *pTransportCallback)
EXPORT int32_t deleteAssetAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool RecordPayment(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, bool bIsInbox, int32_t nIndex, bool bSaveCopy) const
EXPORT bool TransportFunction(const OTServerContract &theServerContract, const OTEnvelope &theEnvelope) const
EXPORT bool Wallet_ImportCert(const OTString &DISPLAY_NAME, const OTString &FILE_CONTENTS, OTIdentifier *pNymID=nullptr) const
EXPORT bool Wallet_CanRemoveNym(const OTIdentifier &NYM_ID) const
EXPORT OTPseudonym * GetNymByIDPartialMatch(const std::string PARTIAL_ID, const char *szFuncName=nullptr) const
EXPORT Purse * Purse_Push(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTString &THE_PURSE, const OTString &THE_TOKEN, const OTIdentifier *pOWNER_ID=nullptr, const OTString *pstrDisplay=nullptr) const
EXPORT bool Msg_HarvestTransactionNumbers(const OTMessage &theMsg, const OTIdentifier &USER_ID, bool bHarvestingForRetry, bool bReplyWasSuccess, bool bReplyWasFailure, bool bTransactionWasSuccess, bool bTransactionWasFailure) const
EXPORT int32_t GetAccountCount() const
bool FlatSign(const OTIdentifier &theSignerNymID, const OTString &strInput, const OTString &strContractType, OTString &strOutput) const
EXPORT Purse * LoadPurse(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID, const OTIdentifier &USER_ID, const OTString *pstrDisplay=nullptr) const
EXPORT OTPaymentPlan * ProposePaymentPlan(const OTIdentifier &SERVER_ID, const time64_t &VALID_FROM, const time64_t &VALID_TO, const OTIdentifier &SENDER_ACCT_ID, const OTIdentifier &SENDER_USER_ID, const OTString &PLAN_CONSIDERATION, const OTIdentifier &RECIPIENT_ACCT_ID, const OTIdentifier &RECIPIENT_USER_ID, const int64_t &INITIAL_PAYMENT_AMOUNT, const time64_t &INITIAL_PAYMENT_DELAY, const int64_t &PAYMENT_PLAN_AMOUNT, const time64_t &PAYMENT_PLAN_DELAY, const time64_t &PAYMENT_PLAN_PERIOD, time64_t PAYMENT_PLAN_LENGTH=OT_TIME_ZERO, int32_t PAYMENT_PLAN_MAX_PAYMENTS=0) const
EXPORT OTPseudonym * GetOrLoadPublicNym(const OTIdentifier &NYM_ID, const char *szFuncName=nullptr) const
EXPORT int32_t getMarketList(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t getOutbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID) const
EXPORT OTLedger * LoadNymbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool NumList_VerifyAll(const OTNumList &theList, const OTNumList &theQueryNumbers) const
EXPORT int32_t notarizeWithdrawal(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const int64_t &AMOUNT) const
EXPORT void AddServerContract(const OTServerContract &pContract) const
EXPORT Token * Purse_Peek(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTString &THE_PURSE, const OTIdentifier *pOWNER_ID=nullptr, const OTString *pstrDisplay=nullptr) const
EXPORT bool IsNym_RegisteredAtServer(const OTIdentifier &NYM_ID, const OTIdentifier &SERVER_ID) const
EXPORT int32_t notarizeDeposit(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID, const OTString &THE_PURSE) const
EXPORT OTMessage * GetSentMessage(const int64_t &lRequestNumber, const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t getAccountFiles(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID) const
EXPORT void FlushSentMessages(bool bHarvestingForRetry, const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTLedger &THE_NYMBOX) const
EXPORT bool WalletExists() const
EXPORT bool NumList_VerifyQuery(const OTNumList &theList, const OTNumList &theQueryNumbers) const
EXPORT int32_t triggerClause(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const int64_t &lTransactionNum, const OTString &strClauseName, const OTString *pStrParam=nullptr) const
EXPORT int32_t createUserAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool Decrypt(const OTIdentifier &theRecipientNymID, const OTString &strCiphertext, OTString &strOutput) const
EXPORT bool SetWalletFilename(const OTString &strPath)
EXPORT OTNym_or_SymmetricKey * LoadPurseAndOwnerFromString(const OTIdentifier &theServerID, const OTIdentifier &theAssetTypeID, const OTString &strPurse, Purse &thePurse, OTPassword &thePassword, bool bForEncrypting=true, const OTIdentifier *pOWNER_ID=nullptr, const OTString *pstrDisplay1=nullptr, const OTString *pstrDisplay2=nullptr) const
EXPORT OTPseudonym * LoadPrivateNym(const OTIdentifier &NYM_ID, bool bChecking=false, const char *szFuncName=nullptr, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr) const
EXPORT bool ConfirmPaymentPlan(const OTIdentifier &SERVER_ID, const OTIdentifier &SENDER_USER_ID, const OTIdentifier &SENDER_ACCT_ID, const OTIdentifier &RECIPIENT_USER_ID, OTPaymentPlan &thePlan) const
EXPORT OTLedger * LoadExpiredBox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool SmartContract_AddAccount(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &PARTY_NAME, const OTString &ACCT_NAME, const OTString &ASSET_TYPE_ID, OTString &strOutput) const
EXPORT int32_t getNymbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool IsBasketCurrency(const OTIdentifier &BASKET_ASSET_TYPE_ID) const
EXPORT Mint * LoadMint(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_ID) const
EXPORT OTLedger * LoadRecordBoxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool SmartContract_ConfirmAccount(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &PARTY_NAME, const OTString &ACCT_NAME, const OTString &AGENT_NAME, const OTString &ACCT_ID, OTString &strOutput) const
EXPORT bool SetAssetType_Name(const OTIdentifier &ASSET_ID, const OTString &STR_NEW_NAME) const
bool Wallet_ImportPurse(const OTIdentifier &SERVER_ID, const OTIdentifier &ASSET_TYPE_ID, const OTIdentifier &SIGNER_ID, const OTString &THE_PURSE, const OTString *pstrDisplay=nullptr)
EXPORT OTCheque * WriteCheque(const OTIdentifier &SERVER_ID, const int64_t &CHEQUE_AMOUNT, const time64_t &VALID_FROM, const time64_t &VALID_TO, const OTIdentifier &SENDER_ACCT_ID, const OTIdentifier &SENDER_USER_ID, const OTString &CHEQUE_MEMO, const OTIdentifier *pRECIPIENT_USER_ID=nullptr) const
EXPORT bool SignContract(const OTIdentifier &theSignerNymID, const OTString &strContract, OTString &strOutput) const
EXPORT bool LoadConfigFile()
EXPORT OTAssetContract * GetAssetContractPartialMatch(const std::string PARTIAL_ID, const char *szFuncName=nullptr) const
EXPORT bool SmartContract_AddVariable(const OTString &THE_CONTRACT, const OTIdentifier &SIGNER_NYM_ID, const OTString &BYLAW_NAME, const OTString &VAR_NAME, const OTString &VAR_ACCESS, const OTString &VAR_TYPE, const OTString &VAR_VALUE, OTString &strOutput) const
EXPORT int32_t exchangeBasket(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &BASKET_ASSET_ID, const OTString &BASKET_INFO, bool bExchangeInOrOut) const
EXPORT int32_t getBoxReceipt(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID, int32_t nBoxType, const int64_t &lTransactionNum) const
EXPORT bool HaveAlreadySeenReply(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const int64_t &lRequestNumber) const
EXPORT OTLedger * LoadExpiredBoxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t checkUser(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &USER_ID_CHECK) const
EXPORT OTNym_or_SymmetricKey * LoadPurseAndOwnerForMerge(const OTString &strPurse, Purse &thePurse, OTPassword &thePassword, bool bCanBePublic=false, const OTIdentifier *pOWNER_ID=nullptr, const OTString *pstrDisplay=nullptr) const
EXPORT int32_t getNym_MarketOffers(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t processNymbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT bool GetNym(int32_t iIndex, OTIdentifier &NYM_ID, OTString &NYM_NAME) const
#define OT_TIME_ZERO
Definition: Common.hpp:180
EXPORT int32_t GetNymCount() const
EXPORT OTAccount * GetOrLoadAccount(const OTPseudonym &theNym, const OTIdentifier &ACCT_ID, const OTIdentifier &SERVER_ID, const char *szFuncName=nullptr) const
EXPORT OTAccount * GetAccountPartialMatch(const std::string PARTIAL_ID, const char *szFuncName=nullptr) const
EXPORT bool Wallet_CanRemoveAccount(const OTIdentifier &ACCOUNT_ID) const
EXPORT OTServerContract * GetServerContractPartialMatch(const std::string PARTIAL_ID, const char *szFuncName=nullptr) const
EXPORT OTLedger * LoadInboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT bool GetWalletFilename(OTString &strPath) const
EXPORT bool NumList_Add(OTNumList &theList, const OTNumList &theNewNumbers) const
EXPORT OTLedger * LoadOutboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT int32_t getContract(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ASSET_ID) const
EXPORT int32_t GetAssetTypeCount() const
EXPORT int32_t getTransactionNumber(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
EXPORT int32_t sendUserMessage(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &USER_ID_RECIPIENT, const OTString &RECIPIENT_PUBKEY, const OTString &THE_MESSAGE) const
EXPORT bool Wallet_RemoveServer(const OTIdentifier &SERVER_ID) const
EXPORT int32_t issueAssetType(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTString &THE_CONTRACT) const
EXPORT bool Wallet_ExportNym(const OTIdentifier &NYM_ID, OTString &strOutput) const
EXPORT int32_t getAccount(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCT_ID) const