Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OTAPI_Exec.hpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * OTAPI_Exec.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_OTAPI_EXEC_HPP
134 #define OPENTXS_CLIENT_OTAPI_EXEC_HPP
135 
137 
138 namespace opentxs
139 {
140 
141 class OT_API;
142 
144 {
145 public:
146  EXPORT OTAPI_Exec();
147  EXPORT ~OTAPI_Exec();
148 
149  EXPORT OT_API* OTAPI() const;
150 
151  EXPORT int64_t StringToLong(const std::string& strNumber) const;
152  EXPORT std::string LongToString(const int64_t& lNumber) const;
153 
154  EXPORT uint64_t StringToUlong(const std::string& strNumber) const;
155  EXPORT std::string UlongToString(const uint64_t& lNumber) const;
156 
162  EXPORT bool AppInit(); // Call this ONLY ONCE, when your App first
163  // starts up.
164  EXPORT bool AppCleanup(); // Call this ONLY ONCE, when your App is
165  // shutting down.
166 
167  // SetAppBinaryFolder
168  // OPTIONAL. Used in Android and Qt.
169  //
170  // Certain platforms use this to override the Prefix folder.
171  // Basically /usr/local is the prefix folder by default, meaning
172  // /usr/local/lib/opentxs will be the location of the scripts. But
173  // if you override AppBinary folder to, say, "res/raw"
174  // (Android does something like that) then even though the prefix remains
175  // as /usr/local, the scripts folder will be res/raw
176  //
177  //
178  EXPORT void SetAppBinaryFolder(const std::string& strFolder) const;
179 
180  // SetHomeFolder
181  // OPTIONAL. Used in Android.
182  //
183  // The AppDataFolder, such as /Users/au/.ot, is constructed from the home
184  // folder, such as /Users/au.
185  //
186  // Normally the home folder is auto-detected, but certain platforms, such as
187  // Android, require us to explicitly set this folder from the Java code.
188  // Then
189  // the AppDataFolder is constructed from it. (It's the only way it can be
190  // done.)
191  //
192  // In Android, you would SetAppBinaryFolder to the path to
193  // "/data/app/packagename/res/raw",
194  // and you would SetHomeFolder to "/data/data/[app package]/files/"
195  //
196  EXPORT void SetHomeFolder(const std::string& strFolder) const;
197  // Then:
198 
223  EXPORT bool SetWallet(const std::string& strWalletFilename) const;
224 
233  EXPORT bool WalletExists() const;
234 
247  EXPORT bool LoadWallet() const;
248 
257  EXPORT bool SwitchWallet() const;
258 
263  EXPORT void Output(const int32_t& nLogLevel,
264  const std::string& strOutput) const;
265 
275  EXPORT time64_t GetTime() const;
276 
285  // const std::string& OT_CLI_ReadLine(); // Reads from cin until
286  // Newline.
287  // const std::string& OT_CLI_ReadUntilEOF(); // Reads from cin until
288  // EOF.
289 
290  // OTNumList is a class that encapsulates working with a comma-separated
291  // list
292  // of int64_t integers, stored in a std::set and easily serializable in/out
293  // of a string.
294  // (It's useful.)
295  //
296  EXPORT std::string NumList_Add(const std::string& strNumList,
297  const std::string& strNumbers) const;
298  EXPORT std::string NumList_Remove(const std::string& strNumList,
299  const std::string& strNumbers) const;
300  EXPORT bool NumList_VerifyQuery(
301  const std::string& strNumList,
302  const std::string& strNumbers) const; // returns OT_BOOL
303  EXPORT bool NumList_VerifyAll(
304  const std::string& strNumList,
305  const std::string& strNumbers) const; // returns OT_BOOL
306  EXPORT int32_t NumList_Count(const std::string& strNumList) const;
307 
319  EXPORT std::string Encode(const std::string& strPlaintext,
320  const bool& bLineBreaks) const; // bLineBreaks
321  // is OT_BOOL
322 
336  EXPORT std::string Decode(const std::string& strEncoded,
337  const bool& bLineBreaks) const; // bLineBreaks
338  // is OT_BOOL
339 
359  EXPORT std::string Encrypt(const std::string& RECIPIENT_NYM_ID,
360  const std::string& strPlaintext) const;
361 
387  EXPORT std::string Decrypt(const std::string& RECIPIENT_NYM_ID,
388  const std::string& strCiphertext) const;
389 
390  // Generates a new symmetric key, based on a passphrase,
391  // and returns it (or nullptr.)
392  //
393  EXPORT std::string CreateSymmetricKey() const;
394 
395  EXPORT std::string SymmetricEncrypt(const std::string& SYMMETRIC_KEY,
396  const std::string& PLAINTEXT) const;
397  EXPORT std::string SymmetricDecrypt(
398  const std::string& SYMMETRIC_KEY,
399  const std::string& CIPHERTEXT_ENVELOPE) const;
400 
419  EXPORT std::string SignContract(const std::string& SIGNER_NYM_ID,
420  const std::string& THE_CONTRACT) const;
421 
422  // Instead of signing an existing contract, this is for just signing a flat
423  // message.
424  // Or, for example, for signing a new contract that has no signature yet.
425  // Let's say you
426  // have a ledger, for example, with no signatures yet. Pass "LEDGER" as the
427  // CONTRACT_TYPE
428  // and the resulting output will start like this: -----BEGIN OT SIGNED
429  // LEDGER----- ...
430  // Returns the signed output, or nullptr.
431  //
432  EXPORT std::string FlatSign(const std::string& SIGNER_NYM_ID,
433  const std::string& THE_INPUT,
434  const std::string& CONTRACT_TYPE) const;
435 
454  EXPORT std::string AddSignature(const std::string& SIGNER_NYM_ID,
455  const std::string& THE_CONTRACT) const;
456 
462  EXPORT bool VerifySignature(const std::string& SIGNER_NYM_ID,
463  const std::string& THE_CONTRACT) const;
464 
474  EXPORT std::string VerifyAndRetrieveXMLContents(
475  const std::string& THE_CONTRACT, const std::string& SIGNER_ID) const;
476 
479  EXPORT int32_t GetMemlogSize() const;
480 
481  EXPORT std::string GetMemlogAtIndex(const int32_t& nIndex) const;
482 
483  EXPORT std::string PeekMemlogFront() const;
484  EXPORT std::string PeekMemlogBack() const;
485 
486  EXPORT bool PopMemlogFront() const;
487  EXPORT bool PopMemlogBack() const;
488 
510  EXPORT std::string CreateNym(const int32_t& nKeySize,
511  const std::string& NYM_ID_SOURCE,
512  const std::string& ALT_LOCATION)
513  const; // source and location can be empty.
514  // (OT will generate a Nym with a
515  // public key as the source.)
516 
517  EXPORT std::string GetNym_ActiveCronItemIDs(
518  const std::string& NYM_ID, const std::string& SERVER_ID) const;
519  EXPORT std::string GetActiveCronItem(const std::string& SERVER_ID,
520  int64_t lTransNum) const;
521 
522  EXPORT std::string GetNym_SourceForID(const std::string& NYM_ID) const;
523  EXPORT std::string GetNym_AltSourceLocation(
524  const std::string& NYM_ID) const;
525 
526  EXPORT int32_t GetNym_CredentialCount(const std::string& NYM_ID) const;
527  EXPORT std::string GetNym_CredentialID(const std::string& NYM_ID,
528  const int32_t& nIndex) const;
529  EXPORT std::string GetNym_CredentialContents(
530  const std::string& NYM_ID, const std::string& CREDENTIAL_ID) const;
531 
532  EXPORT int32_t GetNym_RevokedCredCount(const std::string& NYM_ID) const;
533  EXPORT std::string GetNym_RevokedCredID(const std::string& NYM_ID,
534  const int32_t& nIndex) const;
535  EXPORT std::string GetNym_RevokedCredContents(
536  const std::string& NYM_ID, const std::string& CREDENTIAL_ID) const;
537 
538  EXPORT int32_t
539  GetNym_SubcredentialCount(const std::string& NYM_ID,
540  const std::string& MASTER_CRED_ID) const;
541  EXPORT std::string GetNym_SubCredentialID(const std::string& NYM_ID,
542  const std::string& MASTER_CRED_ID,
543  const int32_t& nIndex) const;
544  EXPORT std::string GetNym_SubCredentialContents(
545  const std::string& NYM_ID, const std::string& MASTER_CRED_ID,
546  const std::string& SUB_CRED_ID) const;
547 
548  EXPORT std::string AddSubcredential(const std::string& NYM_ID,
549  const std::string& MASTER_CRED_ID,
550  const int32_t& nKeySize) const;
551  EXPORT bool RevokeSubcredential(const std::string& NYM_ID,
552  const std::string& MASTER_CRED_ID,
553  const std::string& SUB_CRED_ID) const;
554 
561  EXPORT std::string CreateServerContract(
562  const std::string& NYM_ID, const std::string& strXMLcontents) const;
563  EXPORT std::string CreateAssetContract(
564  const std::string& NYM_ID, const std::string& strXMLcontents) const;
565 
566  EXPORT std::string CalculateAssetContractID(
567  const std::string& str_Contract) const;
568  EXPORT std::string CalculateServerContractID(
569  const std::string& str_Contract) const;
570 
571  // Use these below functions to get the new contract ITSELF, using its ID
572  // that was returned by the above two functions:
573  //
574  // EXPORT std::string GetServer_Contract(const std::string& SERVER_ID); //
575  // Return's Server's contract (based on server ID)
576  // EXPORT std::string GetAssetType_Contract(const std::string&
577  // ASSET_TYPE_ID); // Returns currency contract based on Asset Type ID
578 
579  /*
580  ---------------------------------
581 
582  ASSET CONTRACTS will want to make sure they put something like this at the
583  top:
584 
585  <?xml version="1.0"?>
586  <digitalAssetContract version="1.0">
587 
588  <entity shortname="Just testing"
589  longname="I need user feedback to help design the contract tags the server
590  must support..."
591  email="F3llowTraveler (at) gmail.com"/>
592 
593  <issue company="Chuck-E-Cheese, Inc"
594  email="[email protected]"
595  contractUrl="https://chuckecheese.com/games/contract/"
596  type="currency"/>
597 
598  <currency name="game tokens" tla="TOKEN" symbol="tks" type="decimal"
599  factor="1" decimal_power="0" fraction="mg"/>
600 
601  ---------------------------------
602 
603  SERVER CONTRACTS will want to make sure they put something like this at the
604  top:
605 
606  <?xml version="1.0"?>
607  <notaryProviderContract version="1.0">
608 
609  <entity shortname="Transactions.com"
610  longname="Transactions.com, LLC"
611  email="[email protected]"
612  serverURL="https://transactions.com/vers/1/"/>
613 
614  <notaryServer hostname="localhost"
615  port="7085"
616  URL="https://transactions.com/vers/1/" />
617 
618  ---------------------------------
619 
620 
621  NEITHER has to worry about THIS, which is added automatically:
622 
623 
624  <key name="contract">
625  - -----BEGIN CERTIFICATE-----
626  MIICZjCCAc+gAwIBAgIJAO14L19TJgzcMA0GCSqGSIb3DQEBBQUAMFcxCzAJBgNV
627  BAYTAlVTMREwDwYDVQQIEwhWaXJnaW5pYTEQMA4GA1UEBxMHRmFpcmZheDERMA8G
628  A1UEChMIWm9yay5vcmcxEDAOBgNVBAMTB1Jvb3QgQ0EwHhcNMTAwOTI5MDUyMzAx
629  WhcNMjAwOTI2MDUyMzAxWjBeMQswCQYDVQQGEwJVUzERMA8GA1UECBMIVmlyZ2lu
630  aWExEDAOBgNVBAcTB0ZhaXJmYXgxETAPBgNVBAoTCFpvcmsub3JnMRcwFQYDVQQD
631  Ew5zaGVsbC56b3JrLm9yZzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA3vD9
632  fO4ov4854L8wXrgfv2tltDz0ieVrTNSLuy1xuQyb//+MwZ0EYwu8jMMQrqbUaYG6
633  y8zJu32yBKrBNPPwJ+fJE+tfgVg860dGVbwMd4KhpkKtppJXmZaGqLqvELaXa4Uw
634  9N3qg/faj0NMEDIBhv/tD/B5U65vH+U0JlRJ07kCAwEAAaMzMDEwCQYDVR0TBAIw
635  ADAkBgNVHREEHTAbgg5zaGVsbC56b3JrLm9yZ4IJbG9jYWxob3N0MA0GCSqGSIb3
636  DQEBBQUAA4GBALLXPa/naWsiXsw0JwlSiG7aOmvMF2romUkcr6uObhN7sghd38M0
637  l2kKTiptnA8txrri8RhqmQgOgiyKFCKBkxY7/XGot62cE8Y1+lqGXlhu2UHm6NjA
638  pRKvng75J2HTjmmsbCHy+nexn4t44wssfPYlGPD8sGwmO24u9tRfdzJE
639  - -----END CERTIFICATE-----
640  </key>
641 
642  */
643 
644  /*
645  EXPORT std::string Contract_AddTag(const std::string& NYM_ID, const
646  std::string& THE_CONTRACT,
647  const std::string& TAG_NAME, const std::string& SUBTAG_NAME,
648  const std::string& SUBTAG_VALUE, const std::string& TAG_VALUE);
649  key == TAG_NAME
650  name == SUBTAG_NAME
651  "contract" == SUBTAG_VALUE
652  <the cert> == TAG_VALUE
653 
654  */
655 
662  EXPORT int32_t
663  AddServerContract(const std::string& strContract) const; // returns
664  // OT_TRUE (1)
665  // or
666  // OT_FALSE(0)
667 
674  EXPORT int32_t
675  AddAssetContract(const std::string& strContract) const; // returns
676  // OT_TRUE (1)
677  // or
678  // OT_FALSE(0)
679 
689  EXPORT int32_t GetServerCount() const;
690  EXPORT int32_t GetAssetTypeCount() const;
691  EXPORT int32_t GetAccountCount() const;
692  EXPORT int32_t GetNymCount() const;
693 
694  EXPORT std::string GetServer_ID(const int32_t& nIndex) const; // based on
695  // Index
696  // (above 4
697  // functions)
698  // this
699  // returns the Server's ID
700  EXPORT std::string GetServer_Name(
701  const std::string& SERVER_ID) const; // Return's Server's name (based on
702  // server ID)
703  EXPORT std::string GetServer_Contract(const std::string& SERVER_ID)
704  const; // Return's Server's contract (based on
705  // server ID)
706 
714  EXPORT std::string FormatAmount(const std::string& ASSET_TYPE_ID,
715  const int64_t& THE_AMOUNT) const;
716 
724  EXPORT int64_t StringToAmount(const std::string& ASSET_TYPE_ID,
725  const std::string& str_input) const;
726 
727  EXPORT std::string GetAssetType_ID(const int32_t& nIndex) const; // returns
728  // Asset
729  // Type ID
730  // (based
731  // on index
732  // from
733  // GetAssetTypeCount)
734  EXPORT std::string GetAssetType_Name(
735  const std::string& ASSET_TYPE_ID) const; // Returns asset type name
736  // based on
737  // Asset Type ID
738  EXPORT std::string GetAssetType_TLA(const std::string& THE_ID) const;
739  EXPORT std::string GetAssetType_Contract(
740  const std::string& ASSET_TYPE_ID) const; // Returns currency contract
741  // based on
742  // Asset Type ID
743 
754  EXPORT std::string GetAccountWallet_ID(const int32_t& nIndex)
755  const; // returns a string containing the account ID,
756  // based on index.
757  EXPORT std::string GetAccountWallet_Name(
758  const std::string& ACCOUNT_ID) const; // returns the account name, based
759  // on
760  // account ID.
761  EXPORT int64_t GetAccountWallet_Balance(
762  const std::string& ACCOUNT_ID) const; // returns the account balance,
763  // based on
764  // account ID.
765  EXPORT std::string GetAccountWallet_Type(
766  const std::string& ACCOUNT_ID) const; // returns the account type
767  // (simple,
768  // issuer, etc)
769  EXPORT std::string GetAccountWallet_AssetTypeID(
770  const std::string& ACCOUNT_ID) const; // returns asset type ID of the
771  // account
772  EXPORT std::string GetAccountWallet_ServerID(
773  const std::string& ACCOUNT_ID) const; // returns Server ID of the
774  // account
775  EXPORT std::string GetAccountWallet_NymID(
776  const std::string& ACCOUNT_ID) const; // returns Nym ID of the account
777 
778  EXPORT std::string GetAccountWallet_InboxHash(
779  const std::string& ACCOUNT_ID) const; // returns latest InboxHash
780  // according to
781  // the account file. (Usually more
782  // recent than: GetNym_InboxHash)
783  EXPORT std::string GetAccountWallet_OutboxHash(
784  const std::string& ACCOUNT_ID) const; // returns latest OutboxHash
785  // according
786  // to the account file. (Usually more
787  // recent than: GetNym_OutboxHash)
788 
794  EXPORT bool VerifyAccountReceipt(const std::string& SERVER_ID,
795  const std::string& NYM_ID,
796  const std::string& ACCT_ID) const;
797 
809  EXPORT int32_t GetNym_TransactionNumCount(const std::string& SERVER_ID,
810  const std::string& NYM_ID) const;
811 
812  EXPORT std::string GetNym_ID(const int32_t& nIndex) const; // based
813  // on
814  // Index (above
815  // 4 functions)
816  // this returns
817  // the Nym's ID
818  EXPORT std::string GetNym_Name(const std::string& NYM_ID) const; // Returns
819  // Nym Name
820  // (based
821  // on
822  // NymID)
823  EXPORT std::string GetNym_Stats(const std::string& NYM_ID)
824  const; // Returns Nym Statistics (based on NymID)
825  EXPORT std::string GetNym_NymboxHash(const std::string& SERVER_ID,
826  const std::string& NYM_ID)
827  const; // NymboxHash for "most recently DOWNLOADED"
828  // Nymbox (by ServerID)
829  EXPORT std::string GetNym_RecentHash(const std::string& SERVER_ID,
830  const std::string& NYM_ID)
831  const; // "Most recent NymboxHash according to the
832  // SERVER's records" (Which is often sent as
833  // an 'FYI' with various server replies to
834  // my messages.)
835 
836  EXPORT std::string GetNym_InboxHash(const std::string& ACCOUNT_ID,
837  const std::string& NYM_ID)
838  const; // InboxHash for "most recently DOWNLOADED"
839  // Inbox (by AccountID). Often contains
840  // older value than
841  // GetAccountWallet_InboxHash.
842  EXPORT std::string GetNym_OutboxHash(const std::string& ACCOUNT_ID,
843  const std::string& NYM_ID)
844  const; // OutboxHash for "most recently DOWNLOADED"
845  // Outbox (by AccountID) Often contains
846  // older value than
847  // GetAccountWallet_OutboxHash
848 
849  EXPORT bool IsNym_RegisteredAtServer(const std::string& NYM_ID,
850  const std::string& SERVER_ID) const;
851 
876  EXPORT int32_t GetNym_MailCount(const std::string& NYM_ID) const;
877 
878  EXPORT std::string GetNym_MailContentsByIndex(
879  const std::string& NYM_ID,
880  const int32_t& nIndex) const; // returns the message itself (Subject:
881  // optionally as first line)
882 
883  EXPORT std::string GetNym_MailSenderIDByIndex(
884  const std::string& NYM_ID,
885  const int32_t& nIndex) const; // returns the NymID of the sender.
886  EXPORT std::string GetNym_MailServerIDByIndex(
887  const std::string& NYM_ID, const int32_t& nIndex) const; // returns the
888  // ServerID where the
889  // message came from.
890 
891  EXPORT bool Nym_RemoveMailByIndex(const std::string& NYM_ID,
892  const int32_t& nIndex) const; // (1 or
893  // 0.)
894  EXPORT bool Nym_VerifyMailByIndex(const std::string& NYM_ID,
895  const int32_t& nIndex) const; // true if
896  // signature
897  // verifies.
898  // (Sender
899  // Nym MUST
900  // be in my wallet for this to work.)
901 
902  EXPORT int32_t GetNym_OutmailCount(const std::string& NYM_ID) const;
903 
904  EXPORT std::string GetNym_OutmailContentsByIndex(
905  const std::string& NYM_ID,
906  const int32_t& nIndex) const; // returns the message itself (Subject:
907  // optionally as first line)
908 
909  EXPORT std::string GetNym_OutmailRecipientIDByIndex(
910  const std::string& NYM_ID,
911  const int32_t& nIndex) const; // returns the NymID of the recipient.
912  EXPORT std::string GetNym_OutmailServerIDByIndex(
913  const std::string& NYM_ID, const int32_t& nIndex) const; // returns the
914  // ServerID where the
915  // message came from.
916 
917  EXPORT bool Nym_RemoveOutmailByIndex(const std::string& NYM_ID,
918  const int32_t& nIndex) const; // (1 or
919  // 0.)
920  EXPORT bool Nym_VerifyOutmailByIndex(const std::string& NYM_ID,
921  const int32_t& nIndex)
922  const; // true if signature verifies. (Sender Nym MUST
923  // be in my wallet for this to work.)
924 
925  EXPORT int32_t GetNym_OutpaymentsCount(const std::string& NYM_ID) const;
926 
927  EXPORT std::string GetNym_OutpaymentsContentsByIndex(
928  const std::string& NYM_ID,
929  const int32_t& nIndex) const; // returns the message itself
930 
931  EXPORT std::string GetNym_OutpaymentsRecipientIDByIndex(
932  const std::string& NYM_ID,
933  const int32_t& nIndex) const; // returns the NymID of the recipient.
934  EXPORT std::string GetNym_OutpaymentsServerIDByIndex(
935  const std::string& NYM_ID, const int32_t& nIndex) const; // returns the
936  // ServerID where the
937  // message came from.
938 
939  EXPORT bool Nym_RemoveOutpaymentsByIndex(
940  const std::string& NYM_ID, const int32_t& nIndex) const; // (1 or 0.)
941  EXPORT bool Nym_VerifyOutpaymentsByIndex(const std::string& NYM_ID,
942  const int32_t& nIndex)
943  const; // true if signature verifies. (Sender Nym MUST
944  // be in my wallet for this to work.)
945 
958  EXPORT bool Wallet_CanRemoveServer(const std::string& SERVER_ID) const;
959 
967  EXPORT bool Wallet_RemoveServer(const std::string& SERVER_ID) const;
968 
977  EXPORT bool Wallet_CanRemoveAssetType(const std::string& ASSET_ID) const;
978 
986  EXPORT bool Wallet_RemoveAssetType(const std::string& ASSET_ID) const;
987 
996  EXPORT bool Wallet_CanRemoveNym(const std::string& NYM_ID) const;
997 
1005  EXPORT bool Wallet_RemoveNym(const std::string& NYM_ID) const;
1006 
1015  EXPORT bool Wallet_CanRemoveAccount(const std::string& ACCOUNT_ID) const;
1016 
1017  // See deleteAssetAccount(), a server message, for deleting asset accounts.
1018  // (You can't just delete them out of the wallet without first deleting them
1019  // off of the server.)
1020  //
1021 
1050  EXPORT bool Wallet_ChangePassphrase() const; // (true for success
1051  // and
1052  // false for error.)
1053 
1055  EXPORT std::string Wallet_ExportNym(const std::string& NYM_ID) const;
1056 
1058  EXPORT std::string Wallet_ImportNym(const std::string& FILE_CONTENTS) const;
1059 
1061  EXPORT std::string Wallet_ImportCert(
1062  const std::string& DISPLAY_NAME,
1063  const std::string& FILE_CONTENTS) const;
1064 
1066  EXPORT std::string Wallet_ExportCert(const std::string& NYM_ID) const;
1067 
1069  // ID.
1071  //
1072  EXPORT std::string Wallet_GetNymIDFromPartial(
1073  const std::string& PARTIAL_ID) const;
1074  EXPORT std::string Wallet_GetServerIDFromPartial(
1075  const std::string& PARTIAL_ID) const;
1076  EXPORT std::string Wallet_GetAssetIDFromPartial(
1077  const std::string& PARTIAL_ID) const;
1078  EXPORT std::string Wallet_GetAccountIDFromPartial(
1079  const std::string& PARTIAL_ID) const;
1080 
1101  EXPORT bool SetNym_Name(const std::string& NYM_ID,
1102  const std::string& SIGNER_NYM_ID,
1103  const std::string& NYM_NEW_NAME) const;
1104 
1107  EXPORT bool SetAccountWallet_Name(const std::string& ACCT_ID,
1108  const std::string& SIGNER_NYM_ID,
1109  const std::string& ACCT_NEW_NAME) const;
1110 
1111  EXPORT bool SetAssetType_Name(const std::string& ASSET_ID,
1112  const std::string& STR_NEW_NAME) const;
1113 
1114  EXPORT bool SetServer_Name(const std::string& SERVER_ID,
1115  const std::string& STR_NEW_NAME) const;
1116 
1172  EXPORT std::string WriteCheque(const std::string& SERVER_ID,
1173  const int64_t& CHEQUE_AMOUNT,
1174  const time64_t& VALID_FROM,
1175  const time64_t& VALID_TO,
1176  const std::string& SENDER_ACCT_ID,
1177  const std::string& SENDER_USER_ID,
1178  const std::string& CHEQUE_MEMO,
1179  const std::string& RECIPIENT_USER_ID) const;
1180 
1209  EXPORT bool DiscardCheque(const std::string& SERVER_ID,
1210  const std::string& USER_ID,
1211  const std::string& ACCT_ID,
1212  const std::string& THE_CHEQUE) const;
1213 
1276  EXPORT std::string ProposePaymentPlan(
1277  const std::string& SERVER_ID,
1278  const time64_t& VALID_FROM, // Default (0 or nullptr) == current time
1279  // measured in seconds since Jan 1970.
1280  const time64_t& VALID_TO, // Default (0 or nullptr) == no expiry /
1281  // cancel
1282  // anytime. Otherwise this is ADDED to
1283  // VALID_FROM (it's a length.)
1284  const std::string& SENDER_ACCT_ID, // Mandatory parameters.
1285  const std::string& SENDER_USER_ID, // Both sender and recipient must
1286  // sign before submitting.
1287  const std::string& PLAN_CONSIDERATION, // Like a memo.
1288  const std::string& RECIPIENT_ACCT_ID, // NOT optional.
1289  const std::string& RECIPIENT_USER_ID, // Both sender and recipient must
1290  // sign before submitting.
1291  const int64_t& INITIAL_PAYMENT_AMOUNT, // zero or nullptr == no initial
1292  // payment.
1293  const time64_t& INITIAL_PAYMENT_DELAY, // seconds from creation date.
1294  // Default is zero or nullptr.
1295  const int64_t& PAYMENT_PLAN_AMOUNT, // Zero or nullptr == no regular
1296  // payments.
1297  const time64_t& PAYMENT_PLAN_DELAY, // No. of seconds from creation
1298  // date. Default is zero or nullptr.
1299  // (Causing 30 days.)
1300  const time64_t& PAYMENT_PLAN_PERIOD, // No. of seconds between payments.
1301  // Default is zero or nullptr.
1302  // (Causing 30 days.)
1303  const time64_t& PAYMENT_PLAN_LENGTH, // In seconds. Defaults to 0 or
1304  // nullptr (no maximum length.)
1305  const int32_t& PAYMENT_PLAN_MAX_PAYMENTS // integer. Defaults to 0 or
1306  // nullptr (no maximum payments.)
1307  ) const;
1308 
1309  // The above version has too many arguments for boost::function apparently
1310  // (for Chaiscript.)
1311  // So this is a version of it that compresses those into a fewer number of
1312  // arguments.
1313  // (Then it expands them and calls the above version.)
1314  // See above function for more details on parameters.
1315  // Basically this version has ALL the same parameters, but it stuffs two or
1316  // three at a time into
1317  // a single parameter, as a comma-separated list in string form.
1318  //
1319  EXPORT std::string EasyProposePlan(
1320  const std::string& SERVER_ID,
1321  const std::string& DATE_RANGE, // "from,to" Default 'from' (0 or "") ==
1322  // NOW, and default 'to' (0 or "") == no
1323  // expiry / cancel anytime
1324  const std::string& SENDER_ACCT_ID, // Mandatory parameters.
1325  const std::string& SENDER_USER_ID, // Both sender and recipient must
1326  // sign before submitting.
1327  const std::string& PLAN_CONSIDERATION, // Like a memo.
1328  const std::string& RECIPIENT_ACCT_ID, // NOT optional.
1329  const std::string& RECIPIENT_USER_ID, // Both sender and recipient must
1330  // sign before submitting.
1331  const std::string& INITIAL_PAYMENT, // "amount,delay" Default 'amount'
1332  // (0 or "") == no initial payment.
1333  // Default 'delay' (0 or nullptr) is
1334  // seconds from creation date.
1335  const std::string& PAYMENT_PLAN, // "amount,delay,period" 'amount' is a
1336  // recurring payment. 'delay' and
1337  // 'period' cause 30 days if you pass 0
1338  // or "".
1339  const std::string& PLAN_EXPIRY // "length,number" 'length' is maximum
1340  // lifetime in seconds. 'number' is
1341  // maximum number of payments in seconds.
1342  // 0 or "" is unlimited (for both.)
1343  ) const;
1344 
1345  // Called by Customer. Pass in the plan obtained in the above call.
1346  //
1347  EXPORT std::string ConfirmPaymentPlan(
1348  const std::string& SERVER_ID, const std::string& SENDER_USER_ID,
1349  const std::string& SENDER_ACCT_ID, const std::string& RECIPIENT_USER_ID,
1350  const std::string& PAYMENT_PLAN) const;
1351 
1352  // SMART CONTRACTS
1353 
1354  // RETURNS: the Smart Contract itself. (Or nullptr.)
1355  //
1356  EXPORT std::string Create_SmartContract(
1357  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1358  // signing at this point is only to
1359  // cause a save.)
1360  const time64_t& VALID_FROM, // Default (0 or nullptr) == NOW
1361  const time64_t& VALID_TO // Default (0 or nullptr) == no expiry / cancel
1362  // anytime
1363  ) const;
1364 
1365  //
1366  // todo: Someday add a parameter here BYLAW_LANGUAGE so that people can use
1367  // custom languages in their scripts. For now I have a default language, so
1368  // I'll just make that the default. (There's only one language right now
1369  // anyway.)
1370  //
1371  // returns: the updated smart contract (or nullptr)
1372  EXPORT std::string SmartContract_AddBylaw(
1373  const std::string& THE_CONTRACT, // The contract, about to have the
1374  // bylaw added to it.
1375  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1376  // signing at this point is only to
1377  // cause a save.)
1378  const std::string& BYLAW_NAME // The Bylaw's NAME as referenced in the
1379  // smart contract. (And the scripts...)
1380  ) const;
1381 
1382  // returns: the updated smart contract (or nullptr)
1383  EXPORT std::string SmartContract_AddClause(
1384  const std::string& THE_CONTRACT, // The contract, about to have the
1385  // clause added to it.
1386  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1387  // signing at this point is only to
1388  // cause a save.)
1389  const std::string& BYLAW_NAME, // Should already be on the contract.
1390  // (This way we can find it.)
1391  const std::string& CLAUSE_NAME, // The Clause's name as referenced in
1392  // the smart contract. (And the
1393  // scripts...)
1394  const std::string& SOURCE_CODE // The actual source code for the clause.
1395  ) const;
1396 
1397  // returns: the updated smart contract (or nullptr)
1398  EXPORT std::string SmartContract_AddVariable(
1399  const std::string& THE_CONTRACT, // The contract, about to have the
1400  // variabnle added to it.
1401  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1402  // signing at this point is only to
1403  // cause a save.)
1404  const std::string& BYLAW_NAME, // Should already be on the contract.
1405  // (This way we can find it.)
1406  const std::string& VAR_NAME, // The Variable's name as referenced in the
1407  // smart contract. (And the scripts...)
1408  const std::string& VAR_ACCESS, // "constant", "persistent", or
1409  // "important".
1410  const std::string& VAR_TYPE, // "string", "int64_t", or "bool"
1411  const std::string& VAR_VALUE // Contains a string. If type is int64_t,
1412  // atol() will be used to convert value to
1413  // a int64_t. If type is bool, the strings
1414  // "true" or "false" are expected here in
1415  // order to convert to a bool.
1416  ) const;
1417 
1418  // returns: the updated smart contract (or nullptr)
1419  EXPORT std::string SmartContract_AddCallback(
1420  const std::string& THE_CONTRACT, // The contract, about to have the
1421  // callback added to it.
1422  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1423  // signing at this point is only to
1424  // cause a save.)
1425  const std::string& BYLAW_NAME, // Should already be on the contract.
1426  // (This way we can find it.)
1427  const std::string& CALLBACK_NAME, // The Callback's name as referenced
1428  // in the smart contract. (And the
1429  // scripts...)
1430  const std::string& CLAUSE_NAME // The actual clause that will be
1431  // triggered by the callback. (Must
1432  // exist.)
1433  ) const;
1434 
1435  // returns: the updated smart contract (or nullptr)
1436  EXPORT std::string SmartContract_AddHook(
1437  const std::string& THE_CONTRACT, // The contract, about to have the hook
1438  // added to it.
1439  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1440  // signing at this point is only to
1441  // cause a save.)
1442  const std::string& BYLAW_NAME, // Should already be on the contract.
1443  // (This way we can find it.)
1444  const std::string& HOOK_NAME, // The Hook's name as referenced in the
1445  // smart contract. (And the scripts...)
1446  const std::string& CLAUSE_NAME // The actual clause that will be
1447  // triggered by the hook. (You can call
1448  // this multiple times, and have multiple
1449  // clauses trigger on the same hook.)
1450  ) const;
1451 
1452  // RETURNS: Updated version of THE_CONTRACT. (Or nullptr.)
1453  EXPORT std::string SmartContract_AddParty(
1454  const std::string& THE_CONTRACT, // The contract, about to have the
1455  // party added to it.
1456  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1457  // signing at this point is only to
1458  // cause a save.)
1459  const std::string& PARTY_NAME, // The Party's NAME as referenced in the
1460  // smart contract. (And the scripts...)
1461  const std::string& AGENT_NAME // An AGENT will be added by default for
1462  // this party. Need Agent NAME.
1463  ) const;
1464 
1465  // (FYI, that is basically the only option, until I code Entities and Roles.
1466  // Until then, a party can ONLY be
1467  // a Nym, with himself as the agent representing that same party. Nym ID is
1468  // supplied on ConfirmParty() below.)
1469 
1470  // Used when creating a theoretical smart contract (that could be used over
1471  // and over again with different parties.)
1472  //
1473  // returns: the updated smart contract (or nullptr)
1474  EXPORT std::string SmartContract_AddAccount(
1475  const std::string& THE_CONTRACT, // The contract, about to have the
1476  // account added to it.
1477  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1478  // signing at this point is only to
1479  // cause a save.)
1480  const std::string& PARTY_NAME, // The Party's NAME as referenced in the
1481  // smart contract. (And the scripts...)
1482  const std::string& ACCT_NAME, // The Account's name as referenced in the
1483  // smart contract
1484  const std::string& ASSET_TYPE_ID // Asset Type ID for the Account.
1485  ) const;
1486 
1495  EXPORT int32_t SmartContract_CountNumsNeeded(
1496  const std::string& THE_CONTRACT, // The smart contract, about to be
1497  // queried by this function.
1498  const std::string& AGENT_NAME) const;
1499 
1506  EXPORT std::string SmartContract_ConfirmAccount(
1507  const std::string& THE_CONTRACT, // The smart contract, about to be
1508  // changed by this function.
1509  const std::string& SIGNER_NYM_ID, // Use any Nym you wish here. (The
1510  // signing at this point is only to
1511  // cause a save.)
1512  const std::string& PARTY_NAME, // Should already be on the contract.
1513  // (This way we can find it.)
1514  const std::string& ACCT_NAME, // Should already be on the contract.
1515  // (This way we can find it.)
1516  const std::string& AGENT_NAME, // The agent name for this asset account.
1517  const std::string& ACCT_ID // AcctID for the asset account. (For
1518  // acct_name).
1519  ) const;
1520 
1527  EXPORT std::string SmartContract_ConfirmParty(
1528  const std::string& THE_CONTRACT, // The smart contract, about to be
1529  // changed by this function.
1530  const std::string& PARTY_NAME, // Should already be on the contract.
1531  // This way we can find it.
1532  const std::string& NYM_ID // Nym ID for the party, the actual owner,
1533  ) const;
1534  // ===> AS WELL AS for the default AGENT of that party.
1535 
1536  /* ----------------------------------------
1537  Various informational functions for the Smart Contracts.
1538  */
1539 
1540  EXPORT bool Smart_AreAllPartiesConfirmed(
1541  const std::string& THE_CONTRACT) const; // true or false?
1542  EXPORT int32_t Smart_GetBylawCount(const std::string& THE_CONTRACT) const;
1543  EXPORT std::string Smart_GetBylawByIndex(
1544  const std::string& THE_CONTRACT,
1545  const int32_t& nIndex) const; // returns the name of the bylaw.
1546  EXPORT std::string Bylaw_GetLanguage(const std::string& THE_CONTRACT,
1547  const std::string& BYLAW_NAME) const;
1548  EXPORT int32_t Bylaw_GetClauseCount(const std::string& THE_CONTRACT,
1549  const std::string& BYLAW_NAME) const;
1550  EXPORT std::string Clause_GetNameByIndex(
1551  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1552  const int32_t& nIndex) const; // returns the name of the clause.
1553  EXPORT std::string Clause_GetContents(
1554  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1555  const std::string& CLAUSE_NAME) const; // returns the contents of the
1556  // clause.
1557  EXPORT int32_t Bylaw_GetVariableCount(const std::string& THE_CONTRACT,
1558  const std::string& BYLAW_NAME) const;
1559  EXPORT std::string Variable_GetNameByIndex(
1560  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1561  const int32_t& nIndex) const; // returns the name of the variable.
1562  EXPORT std::string Variable_GetType(
1563  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1564  const std::string& VARIABLE_NAME) const; // returns the type of the
1565  // variable.
1566  EXPORT std::string Variable_GetAccess(
1567  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1568  const std::string& VARIABLE_NAME) const; // returns the access level of
1569  // the
1570  // variable.
1571  EXPORT std::string Variable_GetContents(
1572  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1573  const std::string& VARIABLE_NAME) const; // returns the contents of the
1574  // variable.
1575  EXPORT int32_t Bylaw_GetHookCount(const std::string& THE_CONTRACT,
1576  const std::string& BYLAW_NAME) const;
1577  EXPORT std::string Hook_GetNameByIndex(
1578  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1579  const int32_t& nIndex) const; // returns the name of the hook.
1580  EXPORT int32_t Hook_GetClauseCount(
1581  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1582  const std::string& HOOK_NAME) const; // for iterating clauses on a hook.
1583  EXPORT std::string Hook_GetClauseAtIndex(const std::string& THE_CONTRACT,
1584  const std::string& BYLAW_NAME,
1585  const std::string& HOOK_NAME,
1586  const int32_t& nIndex) const;
1587  EXPORT int32_t Bylaw_GetCallbackCount(const std::string& THE_CONTRACT,
1588  const std::string& BYLAW_NAME) const;
1589  EXPORT std::string Callback_GetNameByIndex(
1590  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1591  const int32_t& nIndex) const; // returns the name of the callback.
1592  EXPORT std::string Callback_GetClause(
1593  const std::string& THE_CONTRACT, const std::string& BYLAW_NAME,
1594  const std::string& CALLBACK_NAME) const; // returns name of clause
1595  // attached to
1596  // callback.
1597  EXPORT int32_t Smart_GetPartyCount(const std::string& THE_CONTRACT) const;
1598  EXPORT std::string Smart_GetPartyByIndex(
1599  const std::string& THE_CONTRACT,
1600  const int32_t& nIndex) const; // returns the name of the party.
1601  EXPORT bool Smart_IsPartyConfirmed(
1602  const std::string& THE_CONTRACT,
1603  const std::string& PARTY_NAME) const; // true or false?
1604  EXPORT std::string Party_GetID(const std::string& THE_CONTRACT,
1605  const std::string& PARTY_NAME)
1606  const; // returns either NymID or Entity ID.
1607  EXPORT int32_t Party_GetAcctCount(const std::string& THE_CONTRACT,
1608  const std::string& PARTY_NAME) const;
1609  EXPORT std::string Party_GetAcctNameByIndex(
1610  const std::string& THE_CONTRACT, const std::string& PARTY_NAME,
1611  const int32_t& nIndex) const; // returns the name of the clause.
1612  EXPORT std::string Party_GetAcctID(const std::string& THE_CONTRACT,
1613  const std::string& PARTY_NAME,
1614  const std::string& ACCT_NAME)
1615  const; // returns account ID for a given acct
1616  // name.
1617  EXPORT std::string Party_GetAcctAssetID(
1618  const std::string& THE_CONTRACT, const std::string& PARTY_NAME,
1619  const std::string& ACCT_NAME) const; // returns asset type ID for a
1620  // given acct
1621  // name.
1622  EXPORT std::string Party_GetAcctAgentName(
1623  const std::string& THE_CONTRACT, const std::string& PARTY_NAME,
1624  const std::string& ACCT_NAME) const; // returns agent name authorized to
1625  // administer a given named acct. (If
1626  // it's set...)
1627  EXPORT int32_t Party_GetAgentCount(const std::string& THE_CONTRACT,
1628  const std::string& PARTY_NAME) const;
1629  EXPORT std::string Party_GetAgentNameByIndex(
1630  const std::string& THE_CONTRACT, const std::string& PARTY_NAME,
1631  const int32_t& nIndex) const; // returns the name of the agent.
1632  EXPORT std::string Party_GetAgentID(const std::string& THE_CONTRACT,
1633  const std::string& PARTY_NAME,
1634  const std::string& AGENT_NAME)
1635  const; // returns ID of the agent. (If there is
1636  // one...)
1637 
1646  EXPORT int32_t
1647  activateSmartContract(const std::string& SERVER_ID,
1648  const std::string& USER_ID,
1649  const std::string& THE_SMART_CONTRACT) const;
1666  EXPORT int32_t triggerClause(const std::string& SERVER_ID,
1667  const std::string& USER_ID,
1668  const int64_t& TRANSACTION_NUMBER,
1669  const std::string& CLAUSE_NAME,
1670  const std::string& STR_PARAM) const;
1671 
1672  /*
1673  Msg_HarvestTransactionNumbers
1674 
1675  This function will load up the cron item (which is either a market offer, a
1676  payment plan,
1677  or a SMART CONTRACT.) UPDATE: this function operates on messages, not cron
1678  items.
1679 
1680  Then it will try to harvest all of the closing transaction numbers for
1681  NYM_ID that are
1682  available to be harvested from THE_CRON_ITEM. (There might be zero #s
1683  available for that
1684  Nym, which is still a success and will return true. False means error.)
1685 
1686  YOU MIGHT ASK:
1687 
1688  WHY WOULD I WANT to harvest ONLY the closing numbers for the Nym, and not
1689  the OPENING
1690  numbers as well? The answer is because for this Nym, the opening number
1691  might already
1692  be burned. For example, if Nym just tried to activate a smart contract, and
1693  the activation
1694  FAILED, then maybe the opening number is already gone, even though his
1695  closing numbers, on the
1696  other hand, are still valid for retrieval. (I have to double check this.)
1697 
1698  HOWEVER, what if the MESSAGE failed, before it even TRIED the transaction?
1699  In which case,
1700  the opening number is still good also, and should be retrieved.
1701 
1702  Remember, I have to keep signing for my transaction numbers until they are
1703  finally closed out.
1704  They will appear on EVERY balance agreement and transaction statement from
1705  here until the end
1706  of time, whenever I finally close out those numbers. If some of them are
1707  still good on a failed
1708  transaction, then I want to retrieve them so I can use them, and eventually
1709  close them out.
1710 
1711  ==> Whereas, what if I am the PARTY to a smart contract, but I am not the
1712  actual ACTIVATOR / ORIGINATOR
1713  (who activated the smart contract on the server). Therefore I never sent any
1714  transaction to the
1715  server, and I never burned my opening number. It's probably still a good #.
1716  If my wallet is not a piece
1717  of shit, then I should have a stored copy of any contract that I signed. If
1718  it turns out in the future
1719  that that contract wasn't activated, then I can retrieve not only my closing
1720  numbers, but my OPENING
1721  number as well! IN THAT CASE, I would call HarvestAllNumbers() instead of
1722  HarvestClosingNumbers().
1723 
1724 
1725  UPDATE: The above logic is now handled automatically in
1726  HarvestTransactionNumbers.
1727  Therefore HarvestClosingNumbers and HarvestAllNumbers have been removed.
1728 
1729  */
1730 
1731  // Returns OT_BOOL
1732  EXPORT bool Msg_HarvestTransactionNumbers(
1733  const std::string& THE_MESSAGE, const std::string& USER_ID,
1734  const bool& bHarvestingForRetry, const bool& bReplyWasSuccess,
1735  const bool& bReplyWasFailure, const bool& bTransactionWasSuccess,
1736  const bool& bTransactionWasFailure) const;
1737 
1738  // Returns OT_BOOL
1739  // int32_t HarvestClosingNumbers(const std::string& SERVER_ID,
1740  // const std::string& NYM_ID,
1741  // const std::string& THE_CRON_ITEM);
1742  //
1743  //
1744  //
1745  // Returns OT_BOOL
1746  // int32_t HarvestAllNumbers(const std::string& SERVER_ID,
1747  // const std::string& NYM_ID,
1748  // const std::string& THE_CRON_ITEM);
1749 
1757  EXPORT std::string LoadUserPubkey_Encryption(
1758  const std::string& USER_ID) const; // returns nullptr, or a public key.
1759 
1760  EXPORT std::string LoadUserPubkey_Signing(
1761  const std::string& USER_ID) const; // returns nullptr, or a public key.
1762 
1770  EXPORT std::string LoadPubkey_Encryption(
1771  const std::string& USER_ID) const; // returns nullptr, or a public key.
1772 
1773  EXPORT std::string LoadPubkey_Signing(
1774  const std::string& USER_ID) const; // returns nullptr, or a public key.
1775 
1783  EXPORT bool VerifyUserPrivateKey(
1784  const std::string& USER_ID) const; // returns OT_BOOL
1785 
1794  EXPORT std::string LoadPurse(
1795  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
1796  const std::string& USER_ID) const; // returns nullptr, or a purse.
1797 
1798  EXPORT std::string LoadMint(
1799  const std::string& SERVER_ID,
1800  const std::string& ASSET_TYPE_ID) const; // returns nullptr, or a mint
1801 
1802  EXPORT std::string LoadAssetContract(
1803  const std::string& ASSET_TYPE_ID) const; // returns nullptr, or an asset
1804  // contract.
1805 
1806  EXPORT std::string LoadServerContract(const std::string& SERVER_ID)
1807  const; // returns nullptr, or a server contract.
1808 
1811  //
1812  EXPORT bool Mint_IsStillGood(const std::string& SERVER_ID,
1813  const std::string& ASSET_TYPE_ID) const;
1814 
1821  EXPORT bool IsBasketCurrency(
1822  const std::string& ASSET_TYPE_ID) const; // returns OT_BOOL (OT_TRUE or
1823  // OT_FALSE aka 1 or 0.)
1824 
1831  EXPORT int32_t
1832  Basket_GetMemberCount(const std::string& BASKET_ASSET_TYPE_ID) const;
1833 
1839  EXPORT std::string Basket_GetMemberType(
1840  const std::string& BASKET_ASSET_TYPE_ID, const int32_t& nIndex) const;
1841 
1853  EXPORT int64_t Basket_GetMinimumTransferAmount(
1854  const std::string& BASKET_ASSET_TYPE_ID) const;
1855 
1870  const std::string& BASKET_ASSET_TYPE_ID, const int32_t& nIndex) const;
1871 
1879  EXPORT std::string LoadAssetAccount(
1880  const std::string& SERVER_ID, const std::string& USER_ID,
1881  const std::string& ACCOUNT_ID) const; // Returns nullptr, or an account.
1882 
1883  EXPORT std::string LoadInbox(
1884  const std::string& SERVER_ID, const std::string& USER_ID,
1885  const std::string& ACCOUNT_ID) const; // Returns nullptr, or an inbox.
1886 
1887  EXPORT std::string LoadOutbox(
1888  const std::string& SERVER_ID, const std::string& USER_ID,
1889  const std::string& ACCOUNT_ID) const; // returns nullptr, or an outbox.
1890 
1892  //
1893  EXPORT std::string LoadInboxNoVerify(
1894  const std::string& SERVER_ID, const std::string& USER_ID,
1895  const std::string& ACCOUNT_ID) const; // Returns nullptr, or an inbox.
1896 
1897  EXPORT std::string LoadOutboxNoVerify(
1898  const std::string& SERVER_ID, const std::string& USER_ID,
1899  const std::string& ACCOUNT_ID) const; // returns nullptr, or an outbox.
1900 
1901  // from local storage.
1902  EXPORT std::string LoadPaymentInbox(const std::string& SERVER_ID,
1903  const std::string& USER_ID)
1904  const; // Returns nullptr, or a payment inbox.
1905 
1906  EXPORT std::string LoadPaymentInboxNoVerify(const std::string& SERVER_ID,
1907  const std::string& USER_ID)
1908  const; // Returns nullptr, or a payment inbox.
1909 
1911  // depending
1913  // from local storage.
1914  EXPORT std::string LoadRecordBox(const std::string& SERVER_ID,
1915  const std::string& USER_ID,
1916  const std::string& ACCOUNT_ID)
1917  const; // Returns nullptr, or a RecordBox.
1918 
1919  EXPORT std::string LoadRecordBoxNoVerify(
1920  const std::string& SERVER_ID, const std::string& USER_ID,
1921  const std::string& ACCOUNT_ID) const; // Returns nullptr, or a
1922  // RecordBox.
1923 
1924  EXPORT bool ClearRecord(
1925  const std::string& SERVER_ID, const std::string& USER_ID,
1926  const std::string& ACCOUNT_ID, // USER_ID can be passed here as well.
1927  const int32_t& nIndex,
1928  const bool& bClearAll // if true, nIndex is ignored.
1929  ) const;
1930 
1931  // The expired box is only for incoming/outgoing payments that expired
1932  // before proecssing.
1933  //
1934  // (It doesn't apply to asset account inbox/outbox because those receipts
1935  // have already processed and thus cannot ever expire.)
1936  //
1937  // Whereas an incoming cheque can be left in the payments inbox and THEN
1938  // expire -- so this is where it will go when the user records the payment;
1939  // instead of putting it in the record box, we put it here. That way we
1940  // can tell which ones have actually expired, versus the ones that "expired"
1941  // AFTER they were put into the record box. (Meaning they never expired, but
1942  // they just seem that way because the "to" date passed sometime AFTER going
1943  // into the record box.) Whereas the expired box is for payments that
1944  // expired
1945  // BEFORE going into the record box. Basically, when you call RecordPayment,
1946  // if the instrument is expired BEFORE being recorded, it goes into the
1947  // expired
1948  // box -- whereas if it goes into the record box and THEN expires, then we
1949  // know
1950  // it wasn't expired at the time that it was recorded.)
1951  //
1952  EXPORT std::string LoadExpiredBox(
1953  const std::string& SERVER_ID,
1954  const std::string& USER_ID) const; // Returns nullptr, or an ExpiredBox
1955 
1956  EXPORT std::string LoadExpiredBoxNoVerify(
1957  const std::string& SERVER_ID,
1958  const std::string& USER_ID) const; // Returns nullptr, or a ExpiredBox.
1959 
1960  EXPORT bool ClearExpired(const std::string& SERVER_ID,
1961  const std::string& USER_ID, const int32_t& nIndex,
1962  const bool& bClearAll // if true, nIndex is
1963  // ignored.
1964  ) const;
1965 
1967  EXPORT int32_t Ledger_GetCount(
1968  const std::string& SERVER_ID, const std::string& USER_ID,
1969  const std::string& ACCOUNT_ID,
1970  const std::string& THE_LEDGER) const; // Returns number of
1971  // transactions
1972  // within.
1973 
1975  // so you can
1977  // ledger
1979  // response.)
1980  //
1981  EXPORT std::string Ledger_CreateResponse(
1982  const std::string& SERVER_ID, const std::string& USER_ID,
1983  const std::string& ACCOUNT_ID,
1984  const std::string& ORIGINAL_LEDGER) const;
1985 
1988  //
1989  EXPORT std::string Ledger_GetTransactionByIndex(
1990  const std::string& SERVER_ID, const std::string& USER_ID,
1991  const std::string& ACCOUNT_ID, const std::string& THE_LEDGER,
1992  const int32_t& nIndex) const; // returns transaction by index.
1993 
1994  EXPORT std::string Ledger_GetTransactionByID(
1995  const std::string& SERVER_ID, const std::string& USER_ID,
1996  const std::string& ACCOUNT_ID, const std::string& THE_LEDGER,
1997  const int64_t& TRANSACTION_NUMBER) const; // returns transaction by ID.
1998 
1999  EXPORT int64_t Ledger_GetTransactionIDByIndex(
2000  const std::string& SERVER_ID, const std::string& USER_ID,
2001  const std::string& ACCOUNT_ID, const std::string& THE_LEDGER,
2002  const int32_t& nIndex) const; // returns transaction number by index.
2003 
2005  //
2006  EXPORT std::string Ledger_AddTransaction(
2007  const std::string& SERVER_ID, const std::string& USER_ID,
2008  const std::string& ACCOUNT_ID, const std::string& THE_LEDGER,
2009  const std::string& THE_TRANSACTION) const;
2010 
2015  //
2016  EXPORT std::string Transaction_CreateResponse(
2017  const std::string& SERVER_ID, const std::string& USER_ID,
2018  const std::string& ACCOUNT_ID,
2019  const std::string& RESPONSE_LEDGER, // To be sent to the server...
2020  const std::string& ORIGINAL_TRANSACTION, // Responding to...?
2021  const bool& BOOL_DO_I_ACCEPT) const;
2022 
2039  EXPORT std::string Ledger_FinalizeResponse(
2040  const std::string& SERVER_ID, const std::string& USER_ID,
2041  const std::string& ACCOUNT_ID,
2042  const std::string& THE_LEDGER // 'Response' ledger be sent to the
2043  ) const; // server...
2044 
2086  EXPORT std::string Ledger_GetInstrument(
2087  const std::string& SERVER_ID, const std::string& USER_ID,
2088  const std::string& ACCOUNT_ID, const std::string& THE_LEDGER,
2089  const int32_t& nIndex) const; // returns financial instrument by index
2090  // of the
2091  // transaction it's in.
2092 
2093  // NOTE: If an instrument is already expired when this function is called,
2094  // it will be moved
2095  // to the expired box instead of the record box.
2096  EXPORT bool RecordPayment(
2097  const std::string& SERVER_ID, const std::string& USER_ID,
2098  const bool& bIsInbox, // true == payments inbox. false == payments
2099  // outbox.
2100  const int32_t& nIndex, // removes payment instrument (from payments in
2101  // or out box) and moves to record box.
2102  const bool& bSaveCopy) const; // If false, a copy will NOT be saved in
2103  // the
2104  // record box.
2105 
2107  //
2108  EXPORT std::string Transaction_GetType(
2109  const std::string& SERVER_ID, const std::string& USER_ID,
2110  const std::string& ACCOUNT_ID,
2111  const std::string& THE_TRANSACTION) const;
2112 
2114  // replyNotice
2116  // server
2118  // replyNotice,
2120  // notice.
2123  //
2124  EXPORT int64_t
2125  ReplyNotice_GetRequestNum(const std::string& SERVER_ID,
2126  const std::string& USER_ID,
2127  const std::string& THE_TRANSACTION) const;
2128 
2159  EXPORT std::string Transaction_GetVoucher(
2160  const std::string& SERVER_ID, const std::string& USER_ID,
2161  const std::string& ACCOUNT_ID,
2162  const std::string& THE_TRANSACTION) const;
2163 
2174  EXPORT int32_t
2175  Transaction_GetSuccess(const std::string& SERVER_ID,
2176  const std::string& USER_ID,
2177  const std::string& ACCOUNT_ID,
2178  const std::string& THE_TRANSACTION) const;
2179 
2180  EXPORT int32_t
2181  Transaction_IsCanceled(const std::string& SERVER_ID,
2182  const std::string& USER_ID,
2183  const std::string& ACCOUNT_ID,
2184  const std::string& THE_TRANSACTION) const;
2185 
2193  const std::string& SERVER_ID, const std::string& USER_ID,
2194  const std::string& ACCOUNT_ID,
2195  const std::string& THE_TRANSACTION) const;
2196 
2202  EXPORT time64_t
2203  Transaction_GetDateSigned(const std::string& SERVER_ID,
2204  const std::string& USER_ID,
2205  const std::string& ACCOUNT_ID,
2206  const std::string& THE_TRANSACTION) const;
2207 
2208  EXPORT int64_t
2209  Transaction_GetAmount(const std::string& SERVER_ID,
2210  const std::string& USER_ID,
2211  const std::string& ACCOUNT_ID,
2212  const std::string& THE_TRANSACTION) const;
2213 
2224  EXPORT std::string Pending_GetNote(
2225  const std::string& SERVER_ID, const std::string& USER_ID,
2226  const std::string& ACCOUNT_ID,
2227  const std::string& THE_TRANSACTION) const;
2228 
2229  EXPORT std::string Transaction_GetSenderUserID(
2230  const std::string& SERVER_ID, const std::string& USER_ID,
2231  const std::string& ACCOUNT_ID,
2232  const std::string& THE_TRANSACTION) const;
2233 
2234  EXPORT std::string Transaction_GetSenderAcctID(
2235  const std::string& SERVER_ID, const std::string& USER_ID,
2236  const std::string& ACCOUNT_ID,
2237  const std::string& THE_TRANSACTION) const;
2238 
2239  EXPORT std::string Transaction_GetRecipientUserID(
2240  const std::string& SERVER_ID, const std::string& USER_ID,
2241  const std::string& ACCOUNT_ID,
2242  const std::string& THE_TRANSACTION) const;
2243 
2244  EXPORT std::string Transaction_GetRecipientAcctID(
2245  const std::string& SERVER_ID, const std::string& USER_ID,
2246  const std::string& ACCOUNT_ID,
2247  const std::string& THE_TRANSACTION) const;
2248 
2256  EXPORT int64_t Transaction_GetDisplayReferenceToNum(
2257  const std::string& SERVER_ID, const std::string& USER_ID,
2258  const std::string& ACCOUNT_ID,
2259  const std::string& THE_TRANSACTION) const;
2260 
2303  EXPORT bool SavePurse(const std::string& SERVER_ID,
2304  const std::string& ASSET_TYPE_ID,
2305  const std::string& USER_ID,
2306  const std::string& THE_PURSE) const;
2307 
2308  //
2309  EXPORT std::string CreatePurse(
2310  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
2311  const std::string& OWNER_ID,
2312  const std::string& SIGNER_ID) const; // returns nullptr, or a purse.
2313 
2314  // Creates a password-protected purse, instead of nym-protected.
2315  //
2316  EXPORT std::string CreatePurse_Passphrase(
2317  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
2318  const std::string& SIGNER_ID) const;
2319 
2321  //
2323  //
2324  EXPORT int64_t Purse_GetTotalValue(const std::string& SERVER_ID,
2325  const std::string& ASSET_TYPE_ID,
2326  const std::string& THE_PURSE) const;
2327 
2329  //
2330  EXPORT int32_t Purse_Count(const std::string& SERVER_ID,
2331  const std::string& ASSET_TYPE_ID,
2332  const std::string& THE_PURSE) const;
2333 
2337  //
2338  EXPORT bool Purse_HasPassword(const std::string& SERVER_ID,
2339  const std::string& THE_PURSE) const;
2340 
2343  //
2344  // returns empty string if failure.
2345  //
2346  EXPORT std::string Purse_Peek(const std::string& SERVER_ID,
2347  const std::string& ASSET_TYPE_ID,
2348  const std::string& OWNER_ID,
2349  const std::string& THE_PURSE) const;
2350 
2355  // returns nullptr if failure.
2356  EXPORT std::string Purse_Pop(const std::string& SERVER_ID,
2357  const std::string& ASSET_TYPE_ID,
2358  const std::string& OWNER_OR_SIGNER_ID,
2359  const std::string& THE_PURSE) const;
2360 
2363  // Returns nullptr if failure.
2364  EXPORT std::string Purse_Push(
2365  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
2366  const std::string& SIGNER_ID, // The purse, in order to be changed, must
2367  // be re-signed, which requires a private
2368  // Nym. Even if the purse is
2369  // password-protected, then there's no
2370  // owner, but you still need to pass a Nym
2371  // in here to sign it (doesn't really
2372  // matter which one, but must have private
2373  // key for signing.)
2374  const std::string& OWNER_ID, // If the purse is password-protected, then
2375  // there's no owner, and this owner
2376  // parameter should be nullptr. However, if
2377  // the purse DOES have a Nym owner, then
2378  // you MUST pass the owner's Nym ID here,
2379  // in order for this action to be
2380  // successful. Furthermore, the public key
2381  // for that Nym must be available, in order
2382  // to encrypt the token being pushed into
2383  // the purse. (Private key NOT necessary
2384  // for owner, in this case.)
2385  const std::string& THE_PURSE, const std::string& THE_TOKEN) const;
2386 
2436  EXPORT std::string Purse_Empty(const std::string& SERVER_ID,
2437  const std::string& ASSET_TYPE_ID,
2438  const std::string& SIGNER_ID,
2439  const std::string& THE_PURSE) const;
2440 
2441  // Returns OT_BOOL
2443  EXPORT bool Wallet_ImportPurse(
2444  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
2445  const std::string& USER_ID, // you pass in the purse you're trying to
2446  // import
2447  const std::string& THE_PURSE // It should either have your User ID on
2448  // it, or the key should be inside so you
2449  // can import.
2450  ) const;
2451 
2470  EXPORT int32_t exchangePurse(const std::string& SERVER_ID,
2471  const std::string& ASSET_TYPE_ID,
2472  const std::string& USER_ID,
2473  const std::string& THE_PURSE) const;
2474 
2479  EXPORT std::string Token_ChangeOwner(
2480  const std::string& SERVER_ID, const std::string& ASSET_TYPE_ID,
2481  const std::string& THE_TOKEN, const std::string& SIGNER_NYM_ID,
2482  const std::string& OLD_OWNER, // Pass a NymID here as a string, or a
2483  // purse. (IF symmetrically encrypted, the
2484  // relevant key is in the purse.)
2485  const std::string& NEW_OWNER // Pass a NymID here as a string, or a
2486  // purse. (IF symmetrically encrypted, the
2487  // relevant key is in the purse.)
2488  ) const;
2489 
2496  EXPORT std::string Token_GetID(const std::string& SERVER_ID,
2497  const std::string& ASSET_TYPE_ID,
2498  const std::string& THE_TOKEN) const;
2499 
2501  //
2502  EXPORT int64_t Token_GetDenomination(const std::string& SERVER_ID,
2503  const std::string& ASSET_TYPE_ID,
2504  const std::string& THE_TOKEN) const;
2505 
2506  EXPORT int32_t Token_GetSeries(const std::string& SERVER_ID,
2507  const std::string& ASSET_TYPE_ID,
2508  const std::string& THE_TOKEN) const;
2509 
2511  //
2512  EXPORT time64_t Token_GetValidFrom(const std::string& SERVER_ID,
2513  const std::string& ASSET_TYPE_ID,
2514  const std::string& THE_TOKEN) const;
2515 
2516  // the date is seconds since Jan 1970.
2517  //
2518  EXPORT time64_t Token_GetValidTo(const std::string& SERVER_ID,
2519  const std::string& ASSET_TYPE_ID,
2520  const std::string& THE_TOKEN) const;
2521 
2522  EXPORT std::string Token_GetAssetID(const std::string& THE_TOKEN) const;
2523  EXPORT std::string Token_GetServerID(const std::string& THE_TOKEN) const;
2524 
2540  EXPORT int64_t Instrmnt_GetAmount(const std::string& THE_INSTRUMENT) const;
2541  EXPORT int64_t
2542  Instrmnt_GetTransNum(const std::string& THE_INSTRUMENT) const;
2543  EXPORT time64_t
2544  Instrmnt_GetValidFrom(const std::string& THE_INSTRUMENT) const;
2545  EXPORT time64_t
2546  Instrmnt_GetValidTo(const std::string& THE_INSTRUMENT) const;
2547  EXPORT std::string Instrmnt_GetMemo(
2548  const std::string& THE_INSTRUMENT) const;
2549  EXPORT std::string Instrmnt_GetType(
2550  const std::string& THE_INSTRUMENT) const;
2551  EXPORT std::string Instrmnt_GetServerID(
2552  const std::string& THE_INSTRUMENT) const;
2553  EXPORT std::string Instrmnt_GetAssetID(
2554  const std::string& THE_INSTRUMENT) const;
2555  EXPORT std::string Instrmnt_GetSenderUserID(
2556  const std::string& THE_INSTRUMENT) const;
2557  EXPORT std::string Instrmnt_GetSenderAcctID(
2558  const std::string& THE_INSTRUMENT) const;
2559  EXPORT std::string Instrmnt_GetRemitterUserID(
2560  const std::string& THE_INSTRUMENT) const;
2561  EXPORT std::string Instrmnt_GetRemitterAcctID(
2562  const std::string& THE_INSTRUMENT) const;
2563  EXPORT std::string Instrmnt_GetRecipientUserID(
2564  const std::string& THE_INSTRUMENT) const;
2565  EXPORT std::string Instrmnt_GetRecipientAcctID(
2566  const std::string& THE_INSTRUMENT) const;
2567 
2568  // *** MESSAGES BEING SENT TO THE SERVER -- BELOW!!! ***
2569 
2599  // Returns int32_t:
2600  // -1 means error; no message was sent.
2601  // -2 means the message was sent, but the request number must be passed as a
2602  // string, so call GetLargeRequestNum.
2603  // 0 means NO error, but also: no message was sent.
2604  // >0 means NO error, and the message was sent, and the request number fits
2605  // into an integer...
2606  // ...and in fact the requestNum IS the return value!
2607  // ===> In 99% of cases, this LAST option is what actually happens!!
2608  //
2609  EXPORT int32_t checkServerID(const std::string& SERVER_ID,
2610  const std::string& USER_ID) const;
2611 
2648  // Returns int32_t:
2649  // -1 means error; no message was sent.
2650  // -2 means the message was sent, but the request number must be passed as a
2651  // string, so call GetLargeRequestNum.
2652  // 0 means NO error, but also: no message was sent.
2653  // >0 means NO error, and the message was sent, and the request number fits
2654  // into an integer...
2655  // ...and in fact the requestNum IS the return value!
2656  // ===> In 99% of cases, this LAST option is what actually happens!!
2657  //
2658  EXPORT int32_t createUserAccount(const std::string& SERVER_ID,
2659  const std::string& USER_ID) const;
2660 
2677  EXPORT int32_t deleteUserAccount(const std::string& SERVER_ID,
2678  const std::string& USER_ID) const;
2679 
2694  EXPORT int32_t deleteAssetAccount(const std::string& SERVER_ID,
2695  const std::string& USER_ID,
2696  const std::string& ACCOUNT_ID) const;
2697 
2738  // Returns int32_t:
2739  // -1 means error; no message was sent.
2740  // -2 means the message was sent, but the request number must be passed as a
2741  // string, so call GetLargeRequestNum.
2742  // 0 means NO error, but also: no message was sent.
2743  // >0 means NO error, and the message was sent, and the request number fits
2744  // into an integer...
2745  // ...and in fact the requestNum IS the return value!
2746  // ===> In 99% of cases, this LAST option is what actually happens!!
2747  //
2748  EXPORT int32_t usageCredits(const std::string& SERVER_ID,
2749  const std::string& USER_ID,
2750  const std::string& USER_ID_CHECK,
2751  const int64_t& ADJUSTMENT) const;
2752 
2760  EXPORT int64_t
2761  Message_GetUsageCredits(const std::string& THE_MESSAGE) const;
2762 
2780  // Returns int32_t:
2781  // -1 means error; no message was sent.
2782  // -2 means the message was sent, but the request number must be passed as a
2783  // string, so call GetLargeRequestNum.
2784  // 0 means NO error, but also: no message was sent.
2785  // >0 means NO error, and the message was sent, and the request number fits
2786  // into an integer...
2787  // ...and in fact the requestNum IS the return value!
2788  // ===> In 99% of cases, this LAST option is what actually happens!!
2789  //
2790  EXPORT int32_t checkUser(const std::string& SERVER_ID,
2791  const std::string& USER_ID,
2792  const std::string& USER_ID_CHECK) const;
2793 
2809  // Returns int32_t:
2810  // -1 means error; no message was sent.
2811  // -2 means the message was sent, but the request number must be passed as a
2812  // string, so call GetLargeRequestNum.
2813  // 0 means NO error, but also: no message was sent.
2814  // >0 means NO error, and the message was sent, and the request number fits
2815  // into an integer...
2816  // ...and in fact the requestNum IS the return value!
2817  // ===> In 99% of cases, this LAST option is what actually happens!!
2818  //
2819  EXPORT int32_t sendUserMessage(const std::string& SERVER_ID,
2820  const std::string& USER_ID,
2821  const std::string& USER_ID_RECIPIENT,
2822  const std::string& RECIPIENT_PUBKEY,
2823  const std::string& THE_MESSAGE) const;
2857  // Returns int32_t:
2858  // -1 means error; no message was sent.
2859  // -2 means the message was sent, but the request number must be passed as a
2860  // string, so call GetLargeRequestNum.
2861  // 0 means NO error, but also: no message was sent.
2862  // >0 means NO error, and the message was sent, and the request number fits
2863  // into an integer...
2864  // ...and in fact the requestNum IS the return value!
2865  // ===> In 99% of cases, this LAST option is what actually happens!!
2866  //
2867  EXPORT int32_t sendUserInstrument(
2868  const std::string& SERVER_ID, const std::string& USER_ID,
2869  const std::string& USER_ID_RECIPIENT,
2870  const std::string& RECIPIENT_PUBKEY, const std::string& THE_INSTRUMENT,
2871  const std::string& INSTRUMENT_FOR_SENDER // Can be empty. Optional. Only
2872  // used in the case of cash
2873  // purses.
2874  ) const;
2875 
2897  // Returns int32_t:
2898  // -1 means error; no message was sent.
2899  // -2 means the message was sent, but the request number must be passed as a
2900  // string, so call GetLargeRequestNum.
2901  // 0 means NO error, but also: no message was sent.
2902  // >0 means NO error, and the message was sent, and the request number fits
2903  // into an integer...
2904  // ...and in fact the requestNum IS the return value!
2905  // ===> In 99% of cases, this LAST option is what actually happens!!
2906  //
2907  EXPORT int32_t getRequest(const std::string& SERVER_ID,
2908  const std::string& USER_ID) const;
2909 
2926  // Returns int32_t:
2927  // -1 means error; no message was sent.
2928  // -2 means the message was sent, but the request number must be passed as a
2929  // string, so call GetLargeRequestNum.
2930  // 0 means NO error, but also: no message was sent.
2931  // >0 means NO error, and the message was sent, and the request number fits
2932  // into an integer...
2933  // ...and in fact the requestNum IS the return value!
2934  // ===> In 99% of cases, this LAST option is what actually happens!!
2935  //
2936  EXPORT int32_t getTransactionNumber(const std::string& SERVER_ID,
2937  const std::string& USER_ID) const;
2938 
2956  EXPORT int32_t issueAssetType(const std::string& SERVER_ID,
2957  const std::string& USER_ID,
2958  const std::string& THE_CONTRACT) const;
2959 
2974  EXPORT int32_t getContract(const std::string& SERVER_ID,
2975  const std::string& USER_ID,
2976  const std::string& ASSET_ID) const;
2977 
2994  EXPORT int32_t getMint(const std::string& SERVER_ID,
2995  const std::string& USER_ID,
2996  const std::string& ASSET_ID) const;
2997 
3013  EXPORT int32_t createAssetAccount(const std::string& SERVER_ID,
3014  const std::string& USER_ID,
3015  const std::string& ASSET_ID) const;
3016 
3034  // NOTE: Deprecated. Replaced by getAccountFiles.
3035  EXPORT int32_t getAccount(const std::string& SERVER_ID,
3036  const std::string& USER_ID,
3037  const std::string& ACCT_ID) const;
3038 
3039  EXPORT int32_t getAccountFiles(const std::string& SERVER_ID,
3040  const std::string& USER_ID,
3041  const std::string& ACCT_ID) const;
3042 
3052  EXPORT std::string GenerateBasketCreation(
3053  const std::string& USER_ID,
3054  const int64_t& MINIMUM_TRANSFER // If basket is X=2,3,4, then this is X.
3055  ) const;
3056 
3067  EXPORT std::string AddBasketCreationItem(
3068  const std::string& USER_ID, // for signature.
3069  const std::string& THE_BASKET, // created in above call.
3070  const std::string& ASSET_TYPE_ID, // Adding an asset type to the new
3071  // basket.
3072  const int64_t& MINIMUM_TRANSFER // If basket is 5=X,X,X then this is an
3073  // X.
3074  ) const;
3075 
3105  EXPORT int32_t issueBasket(const std::string& SERVER_ID,
3106  const std::string& USER_ID,
3107  const std::string& THE_BASKET) const;
3108 
3118  EXPORT std::string GenerateBasketExchange(
3119  const std::string& SERVER_ID, const std::string& USER_ID,
3120  const std::string& BASKET_ASSET_TYPE_ID,
3121  const std::string& BASKET_ASSET_ACCT_ID,
3122  const int32_t& TRANSFER_MULTIPLE) const;
3123 
3126 
3137  EXPORT std::string AddBasketExchangeItem(
3138  const std::string& SERVER_ID, const std::string& USER_ID,
3139  const std::string& THE_BASKET, const std::string& ASSET_TYPE_ID,
3140  const std::string& ASSET_ACCT_ID) const;
3141 
3178  EXPORT int32_t exchangeBasket(
3179  const std::string& SERVER_ID, const std::string& USER_ID,
3180  const std::string& BASKET_ASSET_ID, const std::string& THE_BASKET,
3181  const bool& BOOL_EXCHANGE_IN_OR_OUT // exchanging in == OT_TRUE, out ==
3182  // OT_FALSE.
3183  ) const;
3184 
3217  EXPORT int32_t notarizeWithdrawal(const std::string& SERVER_ID,
3218  const std::string& USER_ID,
3219  const std::string& ACCT_ID,
3220  const int64_t& AMOUNT) const;
3221 
3240  EXPORT int32_t notarizeDeposit(const std::string& SERVER_ID,
3241  const std::string& USER_ID,
3242  const std::string& ACCT_ID,
3243  const std::string& THE_PURSE) const;
3244 
3268  EXPORT int32_t notarizeTransfer(const std::string& SERVER_ID,
3269  const std::string& USER_ID,
3270  const std::string& ACCT_FROM,
3271  const std::string& ACCT_TO,
3272  const int64_t& AMOUNT,
3273  const std::string& NOTE) const;
3274 
3342  // Returns int32_t:
3343  // -1 means error; no message was sent.
3344  // -2 means the message was sent, but the request number must be passed as a
3345  // string, so call GetLargeRequestNum.
3346  // 0 means NO error, but also: no message was sent.
3347  // >0 means NO error, and the message was sent, and the request number fits
3348  // into an integer...
3349  // ...and in fact the requestNum IS the return value!
3350  // ===> In 99% of cases, this LAST option is what actually happens!!
3351  //
3352  // NOTE: Deprecated. Replaced by getAccountFiles.
3353  EXPORT int32_t getInbox(const std::string& SERVER_ID,
3354  const std::string& USER_ID,
3355  const std::string& ACCT_ID) const;
3356 
3357  // Returns int32_t:
3358  // -1 means error; no message was sent.
3359  // -2 means the message was sent, but the request number must be passed as a
3360  // string, so call GetLargeRequestNum.
3361  // 0 means NO error, but also: no message was sent.
3362  // >0 means NO error, and the message was sent, and the request number fits
3363  // into an integer...
3364  // ...and in fact the requestNum IS the return value!
3365  // ===> In 99% of cases, this LAST option is what actually happens!!
3366  //
3367  // NOTE: Deprecated. Replaced by getAccountFiles.
3368  EXPORT int32_t getOutbox(const std::string& SERVER_ID,
3369  const std::string& USER_ID,
3370  const std::string& ACCT_ID) const;
3371 
3372  // from server (pop message buf for the response)
3373  // Returns int32_t:
3374  // -1 means error; no message was sent.
3375  // -2 means the message was sent, but the request number must be passed as a
3376  // string, so call GetLargeRequestNum.
3377  // 0 means NO error, but also: no message was sent.
3378  // >0 means NO error, and the message was sent, and the request number fits
3379  // into an integer...
3380  // ...and in fact the requestNum IS the return value!
3381  // ===> In 99% of cases, this LAST option is what actually happens!!
3382  //
3383  EXPORT int32_t getNymbox(const std::string& SERVER_ID,
3384  const std::string& USER_ID) const;
3385 
3386  // from local storage.
3387  EXPORT std::string LoadNymbox(const std::string& SERVER_ID,
3388  const std::string& USER_ID) const; // Returns
3389  // nullptr,
3390  // or a
3391  // Nymbox.
3392 
3393  EXPORT std::string LoadNymboxNoVerify(
3394  const std::string& SERVER_ID,
3395  const std::string& USER_ID) const; // Returns nullptr, or a Nymbox.
3396 
3413  EXPORT std::string Nymbox_GetReplyNotice(
3414  const std::string& SERVER_ID, const std::string& USER_ID,
3415  const int64_t& REQUEST_NUMBER) const; // returns replyNotice transaction
3416  // by
3417  // requestNumber.
3418 
3452  EXPORT bool HaveAlreadySeenReply(
3453  const std::string& SERVER_ID, const std::string& USER_ID,
3454  const int64_t& REQUEST_NUMBER) const; // returns OT_BOOL
3455 
3471  // Returns int32_t:
3472  // -1 means error; no message was sent.
3473  // -2 means the message was sent, but the request number must be passed as a
3474  // string, so call GetLargeRequestNum.
3475  // 0 means NO error, but also: no message was sent.
3476  // >0 means NO error, and the message was sent, and the request number fits
3477  // into an integer...
3478  // ...and in fact the requestNum IS the return value!
3479  // ===> In 99% of cases, this LAST option is what actually happens!!
3480  //
3481  EXPORT int32_t getBoxReceipt(
3482  const std::string& SERVER_ID, const std::string& USER_ID,
3483  const std::string& ACCOUNT_ID, // If for Nymbox (vs inbox/outbox) then
3484  // pass USER_ID in this field also.
3485  const int32_t& nBoxType, // 0/nymbox, 1/inbox, 2/outbox
3486  const int64_t& TRANSACTION_NUMBER) const;
3487 
3488  EXPORT bool DoesBoxReceiptExist(
3489  const std::string& SERVER_ID,
3490  const std::string& USER_ID, // Unused here for now, but still
3491  // convention.
3492  const std::string& ACCOUNT_ID, // If for Nymbox (vs inbox/outbox) then
3493  // pass USER_ID in this field also.
3494  const int32_t& nBoxType, // 0/nymbox, 1/inbox, 2/outbox
3495  const int64_t& TRANSACTION_NUMBER) const;
3496 
3515  // Returns int32_t:
3516  // -1 means error; no message was sent.
3517  // -2 means the message was sent, but the request number must be passed as a
3518  // string, so call GetLargeRequestNum.
3519  // 0 means NO error, but also: no message was sent.
3520  // >0 means NO error, and the message was sent, and the request number fits
3521  // into an integer...
3522  // ...and in fact the requestNum IS the return value!
3523  // ===> In 99% of cases, this LAST option is what actually happens!!
3524  //
3525  EXPORT int32_t processInbox(const std::string& SERVER_ID,
3526  const std::string& USER_ID,
3527  const std::string& ACCT_ID,
3528  const std::string& ACCT_LEDGER) const;
3529 
3544  EXPORT int32_t processNymbox(const std::string& SERVER_ID,
3545  const std::string& USER_ID) const;
3546 
3568  EXPORT int32_t withdrawVoucher(const std::string& SERVER_ID,
3569  const std::string& USER_ID,
3570  const std::string& ACCT_ID,
3571  const std::string& RECIPIENT_USER_ID,
3572  const std::string& CHEQUE_MEMO,
3573  const int64_t& AMOUNT) const;
3574 
3576  //
3577  EXPORT int32_t payDividend(
3578  const std::string& SERVER_ID,
3579  const std::string& ISSUER_USER_ID, // must be issuer of
3580  // SHARES_ASSET_TYPE_ID
3581  const std::string& DIVIDEND_FROM_ACCT_ID, // if dollars paid for pepsi
3582  // shares, then this is the
3583  // issuer's dollars account.
3584  const std::string& SHARES_ASSET_TYPE_ID, // if dollars paid for pepsi
3585  // shares, then this is the
3586  // pepsi shares asset type id.
3587  const std::string& DIVIDEND_MEMO, // user-configurable note that's added
3588  // to the payout request message.
3589  const int64_t& AMOUNT_PER_SHARE // number of dollars to be paid out PER
3590  // SHARE (multiplied by total number of
3591  // shares issued.)
3592  ) const;
3593 
3615  EXPORT int32_t depositCheque(const std::string& SERVER_ID,
3616  const std::string& USER_ID,
3617  const std::string& ACCT_ID,
3618  const std::string& THE_CHEQUE) const;
3619 
3636  EXPORT int32_t
3637  depositPaymentPlan(const std::string& SERVER_ID,
3638  const std::string& USER_ID,
3639  const std::string& THE_PAYMENT_PLAN) const;
3640 
3654  EXPORT int32_t issueMarketOffer(
3655  const std::string& ASSET_ACCT_ID, // Perhaps this is the wheat market.
3656  const std::string& CURRENCY_ACCT_ID, // Perhaps I'm buying the wheat
3657  // with rubles.
3658  const int64_t& MARKET_SCALE, // Defaults to minimum of 1. Market
3659  // granularity.
3660  const int64_t& MINIMUM_INCREMENT, // This will be multiplied by the
3661  // Scale. Min 1.
3662  const int64_t& TOTAL_ASSETS_ON_OFFER, // Total assets available for sale
3663  // or purchase. Will be multiplied
3664  // by minimum increment.
3665  const int64_t& PRICE_LIMIT, // Per Minimum Increment...
3666  const bool& bBuyingOrSelling, // SELLING == true, BUYING == false.
3667  const time64_t& LIFESPAN_IN_SECONDS, // Pass 0 for the default behavior:
3668  // 86400 seconds aka 1 day.
3669  const std::string& STOP_SIGN, // Must be "" (for market/limit orders) or
3670  // "<" or ">" (for stop orders.)
3671  const int64_t& ACTIVATION_PRICE) const; // Must be provided if STOP_SIGN
3672  // is
3673  // also set. Determines the price
3674  // threshold for stop orders.
3675 
3706  //
3708  // Returns int32_t:
3709  // -1 means error; no message was sent.
3710  // -2 means the message was sent, but the request number must be passed as a
3711  // string, so call GetLargeRequestNum.
3712  // 0 means NO error, but also: no message was sent.
3713  // >0 means NO error, and the message was sent, and the request number fits
3714  // into an integer...
3715  // ...and in fact the requestNum IS the return value!
3716  // ===> In 99% of cases, this LAST option is what actually happens!!
3717  //
3718  EXPORT int32_t getMarketList(const std::string& SERVER_ID,
3719  const std::string& USER_ID) const;
3720 
3722  // maximum depth)
3723  // Returns int32_t:
3724  // -1 means error; no message was sent.
3725  // -2 means the message was sent, but the request number must be passed as a
3726  // string, so call GetLargeRequestNum.
3727  // 0 means NO error, but also: no message was sent.
3728  // >0 means NO error, and the message was sent, and the request number fits
3729  // into an integer...
3730  // ...and in fact the requestNum IS the return value!
3731  // ===> In 99% of cases, this LAST option is what actually happens!!
3732  //
3733  EXPORT int32_t getMarketOffers(const std::string& SERVER_ID,
3734  const std::string& USER_ID,
3735  const std::string& MARKET_ID,
3736  const int64_t& MAX_DEPTH // Market Depth
3737  ) const;
3738 
3740  // Returns int32_t:
3741  // -1 means error; no message was sent.
3742  // -2 means the message was sent, but the request number must be passed as a
3743  // string, so call GetLargeRequestNum.
3744  // 0 means NO error, but also: no message was sent.
3745  // >0 means NO error, and the message was sent, and the request number fits
3746  // into an integer...
3747  // ...and in fact the requestNum IS the return value!
3748  // ===> In 99% of cases, this LAST option is what actually happens!!
3749  //
3750  EXPORT int32_t getMarketRecentTrades(const std::string& SERVER_ID,
3751  const std::string& USER_ID,
3752  const std::string& MARKET_ID) const;
3753 
3755  // Market_GetOffers() call, which seems similar otherwise.
3756  // Returns int32_t:
3757  // -1 means error; no message was sent.
3758  // -2 means the message was sent, but the request number must be passed as a
3759  // string, so call GetLargeRequestNum.
3760  // 0 means NO error, but also: no message was sent.
3761  // >0 means NO error, and the message was sent, and the request number fits
3762  // into an integer...
3763  // ...and in fact the requestNum IS the return value!
3764  // ===> In 99% of cases, this LAST option is what actually happens!!
3765  //
3766  EXPORT int32_t
3767  getNym_MarketOffers(const std::string& SERVER_ID,
3768  const std::string& USER_ID) const; // Offers this
3769  // Nym
3770  // has out on market.
3771  // These may just be the Cron Receipts...
3772 
3773  // Returns int32_t:
3774  // -1 means error; no message was sent.
3775  // -2 means the message was sent, but the request number must be passed as a
3776  // string, so call GetLargeRequestNum.
3777  // 0 means NO error, but also: no message was sent.
3778  // >0 means NO error, and the message was sent, and the request number fits
3779  // into an integer...
3780  // ...and in fact the requestNum IS the return value!
3781  // ===> In 99% of cases, this LAST option is what actually happens!!
3782  //
3783  EXPORT int32_t killMarketOffer(const std::string& SERVER_ID,
3784  const std::string& USER_ID,
3785  const std::string& ASSET_ACCT_ID,
3786  const int64_t& TRANSACTION_NUMBER) const;
3787 
3788  // Returns int32_t:
3789  // -1 means error; no message was sent.
3790  // -2 means the message was sent, but the request number must be passed as a
3791  // string, so call GetLargeRequestNum.
3792  // 0 means NO error, but also: no message was sent.
3793  // >0 means NO error, and the message was sent, and the request number fits
3794  // into an integer...
3795  // ...and in fact the requestNum IS the return value!
3796  // ===> In 99% of cases, this LAST option is what actually happens!!
3797  //
3798  EXPORT int32_t killPaymentPlan(const std::string& SERVER_ID,
3799  const std::string& USER_ID,
3800  const std::string& FROM_ACCT_ID,
3801  const int64_t& TRANSACTION_NUMBER) const;
3802 
3830  EXPORT std::string PopMessageBuffer(const int64_t& REQUEST_NUMBER,
3831  const std::string& SERVER_ID,
3832  const std::string& USER_ID) const;
3833 
3834  EXPORT void FlushMessageBuffer() const;
3835 
3836  // Outgoing:
3837 
3838  EXPORT std::string GetSentMessage(const int64_t& REQUEST_NUMBER,
3839  const std::string& SERVER_ID,
3840  const std::string& USER_ID) const;
3841 
3842  EXPORT bool RemoveSentMessage(const int64_t& REQUEST_NUMBER,
3843  const std::string& SERVER_ID,
3844  const std::string& USER_ID) const;
3845 
3846  // Note: Might remove this from API. Basically, the sent messages queue must
3847  // store
3848  // messages (by request number) until we know for SURE whether we have a
3849  // success, a failure,
3850  // or a lost/rejected message. That is, until we DOWNLOAD the Nymbox, and
3851  // thus know for SURE
3852  // that a response to a given message is there...or not. Why do we care? For
3853  // making this
3854  // choice:
3855  //
3856  // Messages that DO have a reply are therefore already "in the system" and
3857  // will be handled
3858  // normally--they can be ignored and flushed from the "sent messages" queue.
3859  // Whereas messages
3860  // that do NOT have a reply in the Nymbox (yet are still in the "sent
3861  // messages" queue) can be
3862  // assumed safely to have been rejected at "message level" (before any
3863  // transaction could
3864  // have processed) and the reply must have been dropped on the network, OR
3865  // the server never
3866  // even received the message in the first place. EITHER WAY the trans #s can
3867  // be harvested
3868  // accordingly and then removed from the sent buffer. In a perfect world
3869  // (read: iteration 2)
3870  // these sent messages will be serialized somehow along with the Nym, and
3871  // not just stored in
3872  // RAM like this version does.
3873 
3903  EXPORT void FlushSentMessages(
3904  const bool& bHarvestingForRetry, // bHarvestingForRetry is actually
3905  // OT_BOOL
3906  const std::string& SERVER_ID, const std::string& USER_ID,
3907  const std::string& THE_NYMBOX) const;
3908 
3915  EXPORT void Sleep(const int64_t& MILLISECONDS) const;
3916 
3917  /* For emergency/testing use only. This call forces you to trust the server.
3918  You should never need to call this for any normal use, and hopefully
3919  you should never need to actually call it at all, ever. But if your Nym
3920  ever gets out of sync with the server, this will resync it based on
3921  the server's version of the data.
3922 
3923  Note: actually returns OT_BOOL.
3924  */
3925  // Make sure you download your Nymbox (getNymbox) before calling this,
3926  // so when it loads the Nymbox it will have the latest version of it.
3927  //
3928  // Also, call createUserAccount() and pass the server reply message in
3929  // here, so that it can read theMessageNym (to sync the transaction
3930  // numbers.)
3931  //
3932  EXPORT bool ResyncNymWithServer(const std::string& SERVER_ID,
3933  const std::string& USER_ID,
3934  const std::string& THE_MESSAGE) const;
3935 
3944  EXPORT std::string Message_GetCommand(const std::string& THE_MESSAGE) const;
3945 
3952  EXPORT int32_t Message_GetSuccess(const std::string& THE_MESSAGE) const;
3953 
3970  EXPORT int32_t queryAssetTypes(const std::string& SERVER_ID,
3971  const std::string& USER_ID,
3972  const std::string& ENCODED_MAP) const;
3973 
3982  EXPORT std::string Message_GetPayload(const std::string& THE_MESSAGE) const;
3983 
4012  EXPORT int32_t Message_GetDepth(const std::string& THE_MESSAGE) const;
4013 
4020  EXPORT int32_t
4021  Message_GetTransactionSuccess(const std::string& SERVER_ID,
4022  const std::string& USER_ID,
4023  const std::string& ACCOUNT_ID,
4024  const std::string& THE_MESSAGE) const;
4025 
4026  EXPORT int32_t
4027  Message_IsTransactionCanceled(const std::string& SERVER_ID,
4028  const std::string& USER_ID,
4029  const std::string& ACCOUNT_ID,
4030  const std::string& THE_MESSAGE) const;
4031 
4038  EXPORT int32_t Message_GetBalanceAgreementSuccess(
4039  const std::string& SERVER_ID, const std::string& USER_ID,
4040  const std::string& ACCOUNT_ID, const std::string& THE_MESSAGE) const;
4041 
4049  EXPORT std::string Message_GetLedger(const std::string& THE_MESSAGE) const;
4050 
4058  EXPORT std::string Message_GetNewAssetTypeID(
4059  const std::string& THE_MESSAGE) const;
4060 
4068  EXPORT std::string Message_GetNewIssuerAcctID(
4069  const std::string& THE_MESSAGE) const;
4070 
4080  EXPORT std::string Message_GetNewAcctID(
4081  const std::string& THE_MESSAGE) const;
4082 
4091  EXPORT std::string Message_GetNymboxHash(
4092  const std::string& THE_MESSAGE) const;
4093 
4094 protected:
4095  static bool bInitOTApp;
4096  static bool bCleanupOTApp;
4097 
4099 };
4100 
4101 } // namespace opentxs
4102 
4103 #endif // OPENTXS_CLIENT_OTAPI_EXEC_HPP
EXPORT bool Nym_RemoveMailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Message_GetNewAcctID(const std::string &THE_MESSAGE) const
EXPORT int32_t GetServerCount() const
EXPORT bool ResyncNymWithServer(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_MESSAGE) const
EXPORT std::string AddSignature(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
EXPORT std::string SymmetricEncrypt(const std::string &SYMMETRIC_KEY, const std::string &PLAINTEXT) const
EXPORT std::string NumList_Add(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:429
EXPORT std::string Transaction_GetSenderUserID(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT int32_t AddAssetContract(const std::string &strContract) const
EXPORT std::string Party_GetAcctNameByIndex(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex) const
EXPORT int32_t notarizeDeposit(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_PURSE) const
EXPORT int32_t issueAssetType(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_CONTRACT) const
EXPORT int32_t triggerClause(const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &TRANSACTION_NUMBER, const std::string &CLAUSE_NAME, const std::string &STR_PARAM) const
EXPORT int32_t getBoxReceipt(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const int32_t &nBoxType, const int64_t &TRANSACTION_NUMBER) const
EXPORT std::string SmartContract_ConfirmAccount(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &PARTY_NAME, const std::string &ACCT_NAME, const std::string &AGENT_NAME, const std::string &ACCT_ID) const
EXPORT std::string Bylaw_GetLanguage(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
EXPORT time64_t Instrmnt_GetValidFrom(const std::string &THE_INSTRUMENT) const
EXPORT int32_t GetNymCount() const
EXPORT std::string Pending_GetNote(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT int32_t Transaction_IsCanceled(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string Create_SmartContract(const std::string &SIGNER_NYM_ID, const time64_t &VALID_FROM, const time64_t &VALID_TO) const
EXPORT int32_t Party_GetAgentCount(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
EXPORT std::string LoadRecordBox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
NOTE: Sometimes the user ID is also passed in the &quot;account ID&quot; field,.
EXPORT std::string SmartContract_AddBylaw(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME) const
EXPORT std::string GetAccountWallet_OutboxHash(const std::string &ACCOUNT_ID) const
EXPORT std::string SmartContract_AddParty(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &PARTY_NAME, const std::string &AGENT_NAME) const
EXPORT std::string Purse_Pop(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &OWNER_OR_SIGNER_ID, const std::string &THE_PURSE) const
EXPORT int32_t GetNym_SubcredentialCount(const std::string &NYM_ID, const std::string &MASTER_CRED_ID) const
Definition: OTAPI_Exec.cpp:820
EXPORT std::string GetActiveCronItem(const std::string &SERVER_ID, int64_t lTransNum) const
Definition: OTAPI_Exec.cpp:631
EXPORT std::string CreateAssetContract(const std::string &NYM_ID, const std::string &strXMLcontents) const
EXPORT bool DiscardCheque(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_CHEQUE) const
EXPORT std::string CalculateServerContractID(const std::string &str_Contract) const
EXPORT std::string GetAssetType_Name(const std::string &ASSET_TYPE_ID) const
EXPORT bool Smart_AreAllPartiesConfirmed(const std::string &THE_CONTRACT) const
EXPORT std::string CreateServerContract(const std::string &NYM_ID, const std::string &strXMLcontents) const
EXPORT bool SetServer_Name(const std::string &SERVER_ID, const std::string &STR_NEW_NAME) const
EXPORT int32_t killMarketOffer(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ACCT_ID, const int64_t &TRANSACTION_NUMBER) const
EXPORT int32_t sendUserMessage(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_RECIPIENT, const std::string &RECIPIENT_PUBKEY, const std::string &THE_MESSAGE) const
EXPORT std::string CreateSymmetricKey() const
EXPORT void SetHomeFolder(const std::string &strFolder) const
Definition: OTAPI_Exec.cpp:276
EXPORT bool RecordPayment(const std::string &SERVER_ID, const std::string &USER_ID, const bool &bIsInbox, const int32_t &nIndex, const bool &bSaveCopy) const
EXPORT std::string PeekMemlogFront() const
Definition: OTAPI_Exec.cpp:383
EXPORT int32_t Transaction_GetBalanceAgreementSuccess(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT bool ClearExpired(const std::string &SERVER_ID, const std::string &USER_ID, const int32_t &nIndex, const bool &bClearAll) const
EXPORT std::string Party_GetAgentID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &AGENT_NAME) const
EXPORT std::string Instrmnt_GetAssetID(const std::string &THE_INSTRUMENT) const
EXPORT std::string GetMemlogAtIndex(const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:378
EXPORT std::string GetServer_ID(const int32_t &nIndex) const
EXPORT std::string GetNym_MailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Purse_Push(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &SIGNER_ID, const std::string &OWNER_ID, const std::string &THE_PURSE, const std::string &THE_TOKEN) const
EXPORT int32_t issueBasket(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_BASKET) const
EXPORT OT_API * OTAPI() const
Definition: OTAPI_Exec.cpp:281
EXPORT int32_t issueMarketOffer(const std::string &ASSET_ACCT_ID, const std::string &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, const bool &bBuyingOrSelling, const time64_t &LIFESPAN_IN_SECONDS, const std::string &STOP_SIGN, const int64_t &ACTIVATION_PRICE) const
EXPORT std::string GetNym_OutmailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string LoadPubkey_Encryption(const std::string &USER_ID) const
EXPORT std::string Transaction_GetType(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
Get Transaction Type (internally uses GetTransactionTypeString().)
EXPORT int32_t AddServerContract(const std::string &strContract) const
EXPORT std::string Ledger_FinalizeResponse(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER) const
EXPORT int32_t GetNym_RevokedCredCount(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:755
EXPORT std::string GetAssetType_TLA(const std::string &THE_ID) const
EXPORT bool ClearRecord(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const int32_t &nIndex, const bool &bClearAll) const
EXPORT std::string Wallet_GetServerIDFromPartial(const std::string &PARTIAL_ID) const
EXPORT std::string Transaction_CreateResponse(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &RESPONSE_LEDGER, const std::string &ORIGINAL_TRANSACTION, const bool &BOOL_DO_I_ACCEPT) const
EXPORT std::string GetServer_Contract(const std::string &SERVER_ID) const
EXPORT std::string Party_GetAcctAssetID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
EXPORT time64_t Token_GetValidTo(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
EXPORT int32_t getNym_MarketOffers(const std::string &SERVER_ID, const std::string &USER_ID) const
This &quot;Market Offer&quot; data is a lot more detailed than the.
EXPORT std::string Variable_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
EXPORT int32_t getAccountFiles(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
EXPORT int64_t Basket_GetMinimumTransferAmount(const std::string &BASKET_ASSET_TYPE_ID) const
EXPORT std::string GetAccountWallet_InboxHash(const std::string &ACCOUNT_ID) const
EXPORT void FlushMessageBuffer() const
EXPORT std::string GetNym_RevokedCredID(const std::string &NYM_ID, const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:773
EXPORT std::string Clause_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
EXPORT std::string Hook_GetClauseAtIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &HOOK_NAME, const int32_t &nIndex) const
EXPORT int32_t Message_GetDepth(const std::string &THE_MESSAGE) const
EXPORT std::string VerifyAndRetrieveXMLContents(const std::string &THE_CONTRACT, const std::string &SIGNER_ID) const
EXPORT std::string SignContract(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
EXPORT std::string GetNym_Name(const std::string &NYM_ID) const
Returns Nym Name (based on NymID)
EXPORT std::string LoadPurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID) const
EXPORT int32_t notarizeWithdrawal(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const int64_t &AMOUNT) const
EXPORT std::string Message_GetPayload(const std::string &THE_MESSAGE) const
EXPORT int64_t Token_GetDenomination(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
The actual cash value of the token. Returns a int64_t.
EXPORT std::string EasyProposePlan(const std::string &SERVER_ID, const std::string &DATE_RANGE, const std::string &SENDER_ACCT_ID, const std::string &SENDER_USER_ID, const std::string &PLAN_CONSIDERATION, const std::string &RECIPIENT_ACCT_ID, const std::string &RECIPIENT_USER_ID, const std::string &INITIAL_PAYMENT, const std::string &PAYMENT_PLAN, const std::string &PLAN_EXPIRY) const
EXPORT int32_t getMint(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
EXPORT std::string LoadOutbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT int32_t GetNym_OutmailCount(const std::string &NYM_ID) const
EXPORT int32_t Token_GetSeries(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
EXPORT int32_t SmartContract_CountNumsNeeded(const std::string &THE_CONTRACT, const std::string &AGENT_NAME) const
EXPORT int32_t usageCredits(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_CHECK, const int64_t &ADJUSTMENT) const
EXPORT uint64_t StringToUlong(const std::string &strNumber) const
Definition: OTAPI_Exec.cpp:302
EXPORT bool PopMemlogFront() const
Definition: OTAPI_Exec.cpp:393
EXPORT std::string GetAssetType_ID(const int32_t &nIndex) const
EXPORT std::string Message_GetLedger(const std::string &THE_MESSAGE) const
EXPORT bool SetWallet(const std::string &strWalletFilename) const
Definition: OTAPI_Exec.cpp:330
EXPORT bool SetAccountWallet_Name(const std::string &ACCT_ID, const std::string &SIGNER_NYM_ID, const std::string &ACCT_NEW_NAME) const
EXPORT std::string NumList_Remove(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:466
EXPORT int64_t Basket_GetMemberMinimumTransferAmount(const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex) const
EXPORT int32_t getAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
EXPORT bool AppInit()
Definition: OTAPI_Exec.cpp:203
EXPORT bool LoadWallet() const
Definition: OTAPI_Exec.cpp:363
EXPORT std::string Basket_GetMemberType(const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex) const
EXPORT std::string LoadExpiredBox(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t getInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
EXPORT int32_t killPaymentPlan(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &FROM_ACCT_ID, const int64_t &TRANSACTION_NUMBER) const
EXPORT std::string Ledger_AddTransaction(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER, const std::string &THE_TRANSACTION) const
Add a transaction to a ledger.
EXPORT time64_t Transaction_GetDateSigned(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT int32_t processNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT bool Nym_VerifyOutpaymentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Instrmnt_GetSenderUserID(const std::string &THE_INSTRUMENT) const
EXPORT std::string Message_GetNewIssuerAcctID(const std::string &THE_MESSAGE) const
EXPORT std::string Message_GetNewAssetTypeID(const std::string &THE_MESSAGE) const
EXPORT int32_t getContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
EXPORT int32_t getMarketList(const std::string &SERVER_ID, const std::string &USER_ID) const
Retrieves details for each market.
EXPORT std::string ConfirmPaymentPlan(const std::string &SERVER_ID, const std::string &SENDER_USER_ID, const std::string &SENDER_ACCT_ID, const std::string &RECIPIENT_USER_ID, const std::string &PAYMENT_PLAN) const
EXPORT std::string Wallet_ExportCert(const std::string &NYM_ID) const
Returns the exported cert, if successful. Else nullptr.
EXPORT std::string LoadNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string LoadMint(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID) const
EXPORT int32_t withdrawVoucher(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &RECIPIENT_USER_ID, const std::string &CHEQUE_MEMO, const int64_t &AMOUNT) const
EXPORT std::string Transaction_GetRecipientUserID(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string Instrmnt_GetRecipientAcctID(const std::string &THE_INSTRUMENT) const
EXPORT void Sleep(const int64_t &MILLISECONDS) const
EXPORT int64_t Message_GetUsageCredits(const std::string &THE_MESSAGE) const
EXPORT std::string ProposePaymentPlan(const std::string &SERVER_ID, const time64_t &VALID_FROM, const time64_t &VALID_TO, const std::string &SENDER_ACCT_ID, const std::string &SENDER_USER_ID, const std::string &PLAN_CONSIDERATION, const std::string &RECIPIENT_ACCT_ID, const std::string &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, const time64_t &PAYMENT_PLAN_LENGTH, const int32_t &PAYMENT_PLAN_MAX_PAYMENTS) const
EXPORT std::string LoadAssetContract(const std::string &ASSET_TYPE_ID) const
EXPORT std::string LoadOutboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT bool Wallet_CanRemoveAccount(const std::string &ACCOUNT_ID) const
EXPORT bool VerifyAccountReceipt(const std::string &SERVER_ID, const std::string &NYM_ID, const std::string &ACCT_ID) const
EXPORT int32_t sendUserInstrument(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_RECIPIENT, const std::string &RECIPIENT_PUBKEY, const std::string &THE_INSTRUMENT, const std::string &INSTRUMENT_FOR_SENDER) const
EXPORT std::string GetNym_MailSenderIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string GetNym_OutmailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Transaction_GetSenderAcctID(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT int64_t Transaction_GetDisplayReferenceToNum(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string Instrmnt_GetRemitterUserID(const std::string &THE_INSTRUMENT) const
EXPORT bool Wallet_CanRemoveServer(const std::string &SERVER_ID) const
EXPORT int64_t StringToLong(const std::string &strNumber) const
Definition: OTAPI_Exec.cpp:286
int64_t time64_t
Definition: Common.hpp:209
EXPORT std::string AddSubcredential(const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const int32_t &nKeySize) const
Definition: OTAPI_Exec.cpp:917
EXPORT bool WalletExists() const
Definition: OTAPI_Exec.cpp:358
EXPORT bool VerifySignature(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
EXPORT std::string GetNym_SourceForID(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:656
EXPORT std::string Callback_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
EXPORT std::string Ledger_GetInstrument(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER, const int32_t &nIndex) const
EXPORT bool HaveAlreadySeenReply(const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER) const
EXPORT std::string Instrmnt_GetRemitterAcctID(const std::string &THE_INSTRUMENT) const
EXPORT std::string LoadServerContract(const std::string &SERVER_ID) const
EXPORT std::string LoadPubkey_Signing(const std::string &USER_ID) const
EXPORT std::string LoadRecordBoxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT std::string SmartContract_AddCallback(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME, const std::string &CALLBACK_NAME, const std::string &CLAUSE_NAME) const
EXPORT std::string SmartContract_AddAccount(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &PARTY_NAME, const std::string &ACCT_NAME, const std::string &ASSET_TYPE_ID) const
EXPORT std::string GenerateBasketExchange(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &BASKET_ASSET_TYPE_ID, const std::string &BASKET_ASSET_ACCT_ID, const int32_t &TRANSFER_MULTIPLE) const
EXPORT std::string Ledger_GetTransactionByID(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER, const int64_t &TRANSACTION_NUMBER) const
EXPORT std::string Instrmnt_GetServerID(const std::string &THE_INSTRUMENT) const
EXPORT std::string Party_GetAcctAgentName(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
EXPORT int32_t Purse_Count(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_PURSE) const
returns a count of the number of cash tokens inside this purse.
EXPORT bool SetNym_Name(const std::string &NYM_ID, const std::string &SIGNER_NYM_ID, const std::string &NYM_NEW_NAME) const
EXPORT bool Msg_HarvestTransactionNumbers(const std::string &THE_MESSAGE, const std::string &USER_ID, const bool &bHarvestingForRetry, const bool &bReplyWasSuccess, const bool &bReplyWasFailure, const bool &bTransactionWasSuccess, const bool &bTransactionWasFailure) const
EXPORT std::string Purse_Empty(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &SIGNER_ID, const std::string &THE_PURSE) const
EXPORT std::string Party_GetAcctID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
EXPORT bool SwitchWallet() const
Definition: OTAPI_Exec.cpp:368
EXPORT std::string LoadExpiredBoxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t GetAccountCount() const
EXPORT std::string GetNym_ActiveCronItemIDs(const std::string &NYM_ID, const std::string &SERVER_ID) const
Definition: OTAPI_Exec.cpp:607
EXPORT int32_t depositPaymentPlan(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_PAYMENT_PLAN) const
EXPORT std::string Clause_GetContents(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CLAUSE_NAME) const
EXPORT std::string LoadInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT std::string LongToString(const int64_t &lNumber) const
Definition: OTAPI_Exec.cpp:291
EXPORT std::string GetNym_RecentHash(const std::string &SERVER_ID, const std::string &NYM_ID) const
EXPORT std::string Variable_GetType(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
EXPORT bool Nym_VerifyOutmailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT int64_t Instrmnt_GetTransNum(const std::string &THE_INSTRUMENT) const
EXPORT std::string Token_GetServerID(const std::string &THE_TOKEN) const
EXPORT std::string Instrmnt_GetRecipientUserID(const std::string &THE_INSTRUMENT) const
EXPORT int32_t Ledger_GetCount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER) const
Find out how many pending transactions (and receipts) are in this inbox.
EXPORT int32_t Party_GetAcctCount(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
EXPORT bool AppCleanup()
Definition: OTAPI_Exec.cpp:228
EXPORT std::string GetNym_SubCredentialID(const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:852
EXPORT std::string Wallet_GetAssetIDFromPartial(const std::string &PARTIAL_ID) const
EXPORT std::string SmartContract_AddHook(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME, const std::string &HOOK_NAME, const std::string &CLAUSE_NAME) const
EXPORT bool Mint_IsStillGood(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID) const
EXPORT std::string GetNym_ID(const int32_t &nIndex) const
based on Index this returns the Nym&#39;s ID
EXPORT int32_t getTransactionNumber(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT bool Wallet_CanRemoveNym(const std::string &NYM_ID) const
EXPORT int64_t ReplyNotice_GetRequestNum(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_TRANSACTION) const
Transactions do not have request numbers. However, if you have a.
EXPORT std::string FlatSign(const std::string &SIGNER_NYM_ID, const std::string &THE_INPUT, const std::string &CONTRACT_TYPE) const
EXPORT std::string GetNym_OutpaymentsServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT bool Wallet_CanRemoveAssetType(const std::string &ASSET_ID) const
EXPORT std::string Wallet_GetNymIDFromPartial(const std::string &PARTIAL_ID) const
Attempts to find a full ID in the wallet, based on a partial of the same.
EXPORT std::string GetServer_Name(const std::string &SERVER_ID) const
EXPORT std::string LoadNymboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string Decrypt(const std::string &RECIPIENT_NYM_ID, const std::string &strCiphertext) const
EXPORT std::string Decode(const std::string &strEncoded, const bool &bLineBreaks) const
EXPORT std::string GetNym_OutboxHash(const std::string &ACCOUNT_ID, const std::string &NYM_ID) const
EXPORT int32_t GetNym_OutpaymentsCount(const std::string &NYM_ID) const
EXPORT std::string SmartContract_ConfirmParty(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &NYM_ID) const
EXPORT int32_t checkServerID(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t depositCheque(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_CHEQUE) const
EXPORT std::string SmartContract_AddClause(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME, const std::string &CLAUSE_NAME, const std::string &SOURCE_CODE) const
EXPORT bool RemoveSentMessage(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t checkUser(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_CHECK) const
EXPORT std::string LoadUserPubkey_Encryption(const std::string &USER_ID) const
EXPORT std::string GetAccountWallet_ServerID(const std::string &ACCOUNT_ID) const
EXPORT std::string LoadPaymentInbox(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT bool RevokeSubcredential(const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const std::string &SUB_CRED_ID) const
Definition: OTAPI_Exec.cpp:967
EXPORT int32_t getMarketOffers(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &MARKET_ID, const int64_t &MAX_DEPTH) const
Gets all offers for a specific market and their details (up until.
EXPORT bool Purse_HasPassword(const std::string &SERVER_ID, const std::string &THE_PURSE) const
EXPORT std::string Wallet_ExportNym(const std::string &NYM_ID) const
Returns the exported Nym, if success. (Else nullptr.)
EXPORT bool Wallet_RemoveServer(const std::string &SERVER_ID) const
EXPORT std::string GetNym_AltSourceLocation(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:673
EXPORT bool Nym_RemoveOutpaymentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT int32_t NumList_Count(const std::string &strNumList) const
Definition: OTAPI_Exec.cpp:554
EXPORT std::string CalculateAssetContractID(const std::string &str_Contract) const
EXPORT std::string CreateNym(const int32_t &nKeySize, const std::string &NYM_ID_SOURCE, const std::string &ALT_LOCATION) const
Definition: OTAPI_Exec.cpp:583
EXPORT bool Wallet_ChangePassphrase() const
EXPORT std::string AddBasketCreationItem(const std::string &USER_ID, const std::string &THE_BASKET, const std::string &ASSET_TYPE_ID, const int64_t &MINIMUM_TRANSFER) const
EXPORT std::string CreatePurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &OWNER_ID, const std::string &SIGNER_ID) const
EXPORT bool Smart_IsPartyConfirmed(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
EXPORT int32_t GetNym_CredentialCount(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:691
EXPORT std::string CreatePurse_Passphrase(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &SIGNER_ID) const
EXPORT int32_t Bylaw_GetCallbackCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
EXPORT bool SetAssetType_Name(const std::string &ASSET_ID, const std::string &STR_NEW_NAME) const
EXPORT time64_t Instrmnt_GetValidTo(const std::string &THE_INSTRUMENT) const
EXPORT std::string Hook_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
EXPORT std::string LoadPaymentInboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t activateSmartContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_SMART_CONTRACT) const
EXPORT bool DoesBoxReceiptExist(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const int32_t &nBoxType, const int64_t &TRANSACTION_NUMBER) const
EXPORT std::string Instrmnt_GetSenderAcctID(const std::string &THE_INSTRUMENT) const
EXPORT int32_t GetNym_TransactionNumCount(const std::string &SERVER_ID, const std::string &NYM_ID) const
EXPORT std::string GetNym_CredentialContents(const std::string &NYM_ID, const std::string &CREDENTIAL_ID) const
Definition: OTAPI_Exec.cpp:732
EXPORT std::string GetNym_NymboxHash(const std::string &SERVER_ID, const std::string &NYM_ID) const
EXPORT std::string Smart_GetBylawByIndex(const std::string &THE_CONTRACT, const int32_t &nIndex) const
returns the name of the bylaw.
EXPORT int64_t Instrmnt_GetAmount(const std::string &THE_INSTRUMENT) const
EXPORT int32_t Message_GetTransactionSuccess(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_MESSAGE) const
EXPORT std::string Token_GetAssetID(const std::string &THE_TOKEN) const
EXPORT std::string AddBasketExchangeItem(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_BASKET, const std::string &ASSET_TYPE_ID, const std::string &ASSET_ACCT_ID) const
EXPORT bool Nym_RemoveOutmailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Purse_Peek(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &OWNER_ID, const std::string &THE_PURSE) const
EXPORT std::string Wallet_ImportNym(const std::string &FILE_CONTENTS) const
returns NymID if success, else nullptr.
EXPORT std::string Token_ChangeOwner(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN, const std::string &SIGNER_NYM_ID, const std::string &OLD_OWNER, const std::string &NEW_OWNER) const
EXPORT std::string LoadUserPubkey_Signing(const std::string &USER_ID) const
EXPORT int32_t getRequest(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string LoadInboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
These versions don&#39;t verify the ledger, they just load it up.
EXPORT int32_t Message_IsTransactionCanceled(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_MESSAGE) const
EXPORT std::string GetAccountWallet_Name(const std::string &ACCOUNT_ID) const
EXPORT bool SavePurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID, const std::string &THE_PURSE) const
EXPORT bool Wallet_ImportPurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID, const std::string &THE_PURSE) const
Should handle duplicates. Should load, merge, and save.
EXPORT std::string GetNym_MailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT int32_t exchangeBasket(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &BASKET_ASSET_ID, const std::string &THE_BASKET, const bool &BOOL_EXCHANGE_IN_OR_OUT) const
EXPORT int32_t Message_GetBalanceAgreementSuccess(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_MESSAGE) const
EXPORT int32_t notarizeTransfer(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_FROM, const std::string &ACCT_TO, const int64_t &AMOUNT, const std::string &NOTE) const
EXPORT bool IsNym_RegisteredAtServer(const std::string &NYM_ID, const std::string &SERVER_ID) const
EXPORT std::string Nymbox_GetReplyNotice(const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER) const
EXPORT std::string Ledger_CreateResponse(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &ORIGINAL_LEDGER) const
Creates a new &#39;response&#39; ledger, set up with the right Server ID, etc,.
EXPORT void SetAppBinaryFolder(const std::string &strFolder) const
Definition: OTAPI_Exec.cpp:257
EXPORT bool Wallet_RemoveNym(const std::string &NYM_ID) const
EXPORT std::string Variable_GetAccess(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
EXPORT std::string Party_GetAgentNameByIndex(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex) const
EXPORT std::string PopMessageBuffer(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t Bylaw_GetHookCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
EXPORT std::string GetNym_CredentialID(const std::string &NYM_ID, const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:709
EXPORT int32_t createUserAccount(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT int32_t Bylaw_GetVariableCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
EXPORT int32_t getOutbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
static bool bInitOTApp
EXPORT int64_t Purse_GetTotalValue(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_PURSE) const
Get Purse Total Value (internally uses GetTotalValue().)
EXPORT time64_t GetTime() const
EXPORT std::string GetAccountWallet_NymID(const std::string &ACCOUNT_ID) const
EXPORT std::string FormatAmount(const std::string &ASSET_TYPE_ID, const int64_t &THE_AMOUNT) const
EXPORT int32_t Message_GetSuccess(const std::string &THE_MESSAGE) const
EXPORT std::string LoadAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT std::string Message_GetNymboxHash(const std::string &THE_MESSAGE) const
EXPORT std::string GetNym_OutmailRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT int32_t getNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string Token_GetID(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
EXPORT void FlushSentMessages(const bool &bHarvestingForRetry, const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_NYMBOX) const
EXPORT int32_t payDividend(const std::string &SERVER_ID, const std::string &ISSUER_USER_ID, const std::string &DIVIDEND_FROM_ACCT_ID, const std::string &SHARES_ASSET_TYPE_ID, const std::string &DIVIDEND_MEMO, const int64_t &AMOUNT_PER_SHARE) const
PAY DIVIDEND – to shareholders.
EXPORT std::string Transaction_GetRecipientAcctID(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT int32_t Transaction_GetSuccess(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string SymmetricDecrypt(const std::string &SYMMETRIC_KEY, const std::string &CIPHERTEXT_ENVELOPE) const
EXPORT int32_t getMarketRecentTrades(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &MARKET_ID) const
Gets all recent trades (up until maximum depth)
EXPORT int32_t GetMemlogSize() const
Definition: OTAPI_Exec.cpp:373
EXPORT int32_t createAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
EXPORT bool NumList_VerifyAll(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:530
EXPORT int32_t GetAssetTypeCount() const
EXPORT int64_t GetAccountWallet_Balance(const std::string &ACCOUNT_ID) const
EXPORT bool NumList_VerifyQuery(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:501
EXPORT std::string WriteCheque(const std::string &SERVER_ID, const int64_t &CHEQUE_AMOUNT, const time64_t &VALID_FROM, const time64_t &VALID_TO, const std::string &SENDER_ACCT_ID, const std::string &SENDER_USER_ID, const std::string &CHEQUE_MEMO, const std::string &RECIPIENT_USER_ID) const
EXPORT int32_t GetNym_MailCount(const std::string &NYM_ID) const
EXPORT int64_t StringToAmount(const std::string &ASSET_TYPE_ID, const std::string &str_input) const
EXPORT std::string GetNym_RevokedCredContents(const std::string &NYM_ID, const std::string &CREDENTIAL_ID) const
Definition: OTAPI_Exec.cpp:797
EXPORT std::string Message_GetCommand(const std::string &THE_MESSAGE) const
EXPORT std::string Instrmnt_GetMemo(const std::string &THE_INSTRUMENT) const
EXPORT std::string Instrmnt_GetType(const std::string &THE_INSTRUMENT) const
EXPORT int32_t deleteUserAccount(const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string GetNym_Stats(const std::string &NYM_ID) const
EXPORT std::string Encode(const std::string &strPlaintext, const bool &bLineBreaks) const
EXPORT std::string GetAssetType_Contract(const std::string &ASSET_TYPE_ID) const
EXPORT int32_t deleteAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
EXPORT int32_t Bylaw_GetClauseCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
EXPORT std::string GetAccountWallet_ID(const int32_t &nIndex) const
EXPORT bool Wallet_RemoveAssetType(const std::string &ASSET_ID) const
EXPORT std::string GetAccountWallet_Type(const std::string &ACCOUNT_ID) const
EXPORT int64_t Ledger_GetTransactionIDByIndex(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER, const int32_t &nIndex) const
EXPORT int32_t Basket_GetMemberCount(const std::string &BASKET_ASSET_TYPE_ID) const
EXPORT std::string Callback_GetClause(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CALLBACK_NAME) const
EXPORT std::string GetNym_InboxHash(const std::string &ACCOUNT_ID, const std::string &NYM_ID) const
EXPORT int32_t Hook_GetClauseCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &HOOK_NAME) const
Returns the number of clauses attached to a specific hook.
EXPORT std::string SmartContract_AddVariable(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME, const std::string &VAR_NAME, const std::string &VAR_ACCESS, const std::string &VAR_TYPE, const std::string &VAR_VALUE) const
EXPORT int32_t processInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &ACCT_LEDGER) const
EXPORT std::string Ledger_GetTransactionByIndex(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_LEDGER, const int32_t &nIndex) const
EXPORT int32_t Smart_GetBylawCount(const std::string &THE_CONTRACT) const
EXPORT std::string GetSentMessage(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
EXPORT std::string GetAccountWallet_AssetTypeID(const std::string &ACCOUNT_ID) const
EXPORT int32_t Smart_GetPartyCount(const std::string &THE_CONTRACT) const
EXPORT std::string PeekMemlogBack() const
Definition: OTAPI_Exec.cpp:388
EXPORT std::string GetNym_OutpaymentsRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string GenerateBasketCreation(const std::string &USER_ID, const int64_t &MINIMUM_TRANSFER) const
EXPORT bool Nym_VerifyMailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string Wallet_ImportCert(const std::string &DISPLAY_NAME, const std::string &FILE_CONTENTS) const
Returns the imported cert&#39;s NymID, if successful. Else nullptr.
EXPORT time64_t Token_GetValidFrom(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
the date is seconds since Jan 1970.
EXPORT std::string GetNym_SubCredentialContents(const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const std::string &SUB_CRED_ID) const
Definition: OTAPI_Exec.cpp:881
EXPORT int32_t queryAssetTypes(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ENCODED_MAP) const
EXPORT bool IsBasketCurrency(const std::string &ASSET_TYPE_ID) const
EXPORT std::string GetNym_OutpaymentsContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
EXPORT std::string UlongToString(const uint64_t &lNumber) const
Definition: OTAPI_Exec.cpp:307
EXPORT int64_t Transaction_GetAmount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string Party_GetID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
EXPORT std::string Encrypt(const std::string &RECIPIENT_NYM_ID, const std::string &strPlaintext) const
EXPORT int32_t exchangePurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID, const std::string &THE_PURSE) const
static bool bCleanupOTApp
EXPORT std::string Variable_GetContents(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
EXPORT std::string Smart_GetPartyByIndex(const std::string &THE_CONTRACT, const int32_t &nIndex) const
returns the name of the party.
EXPORT bool PopMemlogBack() const
Definition: OTAPI_Exec.cpp:398
EXPORT void Output(const int32_t &nLogLevel, const std::string &strOutput) const
Definition: OTAPI_Exec.cpp:322
EXPORT bool VerifyUserPrivateKey(const std::string &USER_ID) const
EXPORT std::string Transaction_GetVoucher(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_TRANSACTION) const
EXPORT std::string Wallet_GetAccountIDFromPartial(const std::string &PARTIAL_ID) const