How to use the @keepkey/device-protocol/lib/messages_pb.CipherKeyValue function in @keepkey/device-protocol

To help you get started, we’ve selected a few @keepkey/device-protocol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shapeshift / hdwallet / packages / hdwallet-keepkey / src / keepkey.ts View on Github external
public async cipherKeyValue(
    v: Messages.CipherKeyValue.AsObject
  ): Promise<string | Uint8Array> {
    // if(val.length % 16 !== 0) val = val.concat() TODO THIS
    const cipherKeyValue = new Messages.CipherKeyValue()
    cipherKeyValue.setAskOnEncrypt(v.askOnEncrypt || false)
    cipherKeyValue.setAskOnDecrypt(v.askOnDecrypt || false)
    cipherKeyValue.setIv(v.iv || '')
    const response = await, cipherKeyValue) as Event
    if(response.message_type === Events.FAILURE) throw event
    const ckv = response.message as Messages.CipheredKeyValue
    return ckv.getValue()


The proto buffer files from the KeepKey device, packed for consumption by the client.

Latest version published 3 months ago

Package Health Score

60 / 100
Full package analysis

Similar packages