How to use the @keepkey/device-protocol/lib/messages_pb.GetCoinTable 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 getNumCoins (): Promise<number> {
    const getCoinTable = new Messages.GetCoinTable()
    const response = await this.transport.call(Messages.MessageType.MESSAGETYPE_GETCOINTABLE, getCoinTable) as Event
    if(response.message_type === Events.FAILURE) throw event
    return (response.proto as Messages.CoinTable).getNumCoins()
  }
github shapeshift / hdwallet / packages / hdwallet-keepkey / src / keepkey.ts View on Github external
public async getCoinTable (start: number = 0, end: number = start + 10): Promise<Types.CoinType.AsObject[]> {
    const getCoinTable = new Messages.GetCoinTable()
    getCoinTable.setStart(start)
    getCoinTable.setEnd(end)
    const response = await this.transport.call(Messages.MessageType.MESSAGETYPE_GETCOINTABLE, getCoinTable) as Event
    if(response.message_type === Events.FAILURE) throw event
    const coinTable = response.message as Messages.CoinTable.AsObject
    return coinTable.tableList
  }

@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