This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
echo "<pre>"; | |
$base58 = new \FurqanSiddiqui\Base58\Base58(); | |
$base16 = new \Comely\DataTypes\Buffer\Base16(); | |
$privateKey = $base16->set("0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
$seed = "000102030405060708090a0b0c0d0e0f"; | |
echo "<pre>"; | |
require "../vendor/autoload.php"; | |
$mskobj = \FurqanSiddiqui\BIP32\BIP32::MasterKey($seed, "512"); | |
$msk1 = $mskobj->raw(); | |
echo "<h3>Master Key </h3>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
use ZuluCrypto\StellarSdk\Keypair; | |
use ZuluCrypto\StellarSdk\Server; | |
use ZuluCrypto\StellarSdk\XdrModel\Operation\PaymentOp; | |
echo "<pre>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
use ZuluCrypto\StellarSdk\Server; | |
$server = Server::testNet(); | |
$account = $server->getAccount('GCCZACJX7DHEWGK5WJ2ONRGAJN2RBGGCX3OO4NF66JMJ4MNACKED577A'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
use ZuluCrypto\StellarSdk\Server; | |
$server = Server::testNet(); | |
//$account = $server->getAccount('GCCZACJX7DHEWGK5WJ2ONRGAJN2RBGGCX3OO4NF66JMJ4MNACKED577A'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
// See 01-create-account.php for where this was generated | |
$publicAccountId = 'GCCZACJX7DHEWGK5WJ2ONRGAJN2RBGGCX3OO4NF66JMJ4MNACKED577A'; | |
// Use the testnet friendbot to add funds: | |
$response = file_get_contents('https://horizon-testnet.stellar.org/friendbot?addr=' . $publicAccountId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
use ZuluCrypto\StellarSdk\Keypair; | |
$keyPair = keyPair::newFromRandom(); | |
echo "<h3>Secret Key</h3>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
use ZuluCrypto\StellarSdk\Server; | |
// See 01-create-account.php for where this was generated | |
//$publicAccountId = 'GCCZACJX7DHEWGK5WJ2ONRGAJN2RBGGCX3OO4NF66JMJ4MNACKED577A'; | |
$publicAccountId = 'GBN2Q4QX72P5COMA2EJDRL42BCUXZVPM4FDNCMEMQHL7Z3AWJEL3SETT'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
require "../vendor/autoload.php"; | |
echo "<pre>"; | |
$bip39 = new \FurqanSiddiqui\BIP39\BIP39(); | |
//$entropy = \FurqanSiddiqui\BIP39\BIP39::Generate(); | |
//$genEntropy = $bip39->generateSecureEntropy(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set some variables for configation | |
$host = "127.0.0.1"; | |
$port = 25003; | |
// naver timeout! then set 0 | |
set_time_limit(0); | |
// Create socket | |
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); | |
// Bind socket to port | |
$result = socket_bind($socket, $host, $port) or die("Could not bind to socket\n"); |