diff --git a/package-lock.json b/package-lock.json index 0ed19b1..55f3c3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sats-connect/core", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@sats-connect/core", - "version": "0.5.0", + "version": "0.5.1", "license": "ISC", "dependencies": { "axios": "1.7.7", diff --git a/package.json b/package.json index 8368741..24d0e18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sats-connect/core", - "version": "0.5.0", + "version": "0.5.1", "main": "dist/index.mjs", "module": "dist/index.mjs", "types": "dist/index.d.mts", diff --git a/src/runes/api.ts b/src/runes/api.ts index f0948f4..6a16994 100644 --- a/src/runes/api.ts +++ b/src/runes/api.ts @@ -19,8 +19,8 @@ const urlNetworkSuffix = { [BitcoinNetworkType.Signet]: '-signet', }; export const ORDINALS_API_BASE_URL = (network: BitcoinNetworkType = BitcoinNetworkType.Mainnet) => { - if (network === BitcoinNetworkType.Regtest) { - throw new Error('Ordinals API does not support regtest network'); + if (network === BitcoinNetworkType.Regtest || network === BitcoinNetworkType.Testnet4) { + throw new Error(`Ordinals API does not support ${network} network`); } return `https://ordinals${urlNetworkSuffix[network]}.xverse.app/v1`; }; diff --git a/src/types.ts b/src/types.ts index 6fd8dea..123a7c1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,6 +5,7 @@ import { Requests, Return } from './request'; export enum BitcoinNetworkType { Mainnet = 'Mainnet', Testnet = 'Testnet', + Testnet4 = 'Testnet4', Signet = 'Signet', Regtest = 'Regtest', }