tokenly / counterparty-sender
A library
Installs: 1 618
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=5.4.0
- nbobtc/bitcoind-php: 1.2.*
- tokenly/xcpd-client: dev-master
Requires (Dev)
- phpunit/phpunit: ~4
This package is not auto-updated.
Last update: 2024-12-21 17:43:26 UTC
README
The CounterpartySender component for Tokenly.
Example of usage:
$xcpd_connection_string = 'http://addressof.counterpartyserver.com:4000'; $xcpd_rpc_user = 'rpcusername'; $xcpd_rpc_password = 'securerpcpassword'; $bitcoind_connection_string = 'httpd://btcrpcusername:btcrpcpassword@addressof.bitcoinserver.com:8332'; $xcpd = new Tokenly\XCPDClient\Client($xcpd_connection_string, $xcpd_rpc_user, $xcpd_rpc_password); $bitcoind = new Nbobtc\Bitcoind\Bitcoind(new Nbobtc\Bitcoind\Client($bitcoind_connection_string)); $sender = new Tokenly\CounterpartySender\CounterpartySender($xcpd, $bitcoind); $public_key = 'PUBLICBITCOINADDRESSKEY'; $private_key = 'PRIVATEBITCOINADDRESSKEY'; $source = 'SOURCE_BITCOINADDRESS'; $destination = 'DESTINATION_BITCOINADDRESS'; $quantity = 1000; $asset = 'LTBCOIN'; $transaction_id = $sender->send($public_key, $private_key, $source, $destination, $quantity, $asset); echo "transaction id: $transaction_id\n";