public function getLegacyBitcoinCashAddress($input) {
        if ($this->network === "bitcoincash") {
            $address = $this
                ->makeAddressReader([
                    "use_cashaddress" => true
                ])
                ->fromString($input);

            if ($address instanceof CashAddress) {
                $address = $address->getLegacyAddress();
            }

            return $address->getAddress();
        }

        throw new BlocktrailSDKException("Only request a legacy address when using bitcoin cash");
    }
public function getLegacyBitcoinCashAddress($input) {
        if ($this->network === "bitcoincash") {
            $address = $this
                ->makeAddressReader([
                    "use_cashaddress" => true
                ])
                ->fromString($input);

            if ($address instanceof CashAddress) {
                $address = $address->getLegacyAddress();
            }

            return $address->getAddress();
        }

        throw new BlocktrailSDKException("Only request a legacy address when using bitcoin cash");
    }
public function getLegacyBitcoinCashAddress ( $ input ) { if ( $ this -> network === "bitcoincash" ) { $ address = $ this -> makeAddressReader ( [ "use_cashaddress" => true ] ) -> fromString ( $ input ) ; if ( $ address instanceof CashAddress ) { $ address = $ address -> getLegacyAddress ( ) ; } return $ address -> getAddress ( ) ; } throw new BlocktrailSDKException ( "Only request a legacy address when using bitcoin cash" ) ; }
Take a base58 or cashaddress, and return only
the cash address.
This function only works on bitcoin cash.
@param string $input
@return string
@throws BlocktrailSDKException
Take a base58 or cashaddress and return only the cash address . This function only works on bitcoin cash .