How to use the qrloop/exporter.dataToFrames function in qrloop

To help you get started, we’ve selected a few qrloop 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 LedgerHQ / ledger-live-desktop / src / components / Exporter / QRCodeExporter.js View on Github external
constructor(props) {
    super()
    const { accounts, settings } = props
    const data = encode({
      accounts,
      settings,
      exporterName: 'desktop',
      exporterVersion: __APP_VERSION__,
    })

    this.chunks = dataToFrames(data, 160, 4)

    setTimeout(() => {
      const BRIDGESTREAM_DATA = Buffer.from(JSON.stringify(this.chunks)).toString('base64')
      console.log(`BRIDGESTREAM_DATA=${BRIDGESTREAM_DATA}`) // eslint-disable-line
    }, 500)
  }

qrloop

Envelop big blob of data into frames that can be displayed in series of QR Codes

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis