Open-Transactions  0.93.0-ge03d287
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MintLucre.cpp
Go to the documentation of this file.
1 /************************************************************
2  *
3  * MintLucre.cpp
4  *
5  */
6 
7 /************************************************************
8  -----BEGIN PGP SIGNED MESSAGE-----
9  Hash: SHA1
10 
11  * OPEN TRANSACTIONS
12  *
13  * Financial Cryptography and Digital Cash
14  * Library, Protocol, API, Server, CLI, GUI
15  *
16  * -- Anonymous Numbered Accounts.
17  * -- Untraceable Digital Cash.
18  * -- Triple-Signed Receipts.
19  * -- Cheques, Vouchers, Transfers, Inboxes.
20  * -- Basket Currencies, Markets, Payment Plans.
21  * -- Signed, XML, Ricardian-style Contracts.
22  * -- Scripted smart contracts.
23  *
24  * Copyright (C) 2010-2013 by "Fellow Traveler" (A pseudonym)
25  *
26  * EMAIL:
28  *
29  * BITCOIN: 1NtTPVVjDsUfDWybS4BwvHpG2pdS9RnYyQ
30  *
31  * KEY FINGERPRINT (PGP Key in license file):
32  * 9DD5 90EB 9292 4B48 0484 7910 0308 00ED F951 BB8E
33  *
34  * OFFICIAL PROJECT WIKI(s):
35  * https://github.com/FellowTraveler/Moneychanger
36  * https://github.com/FellowTraveler/Open-Transactions/wiki
37  *
38  * WEBSITE:
39  * http://www.OpenTransactions.org/
40  *
41  * Components and licensing:
42  * -- Moneychanger..A Java client GUI.....LICENSE:.....GPLv3
43  * -- otlib.........A class library.......LICENSE:...LAGPLv3
44  * -- otapi.........A client API..........LICENSE:...LAGPLv3
45  * -- opentxs/ot....Command-line client...LICENSE:...LAGPLv3
46  * -- otserver......Server Application....LICENSE:....AGPLv3
47  * Github.com/FellowTraveler/Open-Transactions/wiki/Components
48  *
49  * All of the above OT components were designed and written by
50  * Fellow Traveler, with the exception of Moneychanger, which
51  * was contracted out to Vicky C ([email protected]).
52  * The open-source community has since actively contributed.
53  *
54  * -----------------------------------------------------
55  *
56  * LICENSE:
57  * This program is free software: you can redistribute it
58  * and/or modify it under the terms of the GNU Affero
59  * General Public License as published by the Free Software
60  * Foundation, either version 3 of the License, or (at your
61  * option) any later version.
62  *
63  * ADDITIONAL PERMISSION under the GNU Affero GPL version 3
64  * section 7: (This paragraph applies only to the LAGPLv3
65  * components listed above.) If you modify this Program, or
66  * any covered work, by linking or combining it with other
67  * code, such other code is not for that reason alone subject
68  * to any of the requirements of the GNU Affero GPL version 3.
69  * (==> This means if you are only using the OT API, then you
70  * don't have to open-source your code--only your changes to
71  * Open-Transactions itself must be open source. Similar to
72  * LGPLv3, except it applies to software-as-a-service, not
73  * just to distributing binaries.)
74  *
75  * Extra WAIVER for OpenSSL, Lucre, and all other libraries
76  * used by Open Transactions: This program is released under
77  * the AGPL with the additional exemption that compiling,
78  * linking, and/or using OpenSSL is allowed. The same is true
79  * for any other open source libraries included in this
80  * project: complete waiver from the AGPL is hereby granted to
81  * compile, link, and/or use them with Open-Transactions,
82  * according to their own terms, as long as the rest of the
83  * Open-Transactions terms remain respected, with regard to
84  * the Open-Transactions code itself.
85  *
86  * Lucre License:
87  * This code is also "dual-license", meaning that Ben Lau-
88  * rie's license must also be included and respected, since
89  * the code for Lucre is also included with Open Transactions.
90  * See Open-Transactions/src/otlib/lucre/LUCRE_LICENSE.txt
91  * The Laurie requirements are light, but if there is any
92  * problem with his license, simply remove the Lucre code.
93  * Although there are no other blind token algorithms in Open
94  * Transactions (yet. credlib is coming), the other functions
95  * will continue to operate.
96  * See Lucre on Github: https://github.com/benlaurie/lucre
97  * -----------------------------------------------------
98  * You should have received a copy of the GNU Affero General
99  * Public License along with this program. If not, see:
100  * http://www.gnu.org/licenses/
101  *
102  * If you would like to use this software outside of the free
103  * software license, please contact FellowTraveler.
104  * (Unfortunately many will run anonymously and untraceably,
105  * so who could really stop them?)
106  *
107  * DISCLAIMER:
108  * This program is distributed in the hope that it will be
109  * useful, but WITHOUT ANY WARRANTY; without even the implied
110  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
111  * PURPOSE. See the GNU Affero General Public License for
112  * more details.
113 
114  -----BEGIN PGP SIGNATURE-----
115  Version: GnuPG v1.4.9 (Darwin)
116 
117  iQIcBAEBAgAGBQJRSsfJAAoJEAMIAO35UbuOQT8P/RJbka8etf7wbxdHQNAY+2cC
118  vDf8J3X8VI+pwMqv6wgTVy17venMZJa4I4ikXD/MRyWV1XbTG0mBXk/7AZk7Rexk
119  KTvL/U1kWiez6+8XXLye+k2JNM6v7eej8xMrqEcO0ZArh/DsLoIn1y8p8qjBI7+m
120  aE7lhstDiD0z8mwRRLKFLN2IH5rAFaZZUvj5ERJaoYUKdn4c+RcQVei2YOl4T0FU
121  LWND3YLoH8naqJXkaOKEN4UfJINCwxhe5Ke9wyfLWLUO7NamRkWD2T7CJ0xocnD1
122  sjAzlVGNgaFDRflfIF4QhBx1Ddl6wwhJfw+d08bjqblSq8aXDkmFA7HeunSFKkdn
123  oIEOEgyj+veuOMRJC5pnBJ9vV+7qRdDKQWaCKotynt4sWJDGQ9kWGWm74SsNaduN
124  TPMyr9kNmGsfR69Q2Zq/FLcLX/j8ESxU+HYUB4vaARw2xEOu2xwDDv6jt0j3Vqsg
125  x7rWv4S/Eh18FDNDkVRChiNoOIilLYLL6c38uMf1pnItBuxP3uhgY6COm59kVaRh
126  nyGTYCDYD2TK+fI9o89F1297uDCwEJ62U0Q7iTDp5QuXCoxkPfv8/kX6lS6T3y9G
127  M9mqIoLbIQ1EDntFv7/t6fUTS2+46uCrdZWbQ5RjYXdrzjij02nDmJAm2BngnZvd
128  kamH0Y/n11lCvo1oQxM+
129  =uSzz
130  -----END PGP SIGNATURE-----
131  **************************************************************/
132 
133 #include "../core/stdafx.hpp"
134 
135 #include "MintLucre.hpp"
136 #include "DigitalCash.hpp"
137 #include "Token.hpp"
138 
139 #include "../core/crypto/OTAsymmetricKey.hpp"
140 #include "../core/crypto/OTEnvelope.hpp"
141 
142 #if defined(OT_CASH_USING_LUCRE)
143 #include "../core/crypto/OpenSSL_BIO.hpp"
144 #endif
145 
146 #include "../core/OTLog.hpp"
147 #include "../core/OTPseudonym.hpp"
148 
149 namespace opentxs
150 {
151 
152 #if defined(OT_CASH_USING_LUCRE)
153 
155  : ot_super()
156 {
157 }
158 
159 MintLucre::MintLucre(const OTString& strServerID,
160  const OTString& strAssetTypeID)
161  : ot_super(strServerID, strAssetTypeID)
162 {
163 }
164 
165 MintLucre::MintLucre(const OTString& strServerID,
166  const OTString& strServerNymID,
167  const OTString& strAssetTypeID)
168  : ot_super(strServerID, strServerNymID, strAssetTypeID)
169 {
170 }
171 
173 {
174 }
175 
176 #endif // Lucre
177 
178 #if defined(OT_CASH_USING_LUCRE)
179 
180 // Todo: need to be saving these BIOs somewhere, and freeing them at
181 // the end of the run of the application.
182 //
183 void SetMonitor(const char* filepathexact)
184 {
185  BIO* out = BIO_new_file(filepathexact, "w");
186  assert(out);
187  SetDumper(out);
188 }
189 
190 // The mint has a different key pair for each denomination.
191 // Pass the actual denomination such as 5, 10, 20, 50, 100...
192 bool MintLucre::AddDenomination(OTPseudonym& theNotary, int64_t lDenomination,
193  int32_t nPrimeLength)
194 {
195  OT_ASSERT(nullptr != m_pKeyPublic);
196 
197  bool bReturnValue = false;
198 
199  // Let's make sure it doesn't already exist
200  OTASCIIArmor theArmor;
201  if (GetPublic(theArmor, lDenomination)) {
202  // it already exists.
203  otErr << "Error: Denomination public already exists in "
204  "OTMint::AddDenomination\n";
205  return false;
206  }
207  if (GetPrivate(theArmor, lDenomination)) {
208  // it already exists.
209  otErr << "Error: Denomination private already exists in "
210  "OTMint::AddDenomination\n";
211  return false;
212  }
213 
214  // otErr << "%s <size of bank prime in bits> <bank data file> <bank
215  // public data file>\n",
216 
217  if ((nPrimeLength / 8) < (MIN_COIN_LENGTH + DIGEST_LENGTH)) {
218  otErr << "Prime must be at least "
219  << (MIN_COIN_LENGTH + DIGEST_LENGTH) * 8 << " bits\n";
220  return false;
221  }
222 
223  if (nPrimeLength % 8) {
224  otErr << "Prime length must be a multiple of 8\n";
225  return false;
226  }
227 
228 #ifdef _WIN32
229  SetMonitor("openssl.dump");
230 #else
231  SetMonitor(stderr);
232 #endif
233 
234  OpenSSL_BIO bio = BIO_new(BIO_s_mem());
235  OpenSSL_BIO bioPublic = BIO_new(BIO_s_mem());
236 
237  // Generate the mint private key information
238  Bank bank(nPrimeLength / 8);
239  bank.WriteBIO(bio);
240 
241  // Generate the mint public key information
242  PublicBank pbank(bank);
243  pbank.WriteBIO(bioPublic);
244 
245  // Copy from BIO back to a normal OTString or Ascii-Armor
246  char privateBankBuffer[4096],
247  publicBankBuffer[4096]; // todo stop hardcoding these string lengths
248  int32_t privatebankLen =
249  BIO_read(bio, privateBankBuffer, 4000); // cutting it a little short on
250  // purpose, with the buffer.
251  int32_t publicbankLen =
252  BIO_read(bioPublic, publicBankBuffer,
253  4000); // Just makes me feel more comfortable for some reason.
254 
255  if (privatebankLen && publicbankLen) {
256  // With this, we have the Lucre public and private bank info converted
257  // to OTStrings
258  OTString strPublicBank;
259  strPublicBank.Set(publicBankBuffer, publicbankLen);
260  OTString strPrivateBank;
261  strPrivateBank.Set(privateBankBuffer, privatebankLen);
262 
263  OTASCIIArmor* pPublic = new OTASCIIArmor();
264  OTASCIIArmor* pPrivate = new OTASCIIArmor();
265 
266  OT_ASSERT(nullptr != pPublic);
267  OT_ASSERT(nullptr != pPrivate);
268 
269  // Set the public bank info onto pPublic
270  pPublic->SetString(strPublicBank, true); // linebreaks = true
271 
272  // Seal the private bank info up into an encrypted Envelope
273  // and set it onto pPrivate
274  OTEnvelope theEnvelope;
275  theEnvelope.Seal(theNotary, strPrivateBank); // Todo check the return
276  // values on these two
277  // functions
278  theEnvelope.GetAsciiArmoredData(*pPrivate);
279 
280  // Add the new key pair to the maps, using denomination as the key
281  m_mapPublic[lDenomination] = pPublic;
282  m_mapPrivate[lDenomination] = pPrivate;
283 
284  // Grab the Server Nym ID and save it with this Mint
285  theNotary.GetIdentifier(m_ServerNymID);
286 
287  // Grab the Server's public key and save it with this Mint
288  //
289  const OTAsymmetricKey& theNotaryPubKey = theNotary.GetPublicSignKey();
290  delete m_pKeyPublic;
291  m_pKeyPublic = theNotaryPubKey.ClonePubKey();
292 
294  // ---------------------------
295  // Success!
296  bReturnValue = true;
297  otWarn << "Successfully added denomination: " << lDenomination << "\n";
298  }
299 
300  return bReturnValue;
301 }
302 
303 #endif // defined (OT_CASH_USING_LUCRE)
304 
305 /*
306 
307  enum tokenState {
308  blankToken,
309  protoToken,
310  signedToken,
311  spendableToken,
312  verifiedToken,
313  errorToken
314  };
315 
316 
317  Create a memory BIO and write some data to it:
318 
319  OpenSSL_BIO mem = BIO_new(BIO_s_mem());
320  BIO_puts(mem, "Hello World\n");
321 
322 
323  Create a read only memory BIO:
324 
325  char data[] = "Hello World";
326  OpenSSL_BIO mem;
327  mem = BIO_new_mem_buf(data, -1);
328 
329 
330  Extract the BUF_MEM structure from a memory BIO and then free up the BIO:
331 
332  BUF_MEM *bptr;
333  BIO_get_mem_ptr(mem, &bptr);
334  BIO_set_close(mem, BIO_NOCLOSE); // So BIO_free() leaves BUF_MEM alone
335  BIO_free(mem);
336 
337  */
338 
339 #if defined(OT_CASH_USING_LUCRE) && defined(OT_CRYPTO_USING_OPENSSL)
340 
341 // Lucre step 3: the mint signs the token
342 //
343 bool MintLucre::SignToken(OTPseudonym& theNotary, Token& theToken,
344  OTString& theOutput, int32_t nTokenIndex)
345 {
346  bool bReturnValue = false;
347 
348  // otErr << "%s <bank file> <coin request> <coin signature> [<signature
349  // repeats>]\n",
350  LucreDumper setDumper;
351 
352  // otErr << "OTMint::SignToken!!\nnTokenIndex: %d\n Denomination:
353  // %lld\n", nTokenIndex, theToken.GetDenomination());
354 
355  OpenSSL_BIO bioBank = BIO_new(BIO_s_mem()); // input
356  OpenSSL_BIO bioRequest = BIO_new(BIO_s_mem()); // input
357  OpenSSL_BIO bioSignature = BIO_new(BIO_s_mem()); // output
358 
359  OTASCIIArmor thePrivate;
360  GetPrivate(thePrivate, theToken.GetDenomination());
361 
362  // The Mint private info is encrypted in
363  // m_mapPrivates[theToken.GetDenomination()].
364  // So I need to extract that first before I can use it.
365  OTEnvelope theEnvelope(thePrivate);
366 
367  OTString strContents; // output from opening the envelope.
368  // Decrypt the Envelope into strContents
369  if (!theEnvelope.Open(theNotary, strContents)) return false;
370 
371  // copy strContents to a BIO
372  BIO_puts(bioBank, strContents.Get());
373 
374  // otErr << "BANK CONTENTS:\n%s--------------------------------------\n",
375  // strContents.Get());
376 
377  // Instantiate the Bank with its private key
378  Bank bank(bioBank);
379  // otErr << "BANK INSTANTIATED.--------------------------------------\n";
380 
381  // I need the request. the prototoken.
382  OTASCIIArmor ascPrototoken;
383  bool bFoundToken = theToken.GetPrototoken(ascPrototoken, nTokenIndex);
384 
385  if (bFoundToken) {
386  // base64-Decode the prototoken
387  OTString strPrototoken(ascPrototoken);
388 
389  // otErr << "\n--------------------------------------\nDEBUG:
390  // PROTOTOKEN CONTENTS:\n"
391  // "-----------------%s---------------------\n",
392  // strPrototoken.Get() );
393 
394  // copy strPrototoken to a BIO
395  BIO_puts(bioRequest, strPrototoken.Get());
396 
397  // Load up the coin request from the bio (the prototoken)
398  PublicCoinRequest req(bioRequest);
399  // otErr << "PROTOTOKEN
400  // INSTANTIATED.--------------------------------------\n";
401 
402  // Sign it with the bank we previously instantiated.
403  // results will be in bnSignature (BIGNUM)
404  BIGNUM* bnSignature = bank.SignRequest(req);
405 
406  if (nullptr == bnSignature) {
407  otErr << "MAJOR ERROR!: Bank.SignRequest failed in "
408  "MintLucre::SignToken\n";
409  }
410  else {
411  // otErr << "BANK.SIGNREQUEST
412  // SUCCESSFUL.--------------------------------------\n";
413 
414  // Write the request contents, followed by the signature contents,
415  // to the Signature bio. Then free the BIGNUM.
416  req.WriteBIO(bioSignature); // the original request contents
417  DumpNumber(bioSignature, "signature=",
418  bnSignature); // the new signature contents
419  BN_free(bnSignature);
420 
421  // Read the signature bio into a C-style buffer...
422  char sig_buf[1024]; // todo stop hardcoding these string lengths
423  // memset(sig_buf, 0, 1024); // zero it out. (I had this
424  // commented out, but the size was 2048, so maybe it's safe now at
425  // 1024.)
426 
427  int32_t sig_len = BIO_read(bioSignature, sig_buf,
428  1000); // cutting it a little short on
429  // purpose, with the buffer. Just
430  // makes me feel more comfortable
431  // for some reason.
432 
433  // Add the null terminator by hand (just in case.)
434  sig_buf[sig_len] = '\0';
435 
436  if (sig_len) { // ***********************************************
437  // otErr <<
438  // "\n--------------------------------------\n"
439  // "*** Siglen is %d. sig_str_len is
440  // %d.\nsig buf:\n------------%s------------\nLAST "
441  // "CHARACTER IS '%c' SECOND TO LAST
442  // CHARACTER IS '%c'\n",
443  // sig_len, sig_str_len, sig_buf,
444  // sig_buf[sig_str_len-1], sig_buf[sig_str_len-2]);
445 
446  // Copy the original coin request into the spendable field of
447  // the token object.
448  // (It won't actually be spendable until the client processes
449  // it, though.)
450  theToken.SetSpendable(ascPrototoken);
451 
452  // otErr << "***
453  // SPENDABLE:\n-----------%s---------------------\n",
454  // ascPrototoken.Get());
455 
456  // Base64-encode the signature contents into
457  // theToken.m_Signature.
458  OTString strSignature(sig_buf);
459  // strSignature.Set(sig_buf, sig_len-1); // sig_len
460  // includes null terminator, whereas Set() adds 1 for it.
461 
462  // otErr << "SIGNATURE:\n--------------------%s"
463  // "------------------\n",
464  // strSignature.Get());
465 
466  // Here we pass the signature back to the caller.
467  // He will probably set it onto the token.
468  theOutput.Set(sig_buf, sig_len);
469  bReturnValue = true;
470 
471  // This is also where we set the expiration date on the token.
472  // The client should have already done this, but we are
473  // explicitly
474  // setting the values here to prevent any funny business.
476  m_VALID_TO);
477  }
478  }
479  }
480 
481  return bReturnValue;
482 }
483 
484 // Lucre step 5: mint verifies token when it is redeemed by merchant.
485 // This function is called by OTToken::VerifyToken.
486 // That's the one you should be calling, most likely, not this one.
487 bool MintLucre::VerifyToken(OTPseudonym& theNotary, OTString& theCleartextToken,
488  int64_t lDenomination)
489 {
490  bool bReturnValue = false;
491  // otErr << "%s <bank info> <coin>\n", argv[0]);
492  LucreDumper setDumper;
493 
494  OpenSSL_BIO bioBank = BIO_new(BIO_s_mem()); // input
495  OpenSSL_BIO bioCoin = BIO_new(BIO_s_mem()); // input
496 
497  // --- copy theCleartextToken to bioCoin so lucre can load it
498  BIO_puts(bioCoin, theCleartextToken.Get());
499 
500  // --- The Mint private info is encrypted in m_mapPrivate[lDenomination].
501  // So I need to extract that first before I can use it.
502  OTASCIIArmor theArmor;
503  GetPrivate(theArmor, lDenomination);
504  OTEnvelope theEnvelope(theArmor);
505 
506  OTString strContents; // will contain output from opening the envelope.
507  // Decrypt the Envelope into strContents
508  if (theEnvelope.Open(theNotary, strContents)) {
509  // copy strContents to a BIO
510  BIO_puts(bioBank, strContents.Get());
511 
512  // ---- Now the bank and coin bios are both ready to go...
513 
514  Bank bank(bioBank);
515  Coin coin(bioCoin);
516 
517  if (bank.Verify(coin)) // Here's the boolean output: coin is verified!
518  {
519  bReturnValue = true;
520 
521  // (Done): When a token is redeemed, need to store it in the spent
522  // token database.
523  // Right now I can verify the token, but unless I check it against a
524  // database, then
525  // even though the signature verifies, it doesn't stop people from
526  // redeeming the same
527  // token again and again and again.
528  //
529  // (done): also need to make sure issuer has double-entries for
530  // total amount outstanding.
531  //
532  // UPDATE: These are both done now. The Spent Token database is
533  // implemented in the transaction server,
534  // (not OTLib proper) and the same server also now keeps a cash
535  // account to match all cash withdrawals.
536  // (Meaning, if 10,000 clams total have been withdrawn by various
537  // users, then the server actually has
538  // a clam account containing 10,000 clams. As the cash comes in for
539  // redemption, the server debits it from
540  // this account again before sending it to its final destination.
541  // This way the server tracks total outstanding
542  // amount, as an additional level of security after the blind
543  // signature itself.)
544  }
545  }
546 
547  return bReturnValue;
548 }
549 
550 #endif // defined(OT_CASH_USING_LUCRE) && defined(OT_CRYPTO_USING_OPENSSL)
551 
552 } // namespace opentxs
int32_t m_nSeries
Definition: Mint.hpp:186
virtual EXPORT bool VerifyToken(OTPseudonym &theNotary, OTString &theCleartextToken, int64_t lDenomination)
Definition: MintLucre.cpp:487
virtual OTAsymmetricKey * ClonePubKey() const
virtual bool AddDenomination(OTPseudonym &theNotary, int64_t lDenomination, int32_t nPrimeLength=1024)
Definition: MintLucre.cpp:192
EXPORT bool GetPrototoken(OTASCIIArmor &ascPrototoken, int32_t nTokenIndex)
Definition: Token.cpp:1039
bool GetPrivate(OTASCIIArmor &theArmor, int64_t lDenomination)
Definition: Mint.cpp:557
EXPORT void GetIdentifier(OTIdentifier &theIdentifier) const
Definition: bank.h:185
void DumpNumber(BIO *out, const char *szTitle, const BIGNUM *bn, const char *szTrailer=_NL)
void WriteBIO(BIO *bio)
void WriteBIO(BIO *bio)
OTIdentifier m_ServerNymID
Definition: Mint.hpp:169
EXPORT bool Open(const OTPseudonym &theRecipient, OTString &theOutput, const OTPasswordData *pPWData=nullptr)
Definition: OTEnvelope.cpp:581
EXPORT bool Seal(const OTPseudonym &theRecipient, const OTString &theInput)
Definition: OTEnvelope.cpp:521
EXPORT bool SetString(const OTString &theData, bool bLineBreaks=true)
bool GetPublic(OTASCIIArmor &theArmor, int64_t lDenomination)
Definition: Mint.cpp:574
EXPORT void Set(const char *data, uint32_t enforcedMaxLength=0)
Definition: OTString.cpp:1055
Definition: bank.h:75
void SetMonitor(const char *filepathexact)
Definition: MintLucre.cpp:183
EXPORT bool GetAsciiArmoredData(OTASCIIArmor &theArmoredText, bool bLineBreaks=true) const
Definition: OTEnvelope.cpp:162
int64_t GetDenomination() const
Definition: Token.hpp:409
mapOfArmor m_mapPrivate
Definition: Mint.hpp:160
#define OT_ASSERT(x)
Definition: Assert.hpp:150
virtual EXPORT ~MintLucre()
Definition: MintLucre.cpp:172
void SetSeriesAndExpiration(int32_t nSeries, time64_t VALID_FROM, time64_t VALID_TO)
Definition: Token.hpp:373
virtual EXPORT bool SignToken(OTPseudonym &theNotary, Token &theToken, OTString &theOutput, int32_t nTokenIndex)
Definition: MintLucre.cpp:343
OTAsymmetricKey * m_pKeyPublic
Definition: Mint.hpp:172
EXPORT const OTAsymmetricKey & GetPublicSignKey() const
OTLOG_IMPORT OTLogStream otWarn
EXPORT const char * Get() const
Definition: OTString.cpp:1045
int32_t m_nDenominationCount
Definition: Mint.hpp:176
#define DIGEST_LENGTH
Definition: bank.h:15
OTLOG_IMPORT OTLogStream otErr
void SetDumper(BIO *out)
void SetSpendable(const OTASCIIArmor &theArmor)
Definition: Token.hpp:333
time64_t m_VALID_FROM
Definition: Mint.hpp:192
mapOfArmor m_mapPublic
Definition: Mint.hpp:164
#define MIN_COIN_LENGTH
Definition: bank.h:13
time64_t m_VALID_TO
Definition: Mint.hpp:194