Documents › Wallet Operations › Melt
// given a bolt11 meltQuote...
const { quote, change } = await wallet.ops.meltBolt11(meltQuote, myProofs).run();
meltQuote using myProofs// given a bolt12 meltQuote...
const { quote, change } = await wallet.ops
.meltBolt12(meltQuote, myProofs)
.asDeterministic() // counter=0 => auto-reserve
.onCountersReserved((info) => console.log('Reserved', info))
.run();
prepare()const preview = await wallet.ops.meltBolt11(meltQuote, myProofs).asDeterministic().prepare();
// Persist `preview` if you want to retry safely later.
const { quote, change } = await wallet.completeMelt(preview);
prepare() creates the MeltPreview and any NUT-08 blanks without paying yet.run() is equivalent to const preview = await prepare(); await wallet.completeMelt(preview).For custom payment methods (e.g., BACS, SWIFT), use the generic wallet methods directly:
wallet.createMeltQuote(method, ...), wallet.checkMeltQuote(method, ...),
wallet.meltProofs(method, ...), or the two-step wallet.prepareMelt(method, ...) /
wallet.completeMelt(...). See Melt Token – Custom Methods for examples.