Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opentxs::OTAPI_Wrap Class Reference

#include <OTAPI.hpp>

Static Public Member Functions

static EXPORT OTAPI_ExecSetExecutor (OTAPI_Exec *exec)
 
static EXPORT OTAPI_ExecExec ()
 
static EXPORT OTAPI_ExecIt ()
 
static EXPORT OT_APIOTAPI ()
 
static EXPORT int64_t StringToLong (const std::string &strNumber)
 
static EXPORT std::string LongToString (const int64_t &lNumber)
 
static EXPORT uint64_t StringToUlong (const std::string &strNumber)
 
static EXPORT std::string UlongToString (const uint64_t &lNumber)
 
static EXPORT bool AppInit ()
 
static EXPORT bool AppCleanup ()
 
static EXPORT void SetAppBinaryFolder (const std::string &strFolder)
 
static EXPORT void SetHomeFolder (const std::string &strFolder)
 
static EXPORT bool SetWallet (const std::string &strWalletFilename)
 
static EXPORT bool WalletExists ()
 
static EXPORT bool LoadWallet ()
 
static EXPORT bool SwitchWallet ()
 
static EXPORT void Output (const int32_t &nLogLevel, const std::string &strOutput)
 
static EXPORT time64_t GetTime ()
 
static EXPORT std::string NumList_Add (const std::string &strNumList, const std::string &strNumbers)
 
static EXPORT std::string NumList_Remove (const std::string &strNumList, const std::string &strNumbers)
 
static EXPORT bool NumList_VerifyQuery (const std::string &strNumList, const std::string &strNumbers)
 
static EXPORT bool NumList_VerifyAll (const std::string &strNumList, const std::string &strNumbers)
 
static EXPORT int32_t NumList_Count (const std::string &strNumList)
 
static EXPORT std::string Encode (const std::string &strPlaintext, const bool &bLineBreaks)
 
static EXPORT std::string Decode (const std::string &strEncoded, const bool &bLineBreaks)
 
static EXPORT std::string Encrypt (const std::string &RECIPIENT_NYM_ID, const std::string &strPlaintext)
 
static EXPORT std::string Decrypt (const std::string &RECIPIENT_NYM_ID, const std::string &strCiphertext)
 
static EXPORT std::string CreateSymmetricKey ()
 
static EXPORT std::string SymmetricEncrypt (const std::string &SYMMETRIC_KEY, const std::string &PLAINTEXT)
 
static EXPORT std::string SymmetricDecrypt (const std::string &SYMMETRIC_KEY, const std::string &CIPHERTEXT_ENVELOPE)
 
static EXPORT std::string SignContract (const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT)
 
static EXPORT std::string FlatSign (const std::string &SIGNER_NYM_ID, const std::string &THE_INPUT, const std::string &CONTRACT_TYPE)
 
static EXPORT std::string AddSignature (const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT)
 
static EXPORT bool VerifySignature (const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT)
 
static EXPORT std::string VerifyAndRetrieveXMLContents (const std::string &THE_CONTRACT, const std::string &SIGNER_ID)
 
static EXPORT int32_t GetMemlogSize ()
 
static EXPORT std::string GetMemlogAtIndex (const int32_t &nIndex)
 
static EXPORT std::string PeekMemlogFront ()
 
static EXPORT std::string PeekMemlogBack ()
 
static EXPORT bool PopMemlogFront ()
 
static EXPORT bool PopMemlogBack ()
 
static EXPORT std::string CreateNym (const int32_t &nKeySize, const std::string &NYM_ID_SOURCE, const std::string &ALT_LOCATION)
 
static EXPORT std::string GetNym_ActiveCronItemIDs (const std::string &NYM_ID, const std::string &SERVER_ID)
 
static EXPORT std::string GetActiveCronItem (const std::string &SERVER_ID, int64_t lTransNum)
 
