aboutsummaryrefslogtreecommitdiffstats
path: root/lib/esplora.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
committerAdam Soltys <[email protected]>2026-02-24 13:18:42 -0800
commitad7b09b43323d0ffc0a8ddabb43e4838a184c697 (patch)
treefbf2a59f81771b2938f474c8e7b35a497d2960e4 /lib/esplora.ts
parent9e97e040617bfa0b40150c0eba298bf186bbeeaf (diff)
downloadcoinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.tar.gz
coinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.zip
formatting
Diffstat (limited to 'lib/esplora.ts')
-rw-r--r--lib/esplora.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/esplora.ts b/lib/esplora.ts
index 4fd81b32..d92fad0c 100644
--- a/lib/esplora.ts
+++ b/lib/esplora.ts
@@ -91,8 +91,7 @@ export const getTxHex = async (txid: string) => {
// Address derivation
const hdVersionsForKey = (pubkey: string) => {
- if (pubkey.startsWith("tpub") || pubkey.startsWith("tprv"))
- return REGTEST_VERSIONS;
+ if (pubkey.startsWith("tpub") || pubkey.startsWith("tprv")) return REGTEST_VERSIONS;
// xpub/xprv use default BITCOIN_VERSIONS (mainnet) — pass undefined
return undefined;
};
@@ -136,11 +135,7 @@ export const parseDescriptor = (desc: string) => {
return { fingerprint: match[1], pubkey: match[2] };
};
-export const findLastUsedIndex = async (
- pubkey: string,
- fingerprint: string,
- maxScan = 100,
-) => {
+export const findLastUsedIndex = async (pubkey: string, fingerprint: string, maxScan = 100) => {
let lastUsed = -1;
for (let i = 0; i < maxScan; i++) {
const { address } = deriveAddress(pubkey, fingerprint, i, false);