Returns a Script object representing a contract script portion of a
        payment to the destination.
323628
def script(self):
        """"""
        # The script object is cached, since constructing it may involve
        # a number of string-manipulation operations.
        if getattr(self, '_script', None) is None:
            self._script = self._script__getter()
        return self._script
895046
def to_request obj, type
      payment = {
        seller_id:        GetnetApi.seller_id.to_s,
        amount:           self.amount.to_i,
        currency:         self.currency.to_s,
        order:            self.order.to_request,
        customer:         self.customer.to_request(:payment),
      }

      if type == :boleto
          payment.merge!({"boleto" => obj.to_request,})
      elsif :credit
          payment.merge!({"credit" => obj.to_request,})
      end

      return payment
    end
686458
public TransactionOutput addOutput(Coin value, Script script) {
        return addOutput(new TransactionOutput(params, this, value, script.getProgram()));
    }
864919
def transact(
            self,
            contract_method: ContractFunction,
    ):
        
        txhash = contract_method.transact(self.transaction)
        LOG.debug(f'Sending txHash={encode_hex(txhash)}')
        (receipt, _) = check_successful_tx(
            web3=self.web3,
            txid=txhash,
            timeout=self.wait,
        )
        return receipt
620085
public function registerJqueryPaymentScripts() {
        $view = $this->getView();
        JqueryPaymentAsset::register($view);

        if ($this->applyJqueryPaymentFormat) {
            $js = "jQuery(function($) {
                $('input[data-stripe=" . self::NUMBER_ID . "]').payment('formatCardNumber');
                $('input[data-stripe=" . self::CVC_ID . "]').payment('formatCardCVC');
                $('input[data-stripe=" . self::MONTH_YEAR_ID . "]').payment('formatCardExpiry');
                $('input[data-stripe=" . self::MONTH_ID . "]').payment('restrictNumeric');
                $('input[data-stripe=" . self::YEAR_ID . "]').payment('restrictNumeric');
            });";
            $view->registerJs($js);
        }
        //Jquery client validation submit
        if ($this->applyJqueryPaymentValidation) {
            $js = 'jQuery(function($) {
                $.fn.toggleInputError = function(erred) {
                    this.closest(".form-group").toggleClass("' . $this->errorClass . '", erred);
                    return this;
                };

                $("#' . $this->options['id'] . ' :submit").on("click", function(e) {
                    var $form = $("#' . $this->options['id'] . '");
                    var $number = $("input[data-stripe=' . self::NUMBER_ID . ']");
                    var $cvc = $("input[data-stripe=' . self::CVC_ID . ']");
                    var $exp = $("input[data-stripe=' . self::MONTH_YEAR_ID . ']");
                    var $month = $("input[data-stripe=' . self::MONTH_ID . ']");
                    var $year = $("input[data-stripe=' . self::YEAR_ID . ']");

                    var cardType = $.payment.cardType($number.val());
                    (' . $this->brandIdentificationHandler .')(cardType);

                    var validCard = $.payment.validateCardNumber($number.val());
                    $number.toggleInputError(!validCard);
                    
                    var validCVC = $.payment.validateCardCVC($cvc.val(), cardType);
                    $cvc.toggleInputError(!validCVC);

                    if ($exp.length) {
                        var validExpiry = $.payment.validateCardExpiry($exp.payment("cardExpiryVal"));
                        $exp.toggleInputError(!validExpiry);
                        
                        var fullDate = $exp.val();
                        var res = fullDate.split(" / ", 2);
                        $month.val(res[0]);
                        $year.val(res[1]);
                    }else{
                        var validExpiry = $.payment.validateCardExpiry($month.val(), $year.val());
                        $month.toggleInputError(!validExpiry);
                        $year.toggleInputError(!validExpiry);
                    }

                    if(!validCard || !validCVC || !validExpiry){
                        e.preventDefault();
                        return false;
                    }else{
                        return true;
                    }
                });
            });';
            $view->registerJs($js);
        }
    }
518008
public Script getScriptSig() throws ScriptException {
        // Transactions that generate new coins don't actually have a script. Instead this
        // parameter is overloaded to be something totally different.
        Script script = scriptSig == null ? null : scriptSig.get();
        if (script == null) {
            script = new Script(scriptBytes);
            scriptSig = new WeakReference<>(script);
        }
        return script;
    }
633570
def btc_make_payment_script( address, segwit=None, **ignored ):
    
    
    if segwit is None:
        segwit = get_features('segwit')

    # is address bech32-encoded?
    witver, withash = segwit_addr_decode(address)
    if witver is not None and withash is not None:
        # bech32 segwit address
        if not segwit:
            raise ValueError("Segwit is disabled")

        if len(withash) == 20:
            # p2wpkh
            script_hex = '0014' + withash.encode('hex')
            return script_hex
            
        elif len(withash) == 32:
            # p2wsh
            script_hex = '0020' + withash.encode('hex')
            return script_hex

        else:
            raise ValueError("Unrecognized address '%s'" % address )

    else:
        # address is b58check-encoded
        vb = keylib.b58check.b58check_version_byte(address)
        if vb == version_byte:
            # p2pkh
            hash160 = binascii.hexlify( keylib.b58check.b58check_decode(address) )
            script = 'OP_DUP OP_HASH160 {} OP_EQUALVERIFY OP_CHECKSIG'.format(hash160)
            script_hex = btc_script_to_hex(script)
            return script_hex

        elif vb == multisig_version_byte:
            # p2sh
            hash160 = binascii.hexlify( keylib.b58check.b58check_decode(address) )
            script = 'OP_HASH160 {} OP_EQUAL'.format(hash160)
            script_hex = btc_script_to_hex(script)
            return script_hex

        else:
            raise ValueError("Unrecognized address '%s'" % address )
