How to use the lsat-js.Identifier function in lsat-js

To help you get started, we’ve selected a few lsat-js 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 Tierion / boltwall / tests / utilities.ts View on Github external
export function getTestBuilder(secret: string): BuilderInterface {
  const request = lnService.parsePaymentRequest({ request: invoice.payreq })

  const identifier = new Identifier({
    paymentHash: Buffer.from(request.id, 'hex'),
    tokenId: randomBytes(32),
  })
  const builder = new MacaroonsBuilder(
    'location',
    secret,
    identifier.toString()
  )
  return builder
}

lsat-js

Utility library for working with LSAT auth tokens in javascript

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages