require __DIR__ . '/../bootstrap.php';
$microTXClient = new \BlockCypher\Client\MicroTXClient($apiContexts['BCY.test']);
try {
$microTX = $microTXClient->sendWithPrivateKey(
"2c2cc015519b79782bd9c5af66f442e808f573714e3c4dc6df7d79c183963cff",
"C4MYFr4EAdqEeUKxTnPUF3d3whWcPMz1Fi",
10000
);
} catch (Exception $ex) {
ResultPrinter::printError("Created and Send MicroTX", "MicroTX", null, null, $ex);
exit(1);
}
ResultPrinter::printResult("Created and Send MicroTX", "MicroTX", $microTX->getHash(), null, $microTX);
Create and Send with MicroTXClient
Server-side signing. This sample code demonstrate how you can create, sign and send a new microtransaction, as documented here at: http://dev.blockcypher.com/#microtransaction-endpoint
API used: POST /v1/btc/main/txs/micro