global: private xpub support part 1

This commit is contained in:
nym21
2026-06-16 23:37:03 +02:00
parent 6f430bdb8c
commit 0c7861071d
70 changed files with 5874 additions and 12510 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* @param {number} value
*/
export function formatNumber(value) {
return new Intl.NumberFormat("en-US").format(value);
}
/**
* @param {number} sats
*/
export function formatBtc(sats) {
return `${(sats / 100_000_000).toLocaleString("en-US", {
maximumFractionDigits: 8,
})} BTC`;
}
/**
* @param {number} dollars
*/
export function formatUsd(dollars) {
return new Intl.NumberFormat("en-US", {
currency: "USD",
maximumFractionDigits: 0,
style: "currency",
}).format(dollars);
}