How to use the @keepkey/device-protocol/lib/messages-cosmos_pb.CosmosMsgSend 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 / cosmos.ts View on Github external
throw new Error(`cosmos: unexpected response ${resp.message_type}`)

      let ack

      if (m.type === 'cosmos-sdk/MsgSend') {
        if (m.value.amount.length !== 1) {
          throw new Error('cosmos: Multiple amounts per msg not supported')

        const denom = m.value.amount[0].denom
        if (denom !== 'uatom') {
          throw new Error('cosmos: Unsupported denomination: ' + denom)

        const send = new CosmosMsgSend()

        ack = new CosmosMsgAck()
      } else {
        throw new Error(`cosmos: Message ${m.type} is not yet supported`)

      resp = await, ack, Core.LONG_TIMEOUT, /*omitLock=*/true)

      if (resp.message_type === Core.Events.FAILURE) throw resp

    if (resp.message_enum !== MessageType.MESSAGETYPE_COSMOSSIGNEDTX) {


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