1082 if (
nullptr == pWallet) {
1083 otErr <<
"OTRecordList::" << __FUNCTION__
1084 <<
": Error: Wallet is nullptr.\n";
1094 int32_t nNymIndex = -1;
1095 for (
auto& it_nym : m_nyms) {
1098 otOut <<
"=============== " << __FUNCTION__
1099 <<
": Beginning loop through Nyms...\n";
1100 const std::string& str_nym_id(it_nym);
1101 const OTIdentifier theNymID(str_nym_id);
1102 const OTString strNymID(theNymID);
1103 OTPseudonym* pNym = pWallet->GetNymByID(theNymID);
1104 if (
nullptr == pNym)
continue;
1107 const int32_t nOutpaymentsCount =
1110 otOut <<
"--------\n" << __FUNCTION__ <<
": Nym " << nNymIndex
1111 <<
", nOutpaymentsCount: " << nOutpaymentsCount
1112 <<
", ID: " << strNymID.Get() <<
"\n";
1113 for (int32_t nCurrentOutpayment = 0;
1114 nCurrentOutpayment < nOutpaymentsCount; ++nCurrentOutpayment) {
1115 otOut << __FUNCTION__
1116 <<
": Outpayment instrument: " << nCurrentOutpayment <<
"\n";
1117 const OTString strOutpayment(
1119 str_nym_id, nCurrentOutpayment));
1120 std::string str_memo;
1121 OTPayment theOutPayment(strOutpayment);
1123 if (!theOutPayment.IsValid() || !theOutPayment.SetTempValues()) {
1124 otErr << __FUNCTION__
1125 <<
": Skipping: Unable to load outpayments "
1126 "instrument from string:\n" << strOutpayment.Get()
1130 int64_t lAmount = 0;
1131 std::string str_amount;
1133 if (theOutPayment.GetAmount(lAmount)) {
1145 strTemp.Format(
"%" PRId64
"", lAmount);
1146 str_amount = strTemp.Get();
1148 OTIdentifier theAssetTypeID;
1149 const std::string* p_str_asset_type =
1150 &OTRecordList::s_blank;
1151 const std::string* p_str_asset_name =
1152 &OTRecordList::s_blank;
1153 std::string str_outpmt_asset;
1156 if (theOutPayment.GetAssetTypeID(theAssetTypeID)) {
1157 OTString strTemp(theAssetTypeID);
1158 str_outpmt_asset = strTemp.Get();
1159 auto it_asset = m_assets.find(str_outpmt_asset);
1160 if (it_asset != m_assets.end())
1165 p_str_asset_name = &(it_asset->second);
1175 otOut << __FUNCTION__
1176 <<
": Skipping outpayment (we don't care "
1177 "about asset type " << str_outpmt_asset.c_str()
1190 OTIdentifier theAccountID;
1191 const std::string* p_str_account =
1192 &OTRecordList::s_blank;
1193 std::string str_outpmt_account;
1196 if (theOutPayment.GetSenderAcctIDForDisplay(
1200 OTString strTemp(theAccountID);
1201 str_outpmt_account = strTemp.Get();
1202 auto it_acct = std::find(m_accounts.begin(), m_accounts.end(),
1203 str_outpmt_account);
1204 if (it_acct != m_accounts.end())
1207 p_str_account = &(*it_acct);
1223 otOut << __FUNCTION__
1224 <<
": Skipping outpayment (we don't care "
1225 "about account " << str_outpmt_account.c_str()
1237 const std::string str_outpmt_server =
1239 str_nym_id, nCurrentOutpayment);
1240 const std::string str_outpmt_recipientID =
1242 str_nym_id, nCurrentOutpayment);
1249 auto it_server = std::find(m_servers.begin(), m_servers.end(),
1252 if (it_server != m_servers.end())
1262 OTString strName(m_pLookup->
GetNymName(str_outpmt_recipientID,
1265 std::string str_name;
1267 if (strName.Exists())
1271 str_outpmt_recipientID.c_str());
1273 str_name = strNameTemp.Get();
1275 if (theOutPayment.GetMemo(strMemo)) {
1276 str_memo = strMemo.Get();
1280 std::string str_date =
"0";
1284 if (theOutPayment.GetValidFrom(tFrom)) {
1287 strFrom.Format(
"%" PRIu64
"", lFrom);
1288 str_date = strFrom.Get();
1290 theOutPayment.GetValidTo(tTo);
1293 int32_t nType =
static_cast<int32_t
>(theOutPayment.GetType());
1295 const std::string& str_type = GetTypeString(nType);
1298 otOut << __FUNCTION__
1299 <<
": ADDED: pending outgoing instrument (str_type: "
1300 << str_type.c_str() <<
")\n";
1303 *it_server, *p_str_asset_type, *p_str_asset_name,
1325 sp_Record->SetContents(strOutpayment.Get());
1326 sp_Record->SetOtherNymID(str_outpmt_recipientID);
1327 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
1328 sp_Record->SetDateRange(tFrom, tTo);
1329 sp_Record->SetBoxIndex(nCurrentOutpayment);
1330 int64_t lTransNum = 0;
1331 theOutPayment.GetOpeningNum(lTransNum, theNymID);
1332 sp_Record->SetTransactionNum(lTransNum);
1333 m_contents.push_back(sp_Record);
1338 otOut << __FUNCTION__
1339 <<
": Skipping outgoing instrument (we don't "
1340 "care about server " << str_outpmt_server.c_str()
1348 for (int32_t nCurrentMail = 0; nCurrentMail < nMailCount;
1350 otOut << __FUNCTION__ <<
": Mail index: " << nCurrentMail <<
"\n";
1351 OTMessage* pMsg = pNym->GetMailByIndex(nCurrentMail);
1353 const std::string str_mail_server =
1356 const std::string str_mail_senderID =
1365 std::find(m_servers.begin(), m_servers.end(), str_mail_server);
1367 if (it_server != m_servers.end())
1378 m_pLookup->
GetNymName(str_mail_senderID, &(*it_server))),
1380 std::string str_name;
1382 if (strName.Exists())
1386 str_mail_senderID.c_str());
1388 str_name = strNameTemp.Get();
1389 const std::string* p_str_asset_type =
1390 &OTRecordList::s_blank;
1391 const std::string* p_str_asset_name =
1392 &OTRecordList::s_blank;
1393 const std::string* p_str_account =
1394 &OTRecordList::s_blank;
1396 std::string str_amount;
1399 uint64_t lDate = pMsg->m_lTime;
1401 strDate.Format(
"%" PRIu64
"", lDate);
1402 const std::string str_date(strDate.Get());
1405 otOut << __FUNCTION__ <<
": ADDED: incoming mail.\n";
1408 *it_server, *p_str_asset_type, *p_str_asset_name,
1422 str_amount, OTRecordList::s_message_type,
1430 str_nym_id, nCurrentMail));
1431 sp_Record->SetContents(strMail.Get());
1432 sp_Record->SetOtherNymID(str_mail_senderID);
1433 sp_Record->SetBoxIndex(nCurrentMail);
1434 sp_Record->SetDateRange(
1437 m_contents.push_back(sp_Record);
1442 const int32_t nOutmailCount =
1444 for (int32_t nCurrentOutmail = 0; nCurrentOutmail < nOutmailCount;
1445 ++nCurrentOutmail) {
1446 otOut << __FUNCTION__ <<
": Outmail index: " << nCurrentOutmail
1448 OTMessage* pMsg = pNym->GetOutmailByIndex(nCurrentOutmail);
1450 const std::string str_mail_server =
1453 const std::string str_mail_recipientID =
1462 std::find(m_servers.begin(), m_servers.end(), str_mail_server);
1464 if (it_server != m_servers.end())
1475 m_pLookup->
GetNymName(str_mail_recipientID, &(*it_server))),
1477 std::string str_name;
1479 if (strName.Exists())
1483 str_mail_recipientID.c_str());
1485 str_name = strNameTemp.Get();
1486 const std::string* p_str_asset_type =
1487 &OTRecordList::s_blank;
1488 const std::string* p_str_asset_name =
1489 &OTRecordList::s_blank;
1490 const std::string* p_str_account =
1491 &OTRecordList::s_blank;
1493 std::string str_amount;
1496 uint64_t lDate = pMsg->m_lTime;
1498 strDate.Format(
"%" PRIu64
"", lDate);
1499 const std::string str_date(strDate.Get());
1502 otOut << __FUNCTION__ <<
": ADDED: sent mail.\n";
1505 *it_server, *p_str_asset_type, *p_str_asset_name,
1519 str_amount, OTRecordList::s_message_type,
1525 const OTString strOutmail(
1528 sp_Record->SetContents(strOutmail.Get());
1529 sp_Record->SetBoxIndex(nCurrentOutmail);
1530 sp_Record->SetOtherNymID(str_mail_recipientID);
1531 sp_Record->SetDateRange(
1534 m_contents.push_back(sp_Record);
1540 int32_t nServerIndex = -1;
1541 for (
auto& it_server : m_servers) {
1543 const OTIdentifier theServerID(it_server);
1544 OTServerContract* pServer = pWallet->GetServerContract(theServerID);
1546 const OTString strServerID(theServerID);
1547 otOut << __FUNCTION__ <<
": Server " << nServerIndex
1548 <<
", ID: " << strServerID.Get() <<
"\n";
1562 std::unique_ptr<OTLedger> theInboxAngel(pInbox);
1564 int32_t nIndex = (-1);
1566 if (
nullptr != pInbox) {
1567 for (
auto& it : pInbox->GetTransactionMap()) {
1568 OTTransaction* pBoxTrans = it.second;
1571 otOut << __FUNCTION__ <<
": Incoming payment: " << nIndex
1573 std::string str_name;
1575 std::string str_sender_nym_id;
1576 std::string str_sender_acct_id;
1578 if (!pBoxTrans->IsAbbreviated()) {
1579 OTIdentifier theSenderID;
1581 if (pBoxTrans->GetSenderUserIDForDisplay(theSenderID)) {
1582 const OTString strSenderID(theSenderID);
1583 str_sender_nym_id = strSenderID.Get();
1586 str_sender_nym_id, &it_server)),
1589 if (strName.Exists())
1594 str_sender_nym_id.c_str());
1596 str_name = strNameTemp.Get();
1599 theSenderID.Release();
1601 if (pBoxTrans->GetSenderAcctIDForDisplay(theSenderID)) {
1602 const OTString strSenderID(theSenderID);
1603 str_sender_acct_id = strSenderID.Get();
1607 std::string str_date =
1609 time64_t tDateSigned = pBoxTrans->GetDateSigned();
1612 tValidFrom = tDateSigned;
1613 const uint64_t lDateSigned =
1615 OTString strDateSigned;
1616 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
1617 str_date = strDateSigned.Get();
1619 const std::string* p_str_asset_type =
1620 &OTRecordList::s_blank;
1621 const std::string* p_str_asset_name =
1622 &OTRecordList::s_blank;
1623 std::string str_amount;
1624 std::string str_type;
1625 std::string str_memo;
1626 OTString strContents;
1628 if (pBoxTrans->IsAbbreviated()) {
1630 pBoxTrans->GetTypeString();
1632 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
1636 strTemp.Format(
"%" PRId64
"", lAmount);
1637 str_amount = strTemp.Get();
1643 OTPayment* pPayment =
1646 std::unique_ptr<OTPayment> thePaymentAngel(pPayment);
1651 pBoxTrans->GetTypeString();
1654 pBoxTrans->GetAbbrevDisplayAmount();
1657 lAmount = pBoxTrans->GetReceiptAmount();
1660 strTemp.Format(
"%" PRId64
"", lAmount);
1661 str_amount = strTemp.Get();
1667 else if (pPayment->SetTempValues()) {
1668 pPayment->GetValidFrom(tValidFrom);
1669 pPayment->GetValidTo(tValidTo);
1672 const uint64_t lFrom =
1675 strFrom.Format(
"%" PRIu64
"", lFrom);
1676 str_date = strFrom.Get();
1679 if (pPayment->GetMemo(strMemo)) {
1680 str_memo = strMemo.Get();
1682 pPayment->GetPaymentContents(strContents);
1683 OTIdentifier theAssetTypeID, theSenderAcctID;
1685 if (pPayment->GetAssetTypeID(theAssetTypeID)) {
1686 OTString strTemp(theAssetTypeID);
1687 const std::string str_inpmt_asset(
1691 auto it_asset = m_assets.find(str_inpmt_asset);
1692 if (it_asset != m_assets.end())
1702 &(it_asset->second);
1713 otErr << __FUNCTION__
1714 <<
": Skipping: Incoming payment (we "
1715 "don't care about asset "
1716 << str_inpmt_asset.c_str() <<
")\n";
1720 if (str_sender_acct_id.empty() &&
1721 pPayment->GetSenderAcctIDForDisplay(
1723 OTString strTemp(theSenderAcctID);
1724 str_sender_acct_id = strTemp.Get();
1744 static_cast<int32_t
>(pPayment->GetType());
1746 str_type = GetTypeString(nType);
1747 int64_t lAmount = 0;
1749 if (pPayment->GetAmount(lAmount)) {
1751 strTemp.Format(
"%" PRId64
"", lAmount);
1752 str_amount = strTemp.Get();
1756 otOut << __FUNCTION__
1757 <<
": ADDED: pending incoming payment (str_type: "
1758 << str_type.c_str() <<
")\n";
1761 it_server, *p_str_asset_type, *p_str_asset_name,
1763 OTRecordList::s_blank,
1772 str_amount, str_type,
1781 if (strContents.Exists())
1782 sp_Record->SetContents(strContents.Get());
1783 sp_Record->SetDateRange(tValidFrom, tValidTo);
1784 sp_Record->SetBoxIndex(nIndex);
1785 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
1786 if (!str_sender_nym_id.empty())
1787 sp_Record->SetOtherNymID(str_sender_nym_id);
1788 if (!str_sender_acct_id.empty())
1789 sp_Record->SetOtherAccountID(str_sender_acct_id);
1790 sp_Record->SetTransNumForDisplay(
1791 pBoxTrans->GetReferenceNumForDisplay());
1792 sp_Record->SetTransactionNum(
1793 pBoxTrans->GetTransactionNum());
1795 m_contents.push_back(sp_Record);
1801 <<
": Failed loading payments inbox. "
1802 "(Probably just doesn't exist yet.)\n";
1809 OTLedger* pRecordbox =
1812 theServerID, theNymID, theNymID)
1816 std::unique_ptr<OTLedger> theRecordBoxAngel(pRecordbox);
1819 if (
nullptr != pRecordbox) {
1820 for (
auto& it : pRecordbox->GetTransactionMap()) {
1821 OTTransaction* pBoxTrans = it.second;
1823 bool bOutgoing =
false;
1825 otOut << __FUNCTION__
1826 <<
": Payment RECORD index: " << nIndex <<
"\n";
1827 std::string str_name;
1830 std::string str_other_nym_id;
1831 std::string str_other_acct_id;
1833 if (!pBoxTrans->IsAbbreviated()) {
1834 OTIdentifier theSenderID, theSenderAcctID;
1835 OTIdentifier theRecipientID, theRecipientAcctID;
1837 if (pBoxTrans->GetSenderUserIDForDisplay(theSenderID)) {
1838 const OTString strSenderID(theSenderID);
1839 const std::string str_sender_id(strSenderID.Get());
1851 str_nym_id.compare(str_sender_id))
1860 if (pBoxTrans->GetRecipientUserIDForDisplay(
1862 const OTString strRecipientID(
1864 const std::string str_recipient_id(
1865 strRecipientID.Get());
1868 str_recipient_id, &it_server)),
1871 if (strName.Exists())
1878 str_recipient_id.c_str());
1880 str_name = strNameTemp.Get();
1881 str_other_nym_id = str_recipient_id;
1882 if (pBoxTrans->GetRecipientAcctIDForDisplay(
1883 theRecipientAcctID)) {
1884 const OTString strRecipientAcctID(
1885 theRecipientAcctID);
1887 strRecipientAcctID.Get();
1898 str_sender_id, &it_server)),
1901 if (strName.Exists())
1906 str_sender_id.c_str());
1908 str_name = strNameTemp.Get();
1909 str_other_nym_id = str_sender_id;
1910 if (pBoxTrans->GetSenderAcctIDForDisplay(
1912 const OTString strSenderAcctID(
1914 str_other_acct_id = strSenderAcctID.Get();
1921 else if (pBoxTrans->GetRecipientUserIDForDisplay(
1923 const OTString strRecipientID(theRecipientID);
1924 const std::string str_recipient_id(
1925 strRecipientID.Get());
1940 str_recipient_id, &it_server)),
1943 if (strName.Exists())
1949 str_recipient_id.c_str());
1951 str_name = strNameTemp.Get();
1952 str_other_nym_id = str_recipient_id;
1953 if (pBoxTrans->GetRecipientAcctIDForDisplay(
1954 theRecipientAcctID)) {
1955 const OTString strRecipientAcctID(
1956 theRecipientAcctID);
1958 strRecipientAcctID.Get();
1964 std::string str_date =
1966 time64_t tDateSigned = pBoxTrans->GetDateSigned();
1969 tValidFrom = tDateSigned;
1970 const uint64_t lDateSigned =
1972 OTString strDateSigned;
1973 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
1974 str_date = strDateSigned.Get();
1976 const std::string* p_str_asset_type =
1977 &OTRecordList::s_blank;
1978 const std::string* p_str_asset_name =
1979 &OTRecordList::s_blank;
1980 const std::string* p_str_account =
1981 &OTRecordList::s_blank;
1982 std::string str_amount;
1983 std::string str_type;
1984 std::string str_memo;
1985 OTString strContents;
1987 if (pBoxTrans->IsAbbreviated()) {
1989 pBoxTrans->GetTypeString();
1991 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
1995 strTemp.Format(
"%" PRId64
"", lAmount);
1996 str_amount = strTemp.Get();
2006 std::unique_ptr<OTPayment> thePaymentAngel(pPayment);
2011 pBoxTrans->GetTypeString();
2014 pBoxTrans->GetAbbrevDisplayAmount();
2018 strTemp.Format(
"%" PRId64
"", lAmount);
2019 str_amount = strTemp.Get();
2024 else if (pPayment->SetTempValues()) {
2025 pPayment->GetValidFrom(tValidFrom);
2026 pPayment->GetValidTo(tValidTo);
2029 const uint64_t lFrom =
2032 strFrom.Format(
"%" PRIu64
"", lFrom);
2033 str_date = strFrom.Get();
2035 pPayment->GetPaymentContents(strContents);
2036 OTIdentifier theAccountID;
2040 if (pPayment->GetSenderAcctIDForDisplay(
2046 OTString strTemp(theAccountID);
2047 std::string str_outpmt_account =
2052 auto it_acct = std::find(
2053 m_accounts.begin(), m_accounts.end(),
2054 str_outpmt_account);
2060 p_str_account = &(*it_acct);
2069 otOut << __FUNCTION__
2070 <<
": Skipping 'sent payment' "
2071 "record. (We don't care about "
2073 << str_outpmt_account.c_str()
2103 if (str_other_acct_id.empty() &&
2104 (pPayment->GetSenderAcctIDForDisplay(
2106 OTString strTemp(theAccountID);
2107 str_other_acct_id = strTemp.Get();
2117 OTIdentifier theAssetTypeID;
2119 if (pPayment->GetAssetTypeID(theAssetTypeID)) {
2120 OTString strTemp(theAssetTypeID);
2121 const std::string str_inpmt_asset(
2125 auto it_asset = m_assets.find(str_inpmt_asset);
2126 if (it_asset != m_assets.end())
2136 &(it_asset->second);
2147 otErr << __FUNCTION__
2148 <<
": Skipping: Payment record (we "
2149 "don't care about asset type "
2150 << str_inpmt_asset.c_str() <<
")\n";
2171 if (pPayment->GetMemo(strMemo)) {
2172 str_memo = strMemo.Get();
2176 static_cast<int32_t
>(pPayment->GetType());
2178 str_type = GetTypeString(nType);
2179 int64_t lAmount = 0;
2181 if (pPayment->GetAmount(lAmount)) {
2183 strTemp.Format(
"%" PRId64
"", lAmount);
2184 str_amount = strTemp.Get();
2188 otOut << __FUNCTION__ <<
": ADDED: Payment record "
2189 << (bOutgoing ?
"(sent)" :
"(received)")
2190 <<
" (str_type: " << str_type.c_str() <<
")\n";
2193 it_server, *p_str_asset_type, *p_str_asset_name,
2205 str_amount, str_type,
2213 if (strContents.Exists())
2214 sp_Record->SetContents(strContents.Get());
2215 sp_Record->SetDateRange(tValidFrom, tValidTo);
2216 sp_Record->SetBoxIndex(nIndex);
2217 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
2218 if (!str_other_nym_id.empty())
2219 sp_Record->SetOtherNymID(str_other_nym_id);
2220 if (!str_other_acct_id.empty())
2221 sp_Record->SetOtherAccountID(str_other_acct_id);
2222 sp_Record->SetTransNumForDisplay(
2223 pBoxTrans->GetReferenceNumForDisplay());
2224 sp_Record->SetTransactionNum(
2225 pBoxTrans->GetTransactionNum());
2227 m_contents.push_back(sp_Record);
2233 <<
": Failed loading payments record box. "
2234 "(Probably just doesn't exist yet.)\n";
2241 OTLedger* pExpiredbox =
2247 std::unique_ptr<OTLedger> theExpiredBoxAngel(pExpiredbox);
2250 if (
nullptr != pExpiredbox) {
2251 for (
auto& it : pExpiredbox->GetTransactionMap()) {
2252 OTTransaction* pBoxTrans = it.second;
2254 bool bOutgoing =
false;
2256 otOut << __FUNCTION__
2257 <<
": Expired payment RECORD index: " << nIndex
2259 std::string str_name;
2262 std::string str_other_nym_id;
2263 std::string str_other_acct_id;
2265 if (!pBoxTrans->IsAbbreviated()) {
2266 OTIdentifier theSenderID, theSenderAcctID;
2267 OTIdentifier theRecipientID, theRecipientAcctID;
2269 if (pBoxTrans->GetSenderUserIDForDisplay(theSenderID)) {
2270 const OTString strSenderID(theSenderID);
2271 const std::string str_sender_id(strSenderID.Get());
2283 str_nym_id.compare(str_sender_id))
2292 if (pBoxTrans->GetRecipientUserIDForDisplay(
2294 const OTString strRecipientID(
2296 const std::string str_recipient_id(
2297 strRecipientID.Get());
2300 str_recipient_id, &it_server)),
2303 if (strName.Exists())
2310 str_recipient_id.c_str());
2312 str_name = strNameTemp.Get();
2313 str_other_nym_id = str_recipient_id;
2314 if (pBoxTrans->GetRecipientAcctIDForDisplay(
2315 theRecipientAcctID)) {
2316 const OTString strRecipientAcctID(
2317 theRecipientAcctID);
2319 strRecipientAcctID.Get();
2330 str_sender_id, &it_server)),
2333 if (strName.Exists())
2338 str_sender_id.c_str());
2340 str_name = strNameTemp.Get();
2341 str_other_nym_id = str_sender_id;
2342 if (pBoxTrans->GetSenderAcctIDForDisplay(
2344 const OTString strSenderAcctID(
2346 str_other_acct_id = strSenderAcctID.Get();
2353 else if (pBoxTrans->GetRecipientUserIDForDisplay(
2355 const OTString strRecipientID(theRecipientID);
2356 const std::string str_recipient_id(
2357 strRecipientID.Get());
2372 str_recipient_id, &it_server)),
2375 if (strName.Exists())
2381 str_recipient_id.c_str());
2383 str_name = strNameTemp.Get();
2384 str_other_nym_id = str_recipient_id;
2385 if (pBoxTrans->GetRecipientAcctIDForDisplay(
2386 theRecipientAcctID)) {
2387 const OTString strRecipientAcctID(
2388 theRecipientAcctID);
2390 strRecipientAcctID.Get();
2396 std::string str_date =
2398 time64_t tDateSigned = pBoxTrans->GetDateSigned();
2401 tValidFrom = tDateSigned;
2402 const uint64_t lDateSigned =
2404 OTString strDateSigned;
2405 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
2406 str_date = strDateSigned.Get();
2408 const std::string* p_str_asset_type =
2409 &OTRecordList::s_blank;
2410 const std::string* p_str_asset_name =
2411 &OTRecordList::s_blank;
2412 const std::string* p_str_account =
2413 &OTRecordList::s_blank;
2414 std::string str_amount;
2415 std::string str_type;
2416 std::string str_memo;
2417 OTString strContents;
2419 if (pBoxTrans->IsAbbreviated()) {
2421 pBoxTrans->GetTypeString();
2423 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
2427 strTemp.Format(
"%" PRId64
"", lAmount);
2428 str_amount = strTemp.Get();
2438 std::unique_ptr<OTPayment> thePaymentAngel(pPayment);
2443 pBoxTrans->GetTypeString();
2446 pBoxTrans->GetAbbrevDisplayAmount();
2450 strTemp.Format(
"%" PRId64
"", lAmount);
2451 str_amount = strTemp.Get();
2456 else if (pPayment->SetTempValues()) {
2457 pPayment->GetValidFrom(tValidFrom);
2458 pPayment->GetValidTo(tValidTo);
2461 const uint64_t lFrom =
2464 strFrom.Format(
"%" PRIu64
"", lFrom);
2465 str_date = strFrom.Get();
2467 pPayment->GetPaymentContents(strContents);
2468 OTIdentifier theAccountID;
2472 if (pPayment->GetSenderAcctIDForDisplay(
2478 OTString strTemp(theAccountID);
2479 std::string str_outpmt_account =
2484 auto it_acct = std::find(
2485 m_accounts.begin(), m_accounts.end(),
2486 str_outpmt_account);
2492 p_str_account = &(*it_acct);
2503 <<
": Skipping 'sent payment' "
2504 "expired record. (We don't care "
2506 << str_outpmt_account.c_str()
2536 if (str_other_acct_id.empty() &&
2537 (pPayment->GetSenderAcctIDForDisplay(
2539 OTString strTemp(theAccountID);
2540 str_other_acct_id = strTemp.Get();
2550 OTIdentifier theAssetTypeID;
2552 if (pPayment->GetAssetTypeID(theAssetTypeID)) {
2553 OTString strTemp(theAssetTypeID);
2554 const std::string str_inpmt_asset(
2558 auto it_asset = m_assets.find(str_inpmt_asset);
2559 if (it_asset != m_assets.end())
2569 &(it_asset->second);
2582 <<
": Skipping: Expired payment record "
2583 "(we don't care about asset type "
2584 << str_inpmt_asset.c_str() <<
")\n";
2605 if (pPayment->GetMemo(strMemo)) {
2606 str_memo = strMemo.Get();
2610 static_cast<int32_t
>(pPayment->GetType());
2612 str_type = GetTypeString(nType);
2613 int64_t lAmount = 0;
2615 if (pPayment->GetAmount(lAmount)) {
2617 strTemp.Format(
"%" PRId64
"", lAmount);
2618 str_amount = strTemp.Get();
2622 otOut << __FUNCTION__ <<
": ADDED: Expired payment record "
2623 << (bOutgoing ?
"(sent)" :
"(received)")
2624 <<
" (str_type: " << str_type.c_str() <<
")\n";
2627 it_server, *p_str_asset_type, *p_str_asset_name,
2639 str_amount, str_type,
2647 if (strContents.Exists())
2648 sp_Record->SetContents(strContents.Get());
2649 sp_Record->SetDateRange(tValidFrom, tValidTo);
2650 sp_Record->SetExpired();
2651 sp_Record->SetBoxIndex(nIndex);
2652 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
2653 if (!str_other_nym_id.empty())
2654 sp_Record->SetOtherNymID(str_other_nym_id);
2655 if (!str_other_acct_id.empty())
2656 sp_Record->SetOtherAccountID(str_other_acct_id);
2657 sp_Record->SetTransNumForDisplay(
2658 pBoxTrans->GetReferenceNumForDisplay());
2659 sp_Record->SetTransactionNum(
2660 pBoxTrans->GetTransactionNum());
2662 m_contents.push_back(sp_Record);
2668 <<
": Failed loading expired payments box. "
2669 "(Probably just doesn't exist yet.)\n";
2676 otOut <<
"================ " << __FUNCTION__
2677 <<
": Looping through the accounts in the wallet...\n";
2678 int32_t nAccountIndex = -1;
2679 for (
auto& it_acct : m_accounts) {
2683 const std::string& str_account_id(it_acct);
2684 const OTIdentifier theAccountID(str_account_id);
2685 OTAccount* pAccount = pWallet->GetAccount(theAccountID);
2687 const OTIdentifier& theNymID = pAccount->GetUserID();
2688 const OTIdentifier& theServerID = pAccount->GetPurportedServerID();
2689 const OTIdentifier& theAssetID = pAccount->GetAssetTypeID();
2690 const OTString strNymID(theNymID);
2691 const OTString strServerID(theServerID);
2692 const OTString strAssetID(theAssetID);
2693 otOut <<
"------------\n" << __FUNCTION__
2694 <<
": Account: " << nAccountIndex
2695 <<
", ID: " << str_account_id.c_str() <<
"\n";
2696 const std::string str_nym_id(strNymID.Get());
2697 const std::string str_server_id(strServerID.Get());
2698 const std::string str_asset_id(strAssetID.Get());
2699 const std::string* pstr_nym_id = &OTRecordList::s_blank;
2700 const std::string* pstr_server_id = &OTRecordList::s_blank;
2701 const std::string* pstr_asset_id = &OTRecordList::s_blank;
2702 const std::string* pstr_asset_name = &OTRecordList::s_blank;
2715 auto it_nym = std::find(m_nyms.begin(), m_nyms.end(), str_nym_id);
2717 std::find(m_servers.begin(), m_servers.end(), str_server_id);
2718 auto it_asset = m_assets.find(str_asset_id);
2719 if ((m_nyms.end() == it_nym) || (m_servers.end() == it_server) ||
2720 (m_assets.end() == it_asset)) {
2721 otOut << __FUNCTION__ <<
": Skipping an account ("
2722 << str_account_id.c_str()
2723 <<
") since its Nym, or Server, "
2724 "or Asset Type wasn't on my list.\n";
2729 pstr_nym_id = &(*it_nym);
2730 pstr_server_id = &(*it_server);
2731 pstr_asset_id = &(it_asset->first);
2732 pstr_asset_name = &(it_asset->second);
2743 OTLedger* pInbox = m_bRunFast
2745 theServerID, theNymID, theAccountID)
2747 theServerID, theNymID, theAccountID);
2748 std::unique_ptr<OTLedger> theInboxAngel(pInbox);
2751 if (
nullptr != pInbox) {
2752 int32_t nInboxIndex = -1;
2753 for (
auto& it : pInbox->GetTransactionMap()) {
2755 if (0 == nInboxIndex)
2758 <<
": Beginning loop through asset account INBOX...\n";
2759 OTTransaction* pBoxTrans = it.second;
2761 otOut << __FUNCTION__ <<
": Inbox index: " << nInboxIndex
2763 bool bCanceled =
false;
2764 std::string str_name;
2766 std::string str_other_nym_id;
2767 std::string str_other_acct_id;
2768 std::string str_memo;
2770 if (!pBoxTrans->IsAbbreviated()) {
2773 if (pBoxTrans->GetMemo(strMemo)) str_memo = strMemo.Get();
2784 OTIdentifier theSenderID, theSenderAcctID;
2786 if (pBoxTrans->GetSenderAcctIDForDisplay(
2789 if (pBoxTrans->GetSenderUserIDForDisplay(
2791 const OTString strSenderID(theSenderID);
2792 str_other_nym_id = strSenderID.Get();
2794 const OTString strSenderAcctID(theSenderAcctID);
2795 const std::string str_sender_acct_id(
2796 strSenderAcctID.Get());
2798 str_other_acct_id = str_sender_acct_id;
2802 str_other_nym_id.empty()
2804 : &str_other_nym_id,
2809 if (strName.Exists()) {
2812 str_name = strNameTemp.Get();
2814 else if (!str_other_nym_id.empty()) {
2816 str_other_nym_id, &(*it_server))),
2819 if (strNymName.Exists()) {
2820 strNymNameTemp.Format(
2823 str_name = strNameTemp.Get();
2826 if (str_name.empty()) {
2828 str_sender_acct_id.c_str());
2829 str_name = strNameTemp.Get();
2832 else if (pBoxTrans->GetSenderUserIDForDisplay(
2835 const OTString strSenderID(theSenderID);
2836 const std::string str_sender_id(strSenderID.Get());
2839 str_sender_id, &(*it_server))),
2842 if (strName.Exists())
2847 str_sender_id.c_str());
2849 str_name = strNameTemp.Get();
2850 str_other_nym_id = str_sender_id;
2857 if (strName.Exists())
2858 strNameTemp = strName;
2860 strNameTemp = str_account_id;
2862 str_name = strNameTemp.Get();
2867 OTIdentifier theRecipientID, theRecipientAcctID;
2869 if (pBoxTrans->GetRecipientUserIDForDisplay(
2871 const OTString strRecipientID(theRecipientID);
2872 const std::string str_recipient_user_id(
2873 strRecipientID.Get());
2876 str_recipient_user_id, &(*it_server))),
2879 if (strName.Exists())
2885 str_recipient_user_id.c_str());
2887 str_name = strNameTemp.Get();
2888 str_other_nym_id = str_recipient_user_id;
2889 if (pBoxTrans->GetRecipientAcctIDForDisplay(
2890 theRecipientAcctID)) {
2891 const OTString strRecipientAcctID(
2892 theRecipientAcctID);
2893 str_other_acct_id = strRecipientAcctID.Get();
2896 else if (pBoxTrans->GetRecipientAcctIDForDisplay(
2897 theRecipientAcctID)) {
2898 const OTString strRecipientAcctID(
2899 theRecipientAcctID);
2900 const std::string str_recipient_acct_id(
2901 strRecipientAcctID.Get());
2904 str_recipient_acct_id,
2910 if (strName.Exists())
2916 str_recipient_acct_id.c_str());
2918 str_name = strNameTemp.Get();
2919 str_other_acct_id = str_recipient_acct_id;
2923 bCanceled = pBoxTrans->IsCancelled();
2925 std::string str_date =
2927 time64_t tDateSigned = pBoxTrans->GetDateSigned();
2930 tValidFrom = tDateSigned;
2931 const uint64_t lDateSigned =
2933 OTString strDateSigned;
2934 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
2935 str_date = strDateSigned.Get();
2937 std::string str_amount;
2938 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
2940 if (0 == lAmount) lAmount = pBoxTrans->GetReceiptAmount();
2943 strTemp.Format(
"%" PRId64
"", lAmount);
2944 str_amount = strTemp.Get();
2946 const std::string str_type(
2947 pBoxTrans->GetTypeString());
2948 otOut << __FUNCTION__ <<
": ADDED: incoming "
2950 ?
"pending transfer"
2951 :
"receipt") <<
" (str_type: " << str_type.c_str()
2955 *pstr_server_id, *pstr_asset_id, *pstr_asset_name,
2964 str_amount, str_type,
2965 (OTTransaction::pending ==
2966 pBoxTrans->GetType()),
2967 (lAmount < 0) ?
true :
false,
2976 (OTTransaction::pending !=
2977 pBoxTrans->GetType()),
2978 (OTTransaction::pending == pBoxTrans->GetType())
2981 const OTString strContents(*pBoxTrans);
2982 sp_Record->SetContents(strContents.Get());
2983 sp_Record->SetDateRange(tValidFrom, tValidTo);
2984 sp_Record->SetBoxIndex(nInboxIndex);
2985 if (bCanceled) sp_Record->SetCanceled();
2986 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
2987 if (!str_other_nym_id.empty())
2988 sp_Record->SetOtherNymID(str_other_nym_id);
2989 if (!str_other_acct_id.empty())
2990 sp_Record->SetOtherAccountID(str_other_acct_id);
2991 sp_Record->SetTransNumForDisplay(
2992 pBoxTrans->GetReferenceNumForDisplay());
2993 sp_Record->SetTransactionNum(pBoxTrans->GetTransactionNum());
2994 m_contents.push_back(sp_Record);
3005 OTLedger* pOutbox = m_bRunFast
3007 theServerID, theNymID, theAccountID)
3009 theServerID, theNymID, theAccountID);
3010 std::unique_ptr<OTLedger> theOutboxAngel(pOutbox);
3013 if (
nullptr != pOutbox) {
3014 int32_t nOutboxIndex = -1;
3015 for (
auto& it : pOutbox->GetTransactionMap()) {
3017 if (0 == nOutboxIndex)
3020 <<
": Beginning loop through asset account OUTBOX...\n";
3021 OTTransaction* pBoxTrans = it.second;
3023 otOut << __FUNCTION__ <<
": Outbox index: " << nOutboxIndex
3025 std::string str_name;
3027 std::string str_other_nym_id;
3028 std::string str_other_acct_id;
3029 std::string str_memo;
3031 if (!pBoxTrans->IsAbbreviated()) {
3032 OTIdentifier theRecipientID, theRecipientAcctID;
3034 if (pBoxTrans->GetRecipientUserIDForDisplay(
3036 const OTString strRecipientID(theRecipientID);
3037 const std::string str_recipient_id(
3038 strRecipientID.Get());
3040 OTString strName(m_pLookup->
GetNymName(str_recipient_id,
3044 if (strName.Exists())
3049 str_recipient_id.c_str());
3051 str_name = strNameTemp.Get();
3052 str_other_nym_id = str_recipient_id;
3053 if (pBoxTrans->GetRecipientAcctIDForDisplay(
3054 theRecipientAcctID)) {
3055 const OTString strRecipientAcctID(
3056 theRecipientAcctID);
3057 str_other_acct_id = strRecipientAcctID.Get();
3060 else if (pBoxTrans->GetRecipientAcctIDForDisplay(
3061 theRecipientAcctID)) {
3062 const OTString strRecipientAcctID(theRecipientAcctID);
3063 const std::string str_recipient_acct_id(
3064 strRecipientAcctID.Get());
3067 str_recipient_acct_id,
nullptr,
3072 if (strName.Exists())
3077 str_recipient_acct_id.c_str());
3079 str_name = strNameTemp.Get();
3080 str_other_acct_id = str_recipient_acct_id;
3082 if (OTTransaction::pending == pBoxTrans->GetType()) {
3085 if (pBoxTrans->GetMemo(strMemo))
3086 str_memo = strMemo.Get();
3099 std::string str_date =
3101 time64_t tDateSigned = pBoxTrans->GetDateSigned();
3104 tValidFrom = tDateSigned;
3105 const uint64_t lDateSigned =
3107 OTString strDateSigned;
3108 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
3109 str_date = strDateSigned.Get();
3111 std::string str_amount;
3112 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
3114 if (0 == lAmount) lAmount = pBoxTrans->GetReceiptAmount();
3120 strTemp.Format(
"%" PRId64
"", lAmount);
3121 str_amount = strTemp.Get();
3123 std::string str_type(
3124 pBoxTrans->GetTypeString());
3125 if (0 == str_type.compare(
"pending")) str_type =
"transfer";
3126 otOut << __FUNCTION__ <<
": ADDED: "
3127 << ((OTTransaction::pending == pBoxTrans->GetType())
3130 <<
" outgoing transfer (str_type: " << str_type.c_str()
3134 *pstr_server_id, *pstr_asset_id, *pstr_asset_name,
3143 str_amount, str_type,
3144 (OTTransaction::pending ==
3145 pBoxTrans->GetType()),
3151 const OTString strContents(*pBoxTrans);
3152 sp_Record->SetContents(strContents.Get());
3153 sp_Record->SetDateRange(tValidFrom, tValidTo);
3154 sp_Record->SetBoxIndex(nOutboxIndex);
3155 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
3156 if (!str_other_nym_id.empty())
3157 sp_Record->SetOtherNymID(str_other_nym_id);
3158 if (!str_other_acct_id.empty())
3159 sp_Record->SetOtherAccountID(str_other_acct_id);
3160 sp_Record->SetTransNumForDisplay(
3161 pBoxTrans->GetReferenceNumForDisplay());
3162 sp_Record->SetTransactionNum(pBoxTrans->GetTransactionNum());
3163 m_contents.push_back(sp_Record);
3177 OTLedger* pRecordbox = m_bRunFast
3179 theServerID, theNymID, theAccountID)
3181 theServerID, theNymID, theAccountID);
3182 std::unique_ptr<OTLedger> theRecordBoxAngel(pRecordbox);
3185 if (
nullptr != pRecordbox) {
3186 int32_t nRecordIndex = -1;
3187 for (
auto& it : pRecordbox->GetTransactionMap()) {
3189 OTTransaction* pBoxTrans = it.second;
3191 otOut << __FUNCTION__
3192 <<
": Account RECORD index: " << nRecordIndex <<
"\n";
3193 bool bOutgoing =
false;
3194 bool bCanceled =
false;
3195 std::string str_name;
3198 std::string str_other_nym_id;
3199 std::string str_other_acct_id;
3200 std::string str_memo;
3202 if (!pBoxTrans->IsAbbreviated()) {
3203 OTIdentifier theSenderID, theSenderAcctID;
3204 OTIdentifier theRecipientID, theRecipientAcctID;
3206 if (pBoxTrans->GetSenderAcctIDForDisplay(theSenderAcctID)) {
3207 const OTString strSenderAcctID(theSenderAcctID);
3208 const std::string str_sender_acct_id(
3209 strSenderAcctID.Get());
3221 str_account_id.compare(
3222 str_sender_acct_id))
3230 const bool bGotRecipientUserIDForDisplay =
3231 pBoxTrans->GetRecipientUserIDForDisplay(
3234 if (pBoxTrans->GetRecipientAcctIDForDisplay(
3235 theRecipientAcctID)) {
3236 const OTString strRecipientAcctID(
3237 theRecipientAcctID);
3238 const std::string str_recip_acct_id(
3239 strRecipientAcctID.Get());
3241 OTString strRecipientUserID(
"");
3242 std::string str_recip_user_id(
"");
3244 if (bGotRecipientUserIDForDisplay) {
3245 theRecipientID.GetString(
3246 strRecipientUserID);
3248 strRecipientUserID.Get();
3260 if (!pBoxTrans->IsCancelled()) {
3276 bGotRecipientUserIDForDisplay
3277 ? &str_recip_user_id
3283 if (strName.Exists())
3290 str_recip_acct_id.c_str());
3298 str_other_acct_id = str_recip_acct_id;
3300 if (bGotRecipientUserIDForDisplay) {
3301 const OTString strRecipientID(theRecipientID);
3302 const std::string str_recipient_id(
3303 strRecipientID.Get());
3305 str_other_nym_id = str_recipient_id;
3307 if (str_name.empty()) {
3309 str_recipient_id, &(*it_server))),
3312 if (strName.Exists())
3319 str_recipient_id.c_str());
3321 str_name = strNameTemp.Get();
3332 if (pBoxTrans->GetSenderUserIDForDisplay(
3334 const OTString strSenderUserID(theSenderID);
3335 str_other_nym_id = strSenderUserID.Get();
3339 str_other_nym_id.empty()
3341 : &str_other_nym_id,
3346 if (strName.Exists())
3351 str_sender_acct_id.c_str());
3353 str_name = strNameTemp.Get();
3354 str_other_acct_id = str_sender_acct_id;
3360 else if (pBoxTrans->GetRecipientAcctIDForDisplay(
3361 theRecipientAcctID)) {
3362 if (pBoxTrans->GetRecipientUserIDForDisplay(
3364 const OTString strRecipientID(theRecipientID);
3365 const std::string str_recipient_user_id(
3366 strRecipientID.Get());
3368 str_other_nym_id = str_recipient_user_id;
3370 const OTString strRecipientAcctID(theRecipientAcctID);
3371 const std::string str_recipient_acct_id(
3372 strRecipientAcctID.Get());
3375 str_account_id.compare(
3376 str_recipient_acct_id))
3387 str_recipient_acct_id,
3388 str_other_nym_id.empty()
3390 : &str_other_nym_id,
3395 if (strName.Exists())
3401 str_recipient_acct_id.c_str());
3403 str_name = strNameTemp.Get();
3404 str_other_acct_id = str_recipient_acct_id;
3407 else if (pBoxTrans->GetSenderUserIDForDisplay(
3409 const OTString strSenderID(theSenderID);
3410 const std::string str_sender_id(strSenderID.Get());
3422 str_nym_id.compare(str_sender_id))
3431 if (pBoxTrans->GetRecipientUserIDForDisplay(
3433 const OTString strRecipientID(theRecipientID);
3434 const std::string str_recipient_id(
3435 strRecipientID.Get());
3438 str_recipient_id, &(*it_server))),
3441 if (strName.Exists())
3447 str_recipient_id.c_str());
3449 str_name = strNameTemp.Get();
3450 str_other_nym_id = str_recipient_id;
3451 if (pBoxTrans->GetRecipientAcctIDForDisplay(
3452 theRecipientAcctID)) {
3453 const OTString strRecipientAcctID(
3454 theRecipientAcctID);
3456 strRecipientAcctID.Get();
3468 str_sender_id, &(*it_server))),
3471 if (strName.Exists())
3476 str_sender_id.c_str());
3478 str_name = strNameTemp.Get();
3479 str_other_nym_id = str_sender_id;
3480 if (pBoxTrans->GetSenderAcctIDForDisplay(
3482 const OTString strSenderAcctID(theSenderAcctID);
3483 str_other_acct_id = strSenderAcctID.Get();
3490 else if (pBoxTrans->GetRecipientUserIDForDisplay(
3492 const OTString strRecipientID(theRecipientID);
3493 const std::string str_recipient_id(
3494 strRecipientID.Get());
3497 str_nym_id.compare(str_recipient_id))
3509 str_recipient_id, &(*it_server))),
3512 if (strName.Exists())
3517 str_recipient_id.c_str());
3519 str_name = strNameTemp.Get();
3520 str_other_nym_id = str_recipient_id;
3521 if (pBoxTrans->GetRecipientAcctIDForDisplay(
3522 theRecipientAcctID)) {
3523 const OTString strRecipientAcctID(
3524 theRecipientAcctID);
3525 str_other_acct_id = strRecipientAcctID.Get();
3534 if (pBoxTrans->GetMemo(strMemo)) str_memo = strMemo.Get();
3537 bCanceled = pBoxTrans->IsCancelled();
3539 std::string str_date =
3541 time64_t tDateSigned = pBoxTrans->GetDateSigned();
3544 tValidFrom = tDateSigned;
3545 const uint64_t lDateSigned =
3547 OTString strDateSigned;
3548 strDateSigned.Format(
"%" PRIu64
"", lDateSigned);
3549 str_date = strDateSigned.Get();
3551 std::string str_amount;
3552 int64_t lAmount = pBoxTrans->GetAbbrevDisplayAmount();
3554 if (0 == lAmount) lAmount = pBoxTrans->GetReceiptAmount();
3555 const std::string str_type(
3556 pBoxTrans->GetTypeString());
3557 if (0 == str_type.compare(
"transferReceipt"))
3560 else if (0 == str_type.compare(
"pending"))
3580 strTemp.Format(
"%" PRId64
"", lAmount);
3581 str_amount = strTemp.Get();
3583 otOut << __FUNCTION__ <<
": ADDED: "
3586 : (bOutgoing ?
"sent" :
"received"))
3587 <<
" (asset account) record (str_type: "
3588 << str_type.c_str() <<
")\n";
3599 *pstr_server_id, *pstr_asset_id, *pstr_asset_name,
3609 str_amount, str_type,
3616 pBoxTrans->GetType() == OTTransaction::pending
3619 const OTString strContents(*pBoxTrans);
3620 sp_Record->SetContents(strContents.Get());
3621 if (bCanceled) sp_Record->SetCanceled();
3622 sp_Record->SetDateRange(tValidFrom, tValidTo);
3623 sp_Record->SetBoxIndex(nRecordIndex);
3624 if (!str_memo.empty()) sp_Record->SetMemo(str_memo);
3625 if (!str_other_nym_id.empty())
3626 sp_Record->SetOtherNymID(str_other_nym_id);
3627 if (!str_other_acct_id.empty())
3628 sp_Record->SetOtherAccountID(str_other_acct_id);
3629 sp_Record->SetTransNumForDisplay(
3630 pBoxTrans->GetReferenceNumForDisplay());
3631 sp_Record->SetTransactionNum(pBoxTrans->GetTransactionNum());
3632 m_contents.push_back(sp_Record);
static EXPORT std::string GetAccountWallet_Name(const std::string &ACCOUNT_ID)
EXPORT OTLedger * LoadRecordBox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
EXPORT OTLedger * LoadInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
static EXPORT std::string GetNym_OutmailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex)
EXPORT OTWallet * GetWallet(const char *szFuncName=nullptr) const
OTLOG_IMPORT OTLogStream otOut
EXPORT OTLedger * LoadOutbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
static EXPORT std::string GetNym_MailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex)
time64_t OTTimeGetTimeFromSeconds(int64_t seconds)
EXPORT OTLedger * LoadPaymentInbox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
virtual EXPORT std::string GetAcctName(const std::string &str_id, const std::string *p_nym_id=nullptr, const std::string *p_server_id=nullptr, const std::string *p_asset_id=nullptr) const
static EXPORT std::string GetNym_OutmailRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
EXPORT OTLedger * LoadPaymentInboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
static EXPORT int32_t GetNym_OutpaymentsCount(const std::string &NYM_ID)
EXPORT void ClearContents()
static EXPORT std::string GetNym_MailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
static EXPORT std::string GetNym_OutpaymentsRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
static EXPORT std::string GetNym_MailSenderIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
virtual EXPORT std::string GetNymName(const std::string &str_id, const std::string *p_server_id=nullptr) const
OTPayment * GetInstrument(const OTPseudonym &theNym, const int32_t &nIndex, OTLedger &ledger)
static EXPORT int32_t GetNym_OutmailCount(const std::string &NYM_ID)
static EXPORT std::string GetNym_OutpaymentsServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
OTLOG_IMPORT OTLogStream otWarn
OTLOG_IMPORT OTLogStream otErr
EXPORT OTLedger * LoadExpiredBox(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
static EXPORT const char * textFrom()
EXPORT OTLedger * LoadRecordBoxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
static EXPORT std::string GetNym_OutmailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex)
std::shared_ptr< OTRecord > shared_ptr_OTRecord
static EXPORT OT_API * OTAPI()
EXPORT OTLedger * LoadExpiredBoxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID) const
int64_t OTTimeGetSecondsFromTime(time64_t time)
static EXPORT std::string GetNym_OutpaymentsContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex)
EXPORT OTLedger * LoadInboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
static EXPORT int32_t GetNym_MailCount(const std::string &NYM_ID)
EXPORT OTLedger * LoadOutboxNoVerify(const OTIdentifier &SERVER_ID, const OTIdentifier &USER_ID, const OTIdentifier &ACCOUNT_ID) const
static EXPORT const char * textTo()
EXPORT bool PerformAutoAccept()
EXPORT void SortRecords()