hdac SDK
SDK for hdac blockchain development
hs_keys.h
1 #ifndef HS_KEYS_H
2 #define HS_KEYS_H
3 
4 #include <string>
5 #include <memory>
6 #include "bitcoinaddress.h"
16 struct KeyPairs {
17  std::string privateKey;
18  std::string pubkey;
19  std::string pubkeyHash;
20  std::string walletAddr;
21 };
22 
23 class IPrivateKeyHelper;
24 class IWalletAddrHelper;
25 
27 KeyPairs createKeyPairs(const IPrivateKeyHelper &privateHelper, const IWalletAddrHelper &addrHelper);
28 
29 class IWalletAddrHelper;
30 class IPrivateKeyHelper;
31 
33 std::string createStreamPublishTx(const std::string& streamKey, const std::string& streamItem,
34  const std::string &createTxid,
35  const std::string &unspentScriptPubKey, const std::string &unspentTxid, uint32_t unspentVOut,
36  const std::string &unspentRedeemScript, const std::string &privateKey,
37  const IPrivateKeyHelper &helper);
38 
40 std::string createAssetSendTx(const std::string& toAddr, double quantity,
41  const std::string& issueTxid, int multiple,
42  const std::string& unspentScriptPubKey, const std::string& unspentTxid, uint32_t unspentVOut,
43  double unspentQty, const std::string &unspentRedeemScript,
44  const std::string& privateKey, const IPrivateKeyHelper& privateHelper, const IWalletAddrHelper &walletHelper);
45 
46 std::string walletAddrFromPubKey(const std::string& pubkeyStr, const IWalletAddrHelper& addrHelpler);
47 
49 bool VerifyMessage(const std::string &strAddress, const std::string &strSign,
50  const std::string &strMessage, const IWalletAddrHelper &addrHelper);
51 
53 std::string SignMessage(const std::string &strAddress, const std::string &strMessage,
54  const IPrivateKeyHelper &privateHelper, const IWalletAddrHelper &addrHelper);
55 
56 #endif // HS_KEYS_H
KeyPairs createKeyPairs(const IPrivateKeyHelper &privateHelper, const IWalletAddrHelper &addrHelper)
개인키를 생성한다.
Definition: hs_keys.cpp:45
string createStreamPublishTx(const string &streamKey, const string &streamValue, const string &createTxid, const string &unspentScriptPubKey, const string &unspentTxid, uint32_t unspentVOut, const string &unspentRedeemScript, const string &privateKey, const IPrivateKeyHelper &helper)
스트림키 발행을 위한 raw-tx 문자열을 생성한다.
Definition: hs_keys.cpp:285
Definition: keyshelper.h:26
string SignMessage(const string &strAddress, const string &strMessage, const IPrivateKeyHelper &privateHelper, const IWalletAddrHelper &addrHelper)
개인키를 이용하여 sign 된 메시지를 만든다.
Definition: hs_keys.cpp:438
bool VerifyMessage(const string &strAddress, const string &strSign, const string &strMessage, const IWalletAddrHelper &addrHelper)
개인키 또는 지갑주소로 sign 된 메시지를 검증 한다.
Definition: hs_keys.cpp:390
개인키 정보
Definition: hs_keys.h:16
string createAssetSendTx(const string &toAddr, double quantity, const string &issueTxid, int multiple, const string &unspentScriptPubKey, const string &unspentTxid, uint32_t unspentVOut, double unspentQty, const string &unspentRedeemScript, const string &privateKey, const IPrivateKeyHelper &privateHelper, const IWalletAddrHelper &walletHelper)
개인키 처리를 위한 정보 제공 인터페이스를 가져온다.
Definition: hs_keys.cpp:135
string walletAddrFromPubKey(const string &pubkeyStr, const IWalletAddrHelper &addrHelpler)
공개키로부터 지갑주소를 문자열로 얻는다.
Definition: hs_keys.cpp:371
Definition: keyshelper.h:30