Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}