Requires mint URL to create this object.
Optionaloptions: { authProvider?: AuthProvider; customRequest?: RequestFn; logger?: Logger }Checks if specific proofs have already been redeemed.
The payload containing proofs to check.
OptionalcustomRequest: RequestFnOptional override for the request function.
Redeemed and unredeemed ordered list of booleans.
Gets an existing melt quote.
Quote ID.
OptionalcustomRequest: RequestFnOptional override for the request function.
The melt quote response.
Gets an existing BOLT12 melt quote from the mint. Returns current payment state (UNPAID, PENDING, or PAID) and payment preimage if paid.
Quote ID to check.
OptionalcustomRequest: RequestFnOptional override for the request function.
Updated quote with current payment state and preimage if available.
Gets an existing mint quote from the mint.
Quote ID.
OptionalcustomRequest: RequestFnOptional override for the request function.
The status of the mint quote, including payment details and state.
Gets an existing BOLT12 mint quote from the mint.
Quote ID to check.
OptionalcustomRequest: RequestFnOptional override for the request function.
Updated quote with current payment and issuance amounts.
Tries to establish a websocket connection with the websocket mint url according to NUT-17.
Requests a new melt quote from the mint.
Payload for creating a new melt quote.
OptionalcustomRequest: RequestFnOptional override for the request function.
The melt quote response.
Requests a new BOLT12 melt quote from the mint for paying a Lightning Network offer. For amount-less offers, specify the amount in options.amountless.amount_msat.
Payload containing the BOLT12 offer to pay and unit.
OptionalcustomRequest: RequestFnOptional override for the request function.
Melt quote with amount, fee reserve, and payment state.
Requests a new mint quote from the mint.
Payload for creating a new mint quote.
OptionalcustomRequest: RequestFnOptional override for the request function.
A new mint quote containing a payment request for the specified amount and unit.
Requests a new BOLT12 mint quote from the mint using Lightning Network offers.
Payload containing amount, unit, optional description, and required pubkey.
OptionalcustomRequest: RequestFnOptional override for the request function.
A mint quote containing a BOLT12 offer.
Closes a websocket connection.
Fetches mint's info at the /info endpoint.
OptionalcustomRequest: RequestFnOptional override for the request function.
The mint's information response.
Get the mint's public keys.
OptionalkeysetId: stringOptional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched.
OptionalmintUrl: stringOptional alternative mint URL to use for this request.
OptionalcustomRequest: RequestFnOptional override for the request function.
The mint's public keys.
Get the mint's keysets in no specific order.
OptionalcustomRequest: RequestFnOptional override for the request function.
All the mint's past and current keysets.
Lazily fetches and caches the mint's info if not already loaded.
The parsed MintInfo object.
Requests 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.
The melt payload containing inputs and optional outputs.
Optionaloptions: { customRequest?: RequestFn; preferAsync?: boolean }OptionalcustomRequest?: RequestFnOptional override for the request function.
OptionalpreferAsync?: booleanOptional override to set 'respond-async' header.
The melt response.
Requests the mint to pay a BOLT12 offer by providing ecash inputs to be spent. The inputs must cover the amount plus fee reserves. Optional outputs can be included to receive change for overpaid Lightning fees.
Payload containing quote ID, inputs, and optional outputs for change.
Optionaloptions: { customRequest?: RequestFn; preferAsync?: boolean }OptionalcustomRequest?: RequestFnOptional override for the request function.
OptionalpreferAsync?: booleanOptional override to set 'respond-async' header.
Payment result with state and optional change signatures.
Mints new tokens by requesting blind signatures on the provided outputs.
Payload containing the outputs to get blind signatures on.
OptionalcustomRequest: RequestFnOptional override for the request function.
Serialized blinded signatures.
Mints new tokens using a BOLT12 quote by requesting blind signatures on the provided outputs.
Payload containing the quote ID and outputs to get blind signatures on.
OptionalcustomRequest: RequestFnOptional override for the request function.
Serialized blinded signatures for the requested outputs.
Create an OIDC client using this mint’s NUT-21 metadata.
Optionalopts: OIDCAuthOptionsconst oidc = await mint.oidcAuth({ onTokens: (t) => authMgr.setCAT(t.access_token!) });
const start = await oidc.deviceStart();
// show start.user_code / start.verification_uri to the user
const token = await oidc.devicePoll(start.device_code, start.interval ?? 5);
// token.access_token is your CAT
Restores proofs from the provided blinded messages.
The payload containing outputs to restore.
OptionalcustomRequest: RequestFnOptional override for the request function.
The restore response with outputs and signatures.
Performs a swap operation with ecash inputs and outputs.
Payload containing inputs and outputs.
OptionalcustomRequest: RequestFnOptional override for the request function.
Signed outputs.
Class represents Cashu Mint API.
Remarks
This class contains lower-level functions that are implemented by Wallet.