public function estimateFusion(int $threshold, array $addresses = null):JsonResponse
    {
        $params = [
            'threshold' => $threshold,
        ];

        if (!is_null($addresses)) $params['addresses'] = $addresses;

        return $this->rpcPost('sendFusionTransaction', $params);
    }
public function estimateFusion(int $threshold, array $addresses = null):JsonResponse
    {
        $params = [
            'threshold' => $threshold,
        ];

        if (!is_null($addresses)) $params['addresses'] = $addresses;

        return $this->rpcPost('sendFusionTransaction', $params);
    }
public function estimateFusion ( int $ threshold , array $ addresses = null ) : JsonResponse { $ params = [ 'threshold' => $ threshold , ] ; if ( ! is_null ( $ addresses ) ) $ params [ 'addresses' ] = $ addresses ; return $ this -> rpcPost ( 'sendFusionTransaction' , $ params ) ; }
Counts the number of unspent outputs of the specified addresses and returns how many of those outputs can be
optimized. This method is used to understand if a fusion transaction can be created. If fusionReadyCount returns
a value = 0, then a fusion transaction cannot be created.

@param int        $threshold Value that determines which outputs will be optimized. Only the outputs, lesser
than the threshold value, will be included into a fusion transaction. Required.
@param array|null $addresses Array of strings, where each string is an address to take the funds from. Optional.
@return JsonResponse
Counts the number of unspent outputs of the specified addresses and returns how many of those outputs can be optimized . This method is used to understand if a fusion transaction can be created . If fusionReadyCount returns a value = 0 then a fusion transaction cannot be created .