Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @taquito/ledger-signer

Index

Type aliases

LedgerTransport

LedgerTransport: Pick<Transport<string>, "send" | "decorateAppAPIMethods" | "setScrambleKey">

Functions

Const HDPathTemplate

  • HDPathTemplate(account: number): string

appendWatermark

  • appendWatermark(bytes: string, watermark?: Uint8Array): string

chunkOperation

  • chunkOperation(messageToSend: any, operation: Buffer): any
  • description

    In order not to exceed the data length allowed by the Ledger device, split the operation into buffers of 230 bytes (max) and add them to the message to send to the Ledger

    Parameters

    • messageToSend: any

      The message to send to the Ledger device

    • operation: Buffer

      The operation which will be chunk if its length is over 230 bytes

    Returns any

    The instruction to send to the Ledger device

compressPublicKey

extractValue

  • extractValue(idxLength: number, response: Buffer): { buffer: Buffer; idxValueStart: number; length: number }
  • description

    Extract a part of the response returned by the Ledger

    Parameters

    • idxLength: number

      The index in the response from the Ledger that corresponds to the length of the part to extract

    • response: Buffer

      The signature returned by the Ledger (return from the signWithLedger function)

    Returns { buffer: Buffer; idxValueStart: number; length: number }

    An object that contains the extracted buffer, the index where it starts in the response and the length of the extracted part

    • buffer: Buffer
    • idxValueStart: number
    • length: number

transformPathToBuffer

  • transformPathToBuffer(path: string): Buffer

validateResponse

  • validateResponse(response: Buffer): boolean
  • description

    Verify if the signature returned by the ledger for tz2 and tz3 is valid

    Parameters

    • response: Buffer

      The signature returned by the Ledger (return from the signWithLedger function)

    Returns boolean

    True if valid, false otherwise

Generated using TypeDoc