static EXPORT std::string GetNym_SourceForID (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_AltSourceLocation (const std::string &NYM_ID)
 
static EXPORT int32_t GetNym_CredentialCount (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_CredentialID (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_CredentialContents (const std::string &NYM_ID, const std::string &CREDENTIAL_ID)
 
static EXPORT int32_t GetNym_RevokedCredCount (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_RevokedCredID (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_RevokedCredContents (const std::string &NYM_ID, const std::string &CREDENTIAL_ID)
 
static EXPORT int32_t GetNym_SubcredentialCount (const std::string &NYM_ID, const std::string &MASTER_CRED_ID)
 
static EXPORT std::string GetNym_SubCredentialID (const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_SubCredentialContents (const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const std::string &SUB_CRED_ID)
 
static EXPORT std::string AddSubcredential (const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const int32_t &nKeySize)
 
static EXPORT bool RevokeSubcredential (const std::string &NYM_ID, const std::string &MASTER_CRED_ID, const std::string &SUB_CRED_ID)
 
static EXPORT std::string CreateServerContract (const std::string &NYM_ID, const std::string &strXMLcontents)
 
static EXPORT std::string CreateAssetContract (const std::string &NYM_ID, const std::string &strXMLcontents)
 
static EXPORT std::string CalculateAssetContractID (const std::string &str_Contract)
 
static EXPORT std::string CalculateServerContractID (const std::string &str_Contract)
 
static EXPORT int32_t AddServerContract (const std::string &strContract)
 
static EXPORT int32_t AddAssetContract (const std::string &strContract)
 
static EXPORT int32_t GetServerCount ()
 
static EXPORT int32_t GetAssetTypeCount ()
 
static EXPORT int32_t GetAccountCount ()
 
static EXPORT int32_t GetNymCount ()
 
static EXPORT std::string GetServer_ID (const int32_t &nIndex)
 
static EXPORT std::string GetServer_Name (const std::string &SERVER_ID)
 
static EXPORT std::string GetServer_Contract (const std::string &SERVER_ID)
 
static EXPORT std::string FormatAmount (const std::string &ASSET_TYPE_ID, const int64_t &THE_AMOUNT)
 
static EXPORT int64_t StringToAmount (const std::string &ASSET_TYPE_ID, const std::string &str_input)
 
static EXPORT std::string GetAssetType_ID (const int32_t &nIndex)
 
static EXPORT std::string GetAssetType_Name (const std::string &ASSET_TYPE_ID)
 
static EXPORT std::string GetAssetType_TLA (const std::string &ASSET_TYPE_ID)
 
static EXPORT std::string GetAssetType_Contract (const std::string &ASSET_TYPE_ID)
 
static EXPORT std::string GetAccountWallet_ID (const int32_t &nIndex)
 
static EXPORT std::string GetAccountWallet_Name (const std::string &ACCOUNT_ID)
 
static EXPORT int64_t GetAccountWallet_Balance (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_Type (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_AssetTypeID (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_ServerID (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_NymID (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_InboxHash (const std::string &ACCOUNT_ID)
 
static EXPORT std::string GetAccountWallet_OutboxHash (const std::string &ACCOUNT_ID)
 
static EXPORT bool VerifyAccountReceipt (const std::string &SERVER_ID, const std::string &NYM_ID, const std::string &ACCT_ID)
 
static EXPORT int32_t GetNym_TransactionNumCount (const std::string &SERVER_ID, const std::string &NYM_ID)
 
static EXPORT std::string GetNym_ID (const int32_t &nIndex)
 
static EXPORT std::string GetNym_Name (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_Stats (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_NymboxHash (const std::string &SERVER_ID, const std::string &NYM_ID)
 
static EXPORT std::string GetNym_RecentHash (const std::string &SERVER_ID, const std::string &NYM_ID)
 
static EXPORT std::string GetNym_InboxHash (const std::string &ACCOUNT_ID, const std::string &NYM_ID)
 
static EXPORT std::string GetNym_OutboxHash (const std::string &ACCOUNT_ID, const std::string &NYM_ID)
 
static EXPORT bool IsNym_RegisteredAtServer (const std::string &NYM_ID, const std::string &SERVER_ID)
 
static EXPORT int32_t GetNym_MailCount (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_MailContentsByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_MailSenderIDByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_MailServerIDByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_RemoveMailByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_VerifyMailByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT int32_t GetNym_OutmailCount (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_OutmailContentsByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_OutmailRecipientIDByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT std::string GetNym_OutmailServerIDByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_RemoveOutmailByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_VerifyOutmailByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT int32_t GetNym_OutpaymentsCount (const std::string &NYM_ID)
 
static EXPORT std::string GetNym_OutpaymentsContentsByIndex (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_OutpaymentsServerIDByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_RemoveOutpaymentsByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Nym_VerifyOutpaymentsByIndex (const std::string &NYM_ID, const int32_t &nIndex)
 
static EXPORT bool Wallet_CanRemoveServer (const std::string &SERVER_ID)
 
static EXPORT bool Wallet_RemoveServer (const std::string &SERVER_ID)
 
static EXPORT bool Wallet_CanRemoveAssetType (const std::string &ASSET_ID)
 
static EXPORT bool Wallet_RemoveAssetType (const std::string &ASSET_ID)
 
static EXPORT bool Wallet_CanRemoveNym (const std::string &NYM_ID)
 
static EXPORT bool Wallet_RemoveNym (const std::string &NYM_ID)
 
static EXPORT bool Wallet_CanRemoveAccount (const std::string &ACCOUNT_ID)
 
static EXPORT bool Wallet_ChangePassphrase ()
 
static EXPORT std::string Wallet_ExportNym (const std::string &NYM_ID)
 Returns the exported Nym, if success. (Else nullptr.) More...
 
static EXPORT std::string Wallet_ImportNym (const std::string &FILE_CONTENTS)
 returns NymID if success, else nullptr. More...
 
static EXPORT std::string Wallet_ImportCert (const std::string &DISPLAY_NAME, const std::string &FILE_CONTENTS)
 Returns the imported cert's NymID, if successful. Else nullptr. More...
 
static EXPORT std::string Wallet_ExportCert (const std::string &NYM_ID)
 Returns the exported cert, if successful. Else nullptr. More...
 
static EXPORT std::string Wallet_GetNymIDFromPartial (const std::string &PARTIAL_ID)
 Attempts to find a full ID in the wallet, based on a partial of the same. More...
 
static EXPORT std::string Wallet_GetServerIDFromPartial (const std::string &PARTIAL_ID)
 
static EXPORT std::string Wallet_GetAssetIDFromPartial (const std::string &PARTIAL_ID)
 
static EXPORT std::string Wallet_GetAccountIDFromPartial (const std::string &PARTIAL_ID)
 
static EXPORT bool SetNym_Name (const std::string &NYM_ID, const std::string &SIGNER_NYM_ID, const std::string &NYM_NEW_NAME)
 
static EXPORT bool SetAccountWallet_Name (const std::string &ACCT_ID, const std::string &SIGNER_NYM_ID, const std::string &ACCT_NEW_NAME)
 
static EXPORT bool SetAssetType_Name (const std::string &ASSET_ID, const std::string &STR_NEW_NAME)
 
static EXPORT bool SetServer_Name (const std::string &SERVER_ID, const std::string &STR_NEW_NAME)
 
static 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)
 
static EXPORT bool DiscardCheque (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_CHEQUE)
 
static 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)
 
static 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)
 
static 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)
 
static EXPORT std::string Create_SmartContract (const std::string &SIGNER_NYM_ID, const time64_t &VALID_FROM, const time64_t &VALID_TO)
 
static EXPORT std::string SmartContract_AddBylaw (const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static EXPORT int32_t SmartContract_CountNumsNeeded (const std::string &THE_CONTRACT, const std::string &AGENT_NAME)
 
static 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)
 
static EXPORT std::string SmartContract_ConfirmParty (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &NYM_ID)
 
static EXPORT bool Smart_AreAllPartiesConfirmed (const std::string &THE_CONTRACT)
 
static EXPORT int32_t Smart_GetBylawCount (const std::string &THE_CONTRACT)
 
static EXPORT std::string Smart_GetBylawByIndex (const std::string &THE_CONTRACT, const int32_t &nIndex)
 
static EXPORT std::string Bylaw_GetLanguage (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME)
 
static EXPORT int32_t Bylaw_GetClauseCount (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME)
 
static EXPORT std::string Clause_GetNameByIndex (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex)
 
static EXPORT std::string Clause_GetContents (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CLAUSE_NAME)
 
static EXPORT int32_t Bylaw_GetVariableCount (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME)
 
static EXPORT std::string Variable_GetNameByIndex (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex)
 
static EXPORT std::string Variable_GetType (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME)
 
static EXPORT std::string Variable_GetAccess (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME)
 
static EXPORT std::string Variable_GetContents (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME)
 
static EXPORT int32_t Bylaw_GetHookCount (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME)
 
static EXPORT std::string Hook_GetNameByIndex (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex)
 
static EXPORT int32_t Hook_GetClauseCount (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &HOOK_NAME)
 
static EXPORT std::string Hook_GetClauseAtIndex (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &HOOK_NAME, const int32_t &nIndex)
 
static EXPORT int32_t Bylaw_GetCallbackCount (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME)
 
static EXPORT std::string Callback_GetNameByIndex (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex)
 
static EXPORT std::string Callback_GetClause (const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CALLBACK_NAME)
 
static EXPORT int32_t Smart_GetPartyCount (const std::string &THE_CONTRACT)
 
static EXPORT std::string Smart_GetPartyByIndex (const std::string &THE_CONTRACT, const int32_t &nIndex)
 
static EXPORT bool Smart_IsPartyConfirmed (const std::string &THE_CONTRACT, const std::string &PARTY_NAME)
 
static EXPORT std::string Party_GetID (const std::string &THE_CONTRACT, const std::string &PARTY_NAME)
 
static EXPORT int32_t Party_GetAcctCount (const std::string &THE_CONTRACT, const std::string &PARTY_NAME)
 
static EXPORT std::string Party_GetAcctNameByIndex (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex)
 
static EXPORT std::string Party_GetAcctID (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME)
 
static EXPORT std::string Party_GetAcctAssetID (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME)
 
static EXPORT std::string Party_GetAcctAgentName (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME)
 
static EXPORT int32_t Party_GetAgentCount (const std::string &THE_CONTRACT, const std::string &PARTY_NAME)
 
static EXPORT std::string Party_GetAgentNameByIndex (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex)
 
static EXPORT std::string Party_GetAgentID (const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &AGENT_NAME)
 
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 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)
 
static 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)
 
static EXPORT std::string LoadUserPubkey_Encryption (const std::string &USER_ID)
 
static EXPORT std::string LoadUserPubkey_Signing (const std::string &USER_ID)
 
static EXPORT std::string LoadPubkey_Encryption (const std::string &USER_ID)
 
static EXPORT std::string LoadPubkey_Signing (const std::string &USER_ID)
 
static EXPORT bool VerifyUserPrivateKey (const std::string &USER_ID)
 
static EXPORT std::string LoadPurse (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadMint (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID)
 
static EXPORT std::string LoadAssetContract (const std::string &ASSET_TYPE_ID)
 
static EXPORT std::string LoadServerContract (const std::string &SERVER_ID)
 
static EXPORT bool Mint_IsStillGood (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID)
 
static EXPORT bool IsBasketCurrency (const std::string &ASSET_TYPE_ID)
 
static EXPORT int32_t Basket_GetMemberCount (const std::string &BASKET_ASSET_TYPE_ID)
 
static EXPORT std::string Basket_GetMemberType (const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex)
 
static EXPORT int64_t Basket_GetMinimumTransferAmount (const std::string &BASKET_ASSET_TYPE_ID)
 
static EXPORT int64_t Basket_GetMemberMinimumTransferAmount (const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex)
 
static EXPORT std::string LoadAssetAccount (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
static EXPORT std::string LoadInbox (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
static EXPORT std::string LoadOutbox (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
static EXPORT std::string LoadInboxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 These versions don't verify the ledger, they just load it up. More...
 
static EXPORT std::string LoadOutboxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
static EXPORT std::string LoadPaymentInbox (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadPaymentInboxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadRecordBox (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 NOTE: Sometimes the user ID is also passed in the "account ID" field,. More...
 
static EXPORT std::string LoadRecordBoxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
static 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)
 
static EXPORT std::string LoadExpiredBox (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadExpiredBoxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT bool ClearExpired (const std::string &SERVER_ID, const std::string &USER_ID, const int32_t &nIndex, const bool &bClearAll)
 
static 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)
 Find out how many pending transactions (and receipts) are in this inbox. More...
 
static 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)
 Creates a new 'response' ledger, set up with the right Server ID, etc,. More...
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 Add a transaction to a ledger. More...
 
static 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)
 
static 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)
 
static 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)
 
static EXPORT bool RecordPayment (const std::string &SERVER_ID, const std::string &USER_ID, const bool &bIsInbox, const int32_t &nIndex, const bool &bSaveCopy)
 
static 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)
 Get Transaction Type (internally uses GetTransactionTypeString().) More...
 
static EXPORT int64_t ReplyNotice_GetRequestNum (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_TRANSACTION)
 Transactions do not have request numbers. However, if you have a. More...
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static EXPORT bool SavePurse (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID, const std::string &THE_PURSE)
 
static 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)
 
static EXPORT std::string CreatePurse_Passphrase (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &SIGNER_ID)
 
static EXPORT int64_t Purse_GetTotalValue (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_PURSE)
 Get Purse Total Value (internally uses GetTotalValue().) More...
 
static EXPORT int32_t Purse_Count (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_PURSE)
 returns a count of the number of cash tokens inside this purse. More...
 
static EXPORT bool Purse_HasPassword (const std::string &SERVER_ID, const std::string &THE_PURSE)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 
static 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)
 Should handle duplicates. Should load, merge, and save. More...
 
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 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)
 
static EXPORT std::string Token_GetID (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN)
 
static EXPORT int64_t Token_GetDenomination (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN)
 The actual cash value of the token. Returns a int64_t. More...
 
static EXPORT int32_t Token_GetSeries (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN)
 
static EXPORT time64_t Token_GetValidFrom (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN)
 the date is seconds since Jan 1970. More...
 
static EXPORT time64_t Token_GetValidTo (const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN)
 
static EXPORT std::string Token_GetAssetID (const std::string &THE_TOKEN)
 
static EXPORT std::string Token_GetServerID (const std::string &THE_TOKEN)
 
static EXPORT int64_t Instrmnt_GetAmount (const std::string &THE_INSTRUMENT)
 
static EXPORT int64_t Instrmnt_GetTransNum (const std::string &THE_INSTRUMENT)
 
static EXPORT time64_t Instrmnt_GetValidFrom (const std::string &THE_INSTRUMENT)
 
static EXPORT time64_t Instrmnt_GetValidTo (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetMemo (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetType (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetServerID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetAssetID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetSenderUserID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetSenderAcctID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetRemitterUserID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetRemitterAcctID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetRecipientUserID (const std::string &THE_INSTRUMENT)
 
static EXPORT std::string Instrmnt_GetRecipientAcctID (const std::string &THE_INSTRUMENT)
 
static EXPORT int32_t checkServerID (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT int32_t createUserAccount (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT int32_t deleteUserAccount (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT int32_t deleteAssetAccount (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID)
 
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)
 
static EXPORT int64_t Message_GetUsageCredits (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)
 
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 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)
 
static EXPORT int32_t getRequest (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT int32_t getTransactionNumber (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT int32_t issueAssetType (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_CONTRACT)
 
static EXPORT int32_t getContract (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_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 createAssetAccount (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID)
 
static EXPORT int32_t getAccount (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID)
 
static EXPORT int32_t getAccountFiles (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID)
 
static EXPORT std::string GenerateBasketCreation (const std::string &USER_ID, const int64_t &MINIMUM_TRANSFER)
 
static 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)
 
static EXPORT int32_t issueBasket (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_BASKET)
 
static 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)
 
static 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)
 
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 notarizeWithdrawal (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const int64_t &AMOUNT)
 
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)
 
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 getInbox (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID)
 
static EXPORT int32_t getOutbox (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID)
 
static EXPORT int32_t getNymbox (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadNymbox (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string LoadNymboxNoVerify (const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT std::string Nymbox_GetReplyNotice (const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER)
 
static EXPORT bool HaveAlreadySeenReply (const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER)
 
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 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)
 
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 processNymbox (const std::string &SERVER_ID, const std::string &USER_ID)
 
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 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. More...
 
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 depositPaymentPlan (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_PAYMENT_PLAN)
 
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 getMarketList (const std::string &SERVER_ID, const std::string &USER_ID)
 Retrieves details for each market. More...
 
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. More...
 
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) More...
 
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. More...
 
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)
 
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)
 
static EXPORT std::string PopMessageBuffer (const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT void FlushMessageBuffer ()
 
static EXPORT std::string GetSentMessage (const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT bool RemoveSentMessage (const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID)
 
static EXPORT void FlushSentMessages (const bool &bHarvestingForRetry, const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_NYMBOX)
 
static EXPORT void Sleep (const int64_t &MILLISECONDS)
 
static EXPORT bool ResyncNymWithServer (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetCommand (const std::string &THE_MESSAGE)
 
static EXPORT int32_t Message_GetSuccess (const std::string &THE_MESSAGE)
 
static EXPORT int32_t queryAssetTypes (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ENCODED_MAP)
 
static EXPORT std::string Message_GetPayload (const std::string &THE_MESSAGE)
 
static EXPORT int32_t Message_GetDepth (const std::string &THE_MESSAGE)
 
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 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 Message_GetBalanceAgreementSuccess (const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID, const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetLedger (const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetNewAssetTypeID (const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetNewIssuerAcctID (const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetNewAcctID (const std::string &THE_MESSAGE)
 
static EXPORT std::string Message_GetNymboxHash (const std::string &THE_MESSAGE)
 

Detailed Description

Definition at line 144 of file OTAPI.hpp.

Member Function Documentation

int32_t opentxs::OTAPI_Wrap::activateSmartContract ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_SMART_CONTRACT 
)
static
    --------------------------------------------------

ACTIVATE SMART CONTRACT Take an existing smart contract, which has already been set up, confirmed, etc, and then activate it on the server so it can start processing.

See Create_SmartContract (etc.)

Definition at line 1416 of file OTAPI.cpp.

1419 {
1420  return Exec()->activateSmartContract(SERVER_ID, USER_ID,
1421  THE_SMART_CONTRACT);
1422 }
EXPORT int32_t activateSmartContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_SMART_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::AddAssetContract ( const std::string &  strContract)
static
    --------------------------------------------------

ADD ASSET CONTRACT (to wallet)

If you have an asset contract that you'd like to add to your wallet, call this function.

Definition at line 506 of file OTAPI.cpp.

507 {
508  return Exec()->AddAssetContract(strContract);
509 }
EXPORT int32_t AddAssetContract(const std::string &strContract) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::AddBasketCreationItem ( const std::string &  USER_ID,
const std::string &  THE_BASKET,
const std::string &  ASSET_TYPE_ID,
const int64_t &  MINIMUM_TRANSFER 
)
static
    ----------------------------------------------------

ADD BASKET CREATION ITEM

(returns the updated basket in string form.)

Call GenerateBasketCreation first (above), then call this function multiple times to add the various currencies to the basket, and then call issueBasket to send the request to the server.

Definition at line 2123 of file OTAPI.cpp.

2127 {
2128  return Exec()->AddBasketCreationItem(USER_ID, THE_BASKET, ASSET_TYPE_ID,
2129  MINIMUM_TRANSFER);
2130 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

1 2 3 5=2,3,4 OR 10=4,6,8 OR 15=6,9,12 Etc. (The MULTIPLE.) -------------------------------------------------— ADD BASKET EXCHANGE ITEM

Returns the updated basket exchange request in string form. (Or nullptr.)

Call the above function first. Then call this one multiple times, and then finally call exchangeBasket to send the request to the server.

Definition at line 2149 of file OTAPI.cpp.

2154 {
2155  return Exec()->AddBasketExchangeItem(SERVER_ID, USER_ID, THE_BASKET,
2156  ASSET_TYPE_ID, ASSET_ACCT_ID);
2157 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::AddServerContract ( const std::string &  strContract)
static
    --------------------------------------------------

ADD SERVER CONTRACT (to wallet)

If you have a server contract that you'd like to add to your wallet, call this function.

Definition at line 501 of file OTAPI.cpp.

502 {
503  return Exec()->AddServerContract(strContract);
504 }
EXPORT int32_t AddServerContract(const std::string &strContract) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::AddSignature ( const std::string &  SIGNER_NYM_ID,
const std::string &  THE_CONTRACT 
)
static
OT-Sign a CONTRACT. (Add a signature)

EXPORT static std::string AddSignature(const std::string& SIGNER_NYM_ID, const std::string& THE_CONTRACT);

Tries to instantiate the contract object, based on the string passed in. Signs the contract, without releasing any signatures that are already there. Returns the signed contract, or nullptr if failure.

NOTE: The actual OT functionality (Use Cases) NEVER requires you to sign via this function. Why not? because, anytime a signature is needed on something, the relevant OT API call will require you to pass in the Nym, and the API already signs internally wherever it deems appropriate. Thus, this function is only for advanced uses, for OT-Scripts, server operators, etc.

Definition at line 1000 of file OTAPI.cpp.

1002 {
1003  return Exec()->AddSignature(SIGNER_NYM_ID, THE_CONTRACT);
1004 }
EXPORT std::string AddSignature(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::AddSubcredential ( const std::string &  NYM_ID,
const std::string &  MASTER_CRED_ID,
const int32_t &  nKeySize 
)
static

Definition at line 441 of file OTAPI.cpp.

444 {
445  return Exec()->AddSubcredential(NYM_ID, MASTER_CRED_ID, nKeySize);
446 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::AppCleanup ( )
static

Definition at line 189 of file OTAPI.cpp.

190 {
191  if (nullptr == exec) {
192  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
193  OT_FAIL;
194  }
195 
196  return exec->AppCleanup();
197 }
EXPORT bool AppCleanup()
Definition: OTAPI_Exec.cpp:228
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTAPI_Wrap::AppInit ( )
static

INITIALIZE the OTAPI library

Call this once per run of the application.

Definition at line 179 of file OTAPI.cpp.

180 {
181  if (nullptr == exec) {
182  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
183  OT_FAIL;
184  }
185 
186  return exec->AppInit();
187 }
EXPORT bool AppInit()
Definition: OTAPI_Exec.cpp:203
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
int32_t opentxs::OTAPI_Wrap::Basket_GetMemberCount ( const std::string &  BASKET_ASSET_TYPE_ID)
static
    --------------------------------------------------------------------

Get Basket Count (of backing asset types.)

Returns the number of asset types that make up this basket. (Or zero.)

Definition at line 1985 of file OTAPI.cpp.

1986 {
1987  return Exec()->Basket_GetMemberCount(ASSET_TYPE_ID);
1988 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t Basket_GetMemberCount(const std::string &BASKET_ASSET_TYPE_ID) const
int64_t opentxs::OTAPI_Wrap::Basket_GetMemberMinimumTransferAmount ( const std::string &  BASKET_ASSET_TYPE_ID,
const int32_t &  nIndex 
)
static
    ----------------------------------------------------

GET BASKET MEMBER's MINIMUM TRANSFER AMOUNT

Returns a int64_t containing the minimum transfer amount for one of the member currencies in the basket.

FOR EXAMPLE: If the basket is defined as 10 Rands == 2 Silver, 5 Gold, 8 Euro, then the minimum transfer amount for the member currency at index 0 is 2, the minimum transfer amount for the member currency at index 1 is 5, and the minimum transfer amount for the member currency at index 2 is 8.

Definition at line 2002 of file OTAPI.cpp.

2004 {
2005  return Exec()->Basket_GetMemberMinimumTransferAmount(BASKET_ASSET_TYPE_ID,
2006  nIndex);
2007 }
EXPORT int64_t Basket_GetMemberMinimumTransferAmount(const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Basket_GetMemberType ( const std::string &  BASKET_ASSET_TYPE_ID,
const int32_t &  nIndex 
)
static
    --------------------------------------------------------------------

Get Asset Type of a basket's member currency, by index.

(Returns a string containing Asset Type ID, or nullptr).

Definition at line 1990 of file OTAPI.cpp.

1992 {
1993  return Exec()->Basket_GetMemberType(BASKET_ASSET_TYPE_ID, nIndex);
1994 }
EXPORT std::string Basket_GetMemberType(const std::string &BASKET_ASSET_TYPE_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Basket_GetMinimumTransferAmount ( const std::string &  BASKET_ASSET_TYPE_ID)
static
    ----------------------------------------------------

GET BASKET MINIMUM TRANSFER AMOUNT

Returns a int64_t containing the minimum transfer amount for the entire basket.

FOR EXAMPLE: If the basket is defined as 10 Rands == 2 Silver, 5 Gold, 8 Euro, then the minimum transfer amount for the basket is 10. This function would return a string containing "10", in that example.

Definition at line 1996 of file OTAPI.cpp.

1998 {
1999  return Exec()->Basket_GetMinimumTransferAmount(BASKET_ASSET_TYPE_ID);
2000 }
EXPORT int64_t Basket_GetMinimumTransferAmount(const std::string &BASKET_ASSET_TYPE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Bylaw_GetCallbackCount ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1270 of file OTAPI.cpp.

1272 {
1273  return Exec()->Bylaw_GetCallbackCount(THE_CONTRACT, BYLAW_NAME);
1274 }
EXPORT int32_t Bylaw_GetCallbackCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Bylaw_GetClauseCount ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1252 of file OTAPI.cpp.

1254 {
1255  return Exec()->Bylaw_GetClauseCount(THE_CONTRACT, BYLAW_NAME);
1256 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t Bylaw_GetClauseCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
int32_t opentxs::OTAPI_Wrap::Bylaw_GetHookCount ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1264 of file OTAPI.cpp.

1266 {
1267  return Exec()->Bylaw_GetHookCount(THE_CONTRACT, BYLAW_NAME);
1268 }
EXPORT int32_t Bylaw_GetHookCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Bylaw_GetLanguage ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1246 of file OTAPI.cpp.

1248 {
1249  return Exec()->Bylaw_GetLanguage(THE_CONTRACT, BYLAW_NAME);
1250 }
EXPORT std::string Bylaw_GetLanguage(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Bylaw_GetVariableCount ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1258 of file OTAPI.cpp.

1260 {
1261  return Exec()->Bylaw_GetVariableCount(THE_CONTRACT, BYLAW_NAME);
1262 }
EXPORT int32_t Bylaw_GetVariableCount(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CalculateAssetContractID ( const std::string &  str_Contract)
static

Definition at line 455 of file OTAPI.cpp.

457 {
458  return Exec()->CalculateAssetContractID(str_Contract);
459 }
EXPORT std::string CalculateAssetContractID(const std::string &str_Contract) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CalculateServerContractID ( const std::string &  str_Contract)
static

Definition at line 461 of file OTAPI.cpp.

463 {
464  return Exec()->CalculateServerContractID(str_Contract);
465 }
EXPORT std::string CalculateServerContractID(const std::string &str_Contract) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Callback_GetClause ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  CALLBACK_NAME 
)
static

Definition at line 1349 of file OTAPI.cpp.

1352 {
1353  return Exec()->Callback_GetClause(THE_CONTRACT, BYLAW_NAME, CALLBACK_NAME);
1354 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Callback_GetClause(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CALLBACK_NAME) const
std::string opentxs::OTAPI_Wrap::Callback_GetNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1342 of file OTAPI.cpp.

1345 {
1346  return Exec()->Callback_GetNameByIndex(THE_CONTRACT, BYLAW_NAME, nIndex);
1347 }
EXPORT std::string Callback_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::checkServerID ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

CHECK SERVER ID – (This is used for "pinging" the server...)

Notice, if you ever want to send a message, you have to include the Server ID and the User ID.

The OTAPI will use the Server ID to look-up the server contract. (FYI, the Server ID is a hash of the server contract itself, so it is impos- sible to change the contract, without also changing the ID.)

Then it will connect to the server based on the connection information in that contract, send the message, get the reply, and disconnect. (That's in HTTP mode – in TCP mode it maintains the connection.)

It will also encrypt the message to the public key found inside that contract, so only the person who signed the contract will be able to read the message.

Open Transactions will also use the User ID to lookup the public key for that user. (The UserID, aka NymID, is a hash of the public key itself.)

This message is basically just a ping – it verifies that the server is really there, and that it can really open the messages that are encrypted to the key in the server contract. It's the first thing your wallet software should do. Think of it like a way to PING the server.

Definition at line 2009 of file OTAPI.cpp.

2011 {
2012  return Exec()->checkServerID(SERVER_ID, USER_ID);
2013 }
EXPORT int32_t checkServerID(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::checkUser ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  USER_ID_CHECK 
)
static

CHECK USER — (Grab his public key based on his User ID.)

ServerID – Must be included with every message. USER_ID – You must include your own userID so the server can reply. USER_CHECK_ID – This is a SECOND user's ID.

In this message, you are requesting the server to send you the public key for another user, denoted by his ID in USER_ID_CHECK.

The server's response will contain the public key of the other user, so you can encrypt messages or cash to him. Your wallet can verify that the key is the right one, by hashing it and comparing the result to the other user's ID. Since the User ID is a hash of the key, they should always match.

Definition at line 2040 of file OTAPI.cpp.

2043 {
2044  return Exec()->checkUser(SERVER_ID, USER_ID, USER_ID_CHECK);
2045 }
EXPORT int32_t checkUser(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &USER_ID_CHECK) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Clause_GetContents ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  CLAUSE_NAME 
)
static

Definition at line 1283 of file OTAPI.cpp.

1286 {
1287  return Exec()->Clause_GetContents(THE_CONTRACT, BYLAW_NAME, CLAUSE_NAME);
1288 }
EXPORT std::string Clause_GetContents(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &CLAUSE_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Clause_GetNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1276 of file OTAPI.cpp.

1279 {
1280  return Exec()->Clause_GetNameByIndex(THE_CONTRACT, BYLAW_NAME, nIndex);
1281 }
EXPORT std::string Clause_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::ClearExpired ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const int32_t &  nIndex,
const bool &  bClearAll 
)
static

Definition at line 1608 of file OTAPI.cpp.

1611 {
1612  return Exec()->ClearExpired(SERVER_ID, USER_ID, nIndex, bClearAll);
1613 }
EXPORT bool ClearExpired(const std::string &SERVER_ID, const std::string &USER_ID, const int32_t &nIndex, const bool &bClearAll) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::ClearRecord ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const int32_t &  nIndex,
const bool &  bClearAll 
)
static

Definition at line 1599 of file OTAPI.cpp.

1603 {
1604  return Exec()->ClearRecord(SERVER_ID, USER_ID, ACCOUNT_ID, nIndex,
1605  bClearAll);
1606 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1108 of file OTAPI.cpp.

1113 {
1114  return Exec()->ConfirmPaymentPlan(SERVER_ID, SENDER_USER_ID, SENDER_ACCT_ID,
1115  RECIPIENT_USER_ID, PAYMENT_PLAN);
1116 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Create_SmartContract ( const std::string &  SIGNER_NYM_ID,
const time64_t VALID_FROM,
const time64_t VALID_TO 
)
static

Definition at line 1118 of file OTAPI.cpp.

1121 {
1122  return Exec()->Create_SmartContract(SIGNER_NYM_ID, VALID_FROM, VALID_TO);
1123 }
EXPORT std::string Create_SmartContract(const std::string &SIGNER_NYM_ID, const time64_t &VALID_FROM, const time64_t &VALID_TO) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::createAssetAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ASSET_ID 
)
static
---------------------------------------------------------------------------

CREATE ASSET ACCOUNT – of any asset type, (just pass in the Asset Type ID.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2096 of file OTAPI.cpp.

2099 {
2100  return Exec()->createAssetAccount(SERVER_ID, USER_ID, ASSET_ID);
2101 }
EXPORT int32_t createAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreateAssetContract ( const std::string &  NYM_ID,
const std::string &  strXMLcontents 
)
static

Definition at line 473 of file OTAPI.cpp.

475 {
476  return Exec()->CreateAssetContract(NYM_ID, strXMLcontents);
477 }
EXPORT std::string CreateAssetContract(const std::string &NYM_ID, const std::string &strXMLcontents) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreateNym ( const int32_t &  nKeySize,
const std::string &  NYM_ID_SOURCE,
const std::string &  ALT_LOCATION 
)
static
    CREATE NYM -- Create new User

Creates a new Nym and adds it to the wallet. (Including PUBLIC and PRIVATE KEYS.)

Returns a new User ID (with files already created) or nullptr upon failure.

Once it exists, use createUserAccount() to register your new Nym at any given Server. (Nearly all server requests require this...)

nKeySize must be 1024, 2048, 4096, or 8192. NYM_ID_SOURCE can be empty (it will just generate a keypair and use the public key as the source.) Otherwise you can pass another source string in here, such as a URL, but the Nym will not verify against its own source unless the credential IDs for that Nym can be found posted at that same URL. Whereas if the source is just a public key, then the only verification requirement is that master credentials be signed by the corresponding private key.

Definition at line 358 of file OTAPI.cpp.

361 {
362  return Exec()->CreateNym(nKeySize, NYM_ID_SOURCE, ALT_LOCATION);
363 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreatePurse ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  OWNER_ID,
const std::string &  SIGNER_ID 
)
static

Definition at line 1856 of file OTAPI.cpp.

1860 {
1861  return Exec()->CreatePurse(SERVER_ID, ASSET_TYPE_ID, OWNER_ID, SIGNER_ID);
1862 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreatePurse_Passphrase ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  SIGNER_ID 
)
static

Definition at line 1864 of file OTAPI.cpp.

1867 {
1868  return Exec()->CreatePurse_Passphrase(SERVER_ID, ASSET_TYPE_ID, SIGNER_ID);
1869 }
EXPORT std::string CreatePurse_Passphrase(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &SIGNER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreateServerContract ( const std::string &  NYM_ID,
const std::string &  strXMLcontents 
)
static
    Creates a contract based on the contents passed in,

then sets the contract key based on the NymID, and signs it with that Nym. This function will also ADD the contract to the wallet. Returns: the new contract ID, or nullptr if failure.

Definition at line 467 of file OTAPI.cpp.

469 {
470  return Exec()->CreateServerContract(NYM_ID, strXMLcontents);
471 }
EXPORT std::string CreateServerContract(const std::string &NYM_ID, const std::string &strXMLcontents) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::CreateSymmetricKey ( )
static

Definition at line 970 of file OTAPI.cpp.

971 {
972  return Exec()->CreateSymmetricKey();
973 }
EXPORT std::string CreateSymmetricKey() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::createUserAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

CREATE USER's ACCOUNT (On a specific server.)

Note: There are USER accounts and ASSET accounts...

A User account is simply a public key. Whenever you send a message to the server, you would normally have to send a public key with the message, so that the server can encrypt the reply back to you.

Due to this, the server will cache the public key so you only have to send the ID (which is a hash of the key.) The server uses this ID to look up the public key and encrypt the response back to you.

– Any user can create as many public keys as they wish. So User accounts are pseudonymous.

– Cash token exchanges are possible without a User account (using an HTTPS proxy operated by the server operator) so users are NOT forced to create accounts, if they prefer to deal only in cash. However, it's worth noting that even if they do, the cash itself IS STILL UNTRACEABLE, due to the Chaumian blinding.

– A user may use the same public key at multiple servers, and he creates his own keys inside the wallet. So this function is less about "creating" the user account, and more about simply register- ing a public key on a specific server.

– (Wallet software is capable, in OT, of distributing assets across multiple servers seamlessly, which means it's a requirement that the user generate his own keys and register them on whichever servers that he sees fit to trust.

Since the server contract and public key are both presumed to have been created by this point, you simply pass in their IDs and the library will do the rest of the work.

Definition at line 2015 of file OTAPI.cpp.

2017 {
2018  return Exec()->createUserAccount(SERVER_ID, USER_ID);
2019 }
EXPORT int32_t createUserAccount(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Decode ( const std::string &  strEncoded,
const bool &  bLineBreaks 
)
static
Decode an OT-encoded string (back to plainext.)

EXPORT static std::string Decode(const std::string& strEncoded);

This will base64-decode, uncompress, and unpack an OT-encoded string. Returns the plainext string, or nullptr.

internally: OTASCIIArmor ascEncoded(strEncoded); OTString strPlain(ascEncoded); // strPlain now contains the decoded plainext string. return strPlain.Get(); // We return it.

Definition at line 952 of file OTAPI.cpp.

954 {
955  return Exec()->Decode(strEncoded, bLineBreaks);
956 }
EXPORT std::string Decode(const std::string &strEncoded, const bool &bLineBreaks) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Decrypt ( const std::string &  RECIPIENT_NYM_ID,
const std::string &  strCiphertext 
)
static
OT-DECRYPT an OT-encrypted string back to plainext. (ASYMMETRIC)

EXPORT static std::string Decrypt(const std::string& RECIPIENT_NYM_ID, const std::string& strCiphertext);

Decrypts the base64-encoded ciphertext back into a normal string plainext. Returns the plainext string, or nullptr.

internally the C++ code is: OTEnvelope theEnvelope; // Here is the envelope object. (The ciphertext IS the data for an OTEnvelope.) OTASCIIArmor ascCiphertext(strCiphertext); // The base64-encoded ciphertext passed in. Next we'll try to attach it to envelope object... if (theEnvelope.SetAsciiArmoredData(ascCiphertext)) { // ...so that we can open it using the appropriate Nym, into a plain string object: OTString strServerReply; // This will contain the output when we're done. const bool bOpened = // Now we try to decrypt: theEnvelope.Open(RECIPIENT_NYM, strServerReply); if (bOpened) { return strServerReply.Get(); } }

Definition at line 964 of file OTAPI.cpp.

966 {
967  return Exec()->Decrypt(RECIPIENT_NYM_ID, strCiphertext);
968 }
EXPORT std::string Decrypt(const std::string &RECIPIENT_NYM_ID, const std::string &strCiphertext) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::deleteAssetAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static
    This allows you to delete an asset account from a server,

provided that the balance is 0 and the inbox and outbox are both empty.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 586 of file OTAPI.cpp.

589 {
590  return Exec()->deleteAssetAccount(SERVER_ID, USER_ID, ACCOUNT_ID);
591 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t deleteAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
int32_t opentxs::OTAPI_Wrap::deleteUserAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static
    This allows you to delete a Nym from any server it is

registered at. NOTE: This will FAIL if the Nym has any transactions open at the server ("used but not closed"), as well as if there are any accounts or cron items still open at that server, or any receipts in the Nymbox.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2021 of file OTAPI.cpp.

2023 {
2024  return Exec()->deleteUserAccount(SERVER_ID, USER_ID);
2025 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t deleteUserAccount(const std::string &SERVER_ID, const std::string &USER_ID) const
int32_t opentxs::OTAPI_Wrap::depositCheque ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID,
const std::string &  THE_CHEQUE 
)
static
--------------------------------------------------------------------------

DEPOSIT A CHEQUE (or VOUCHER) INTO AN ASSET ACCOUNT.

If someone gives you a cheque, you can use this function to message the server asking it to deposit the cheque into one of your asset accounts. (Of course the account and the cheque must be the same asset type.)

Since a voucher is simply a cheque drawn on an int32_t server account, you can deposit a voucher the same as any other cheque.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2259 of file OTAPI.cpp.

2263 {
2264  return Exec()->depositCheque(SERVER_ID, USER_ID, ACCT_ID, THE_CHEQUE);
2265 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::depositPaymentPlan ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_PAYMENT_PLAN 
)
static
    --------------------------------------------------

DEPOSIT (ACTIVATE) PAYMENT PLAN

See ProposePaymentPlan / ConfirmPaymentPlan as well.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2267 of file OTAPI.cpp.

2270 {
2271  return Exec()->depositPaymentPlan(SERVER_ID, USER_ID, THE_PAYMENT_PLAN);
2272 }
EXPORT int32_t depositPaymentPlan(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_PAYMENT_PLAN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::DiscardCheque ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID,
const std::string &  THE_CHEQUE 
)
static
DISCARD A CHEQUE -- returns OT_TRUE or OT_FALSE

When you write a cheque, your wallet software must use one of your
transaction
numbers on the cheque. Even when you give the cheque to someone, a good
wallet
should still store a copy of the cheque, until it is cashed.
This way, if you decide to "tear it up" (perhaps the recipient left the
country!)
then you will still have a copy of the cheque, and you can get your
transaction
number back before discarding it.

Why does it matter to get the transaction number back? Because once you sign
that number out, you will have to CONTINUE signing it out on EVERY RECEIPT
until
that transaction is finally closed out. You are still responsible for that
transaction number, until then.

So most likely, if the cheque is going nowhere, then you will want to
RETRIEVE
the transaction number back from the cheque so you can use it on another
transaction
instead. *THIS* IS THE FUNCTION YOU SHOULD USE TO DO THAT!!!!

Returns OT_BOOL

Definition at line 1068 of file OTAPI.cpp.

1072 {
1073  return Exec()->DiscardCheque(SERVER_ID, USER_ID, ACCT_ID, THE_CHEQUE);
1074 }
EXPORT bool DiscardCheque(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const std::string &THE_CHEQUE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::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 
)
static

Definition at line 566 of file OTAPI.cpp.

571 {
572  return Exec()->DoesBoxReceiptExist(SERVER_ID, USER_ID, ACCOUNT_ID, nBoxType,
573  TRANSACTION_NUMBER);
574 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1095 of file OTAPI.cpp.

1101 {
1102  return Exec()->EasyProposePlan(SERVER_ID, DATE_RANGE, SENDER_ACCT_ID,
1103  SENDER_USER_ID, PLAN_CONSIDERATION,
1104  RECIPIENT_ACCT_ID, RECIPIENT_USER_ID,
1105  INITIAL_PAYMENT, PAYMENT_PLAN, PLAN_EXPIRY);
1106 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Encode ( const std::string &  strPlaintext,
const bool &  bLineBreaks 
)
static
OT-encode a plainext string.

This will pack, compress, and base64-encode a plain string. Returns the base64-encoded string, or nullptr.

internally: OTString strPlain(strPlaintext); OTASCIIArmor ascEncoded(thePlaintext); // ascEncoded now contains the OT-encoded string. return ascEncoded.Get(); // We return it.

Definition at line 946 of file OTAPI.cpp.

948 {
949  return Exec()->Encode(strPlaintext, bLineBreaks);
950 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Encode(const std::string &strPlaintext, const bool &bLineBreaks) const
std::string opentxs::OTAPI_Wrap::Encrypt ( const std::string &  RECIPIENT_NYM_ID,
const std::string &  strPlaintext 
)
static
OT-ENCRYPT a plainext string. (ASYMMETRIC)

EXPORT static std::string Encrypt(const std::string& RECIPIENT_NYM_ID, const std::string& strPlaintext);

This will encode, ENCRYPT, and encode a plain string. Returns the base64-encoded ciphertext, or nullptr.

internally the C++ code is: OTString strPlain(strPlaintext); OTEnvelope theEnvelope; if (theEnvelope.Seal(RECIPIENT_NYM, strPlain)) { // Now it's encrypted (in binary form, inside the envelope), to the recipient's nym. OTASCIIArmor ascCiphertext(theEnvelope); // ascCiphertext now contains the base64-encoded ciphertext (as a string.) return ascCiphertext.Get(); }

Definition at line 958 of file OTAPI.cpp.

960 {
961  return Exec()->Encrypt(RECIPIENT_NYM_ID, strPlaintext);
962 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Encrypt(const std::string &RECIPIENT_NYM_ID, const std::string &strPlaintext) const
int32_t opentxs::OTAPI_Wrap::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
--------------------------------------------------------------------------

EXCHANGE BASKET

Send a request to the server asking to exchange in or out of a basket currency.

For example, maybe you have 3 gold, 2 silver, and 5 dollars, and those are the ingredients of the "Rand" basket currency. This message allows you to ask the server to convert from your gold, silver, and dollar accounts into your Rand account. (Or convert from your Rand account back into your gold, silver, and dollar accounts.)

Other than this conversion process, (with the reserves stored internally by the server) basket accounts are identical to normal asset accounts – they are merely another asset type ID, and you can use them the same as you would use any other asset type (open accounts, write cheques, withdraw cash, trade on markets, etc.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2159 of file OTAPI.cpp.

2164 {
2165  return Exec()->exchangeBasket(SERVER_ID, USER_ID, BASKET_ASSET_ID,
2166  THE_BASKET, BOOL_EXCHANGE_IN_OR_OUT);
2167 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::exchangePurse ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  USER_ID,
const std::string &  THE_PURSE 
)
static
    Messages the server. If failure, make sure you didn't lose that purse!!

If success, the new tokens will be returned shortly and saved into the appropriate purse. Note that an asset account isn't necessary to do this... just a nym operating cash-only. The same as exchanging a 20-dollar bill at the teller window for a replacement bill.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 1916 of file OTAPI.cpp.

1920 {
1921  return Exec()->exchangePurse(SERVER_ID, ASSET_TYPE_ID, USER_ID, THE_PURSE);
1922 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
OTAPI_Exec * opentxs::OTAPI_Wrap::Exec ( )
static

Definition at line 158 of file OTAPI.cpp.

159 {
160  if (nullptr == exec) {
161  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
162  OT_FAIL;
163  }
164 
165  OT_API* pOTAPI = exec->OTAPI();
166  if (nullptr == pOTAPI || !pOTAPI->IsInitialized()) {
167  otErr << __FUNCTION__ << ": Error: OT_API not Initialized!!\n";
168  OT_FAIL;
169  }
170 
171  return exec;
172 }
EXPORT OT_API * OTAPI() const
Definition: OTAPI_Exec.cpp:281
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
std::string opentxs::OTAPI_Wrap::FlatSign ( const std::string &  SIGNER_NYM_ID,
const std::string &  THE_INPUT,
const std::string &  CONTRACT_TYPE 
)
static

Definition at line 993 of file OTAPI.cpp.

996 {
997  return Exec()->FlatSign(SIGNER_NYM_ID, THE_INPUT, CONTRACT_TYPE);
998 }
EXPORT std::string FlatSign(const std::string &SIGNER_NYM_ID, const std::string &THE_INPUT, const std::string &CONTRACT_TYPE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
void opentxs::OTAPI_Wrap::FlushMessageBuffer ( void  )
static

Definition at line 2339 of file OTAPI.cpp.

2340 {
2341  return Exec()->FlushMessageBuffer();
2342 }
EXPORT void FlushMessageBuffer() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
void opentxs::OTAPI_Wrap::FlushSentMessages ( const bool &  bHarvestingForRetry,
const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_NYMBOX 
)
static
    -----------------------------------------------------------

FlushSentMessages

Make sure to call this directly after a successful . (And ONLY at that time.)

This empties the buffer of sent messages. (Harvesting any transaction numbers that are still there.)

NOTE: You normally ONLY call this immediately after receiving a successful . It's only then that you can see which messages a server actually received or not – which transactions it processed (success or fail) vs which transactions did NOT process (and thus did NOT leave any success/fail receipt in the nymbox.)

I COULD have just flushed myself IN the code (where the reply is processed.) But then the developer using the OT API would never have the opportunity to see whether a message was replied to, and harvest it for himself (say, just before attempting a re-try, which I plan to do in the high-level Java API, which is why I'm coding it this way.)

This way, he can do that if he wishes, THEN call this function, and harvesting will still occur properly, and he will also thus have his chance to check for his own replies to harvest before then. This all depends on the developer using the API being smart enough to call this function after a successful !

Definition at line 2358 of file OTAPI.cpp.

2362 {
2363  return Exec()->FlushSentMessages(bHarvestingForRetry, SERVER_ID, USER_ID,
2364  THE_NYMBOX);
2365 }
EXPORT void FlushSentMessages(const bool &bHarvestingForRetry, const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_NYMBOX) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::FormatAmount ( const std::string &  ASSET_TYPE_ID,
const int64_t &  THE_AMOUNT 
)
static
    FormatAmount:

Input: currency contract, amount. (And locale, internally.) Output: 545 becomes (for example) "$5.45"

Returns formatted string for output, for a given amount, based on currency contract and locale.

Definition at line 490 of file OTAPI.cpp.

492 {
493  return Exec()->FormatAmount(ASSET_TYPE_ID, THE_AMOUNT);
494 }
EXPORT std::string FormatAmount(const std::string &ASSET_TYPE_ID, const int64_t &THE_AMOUNT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GenerateBasketCreation ( const std::string &  USER_ID,
const int64_t &  MINIMUM_TRANSFER 
)
static
    ----------------------------------------------------

GENERATE BASKET CREATION REQUEST

(returns the basket in string form.)

Call AddBasketCreationItem multiple times to add the various currencies to the basket, and then call issueBasket to send the request to the server.

Definition at line 2117 of file OTAPI.cpp.

2119 {
2120  return Exec()->GenerateBasketCreation(USER_ID, MINIMUM_TRANSFER);
2121 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GenerateBasketCreation(const std::string &USER_ID, const int64_t &MINIMUM_TRANSFER) const
std::string opentxs::OTAPI_Wrap::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 
)
static
    ----------------------------------------------------

GENERATE BASKET EXCHANGE REQUEST

(Returns the new basket exchange request in string form.)

Call this function first. Then call AddBasketExchangeItem multiple times, and then finally call exchangeBasket to send the request to the server.

Definition at line 2139 of file OTAPI.cpp.

2143 {
2144  return Exec()->GenerateBasketExchange(
2145  SERVER_ID, USER_ID, BASKET_ASSET_TYPE_ID, BASKET_ASSET_ACCT_ID,
2146  TRANSFER_MULTIPLE);
2147 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID 
)
static
--------------------------------------------------------------------------

GET ACCOUNT – Send a message to the server asking it to send you the latest copy of any of your asset accounts (incl. the current balance.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2103 of file OTAPI.cpp.

2106 {
2107  return Exec()->getAccount(SERVER_ID, USER_ID, ACCT_ID);
2108 }
EXPORT int32_t getAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetAccountCount ( void  )
static

Definition at line 526 of file OTAPI.cpp.

527 {
528  return Exec()->GetAccountCount();
529 }
EXPORT int32_t GetAccountCount() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getAccountFiles ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID 
)
static

Definition at line 2110 of file OTAPI.cpp.

2113 {
2114  return Exec()->getAccountFiles(SERVER_ID, USER_ID, ACCT_ID);
2115 }
EXPORT int32_t getAccountFiles(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_AssetTypeID ( const std::string &  ACCOUNT_ID)
static

Definition at line 1042 of file OTAPI.cpp.

1043 {
1044  return Exec()->GetAccountWallet_AssetTypeID(THE_ID);
1045 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetAccountWallet_AssetTypeID(const std::string &ACCOUNT_ID) const
int64_t opentxs::OTAPI_Wrap::GetAccountWallet_Balance ( const std::string &  ACCOUNT_ID)
static

Definition at line 1032 of file OTAPI.cpp.

1033 {
1034  return Exec()->GetAccountWallet_Balance(THE_ID);
1035 }
EXPORT int64_t GetAccountWallet_Balance(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_ID ( const int32_t &  nIndex)
static
    You already have accounts in your wallet (without any server
communications)

and these functions allow you to query the data members of those accounts. Thus, "AccountWallet" denotes that you are examining copies of your accounts that are sitting in your wallet. Originally the purpose was to eliminate confusion with a different set of similarly-named functions.

Definition at line 919 of file OTAPI.cpp.

920 {
921  return Exec()->GetAccountWallet_ID(nIndex);
922 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetAccountWallet_ID(const int32_t &nIndex) const
std::string opentxs::OTAPI_Wrap::GetAccountWallet_InboxHash ( const std::string &  ACCOUNT_ID)
static

Definition at line 929 of file OTAPI.cpp.

931 {
932  return Exec()->GetAccountWallet_InboxHash(ACCOUNT_ID);
933 }
EXPORT std::string GetAccountWallet_InboxHash(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_Name ( const std::string &  ACCOUNT_ID)
static

Definition at line 924 of file OTAPI.cpp.

925 {
926  return Exec()->GetAccountWallet_Name(THE_ID);
927 }
EXPORT std::string GetAccountWallet_Name(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_NymID ( const std::string &  ACCOUNT_ID)
static

Definition at line 1052 of file OTAPI.cpp.

1053 {
1054  return Exec()->GetAccountWallet_NymID(THE_ID);
1055 }
EXPORT std::string GetAccountWallet_NymID(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_OutboxHash ( const std::string &  ACCOUNT_ID)
static

Definition at line 935 of file OTAPI.cpp.

937 {
938  return Exec()->GetAccountWallet_OutboxHash(ACCOUNT_ID);
939 }
EXPORT std::string GetAccountWallet_OutboxHash(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_ServerID ( const std::string &  ACCOUNT_ID)
static

Definition at line 1047 of file OTAPI.cpp.

1048 {
1049  return Exec()->GetAccountWallet_ServerID(THE_ID);
1050 }
EXPORT std::string GetAccountWallet_ServerID(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAccountWallet_Type ( const std::string &  ACCOUNT_ID)
static

Definition at line 1037 of file OTAPI.cpp.

1038 {
1039  return Exec()->GetAccountWallet_Type(THE_ID);
1040 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetAccountWallet_Type(const std::string &ACCOUNT_ID) const
std::string opentxs::OTAPI_Wrap::GetActiveCronItem ( const std::string &  SERVER_ID,
int64_t  lTransNum 
)
static

Definition at line 370 of file OTAPI.cpp.

372 {
373  return Exec()->GetActiveCronItem(SERVER_ID, lTransNum);
374 }
EXPORT std::string GetActiveCronItem(const std::string &SERVER_ID, int64_t lTransNum) const
Definition: OTAPI_Exec.cpp:631
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAssetType_Contract ( const std::string &  ASSET_TYPE_ID)
static

Definition at line 496 of file OTAPI.cpp.

497 {
498  return Exec()->GetAssetType_Contract(ASSET_TYPE_ID);
499 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetAssetType_Contract(const std::string &ASSET_TYPE_ID) const
std::string opentxs::OTAPI_Wrap::GetAssetType_ID ( const int32_t &  nIndex)
static

Definition at line 904 of file OTAPI.cpp.

905 {
906  return Exec()->GetAssetType_ID(nIndex);
907 }
EXPORT std::string GetAssetType_ID(const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAssetType_Name ( const std::string &  ASSET_TYPE_ID)
static

Definition at line 909 of file OTAPI.cpp.

910 {
911  return Exec()->GetAssetType_Name(THE_ID);
912 }
EXPORT std::string GetAssetType_Name(const std::string &ASSET_TYPE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetAssetType_TLA ( const std::string &  ASSET_TYPE_ID)
static

Definition at line 914 of file OTAPI.cpp.

915 {
916  return Exec()->GetAssetType_TLA(THE_ID);
917 }
EXPORT std::string GetAssetType_TLA(const std::string &THE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetAssetTypeCount ( void  )
static

Definition at line 521 of file OTAPI.cpp.

522 {
523  return Exec()->GetAssetTypeCount();
524 }
EXPORT int32_t GetAssetTypeCount() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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
    The Nymbox/Inbox/Outbox only contain abbreviated receipts, with a hash
for zero-knowledge

proof of the entire receipt. (Messages were getting too big, it couldn't be helped. Sorry.) Once you download your nym/in/out/XYZbox and load it into memory from storage, you iterate through it and download all the box receipts (preferably only once.) Once you load those up, it's as if the various pieces were never sundered into multiple files to begin with. Then you can verify the box and do all the normal operations. How to use? Call getInbox (say), and if successful, loadInbox().

Definition at line 576 of file OTAPI.cpp.

581 {
582  return Exec()->getBoxReceipt(SERVER_ID, USER_ID, ACCOUNT_ID, nBoxType,
583  TRANSACTION_NUMBER);
584 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getContract ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ASSET_ID 
)
static
    --------------------------------------------------------------------

GET CONTRACT – Get server's copy of any asset contract, by asset type ID.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2082 of file OTAPI.cpp.

2085 {
2086  return Exec()->getContract(SERVER_ID, USER_ID, ASSET_ID);
2087 }
EXPORT int32_t getContract(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getInbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID 
)
static
--------------------------------------------------------------------------

GET A COPY OF MY INBOX

Each asset account has its own inbox/outbox. If a pending transfer is in my inbox, or a new receipt, I might want to see that. This message asks the server to send me the latest copy of the inbox for any given account (and will save it to my local storage, so I can then load it using LoadInbox, which I haven't written yet.

NOTE: the test client, upon receiving a @getInbox response from the server,
will automatically process that into a processInbox command back to the
server,
automatically accepting all of the transactions, resulting in a final
@processInbox reply from the server. Obviously a real GUI client would
merely
display the inbox to the user, where the user could choose to accept the
items
individually.

SO HOW WOULD YOU USE THIS? To process your inbox...

– First you call getInbox to grab the latest inbox from the server. (You will also want to call getOutbox as well as getAccount, since you need to have the latest versions of those files, or your balance agreement will be calculated wrong, causing your transaction to fail.)

– Then you call LoadInbox to load it from local storage.

During this time, your user has the opportunity to peruse the inbox, and to decide which transactions therein he wishes to accept or reject. If you want to display the inbox items on the screen, use these functions to loop through them: Ledger_GetCount Ledger_GetTransactionByIndex Ledger_GetTransactionIDByIndex

You will probably ask me for more introspection on the transactions themselves. (Just ask – No problem.) Here's what you have right now: Transaction_GetType

– Then call Ledger_CreateResponse in order to create a 'response' ledger for that inbox, which will be sent to the server.

– Then call Ledger_GetCount (pass it the inbox) to find out how many transactions are inside of it. Use that count to LOOP through them...

– Use Ledger_GetTransactionByIndex to grab each transaction as you iterate through the inbox.

– Call Transaction_CreateResponse to create a response for each transaction, accepting or rejecting it, and adding it to the response ledger.

– Penultimately, call Ledger_FinalizeResponse() which will create a Balance Agreement for the ledger.

– Finally, call processInbox to send that response ledger to the server and process the various items.

Definition at line 2202 of file OTAPI.cpp.

2205 {
2206  return Exec()->getInbox(SERVER_ID, USER_ID, ACCT_ID);
2207 }
EXPORT int32_t getInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getMarketList ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Retrieves details for each market.

What objects are actually stored in local storage after a successful server call?

A "MarketList", which contains a list of Market Datas. Load this up and you can get pointers to the elements as needed. THERE IS ONLY ONE OF THESE.

An "OfferList" which contains "all" offers for a specific Market ID. There may be many markets, so this should be saved by Server / Asset / User the same as Purses. If you load this object, you can loop through its offers. I don't think a sub-object is necessary here since the data is so simple.

A "TradeList" which contains "all" trades for a specific Market ID. There many be many markets, so this should be saved Server/Asset/User the same as purses. If you load this object you can loop through the trades, which again, no sub-object needed since the data here is so simple. But we shall see!

A "NymOfferList" which contains all offers for a specific nym. Unlike the above offers, these offers are full-featured and should contain a LOT more details.

Definition at line 2305 of file OTAPI.cpp.

2307 {
2308  return Exec()->getMarketList(SERVER_ID, USER_ID);
2309 }
EXPORT int32_t getMarketList(const std::string &SERVER_ID, const std::string &USER_ID) const
Retrieves details for each market.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getMarketOffers ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  MARKET_ID,
const int64_t &  MAX_DEPTH 
)
static

Gets all offers for a specific market and their details (up until.

Definition at line 2311 of file OTAPI.cpp.

2315 {
2316  return Exec()->getMarketOffers(SERVER_ID, USER_ID, MARKET_ID, MAX_DEPTH);
2317 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getMarketRecentTrades ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  MARKET_ID 
)
static

Gets all recent trades (up until maximum depth)

Definition at line 2319 of file OTAPI.cpp.

2322 {
2323  return Exec()->getMarketRecentTrades(SERVER_ID, USER_ID, MARKET_ID);
2324 }
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)
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetMemlogAtIndex ( const int32_t &  nIndex)
static

Definition at line 304 of file OTAPI.cpp.

305 {
306  return Exec()->GetMemlogAtIndex(nIndex);
307 }
EXPORT std::string GetMemlogAtIndex(const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:378
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetMemlogSize ( )
static

The below functions are for retrieving log data programatically.

Definition at line 299 of file OTAPI.cpp.

300 {
301  return Exec()->GetMemlogSize();
302 }
EXPORT int32_t GetMemlogSize() const
Definition: OTAPI_Exec.cpp:373
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getMint ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ASSET_ID 
)
static
--------------------------------------------------------------------------

Get server's copy of public Mint file (which contains the public minting keys for each asset type. Withdrawal requests will not work for any given asset type until you have downloaded the mint for that asset type.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2089 of file OTAPI.cpp.

2092 {
2093  return Exec()->getMint(SERVER_ID, USER_ID, ASSET_ID);
2094 }
EXPORT int32_t getMint(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ASSET_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_ActiveCronItemIDs ( const std::string &  NYM_ID,
const std::string &  SERVER_ID 
)
static

Definition at line 365 of file OTAPI.cpp.

367 {
368  return Exec()->GetNym_ActiveCronItemIDs(NYM_ID, SERVER_ID);
369 }
EXPORT std::string GetNym_ActiveCronItemIDs(const std::string &NYM_ID, const std::string &SERVER_ID) const
Definition: OTAPI_Exec.cpp:607
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_AltSourceLocation ( const std::string &  NYM_ID)
static

Definition at line 381 of file OTAPI.cpp.

382 {
383  return Exec()->GetNym_AltSourceLocation(NYM_ID);
384 }
EXPORT std::string GetNym_AltSourceLocation(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:673
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_CredentialContents ( const std::string &  NYM_ID,
const std::string &  CREDENTIAL_ID 
)
static

Definition at line 397 of file OTAPI.cpp.

399 {
400  return Exec()->GetNym_CredentialContents(NYM_ID, CREDENTIAL_ID);
401 }
EXPORT std::string GetNym_CredentialContents(const std::string &NYM_ID, const std::string &CREDENTIAL_ID) const
Definition: OTAPI_Exec.cpp:732
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetNym_CredentialCount ( const std::string &  NYM_ID)
static

Definition at line 386 of file OTAPI.cpp.

387 {
388  return Exec()->GetNym_CredentialCount(NYM_ID);
389 }
EXPORT int32_t GetNym_CredentialCount(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:691
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_CredentialID ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 391 of file OTAPI.cpp.

393 {
394  return Exec()->GetNym_CredentialID(NYM_ID, nIndex);
395 }
EXPORT std::string GetNym_CredentialID(const std::string &NYM_ID, const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:709
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_ID ( const int32_t &  nIndex)
static

Definition at line 643 of file OTAPI.cpp.

644 {
645  return Exec()->GetNym_ID(nIndex);
646 }
EXPORT std::string GetNym_ID(const int32_t &nIndex) const
based on Index this returns the Nym&#39;s ID
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_InboxHash ( const std::string &  ACCOUNT_ID,
const std::string &  NYM_ID 
)
static

Definition at line 676 of file OTAPI.cpp.

678 {
679  return Exec()->GetNym_InboxHash(ACCOUNT_ID, NYM_ID);
680 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetNym_InboxHash(const std::string &ACCOUNT_ID, const std::string &NYM_ID) const
std::string opentxs::OTAPI_Wrap::GetNym_MailContentsByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 693 of file OTAPI.cpp.

695 {
696  return Exec()->GetNym_MailContentsByIndex(NYM_ID, nIndex);
697 }
EXPORT std::string GetNym_MailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetNym_MailCount ( const std::string &  NYM_ID)
static
    Each Nym has mail messages, they can come from different servers.

This allows you to peruse the mail for a given Nym, and erase messages.

So how would you actually USE this to browse a Nym's mail?

-- Call GetNym_MailCount() to find out how many mail items there are.

-- Then LOOP through them, and use GetNym_MailSenderIDByIndex and
GetNym_MailServerIDByIndex to populate the list.

-- If you want to add a subject display, you'll have to call
GetNym_MailContentsByIndex()
and check for a first line beginning in Subject: (there may not be one.)

-- GetNym_MailContentsByIndex returns the body of the mail regardless.

-- Use Nym_VerifyMailByIndex() to verify the signature on the mail,

-- and use Nym_RemoveMailByIndex() to erase mail (when you want to.)

Definition at line 688 of file OTAPI.cpp.

689 {
690  return Exec()->GetNym_MailCount(NYM_ID);
691 }
EXPORT int32_t GetNym_MailCount(const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_MailSenderIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 699 of file OTAPI.cpp.

701 {
702  return Exec()->GetNym_MailSenderIDByIndex(NYM_ID, nIndex);
703 }
EXPORT std::string GetNym_MailSenderIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_MailServerIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 705 of file OTAPI.cpp.

707 {
708  return Exec()->GetNym_MailServerIDByIndex(NYM_ID, nIndex);
709 }
EXPORT std::string GetNym_MailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getNym_MarketOffers ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

This "Market Offer" data is a lot more detailed than the.

Definition at line 2326 of file OTAPI.cpp.

2328 {
2329  return Exec()->getNym_MarketOffers(SERVER_ID, USER_ID);
2330 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_Name ( const std::string &  NYM_ID)
static

Definition at line 648 of file OTAPI.cpp.

649 {
650  return Exec()->GetNym_Name(NYM_ID);
651 }
EXPORT std::string GetNym_Name(const std::string &NYM_ID) const
Returns Nym Name (based on NymID)
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_NymboxHash ( const std::string &  SERVER_ID,
const std::string &  NYM_ID 
)
static

Definition at line 664 of file OTAPI.cpp.

666 {
667  return Exec()->GetNym_NymboxHash(SERVER_ID, NYM_ID);
668 }
EXPORT std::string GetNym_NymboxHash(const std::string &SERVER_ID, const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutboxHash ( const std::string &  ACCOUNT_ID,
const std::string &  NYM_ID 
)
static

Definition at line 682 of file OTAPI.cpp.

684 {
685  return Exec()->GetNym_OutboxHash(ACCOUNT_ID, NYM_ID);
686 }
EXPORT std::string GetNym_OutboxHash(const std::string &ACCOUNT_ID, const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutmailContentsByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 728 of file OTAPI.cpp.

730 {
731  return Exec()->GetNym_OutmailContentsByIndex(NYM_ID, nIndex);
732 }
EXPORT std::string GetNym_OutmailContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetNym_OutmailCount ( const std::string &  NYM_ID)
static

Definition at line 723 of file OTAPI.cpp.

724 {
725  return Exec()->GetNym_OutmailCount(NYM_ID);
726 }
EXPORT int32_t GetNym_OutmailCount(const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutmailRecipientIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 734 of file OTAPI.cpp.

736 {
737  return Exec()->GetNym_OutmailRecipientIDByIndex(NYM_ID, nIndex);
738 }
EXPORT std::string GetNym_OutmailRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutmailServerIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 740 of file OTAPI.cpp.

742 {
743  return Exec()->GetNym_OutmailServerIDByIndex(NYM_ID, nIndex);
744 }
EXPORT std::string GetNym_OutmailServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutpaymentsContentsByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 763 of file OTAPI.cpp.

765 {
766  return Exec()->GetNym_OutpaymentsContentsByIndex(NYM_ID, nIndex);
767 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetNym_OutpaymentsContentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
int32_t opentxs::OTAPI_Wrap::GetNym_OutpaymentsCount ( const std::string &  NYM_ID)
static

Definition at line 758 of file OTAPI.cpp.

759 {
760  return Exec()->GetNym_OutpaymentsCount(NYM_ID);
761 }
EXPORT int32_t GetNym_OutpaymentsCount(const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_OutpaymentsRecipientIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 769 of file OTAPI.cpp.

771 {
772  return Exec()->GetNym_OutpaymentsRecipientIDByIndex(NYM_ID, nIndex);
773 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetNym_OutpaymentsRecipientIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
std::string opentxs::OTAPI_Wrap::GetNym_OutpaymentsServerIDByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 775 of file OTAPI.cpp.

777 {
778  return Exec()->GetNym_OutpaymentsServerIDByIndex(NYM_ID, nIndex);
779 }
EXPORT std::string GetNym_OutpaymentsServerIDByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_RecentHash ( const std::string &  SERVER_ID,
const std::string &  NYM_ID 
)
static

Definition at line 670 of file OTAPI.cpp.

672 {
673  return Exec()->GetNym_RecentHash(SERVER_ID, NYM_ID);
674 }
EXPORT std::string GetNym_RecentHash(const std::string &SERVER_ID, const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_RevokedCredContents ( const std::string &  NYM_ID,
const std::string &  CREDENTIAL_ID 
)
static

Definition at line 414 of file OTAPI.cpp.

416 {
417  return Exec()->GetNym_RevokedCredContents(NYM_ID, CREDENTIAL_ID);
418 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetNym_RevokedCredContents(const std::string &NYM_ID, const std::string &CREDENTIAL_ID) const
Definition: OTAPI_Exec.cpp:797
int32_t opentxs::OTAPI_Wrap::GetNym_RevokedCredCount ( const std::string &  NYM_ID)
static

Definition at line 403 of file OTAPI.cpp.

404 {
405  return Exec()->GetNym_RevokedCredCount(NYM_ID);
406 }
EXPORT int32_t GetNym_RevokedCredCount(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:755
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_RevokedCredID ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 408 of file OTAPI.cpp.

410 {
411  return Exec()->GetNym_RevokedCredID(NYM_ID, nIndex);
412 }
EXPORT std::string GetNym_RevokedCredID(const std::string &NYM_ID, const int32_t &nIndex) const
Definition: OTAPI_Exec.cpp:773
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_SourceForID ( const std::string &  NYM_ID)
static

Definition at line 376 of file OTAPI.cpp.

377 {
378  return Exec()->GetNym_SourceForID(NYM_ID);
379 }
EXPORT std::string GetNym_SourceForID(const std::string &NYM_ID) const
Definition: OTAPI_Exec.cpp:656
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_Stats ( const std::string &  NYM_ID)
static

Definition at line 659 of file OTAPI.cpp.

660 {
661  return Exec()->GetNym_Stats(NYM_ID);
662 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetNym_Stats(const std::string &NYM_ID) const
std::string opentxs::OTAPI_Wrap::GetNym_SubCredentialContents ( const std::string &  NYM_ID,
const std::string &  MASTER_CRED_ID,
const std::string &  SUB_CRED_ID 
)
static

Definition at line 433 of file OTAPI.cpp.

436 {
437  return Exec()->GetNym_SubCredentialContents(NYM_ID, MASTER_CRED_ID,
438  SUB_CRED_ID);
439 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
int32_t opentxs::OTAPI_Wrap::GetNym_SubcredentialCount ( const std::string &  NYM_ID,
const std::string &  MASTER_CRED_ID 
)
static

Definition at line 420 of file OTAPI.cpp.

422 {
423  return Exec()->GetNym_SubcredentialCount(NYM_ID, MASTER_CRED_ID);
424 }
EXPORT int32_t GetNym_SubcredentialCount(const std::string &NYM_ID, const std::string &MASTER_CRED_ID) const
Definition: OTAPI_Exec.cpp:820
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetNym_SubCredentialID ( const std::string &  NYM_ID,
const std::string &  MASTER_CRED_ID,
const int32_t &  nIndex 
)
static

Definition at line 426 of file OTAPI.cpp.

429 {
430  return Exec()->GetNym_SubCredentialID(NYM_ID, MASTER_CRED_ID, nIndex);
431 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetNym_TransactionNumCount ( const std::string &  SERVER_ID,
const std::string &  NYM_ID 
)
static
   ----------------------------------------------------------

GET NYM TRANSACTION NUM COUNT How many transaction numbers does the Nym have (for a given server?)

This function returns the count of numbers available. If 0, then no transactions will work until you call getTransactionNumber() to replenish your Nym's supply for that ServerID...

Returns a count (0 through N numbers available), or -1 for error (no nym found.)

Definition at line 888 of file OTAPI.cpp.

890 {
891  return Exec()->GetNym_TransactionNumCount(SERVER_ID, NYM_ID);
892 }
EXPORT int32_t GetNym_TransactionNumCount(const std::string &SERVER_ID, const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getNymbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 2209 of file OTAPI.cpp.

2211 {
2212  return Exec()->getNymbox(SERVER_ID, USER_ID);
2213 }
EXPORT int32_t getNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetNymCount ( void  )
static

Definition at line 511 of file OTAPI.cpp.

512 {
513  return Exec()->GetNymCount();
514 }
EXPORT int32_t GetNymCount() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getOutbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID 
)
static

Definition at line 2215 of file OTAPI.cpp.

2218 {
2219  return Exec()->getOutbox(SERVER_ID, USER_ID, ACCT_ID);
2220 }
EXPORT int32_t getOutbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getRequest ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

GET REQUEST NUMBER

Nearly every message to the server needs to have the current "Request Number" attached to it. This is a number that, for each user, starts at 0, and increments with each command. Usually, the number simply increments on both sides, and there is no need to communicate it.

BUT SOMETIMES the request number GOES OUT OF SYNC... When this happen, none of your commands will work anymore!

To fix it, just call this function.

After you call it, it will automatically synchronize your wallet with the request number on the server side, and your commands will start working again.

Without understanding this simple concept, NONE of your messages will go through! This mechanism prevents an attack from intercepting a message and sending it multiple times.

Definition at line 2069 of file OTAPI.cpp.

2071 {
2072  return Exec()->getRequest(SERVER_ID, USER_ID);
2073 }
EXPORT int32_t getRequest(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetSentMessage ( const int64_t &  REQUEST_NUMBER,
const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 2344 of file OTAPI.cpp.

2347 {
2348  return Exec()->GetSentMessage(REQUEST_NUMBER, SERVER_ID, USER_ID);
2349 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string GetSentMessage(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
std::string opentxs::OTAPI_Wrap::GetServer_Contract ( const std::string &  SERVER_ID)
static

Definition at line 479 of file OTAPI.cpp.

480 {
481  return Exec()->GetServer_Contract(SERVER_ID);
482 }
EXPORT std::string GetServer_Contract(const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetServer_ID ( const int32_t &  nIndex)
static

Definition at line 894 of file OTAPI.cpp.

895 {
896  return Exec()->GetServer_ID(nIndex);
897 }
EXPORT std::string GetServer_ID(const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::GetServer_Name ( const std::string &  SERVER_ID)
static

Definition at line 899 of file OTAPI.cpp.

900 {
901  return Exec()->GetServer_Name(THE_ID);
902 }
EXPORT std::string GetServer_Name(const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::GetServerCount ( void  )
static
    --------------------------------------------------

NOTE: THE BELOW FUNCTIONS DO NOT SEND ANY MESSAGE TO THE SERVER, BUT RATHER, THEY ONLY QUERY FOR DATA FROM LOCAL STORAGE.

Often a server response will cause a change to the data in local storage. These functions allow you to re-load that data so your GUI can reflect the updates to those files.

Definition at line 516 of file OTAPI.cpp.

517 {
518  return Exec()->GetServerCount();
519 }
EXPORT int32_t GetServerCount() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
time64_t opentxs::OTAPI_Wrap::GetTime ( void  )
static
TIME (in seconds)

This will return the current time in seconds, as a string. Returns nullptr if failure.

Todo: consider making this available on the server side as well, so the smart contracts can see what time it is.

Definition at line 941 of file OTAPI.cpp.

942 {
943  return Exec()->GetTime();
944 }
EXPORT time64_t GetTime() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::getTransactionNumber ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

GET TRANSACTION NUMBER

Every TRANSACTION must be accompanied by a TRANSACTION NUMBER and you can only use a transaction number that was given to you previously by the server. If you run out of transaction numbers, then just call the below API function to get a new one (call it a few times so your wallet has a few in reserve.)

The server usually sends you new transaction numbers whenever you successfully do commands, but if you run out, you just call that function.

Without understanding this, none of your transactions would ever go through! This mechanism is what makes it possible to prove balances and transactions, without having to store any account history!

Definition at line 2169 of file OTAPI.cpp.

2171 {
2172  return Exec()->getTransactionNumber(SERVER_ID, USER_ID);
2173 }
EXPORT int32_t getTransactionNumber(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::HaveAlreadySeenReply ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const int64_t &  REQUEST_NUMBER 
)
static
    If the client-side has ALREADY seen the server's reply to a specific

request number, he stores that number in a list which can be queried using this function. A copy of that list is sent with nearly every request message sent to the server. This way the server can see which replies you have already received. The server will mirror every number it sees (it sends its own list in all its replies.) Whenever you see a number mirrored in the server's reply, that means the server now knows you got its original reply (the one referenced by the number) and the server removed any replyNotice of that from your Nymbox (so you don't have to download it.) Basically that means you can go ahead and remove it from your list, and once you do, the server will remove its matching copy as well. When you are downloading your box receipts, you can skip any receipts where you have ALREADY seen the reply. So you can use this function to see if you already saw it, and if you did, then you can skip downloading that box receipt. Warning: this function isn't "perfect", in the sense that it cannot tell you definitively whether you have actually seen a server reply, but it CAN tell you if you have seen one until it finishes the above-described protocol (it will work in that way, which is how it was intended.) But after that, it will no longer know if you got the reply since it has removed it from its list. returns OT_BOOL.

Definition at line 1506 of file OTAPI.cpp.

1509 {
1510  return Exec()->HaveAlreadySeenReply(SERVER_ID, USER_ID, REQUEST_NUMBER);
1511 }
EXPORT bool HaveAlreadySeenReply(const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Hook_GetClauseAtIndex ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  HOOK_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1333 of file OTAPI.cpp.

1337 {
1338  return Exec()->Hook_GetClauseAtIndex(THE_CONTRACT, BYLAW_NAME, HOOK_NAME,
1339  nIndex);
1340 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Hook_GetClauseCount ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  HOOK_NAME 
)
static

Definition at line 1326 of file OTAPI.cpp.

1329 {
1330  return Exec()->Hook_GetClauseCount(THE_CONTRACT, BYLAW_NAME, HOOK_NAME);
1331 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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.
std::string opentxs::OTAPI_Wrap::Hook_GetNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1319 of file OTAPI.cpp.

1322 {
1323  return Exec()->Hook_GetNameByIndex(THE_CONTRACT, BYLAW_NAME, nIndex);
1324 }
EXPORT std::string Hook_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Instrmnt_GetAmount ( const std::string &  THE_INSTRUMENT)
static

THESE FUNCTIONS were added for the PAYMENTS screen. (They are fairly new.)

Basically there was a need to have DIFFERENT instruments, but to be able to treat them as though they are a single type.

In keeping with that, the below functions will work with disparate types. You can pass [ CHEQUES / VOUCHERS / INVOICES ] and PAYMENT PLANS, and SMART CONTRACTS, and PURSEs into these functions, and they should be able to handle any of those types.

Definition at line 793 of file OTAPI.cpp.

794 {
795  return Exec()->Instrmnt_GetAmount(THE_INSTRUMENT);
796 }
EXPORT int64_t Instrmnt_GetAmount(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetAssetID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 828 of file OTAPI.cpp.

829 {
830  return Exec()->Instrmnt_GetAssetID(THE_INSTRUMENT);
831 }
EXPORT std::string Instrmnt_GetAssetID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetMemo ( const std::string &  THE_INSTRUMENT)
static

Definition at line 818 of file OTAPI.cpp.

819 {
820  return Exec()->Instrmnt_GetMemo(THE_INSTRUMENT);
821 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Instrmnt_GetMemo(const std::string &THE_INSTRUMENT) const
std::string opentxs::OTAPI_Wrap::Instrmnt_GetRecipientAcctID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 863 of file OTAPI.cpp.

865 {
866  return Exec()->Instrmnt_GetRecipientAcctID(THE_INSTRUMENT);
867 }
EXPORT std::string Instrmnt_GetRecipientAcctID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetRecipientUserID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 857 of file OTAPI.cpp.

859 {
860  return Exec()->Instrmnt_GetRecipientUserID(THE_INSTRUMENT);
861 }
EXPORT std::string Instrmnt_GetRecipientUserID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetRemitterAcctID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 839 of file OTAPI.cpp.

841 {
842  return Exec()->Instrmnt_GetRemitterAcctID(THE_INSTRUMENT);
843 }
EXPORT std::string Instrmnt_GetRemitterAcctID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetRemitterUserID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 833 of file OTAPI.cpp.

835 {
836  return Exec()->Instrmnt_GetRemitterUserID(THE_INSTRUMENT);
837 }
EXPORT std::string Instrmnt_GetRemitterUserID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetSenderAcctID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 851 of file OTAPI.cpp.

853 {
854  return Exec()->Instrmnt_GetSenderAcctID(THE_INSTRUMENT);
855 }
EXPORT std::string Instrmnt_GetSenderAcctID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetSenderUserID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 845 of file OTAPI.cpp.

847 {
848  return Exec()->Instrmnt_GetSenderUserID(THE_INSTRUMENT);
849 }
EXPORT std::string Instrmnt_GetSenderUserID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetServerID ( const std::string &  THE_INSTRUMENT)
static

Definition at line 823 of file OTAPI.cpp.

824 {
825  return Exec()->Instrmnt_GetServerID(THE_INSTRUMENT);
826 }
EXPORT std::string Instrmnt_GetServerID(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Instrmnt_GetTransNum ( const std::string &  THE_INSTRUMENT)
static

Definition at line 798 of file OTAPI.cpp.

799 {
800  return Exec()->Instrmnt_GetTransNum(THE_INSTRUMENT);
801 }
EXPORT int64_t Instrmnt_GetTransNum(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Instrmnt_GetType ( const std::string &  THE_INSTRUMENT)
static

Definition at line 813 of file OTAPI.cpp.

814 {
815  return Exec()->Instrmnt_GetType(THE_INSTRUMENT);
816 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Instrmnt_GetType(const std::string &THE_INSTRUMENT) const
time64_t opentxs::OTAPI_Wrap::Instrmnt_GetValidFrom ( const std::string &  THE_INSTRUMENT)
static

Definition at line 803 of file OTAPI.cpp.

804 {
805  return Exec()->Instrmnt_GetValidFrom(THE_INSTRUMENT);
806 }
EXPORT time64_t Instrmnt_GetValidFrom(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
time64_t opentxs::OTAPI_Wrap::Instrmnt_GetValidTo ( const std::string &  THE_INSTRUMENT)
static

Definition at line 808 of file OTAPI.cpp.

809 {
810  return Exec()->Instrmnt_GetValidTo(THE_INSTRUMENT);
811 }
EXPORT time64_t Instrmnt_GetValidTo(const std::string &THE_INSTRUMENT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::IsBasketCurrency ( const std::string &  ASSET_TYPE_ID)
static
    --------------------------------------------------------------

IS BASKET CURRENCY ?

Tells you whether or not a given asset type is actually a basket currency.

Definition at line 1980 of file OTAPI.cpp.

1981 {
1982  return Exec()->IsBasketCurrency(ASSET_TYPE_ID);
1983 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT bool IsBasketCurrency(const std::string &ASSET_TYPE_ID) const
bool opentxs::OTAPI_Wrap::IsNym_RegisteredAtServer ( const std::string &  NYM_ID,
const std::string &  SERVER_ID 
)
static

Definition at line 653 of file OTAPI.cpp.

655 {
656  return Exec()->IsNym_RegisteredAtServer(NYM_ID, SERVER_ID);
657 }
EXPORT bool IsNym_RegisteredAtServer(const std::string &NYM_ID, const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::issueAssetType ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_CONTRACT 
)
static
    --------------------------------------------------------------------

ISSUE ASSET TYPE – Ask the server to issue a new asset type.

THE_CONTRACT is actually a string containing the asset contract itself. (And the server will not issue the new asset type unless the key in the contract matches YOUR UserID. Only the contract signer may issue it.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2075 of file OTAPI.cpp.

2078 {
2079  return Exec()->issueAssetType(SERVER_ID, USER_ID, THE_CONTRACT);
2080 }
EXPORT int32_t issueAssetType(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::issueBasket ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_BASKET 
)
static
--------------------------------------------------------------------------

ISSUE BASKET CURRENCY

Issue a new asset type based on a BASKET of other asset types! You cannot call this function until you first set up the BASKET_INFO object. I will provide functions for setting up that object, so that you can then call this function to actually message the server with your request.

ANYONE can issue a new basket type, but they will have no control over the issuer account. Normally when issuing a currency, you therefore control the issuer account. But with baskets, that is managed internally by the server. This means anyone can define a basket, and all may use it – but no one controls it except the server.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2132 of file OTAPI.cpp.

2135 {
2136  return Exec()->issueBasket(SERVER_ID, USER_ID, THE_BASKET);
2137 }
EXPORT int32_t issueBasket(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_BASKET) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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
    --------------------------------------------------

ISSUE MARKET OFFER

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2292 of file OTAPI.cpp.

2298 {
2299  return Exec()->issueMarketOffer(
2300  ASSET_ACCT_ID, CURRENCY_ACCT_ID, MARKET_SCALE, MINIMUM_INCREMENT,
2301  TOTAL_ASSETS_ON_OFFER, PRICE_LIMIT, bBuyingOrSelling,
2302  LIFESPAN_IN_SECONDS, STOP_SIGN, ACTIVATION_PRICE);
2303 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OTAPI_Exec * opentxs::OTAPI_Wrap::It ( )
static

Definition at line 174 of file OTAPI.cpp.

175 {
176  return Exec();
177 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::killMarketOffer ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ASSET_ACCT_ID,
const int64_t &  TRANSACTION_NUMBER 
)
static

Definition at line 2274 of file OTAPI.cpp.

2278 {
2279  return Exec()->killMarketOffer(SERVER_ID, USER_ID, ASSET_ACCT_ID,
2280  TRANSACTION_NUMBER);
2281 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::killPaymentPlan ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  FROM_ACCT_ID,
const int64_t &  TRANSACTION_NUMBER 
)
static

Definition at line 2283 of file OTAPI.cpp.

2287 {
2288  return Exec()->killPaymentPlan(SERVER_ID, USER_ID, FROM_ACCT_ID,
2289  TRANSACTION_NUMBER);
2290 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Add a transaction to a ledger.

Definition at line 1668 of file OTAPI.cpp.

1672 {
1673  return Exec()->Ledger_AddTransaction(SERVER_ID, USER_ID, ACCOUNT_ID,
1674  THE_LEDGER, THE_TRANSACTION);
1675 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Ledger_CreateResponse ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  ORIGINAL_LEDGER 
)
static

Creates a new 'response' ledger, set up with the right Server ID, etc,.

add the 'response' transactions to it, one by one. (Pass in the original that you are responding to, as it uses the data from it to set up the

Definition at line 1623 of file OTAPI.cpp.

1626 {
1627  return Exec()->Ledger_CreateResponse(SERVER_ID, USER_ID, ACCOUNT_ID,
1628  ORIGINAL_LEDGER);
1629 }
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,.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Ledger_FinalizeResponse ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_LEDGER 
)
static
-------------------------------------------------------------------------

(Response Ledger) LEDGER FINALIZE RESPONSE

AFTER you have set up all the transaction responses, call THIS function to finalize them by adding a BALANCE AGREEMENT.

MAKE SURE you have the latest copy of the account file, inbox file, and outbox file, since we will need those in here to create the balance statement properly.

(Client software may wish to check those things, when downloaded, against the local copies and the local signed receipts. In this way, clients can protect themselves against malicious servers.)

Definition at line 1687 of file OTAPI.cpp.

1691 {
1692  return Exec()->Ledger_FinalizeResponse(SERVER_ID, USER_ID, ACCOUNT_ID,
1693  THE_LEDGER);
1694 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Ledger_GetCount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_LEDGER 
)
static

Find out how many pending transactions (and receipts) are in this inbox.

Definition at line 1615 of file OTAPI.cpp.

1619 {
1620  return Exec()->Ledger_GetCount(SERVER_ID, USER_ID, ACCOUNT_ID, THE_LEDGER);
1621 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static
-------------------------------------------------------------------------

Ledger_GetInstrument (by index)

Lookup a financial instrument (from within a transaction that is inside a ledger) based on index or transaction number.

sendUserInstrument does this:
-- Puts an OTPayment (a form of contract) as an encrypted Payload on an
OTMessage(1).
-- Also puts instrument (same contract) as CLEAR payload on an OTMessage(2).
-- (1) is sent to server, and (2) is added to Outpayments messages.
-- (1) gets added to recipient's Nymbox as "in ref to" string on a
"instrumentNotice" transaction.
-- When recipient processes Nymbox, the "instrumentNotice" transaction
(containing (1) in its "in ref to"
field) is copied and added to the recipient's paymentInbox.
-- When recipient iterates through paymentInbox transactions, they are ALL
"instrumentNotice"s. Each
transaction contains an OTMessage in its "in ref to" field, and that
OTMessage object contains an
encrypted payload of the instrument itself (an OTPayment object containing a
cheque or payment plan
or invoice etc.)
-- When sender gets Outpayments contents, the original instrument (inside an
OTPayment) is stored IN THE
CLEAR as payload on an OTMessage.

THEREFORE:
TO EXTRACT INSTRUMENT FROM PAYMENTS INBOX:
-- Iterate through the transactions in the payments inbox.
-- (They should all be "instrumentNotice" transactions.)
-- Each transaction contains (1) OTMessage in "in ref to" field, which in
turn contains an encrypted
OTPayment in the payload field, which then contains the instrument itself.
-- *** Therefore, this function, based purely on ledger index (as we
iterate) extracts the
OTMessage from the Transaction "in ref to" field (for the transaction at
that index), then decrypts
the payload on that message and returns the decrypted cleartext.

Definition at line 1649 of file OTAPI.cpp.

1654 {
1655  return Exec()->Ledger_GetInstrument(SERVER_ID, USER_ID, ACCOUNT_ID,
1656  THE_LEDGER, nIndex);
1657 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1640 of file OTAPI.cpp.

1644 {
1645  return Exec()->Ledger_GetTransactionByID(SERVER_ID, USER_ID, ACCOUNT_ID,
1646  THE_LEDGER, TRANSACTION_NUMBER);
1647 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Lookup a transaction or its ID (from within a ledger) based on index or transaction number.

Definition at line 1631 of file OTAPI.cpp.

1635 {
1636  return Exec()->Ledger_GetTransactionByIndex(SERVER_ID, USER_ID, ACCOUNT_ID,
1637  THE_LEDGER, nIndex);
1638 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
int64_t opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1659 of file OTAPI.cpp.

1663 {
1665  SERVER_ID, USER_ID, ACCOUNT_ID, THE_LEDGER, nIndex);
1666 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
std::string opentxs::OTAPI_Wrap::LoadAssetAccount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static
    --------------------------------------------------------------

LOAD ACCOUNT / INBOX / OUTBOX – (from local storage)

Loads an acct, or inbox or outbox, based on account ID, (from local storage) and returns it as string (or returns nullptr if it couldn't load it.)

Definition at line 1492 of file OTAPI.cpp.

1495 {
1496  return Exec()->LoadAssetAccount(SERVER_ID, USER_ID, ACCOUNT_ID);
1497 }
EXPORT std::string LoadAssetAccount(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadAssetContract ( const std::string &  ASSET_TYPE_ID)
static

Definition at line 1482 of file OTAPI.cpp.

1483 {
1484  return Exec()->LoadAssetContract(ASSET_TYPE_ID);
1485 }
EXPORT std::string LoadAssetContract(const std::string &ASSET_TYPE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadExpiredBox ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1579 of file OTAPI.cpp.

1581 {
1582  return Exec()->LoadExpiredBox(SERVER_ID, USER_ID);
1583 }
EXPORT std::string LoadExpiredBox(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadExpiredBoxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1585 of file OTAPI.cpp.

1587 {
1588  return Exec()->LoadExpiredBoxNoVerify(SERVER_ID, USER_ID);
1589 }
EXPORT std::string LoadExpiredBoxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadInbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

Definition at line 1525 of file OTAPI.cpp.

1528 {
1529  return Exec()->LoadInbox(SERVER_ID, USER_ID, ACCOUNT_ID);
1530 }
EXPORT std::string LoadInbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadInboxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

These versions don't verify the ledger, they just load it up.

Definition at line 1532 of file OTAPI.cpp.

1535 {
1536  return Exec()->LoadInboxNoVerify(SERVER_ID, USER_ID, ACCOUNT_ID);
1537 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadMint ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID 
)
static

Definition at line 1476 of file OTAPI.cpp.

1478 {
1479  return Exec()->LoadMint(SERVER_ID, ASSET_TYPE_ID);
1480 }
EXPORT std::string LoadMint(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadNymbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1513 of file OTAPI.cpp.

1515 {
1516  return Exec()->LoadNymbox(SERVER_ID, USER_ID);
1517 }
EXPORT std::string LoadNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadNymboxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1519 of file OTAPI.cpp.

1521 {
1522  return Exec()->LoadNymboxNoVerify(SERVER_ID, USER_ID);
1523 }
EXPORT std::string LoadNymboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadOutbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

Definition at line 1539 of file OTAPI.cpp.

1542 {
1543  return Exec()->LoadOutbox(SERVER_ID, USER_ID, ACCOUNT_ID);
1544 }
EXPORT std::string LoadOutbox(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadOutboxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

Definition at line 1546 of file OTAPI.cpp.

1549 {
1550  return Exec()->LoadOutboxNoVerify(SERVER_ID, USER_ID, ACCOUNT_ID);
1551 }
EXPORT std::string LoadOutboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadPaymentInbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1553 of file OTAPI.cpp.

1555 {
1556  return Exec()->LoadPaymentInbox(SERVER_ID, USER_ID);
1557 }
EXPORT std::string LoadPaymentInbox(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadPaymentInboxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 1559 of file OTAPI.cpp.

1561 {
1562  return Exec()->LoadPaymentInboxNoVerify(SERVER_ID, USER_ID);
1563 }
EXPORT std::string LoadPaymentInboxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadPubkey_Encryption ( const std::string &  USER_ID)
static
    -----------------------------------------------------------------

LOAD PUBLIC KEY – from local storage

(returns as STRING)

MEANT TO BE USED in cases where a private key is NOT available.

Definition at line 1445 of file OTAPI.cpp.

1446 {
1447  return Exec()->LoadPubkey_Encryption(USER_ID);
1448 }
EXPORT std::string LoadPubkey_Encryption(const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadPubkey_Signing ( const std::string &  USER_ID)
static

Definition at line 1450 of file OTAPI.cpp.

1451 {
1452  return Exec()->LoadPubkey_Signing(USER_ID);
1453 }
EXPORT std::string LoadPubkey_Signing(const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadPurse ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  USER_ID 
)
static
    --------------------------------------------------------------

LOAD PURSE or Mint or ASSET CONTRACT or SERVER CONTRACT – (from local storage)

Based on Asset Type ID: load a purse, a public mint, or an asset/server contract and return it as a string – or return nullptr if it wasn't found.

Definition at line 1829 of file OTAPI.cpp.

1832 {
1833  return Exec()->LoadPurse(SERVER_ID, ASSET_TYPE_ID, USER_ID);
1834 }
EXPORT std::string LoadPurse(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadRecordBox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

NOTE: Sometimes the user ID is also passed in the "account ID" field,.

on what kind of record box it is.

Definition at line 1565 of file OTAPI.cpp.

1568 {
1569  return Exec()->LoadRecordBox(SERVER_ID, USER_ID, ACCOUNT_ID);
1570 }
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,.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadRecordBoxNoVerify ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID 
)
static

Definition at line 1572 of file OTAPI.cpp.

1575 {
1576  return Exec()->LoadRecordBoxNoVerify(SERVER_ID, USER_ID, ACCOUNT_ID);
1577 }
EXPORT std::string LoadRecordBoxNoVerify(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadServerContract ( const std::string &  SERVER_ID)
static

Definition at line 1487 of file OTAPI.cpp.

1488 {
1489  return Exec()->LoadServerContract(SERVER_ID);
1490 }
EXPORT std::string LoadServerContract(const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadUserPubkey_Encryption ( const std::string &  USER_ID)
static
    -----------------------------------------------------------------

LOAD USER PUBLIC KEY – from local storage

(returns as STRING)

MEANT TO BE USED in cases where a private key is also available.

Definition at line 1455 of file OTAPI.cpp.

1456 {
1457  return Exec()->LoadUserPubkey_Encryption(USER_ID);
1458 }
EXPORT std::string LoadUserPubkey_Encryption(const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LoadUserPubkey_Signing ( const std::string &  USER_ID)
static

Definition at line 1460 of file OTAPI.cpp.

1461 {
1462  return Exec()->LoadUserPubkey_Signing(USER_ID);
1463 }
EXPORT std::string LoadUserPubkey_Signing(const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::LoadWallet ( )
static

LOAD WALLET

Next you'll want to load your wallet up. It needs to be in the data_folder. The filename is set in the configuration. Use "SET WALLET FILENAME" to change it.

The Default Filename is "wallet.xml"

LoadWallet();

Definition at line 289 of file OTAPI.cpp.

290 {
291  return Exec()->LoadWallet();
292 }
EXPORT bool LoadWallet() const
Definition: OTAPI_Exec.cpp:363
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::LongToString ( const int64_t &  lNumber)
static

Definition at line 259 of file OTAPI.cpp.

260 {
261  return Exec()->LongToString(lNumber);
262 }
EXPORT std::string LongToString(const int64_t &lNumber) const
Definition: OTAPI_Exec.cpp:291
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_BOOL opentxs::OTAPI_Wrap::Message_GetBalanceAgreementSuccess ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_MESSAGE 
)
static
    -----------------------------------------------------------

GET BALANCE AGREEMENT SUCCESS (From a MESSAGE.)

Returns OT_TRUE (1) for Success and OT_FALSE (0) for Failure. Returns OT_ERROR for error. (-1)

Definition at line 1813 of file OTAPI.cpp.

1816 {
1817  return Exec()->Message_GetBalanceAgreementSuccess(SERVER_ID, USER_ID,
1818  ACCOUNT_ID, THE_MESSAGE);
1819 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetCommand ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET MESSAGE COMMAND TYPE

This way you can discover what kind of command it was. All server replies are pre-pended with the @ sign. For example, if you send a "getAccount" message, the server reply is "@getAccount", and if you send "getMint" the reply is "@getMint", and so on.

Definition at line 2391 of file OTAPI.cpp.

2392 {
2393  return Exec()->Message_GetCommand(THE_MESSAGE);
2394 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Message_GetCommand(const std::string &THE_MESSAGE) const
int32_t opentxs::OTAPI_Wrap::Message_GetDepth ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET MESSAGE "DEPTH" (USED FOR MARKET-SPECIFIC MESSAGES.)

Returns the count of relevant items, so you know whether to bother reading the payload. Returns -1 if error.

The "depth" variable stores the count of items being returned. For example, if I call getMarketList, and 10 markets are returned, then depth will be set to 10. OR, if I call getNym_MarketOffers, and the Nym has 16 offers on the various markets, then the depth will be 16.

This value is important when processing server replies to market inquiries. If the depth is 0, then you are done. End. BUT! if it contains a number, such as 10, then that means you will want to next READ those 10 markets (or offers, or trades, etc) out of the server reply's payload.

Whereas if success is TRUE, but depth is 0, that means while the message processed successfully, the list was simply empty (and thus it would be a waste of time trying to unpack the non-existent, empty list of data items from the payload of your successful reply.)

Definition at line 2428 of file OTAPI.cpp.

2429 {
2430  return Exec()->Message_GetDepth(THE_MESSAGE);
2431 }
EXPORT int32_t Message_GetDepth(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetLedger ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET MESSAGE LEDGER

If you just received a server response to a transaction, and you want to actually iterate through the response ledger for that transaction, this function will retrieve it for you.

Definition at line 2396 of file OTAPI.cpp.

2397 {
2398  return Exec()->Message_GetLedger(THE_MESSAGE);
2399 }
EXPORT std::string Message_GetLedger(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetNewAcctID ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET NEW ACCOUNT ID

If you just opened a new asset account, you'll want to read the server reply and get the new acct ID out of it. Otherwise how will you know which account you just created? This function allows you to get the new account ID out of the server reply message.

Definition at line 2413 of file OTAPI.cpp.

2414 {
2415  return Exec()->Message_GetNewAcctID(THE_MESSAGE);
2416 }
EXPORT std::string Message_GetNewAcctID(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetNewAssetTypeID ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET NEW ASSET TYPE ID

If you just issued a new asset type, you'll want to read the server reply and get the new asset type ID out of it. Otherwise how will you ever open accounts in that new type?

Definition at line 2401 of file OTAPI.cpp.

2403 {
2404  return Exec()->Message_GetNewAssetTypeID(THE_MESSAGE);
2405 }
EXPORT std::string Message_GetNewAssetTypeID(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetNewIssuerAcctID ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET NEW ISSUER ACCOUNT ID

If you just issued a new asset type, you'll want to read the server reply and get the new issuer acct ID out of it. Otherwise how will you ever issue anything with it?

Definition at line 2407 of file OTAPI.cpp.

2409 {
2410  return Exec()->Message_GetNewIssuerAcctID(THE_MESSAGE);
2411 }
EXPORT std::string Message_GetNewIssuerAcctID(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetNymboxHash ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET NYMBOX HASH

Some messages include a copy of the Nymbox Hash. This helps the server to quickly ascertain whether some messages will fail, and also allows the client to query the server for this information for syncronicity purposes.

Definition at line 2418 of file OTAPI.cpp.

2419 {
2420  return Exec()->Message_GetNymboxHash(THE_MESSAGE);
2421 }
EXPORT std::string Message_GetNymboxHash(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Message_GetPayload ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET MESSAGE PAYLOAD

This way you can retrieve the payload from any message. Useful, for example, for getting the encoded StringMap object from the queryAssetTypes and messages, which both use the m_ascPayload field to transport it.

Definition at line 2386 of file OTAPI.cpp.

2387 {
2388  return Exec()->Message_GetPayload(THE_MESSAGE);
2389 }
EXPORT std::string Message_GetPayload(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_BOOL opentxs::OTAPI_Wrap::Message_GetSuccess ( const std::string &  THE_MESSAGE)
static
    -----------------------------------------------------------

GET MESSAGE SUCCESS (True or False)

Returns OT_TRUE (1) for Success and OT_FALSE (0) for Failure. Returns -1 for Error condition.

Definition at line 2423 of file OTAPI.cpp.

2424 {
2425  return Exec()->Message_GetSuccess(THE_MESSAGE);
2426 }
EXPORT int32_t Message_GetSuccess(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_BOOL opentxs::OTAPI_Wrap::Message_GetTransactionSuccess ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_MESSAGE 
)
static
    -----------------------------------------------------------

GET MESSAGE TRANSACTION SUCCESS (True or False)

Returns OT_TRUE (1) for Success and OT_FALSE (0) for Failure. Returns OT_ERROR for error. (-1)

Definition at line 2441 of file OTAPI.cpp.

2444 {
2445  return Exec()->Message_GetTransactionSuccess(SERVER_ID, USER_ID, ACCOUNT_ID,
2446  THE_MESSAGE);
2447 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Message_GetUsageCredits ( const std::string &  THE_MESSAGE)
static
    IF THE_MESSAGE is of command type @usageCredits, and IF it was a
SUCCESS,

then this function returns the usage credits BALANCE (it's a int64_t, but passed as a string). If you adjusted the balance using the usageCredits command (THE_MESSAGE being the server's reply to that) then you will see the balance AFTER the adjustment. (The current "Usage Credits" balance.)

Definition at line 2027 of file OTAPI.cpp.

2028 {
2029  return Exec()->Message_GetUsageCredits(THE_MESSAGE);
2030 }
EXPORT int64_t Message_GetUsageCredits(const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_BOOL opentxs::OTAPI_Wrap::Message_IsTransactionCanceled ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_MESSAGE 
)
static

Definition at line 2433 of file OTAPI.cpp.

2436 {
2437  return Exec()->Message_IsTransactionCanceled(SERVER_ID, USER_ID, ACCOUNT_ID,
2438  THE_MESSAGE);
2439 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Mint_IsStillGood ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID 
)
static

Returns OT_TRUE if the mint is still usable. Returns OT_FALSE if expired or other error.

Definition at line 1470 of file OTAPI.cpp.

1472 {
1473  return Exec()->Mint_IsStillGood(SERVER_ID, ASSET_TYPE_ID);
1474 }
EXPORT bool Mint_IsStillGood(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1434 of file OTAPI.cpp.

1439 {
1441  THE_MESSAGE, USER_ID, bHarvestingForRetry, bReplyWasSuccess,
1442  bReplyWasFailure, bTransactionWasSuccess, bTransactionWasFailure);
1443 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::notarizeDeposit ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID,
const std::string &  THE_PURSE 
)
static
--------------------------------------------------------------------------

DEPOSIT CASH

Use LoadPurse to load a purse from storage, and then use this function to actually deposit that cash into a server account. (The cash must, of course, be the same asset type as the account.)

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2183 of file OTAPI.cpp.

2187 {
2188  return Exec()->notarizeDeposit(SERVER_ID, USER_ID, ACCT_ID, THE_PURSE);
2189 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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
--------------------------------------------------------------------------

TRANSFER FROM ONE ASSET ACCOUNT TO ANOTHER

Send a request to the server to initiate a transfer from my account to another account's inbox. (With "transfer pending" notice in my outbox). Until the recipient accepts the transfer, I have the option to cancel it while it is still sitting in my outbox. But once he accepts it, it cannot be reversed. The server has signatures from BOTH parties requesting the transfer, and each party has the signature on the other party's request. Receipts are dropped into their respective inboxes.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2191 of file OTAPI.cpp.

2197 {
2198  return Exec()->notarizeTransfer(SERVER_ID, USER_ID, ACCT_FROM, ACCT_TO,
2199  AMOUNT, NOTE);
2200 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::notarizeWithdrawal ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID,
const int64_t &  AMOUNT 
)
static
--------------------------------------------------------------------------

WITHDRAW CASH

User is requesting the server to withdraw AMOUNT from ACCT_ID and return a purse containing cash tokens.

Cash tokens come in specific denominations, such as 10, 25, 100, etc. Thus, if you want to withdraw a specific amount, such as 1291, then you are not withdrawing a single token, but a purse full of them. (An "OTPurse" is the object that contains a list of tokens.)

Therefore, any transactions involving cash withdrawals or deposits, you are actually using an OTPurse, rather than manipulating the individual tokens.

If Open Transactions receives a purse in reply from the server, it will automatically save the tokens in that purse into your purse file for that asset type. You can then reload the purse using LoadPurse, if you want to see the updated contents.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2175 of file OTAPI.cpp.

2179 {
2180  return Exec()->notarizeWithdrawal(SERVER_ID, USER_ID, ACCT_ID, AMOUNT);
2181 }
EXPORT int32_t notarizeWithdrawal(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ACCT_ID, const int64_t &AMOUNT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::NumList_Add ( const std::string &  strNumList,
const std::string &  strNumbers 
)
static

These 2 functions aren't in the OT_API proper, but are only available inside the OTScripts on the client side. (They're not available in server-side scripts, and they're not available in, for example, the OTAPI Java programmable interface. You would use Java functions at that point.) Shown here only for reference.

Definition at line 329 of file OTAPI.cpp.

331 {
332  return Exec()->NumList_Add(strNumList, strNumbers);
333 }
EXPORT std::string NumList_Add(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:429
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::NumList_Count ( const std::string &  strNumList)
static

Definition at line 353 of file OTAPI.cpp.

354 {
355  return Exec()->NumList_Count(strNumList);
356 }
EXPORT int32_t NumList_Count(const std::string &strNumList) const
Definition: OTAPI_Exec.cpp:554
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::NumList_Remove ( const std::string &  strNumList,
const std::string &  strNumbers 
)
static

Definition at line 335 of file OTAPI.cpp.

337 {
338  return Exec()->NumList_Remove(strNumList, strNumbers);
339 }
EXPORT std::string NumList_Remove(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:466
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::NumList_VerifyAll ( const std::string &  strNumList,
const std::string &  strNumbers 
)
static

Definition at line 347 of file OTAPI.cpp.

349 {
350  return Exec()->NumList_VerifyAll(strNumList, strNumbers);
351 }
EXPORT bool NumList_VerifyAll(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:530
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::NumList_VerifyQuery ( const std::string &  strNumList,
const std::string &  strNumbers 
)
static

Definition at line 341 of file OTAPI.cpp.

343 {
344  return Exec()->NumList_VerifyQuery(strNumList, strNumbers);
345 }
EXPORT bool NumList_VerifyQuery(const std::string &strNumList, const std::string &strNumbers) const
Definition: OTAPI_Exec.cpp:501
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Nym_RemoveMailByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 711 of file OTAPI.cpp.

713 {
714  return Exec()->Nym_RemoveMailByIndex(NYM_ID, nIndex);
715 }
EXPORT bool Nym_RemoveMailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Nym_RemoveOutmailByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 746 of file OTAPI.cpp.

748 {
749  return Exec()->Nym_RemoveOutmailByIndex(NYM_ID, nIndex);
750 }
EXPORT bool Nym_RemoveOutmailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Nym_RemoveOutpaymentsByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 781 of file OTAPI.cpp.

783 {
784  return Exec()->Nym_RemoveOutpaymentsByIndex(NYM_ID, nIndex);
785 }
EXPORT bool Nym_RemoveOutpaymentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Nym_VerifyMailByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 717 of file OTAPI.cpp.

719 {
720  return Exec()->Nym_VerifyMailByIndex(NYM_ID, nIndex);
721 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT bool Nym_VerifyMailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
bool opentxs::OTAPI_Wrap::Nym_VerifyOutmailByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 752 of file OTAPI.cpp.

754 {
755  return Exec()->Nym_VerifyOutmailByIndex(NYM_ID, nIndex);
756 }
EXPORT bool Nym_VerifyOutmailByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Nym_VerifyOutpaymentsByIndex ( const std::string &  NYM_ID,
const int32_t &  nIndex 
)
static

Definition at line 787 of file OTAPI.cpp.

789 {
790  return Exec()->Nym_VerifyOutpaymentsByIndex(NYM_ID, nIndex);
791 }
EXPORT bool Nym_VerifyOutpaymentsByIndex(const std::string &NYM_ID, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Nymbox_GetReplyNotice ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const int64_t &  REQUEST_NUMBER 
)
static
    Some server replies (to your messages) are so important that a notice is
dropped

into your Nymbox with a copy of the server's reply. It's called a replyNotice. Since the server is usually replying to a message, I've added this function for quickly looking up the message reply, if it's there, based on the requestNumber. This is the only example in the entire OT API where a Transaction is looked-up from a ledger, based on a REQUEST NUMBER. (Normally transactions use transaction numbers, and messages use request numbers. But in this case, it's a transaction that carries a copy of a message.)

Definition at line 1499 of file OTAPI.cpp.

1502 {
1503  return Exec()->Nymbox_GetReplyNotice(SERVER_ID, USER_ID, REQUEST_NUMBER);
1504 }
EXPORT std::string Nymbox_GetReplyNotice(const std::string &SERVER_ID, const std::string &USER_ID, const int64_t &REQUEST_NUMBER) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_API * opentxs::OTAPI_Wrap::OTAPI ( )
static

Definition at line 244 of file OTAPI.cpp.

245 {
246  if (nullptr == exec) {
247  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
248  OT_FAIL;
249  }
250 
251  return exec->OTAPI();
252 }
EXPORT OT_API * OTAPI() const
Definition: OTAPI_Exec.cpp:281
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
void opentxs::OTAPI_Wrap::Output ( const int32_t &  nLogLevel,
const std::string &  strOutput 
)
static
Output to the screen (stderr.)

(This is so stdout can be left clean for the ACTUAL output.) Log level is 0 (least verbose) to 5 (most verbose.)

Definition at line 274 of file OTAPI.cpp.

275 {
276  return Exec()->Output(nLogLevel, strOutput);
277 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT void Output(const int32_t &nLogLevel, const std::string &strOutput) const
Definition: OTAPI_Exec.cpp:322
std::string opentxs::OTAPI_Wrap::Party_GetAcctAgentName ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const std::string &  ACCT_NAME 
)
static

Definition at line 1395 of file OTAPI.cpp.

1398 {
1399  return Exec()->Party_GetAcctAgentName(THE_CONTRACT, PARTY_NAME, ACCT_NAME);
1400 }
EXPORT std::string Party_GetAcctAgentName(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetAcctAssetID ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const std::string &  ACCT_NAME 
)
static

Definition at line 1388 of file OTAPI.cpp.

1391 {
1392  return Exec()->Party_GetAcctAssetID(THE_CONTRACT, PARTY_NAME, ACCT_NAME);
1393 }
EXPORT std::string Party_GetAcctAssetID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Party_GetAcctCount ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME 
)
static

Definition at line 1356 of file OTAPI.cpp.

1358 {
1359  return Exec()->Party_GetAcctCount(THE_CONTRACT, PARTY_NAME);
1360 }
EXPORT int32_t Party_GetAcctCount(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetAcctID ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const std::string &  ACCT_NAME 
)
static

Definition at line 1381 of file OTAPI.cpp.

1384 {
1385  return Exec()->Party_GetAcctID(THE_CONTRACT, PARTY_NAME, ACCT_NAME);
1386 }
EXPORT std::string Party_GetAcctID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &ACCT_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetAcctNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1374 of file OTAPI.cpp.

1377 {
1378  return Exec()->Party_GetAcctNameByIndex(THE_CONTRACT, PARTY_NAME, nIndex);
1379 }
EXPORT std::string Party_GetAcctNameByIndex(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Party_GetAgentCount ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME 
)
static

Definition at line 1362 of file OTAPI.cpp.

1364 {
1365  return Exec()->Party_GetAgentCount(THE_CONTRACT, PARTY_NAME);
1366 }
EXPORT int32_t Party_GetAgentCount(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetAgentID ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const std::string &  AGENT_NAME 
)
static

Definition at line 1409 of file OTAPI.cpp.

1412 {
1413  return Exec()->Party_GetAgentID(THE_CONTRACT, PARTY_NAME, AGENT_NAME);
1414 }
EXPORT std::string Party_GetAgentID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &AGENT_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetAgentNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1402 of file OTAPI.cpp.

1405 {
1406  return Exec()->Party_GetAgentNameByIndex(THE_CONTRACT, PARTY_NAME, nIndex);
1407 }
EXPORT std::string Party_GetAgentNameByIndex(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Party_GetID ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME 
)
static

Definition at line 1368 of file OTAPI.cpp.

1370 {
1371  return Exec()->Party_GetID(THE_CONTRACT, PARTY_NAME);
1372 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Party_GetID(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
int32_t opentxs::OTAPI_Wrap::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 
)
static

PAY DIVIDEND – to shareholders.

Definition at line 2247 of file OTAPI.cpp.

2253 {
2254  return Exec()->payDividend(SERVER_ID, ISSUER_USER_ID, DIVIDEND_FROM_ACCT_ID,
2255  SHARES_ASSET_TYPE_ID, DIVIDEND_MEMO,
2256  AMOUNT_PER_SHARE);
2257 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::PeekMemlogBack ( )
static

Definition at line 314 of file OTAPI.cpp.

315 {
316  return Exec()->PeekMemlogBack();
317 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string PeekMemlogBack() const
Definition: OTAPI_Exec.cpp:388
std::string opentxs::OTAPI_Wrap::PeekMemlogFront ( )
static

Definition at line 309 of file OTAPI.cpp.

310 {
311  return Exec()->PeekMemlogFront();
312 }
EXPORT std::string PeekMemlogFront() const
Definition: OTAPI_Exec.cpp:383
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Pending_GetNote ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    --------------------------------------------------

PENDING TRANSFER (various functions)

When someone has sent you a PENDING TRANSFER (a form of transaction that will be sitting in your inbox waiting for you to accept/reject it) then, as you are reading the inbox, you can use these functions in order to get data from each pending transfer. That way your user can then decide whether to accept or reject it (see the ledger functions.)

Definition at line 1736 of file OTAPI.cpp.

1740 {
1741  return Exec()->Pending_GetNote(SERVER_ID, USER_ID, ACCOUNT_ID,
1742  THE_TRANSACTION);
1743 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::PopMemlogBack ( )
static

Definition at line 324 of file OTAPI.cpp.

325 {
326  return Exec()->PopMemlogBack();
327 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT bool PopMemlogBack() const
Definition: OTAPI_Exec.cpp:398
bool opentxs::OTAPI_Wrap::PopMemlogFront ( )
static

Definition at line 319 of file OTAPI.cpp.

320 {
321  return Exec()->PopMemlogFront();
322 }
EXPORT bool PopMemlogFront() const
Definition: OTAPI_Exec.cpp:393
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::PopMessageBuffer ( const int64_t &  REQUEST_NUMBER,
const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static
    -----------------------------------------------------------

POP MESSAGE BUFFER

If there are any replies from the server, they are stored in the message buffer. This function will return those messages (and remove them from the list) one-by-one, newest first.

Returns the message as a string.

Update: added arguments for: ServerID AND NymID AND request number NOTE: Any messages, when popping, which have the CORRECT serverID and the CORRECT NymID, but the wrong Request number, will be discarded.

(Why? Because the client using the OT API will have already treated that message as "dropped" by now, if it's already on to the next one, and the protocol is designed to move forward properly based specifically on this function returning the one EXPECTED... outgoing messages flush the incoming buffer anyway, so the client will have assumed the wrong reply was flushed by now anyway.)

However, if the Server ID and the User ID are wrong, this just means that some other code is still expecting that reply, and hasn't even popped yet! Therefore, we do NOT want to discard THOSE replies, but put them back if necessary – only discarding the ones where the IDs match.

Definition at line 2332 of file OTAPI.cpp.

2335 {
2336  return Exec()->PopMessageBuffer(REQUEST_NUMBER, SERVER_ID, USER_ID);
2337 }
EXPORT std::string PopMessageBuffer(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::processInbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCT_ID,
const std::string &  ACCT_LEDGER 
)
static

PROCESS INBOX

Assuming I have gone through the various transactions in my inbox, and chosen some that I wish to accept or reject, this message asks the server to accept or reject those transactions.

You must include a copy of the ledger, which contains your accept or reject requests for the various inbox items. In other words, you will need to use some other function call first to set up that ledger with the various requests (accept transfer, accept receipt, etc) before you can then use THIS function call to actually send those requests to the server. (See all the Ledger functions.)

(Try the 'i' command in the test client, if you want to empty out the inbox and automatically accept all of the transactions within.)

Definition at line 2222 of file OTAPI.cpp.

2226 {
2227  return Exec()->processInbox(SERVER_ID, USER_ID, ACCT_ID, ACCT_LEDGER);
2228 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
int32_t opentxs::OTAPI_Wrap::processNymbox ( const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static
    I use this automatically to save the API developers the hassle (for now)

added here for completeness. UPDATE: It was a mistake for me to automatically call this, which can mess up the client's expectation of which messages are being sent/received. It was causing network problems. Now clients NEED to call this themselves, after getting the Nymbox. I can't call it for them anymore.

Returns: -1 if error. 0 if Nymbox is empty. 1 or more: Count of items in Nymbox before processing.

Definition at line 2230 of file OTAPI.cpp.

2232 {
2233  return Exec()->processNymbox(SERVER_ID, USER_ID);
2234 }
EXPORT int32_t processNymbox(const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

PROPOSE PAYMENT PLAN — Returns the payment plan in string form.

(Called by Merchant.)

PARAMETER NOTES: – Payment Plan Delay, and Payment Plan Period, both default to 30 days (if you pass 0.)

– Payment Plan Length, and Payment Plan Max Payments, both default to 0, which means no maximum length and no maximum number of payments.


FYI, the payment plan creation process (finally) is:

1) Payment plan is written, and signed, by the recipient. (This function: ProposePaymentPlan) 2) He sends it to the sender, who signs it and submits it. (ConfirmPaymentPlan and depositPaymentPlan) 3) The server loads the recipient nym to verify the transaction number. The sender also had to burn a transaction number (to submit it) so now, both have verified trns::s in this way.


FYI, here are all the OT library calls that are performed by this single API call:

OTPaymentPlan * pPlan = new OTPaymentPlan(pAccount->GetRealServerID(), pAccount->GetAssetTypeID(), pAccount->GetRealAccountID(), pAccount->GetUserID(), RECIPIENT_ACCT_ID, RECIPIENT_USER_ID);


From OTAgreement: (This must be called first, before the other two methods below can be called.)

bool OTAgreement::SetProposal(const OTPseudonym& MERCHANT_NYM, const OTString& strConsideration, const time64_t& VALID_FROM=0, const time64_t& VALID_TO=0);


(Optional initial payment): bool OTPaymentPlan::SetInitialPayment(const int64_t& lAmount, time64_t

tTimeUntilInitialPayment=0); // default: now.

These two (above and below) can be called independent of each other. You can have an initial payment, AND/OR a payment plan.


(Optional regular payments): bool OTPaymentPlan::SetPaymentPlan(const int64_t& lPaymentAmount, time64_t tTimeUntilPlanStart =OT_TIME_MONTH_IN_SECONDS, // Default: 1st payment in 30 days time64_t tBetweenPayments =OT_TIME_MONTH_IN_SECONDS, // Default: 30 days.

time64_t tPlanLength=0, int32_t nMaxPayments=0);

Definition at line 1076 of file OTAPI.cpp.

1086 {
1087  return Exec()->ProposePaymentPlan(
1088  SERVER_ID, VALID_FROM, VALID_TO, SENDER_ACCT_ID, SENDER_USER_ID,
1089  PLAN_CONSIDERATION, RECIPIENT_ACCT_ID, RECIPIENT_USER_ID,
1090  INITIAL_PAYMENT_AMOUNT, INITIAL_PAYMENT_DELAY, PAYMENT_PLAN_AMOUNT,
1091  PAYMENT_PLAN_DELAY, PAYMENT_PLAN_PERIOD, PAYMENT_PLAN_LENGTH,
1092  PAYMENT_PLAN_MAX_PAYMENTS);
1093 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Purse_Count ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_PURSE 
)
static

returns a count of the number of cash tokens inside this purse.

Definition at line 1843 of file OTAPI.cpp.

1846 {
1847  return Exec()->Purse_Count(SERVER_ID, ASSET_TYPE_ID, THE_PURSE);
1848 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Purse_Empty ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  SIGNER_ID,
const std::string &  THE_PURSE 
)
static
   Makes an exact copy of a purse, except with no tokens inside. (Value of
zero.)

Useful when you need to create a temporary purse for moving tokens around, and you don't want some new symmetric/master key being generated for that purse as though it were really some new "other purse." For example, if you have a password-protected purse, you might want to pop all of the tokens off of it, and as you iterate, re-assign half of them to new ownership, push those onto a new purse owned by that new owner. But you only want to do this with half of the tokens... the other half of the tokens, you just want to push onto a temp purse (for the loop) that's owned by the original owner, so you can then save it back over the original in storage (since it contains "all the tokens that WEREN'T deposited" or "all the tokens that WEREN'T exported" etc.

The point? If the "original owner" is a password-protected purse with a symmetric key, then you can't just generate some new "temp purse" without also generating a whole new KEY, which you DO NOT want to do. You also don't want to have to deal with re-assigning ownership back and forth between the two purses – you just want to shove some tokens into one temporarily so you can finish your loop. You could take the original purse and make a copy of it, and then just pop all the tokens off of it one-by-one, but that is very cumbersome and expensive. But that'd be the only way to get a copy of the original purse with the SAME symmetric key, except empty, so you can use it as a temp purse. Therefore, to make that easier and solve that whole dilemma, I present: Purse_Empty. Purse_Empty takes a purse and returns an empty version of it (except if there's a symmetric/master key inside, those are preserved, so you can use it as a temp purse.)

This function is effectively the same thing as calling Pop until the purse is empty. Returns: the empty purse, or nullptr if failure.

Definition at line 1888 of file OTAPI.cpp.

1892 {
1893  return Exec()->Purse_Empty(SERVER_ID, ASSET_TYPE_ID, SIGNER_ID, THE_PURSE);
1894 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Purse_GetTotalValue ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_PURSE 
)
static

Get Purse Total Value (internally uses GetTotalValue().)

Returns the purported sum of all the tokens within.

Definition at line 1836 of file OTAPI.cpp.

1839 {
1840  return Exec()->Purse_GetTotalValue(SERVER_ID, ASSET_TYPE_ID, THE_PURSE);
1841 }
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().)
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Purse_HasPassword ( const std::string &  SERVER_ID,
const std::string &  THE_PURSE 
)
static

Some purses are encrypted to a specific Nym. Whereas other purses are encrypted to a passphrase. This function returns bool and lets you know, either way.

Definition at line 1850 of file OTAPI.cpp.

1852 {
1853  return Exec()->Purse_HasPassword(SERVER_ID, THE_PURSE);
1854 }
EXPORT bool Purse_HasPassword(const std::string &SERVER_ID, const std::string &THE_PURSE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Purse_Peek ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  OWNER_ID,
const std::string &  THE_PURSE 
)
static

Returns the TOKEN on top of the stock (LEAVING it on top of the stack, but giving you a string copy of it.)

Definition at line 1871 of file OTAPI.cpp.

1875 {
1876  return Exec()->Purse_Peek(SERVER_ID, ASSET_TYPE_ID, OWNER_ID, THE_PURSE);
1877 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Removes the token from the top of the stock and DESTROYS IT, and RETURNS THE UPDATED PURSE (with the token now missing from it.) WARNING: Do not call this function unless you have PEEK()d FIRST!! Otherwise you will lose the token and get left "holding the bag".

Definition at line 1879 of file OTAPI.cpp.

1883 {
1884  return Exec()->Purse_Pop(SERVER_ID, ASSET_TYPE_ID, OWNER_OR_SIGNER_ID,
1885  THE_PURSE);
1886 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Pushes a token onto the stack (of the purse.) Returns the updated purse (now including the token.)

Definition at line 1896 of file OTAPI.cpp.

1902 {
1903  return Exec()->Purse_Push(SERVER_ID, ASSET_TYPE_ID, SIGNER_ID, OWNER_ID,
1904  THE_PURSE, THE_TOKEN);
1905 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::queryAssetTypes ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ENCODED_MAP 
)
static
    -----------------------------------------------------------

QUERY ASSET TYPES (server message)

This way you can ask the server to confirm whether various asset types are issued there.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2379 of file OTAPI.cpp.

2382 {
2383  return Exec()->queryAssetTypes(SERVER_ID, USER_ID, ENCODED_MAP);
2384 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t queryAssetTypes(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &ENCODED_MAP) const
bool opentxs::OTAPI_Wrap::RecordPayment ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const bool &  bIsInbox,
const int32_t &  nIndex,
const bool &  bSaveCopy 
)
static

Definition at line 1591 of file OTAPI.cpp.

1594 {
1595  return Exec()->RecordPayment(SERVER_ID, USER_ID, bIsInbox, nIndex,
1596  bSaveCopy);
1597 }
EXPORT bool RecordPayment(const std::string &SERVER_ID, const std::string &USER_ID, const bool &bIsInbox, const int32_t &nIndex, const bool &bSaveCopy) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::RemoveSentMessage ( const int64_t &  REQUEST_NUMBER,
const std::string &  SERVER_ID,
const std::string &  USER_ID 
)
static

Definition at line 2351 of file OTAPI.cpp.

2354 {
2355  return Exec()->RemoveSentMessage(REQUEST_NUMBER, SERVER_ID, USER_ID);
2356 }
EXPORT bool RemoveSentMessage(const int64_t &REQUEST_NUMBER, const std::string &SERVER_ID, const std::string &USER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::ReplyNotice_GetRequestNum ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_TRANSACTION 
)
static

Transactions do not have request numbers. However, if you have a.

in your Nymbox, which is an OTTransaction object, it will CONTAIN a reply to some previous message. This function will only work on a and it returns the actual request number of the server reply inside that Used for calling HaveAlreadySeenReply() in order to see if we've already processed the reply for that message.

Definition at line 1771 of file OTAPI.cpp.

1774 {
1775  return Exec()->ReplyNotice_GetRequestNum(SERVER_ID, USER_ID,
1776  THE_TRANSACTION);
1777 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::ResyncNymWithServer ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  THE_MESSAGE 
)
static

Definition at line 2372 of file OTAPI.cpp.

2375 {
2376  return Exec()->ResyncNymWithServer(SERVER_ID, USER_ID, THE_MESSAGE);
2377 }
EXPORT bool ResyncNymWithServer(const std::string &SERVER_ID, const std::string &USER_ID, const std::string &THE_MESSAGE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::RevokeSubcredential ( const std::string &  NYM_ID,
const std::string &  MASTER_CRED_ID,
const std::string &  SUB_CRED_ID 
)
static

Definition at line 448 of file OTAPI.cpp.

451 {
452  return Exec()->RevokeSubcredential(NYM_ID, MASTER_CRED_ID, SUB_CRED_ID);
453 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::SavePurse ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  USER_ID,
const std::string &  THE_PURSE 
)
static

PURSES (containing cash tokens.)

UNDERSTAND: If you write someone a cheque, it can be in the amount of $27.63
But you cannot do this with a cash token, since it can only represent
a standard denomination. (1, 5, 10, 25, 100, 500, 1000, 2000, 5000,
10000, etc.)

Therefore if you wanted to give CASH to someone in the amount of $27.63,
you would have to give them a PURSE, not a single token. And the purse
would contain a 2000 cent token, a 500 cent token, two 100-cent tokens,
two 25-cent tokens, a 10-cent token, and three 1-cent tokens.

The purse would thus contain 2763 cents worth of digital cash tokens, all
neatly wrapped up in the same purse, all encrypted to the same owner or key.

(The fact that 2763 displays as $27.63 should be purely the result of a
mask applied by the currency contract.)

(above a bit.)
EXPORT static std::string LoadPurse(const std::string& SERVER_ID,
const std::string& ASSET_TYPE_ID,
const std::string& USER_ID); // returns nullptr, or a purse.

Warning! This will overwrite whatever purse is there. The proper way to use this function is, LOAD the purse, then Merge whatever other purse you want into it, then SAVE it again. (Which is all handled for you automatically if you use Wallet_ImportPurse.) Tokens may have to be decrypted from one owner and re-encrypted to the new owner. Do you want to have to deal with that? If you still insist on using SavePurse directly, just remember to load first, then pop/push any tokens you need to, keeping in mind that at this low level you are responsible to make sure the purse and token have the same owner, then save again to overwrite whatever purse was there before. (Presumably if any tokens were removed, it's because they are no longer any good, or because they were given to someone else and then a copy was recorded in your payment outbox, or whatever.)

Definition at line 1821 of file OTAPI.cpp.

1825 {
1826  return Exec()->SavePurse(SERVER_ID, ASSET_TYPE_ID, USER_ID, THE_PURSE);
1827 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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 
)
static

sendUserMessage does this: – Puts user message as encrypted Payload on an OTMessage (1)... – Also puts user message as a CLEAR payload on an OTMessage (2)... – (1) is sent to server, and (2) is added to Outmail messages. – (1) gets added to recipient's Nymbox as "in ref to" string on a "message" transaction. – When recipient processes Nymbox, OTMessage (1) is extracted and added to recipient's nym Mail. – When recipient gets mail contents, decryption occurs from (1) payload, before returning contents as original user message string. – When sender gets outmail contents, original user message string is returned from (2) payload, with no decryption necessary. SEND USER INSTRUMENT — (Send a financial instrument to another user, encrypted to his pubkey.)

ServerID – Must be included with every message. USER_ID – You must include your own userID so the server can reply. USER_ID_RECIPIENT – This is a recipient user ID. RECIPIENT_PUBKEY – Recipient's public key in base64-encoded form. THE_INSTRUMENT – plainext string of instrument (cheque, payment plan, purse, invoice, voucher...)

In this message, you are requesting the server to send a financial instrument to another user, encrypted to his public key and dropped in his paymentInbox (by way of his nymbox.)

Definition at line 2057 of file OTAPI.cpp.

2063 {
2064  return Exec()->sendUserInstrument(SERVER_ID, USER_ID, USER_ID_RECIPIENT,
2065  RECIPIENT_PUBKEY, THE_INSTRUMENT,
2066  INSTRUMENT_FOR_SENDER);
2067 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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

SEND USER MESSAGE — (Send a message to another user, encrypted to his pubkey.)

ServerID – Must be included with every message. USER_ID – You must include your own userID so the server can reply. USER_ID_RECIPIENT – This is a recipient user ID. RECIPIENT_PUBKEY – Recipient's public key in base64-encoded form. THE_MESSAGE – plainext message you want to send. A cheque? Some cash? A note? Etc.

In this message, you are requesting the server to send a message to another user, encrypted to his public key and dropped in his nymbox.

Definition at line 2047 of file OTAPI.cpp.

2052 {
2053  return Exec()->sendUserMessage(SERVER_ID, USER_ID, USER_ID_RECIPIENT,
2054  RECIPIENT_PUBKEY, THE_MESSAGE);
2055 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::SetAccountWallet_Name ( const std::string &  ACCT_ID,
const std::string &  SIGNER_NYM_ID,
const std::string &  ACCT_NEW_NAME 
)
static

Returns OT_TRUE (1) or OT_FALSE (0) The asset account's name is merely a client-side label.

Definition at line 1025 of file OTAPI.cpp.

1028 {
1029  return Exec()->SetAccountWallet_Name(ACCT_ID, SIGNER_NYM_ID, ACCT_NEW_NAME);
1030 }
EXPORT bool SetAccountWallet_Name(const std::string &ACCT_ID, const std::string &SIGNER_NYM_ID, const std::string &ACCT_NEW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
void opentxs::OTAPI_Wrap::SetAppBinaryFolder ( const std::string &  strFolder)
static

Definition at line 210 of file OTAPI.cpp.

211 {
212  if (nullptr == exec) {
213  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
214  OT_FAIL;
215  }
216 
217  return exec->SetAppBinaryFolder(strFolder);
218 }
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
EXPORT void SetAppBinaryFolder(const std::string &strFolder) const
Definition: OTAPI_Exec.cpp:257
bool opentxs::OTAPI_Wrap::SetAssetType_Name ( const std::string &  ASSET_ID,
const std::string &  STR_NEW_NAME 
)
static

Definition at line 882 of file OTAPI.cpp.

884 {
885  return Exec()->SetAssetType_Name(ASSET_ID, STR_NEW_NAME);
886 }
EXPORT bool SetAssetType_Name(const std::string &ASSET_ID, const std::string &STR_NEW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OTAPI_Exec * opentxs::OTAPI_Wrap::SetExecutor ( OTAPI_Exec exec)
static

Definition at line 151 of file OTAPI.cpp.

152 {
153  OTAPI_Exec* execOld = exec;
154  exec = execNew;
155  return execOld;
156 }
void opentxs::OTAPI_Wrap::SetHomeFolder ( const std::string &  strFolder)
static

Definition at line 234 of file OTAPI.cpp.

235 {
236  if (nullptr == exec) {
237  otErr << __FUNCTION__ << ": Error: OTAPI_Exec wrapper not found!!\n";
238  OT_FAIL;
239  }
240 
241  return exec->SetHomeFolder(strFolder);
242 }
EXPORT void SetHomeFolder(const std::string &strFolder) const
Definition: OTAPI_Exec.cpp:276
#define OT_FAIL
Definition: Assert.hpp:139
OTLOG_IMPORT OTLogStream otErr
bool opentxs::OTAPI_Wrap::SetNym_Name ( const std::string &  NYM_ID,
const std::string &  SIGNER_NYM_ID,
const std::string &  NYM_NEW_NAME 
)
static
    -----------------------------------

SET NYM NAME

You might have 40 of your friends' public nyms in your wallet. You might have labels on each of them. But whenever you change a label (and thus re-sign the file for that Nym when you save it), you only SIGN using one of your OWN nyms, for which you have a private key available for signing.

Signer Nym? When testing, there is only one nym, so you just pass it twice. But in real production, a user will have a default signing nym, the same way that he might have a default signing key in PGP, and that must be passed in whenever he changes the name on any of the other nyms in his wallet. (In order to properly sign and save the change.)

Returns OT_TRUE (1) or OT_FALSE (0)

Definition at line 869 of file OTAPI.cpp.

872 {
873  return Exec()->SetNym_Name(NYM_ID, SIGNER_NYM_ID, NYM_NEW_NAME);
874 }
EXPORT bool SetNym_Name(const std::string &NYM_ID, const std::string &SIGNER_NYM_ID, const std::string &NYM_NEW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::SetServer_Name ( const std::string &  SERVER_ID,
const std::string &  STR_NEW_NAME 
)
static

Definition at line 876 of file OTAPI.cpp.

878 {
879  return Exec()->SetServer_Name(SERVER_ID, STR_NEW_NAME);
880 }
EXPORT bool SetServer_Name(const std::string &SERVER_ID, const std::string &STR_NEW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::SetWallet ( const std::string &  strWalletFilename)
static

INITIALIZE an OTAPI context.

Call this once per context.

If the configuration value doesn't exist, it will be created.

Something like this: bool bInit = Init();

If this function fails, you can call it multiple times until it succeeds.

EXPORT static bool Cleanup(); // Call this before you delete OTAPI SET WALLET (optional)

This command will set the wallet filename in the configuration. Use this command to change what wallet will be loaded with the "LOAD WALLET" command.

e.g. SetWallet("wallet2.xml");

Definition at line 279 of file OTAPI.cpp.

280 {
281  return Exec()->SetWallet(strWalletFilename);
282 }
EXPORT bool SetWallet(const std::string &strWalletFilename) const
Definition: OTAPI_Exec.cpp:330
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SignContract ( const std::string &  SIGNER_NYM_ID,
const std::string &  THE_CONTRACT 
)
static
OT-Sign a CONTRACT. (First signature)

EXPORT static std::string SignContract(const std::string& SIGNER_NYM_ID, const std::string& THE_CONTRACT);

Tries to instantiate the contract object, based on the string passed in. Releases all signatures, and then signs the contract. Returns the signed contract, or nullptr if failure.

NOTE: The actual OT functionality (Use Cases) NEVER requires you to sign via this function. Why not? because, anytime a signature is needed on something, the relevant OT API call will require you to pass in the Nym, and the API already signs internally wherever it deems appropriate. Thus, this function is only for advanced uses, for OT-Scripts, server operators, etc.

Definition at line 987 of file OTAPI.cpp.

989 {
990  return Exec()->SignContract(SIGNER_NYM_ID, THE_CONTRACT);
991 }
EXPORT std::string SignContract(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
void opentxs::OTAPI_Wrap::Sleep ( const int64_t &  MILLISECONDS)
static
SLEEP

If you want to go to sleep for one second, then pass "1000" to this function.

Definition at line 2367 of file OTAPI.cpp.

2368 {
2369  return Exec()->Sleep(MILLISECONDS);
2370 }
EXPORT void Sleep(const int64_t &MILLISECONDS) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Smart_AreAllPartiesConfirmed ( const std::string &  THE_CONTRACT)
static

Definition at line 1213 of file OTAPI.cpp.

1214 {
1215  return Exec()->Smart_AreAllPartiesConfirmed(THE_CONTRACT);
1216 }
EXPORT bool Smart_AreAllPartiesConfirmed(const std::string &THE_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Smart_GetBylawByIndex ( const std::string &  THE_CONTRACT,
const int32_t &  nIndex 
)
static

Definition at line 1240 of file OTAPI.cpp.

1242 {
1243  return Exec()->Smart_GetBylawByIndex(THE_CONTRACT, nIndex);
1244 }
EXPORT std::string Smart_GetBylawByIndex(const std::string &THE_CONTRACT, const int32_t &nIndex) const
returns the name of the bylaw.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Smart_GetBylawCount ( const std::string &  THE_CONTRACT)
static

Definition at line 1229 of file OTAPI.cpp.

1230 {
1231  return Exec()->Smart_GetBylawCount(THE_CONTRACT);
1232 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t Smart_GetBylawCount(const std::string &THE_CONTRACT) const
std::string opentxs::OTAPI_Wrap::Smart_GetPartyByIndex ( const std::string &  THE_CONTRACT,
const int32_t &  nIndex 
)
static

Definition at line 1234 of file OTAPI.cpp.

1236 {
1237  return Exec()->Smart_GetPartyByIndex(THE_CONTRACT, nIndex);
1238 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Smart_GetPartyByIndex(const std::string &THE_CONTRACT, const int32_t &nIndex) const
returns the name of the party.
int32_t opentxs::OTAPI_Wrap::Smart_GetPartyCount ( const std::string &  THE_CONTRACT)
static

Definition at line 1224 of file OTAPI.cpp.

1225 {
1226  return Exec()->Smart_GetPartyCount(THE_CONTRACT);
1227 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT int32_t Smart_GetPartyCount(const std::string &THE_CONTRACT) const
bool opentxs::OTAPI_Wrap::Smart_IsPartyConfirmed ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME 
)
static

Definition at line 1218 of file OTAPI.cpp.

1220 {
1221  return Exec()->Smart_IsPartyConfirmed(THE_CONTRACT, PARTY_NAME);
1222 }
EXPORT bool Smart_IsPartyConfirmed(const std::string &THE_CONTRACT, const std::string &PARTY_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1181 of file OTAPI.cpp.

1185 {
1186  return Exec()->SmartContract_AddAccount(
1187  THE_CONTRACT, SIGNER_NYM_ID, PARTY_NAME, ACCT_NAME, ASSET_TYPE_ID);
1188 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SmartContract_AddBylaw ( const std::string &  THE_CONTRACT,
const std::string &  SIGNER_NYM_ID,
const std::string &  BYLAW_NAME 
)
static

Definition at line 1125 of file OTAPI.cpp.

1128 {
1129  return Exec()->SmartContract_AddBylaw(THE_CONTRACT, SIGNER_NYM_ID,
1130  BYLAW_NAME);
1131 }
EXPORT std::string SmartContract_AddBylaw(const std::string &THE_CONTRACT, const std::string &SIGNER_NYM_ID, const std::string &BYLAW_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1153 of file OTAPI.cpp.

1157 {
1158  return Exec()->SmartContract_AddCallback(
1159  THE_CONTRACT, SIGNER_NYM_ID, BYLAW_NAME, CALLBACK_NAME, CLAUSE_NAME);
1160 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1133 of file OTAPI.cpp.

1137 {
1138  return Exec()->SmartContract_AddClause(
1139  THE_CONTRACT, SIGNER_NYM_ID, BYLAW_NAME, CLAUSE_NAME, SOURCE_CODE);
1140 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1162 of file OTAPI.cpp.

1167 {
1168  return Exec()->SmartContract_AddHook(THE_CONTRACT, SIGNER_NYM_ID,
1169  BYLAW_NAME, HOOK_NAME, CLAUSE_NAME);
1170 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SmartContract_AddParty ( const std::string &  THE_CONTRACT,
const std::string &  SIGNER_NYM_ID,
const std::string &  PARTY_NAME,
const std::string &  AGENT_NAME 
)
static

Definition at line 1172 of file OTAPI.cpp.

1176 {
1177  return Exec()->SmartContract_AddParty(THE_CONTRACT, SIGNER_NYM_ID,
1178  PARTY_NAME, AGENT_NAME);
1179 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Definition at line 1142 of file OTAPI.cpp.

1147 {
1148  return Exec()->SmartContract_AddVariable(THE_CONTRACT, SIGNER_NYM_ID,
1149  BYLAW_NAME, VAR_NAME, VAR_ACCESS,
1150  VAR_TYPE, VAR_VALUE);
1151 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
std::string opentxs::OTAPI_Wrap::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 
)
static
    ----------------------------------------

Used when taking a theoretical smart contract, and setting it up to use specific Nyms and accounts. This function sets the ACCT ID for the acct specified by party name and acct name. Returns the updated smart contract (or nullptr.)

Definition at line 1196 of file OTAPI.cpp.

1200 {
1201  return Exec()->SmartContract_ConfirmAccount(THE_CONTRACT, SIGNER_NYM_ID,
1202  PARTY_NAME, ACCT_NAME,
1203  AGENT_NAME, ACCT_ID);
1204 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SmartContract_ConfirmParty ( const std::string &  THE_CONTRACT,
const std::string &  PARTY_NAME,
const std::string &  NYM_ID 
)
static
    ----------------------------------------

Called by each Party. Pass in the smart contract obtained in the above call. Call SmartContract_ConfirmAccount() first, as much as you need to. Returns the updated smart contract (or nullptr.)

Definition at line 1206 of file OTAPI.cpp.

1209 {
1210  return Exec()->SmartContract_ConfirmParty(THE_CONTRACT, PARTY_NAME, NYM_ID);
1211 }
EXPORT std::string SmartContract_ConfirmParty(const std::string &THE_CONTRACT, const std::string &PARTY_NAME, const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::SmartContract_CountNumsNeeded ( const std::string &  THE_CONTRACT,
const std::string &  AGENT_NAME 
)
static
    This function returns the count of how many trans#s a Nym needs in order
to confirm as

a specific agent for a contract. (An opening number is needed for every party of which agent is the authorizing agent, plus a closing number for every acct of which agent is the authorized agent.)

Definition at line 1190 of file OTAPI.cpp.

1192 {
1193  return Exec()->SmartContract_CountNumsNeeded(THE_CONTRACT, AGENT_NAME);
1194 }
EXPORT int32_t SmartContract_CountNumsNeeded(const std::string &THE_CONTRACT, const std::string &AGENT_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::StringToAmount ( const std::string &  ASSET_TYPE_ID,
const std::string &  str_input 
)
static
    StringToAmount:

Input: currency contract, formatted string. (And locale, internally.) Output: "$5.45" becomes 545 (for example.)

Returns amount from formatted string, based on currency contract and locale.

Definition at line 484 of file OTAPI.cpp.

486 {
487  return Exec()->StringToAmount(ASSET_TYPE_ID, str_input);
488 }
EXPORT int64_t StringToAmount(const std::string &ASSET_TYPE_ID, const std::string &str_input) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::StringToLong ( const std::string &  strNumber)
static

Definition at line 254 of file OTAPI.cpp.

255 {
256  return Exec()->StringToLong(strNumber);
257 }
EXPORT int64_t StringToLong(const std::string &strNumber) const
Definition: OTAPI_Exec.cpp:286
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
uint64_t opentxs::OTAPI_Wrap::StringToUlong ( const std::string &  strNumber)
static

Definition at line 264 of file OTAPI.cpp.

265 {
266  return Exec()->StringToUlong(strNumber);
267 }
EXPORT uint64_t StringToUlong(const std::string &strNumber) const
Definition: OTAPI_Exec.cpp:302
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::SwitchWallet ( )
static

SWITCH WALLET (experimental)

Experimental. Set the new wallet with the "SET WALLET FILENAME" function. Then call this function to switch to the new wallet.

Definition at line 294 of file OTAPI.cpp.

295 {
296  return Exec()->LoadWallet();
297 }
EXPORT bool LoadWallet() const
Definition: OTAPI_Exec.cpp:363
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SymmetricDecrypt ( const std::string &  SYMMETRIC_KEY,
const std::string &  CIPHERTEXT_ENVELOPE 
)
static

Definition at line 981 of file OTAPI.cpp.

983 {
984  return Exec()->SymmetricDecrypt(SYMMETRIC_KEY, CIPHERTEXT_ENVELOPE);
985 }
EXPORT std::string SymmetricDecrypt(const std::string &SYMMETRIC_KEY, const std::string &CIPHERTEXT_ENVELOPE) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::SymmetricEncrypt ( const std::string &  SYMMETRIC_KEY,
const std::string &  PLAINTEXT 
)
static

Definition at line 975 of file OTAPI.cpp.

977 {
978  return Exec()->SymmetricEncrypt(SYMMETRIC_KEY, PLAINTEXT);
979 }
EXPORT std::string SymmetricEncrypt(const std::string &SYMMETRIC_KEY, const std::string &PLAINTEXT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static
    Tokens are stored in an encrypted state for security reasons.

This function is used for exporting those tokens to another Nym, such as a Dummy nym, or another user's Nym.

Definition at line 1924 of file OTAPI.cpp.

1930 {
1931  return Exec()->Token_ChangeOwner(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN,
1932  SIGNER_NYM_ID, OLD_OWNER, NEW_OWNER);
1933 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Token_GetAssetID ( const std::string &  THE_TOKEN)
static

Definition at line 1970 of file OTAPI.cpp.

1971 {
1972  return Exec()->Token_GetAssetID(THE_TOKEN);
1973 }
EXPORT std::string Token_GetAssetID(const std::string &THE_TOKEN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Token_GetDenomination ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_TOKEN 
)
static

The actual cash value of the token. Returns a int64_t.

Definition at line 1942 of file OTAPI.cpp.

1945 {
1946  return Exec()->Token_GetDenomination(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN);
1947 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Token_GetID ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_TOKEN 
)
static
    Returns an encrypted form of the actual blinded token ID.

(There's no need to decrypt the ID until redeeming the token, when you re-encrypt it to the server's public key, or until spending it, when you re-encrypt it to the recipient's public key, or exporting it, when you create a dummy recipient and attach it to the purse.)

Definition at line 1935 of file OTAPI.cpp.

1938 {
1939  return Exec()->Token_GetID(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN);
1940 }
EXPORT std::string Token_GetID(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::Token_GetSeries ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_TOKEN 
)
static

Definition at line 1949 of file OTAPI.cpp.

1952 {
1953  return Exec()->Token_GetSeries(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN);
1954 }
EXPORT int32_t Token_GetSeries(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Token_GetServerID ( const std::string &  THE_TOKEN)
static

Definition at line 1975 of file OTAPI.cpp.

1976 {
1977  return Exec()->Token_GetServerID(THE_TOKEN);
1978 }
EXPORT std::string Token_GetServerID(const std::string &THE_TOKEN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
time64_t opentxs::OTAPI_Wrap::Token_GetValidFrom ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_TOKEN 
)
static

the date is seconds since Jan 1970.

Definition at line 1956 of file OTAPI.cpp.

1959 {
1960  return Exec()->Token_GetValidFrom(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN);
1961 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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.
time64_t opentxs::OTAPI_Wrap::Token_GetValidTo ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  THE_TOKEN 
)
static

Definition at line 1963 of file OTAPI.cpp.

1966 {
1967  return Exec()->Token_GetValidTo(SERVER_ID, ASSET_TYPE_ID, THE_TOKEN);
1968 }
EXPORT time64_t Token_GetValidTo(const std::string &SERVER_ID, const std::string &ASSET_TYPE_ID, const std::string &THE_TOKEN) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static

Create a 'response' transaction, that will be used to indicate my acceptance or rejection of another transaction. Usually an entire ledger full of these is sent to the server as I process the various transactions in my inbox.

Definition at line 1677 of file OTAPI.cpp.

1681 {
1682  return Exec()->Transaction_CreateResponse(SERVER_ID, USER_ID, ACCOUNT_ID,
1683  THE_LEDGER, THE_TRANSACTION,
1684  BOOL_DO_I_ACCEPT);
1685 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Transaction_GetAmount ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1745 of file OTAPI.cpp.

1749 {
1750  return Exec()->Transaction_GetAmount(SERVER_ID, USER_ID, ACCOUNT_ID,
1751  THE_TRANSACTION);
1752 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
OT_BOOL opentxs::OTAPI_Wrap::Transaction_GetBalanceAgreementSuccess ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    Gets the balance agreement success (from a transaction.)

returns OT_BOOL. OT_TRUE (1) == acknowledgment OT_FALSE (0) == rejection OT_ERROR(-1) == error_state (such as dropped message.)

Definition at line 1805 of file OTAPI.cpp.

1808 {
1810  SERVER_ID, USER_ID, ACCOUNT_ID, THE_TRANSACTION);
1811 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
time64_t opentxs::OTAPI_Wrap::Transaction_GetDateSigned ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    --------------------------------------------------

Get Transaction Date Signed (internally uses OTTransaction::GetDateSigned().)

Definition at line 1779 of file OTAPI.cpp.

1782 {
1783  return Exec()->Transaction_GetDateSigned(SERVER_ID, USER_ID, ACCOUNT_ID,
1784  THE_TRANSACTION);
1785 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int64_t opentxs::OTAPI_Wrap::Transaction_GetDisplayReferenceToNum ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    The pending notice in the inbox has a transaction number that

was issued to the server (so it could put the notice in your inbox.) But it's IN REFERENCE TO a transfer that was initiated by another user. THIS function will retrieve THAT transaction number, because this function queries a pending transaction to see what transaction it is "in reference to."

Definition at line 1754 of file OTAPI.cpp.

1757 {
1759  SERVER_ID, USER_ID, ACCOUNT_ID, THE_TRANSACTION);
1760 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetRecipientAcctID ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1728 of file OTAPI.cpp.

1731 {
1732  return Exec()->Transaction_GetRecipientAcctID(SERVER_ID, USER_ID,
1733  ACCOUNT_ID, THE_TRANSACTION);
1734 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetRecipientUserID ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1712 of file OTAPI.cpp.

1715 {
1716  return Exec()->Transaction_GetRecipientUserID(SERVER_ID, USER_ID,
1717  ACCOUNT_ID, THE_TRANSACTION);
1718 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetSenderAcctID ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1720 of file OTAPI.cpp.

1723 {
1724  return Exec()->Transaction_GetSenderAcctID(SERVER_ID, USER_ID, ACCOUNT_ID,
1725  THE_TRANSACTION);
1726 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetSenderUserID ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1704 of file OTAPI.cpp.

1707 {
1708  return Exec()->Transaction_GetSenderUserID(SERVER_ID, USER_ID, ACCOUNT_ID,
1709  THE_TRANSACTION);
1710 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
OT_BOOL opentxs::OTAPI_Wrap::Transaction_GetSuccess ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    --------------------------------------------------

Get TransactionSuccess

OT_TRUE (1) == acknowledgment OT_FALSE (0) == rejection OT_ERROR(-1) == error_state (such as dropped message.)

Returns OT_BOOL.

Definition at line 1787 of file OTAPI.cpp.

1791 {
1792  return Exec()->Transaction_GetSuccess(SERVER_ID, USER_ID, ACCOUNT_ID,
1793  THE_TRANSACTION);
1794 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetType ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Get Transaction Type (internally uses GetTransactionTypeString().)

Definition at line 1762 of file OTAPI.cpp.

1766 {
1767  return Exec()->Transaction_GetType(SERVER_ID, USER_ID, ACCOUNT_ID,
1768  THE_TRANSACTION);
1769 }
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().)
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Transaction_GetVoucher ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static
    --------------------------------------------------------------------

Retrieve Voucher from Transaction

If you withdrew into a voucher instead of cash, this function allows you to retrieve the actual voucher cheque from the reply transaction. (A voucher is a cheque drawn on an int32_t server account instead of a user's asset account, so the voucher cannot ever bounce due to insufficient funds. We are accustomed to this functionality already in our daily lives, via "money orders" and "cashier's cheques".)

How would you use this in full?

First, call withdrawVoucher() in order to send the request to the server. (You may optionally call FlushMessageBuffer() before doing this.)

Then, call PopMessageBuffer() to retrieve any server reply.

If there is a message from the server in reply, then call Message_GetCommand to verify that it's a reply to the message that you sent, and call Message_GetSuccess to verify whether the message was a success.

If it was a success, next call Message_GetLedger to retrieve the actual "reply ledger" from the server.

Penultimately, call Ledger_GetTransactionByID() and then, finally, call Transaction_GetVoucher() (below) in order to retrieve the voucher cheque itself from the transaction.

Definition at line 1696 of file OTAPI.cpp.

1699 {
1700  return Exec()->Transaction_GetVoucher(SERVER_ID, USER_ID, ACCOUNT_ID,
1701  THE_TRANSACTION);
1702 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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
OT_BOOL opentxs::OTAPI_Wrap::Transaction_IsCanceled ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  ACCOUNT_ID,
const std::string &  THE_TRANSACTION 
)
static

Definition at line 1796 of file OTAPI.cpp.

1800 {
1801  return Exec()->Transaction_IsCanceled(SERVER_ID, USER_ID, ACCOUNT_ID,
1802  THE_TRANSACTION);
1803 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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 
)
static

If a smart contract is already running on the server, this allows a party to trigger clauses on that smart contract, by name. This is NOT a transaction, but it DOES message the server.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 1424 of file OTAPI.cpp.

1429 {
1430  return Exec()->triggerClause(SERVER_ID, USER_ID, TRANSACTION_NUMBER,
1431  CLAUSE_NAME, STR_PARAM);
1432 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::UlongToString ( const uint64_t &  lNumber)
static

Definition at line 269 of file OTAPI.cpp.

270 {
271  return Exec()->UlongToString(lNumber);
272 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string UlongToString(const uint64_t &lNumber) const
Definition: OTAPI_Exec.cpp:307
int32_t opentxs::OTAPI_Wrap::usageCredits ( const std::string &  SERVER_ID,
const std::string &  USER_ID,
const std::string &  USER_ID_CHECK,
const int64_t &  ADJUSTMENT 
)
static

USAGE CREDITS — (Based on a UserID, retrieve or adjust the Usage Credits for that Nym.)

ServerID – Must be included with every message. USER_ID – You must include your own userID so the server can reply. USER_CHECK_ID – This is a SECOND user's ID. (Whose usage credits we are checking) ADJUSTMENT – This can be nullptr (resolves as "0"). Otherwise, positive or negative, and passed as a string. This gives the option to adjust the usage credits balance, up or down.

In this message, you are requesting the server to send you the current balance of the usage credits for the second user_id. You may also adjust this balance up or down (+ or - any int64_t value in string format). If you do, the server reply will contain the updated usage credits, AFTER the adjustment.

You might ask: Doesn't this mean that ANY user can get/set the usage credits for any other?? ANSWER: Most OT server operators will set cmd_usage_credits=false in the ~/.ot/server.cfg file. (BECAUSE ONLY AN ADMINISTRATOR SHOULD BE ABLE TO ADJUST ANYONE'S USAGE CREDITS.) In this case, users will still be able to use this message to VIEW their own personal usage credits, but they will be unable to see others' balances, and they will be unable to do any adjustments to any balances, including their own.

If you wish to give full rights to this function to a specific admin Nym, use the override_nym_id found in ~/.ot/server.cfg After you call usageCredits(), you will receive a server reply. Pass that into the next function: Message_GetUsageCredits()

Definition at line 2032 of file OTAPI.cpp.

2036 {
2037  return Exec()->usageCredits(SERVER_ID, USER_ID, USER_ID_CHECK, ADJUSTMENT);
2038 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Variable_GetAccess ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  VARIABLE_NAME 
)
static

Definition at line 1304 of file OTAPI.cpp.

1307 {
1308  return Exec()->Variable_GetAccess(THE_CONTRACT, BYLAW_NAME, VARIABLE_NAME);
1309 }
EXPORT std::string Variable_GetAccess(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Variable_GetContents ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  VARIABLE_NAME 
)
static

Definition at line 1311 of file OTAPI.cpp.

1314 {
1315  return Exec()->Variable_GetContents(THE_CONTRACT, BYLAW_NAME,
1316  VARIABLE_NAME);
1317 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Variable_GetContents(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
std::string opentxs::OTAPI_Wrap::Variable_GetNameByIndex ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const int32_t &  nIndex 
)
static

Definition at line 1290 of file OTAPI.cpp.

1293 {
1294  return Exec()->Variable_GetNameByIndex(THE_CONTRACT, BYLAW_NAME, nIndex);
1295 }
EXPORT std::string Variable_GetNameByIndex(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const int32_t &nIndex) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Variable_GetType ( const std::string &  THE_CONTRACT,
const std::string &  BYLAW_NAME,
const std::string &  VARIABLE_NAME 
)
static

Definition at line 1297 of file OTAPI.cpp.

1300 {
1301  return Exec()->Variable_GetType(THE_CONTRACT, BYLAW_NAME, VARIABLE_NAME);
1302 }
EXPORT std::string Variable_GetType(const std::string &THE_CONTRACT, const std::string &BYLAW_NAME, const std::string &VARIABLE_NAME) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::VerifyAccountReceipt ( const std::string &  SERVER_ID,
const std::string &  NYM_ID,
const std::string &  ACCT_ID 
)
static
    Returns OT_BOOL. Verifies any asset account (intermediary files) against
its own last signed receipt.

Obviously this will fail for any new account that hasn't done any transactions yet, and thus has no receipts.

Definition at line 1018 of file OTAPI.cpp.

1021 {
1022  return Exec()->VerifyAccountReceipt(SERVER_ID, NYM_ID, ACCT_ID);
1023 }
EXPORT bool VerifyAccountReceipt(const std::string &SERVER_ID, const std::string &NYM_ID, const std::string &ACCT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::VerifyAndRetrieveXMLContents ( const std::string &  THE_CONTRACT,
const std::string &  SIGNER_ID 
)
static
    Verify and Retrieve XML Contents.

Pass in a contract and a user ID, and this function will: – Load the contract up and verify it. (Most classes in OT are derived in some way from OTContract.) – Verify the user's signature on it. – Remove the PGP-style bookends (the signatures, etc) and return the XML contents of the contract in string form. <==

Definition at line 1012 of file OTAPI.cpp.

1014 {
1015  return Exec()->VerifyAndRetrieveXMLContents(THE_CONTRACT, SIGNER_ID);
1016 }
EXPORT std::string VerifyAndRetrieveXMLContents(const std::string &THE_CONTRACT, const std::string &SIGNER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::VerifySignature ( const std::string &  SIGNER_NYM_ID,
const std::string &  THE_CONTRACT 
)
static
OT-Verify the signature on a CONTRACT.

Returns OT_BOOL – OT_TRUE (1) or OT_FALSE (0)

Definition at line 1006 of file OTAPI.cpp.

1008 {
1009  return Exec()->VerifySignature(SIGNER_NYM_ID, THE_CONTRACT);
1010 }
EXPORT bool VerifySignature(const std::string &SIGNER_NYM_ID, const std::string &THE_CONTRACT) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::VerifyUserPrivateKey ( const std::string &  USER_ID)
static
    ------------------------------------------------------------------------

Verify that USER_ID (including its Private Key) is an available and verified user in local storage.

Loads the user's private key, verifies, then returns OT_TRUE or OT_FALSE.

Definition at line 1465 of file OTAPI.cpp.

1466 {
1467  return Exec()->VerifyUserPrivateKey(USER_ID);
1468 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT bool VerifyUserPrivateKey(const std::string &USER_ID) const
bool opentxs::OTAPI_Wrap::Wallet_CanRemoveAccount ( const std::string &  ACCOUNT_ID)
static
    Can I remove this Account from my wallet?

You cannot remove the Account from your wallet if there are transactions still open. This function tells you whether you can remove the Account or not. (Whether there are transactions...) returns OT_BOOL

Definition at line 561 of file OTAPI.cpp.

562 {
563  return Exec()->Wallet_CanRemoveAccount(ACCOUNT_ID);
564 }
EXPORT bool Wallet_CanRemoveAccount(const std::string &ACCOUNT_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_CanRemoveAssetType ( const std::string &  ASSET_ID)
static
    Can I remove this asset contract from my wallet?

You cannot remove the asset contract from your wallet if there are accounts in there using it. This function tells you whether you can remove the asset contract or not. (Whether there are accounts...) returns OT_BOOL

Definition at line 541 of file OTAPI.cpp.

542 {
543  return Exec()->Wallet_CanRemoveAssetType(ASSET_ID);
544 }
EXPORT bool Wallet_CanRemoveAssetType(const std::string &ASSET_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_CanRemoveNym ( const std::string &  NYM_ID)
static
    Can I remove this Nym from my wallet?

You cannot remove the Nym from your wallet if there are accounts in there using it. This function tells you whether you can remove the Nym or not. (Whether there are accounts...) returns OT_BOOL

Definition at line 551 of file OTAPI.cpp.

552 {
553  return Exec()->Wallet_CanRemoveNym(NYM_ID);
554 }
EXPORT bool Wallet_CanRemoveNym(const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_CanRemoveServer ( const std::string &  SERVER_ID)
static
   ---------------------------------------------------------

       FUNCTIONS FOR REMOVING VARIOUS CONTRACTS AND NYMS FROM THE WALLET ***

Can I remove this server contract from my wallet?

You cannot remove the server contract from your wallet if there are accounts in there using it. This function tells you whether you can remove the server contract or not. (Whether there are accounts...) returns OT_BOOL

Definition at line 531 of file OTAPI.cpp.

532 {
533  return Exec()->Wallet_CanRemoveServer(SERVER_ID);
534 }
EXPORT bool Wallet_CanRemoveServer(const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_ChangePassphrase ( )
static

CHANGE MASTER KEY and PASSWORD.

Normally your passphrase is used to derive a key, which is used to unlock a random number (a symmetric key), which is used as the passphrase to open the master key, which is used as the passphrase to any given Nym.

Since all the Nyms are encrypted to the master key, and since we can change the passphrase on the master key without changing the master key itself, then we don't have to do anything to update all the Nyms, since that part hasn't changed.

But we might want a separate "Change Master Key" function that replaces that key itself, in which case we'd HAVE to load up all the Nyms and re-save them.

UPDATE: Seems the easiest thing to do is to just change both the key and passphase at the same time here, by loading up all the private nyms, destroying the master key, and then saving all the private Nyms. (With master key never actually being "paused.") This will automatically cause it to generate a new master key during the saving process. (Make sure to save the wallet also.)

Definition at line 614 of file OTAPI.cpp.

615 {
616  return Exec()->Wallet_ChangePassphrase();
617 }
EXPORT bool Wallet_ChangePassphrase() const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_ExportCert ( const std::string &  NYM_ID)
static

Returns the exported cert, if successful. Else nullptr.

Definition at line 598 of file OTAPI.cpp.

599 {
600  return Exec()->Wallet_ExportCert(NYM_ID);
601 }
EXPORT std::string Wallet_ExportCert(const std::string &NYM_ID) const
Returns the exported cert, if successful. Else nullptr.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_ExportNym ( const std::string &  NYM_ID)
static

Returns the exported Nym, if success. (Else nullptr.)

Definition at line 593 of file OTAPI.cpp.

594 {
595  return Exec()->Wallet_ExportNym(NYM_ID);
596 }
EXPORT std::string Wallet_ExportNym(const std::string &NYM_ID) const
Returns the exported Nym, if success. (Else nullptr.)
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_GetAccountIDFromPartial ( const std::string &  PARTIAL_ID)
static

Definition at line 637 of file OTAPI.cpp.

639 {
640  return Exec()->Wallet_GetAccountIDFromPartial(PARTIAL_ID);
641 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT std::string Wallet_GetAccountIDFromPartial(const std::string &PARTIAL_ID) const
std::string opentxs::OTAPI_Wrap::Wallet_GetAssetIDFromPartial ( const std::string &  PARTIAL_ID)
static

Definition at line 631 of file OTAPI.cpp.

633 {
634  return Exec()->Wallet_GetAssetIDFromPartial(PARTIAL_ID);
635 }
EXPORT std::string Wallet_GetAssetIDFromPartial(const std::string &PARTIAL_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_GetNymIDFromPartial ( const std::string &  PARTIAL_ID)
static

Attempts to find a full ID in the wallet, based on a partial of the same.

Returns nullptr on failure, otherwise returns the full ID.

Definition at line 619 of file OTAPI.cpp.

621 {
622  return Exec()->Wallet_GetNymIDFromPartial(PARTIAL_ID);
623 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_GetServerIDFromPartial ( const std::string &  PARTIAL_ID)
static

Definition at line 625 of file OTAPI.cpp.

627 {
628  return Exec()->Wallet_GetServerIDFromPartial(PARTIAL_ID);
629 }
EXPORT std::string Wallet_GetServerIDFromPartial(const std::string &PARTIAL_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::Wallet_ImportCert ( const std::string &  DISPLAY_NAME,
const std::string &  FILE_CONTENTS 
)
static

Returns the imported cert's NymID, if successful. Else nullptr.

Definition at line 608 of file OTAPI.cpp.

610 {
611  return Exec()->Wallet_ImportCert(DISPLAY_NAME, FILE_CONTENTS);
612 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
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.
std::string opentxs::OTAPI_Wrap::Wallet_ImportNym ( const std::string &  FILE_CONTENTS)
static

returns NymID if success, else nullptr.

Definition at line 603 of file OTAPI.cpp.

604 {
605  return Exec()->Wallet_ImportNym(FILE_CONTENTS);
606 }
EXPORT std::string Wallet_ImportNym(const std::string &FILE_CONTENTS) const
returns NymID if success, else nullptr.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_ImportPurse ( const std::string &  SERVER_ID,
const std::string &  ASSET_TYPE_ID,
const std::string &  USER_ID,
const std::string &  THE_PURSE 
)
static

Should handle duplicates. Should load, merge, and save.

Definition at line 1907 of file OTAPI.cpp.

1911 {
1912  return Exec()->Wallet_ImportPurse(SERVER_ID, ASSET_TYPE_ID, USER_ID,
1913  THE_PURSE);
1914 }
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.
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_RemoveAssetType ( const std::string &  ASSET_ID)
static
    Remove this asset contract from my wallet!

Try to remove the asset contract from the wallet. This will not work if there are any accounts in the wallet for the same asset type ID. returns OT_BOOL

Definition at line 546 of file OTAPI.cpp.

547 {
548  return Exec()->Wallet_RemoveAssetType(ASSET_ID);
549 }
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
EXPORT bool Wallet_RemoveAssetType(const std::string &ASSET_ID) const
bool opentxs::OTAPI_Wrap::Wallet_RemoveNym ( const std::string &  NYM_ID)
static
    Remove this Nym from my wallet!

Try to remove the Nym from the wallet. This will not work if there are any nyms in the wallet for the same server ID. returns OT_BOOL

Definition at line 556 of file OTAPI.cpp.

557 {
558  return Exec()->Wallet_RemoveNym(NYM_ID);
559 }
EXPORT bool Wallet_RemoveNym(const std::string &NYM_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::Wallet_RemoveServer ( const std::string &  SERVER_ID)
static
    Remove this server contract from my wallet!

Try to remove the server contract from the wallet. This will not work if there are any accounts in the wallet for the same server ID. returns OT_BOOL

Definition at line 536 of file OTAPI.cpp.

537 {
538  return Exec()->Wallet_RemoveServer(SERVER_ID);
539 }
EXPORT bool Wallet_RemoveServer(const std::string &SERVER_ID) const
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
bool opentxs::OTAPI_Wrap::WalletExists ( )
static

WALLET EXISTS

Just Checks if the m_pWallet pointer is not null.

WalletExists();

Definition at line 284 of file OTAPI.cpp.

285 {
286  return Exec()->WalletExists();
287 }
EXPORT bool WalletExists() const
Definition: OTAPI_Exec.cpp:358
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
int32_t opentxs::OTAPI_Wrap::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
--------------------------------------------------------------------------

WITHDRAW VOUCHER – aka CASHIER'S CHEQUE.

This is VERY similar to withdrawing cash, except the server gives you a voucher instead of cash. It's the same thing as a CASHIER'S CHEQUE...

Basically the funds are moved into an int32_t server account, and then the server gives you a cheque drawn on its own account. This way you can use it like a cheque, but it will never bounce.

Returns int32_t: -1 means error; no message was sent. -2 means the message was sent, but the request number must be passed as a string, so call GetLargeRequestNum. 0 means NO error, but also: no message was sent. >0 means NO error, and the message was sent, and the request number fits into an integer... ...and in fact the requestNum IS the return value! ===> In 99% of cases, this LAST option is what actually happens!!

Definition at line 2236 of file OTAPI.cpp.

2242 {
2243  return Exec()->withdrawVoucher(SERVER_ID, USER_ID, ACCT_ID,
2244  RECIPIENT_USER_ID, CHEQUE_MEMO, AMOUNT);
2245 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158
std::string opentxs::OTAPI_Wrap::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 
)
static
    (Above) IMPORTANT: USE the above functions for setting the CLIENT-SIDE

display labels that you use in your UI for the Nyms/Servers/AssetTypes/Accounts. These labels are stored SEPARATELY from their own files, in the wallet file.

If you just added the contract, it will SET the label for you based on the contract type. like if it's an asset contract, it uses the currency name field from the asset contract. If it's a server contract it uses the entity short name. After that, it's configurable for the user, and stays on client side, and persists via wallet.

EVEN WHEN OT has to re-download one of those files, it will make sure to save the display label properly in the wallet.

THIS MEANS you, as a client developer: 1) CAN DEPEND on these labels to have the right value. 2) Can expect them to start out with good default values. 3) Can configure them from there. 4) SHOULD DISPLAY THEM as appropriate in your application. 5) Of course, use the ID behind the scenes for making all your OT calls... just use the name for display purposes.

WRITE A CHEQUE --- (Returns the cheque in string form.)

==> WriteCheque() internally constructs an OTCheque
and issues it, like so:

OTCheque theCheque( SERVER_ID, ASSET_TYPE_ID );

theCheque.IssueCheque( AMOUNT // The amount of the cheque, in string form,
which OTAPI

will convert to a int64_t integer. Negative amounts allowed, since that is how OT implements invoices. (An invoice is just a cheque with a negative amount.)

lTransactionNumber, // The API will supply this automatically, as long as

there are some transaction numbers in the wallet. (Call getTransactionNumber() if your wallet needs more.)

VALID_FROM, VALID_TO, // Valid date range (in seconds since Jan 1970...)

ACCOUNT_ID, USER_ID, // User ID and Acct ID for SENDER.

CHEQUE_MEMO, // The memo for the cheque. (Can be empty or be nullptr.)

RECIPIENT_USER_ID); // Recipient User ID is optional. (You can use an

empty string here, to write a blank cheque, or pass nullptr.)

Definition at line 1057 of file OTAPI.cpp.

1062 {
1063  return Exec()->WriteCheque(SERVER_ID, CHEQUE_AMOUNT, VALID_FROM, VALID_TO,
1064  SENDER_ACCT_ID, SENDER_USER_ID, CHEQUE_MEMO,
1065  RECIPIENT_USER_ID);
1066 }
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
static EXPORT OTAPI_Exec * Exec()
Definition: OTAPI.cpp:158

The documentation for this class was generated from the following files: