-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: add signBuffer function #193
base: @exodus/[email protected]
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
Concept ACK |
} | ||
} | ||
|
||
async getPublicKey({ seedId, keyId }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have external consumers that need this or should we make it private for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be nice to have this function so that we don't need to use exportKey
in places where we know we will never need the private keys or xpubs. Making it private will serve no purpose. I can remove it if it seems overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current one is easy to use though:
const { publicKey } = await keychain.exportKey({ seedId, keyId })
// now we're adding this, which seems super similar
const publicKey = await keychain.getPublicKey({ seedId, keyId })
not strongly opposed to adding it though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above is exactly the same. Only getPublicKey
emphasizes we area only interested in the public key. And exportKey
does cause xpubs to be transported over IPC, even if they are not used afterwards. Also, it is just too easy to add exportPrivate: true
to exportKey
. I just think it could improve security and readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, let's keep it
Copy the signing function from tx-signer, so that we don't need that much keychain detail knowledge in tx-signer. Looking for Conept ACK (initially).