Add sufficient inputs from given <wifs> to cover <rawtx> outputs
        and <fee>. If no <change_address> is given, change will be sent to
        first wif.
322178
def add_inputs(self, rawtx, wifs, change_address=None, fee=10000,
                   dont_sign=False):
        
        tx = deserialize.tx(rawtx)
        keys = deserialize.keys(self.testnet, wifs)
        fee = deserialize.positive_integer(fee)
        if change_address is not None:
            change_address = deserialize.address(self.testnet, change_address)
        tx = control.add_inputs(self.service, self.testnet, tx, keys,
                                change_address=change_address, fee=fee)

        if not dont_sign:
            tx = control.sign_tx(self.service, self.testnet, tx, keys)

        return serialize.tx(tx)
1275305
def add_intspin(self, setting):
        ''''''
        tab = self.panel(setting.tab)
        default = setting.value
        (minv, maxv) = setting.range
        ctrl = wx.SpinCtrl(tab, -1,
                           initial = default,
                           min = minv,
                           max = maxv)
        self._add_input(setting, ctrl, value=default)
1048551
def transfer_asset(asset_id: nil,
                       amount: nil,
                       script: nil, address: nil,
                       provider: nil, unspent_outputs: nil, change_address: nil)
      raise ArgumentError, "AssetID must be provided" if !asset_id
      raise ArgumentError, "Either `script` or `address` must be specified" if !script && !address
      raise ArgumentError, "Both `script` and `address` cannot be specified" if script && address
      raise ArgumentError, "Amount must be greater than zero" if !amount || amount <= 0

      provider = Provider.new{|atxbuilder| unspent_outputs } if unspent_outputs
      change_address = AssetAddress.parse(change_address) if change_address

      asset_id = AssetID.parse(asset_id)
      script ||= AssetAddress.parse(address).script

      self.transferred_assets << {asset_id: asset_id, amount: amount, script: script, provider: provider, change_address: change_address}
    end
1189789
def add_configuration(self, configuration, collect_another_source, done, result, src):
        """"""
        if "includes" in result:
            for include in result["includes"]:
                collect_another_source(include)
        configuration.update(result, source=src)
433564
def _add_output(self, out):
        
        self._outputs += [out]
        out.node = self
        out._set_as_output_of(self)
383707
private static void changeNetworkWEP(WifiManager wifiManager, WifiParsedResult wifiResult) {
    WifiConfiguration config = changeNetworkCommon(wifiResult);
    config.wepKeys[0] = quoteNonHex(wifiResult.getPassword(), 10, 26, 58);
    config.wepTxKeyIndex = 0;
    config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
    config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40);
    config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104);
    updateNetwork(wifiManager, config);
  }
697843
def insert(self, index = 0, *widgets):
        """"""
        for widget in widgets:
            self._add(widget, index)
            index +=1 # as we are moving forwards
        self._sort()
1128248
def raw_input_replacement(self, prompt=''):
        """"""
        self.widget_proxy.wait_input(prompt)
        self.input_condition.acquire()
        while not self.widget_proxy.data_available():
            self.input_condition.wait()
        inp = self.widget_proxy.input_data
        self.input_condition.release()
        return inp
85634
def add_to_cache(self, cache_id, inputs, output):
        """"""
        self.inputs_changed[cache_id] = False
        self.cached_outputs[cache_id] = output
        self.order.append(cache_id)
        self.cached_inputs[cache_id] = inputs
        for a in inputs:
            if a is not None and not isinstance(a, Number) and not isinstance(a, str):
                ind_id = self.id(a)
                v = self.cached_input_ids.get(ind_id, [weakref.ref(a), []])
                v[1].append(cache_id)
                if len(v[1]) == 1:
                    a.add_observer(self, self.on_cache_changed)
                self.cached_input_ids[ind_id] = v
1041586
def select_inputs(self, address: str, amount: int) -> dict:
        ''''''

        utxos = []
        utxo_sum = Decimal(0)
        for tx in sorted(self.listunspent(address=address), key=itemgetter('confirmations')):

            if tx["address"] not in (self.pa_parameters.P2TH_addr,
                                     self.pa_parameters.test_P2TH_addr):

                utxos.append(
                        MutableTxIn(txid=tx['txid'],
                                    txout=tx['vout'],
                                    sequence=Sequence.max(),
                                    script_sig=ScriptSig.empty())
                         )

                utxo_sum += Decimal(tx["amount"])
                if utxo_sum >= amount:
                    return {'utxos': utxos, 'total': utxo_sum}

        if utxo_sum < amount:
            raise InsufficientFunds("Insufficient funds.")

        raise Exception("undefined behavior :.(")
50786
public void addTupleInput(Path path, Schema targetSchema, MapOnlyMapper tupleMapper) {
		addInput(path, new TupleInputFormat(targetSchema), tupleMapper);
	}
762572
public NextInputs add(Input input, Scheme... schemes) {
        if (schemes == null || schemes.length == 0) {
            throw new IllegalArgumentException("Test schemes is required !");
        }
        Arrays.sort(schemes, ORDERING);
        mInputSpecs.add(new InputSpec(input, schemes));
        return this;
    }
729606
def sign_tx(self, rawtx, wifs):
        
        tx = deserialize.tx(rawtx)
        keys = deserialize.keys(self.testnet, wifs)
        tx = control.sign_tx(self.service, self.testnet, tx, keys)
        return serialize.tx(tx)
194582
def add_new_data_port(self):
        """"""
        try:
            new_data_port_ids = gui_helper_state_machine.add_data_port_to_selected_states('OUTPUT', int, [self.model])
            if new_data_port_ids:
                self.select_entry(new_data_port_ids[self.model.state])
        except ValueError:
            pass
995057
def add_options(self):
        
        super(RtorrentMove, self).add_options()

        # basic options
        self.add_bool_option("-n", "--dry-run",
            help="don't move data, just tell what would happen")
        self.add_bool_option("-F", "--force-incomplete",
            help="force a move of incomplete data")
832335
def _add_attribute_values(self, value, att_mappings, indices):
        
        for i in indices:
            att_mappings[i].append(value)
595607
public void addAfter(CompilerInput input, CompilerInput other) {
    checkState(inputs.contains(other));
    inputs.add(inputs.indexOf(other), input);
    input.setModule(this);
  }