From 60ee05d0b52f63195d4beb025e298af90ddf5611 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Fri, 13 Sep 2024 15:31:04 -0300 Subject: [PATCH] Added `GeniusSDKTransferTokens` --- src/GeniusSDK.cpp | 9 +++++++++ src/GeniusSDK.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/GeniusSDK.cpp b/src/GeniusSDK.cpp index 615dfd4..39d5e0d 100644 --- a/src/GeniusSDK.cpp +++ b/src/GeniusSDK.cpp @@ -6,7 +6,9 @@ */ #include "GeniusSDK.h" + #include "account/GeniusNode.hpp" +#include #include #include #include @@ -163,3 +165,10 @@ GeniusAddress GeniusSDKGetAddress() return ret; } + +bool GeniusSDKTransferTokens( uint64_t amount, GeniusAddress *dest ) +{ + uint256_t destination( dest->address ); + + return GeniusNodeInstance->TransferFunds( amount, destination ); +} diff --git a/src/GeniusSDK.h b/src/GeniusSDK.h index 29707ab..4b17821 100644 --- a/src/GeniusSDK.h +++ b/src/GeniusSDK.h @@ -8,6 +8,7 @@ #define _GENIUSSDK_H #include +#include #ifndef GNUS_EXPORT_BEGIN #if defined( __cplusplus ) @@ -58,6 +59,7 @@ 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_VISIBILITY_DEFAULT bool GeniusSDKTransferTokens( uint64_t amount, GeniusAddress *dest ); GNUS_EXPORT_END