Cashu-TS - v4.7.2
    Preparing search index...

    Class PaymentRequest

    Index

    Constructors

    Properties

    amount?: Amount
    description?: string
    id?: string
    mints?: string[]
    nut10?: NUT10Option
    singleUse: boolean = false
    unit?: string

    Methods

    • Encodes the payment request to creqA format (CBOR).

      Returns string

      A base64 encoded payment request string with 'creqA' prefix.

    • Experimental

      Encodes the payment request to creqB format (TLV + bech32m).

      Returns string

      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.

      Returns P2PKOptions | undefined

      If the option is missing its data field, or carries malformed NUT-10 tags — invalid lock semantics must not be silently dropped.