How to use the @keepkey/device-protocol/lib/messages_pb.GetFeatures 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 getFeatures(cached: boolean = false): Promise {
    if (cached && this.featuresCache)
      return this.featuresCache
    const features = new Messages.GetFeatures();
    const event = await this.transport.call(
      Messages.MessageType.MESSAGETYPE_GETFEATURES,
      features
    ) as Event
    if(event.message_type === Events.FAILURE) throw event
    this.cacheFeatures(event.message)
    return event.message as Messages.Features.AsObject
  }