sign transaction with Kutil
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)
1070301
def sign(data, low_r = true, extra_entropy = nil)
      sig = secp256k1_module.sign_data(data, priv_key, extra_entropy)
      if low_r && !sig_has_low_r?(sig)
        counter = 1
        until sig_has_low_r?(sig)
          extra_entropy = [counter].pack('I*').bth.ljust(64, '0').htb
          sig = secp256k1_module.sign_data(data, priv_key, extra_entropy)
          counter += 1
        end
      end
      sig
    end
680265
def sign(ctx, file, account):
    
    if not file:
        print_message("Prompting for message. Terminate with CTRL-D", "info")
        file = click.get_text_stream("stdin")
    m = Message(file.read(), bitshares_instance=ctx.bitshares)
    print_message(m.sign(account), "info")
616485
def sign(ctx, file, account):
    
    if not file:
        # click.echo("Prompting for message. Terminate with CTRL-D")
        file = click.get_text_stream("stdin")
    m = Message(file.read(), peerplays_instance=ctx.peerplays)
    click.echo(m.sign(account))
750889
def sign(self, data):
        
        data = signing.b64_encode(data).decode()
        return self.signer.sign(data)
1116678
def commit_sell(self, sell_id, **params):
        """"""
        return self.api_client.commit_sell(self.id, sell_id, **params)
834289
async function () {
    logger.step("** Starting stake mint for st prime for beneficiary utilityChainOwner");
    const oThis = this
      , toStakeAmount = (new BigNumber(10000)).mul(new BigNumber(10).toPower(18))
    ;

    logger.info('* Utility Chain Owner transfers ST to staker');
    await fundManager.transferST(
        utilityChainOwnerAddr, utilityChainOwnerPassphrase, stakerAddr, toStakeAmount,
        {tag: 'transferSTToStaker', returnType: 'txReceipt'}
    );

    logger.info('* Staker approves openSTValue contract');
    const approveResponse = await (new approveService()).perform();
    if (approveResponse.isFailure()) {
      process.exit(1);
    }

    const approveTransactionHash = approveResponse.data.transaction_hash;

    logger.info('* Get approval status and keep doing so till success');
    const approveReceiptResponse =  await contractInteractHelper.waitAndGetTransactionReceipt(web3Provider, approveTransactionHash, {});
    if (!approveReceiptResponse.isSuccess()) {
      logger.error('Approval receipt error ', approveReceiptResponse);
      process.exit(1);
    }

    logger.info('* Start stake');

    await (new startStakeService({
      beneficiary: utilityChainOwnerAddr,
      to_stake_amount: toStakeAmount,
      uuid: coreConstants.OST_OPENSTUTILITY_ST_PRIME_UUID
    })).perform();

    await oThis._waitForSTPrimeMint();

    return Promise.resolve(responseHelper.successWithData({}));
  }
791591
function signTransaction(priKeyBytes, transaction) {

  if (typeof priKeyBytes === 'string') {
    priKeyBytes = hexStr2byteArray(priKeyBytes);
  }

  let raw = transaction.getRawData();
  let rawBytes = raw.serializeBinary();
  let hashBytes = SHA256(rawBytes);
  let signBytes = ECKeySign(hashBytes, priKeyBytes);
  let uint8Array = new Uint8Array(signBytes);
  let count = raw.getContractList().length;
  for (let i = 0; i < count; i++) {
    transaction.addSignature(uint8Array);
  }

  return transaction;
}
309370
def sign(key)
      raise InvalidTransaction, "Zero privkey cannot sign" if [0, '', Constant::PRIVKEY_ZERO, Constant::PRIVKEY_ZERO_HEX].include?(key)

      rawhash = Utils.keccak256 signing_data(:sign)
      key = PrivateKey.new(key).encode(:bin)

      vrs = Secp256k1.recoverable_sign rawhash, key
      self.v = encode_v(vrs[0])
      self.r = vrs[1]
      self.s = vrs[2]

      self.sender = PrivateKey.new(key).to_address

      self
    end
194238
def sign(self, payload):
        
        nonce = str(int(time.time() * 1000))
        package = {'apikey': self.key,
                   'message': {'nonce': nonce, 'payload': payload}}

        signature = hmac.new(self.secret, json.dumps(payload).hexdigest,
                             hashlib.sha512).hexdigest()
        package['signature'] = signature

        return json.dumps(package)
1326662
def sign(ctx, filename):
    
    if filename:
        tx = filename.read()
    else:
        tx = sys.stdin.read()
    tx = TransactionBuilder(eval(tx), bitshares_instance=ctx.bitshares)
    tx.appendMissingSignatures()
    tx.sign()
    print_tx(tx.json())
471646
def sign(self, data, b64=True):
        
        padder = padding.PKCS1v15()
        signer = self.private_key.signer(padder, None)
        if not isinstance(data, six.binary_type):
            data = data.encode('utf_8')
        signer.update(data)
        signed = signer.finalize()
        if b64:
            signed = base64.b64encode(signed)
        return signed
1200833
def transact_with_contract_function(
        address,
        web3,
        function_name=None,
        transaction=None,
        contract_abi=None,
        fn_abi=None,
        *args,
        **kwargs):
    
    transact_transaction = prepare_transaction(
        address,
        web3,
        fn_identifier=function_name,
        contract_abi=contract_abi,
        transaction=transaction,
        fn_abi=fn_abi,
        fn_args=args,
        fn_kwargs=kwargs,
    )

    txn_hash = web3.eth.sendTransaction(transact_transaction)
    return txn_hash
519327
def sign(privkey_bundle, plaintext):
    
    if virtualchain.is_singlesig(privkey_bundle):
        return sign_singlesig(privkey_bundle, plaintext)
    elif virtualchain.is_multisig(privkey_bundle):
        return sign_multisig(privkey_bundle, plaintext)
    else:
        raise ValueError("private key bundle is neither a singlesig nor multisig bundle")
733863
function signTransaction (trs, secret) {
	var keys = crypto.getKeys(secret);
	var signature = crypto.multiSign(trs, keys);

	return {
		transaction: trs.id,
		signature: signature
	};
}
550512
def sign_tx(tx)
      if privkey
        logger.info "signing tx", tx: tx, account: self
        tx.sign privkey
      else
        raise ValueError, "Locked account cannot sign tx"
      end
    end
149679
def pksign(self, conn):
        """"""
        log.debug('signing %r digest (algo #%s)', self.digest, self.algo)
        identity = self.get_identity(keygrip=self.keygrip)
        r, s = self.client.sign(identity=identity,
                                digest=binascii.unhexlify(self.digest))
        result = sig_encode(r, s)
        log.debug('result: %r', result)
        keyring.sendline(conn, b'D ' + result)