Describes a function that will verify macaroons. This will be run against
all caveats attached to a macaroon when a request for protected content is made and
will only be run when a given invoice has been paid. Each caveat attached to a macaroon
is passed through this function. When a match is found, the macaroon passes (for that caveat).
If none pass, then the macaroon is automatically invalid. The
macaroons.js package comes with a built-in
verifier that can be used to verify the time example given in CaveatGetter, called
TimestampCaveatVerifier
Generated using TypeDoc
Describes a function that will create a caveat to attach onto a discharge macaroon. A caveat is just a string that can later be verified in the CaveatVerifier. Because the macaroons are signed, this cannot be tampered with. Learn more about macaroons in the documentation for the macaroons.js package The following CaveatGetter would make a macaroon valid for 30000ms or 30 seconds
() =>
time < ${new Date(Date.now() + 30000)}