public function addOpReturn($data, $allowNonStandard = false) {
        if (!$allowNonStandard && strlen($data) / 2 > 79) {
            throw new BlocktrailSDKException("OP_RETURN data should be <= 79 bytes to remain standard!");
        }

        $script = ScriptFactory::create()
            ->op('OP_RETURN')
            ->push(new Buffer($data))
            ->getScript()
        ;

        $this->addOutput([
            'scriptPubKey' => $script,
            'value' => 0
        ]);

        return $this;
    }