How to use the @keepkey/device-protocol/lib/types_pb.TxInputType 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 / bitcoin.ts View on Github external
inputs.forEach((input, i) => {
    const utxo = new TxInputType()
    utxo.setPrevHash(fromHexString(input.txid))
    utxo.setPrevIndex(input.vout)
    if (input.sequence !== undefined) utxo.setSequence(input.sequence)
    utxo.setScriptType(translateInputScriptType(input.scriptType))
    utxo.setAddressNList(input.addressNList)
    utxo.setAmount(Number(input.amount))
    unsignedTx.addInputs(utxo, i)
  })
github shapeshift / hdwallet / packages / hdwallet-keepkey / src / bitcoin.ts View on Github external
inputTx.tx.vin.forEach((vin, i) => {
      const txInput = new TxInputType()
      if (vin.coinbase !== undefined) {
        txInput.setPrevHash(fromHexString("\0".repeat(64)))
        txInput.setPrevIndex(0xffffffff)
        txInput.setScriptSig(fromHexString(vin.coinbase))
        txInput.setSequence(vin.sequence)
      } else {
        txInput.setPrevHash(fromHexString(vin.txid))
        txInput.setPrevIndex(vin.vout)
        txInput.setScriptSig(fromHexString(vin.scriptSig.hex))
        txInput.setSequence(vin.sequence)
      }
      tx.addInputs(txInput, i)
    })

@keepkey/device-protocol

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

ISC
Latest version published 3 months ago

Package Health Score

63 / 100
Full package analysis

Similar packages