Cashu mint instance is used to make api calls
Optional
keys: MintKeyspublic keys from the mint
Optional
mnemonicOrSeed: string | Uint8Arraymnemonic phrase or Seed to initial derivation key for this wallets deterministic secrets. When the mnemonic is provided, the seed will be derived from it. This can lead to poor performance, in which case the seed should be directly provided
Private
_keysPrivate
_keysetPrivate
_seedPrivate
changedCheck if the keysetId has changed and return the new keys
array of promises to check
new keys if they have changed
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
Optional
counter: numberblinded messages, secrets, and rs
Private
createCreates blinded messages for a according to
Optional
counter: numberOptional
keysetId: stringblinded messages, secrets, rs, and amounts
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: numberblinded messages, secrets, rs, and amounts
Private
createCreates a split payload
amount to send
proofs to split*
Optional
preference: AmountPreference[]optional preference for splitting proofs into specific amounts. overrides amount param
Optional
counter: numberPrivate
getGet the mint's public keys for a given set of proofs
array of proofs
Optional
mint: stringoptional mint url
keys
Private
initExecutes a payment of an invoice on the Lightning network. The combined amount of Proofs has to match the payment amount including fees.
the exact amount to send including fees
Optional
feeReserve: numberOptional
counter: numberUse a cashu token to pay an ln invoice
Lightning invoice
cashu token
Optional
counter: numberReceive an encoded or raw Cashu token
Cashu token
Optional
preference: AmountPreference[]optional preference for splitting proofs into specific amounts
Optional
counter: numberNew token with newly created proofs, token entries that had errors, and newKeys if they have changed
Receive a single cashu token entry
a single entry of a cashu token
Optional
preference: AmountPreference[]optional preference for splitting proofs into specific amounts.
Optional
counter: numberNew token entry with newly created proofs, proofs that had errors, and newKeys if they have changed
Starts a minting process by requesting an invoice from the mint
Amount requesting for mint.
the mint will create and return a Lightning invoice for the specified amount
Request tokens from the mint
amount to request
id to identify the mint request*
Optional
AmountPreference: AmountPreference[]Optional
counter: numberproofs and newKeys if they have changed
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
keysetId: stringproofs (and newKeys, if they have changed)
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
preference: AmountPreference[]optional preference for splitting proofs into specific amounts. overrides amount param
Optional
counter: numberpromise 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