Optionaltransport: PaymentRequestTransport[]Optionalid: stringOptionalamount: AmountLikeOptionalunit: stringOptionalmints: string[]Optionaldescription: stringOptionalnut10: NUT10OptionOptionalmintsPreferred: booleanOptionalsupportedMethods: { fee?: AmountLike; method: string }[]OptionalamountOptionaldescriptionOptionalidOptionalmintsOptionalmintsOptionalnut10OptionalsupportedOptionaltransportOptionalunitThe total amount to send from mint: the requested amount plus
feesFor.
The mint URL the payer will send from.
OptionalmeltMethods: string[]The methods the mint can melt the request unit via (its NUT-05 melt
methods, matched against sm); omit if unknown.
If the request has no amount (use feesFor instead), or no unit (invalid per NUT-18).
Serializes the default NUT-18 payment payload for this request.
The mint the proofs are from.
The proofs to send (eg the send half of a send flow).
Optionalopts: { memo?: string; unit?: string }Optionalmemo?: stringOptional memo for the payee.
Optionalunit?: stringUnit when the request has none (default 'sat').
The per-method fee (mf) the payer must add when paying from mint: 0 if mint is in the
mint list, otherwise the lowest fee among the sm methods that meltMethods says the mint
supports (NUT-18).
The mint URL the payer will send from.
OptionalmeltMethods: string[]The methods the mint can melt the request unit via (its NUT-05 melt
methods, matched against sm); omit if unknown (prices as 0).
Encodes the payment request to creqA format (CBOR).
A base64 encoded payment request string with 'creqA' prefix.
ExperimentalEncodes the payment request to creqB format (TLV + bech32m).
A bech32m encoded payment request string with 'CREQB' prefix.
Converts this request's nut10 locking option into the P2PKOptions accepted by the
.asP2PK() builder, so a payer can produce proofs locked to exactly the spending condition the
payee requested.
Supports P2PK (NUT-11) and HTLC (NUT-14) only. Returns undefined when there is no nut10
option or its kind is not one we can build.
StaticdecodeParses a default NUT-18 payment payload received from a payer.
Raw payload text (POST body or Nostr DM content).
Validates payload shape only, accepting proof amounts as JSON numbers or canonical decimal strings. Matching the payload to the request (id, mint, amount) is the payee's job. Imposes no size limit of its own: cap the raw text at the transport (POST body, DM) before decoding.
CTSError If the text is not valid JSON or not payload-shaped.
StaticfromStaticfromCreates a PaymentRequest from a raw payment request. Supports both creqA and creqB versions.
The raw payment request string to create a PaymentRequest from.
A PaymentRequest object.
Resolves the NUT-18 mint list strictness per spec.
undefinedif no mint list is set (mpSHOULD be ignored)trueif the list is strict (mpabsent orfalse)falseif the list is preferred/advisory (mp === true)