Example #1
0
 /**
  * Send the microtransaction to the network.
  *
  * @param MicroTX $microTX
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param BlockCypherRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return MicroTX
  */
 public function send(MicroTX $microTX, $apiContext = null, $restCall = null)
 {
     $payLoad = $microTX->toJSON();
     $chainUrlPrefix = $this->getChainUrlPrefix($apiContext);
     $json = $this->executeCall("{$chainUrlPrefix}/txs/micro", "POST", $payLoad, null, $apiContext, $restCall);
     $microTX->fromJson($json);
     return $microTX;
 }