PHP code example of tokenly / counterparty-op-return-builder
1. Go to this page and download the library: Download tokenly/counterparty-op-return-builder 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/ */
tokenly / counterparty-op-return-builder example snippets
$op_return_builder = new OpReturnBuilder();
$destination = '1AAAA1111xxxxxxxxxxxxxxxxxxy43CZ9j';
$txid = 'deadbeef00000000000000000000000000000000000000000000000000001111';
// Send 100 of asset SOUP
$op_return_hex = $op_return_builder->buildOpReturnForSend(100, 'SOUP', $destination, $txid);
print $op_return_hex.PHP_EOL;
// "95f8483a315279d12a7314a8e82019d7fa6ba1354f09c61480dedf76e038875f405090c08be78ef8c7a4b60bb4"