diff --git a/src/GeniusSDK.cpp b/src/GeniusSDK.cpp index 98c5232..a44903f 100644 --- a/src/GeniusSDK.cpp +++ b/src/GeniusSDK.cpp @@ -7,6 +7,7 @@ #include "GeniusSDK.h" #include "account/GeniusNode.hpp" +#include #include #include #include @@ -151,3 +152,14 @@ void GeniusSDKMintTokens( uint64_t amount ) { GeniusNodeInstance->MintTokens( amount ); } + +GeniusAddress GeniusSDKGetAddress() +{ + auto address = GeniusNodeInstance->GetAdddress(); + + GeniusAddress ret; + + boost::multiprecision::export_bits( address, ret.bytes, 8 ); + + return ret; +} diff --git a/src/GeniusSDK.h b/src/GeniusSDK.h index a7d5049..db431ea 100644 --- a/src/GeniusSDK.h +++ b/src/GeniusSDK.h @@ -41,6 +41,11 @@ typedef struct GeniusArray *ptr; } GeniusMatrix; ///< Struct to interop a matrix of C++ vectors in C +typedef struct +{ + uint8_t bytes[256 / 8]; +} GeniusAddress; + typedef char ImagePath_t[1024]; ///< ID/Path of the image to be processed typedef uint64_t PayAmount_t; ///< Amount to be paid for the processing @@ -50,6 +55,7 @@ GNUS_VISIBILITY_DEFAULT uint64_t GeniusSDKGetBalance(); GNUS_VISIBILITY_DEFAULT GeniusMatrix GeniusSDKGetTransactions(); GNUS_VISIBILITY_DEFAULT void GeniusSDKFreeTransactions( GeniusMatrix matrix ); GNUS_VISIBILITY_DEFAULT void GeniusSDKMintTokens( uint64_t amount ); +GNUS_VISIBILITY_DEFAULT GeniusAddress GeniusSDKGetAddress(); GNUS_EXPORT_END