133 #ifndef OPENTXS_CORE_OTPSEUDONYM_HPP
134 #define OPENTXS_CORE_OTPSEUDONYM_HPP
147 class OTAsymmetricKey;
154 class OTPasswordData;
155 class OTSubcredential;
173 bool m_bMarkForDeletion;
282 std::set<int64_t> m_setOpenCronItems;
288 std::set<std::string> m_setAccounts;
292 int64_t m_lUsageCredits;
321 const OTString* pstrSourceForNymID =
nullptr,
325 int32_t nBits = 1024,
338 bool bChangeNymID =
false);
350 int32_t nBits = 1024,
382 int32_t nIndex)
const;
441 return m_lUsageCredits;
445 m_lUsageCredits = lUsage;
449 m_bMarkForDeletion =
true;
453 return m_bMarkForDeletion;
457 m_bMarkForDeletion =
false;
464 return m_setOpenCronItems;
468 return m_setAccounts;
512 EXPORT
bool GenerateNym(int32_t nBits = 1024,
bool bCreateFile =
true,
513 std::string str_id_source =
"",
514 std::string str_alt_location =
"");
549 const char* szFuncName =
nullptr);
553 const OTString* pstrName =
nullptr,
const char* szFuncName =
nullptr,
568 char cKeyType =
'0')
const;
594 EXPORT
bool LoadNymfile(
const char* szFilename =
nullptr);
623 const OTString* pstrReason =
nullptr);
631 EXPORT
bool SavePseudonym(
const char* szFoldername,
const char* szFilename);
637 return (theIdentifier == m_nymID);
643 return m_strSourceForNymID;
647 return m_strAltLocation;
653 m_strSourceForNymID = strSource;
657 m_strAltLocation = strLocation;
687 const int64_t& lTransClawback,
688 bool bSave =
false,
OTPseudonym* pSIGNER_NYM =
nullptr);
700 int64_t lNewRequestNumber);
704 int64_t& lReqNum)
const;
709 int64_t& lHighestNum)
const;
715 std::set<int64_t>& setNumbers, std::set<int64_t>& setOutputGood,
716 std::set<int64_t>& setOutputBad,
722 return m_mapTransNum;
726 return m_mapIssuedNum;
730 return m_mapTentativeNum;
734 return m_mapAcknowledgedNum;
738 bool bRemoveHighestNum =
true);
795 const int64_t& lTransNum,
799 const int64_t& lTransNum,
bool bSave);
802 const int64_t& lRequestNum,
807 const int64_t& lTransNum)
const;
819 const int64_t& lTransNum)
const;
827 const int64_t& lTransNum)
const;
837 const int64_t& lRequestNum)
const;
858 int32_t nIndex)
const;
861 const int64_t& lTransNum);
865 const int64_t& lTransNum);
867 const int64_t& lTransNum);
874 int32_t nIndex)
const;
881 const int64_t& lTransNum);
887 const int64_t& lTransNum);
917 int32_t nIndex)
const;
920 const int64_t& lTransNum);
924 const int64_t& lTransNum);
926 const int64_t& lTransNum);
959 int32_t nIndex)
const;
962 const int64_t& lRequestNum);
966 const int64_t& lRequestNum);
968 const int64_t& lRequestNum);
978 const int64_t& lTransNum)
const;
983 const int64_t& lTransNum);
986 const int64_t& lTransNum);
996 int32_t nIndex)
const;
1053 int32_t nIndex)
const;
1056 bool bDeleteIt =
true);
1072 #endif // OPENTXS_CORE_OTPSEUDONYM_HPP
EXPORT int32_t GetIssuedNumCount(const OTIdentifier &theServerID) const
EXPORT bool SetPrivateKey(const OTString &strKey, bool bEscaped=true)
EXPORT void GetPublicCredentials(OTString &strCredList, OTString::Map *pmapCredFiles=nullptr) const
std::map< std::string, std::string > Map
EXPORT bool SetNymboxHash(const std::string &server_id, const OTIdentifier &theInput)
EXPORT bool VerifyIssuedNumbersOnNym(OTPseudonym &THE_NYM)
static EXPORT OTPseudonym * LoadPublicNym(const OTIdentifier &NYM_ID, const OTString *pstrName=nullptr, const char *szFuncName=nullptr)
EXPORT bool SetPublicKey(const OTString &strKey, bool bEscaped=true)
std::list< OTAsymmetricKey * > listOfAsymmetricKeys
EXPORT void HarvestTransactionNumbers(const OTIdentifier &theServerID, OTPseudonym &SIGNER_NYM, OTPseudonym &theOtherNym, bool bSave=true)
EXPORT const OTSubcredential * GetSubcredential(const OTString &strMasterID, const OTString &strSubCredID) const
static EXPORT bool DoesCertfileExist(const OTString &strNymID)
mapOfTransNums & GetMapTentativeNum()
EXPORT OTItem * GenerateTransactionStatement(const OTTransaction &theOwner)
EXPORT bool ClawbackTransactionNumber(const OTIdentifier &theServerID, const int64_t &lTransClawback, bool bSave=false, OTPseudonym *pSIGNER_NYM=nullptr)
EXPORT bool LoadFromString(const OTString &strNym, OTString::Map *pMapCredentials=nullptr, OTString *pstrReason=nullptr, const OTPassword *pImportPassword=nullptr)
EXPORT bool SetInboxHash(const std::string &acct_id, const OTIdentifier &theInput)
EXPORT void GetIdentifier(OTIdentifier &theIdentifier) const
mapOfTransNums & GetMapTransNum()
EXPORT OTCredential * GetMasterCredential(const OTString &strID)
EXPORT bool SavePublicKey(const OTString &strPath) const
EXPORT bool VerifyIssuedNum(const OTString &strServerID, const int64_t &lTransNum) const
EXPORT void AddOutmail(OTMessage &theMessage)
EXPORT bool GetNextTransactionNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, int64_t &lTransNum, bool bSave=true)
EXPORT bool VerifyTentativeNum(const OTString &strServerID, const int64_t &lTransNum) const
EXPORT bool SetCertificate(const OTString &strCert, bool bEscaped=true)
EXPORT bool RemoveOutmailByIndex(int32_t nIndex)
EXPORT bool SavePseudonymWallet(OTString &strOutput) const
EXPORT const OTAsymmetricKey & GetPublicEncrKey() const
EXPORT int64_t GetTransactionNum(const OTIdentifier &theServerID, int32_t nIndex) const
EXPORT bool GetInboxHash(const std::string &acct_id, OTIdentifier &theOutput) const
EXPORT void GetPrivateCredentials(OTString &strCredList, OTString::Map *pmapCredFiles=nullptr)
EXPORT bool Server_PubKeyExists(OTString *pstrID=nullptr)
std::map< std::string, OTIdentifier > mapOfIdentifiers
std::map< std::string, int64_t > mapOfRequestNums
EXPORT bool RemoveGenericNum(mapOfTransNums &THE_MAP, OTPseudonym &SIGNER_NYM, const OTString &strServerID, const int64_t &lTransNum)
void SetNymName(const OTString &strName)
EXPORT bool ReEncryptPrivateCredentials(bool bImporting, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
bool RemoveTentativeNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, const int64_t &lTransNum, bool bSave)
EXPORT void AddOutpayments(OTMessage &theMessage)
EXPORT bool GetRecentHash(const std::string &server_id, OTIdentifier &theOutput) const
EXPORT bool AddTentativeNum(const OTString &strServerID, const int64_t &lTransNum)
EXPORT bool AddNewSubkey(const OTIdentifier &idMasterCredential, int32_t nBits=1024, const OTString::Map *pmapPrivate=nullptr, const OTPasswordData *pPWData=nullptr, OTString *pstrNewID=nullptr)
EXPORT bool LoadSignedNymfile(OTPseudonym &SIGNER_NYM)
EXPORT void SerializeNymIDSource(OTString &strOutput) const
bool IsMarkedForDeletion() const
EXPORT void SetNymboxHashServerSide(const OTIdentifier &theInput)
EXPORT int32_t GetTransactionNumCount(const OTIdentifier &theServerID) const
std::map< std::string, int64_t > mapOfHighestNums
EXPORT const int64_t & GetUsageCredits() const
EXPORT void HarvestIssuedNumbers(const OTIdentifier &theServerID, OTPseudonym &SIGNER_NYM, OTPseudonym &theOtherNym, bool bSave=false)
EXPORT bool VerifyPseudonym() const
EXPORT int64_t GetGenericNum(const mapOfTransNums &THE_MAP, const OTIdentifier &theServerID, int32_t nIndex) const
std::map< std::string, dequeOfTransNums * > mapOfTransNums
EXPORT void SetIdentifier(const OTIdentifier &theIdentifier)
EXPORT int32_t GetMailCount() const
return the number of mail items available for this Nym.
EXPORT const OTCredential * GetRevokedCredentialByIndex(int32_t nIndex) const
EXPORT void ClearOutpayments()
EXPORT int32_t GetOutpaymentsCount() const
return the number of payments items available for this Nym.
EXPORT bool LoadPublicKey()
EXPORT bool Savex509CertAndPrivateKeyToString(OTString &strOutput, const OTString *pstrReason=nullptr)
EXPORT void ClearOutmail()
EXPORT bool GetHighestNum(const OTString &strServerID, int64_t &lHighestNum) const
EXPORT int32_t GetTentativeNumCount(const OTIdentifier &theServerID) const
EXPORT bool RemoveTransactionNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, const int64_t &lTransNum)
EXPORT bool VerifyTransactionStatementNumbersOnNym(OTPseudonym &THE_NYM)
EXPORT bool GenerateNym(int32_t nBits=1024, bool bCreateFile=true, std::string str_id_source="", std::string str_alt_location="")
EXPORT bool Loadx509CertAndPrivateKey(bool bChecking=false, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
EXPORT void SaveCredentialListToString(OTString &strOutput)
EXPORT bool AddTransactionNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, int64_t lTransNum, bool bSave)
EXPORT void SaveCredentialsToString(OTString &strOutput, OTString::Map *pmapPubInfo=nullptr, OTString::Map *pmapPriInfo=nullptr)
EXPORT int64_t GetTentativeNum(const OTIdentifier &theServerID, int32_t nIndex) const
EXPORT const OTAsymmetricKey & GetPublicAuthKey() const
EXPORT bool SetIdentifierByPubkey()
EXPORT bool GetCurrentRequestNum(const OTString &strServerID, int64_t &lReqNum) const
EXPORT int64_t UpdateHighestNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, std::set< int64_t > &setNumbers, std::set< int64_t > &setOutputGood, std::set< int64_t > &setOutputBad, bool bSave=false)
EXPORT bool RemoveIssuedNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, const int64_t &lTransNum, bool bSave)
EXPORT void SetUsageCredits(const int64_t &lUsage)
EXPORT int32_t GetPublicKeysBySignature(listOfAsymmetricKeys &listOutput, const OTSignature &theSignature, char cKeyType= '0') const
std::deque< int64_t > dequeOfTransNums
EXPORT bool VerifyGenericNum(const mapOfTransNums &THE_MAP, const OTString &strServerID, const int64_t &lTransNum) const
const OTAsymmetricKey & GetPrivateAuthKey() const
EXPORT void SetNymIDSource(const OTString &strSource)
const OTAsymmetricKey & GetPrivateEncrKey() const
EXPORT int32_t GetOutmailCount() const
return the number of mail items available for this Nym.
EXPORT OTMessage * GetOutmailByIndex(int32_t nIndex) const
EXPORT void ReleaseTransactionNumbers()
EXPORT bool AddNewSubcredential(const OTIdentifier &idMasterCredential, const OTString::Map *pmapPrivate=nullptr, const OTString::Map *pmapPublic=nullptr, const OTPasswordData *pPWData=nullptr)
EXPORT bool RemoveMailByIndex(int32_t nIndex)
EXPORT bool SetOutboxHash(const std::string &acct_id, const OTIdentifier &theInput)
EXPORT bool HasPublicKey()
EXPORT bool AddAcknowledgedNum(const OTString &strServerID, const int64_t &lRequestNum)
EXPORT bool RemoveAcknowledgedNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, const int64_t &lRequestNum, bool bSave)
EXPORT void SetAltLocation(const OTString &strLocation)
mapOfTransNums & GetMapIssuedNum()
EXPORT bool CompareID(const OTIdentifier &theIdentifier) const
static EXPORT OTPseudonym * LoadPrivateNym(const OTIdentifier &NYM_ID, bool bChecking=false, const OTString *pstrName=nullptr, const char *szFuncName=nullptr, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
EXPORT bool IsRegisteredAtServer(const OTString &strServerID) const
EXPORT const OTString & GetAltLocation() const
EXPORT bool AddGenericNum(mapOfTransNums &THE_MAP, const OTString &strServerID, int64_t lTransNum)
std::list< std::string > List
EXPORT OTCredential * GetRevokedCredential(const OTString &strID)
EXPORT bool SetRecentHash(const std::string &server_id, const OTIdentifier &theInput)
virtual EXPORT ~OTPseudonym()
EXPORT const OTAsymmetricKey & GetPublicSignKey() const
EXPORT bool GetNymboxHash(const std::string &server_id, OTIdentifier &theOutput) const
EXPORT bool Loadx509CertAndPrivateKeyFromString(const OTString &strInput, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
EXPORT bool GetOutboxHash(const std::string &acct_id, OTIdentifier &theOutput) const
EXPORT bool HasPrivateKey()
EXPORT int32_t GetGenericNumCount(const mapOfTransNums &THE_MAP, const OTIdentifier &theServerID) const
EXPORT bool SavePseudonym()
EXPORT int32_t GetAcknowledgedNumCount(const OTIdentifier &theServerID) const
EXPORT void DisplayStatistics(OTString &strOutput)
std::deque< OTMessage * > dequeOfMail
EXPORT void OnUpdateRequestNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID, int64_t lNewRequestNumber)
EXPORT const OTCredential * GetMasterCredentialByIndex(int32_t nIndex) const
EXPORT bool GetNymboxHashServerSide(const OTIdentifier &theServerID, OTIdentifier &theOutput)
EXPORT size_t GetRevokedCredentialCount() const
EXPORT const OTIdentifier & GetConstID() const
EXPORT bool RemoveOutpaymentsByIndex(int32_t nIndex, bool bDeleteIt=true)
EXPORT void RemoveReqNumbers(const OTString *pstrServerID=nullptr)
EXPORT void AddMail(OTMessage &theMessage)
EXPORT const OTString & GetNymIDSource() const
mapOfTransNums & GetMapAcknowledgedNum()
EXPORT bool SaveCredentialList()
std::set< int64_t > & GetSetOpenCronItems()
EXPORT bool ResyncWithServer(const OTLedger &theNymbox, const OTPseudonym &theMessageNym)
EXPORT int64_t GetAcknowledgedNum(const OTIdentifier &theServerID, int32_t nIndex) const
const OTAsymmetricKey & GetPrivateSignKey() const
EXPORT bool CertfileExists()
EXPORT void RemoveAllNumbers(const OTString *pstrServerID=nullptr, bool bRemoveHighestNum=true)
EXPORT bool LoadCredentials(bool bLoadPrivate=false, const OTPasswordData *pPWData=nullptr, const OTPassword *pImportPassword=nullptr)
EXPORT int64_t GetIssuedNum(const OTIdentifier &theServerID, int32_t nIndex) const
EXPORT const OTSubcredential * GetRevokedSubcred(const OTString &strRevokedID, const OTString &strSubCredID) const
EXPORT bool Savex509CertAndPrivateKey(bool bCreateFile=true, const OTString *pstrReason=nullptr)
EXPORT OTMessage * GetOutpaymentsByIndex(int32_t nIndex) const
EXPORT size_t GetMasterCredentialCount() const
std::map< std::string, OTCredential * > mapOfCredentials
EXPORT bool AddIssuedNum(const OTString &strServerID, const int64_t &lTransNum)
EXPORT bool AddNewMasterCredential(OTString &strOutputMasterCredID, const OTString *pstrSourceForNymID=nullptr, int32_t nBits=1024, const OTString::Map *pmapPrivate=nullptr, const OTString::Map *pmapPublic=nullptr, const OTPasswordData *pPWData=nullptr, bool bChangeNymID=false)
std::set< std::string > & GetSetAssetAccounts()
EXPORT bool VerifyAcknowledgedNum(const OTString &strServerID, const int64_t &lRequestNum) const
EXPORT bool UnRegisterAtServer(const OTString &strServerID)
EXPORT OTMessage * GetMailByIndex(int32_t nIndex) const
EXPORT bool VerifyTransactionNum(const OTString &strServerID, const int64_t &lTransNum) const
EXPORT bool SaveSignedNymfile(OTPseudonym &SIGNER_NYM)
EXPORT bool LoadNymfile(const char *szFilename=nullptr)
EXPORT void IncrementRequestNum(OTPseudonym &SIGNER_NYM, const OTString &strServerID)