Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to sign tx with single key or array of keys #238

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robertdavid010
Copy link

@robertdavid010 robertdavid010 commented Aug 15, 2018

Pop the first element out if its an array, and fallback to the first key if the array runs out of keys.
Closes #237

Pop out the first element (if an array) in the `rest attributes` and use that as the privateKeys array. Also use first private key if there are not enough supplied.
Add support for single and array of private keys
@ttmc
Copy link
Contributor

ttmc commented Aug 15, 2018

Hi @robertdavid010

Before we can merge this pull request, we need you or your organization to agree to one of our contributor agreements. One of the big concerns for people using and developing open source software is that someone who contributed to the code might claim the code infringes on their copyright or patent. To guard against this, we ask all our contributors to sign a Contributor License Agreement. This gives us the right to use the code contributed and any patents the contribution relies on. It also gives us and our users comfort that they won't be sued for using open source software. We know it's a hassle, but it makes the project more reliable in the long run. Thank you for your understanding and your contribution!

If you are contributing on behalf of yourself (and not on behalf of your employer or another organization you are part of) then you should:

  1. Go to: https://www.bigchaindb.com/cla/
  2. Read the Individual Contributor Agreement
  3. Fill in the form "For Individuals"
  4. Check the box to agree
  5. Click the SEND button

If you're contributing as an employee, and/or you want all employees of your employing organization to be covered by our contributor agreement, then someone in your organization with the authority to enter agreements on behalf of all employees must do the following:

  1. Go to: https://www.bigchaindb.com/cla/
  2. Read the Entity Contributor Agreement
  3. Fill in the form "For Organizations”
  4. Check the box to agree
  5. Click the SEND button

We will email you (or your employer) with further instructions.

Copy link
Contributor

@future-is-present future-is-present left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis tests are failing.
What about if you change just line 239 for:

const privateKey = privateKeys[index] ? privateKeys[index] : privateKeys[0] 

@future-is-present
Copy link
Contributor

future-is-present commented Aug 24, 2018

Hi @robertdavid010 any update here?

@robertdavid010
Copy link
Author

robertdavid010 commented Aug 27, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants