Skip to content

Commit

Permalink
Added GeniusSDKTransferTokens
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Sep 13, 2024
1 parent 9198c39 commit 60ee05d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/GeniusSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*/

#include "GeniusSDK.h"

#include "account/GeniusNode.hpp"
#include <algorithm>
#include <boost/multiprecision/cpp_int/import_export.hpp>
#include <memory>
#include <rapidjson/document.h>
Expand Down Expand Up @@ -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 );
}
2 changes: 2 additions & 0 deletions src/GeniusSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define _GENIUSSDK_H

#include <stdint.h>
#include <stdbool.h>

#ifndef GNUS_EXPORT_BEGIN
#if defined( __cplusplus )
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 60ee05d

Please sign in to comment.