1. Go to this page and download the library: Download appino/blockchain library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php
/**
* @param int|string $param can be index of address in wallet or address
* @return AccountResponse
*/
$blockchain->SingleAddress($param);
php
/**
* @param int|string $param can be index of address in wallet or address
* @return string
*/
$blockchain->ReceivingAddress($param);
php
/**
* @param int|string $param can be index of address in wallet or address
* @return AccountResponse
*/
$blockchain->ArchiveAddress($param);
php
/**
* @param int|string $param can be index of address in wallet or address
* @return AccountResponse
*/
$blockchain->UnArchiveAddress($param);
php
/**
* @param string $to bitcoin address that you want to send payment to
* @param integer $amount amount of payment you want to send in satoshi
* @param integer|string|null $from xpub address or index of account that you want to send payment from
* @param int|null $fee
* @param int|null $fee_per_byte
* @return PaymentResponse
* @throws ParameterError
*/
$blockchain->SendPayment($to, $amount, $from, $fee, $fee_per_byte);
php
/**
* @param array<string,integer> $recipients recipients must be an array of address as key and satoshi as integer
* @param integer|string|null $from xpub address or index of account that you want to send payment from
* @param integer|null $fee must be in satoshi (better to set null or use fee_per_byte)
* @param integer|null $fee_per_byte must be in satoshi
* @return PaymentResponse
* @throws ParameterError
*/
$blockchain->SendManyPayment($recipients, $from=null, $fee=null, $fee_per_byte = null);
php
$blocchain = Blockchain::Receive();
` php
/**
* @param string $xpub The public key.
* @param string $callback The callback URL.
* @param int $gap_limit How many unused addresses are allowed.
* @return ReceiveResponse
*/
$blockchain->Generate($xpub, $callback, $gap_limit = 20);
` php
/**
* @param string $address
* @param string $callback callback url
* @param Notification|string $on what to do after notification called
* @param int $confs how many confiramtion need to send notification
* @param Operation|string $op on Receive/Send/All notification will send
* @return NotificationResponse
*/
$blockchain->BalanceNotification($address, $callback, $on, $confs, $op);