hdac SDK
SDK for hdac blockchain development
hs_keys_wrapper.h
1 #ifndef HS_KEYS_WRAPPER_H
2 #define HS_KEYS_WRAPPER_H
3 
4 #if (defined _WIN32) || (defined _WIN64)
5 #define DECL_EXPORT __declspec(dllexport)
6 #define DECL_IMPORT __declspec(dllimport)
7 #else
8 #define DECL_EXPORT
9 #define DECL_IMPORT
10 #endif
11 
12 #if defined(keys_wrapper_EXPORTS)
13 # define keys_wrapper_EXPORT DECL_EXPORT
14 #else
15 # define keys_wrapper_EXPORT DECL_IMPORT
16 #endif
17 
18 #include <stdio.h>
19 
20 typedef struct keypairs {
21  char privatekey[100];
22  char pubkey[100];
23  char pubkeyhash[100];
24  char walletaddr[100];
26 
28  char privateKeyPrefix[10];
29  char addrChecksum[10];
30 };
31 
33  char pubKeyAddrPrefix[10];
34  char scriptAddrPrefix[10];
35  char addrChecksum[10];
36 };
37 
38 struct TestStruct {
39  char stringData1[100];
40  uint64_t ulongData;
41 
42  char stringData2[200];
43  int32_t intData;
44 };
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 #ifdef _WIN32
51 
52  keys_wrapper_EXPORT char* create_stream_publish_tx_shp(const char* streamKey, const char* streamItem, const char* createTxid,
53  const char* unspentScriptPubKey, const char* unspentTxid, uint32_t unspentVOut,
54  const char* unspentRedeemScript, const char* privateKey, struct PrivateKeyHelpInfo *helper);
55 
56  keys_wrapper_EXPORT void create_key_pairs_shp(const struct PrivateKeyHelpInfo *privatehelper,
57  const struct WalletAddrHelpInfo *addrhelper, keypairs_type_t *out);
58 
59  keys_wrapper_EXPORT char *create_asset_send_tx_shp(const char *toAddr, double quantity, const char *issueTxid, int multiple,
60  const char *unspentScriptPubKey, const char *unspentTxid, uint32_t unspentVout,
61  double unspentQty, const char * unspentRedeemScript, const char *privateKey,
62  struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper);
63 
64  keys_wrapper_EXPORT char *sign_message_shp(const char *strAddress, const char *strMessage,
65  struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper);
66 
67  keys_wrapper_EXPORT int verify_message_shp(const char *strAddress, const char *strSign,
68  const char *strMessage, struct WalletAddrHelpInfo *addrhelper);
69 #endif
70 
72  keys_wrapper_EXPORT char* create_stream_publish_tx(const char* streamKey, const char* streamItem, const char* createTxid,
73  const char* unspentScriptPubKey, const char* unspentTxid, uint32_t unspentVOut,
74  const char* unspentRedeemScript, const char* privateKey, struct PrivateKeyHelpInfo *helper);
76  keys_wrapper_EXPORT keypairs_type_t *create_key_pairs(const struct PrivateKeyHelpInfo *privatehelper,
77  const struct WalletAddrHelpInfo *addrhelper);
79  keys_wrapper_EXPORT char *create_asset_send_tx(const char *toAddr, double quantity, const char *issueTxid, int multiple,
80  const char *unspentScriptPubKey, const char *unspentTxid, uint32_t unspentVout,
81  double unspentQty, const char * unspentRedeemScript, const char *privateKey,
82  struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper);
84  keys_wrapper_EXPORT char *sign_message(const char *strAddress, const char *strMessage,
85  struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper);
87  keys_wrapper_EXPORT int verify_message(const char *strAddress, const char *strSign,
88  const char *strMessage, struct WalletAddrHelpInfo *addrhelper);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif //HS_KEYS_WRAPPER_H
char * create_asset_send_tx(const char *toAddr, double quantity, const char *issueTxid, int multiple, const char *unspentScriptPubKey, const char *unspentTxid, uint32_t unspentVout, double unspentQty, const char *unspentRedeemScript, const char *privateKey, struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper)
createAssetSendTx 함수를 c에서 사용 하기 위해 wrapping 한 함수 개인키 처리를 위한 정보 제공 인터페이...
Definition: hs_keys_wrapper.cpp:228
char * create_stream_publish_tx(const char *streamKey, const char *streamItem, const char *createTxid, const char *unspentScriptPubKey, const char *unspentTxid, uint32_t unspentVOut, const char *unspentRedeemScript, const char *privateKey, struct PrivateKeyHelpInfo *helper)
createStreamPublishTx 함수를 c에서 사용하기 위해 wrapping 한 함수.
Definition: hs_keys_wrapper.cpp:154
Definition: hs_keys_wrapper.h:38
keypairs_type_t * create_key_pairs(const struct PrivateKeyHelpInfo *privatehelper, const struct WalletAddrHelpInfo *addrhelper)
createKeyPairs 함수를 c에서 사용하기 위해 wrapping 한 함수.
Definition: hs_keys_wrapper.cpp:183
char * sign_message(const char *strAddress, const char *strMessage, struct PrivateKeyHelpInfo *privatehelper, struct WalletAddrHelpInfo *addrhelper)
SignMessage 함수를 c에서 사용 하기 위해 wrapping 한 함수.
Definition: hs_keys_wrapper.cpp:263
Definition: hs_keys_wrapper.h:20
Definition: hs_keys_wrapper.h:32
Definition: hs_keys_wrapper.h:27
int verify_message(const char *strAddress, const char *strSign, const char *strMessage, struct WalletAddrHelpInfo *addrhelper)
VerifyMessage 함수를 c에서 사용 하기 위해 wrapping 한 함수.
Definition: hs_keys_wrapper.cpp:295