Private
_keysPrivate
_seedPrivate
_unitReturn an existing melt quote from the mint.
ID of the melt quote
the mint will return an existing melt quote
Gets an existing mint quote from the mint.
Quote ID
the mint will create and return a Lightning invoice for the specified amount
Private
constructconstruct proofs from
promises,
rs,
secrets, and
keyset
array of serialized blinded signatures
arrays of binding factors
array of secrets
mint keyset
array of serialized proofs
Private
createCreates NUT-08 blank outputs (fee returns) for a given fee reserve See: https://github.com/cashubtc/nuts/blob/main/08.md
amount to cover with blank outputs
mint keysetId
Optional
counter: numberblinded messages, secrets, and rs
Private
createCreates blinded messages for a according to
Optional
counter: numberOptional
pubkey: stringblinded messages, secrets, rs, and amounts
Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice.
LN invoice that needs to get a fee estimate
the mint will create and return a melt quote for the invoice with an amount and fee reserve
Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit.
Amount requesting for mint.
Optional
description: stringoptional description for the mint quote
the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit
Private
createCreates blinded messages for a given amount
amount to create blinded messages for
Optional
amountPreference: AmountPreference[]optional preference for splitting proofs into specific amounts. overrides amount param
Optional
counter: numberOptional
pubkey: stringblinded messages, secrets, rs, and amounts
Private
createCreates a split payload
amount to send
proofs to split*
Optional
preference: AmountPreference[] | Preferencesoptional preference for splitting proofs into specific amounts. overrides amount param
Optional
counter: numberOptional
pubkey: stringOptional
privkey: stringPrivate
getGet information about the mint
mint info
Melt tokens for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. Returns payment proof and change proofs
ID of the melt quote
proofs to melt
Optional
options: { Optional
counter?: numberOptional
keysetOptional
privkey?: stringMint tokens for a given mint quote
amount to request
ID of mint quote
Optional
options: { Optional
counter?: numberOptional
keysetOptional
preference?: AmountPreference[]Optional
pubkey?: stringproofs
Helper function that pays a Lightning invoice directly without having to create a melt quote before The combined amount of Proofs must match the payment amount including fees.
the exact amount to send including fees
Optional
meltQuote: MeltQuoteResponsemelt quote for the invoice
Optional
options: { Optional
counter?: numberOptional
keysetOptional
privkey?: stringHelper function to ingest a Cashu token and pay a Lightning invoice with it.
Lightning invoice
cashu token
melt quote for the invoice
Optional
options: { Optional
counter?: numberOptional
keysetReceive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array)
Cashu token
Optional
options: { Optional
counter?: numberOptional
keysetOptional
preference?: AmountPreference[]Optional
privkey?: stringOptional
pubkey?: stringNew token with newly created proofs, token entries that had errors
Receive a single cashu token entry
a single entry of a cashu token
Optional
options: { Optional
counter?: numberOptional
keysetOptional
preference?: AmountPreference[]Optional
privkey?: stringOptional
pubkey?: stringNew token entry with newly created proofs, proofs that had errors
Regenerates
set starting point for count (first cycle for each keyset should usually be 0)
set number of blinded messages that should be generated
Optional
options: { Optional
keysetproofs
Splits and creates sendable tokens if no amount is specified, the amount is implied by the cumulative amount of all proofs if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split
amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set
proofs matching that amount
Optional
options: { Optional
counter?: numberOptional
keysetOptional
preference?: AmountPreference[] | PreferencesOptional
privkey?: stringOptional
pubkey?: stringpromise of the change- and send-proofs
Private
splitGenerated using TypeDoc
Class that represents a Cashu wallet. This class should act as the entry point for this library