135 #include "../core/script/OTVariable.hpp"
136 #include "../core/OTLog.hpp"
138 using namespace opentxs;
185 nTransNumsNeeded = 0;
202 const string& p_nymID)
209 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
211 otOut << strError <<
"p_serverID";
214 otOut << strError <<
"p_nymID";
218 serverID = p_serverID;
220 nTransNumsNeeded = 1;
225 const string& p_nymID,
const string& p_strParam)
232 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
234 otOut << strError <<
"p_serverID";
237 otOut << strError <<
"p_nymID";
240 otOut << strError <<
"p_strParam";
244 serverID = p_serverID;
246 nTransNumsNeeded = 1;
254 assetID = p_strParam;
260 accountID = p_strParam;
265 strData = p_strParam;
268 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func()\n";
273 const string& p_nymID,
const string& p_strParam,
274 const string& p_strData)
281 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
283 otOut << strError <<
"p_serverID \n";
286 otOut << strError <<
"p_nymID \n";
290 otOut << strError <<
"p_strParam \n";
294 otOut << strError <<
"p_strData \n";
298 serverID = p_serverID;
300 nTransNumsNeeded = 1;
306 accountID = p_strParam;
314 assetID = p_strParam;
318 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func()\n";
323 const string& p_nymID,
const string& p_strParam,
331 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
333 otOut << strError <<
"p_serverID \n";
336 otOut << strError <<
"p_nymID \n";
340 otOut << strError <<
"p_strParam \n";
344 serverID = p_serverID;
346 nTransNumsNeeded = 1;
350 accountID = p_strParam;
354 strData = p_strParam;
358 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func()\n";
363 const string& p_nymID,
const string& p_nymID2,
364 const string& p_strData,
const string& p_strData2)
370 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
372 otOut << strError <<
"p_serverID";
375 otOut << strError <<
"p_nymID";
378 otOut << strError <<
"p_nymID2";
381 otOut << strError <<
"p_strData";
384 otOut << strError <<
"p_strData2";
388 serverID = p_serverID;
390 nTransNumsNeeded = 1;
396 strData2 = p_strData2;
400 strData2 = p_strData;
401 strData3 = p_strData2;
405 accountID = p_nymID2;
409 strData2 = p_strData2;
411 int32_t nNumsNeeded =
414 if (nNumsNeeded > 0) {
415 nTransNumsNeeded = nNumsNeeded;
419 accountID = p_nymID2;
421 nData = stol(p_strData);
422 strData = p_strData2;
425 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func() "
431 const string& p_nymID,
const string& p_accountID,
432 const string& p_strParam, int64_t p_lData,
433 const string& p_strData2)
440 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
442 otOut << strError <<
"p_serverID";
445 otOut << strError <<
"p_nymID";
448 otOut << strError <<
"p_accountID";
451 otOut << strError <<
"p_strParam";
455 serverID = p_serverID;
457 nTransNumsNeeded = 1;
459 accountID = p_accountID;
463 otOut << strError <<
"p_strData2";
465 accountID2 = p_strParam;
467 strData = p_strData2;
470 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func() "
476 const string& p_nymID,
const string& p_accountID,
477 const string& p_strParam,
const string& p_strData,
485 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
487 otOut << strError <<
"p_serverID";
490 otOut << strError <<
"p_nymID";
493 otOut << strError <<
"p_accountID";
496 otOut << strError <<
"p_strParam";
500 serverID = p_serverID;
502 nTransNumsNeeded = 1;
504 accountID = p_accountID;
508 otOut << strError <<
"p_strData";
516 otOut << strError <<
"p_strData";
518 assetID = p_strParam;
523 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func() "
529 const string& p_nymID,
const string& p_accountID,
530 const string& p_strParam,
const string& p_strData,
531 const string& p_strData2)
538 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
540 otOut << strError <<
"p_serverID";
543 otOut << strError <<
"p_nymID";
546 otOut << strError <<
"p_accountID";
549 otOut << strError <<
"p_strParam";
553 serverID = p_serverID;
555 nTransNumsNeeded = 1;
557 accountID = p_accountID;
561 otOut << strError <<
"p_accountID";
564 otOut << strError <<
"p_strParam";
567 otOut << strError <<
"p_strData";
569 nymID2 = p_accountID;
570 strData = p_strParam;
571 strData2 = p_strData;
576 otOut <<
"ERROR! WRONG TYPE passed to OTAPI_Func.OTAPI_Func() "
582 const string& p_nymID,
const string& p_assetID,
583 const string& p_basket,
const string& p_accountID,
584 bool p_bBool, int32_t p_nTransNumsNeeded)
591 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
593 otOut << strError <<
"p_serverID";
596 otOut << strError <<
"p_nymID";
599 otOut << strError <<
"p_assetID";
602 otOut << strError <<
"p_accountID";
605 otOut << strError <<
"p_basket";
609 serverID = p_serverID;
611 nTransNumsNeeded = p_nTransNumsNeeded;
615 accountID = p_accountID;
619 const string& p_nymID,
const string& assetAccountID,
620 const string& currencyAcctID,
const string& scale,
621 const string& minIncrement,
const string& quantity,
622 const string& price,
bool bSelling)
629 "ERROR! Empty string passed to OTAPI_Func.OTAPI_Func() as: ";
631 otOut << strError <<
"p_serverID";
634 otOut << strError <<
"p_nymID";
637 otOut << strError <<
"assetAccountID";
640 otOut << strError <<
"currencyAcctID";
643 otOut << strError <<
"scale";
646 otOut << strError <<
"minIncrement";
649 otOut << strError <<
"quantity";
652 otOut << strError <<
"price";
656 serverID = p_serverID;
658 accountID = assetAccountID;
659 accountID2 = currencyAcctID;
662 strData2 = minIncrement;
671 nTransNumsNeeded = 3;
695 strData2, accountID);
750 accountID2, lData, strData);
759 accountID, accountID2, stoll(strData), stoll(strData2),
760 stoll(strData3), stoll(strData4), bBool, tData, strData5, lData);
768 otOut <<
"ERROR! OTAPI_Func.Send() activated, with bad function type: "
776 const string& IN_FUNCTION)
const
779 string strLocation =
"OTAPI_Func::SendRequestLowLevel: " + IN_FUNCTION;
789 otOut << strLocation <<
": Failed to send message due to error.\n";
797 otOut << strLocation <<
": Didn't send this message, but NO error "
798 "occurred, either. (For example, a request to "
799 "process an empty Nymbox will return 0, "
800 "meaning, nothing was sent, but also no error "
805 else if (nRun == (-2))
810 otOut << strLocation <<
": ERROR, not supported. (-2 was returned.)\n";
833 const string& IN_FUNCTION)
835 int32_t nTotalRetries = 2;
836 return SendTransaction(theFunction, IN_FUNCTION, nTotalRetries);
840 const string& IN_FUNCTION,
841 int32_t nTotalRetries)
const
844 string strLocation =
"OTAPI_Func::SendTransaction: " + IN_FUNCTION;
850 otOut << strLocation <<
", getIntermediaryFiles returned false. (It "
851 "couldn't download files that it needed.)\n";
861 int32_t comparative = 0;
867 comparative = configTxnCount;
870 if (getnym_trnsnum_count < comparative) {
871 otOut << strLocation <<
", I don't have enough transaction numbers to "
872 "perform this transaction. Grabbing more "
880 getnym_trnsnum_count =
882 if (getnym_trnsnum_count < comparative) {
885 <<
", failure: MsgUtil.getTransactionNumbers. (Trying again...)\n";
896 getnym_trnsnum_count =
898 if (getnym_trnsnum_count < comparative) {
901 <<
", failure: MsgUtil.getTransactionNumbers. (Trying again...)\n";
916 if (getnym_trnsnum_count < comparative) {
919 <<
", third failure: MsgUtil.getTransactionNumbers. (Giving up.)\n";
923 bool bCanRetryAfterThis =
false;
925 string strResult = SendRequestOnce(theFunction, IN_FUNCTION,
true,
true,
929 otOut <<
" Getting Intermediary files.. \n";
934 otOut << strLocation <<
", getIntermediaryFiles returned false. "
935 "(After a success sending the transaction. "
961 int32_t nRetries = nTotalRetries;
964 bCanRetryAfterThis) {
967 bool bWillRetryAfterThis =
true;
969 if ((nRetries == 0) || !bCanRetryAfterThis) {
970 bWillRetryAfterThis =
false;
973 strResult = SendRequestOnce(theFunction, IN_FUNCTION,
true,
974 bWillRetryAfterThis, bCanRetryAfterThis);
985 <<
", getIntermediaryFiles (loop) returned false even "
986 "after successfully sending the transaction.\n";
997 const string& IN_FUNCTION)
const
1001 bool bCanRetryAfterThis =
false;
1003 string strResult = SendRequestOnce(theFunction, IN_FUNCTION,
false,
true,
1004 bCanRetryAfterThis);
1007 strResult = SendRequestOnce(theFunction, IN_FUNCTION,
false,
false,
1008 bCanRetryAfterThis);
1014 const string& IN_FUNCTION,
1015 bool bIsTransaction,
1016 bool bWillRetryAfterThis,
1017 bool& bCanRetryAfterThis)
const
1020 string strLocation =
"OTAPI_Func::SendRequestOnce: " + IN_FUNCTION;
1022 bCanRetryAfterThis =
false;
1024 string strReply =
"";
1025 int32_t nlocalRequestNum = SendRequestLowLevel(
1026 theFunction, IN_FUNCTION);
1028 if ((nlocalRequestNum == -1) || (nlocalRequestNum == 0)) {
1033 if (nlocalRequestNum < -1) {
1060 bool bMsgReplyError = (!
VerifyStringVal(strReply) || (nReplySuccess < 0));
1062 bool bMsgReplySuccess = (!bMsgReplyError && (nReplySuccess > 0));
1063 bool bMsgReplyFailure = (!bMsgReplyError && (nReplySuccess == 0));
1065 bool bMsgTransSuccess;
1066 bool bMsgTransFailure;
1069 bool bMsgAnyFailure;
1071 bool bMsgAllSuccess;
1079 int32_t nTransSuccess;
1080 int32_t nBalanceSuccess;
1081 if (bMsgReplySuccess)
1088 if (nBalanceSuccess > 0) {
1103 int32_t nTransCancelled =
1112 if (1 != nTransCancelled) {
1135 nBalanceSuccess = -1;
1145 bool bMsgBalanceError =
1147 bool bMsgBalanceSuccess =
1148 (!bMsgReplyError && !bMsgBalanceError && (nBalanceSuccess > 0));
1149 bool bMsgBalanceFailure =
1150 (!bMsgReplyError && !bMsgBalanceError && (nBalanceSuccess == 0));
1152 bool bMsgTransError =
1154 bMsgTransSuccess = (!bMsgReplyError && !bMsgBalanceError &&
1155 !bMsgTransError && (nTransSuccess > 0));
1156 bMsgTransFailure = (!bMsgReplyError && !bMsgBalanceError &&
1157 !bMsgTransError && (nTransSuccess == 0));
1159 bMsgAnyError = (bMsgReplyError || bMsgBalanceError || bMsgTransError);
1161 (bMsgReplyFailure || bMsgBalanceFailure || bMsgTransFailure);
1164 (bMsgReplySuccess && bMsgBalanceSuccess && bMsgTransSuccess);
1169 bMsgTransSuccess =
false;
1170 bMsgTransFailure =
false;
1172 bMsgAnyError = (bMsgReplyError);
1173 bMsgAnyFailure = (bMsgReplyFailure);
1175 bMsgAllSuccess = (bMsgReplySuccess);
1194 if (bMsgAllSuccess) {
1227 else if (bMsgAnyError || bMsgAnyFailure)
1232 bool bWasGetReqSent =
false;
1239 if (bWasGetReqSent && (nGetRequest > 0)) {
1240 bCanRetryAfterThis =
true;
1244 if (bIsTransaction) {
1245 bCanRetryAfterThis =
false;
1251 bool bForceDownload =
true;
1254 theFunction.
accountID, bForceDownload)) {
1255 otOut << strLocation <<
", getIntermediaryFiles returned "
1256 "false. (After a failure to send "
1257 "the transaction. Thus, I give "
1262 bool bWasFound =
false;
1263 bool bWasSent =
false;
1265 OTfourbool the_foursome = {bMsgReplySuccess, bMsgReplyFailure,
1266 bMsgTransSuccess, bMsgTransFailure};
1268 bForceDownload =
false;
1272 bForceDownload, nlocalRequestNum, bWasFound,
1273 bWillRetryAfterThis, the_foursome);
1291 if ((bWasSent && (1 == nProcessNymboxResult)) ||
1293 (0 == nProcessNymboxResult)))
1295 bCanRetryAfterThis =
true;
1304 else if (bWasSent && (nProcessNymboxResult > 1)) {
1320 otOut << strLocation <<
", Failure: Never got reply from server, "
1321 "so tried getRequest, and that failed too. "
1355 const string& nymID)
1359 if (
OTDB::Exists(
"nyms", serverID,
"offers", nymID +
".bin")) {
1360 otWarn <<
"Offers file exists... Querying nyms...\n";
1363 "offers", nymID +
".bin");
1365 if (
nullptr == storable) {
1366 otOut <<
"Unable to verify storable object. Probably doesn't "
1371 otWarn <<
"QueryObject worked. Now dynamic casting from storable to a "
1372 "(nym) offerList...\n";
1375 if (
nullptr == offerList) {
1377 <<
"Unable to dynamic cast a storable to a (nym) offerList.\n";
1387 string strLocation =
"convert_offerlist_to_maps";
1396 int32_t nCount = offerList.GetOfferDataNymCount();
1397 int32_t nTemp = nCount;
1400 for (int32_t nIndex = 0; nIndex < nCount; ++nIndex) {
1404 if (!offerDataPtr) {
1405 otOut << strLocation <<
": Unable to reference (nym) offerData "
1406 "on offerList, at index: " << nIndex
1412 string strScale = offerData.
scale;
1415 string strSellStatus = offerData.
selling ?
"SELL" :
"BUY";
1419 strScale +
"-" + strAssetTypeID +
"-" + strCurrencyTypeID;
1421 SubMap* sub_map =
nullptr;
1422 if (
nullptr != map_of_maps && !map_of_maps->empty() &&
1423 (map_of_maps->count(strMapKey) > 0)) {
1424 sub_map = (*map_of_maps)[strMapKey];
1427 if (
nullptr != sub_map) {
1428 otWarn << strLocation <<
": The sub-map already exists!\n";
1440 (*sub_map)[strTransactionID] = &offerData;
1446 <<
": The sub-map does NOT already exist!\n";
1452 (*sub_map)[strTransactionID] = &offerData;
1454 if (
nullptr != map_of_maps) {
1457 (*map_of_maps)[strMapKey] = sub_map;
1485 string strScale = offer_data.
scale;
1488 string strSellStatus = offer_data.
selling ?
"SELL" :
"BUY";
1495 otOut <<
"Scale:\t\t" << strScale <<
"\n";
1496 otOut <<
"Asset:\t\t" << strAssetTypeID <<
"\n";
1497 otOut <<
"Currency:\t" << strCurrencyTypeID <<
"\n";
1498 otOut <<
"\nIndex\tTrans#\tType\tPrice\tAvailable\n";
1506 << strAvailableAssets <<
"\n";
1544 string strLocation =
"find_strange_offers";
1597 otLog4 << strLocation <<
": About to compare the new potential offer "
1598 "against one of the existing ones...";
1603 otLog4 << strLocation <<
": the account IDs and the scale match...";
1667 string strLocation =
"iterate_nymoffers_sub_map";
1675 SubMap* sub_mapPtr = &sub_map;
1677 otOut << strLocation <<
": No range retrieved from sub_map. It must be "
1678 "non-existent, I guess.\n";
1681 if (sub_map.empty()) {
1687 otOut << strLocation <<
": Error: A range was retrieved for the "
1688 "sub_map, but the range is empty.\n";
1692 int32_t nIndex = -1;
1693 for (
auto it = sub_map.begin(); it != sub_map.end(); ++it) {
1697 if (
nullptr == it->second) {
1698 otOut << strLocation <<
": Looping through range_sub_map range, "
1699 "and first offer_data_pair fails to "
1706 (*the_lambda)(offer_data, nIndex, map_of_maps, sub_map,
1709 if (-1 == nLambda) {
1710 otOut << strLocation <<
": Error: the_lambda failed.\n";
1745 string strLocation =
"iterate_nymoffers_maps";
1751 MapOfMaps* map_of_mapsPtr = &map_of_maps;
1752 if (!map_of_mapsPtr) {
1753 otOut << strLocation <<
": No range retrieved from map_of_maps.\n";
1756 if (map_of_maps.empty()) {
1757 otOut << strLocation <<
": A range was retrieved for the map_of_maps, "
1758 "but the range is empty.\n";
1762 int32_t nMainIndex = -1;
1763 for (
auto it = map_of_maps.begin(); it != map_of_maps.end(); ++it) {
1767 if (
nullptr == it->second) {
1768 otOut << strLocation <<
": Looping through map_of_maps range, and "
1769 "first sub_map_pair fails to verify.\n";
1773 string strMapKey = it->first;
1775 SubMap& sub_map = *it->second;
1776 if (sub_map.empty()) {
1777 otOut << strLocation <<
": Error: Sub_map is empty (Then how is it "
1778 "even here?? Submaps are only added based "
1779 "on existing offers.)\n";
1783 if (0 == nMainIndex)
1790 the_lambda, extra_vals);
1791 if (-1 == nSubMap) {
1792 otOut << strLocation
1793 <<
": Error: while trying to iterate_nymoffers_sub_map.\n";
1797 map_of_maps.clear();
OTLOG_IMPORT OTLogStream otLog4
static EXPORT int32_t createUserAccount(const std::string &SERVER_ID, const std::string &USER_ID)
EXPORT OT_OTAPI_OT MapOfMaps * convert_offerlist_to_maps(opentxs::OTDB::OfferListNym &offerList)
EXPORT OT_OTAPI_OT int32_t output_nymoffer_data(const opentxs::OTDB::OfferDataNym &offer_data, int32_t nIndex, const MapOfMaps &map_of_maps, const SubMap &sub_map, the_lambda_struct &extra_vals)
static EXPORT int32_t getMarketOffers(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &MARKET_ID, const int64_t &MAX_DEPTH)
Gets all offers for a specific market and their details (up until.
EXPORT OT_UTILITY_OT int32_t getNbrTransactionCount() const
std::string transaction_id
std::map< std::string, opentxs::OTDB::OfferDataNym * > SubMap
OT_OTAPI_OT int32_t SendRequestLowLevel(OTAPI_Func &theFunction, const std::string &IN_FUNCTION) const
static EXPORT void FlushMessageBuffer()
EXPORT static OT_OTAPI_OT void CopyVariables()
std::string to_string(const T &t)
static EXPORT int32_t activateSmartContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_SMART_CONTRACT)
static 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)
PAY DIVIDEND – to shareholders.
std::string asset_type_id
static EXPORT int32_t getMint(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID)
static EXPORT int32_t getContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID)
OTLOG_IMPORT OTLogStream otOut
std::string finished_so_far
static EXPORT int32_t processInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &ACCT_LEDGER)
static EXPORT int32_t notarizeWithdrawal(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const int64_t &AMOUNT)
std::string currency_acct_id
static EXPORT int32_t notarizeDeposit(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_PURSE)
EXPORT OT_OTAPI_OT int32_t iterate_nymoffers_sub_map(const MapOfMaps &map_of_maps, SubMap &sub_map, LambdaFunc the_lambda)
EXPORT OT_OTAPI_OT opentxs::OTDB::OfferListNym * loadNymOffers(const std::string &serverID, const std::string &nymID)
static EXPORT int32_t depositPaymentPlan(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_PAYMENT_PLAN)
EXPORT Storable * QueryObject(StoredObjectType theObjectType, std::string strFolder, std::string oneStr="", std::string twoStr="", std::string threeStr="")
OT_UTILITY_OT int32_t VerifyMessageSuccess(const string &strMessage)
static 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)
string GetVariable(const char *name)
static 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)
static 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)
static EXPORT int32_t getMarketList(const std::string &SERVER_ID, const std::string &USER_ID)
Retrieves details for each market.
static EXPORT int32_t deleteAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
static EXPORT std::string LoadNymboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID)
static 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)
static EXPORT int32_t queryAssetTypes(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ENCODED_MAP)
std::string currency_type_id
static 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)
static EXPORT int32_t usageCredits(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_CHECK, const int64_t &ADJUSTMENT)
OT_OTAPI_OT std::string SendTransaction(OTAPI_Func &theFunction, const std::string &IN_FUNCTION)
static 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)
static EXPORT int32_t SmartContract_CountNumsNeeded(const std::string &THE_CONTRACT, const std::string &AGENT_NAME)
static EXPORT OTVariable * FindVariable2(const std::string &str_var_name)
std::string the_asset_acct
EXPORT OT_UTILITY_OT int32_t getRequestNumber(const std::string &serverID, const std::string &nymID)
OT_OTAPI_OT int32_t Run() const
static 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)
static EXPORT int32_t issueBasket(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_BASKET)
static 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)
static 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)
static EXPORT int32_t getNym_MarketOffers(const std::string &SERVER_ID, const std::string &USER_ID)
This "Market Offer" data is a lot more detailed than the.
EXPORT OT_UTILITY_OT bool getTransactionNumbers(const std::string &serverID, const std::string &nymID)
EXPORT OT_UTILITY_OT void setNbrTransactionCount(int32_t new_trans_dl)
OT_UTILITY_OT bool VerifyStringVal(const std::string &nValue)
std::vector< std::string > the_vector
EXPORT OT_UTILITY_OT std::string ReceiveReplyLowLevel(const std::string &serverID17, const std::string &nymID, int32_t nRequestNumber8, const std::string &IN_FUNCTION)
static EXPORT int32_t issueAssetType(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_CONTRACT)
EXPORT OT_UTILITY_OT int32_t getAndProcessNymbox_8(const std::string &serverID, const std::string &nymID, bool &bWasMsgSent, bool bForceDownload, int32_t nRequestNumber, bool &bFoundNymboxItem, bool bHarvestingForRetry, const OTfourbool &bMsgFoursome)
std::string the_currency_acct
OTLOG_IMPORT OTLogStream otWarn
static EXPORT void FlushSentMessages(const bool &bHarvestingForRetry, const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_NYMBOX)
static EXPORT int32_t deleteUserAccount(const std::string &SERVER_ID, const std::string &USER_ID)
std::array< bool, 4 > OTfourbool
static EXPORT int32_t createAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID)
EXPORT OT_OTAPI_OT int32_t find_strange_offers(const opentxs::OTDB::OfferDataNym &offer_data, int32_t nIndex, const MapOfMaps &map_of_maps, const SubMap &sub_map, the_lambda_struct &extra_vals)
OT_OTAPI_OT std::string SendRequestOnce(OTAPI_Func &theFunction, const std::string &IN_FUNCTION, bool bIsTransaction, bool bWillRetryAfterThis, bool &bCanRetryAfterThis) const
int32_t(* LambdaFunc)(const opentxs::OTDB::OfferDataNym &offer_data, int32_t nIndex, const MapOfMaps &map_of_maps, const SubMap &sub_map, the_lambda_struct &extra_vals)
static EXPORT int32_t GetNym_TransactionNumCount(const std::string &SERVER_ID, const std::string &NYM_ID)
EXPORT bool Exists(std::string strFolder, std::string oneStr="", std::string twoStr="", std::string threeStr="")
std::string asset_acct_id
static 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)
EXPORT OT_UTILITY_OT bool getIntermediaryFiles(const std::string &serverID, const std::string &nymID, const std::string &accountID)
std::string & GetValueString()
OT_OTAPI_OT std::string SendRequest(OTAPI_Func &theFunction, const std::string &IN_FUNCTION) const
static EXPORT int32_t depositCheque(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_CHEQUE)
static 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)
std::map< std::string, SubMap * > MapOfMaps
static 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)
OT_OTAPI_OT void InitCustom()
static EXPORT int32_t getMarketRecentTrades(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &MARKET_ID)
Gets all recent trades (up until maximum depth)
EXPORT OT_OTAPI_OT int32_t iterate_nymoffers_maps(MapOfMaps &map_of_maps, LambdaFunc the_lambda)
static 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)
static EXPORT int32_t checkUser(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_CHECK)
std::string price_per_scale
static 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)