def add_inputs(self, inputs):
        # type: (Iterable[Address]) -> None
        """
        Adds inputs to spend in the bundle.

        Note that each input may require multiple transactions, in order
        to hold the entire signature.

        :param inputs:
            Addresses to use as the inputs for this bundle.

            .. important::
                Must have ``balance`` and ``key_index`` attributes!
                Use :py:meth:`iota.api.get_inputs` to prepare inputs.
        """
        if self.hash:
            raise RuntimeError('Bundle is already finalized.')

        for addy in inputs:
            if addy.balance is None:
                raise with_context(
                    exc=ValueError(
                        'Address {address} has null ``balance`` '
                        '(``exc.context`` has more info).'.format(
                            address=addy,
                        ),
                    ),

                    context={
                        'address': addy,
                    },
                )

            if addy.key_index is None:
                raise with_context(
                    exc=ValueError(
                        'Address {address} has null ``key_index`` '
                        '(``exc.context`` has more info).'.format(
                            address=addy,
                        ),
                    ),

                    context={
                        'address': addy,
                    },
                )

            self._create_input_transactions(addy)
def add_inputs(self, inputs):
        # type: (Iterable[Address]) -> None
        """
        Adds inputs to spend in the bundle.

        Note that each input may require multiple transactions, in order
        to hold the entire signature.

        :param inputs:
            Addresses to use as the inputs for this bundle.

            .. important::
                Must have ``balance`` and ``key_index`` attributes!
                Use :py:meth:`iota.api.get_inputs` to prepare inputs.
        """
        if self.hash:
            raise RuntimeError('Bundle is already finalized.')

        for addy in inputs:
            if addy.balance is None:
                raise with_context(
                    exc=ValueError(
                        'Address {address} has null ``balance`` '
                        '(``exc.context`` has more info).'.format(
                            address=addy,
                        ),
                    ),

                    context={
                        'address': addy,
                    },
                )

            if addy.key_index is None:
                raise with_context(
                    exc=ValueError(
                        'Address {address} has null ``key_index`` '
                        '(``exc.context`` has more info).'.format(
                            address=addy,
                        ),
                    ),

                    context={
                        'address': addy,
                    },
                )

            self._create_input_transactions(addy)
def add_inputs ( self , inputs ) : # type: (Iterable[Address]) -> None if self . hash : raise RuntimeError ( 'Bundle is already finalized.' ) for addy in inputs : if addy . balance is None : raise with_context ( exc = ValueError ( 'Address {address} has null ``balance`` ' '(``exc.context`` has more info).' . format ( address = addy , ) , ) , context = { 'address' : addy , } , ) if addy . key_index is None : raise with_context ( exc = ValueError ( 'Address {address} has null ``key_index`` ' '(``exc.context`` has more info).' . format ( address = addy , ) , ) , context = { 'address' : addy , } , ) self . _create_input_transactions ( addy )
Adds inputs to spend in the bundle.

        Note that each input may require multiple transactions, in order
        to hold the entire signature.

        :param inputs:
            Addresses to use as the inputs for this bundle.

            .. important::
                Must have ``balance`` and ``key_index`` attributes!
                Use :py:meth:`iota.api.get_inputs` to prepare inputs.
Adds inputs to spend in the bundle .