Skip to content

Commit

Permalink
Rename create_pseudonym to create_nym
Browse files Browse the repository at this point in the history
First step of issue #200

Beware: changes method names in public API
  • Loading branch information
OttoAllmendinger committed Oct 1, 2014
1 parent 85e265e commit d6f687f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 26 deletions.
6 changes: 3 additions & 3 deletions include/opentxs/client/OT_ME.hpp
Expand Up @@ -208,9 +208,9 @@ class OT_ME
const std::string& NYM_ID,
const std::string& TARGET_NYM_ID) const;

EXPORT std::string create_pseudonym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const;
EXPORT std::string create_nym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const;

EXPORT std::string issue_asset_type(const std::string& SERVER_ID,
const std::string& NYM_ID,
Expand Down
8 changes: 4 additions & 4 deletions src/client/OTMeCpp.cpp
Expand Up @@ -168,11 +168,11 @@ std::string OTMeCpp::check_user(const std::string& SERVER_ID,
return MadeEasy::check_user(SERVER_ID, NYM_ID, TARGET_NYM_ID);
}

std::string OTMeCpp::create_pseudonym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const
std::string OTMeCpp::create_nym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const
{
return MadeEasy::create_pseudonym(nKeybits, NYM_ID_SOURCE, ALT_LOCATION);
return MadeEasy::create_nym(nKeybits, NYM_ID_SOURCE, ALT_LOCATION);
}

std::string OTMeCpp::issue_asset_type(const std::string& SERVER_ID,
Expand Down
5 changes: 2 additions & 3 deletions src/client/OTMeCpp.hpp
Expand Up @@ -155,9 +155,8 @@ class OTMeCpp
const std::string& NYM_ID,
const std::string& TARGET_NYM_ID) const;

std::string create_pseudonym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const;
std::string create_nym(int32_t nKeybits, const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const;

std::string issue_asset_type(const std::string& SERVER_ID,
const std::string& NYM_ID,
Expand Down
11 changes: 5 additions & 6 deletions src/client/OT_ME.cpp
Expand Up @@ -404,15 +404,14 @@ std::string OT_ME::check_user(const std::string& SERVER_ID,
return m_pImplementation->check_user(SERVER_ID, NYM_ID, TARGET_NYM_ID);
}

// CREATE NYM (pseudonym)
// CREATE NYM
// returns new Nym ID
//
std::string OT_ME::create_pseudonym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const
std::string OT_ME::create_nym(int32_t nKeybits,
const std::string& NYM_ID_SOURCE,
const std::string& ALT_LOCATION) const
{
return m_pImplementation->create_pseudonym(nKeybits, NYM_ID_SOURCE,
ALT_LOCATION);
return m_pImplementation->create_nym(nKeybits, NYM_ID_SOURCE, ALT_LOCATION);
}

// ISSUE ASSET TYPE
Expand Down
10 changes: 5 additions & 5 deletions src/client/ot_commands_ot.cpp
Expand Up @@ -2390,7 +2390,7 @@ OT_COMMANDS_OT int32_t
cout << "------------------------------"
"------------------------------"
"------\n";
cout << " ** PSEUDONYMS (filtered by "
cout << " ** NYMS (filtered by "
"serverID: " << strServerID
<< "): \n\n";

Expand Down Expand Up @@ -5297,7 +5297,7 @@ OT_COMMANDS_OT int32_t OT_Command::mainShowNyms()
{
cout << "------------------------------------------------------------------"
"\n";
cout << " ** PSEUDONYMS: \n\n";
cout << " ** NYMS: \n\n";

int32_t nNymCount = OTAPI_Wrap::GetNymCount();

Expand Down Expand Up @@ -5494,7 +5494,7 @@ OT_COMMANDS_OT int32_t OT_Command::mainShowMint()
return -1;
}

// Creates a new Pseudonym and adds it to the wallet.
// Creates a new Nym and adds it to the wallet.
// (And sets the display name for the new Nym, in the wallet.)
// Prints the new NymID to stdout.
//
Expand All @@ -5506,11 +5506,11 @@ OT_COMMANDS_OT int32_t
const string& strAltLocation)
{
string strNymID =
MadeEasy::create_pseudonym(nKeybits, strSourceForNymID, strAltLocation);
MadeEasy::create_nym(nKeybits, strSourceForNymID, strAltLocation);

if (!VerifyStringVal(strNymID)) {
otOut << "details_create_nym: Failed in "
"OT_ME::create_pseudonym(keybits == " << nKeybits << ")\n";
"OT_ME::create_nym(keybits == " << nKeybits << ")\n";
return -1;
}
otOut << "Success creating! " << nKeybits << " keybits, new ID: ";
Expand Down
8 changes: 4 additions & 4 deletions src/client/ot_made_easy_ot.cpp
Expand Up @@ -271,11 +271,11 @@ OT_MADE_EASY_OT string MadeEasy::check_user(const string& SERVER_ID,
// CREATE NYM (pseudonym)
// returns new Nym ID
//
OT_MADE_EASY_OT string MadeEasy::create_pseudonym(int32_t nKeybits,
const string& strNymIDSource,
const string& strAltLocation)
OT_MADE_EASY_OT string MadeEasy::create_nym(int32_t nKeybits,
const string& strNymIDSource,
const string& strAltLocation)
{
string strLocation = "OT_ME_create_pseudonym";
string strLocation = "OT_ME_create_nym";

string strNymID = OTAPI_Wrap::CreateNym(
nKeybits, strNymIDSource, strAltLocation); // returns new Nym ID;
Expand Down
2 changes: 1 addition & 1 deletion src/client/ot_made_easy_ot.hpp
Expand Up @@ -176,7 +176,7 @@ class MadeEasy
const std::string& quantity, const std::string& price, bool bSelling,
const std::string& strLifespanInSeconds, const std::string& strStopSign,
const std::string& strActivationPrice);
EXPORT OT_MADE_EASY_OT static std::string create_pseudonym(
EXPORT OT_MADE_EASY_OT static std::string create_nym(
int32_t nKeybits, const std::string& strNymIDSource,
const std::string& strAltLocation);
EXPORT OT_MADE_EASY_OT static std::string deposit_cheque(
Expand Down

0 comments on commit d6f687f

Please sign in to comment.