Takes a Transaction ready to be signed.

 Returns an Array of signature dictionaries.
325872
def signatures(transaction, names: [:primary])
      transaction.inputs.map do |input|
        path = input.output.metadata[:wallet_path]
        node = self.path(path)
        sig_hash = transaction.sig_hash(input, node.script)
        node.signatures(sig_hash, names: names)
      end
    end
680228
def _parse_transactions(self, response):
        
        transactions = list()

        if response:
            f = StringIO(response)
            reader = csv.DictReader(f)

            for line in reader:
                txn = {}
                txn['date'] = datetime.strptime(line['Date'], '%d/%m/%Y %H:%M:%S')
                txn['description'] = line['Description']
                txn['amount'] = float(line['Amount'].replace(',', ''))
                txn['reference'] = line['Transaction number']
                txn['sender'] = line['???transfer.fromOwner???']
                txn['recipient'] = line['???transfer.toOwner???']
                txn['currency'] = 'TSH'
                txn['comment'] = line['Transaction type']

                transactions.append(txn)

        return transactions
604865
def get_signatures(self):
        
        signatures = self.request_list('GetSignatures')

        return [zobjects.Signature.from_dict(i) for i in signatures]
1249823
def signature(self):
        """"""
        self._data.sort()
        str_to_sign = self._delimiter.join(self._data)
        return hashlib.sha1(str_to_sign).hexdigest()
1168078
def sign_transaction(self, signer: Account):
        
        tx_hash = self.hash256()
        sig_data = signer.generate_signature(tx_hash)
        sig = [Sig([signer.get_public_key_bytes()], 1, [sig_data])]
        self.sig_list = sig
1125714
def _transactions(self):
        ""
        transactions = getattr(self._state, "transactions", None)
        if transactions is None:
            transactions = self._state.transactions = []
        return transactions
1109642
public String sign(RawTransaction rawTransaction) {

        byte[] signedMessage;

        if (chainId > ChainId.NONE) {
            signedMessage = TransactionEncoder.signMessage(rawTransaction, chainId, credentials);
        } else {
            signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
        }

        return Numeric.toHexString(signedMessage);
    }
647534
def signrawtransaction(self, rawtxhash, parent_tx_outputs=None, private_key=None):
        

        if not parent_tx_outputs and not private_key:
            return self.req("signrawtransaction", [rawtxhash])
        else:
            return self.req(
                "signrawtransaction", [rawtxhash, parent_tx_outputs, private_key]
            )
148482
def from_signed_raw(cls: Type[MembershipType], signed_raw: str) -> MembershipType:
        
        lines = signed_raw.splitlines(True)
        n = 0

        version = int(Membership.parse_field("Version", lines[n]))
        n += 1

        Membership.parse_field("Type", lines[n])
        n += 1

        currency = Membership.parse_field("Currency", lines[n])
        n += 1

        issuer = Membership.parse_field("Issuer", lines[n])
        n += 1

        membership_ts = BlockUID.from_str(Membership.parse_field("Block", lines[n]))
        n += 1

        membership_type = Membership.parse_field("Membership", lines[n])
        n += 1

        uid = Membership.parse_field("UserID", lines[n])
        n += 1

        identity_ts = BlockUID.from_str(Membership.parse_field("CertTS", lines[n]))
        n += 1

        signature = Membership.parse_field("Signature", lines[n])
        n += 1

        return cls(version, currency, issuer, membership_ts,
                   membership_type, uid, identity_ts, signature)
914713
def todict(self):
        
        return {"f_key": hb_encode(self.f_key),
                "alpha_key": hb_encode(self.alpha_key),
                "chunks": self.chunks,
                "encrypted": self.encrypted,
                "iv": hb_encode(self.iv),
                "hmac": hb_encode(self.hmac)}
496012
def sign_transaction(provider: Provider, unsigned: MutableTransaction,
                     key: Kutil) -> Transaction:
    ''''''

    parent_outputs = [find_parent_outputs(provider, i) for i in unsigned.ins]
    return key.sign_transaction(parent_outputs, unsigned)
1121090
def get_signatures(self):
        
        signature_expr = re.compile(r"^(META-INF/)(.*)(\.RSA|\.EC|\.DSA)$")
        signature_datas = []

        for i in self.get_files():
            if signature_expr.search(i):
                signature_datas.append(self.get_file(i))

        return signature_datas
1130685
def get(self):
        
        parser = reqparse.RequestParser()
        parser.add_argument('public_key', type=parameters.valid_ed25519,
                            required=True)
        parser.add_argument('spent', type=parameters.valid_bool)
        args = parser.parse_args(strict=True)

        pool = current_app.config['bigchain_pool']
        with pool() as bigchain:
            outputs = bigchain.get_outputs_filtered(args['public_key'],
                                                    args['spent'])
            return [{'transaction_id': output.txid, 'output_index': output.output}
                    for output in outputs]
92640
def send(self, transactions):
        
        txn_signatures = [txn.header_signature for txn in transactions]
        header = BatchHeader(
            signer_public_key=self._identity_signer.get_public_key().as_hex(),
            transaction_ids=txn_signatures
        ).SerializeToString()

        signature = self._identity_signer.sign(header)
        batch = Batch(
            header=header,
            transactions=transactions,
            header_signature=signature)

        self._batch_sender.send(batch)
136719
def get_committed_signatures(vcs):
    
    committed_path = _get_committed_history_path(vcs)
    known_signatures = []
    if os.path.exists(committed_path):
        with open(committed_path, 'r') as f:
            known_signatures = f.read().split()
    return known_signatures
308744
def sign(time)
      unencrypted_signature = @api_key + @secret + time + @user.to_s
      to_digest = unencrypted_signature + unencrypted_signature.length.to_s
      return Digest::MD5.hexdigest(to_digest)
    end
310325
def generate_signature_class(cls):
    
    return type("%sSigs" % cls.__name__, (Base,),
                {'__tablename__': "%s_sigs" % cls.__tablename__,
                 'id': sa.Column(sa.Integer,
                                 sa.Sequence('%s_id_seq' % cls.__tablename__),
                                 primary_key=True,
                                 doc="primary key"),
                 'data': sa.Column(sa.Text(), nullable=False,
                                   doc="The signed data"),
                 '%s_id' % cls.__tablename__: sa.Column(sa.Integer,
                                                        sa.ForeignKey("%s.id" % cls.__tablename__),
                                                        nullable=False)})