Summary
The sbtc npm package (v0.3.2) uses @scure/btc-signer@^1.4.0, which is now outdated. The latest version is 2.0.1. This causes dependency conflicts when using sbtc alongside other packages that use v2.x.
Current Behavior
// sbtc package.json
"dependencies": {
"@scure/btc-signer": "^1.4.0" // resolves to 1.8.1
}
When installed in a project using @scure/btc-signer@2.x, npm creates nested dependencies:
node_modules/
@scure/btc-signer/ (2.0.1 - project's version)
sbtc/
node_modules/
@scure/btc-signer/ (1.8.1 - sbtc's nested version)
Bugs Found
-
fetchSignersAddress() returns regtest format - The function hardcodes REGTEST network:
// In api.js
return btc.p2tr(pub, undefined, constants_1.REGTEST).address;
// Returns: bcrt1p... instead of bc1p...
-
fetchSbtcBalance() sometimes fails - JSON parsing errors, possibly due to API changes
Expected Behavior
- Update
@scure/btc-signer to ^2.0.0
- Fix
fetchSignersAddress() to use the correct network based on client type (Mainnet/Testnet)
- Ensure API compatibility with current Hiro endpoints
Environment
- sbtc version: 0.3.2
- @scure/btc-signer (project): 2.0.1
- @scure/btc-signer (sbtc nested): 1.8.1
Additional Context
The sbtc package was last published about a year ago. With sBTC now live on mainnet and withdrawals enabled, having an up-to-date SDK would be valuable for developers building sBTC integrations.
Related: We're building agent tooling at aibtc-mcp-server that uses both the sbtc package and @scure/btc-signer v2 for inscriptions/ordinals.
Summary
The
sbtcnpm package (v0.3.2) uses@scure/btc-signer@^1.4.0, which is now outdated. The latest version is2.0.1. This causes dependency conflicts when usingsbtcalongside other packages that use v2.x.Current Behavior
When installed in a project using
@scure/btc-signer@2.x, npm creates nested dependencies:Bugs Found
fetchSignersAddress()returns regtest format - The function hardcodesREGTESTnetwork:fetchSbtcBalance()sometimes fails - JSON parsing errors, possibly due to API changesExpected Behavior
@scure/btc-signerto^2.0.0fetchSignersAddress()to use the correct network based on client type (Mainnet/Testnet)Environment
Additional Context
The sbtc package was last published about a year ago. With sBTC now live on mainnet and withdrawals enabled, having an up-to-date SDK would be valuable for developers building sBTC integrations.
Related: We're building agent tooling at aibtc-mcp-server that uses both the sbtc package and @scure/btc-signer v2 for inscriptions/ordinals.