PHP 5.6.0 and later.
git clone https://github.com/OpenFuturePlatform/wallet-core.git
cd wallet-core/open-platform/core-cpp
cmake . -DWALLET_CORE=../../
make
Copying shared library to "/usr/lib" allows use it from everywhere
sudo cp libOpenWallet.so /usr/lib
sudo chmod 0755 /usr/lib/libOpenWallet.so
The PHP-CPP library is a C++ library for developing PHP extensions. https://github.com/CopernicaMarketingSoftware/PHP-CPP
cd wallet-core/open-platform/php/php-cpp
make
sudo make install
cd wallet-core/open-platform/php
make
sudo make install
require_once('lib/OPEN.php');
$open = new OPEN();
$open->setApiKey("op_api_key");
$open->setSecretKey("op_api_secret");
0 -> BTC
60 -> ETH
144 -> XRP
195 -> TRX
354 -> DOT
501 -> SOL
714 -> BNB
$result = $open->generateWallet($coinType, $saveAddress);
$address = $open->importWallet($privateKey, $coinType);
$nonce = $open->getNonce($address, $network);
$signedTransaction = $open->sign($privateKey, $address, $chainId, $gasPrice, $gasLimit, $amount, $nonce);
$trxHash = $open->broadcast($signedTransaction, $coinType);
$encryptedData = $open->encrypt($privateKey, $password);
$decryptedData = $open->decrypt($data, $password);
$wallets = $open->generateUserWallet($userId, $webHookAddress, $coinTypes = array(), $isTest);
$wallets = $open->importUserWallet($userId, $webHookAddress, $isTest, $encryptedData, $address, $coinType, $metadata)
$wallets = $open->generateOrderWallet($webHookAddress, $coinTypes = array(), $isTest, $orderId, $amount, $orderCurrency, $metadata);
$wallets = $open->importOrderWallet($webHookAddress, $orderId, $amount, $isTest, $orderCurrency, $encryptedData, $address, $coinType, $metadata);