Change the default mint to Minibits; keep cubabitcoin in trusted

This commit is contained in:
Vinney Cavallo
2026-09-29 17:19:43 -04:00
parent 44f2c27a36
commit 2ef583b9c2
4 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -322,8 +322,8 @@ Manage routstrd as a system service using PM2, so it survives reboots.
## Wallet Commands
New wallets trust two mints out of the box: `https://mint.cubabitcoin.org` and
`https://mint.minibits.cash/Bitcoin`. `https://mint.cubabitcoin.org` is the
New wallets trust two mints out of the box: `https://mint.minibits.cash/Bitcoin`
and `https://mint.cubabitcoin.org`. `https://mint.minibits.cash/Bitcoin` is the
default mint, and the default is used when a wallet command does not include
`--mint-url`. An existing wallet keeps whatever default it already has; the
shipped mints are only added as trusted, never as the default. Use
@@ -400,7 +400,7 @@ Pay a Lightning invoice.
### `routstrd wallet mints list`
List configured wallet mints. Includes the mints trusted by default (`https://mint.cubabitcoin.org`, `https://mint.minibits.cash/Bitcoin`) plus any added manually.
List configured wallet mints. Includes the mints trusted by default (`https://mint.minibits.cash/Bitcoin`, `https://mint.cubabitcoin.org`) plus any added manually.
### `routstrd wallet mints add <url>`
+7 -7
View File
@@ -96,9 +96,9 @@ describe("default mint functionality", () => {
const mints = await client.listMints();
expect(mints).toEqual(expect.arrayContaining([...DEFAULT_TRUSTED_MINT_URLS]));
// Cuba still owns the default slot even though minibits is trusted too.
// Minibits owns the default slot even though Cuba is trusted too.
const defaultMint = await client.getDefaultMint();
expect(defaultMint).toBe("https://mint.cubabitcoin.org");
expect(defaultMint).toBe("https://mint.minibits.cash/Bitcoin");
} finally {
await client.dispose?.();
}
@@ -160,18 +160,18 @@ describe("default mint functionality", () => {
legacyPidPath: join(walletDir, "legacy-cocod.pid"),
});
try {
// The initial default should be the auto-added Cuba mint
// The initial default should be the auto-added Minibits mint
const initialDefault = await client.getDefaultMint();
expect(initialDefault).toBe("https://mint.cubabitcoin.org");
expect(initialDefault).toBe("https://mint.minibits.cash/Bitcoin");
// Setting the same mint should work
const message = await client.setDefaultMint(
"https://mint.cubabitcoin.org",
"https://mint.minibits.cash/Bitcoin",
);
expect(message).toContain("https://mint.cubabitcoin.org");
expect(message).toContain("https://mint.minibits.cash/Bitcoin");
const defaultMint = await client.getDefaultMint();
expect(defaultMint).toBe("https://mint.cubabitcoin.org");
expect(defaultMint).toBe("https://mint.minibits.cash/Bitcoin");
} finally {
await client.dispose?.();
}
+4 -4
View File
@@ -43,7 +43,7 @@ describe("seedTrustedMints", () => {
expect(added).toEqual([...DEFAULT_TRUSTED_MINT_URLS]);
expect(progress).toEqual([
`Adding default mint: ${DEFAULT_MINT_URL}`,
"Adding trusted mint: https://mint.minibits.cash/Bitcoin",
"Adding trusted mint: https://mint.cubabitcoin.org",
]);
});
@@ -60,7 +60,7 @@ describe("seedTrustedMints", () => {
it("skips mints that are already trusted", async () => {
const { wallet, added } = makeHarness([
DEFAULT_MINT_URL,
"https://mint.minibits.cash/Bitcoin",
"https://mint.cubabitcoin.org",
]);
await seedTrustedMints(wallet, DEFAULT_MINT_URL);
@@ -71,7 +71,7 @@ describe("seedTrustedMints", () => {
it("treats a trailing slash on a stored mint as already trusted", async () => {
const { wallet, added } = makeHarness([
`${DEFAULT_MINT_URL}/`,
"https://mint.minibits.cash/Bitcoin/",
"https://mint.cubabitcoin.org/",
]);
await seedTrustedMints(wallet, DEFAULT_MINT_URL);
@@ -114,7 +114,7 @@ describe("seedTrustedMints", () => {
});
it("keeps going when a non-default mint cannot be fetched", async () => {
const unavailable = "https://mint.minibits.cash/Bitcoin";
const unavailable = "https://mint.cubabitcoin.org";
const { wallet, added, errors } = makeHarness([], [unavailable]);
await seedTrustedMints(wallet, DEFAULT_MINT_URL, {
+3 -3
View File
@@ -5,7 +5,7 @@ import { normalizeMintUrl } from "@cashu/coco-core";
* always trusted, and a wallet is never allowed to point its default at a mint
* it could not fetch.
*/
export const DEFAULT_MINT_URL = "https://mint.cubabitcoin.org";
export const DEFAULT_MINT_URL = "https://mint.minibits.cash/Bitcoin";
/**
* Mints routstrd trusts out of the box. Every entry is added as a trusted mint
@@ -16,7 +16,7 @@ export const DEFAULT_MINT_URL = "https://mint.cubabitcoin.org";
*/
export const DEFAULT_TRUSTED_MINT_URLS: readonly string[] = [
DEFAULT_MINT_URL,
"https://mint.minibits.cash/Bitcoin",
"https://mint.cubabitcoin.org",
];
export interface TrustedMintSeeder {
@@ -84,4 +84,4 @@ export async function seedTrustedMints(
options.onError?.(`Could not add trusted mint ${mintUrl}`, error);
}
}
}
}