47196
def contract_from_file(fname):
    
    f = open(fname)
    j = f.read()
    f.close()
    return Contract(json.loads(j))
439373
def cache_script(script, text, opts={}):
    """"""
    global script_cache
    if script not in script_cache:
        update_script_cache(script, text, opts)
        pass
    return script
743584
def script(self):
        """"""
        self.shebang_header = self.shebang_headers[self.language]
        self.slurm_header   = [self.slurm_headers[k]['tag'] % v for k,v in self.slurm_params.items()]
        self.script_header  = self.script_headers[self.language]
        self.script_footer  = self.script_footers[self.language]
        return '\n'.join(flatter([self.shebang_header,
                                  self.slurm_header,
                                  self.script_header,
                                  self.command,
                                  self.script_footer]))
278981
public Script getScriptSigWithSignature(Script scriptSig, byte[] sigBytes, int index) {
        int sigsPrefixCount = 0;
        int sigsSuffixCount = 0;
        if (ScriptPattern.isP2SH(this)) {
            sigsPrefixCount = 1; // OP_0 <sig>* <redeemScript>
            sigsSuffixCount = 1;
        } else if (ScriptPattern.isSentToMultisig(this)) {
            sigsPrefixCount = 1; // OP_0 <sig>*
        } else if (ScriptPattern.isP2PKH(this)) {
            sigsSuffixCount = 1; // <sig> <pubkey>
        }
        return ScriptBuilder.updateScriptWithSignature(scriptSig, sigBytes, index, sigsPrefixCount, sigsSuffixCount);
    }
60894
public static String aggregateScript(List<String> scriptNames, ClassLoader scriptLoader)
            throws URISyntaxException, IOException {
        final StringBuilder aggregatedScript = new StringBuilder();
        for (String scriptName : scriptNames) {
            String scriptNameWithExtension = format("%s.rpt", scriptName);
            Path scriptPath = Paths.get(scriptNameWithExtension);
            scriptNameWithExtension = URI.create(scriptNameWithExtension).normalize().getPath();
            String script = null;

            assert !scriptPath.isAbsolute();

            // resolve relative scripts in local file system
            if (scriptLoader != null) {
                // resolve relative scripts from class loader to support
                // separated specification projects that include Robot scripts only
                URL resource = scriptLoader.getResource(scriptNameWithExtension);
                if (resource != null) {
                    URI resourceURI = resource.toURI();
                    if ("file".equals(resourceURI.getScheme())) {
                        Path resourcePath = Paths.get(resourceURI);
                        script = readScript(resourcePath);
                    } else {
                        try (FileSystem fileSystem = newFileSystem(resourceURI, EMPTY_ENVIRONMENT)) {
                            Path resourcePath = Paths.get(resourceURI);
                            script = readScript(resourcePath);
                        }
                    }
                }
            }

            if (script == null) {
                throw new RuntimeException("Script not found: " + scriptPath);
            }

            aggregatedScript.append(script);
        }
        return aggregatedScript.toString();
    }
581946
def to_script_pubkey
      v = ver == 0 ? ver : ver + 0x50
      ([v, prog.length].pack("CC") + prog.map{|p|[p].pack("C")}.join).unpack('H*').first
    end
1089682
def Verify(self, mempool):
        
        logger.info("Verifying transaction: %s " % self.Hash.ToBytes())

        return Helper.VerifyScripts(self)
309526
def _get_destination(script_parts):
    """"""
    for part in script_parts:
        if part not in {'ln', '-s', '--symbolic'} and os.path.exists(part):
            return part
351079
function signatureForm(txObj, i, script, hashcode) {
  // Copy object so we don't rewrite it
  var newTx = JSON.parse(JSON.stringify(txObj));

  for (var j = 0; j < newTx.ins.length; j++) {
    newTx.ins[j].script = '';
  }
  newTx.ins[i].script = script;

  if (hashcode === zconstants.SIGHASH_NONE) {
    newTx.outs = [];
  } else if (hashcode === zconstants.SIGHASH_SINGLE) {
    newTx.outs = newTx.outs.slice(0, newTx.ins.length);
    for (var j = 0; j < newTx.ins.length - 1; ++j) {
      newTx.outs[j].satoshis = Math.pow(2, 64) - 1;
      newTx.outs[j].script = '';
    }
  } else if (hashcode === zconstants.SIGHASH_ANYONECANPAY) {
    newTx.ins = [newTx.ins[i]];
  }

  return newTx;
}
1062886
public byte[] getPubKeyHash() throws ScriptException {
        if (ScriptPattern.isP2PKH(this))
            return ScriptPattern.extractHashFromP2PKH(this);
        else if (ScriptPattern.isP2SH(this))
            return ScriptPattern.extractHashFromP2SH(this);
        else if (ScriptPattern.isP2WH(this))
            return ScriptPattern.extractHashFromP2WH(this);
        else
            throw new ScriptException(ScriptError.SCRIPT_ERR_UNKNOWN_ERROR, "Script not in the standard scriptPubKey form");
    }