Requires mint URL to create this object.
Optional
_customRequest: <T>(options: RequestOptions) => Promise<T>If passed, use custom request implementation for network communication with the mint.
Optional
authTokenGetter: () => Promise<string>A function that is called by the CashuMint instance to obtain a NUT-22 BlindedAuthToken (e.g. from a database or localstorage)
Optional
options: { logger?: Logger }Checks if specific proofs have already been redeemed.
Redeemed and unredeemed ordered list of booleans.
Gets an existing melt quote.
Quote ID.
Gets an existing mint quote from the mint.
Quote ID.
The mint will create and return a Lightning invoice for the specified amount.
Tries to establish a websocket connection with the websocket mint url according to NUT-17.
Requests a new melt quote from the mint.
Requests a new mint quote from the mint.
Payload for creating a new mint quote.
The mint will create and return a new mint quote containing a payment request for the specified amount and unit.
Closes a websocket connection.
Fetches mints info at the /info endpoint.
Get the mints public keys.
Optional
keysetId: stringOptional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched.
Optional
mintUrl: stringThe mints public keys.
Get the mints keysets in no specific order.
All the mints past and current keysets.
Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees.
Mints new tokens by requesting blind signatures on the provided outputs.
Payload containing the outputs to get blind signatures on.
Serialized blinded signatures.
Performs a swap operation with ecash inputs and outputs.
Payload containing inputs and outputs.
Signed outputs.
Static
checkChecks if specific proofs have already been redeemed.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Redeemed and unredeemed ordered list of booleans.
Static
checkGets an existing melt quote.
Quote ID.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringOptional
logger: LoggerStatic
checkGets an existing mint quote from the mint.
Quote ID.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringOptional
logger: LoggerThe mint will create and return a Lightning invoice for the specified amount.
Static
createRequests a new melt quote from the mint.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringOptional
logger: LoggerStatic
createRequests a new mint quote from the mint.
Payload for creating a new mint quote.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringOptional
logger: LoggerThe mint will create and return a new mint quote containing a payment request for the specified amount and unit.
Static
getFetches mints info at the /info endpoint.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
logger: LoggerStatic
getGet the mints public keys.
Optional
keysetId: stringOptional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Static
getGet the mints keysets in no specific order.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>All the mints past and current keysets.
Static
meltRequests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringOptional
logger: LoggerStatic
mintMints new tokens by requesting blind signatures on the provided outputs.
Payload containing the outputs to get blind signatures on.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringSerialized blinded signatures.
Static
restoreOptional
customRequest: <T>(options: RequestOptions) => Promise<T>Static
swapPerforms a swap operation with ecash inputs and outputs.
Payload containing inputs and outputs.
Optional
customRequest: <T>(options: RequestOptions) => Promise<T>Optional
blindAuthToken: stringSigned outputs.
Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet.