Scan your whole stack
Are you using @ledgerhq/hw-app-btc?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v13.0.0-nightly.20261125083912
@ledgerhq/hw-app-btc was last scanned on 25 Nov 2026 at version 13.0.0-nightly.20261125083912. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 13.0.0-nightly.20261125083912 LATEST | 25 Nov 2026 | No rules fired |
| 13.0.0-nightly.20261125020400 | 25 Nov 2026 | No rules fired |
| 12.4.0 | 24 Nov 2026 | No rules fired |
| 12.4.0-nightly.20261124020210 | 24 Nov 2026 | Not shown |
| 12.4.0-nightly.20261121020412 | 21 Nov 2026 | Not shown |
Findings for v13.0.0-nightly.20261125083912. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 13.0.0-nightly.20261125083912; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
GitHub, Ledger Devs Discord, Developer Portal
[!WARNING] Status: DEPRECATED — Replaced by the Device Management Kit (DMK). Migrate to
@ledgerhq/device-signer-kit-bitcoin.
Ledger Hardware Wallet BTC JavaScript bindings. Also supports many altcoins.
You may be using this package to communicate with the Bitcoin Nano App.
For a smooth and quick integration:
BIP32 Path Handling for Bitcoin Wallets
This file provides utility functions to handle BIP32 paths, which are commonly used in hierarchical deterministic (HD) wallets. It includes functions to convert BIP32 paths to and from different formats, extract components from extended public keys (xpubs), manipulate path elements, and derive child public keys locally (for non-hardened derivation).
Derives a child public key from a parent public key using BIP32 non-hardened derivation. This allows deriving child keys locally without device interaction.
parentPubkey Buffer The parent compressed public key (33 bytes)parentChaincode Buffer The parent chaincode (32 bytes)index number The child index (must be non-hardened, i.e., < 0x80000000)Returns {pubkey: Buffer, chaincode: Buffer} The derived child public key and chaincode
Bitcoin API.
transport The transport layer used for communication.scrambleKey This parameter is deprecated and no longer needed.currency The currency to use, defaults to "bitcoin".import Btc from "@ledgerhq/hw-app-btc";
const btc = new Btc({ transport, currency: "bitcoin" });
Get an XPUB with a ledger device
arg {path: string, xpubVersion: number} derivation parameter* path: a BIP 32 path of the account level. (e.g. The derivation path 84'/0'/0'
follows the purpose' / coin_type' / account' standard, with purpose=84, coin_type=0, account=0)Returns Promise\<string> XPUB of the account
path string a BIP 32 path (i.e. the purpose’ / coin_type’ / account’ / change / address_index standard)
opts {verify: boolean?, format: AddressFormat?}?
options an object with optional these fields:* verify (boolean) whether ask user to confirm the address on the device
format ("legacy" | "p2sh" | "bech32" | "bech32m" | "cashaddr") to use different bitcoin address formatter.NB The normal usage is to use:* legacy format with 44' paths
p2sh format with 49' paths
bech32 format with 84' paths
bech32m format with 86' paths
cashaddr in case of Bitcoin Cash
btc.getWalletPublicKey("44'/0'/0'/0/0").then(o => o.bitcoinAddress)
btc.getWalletPublicKey("49'/0'/0'/0/0", { format: "p2sh" }).then(o => o.bitcoinAddress)
Returns Promise\<{publicKey: string, bitcoinAddress: string, chainCode: string}>
You can sign a message according to the Bitcoin Signature format and retrieve v, r, s given the message and the BIP 32 path of the account to sign.
btc.signMessage("44'/60'/0'/0'/0", Buffer.from("test").toString("hex")).then(function(result) {
var v = result['v'] + 27 + 4;
var signature = Buffer.from(v.toString(16) + result['r'] + result['s'], 'hex').toString('base64');
console.log("Signature : " + signature);
}).catch(function(ex) {console.log(ex);});
Returns Promise\<{v: number, r: string, s: string}>
To sign a transaction involving standard (P2PKH) inputs, call createTransaction with the following parameters
arg CreateTransactionArginputs is an array of [ transaction, output_index, optional redeem script, optional sequence ] where* transaction is the previously computed transaction object for this UTXOassociatedKeysets is an array of BIP 32 paths pointing to the path to the private key used for each UTXOchangePath is an optional BIP 32 path pointing to the path to the public key used to compute the change addressoutputScriptHex is the hexadecimal serialized outputs of the transaction to sign, including leading vararg voutCountlockTime is the optional lockTime of the transaction to sign, or default (0)sigHashType is the hash type of the transaction to sign, or default (all)segwit is an optional boolean indicating wether to use segwit or not. This includes wrapped segwit.additionals list of additionnal options* "bech32" for spending native segwit outputsexpiryHeight is an optional Buffer for zec overwinter / sapling TxsuseTrustedInputForSegwit trust inputs for segwit transactions. If app version >= 1.4.0 this should be true.btc.createTransaction({
inputs: [ [tx1, 1] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
}).then(res => ...);
Returns Promise\<string> the signed transaction ready to be broadcast
Signs a PSBT buffer using the Bitcoin app (new protocol).
Note: All internal inputs (inputs that can be signed by the device) must belong to the same account and use the same account type. Mixed input types or inputs from different accounts are not supported and will throw an error.
psbtBuffer Buffer Raw PSBT buffer (v0 or v2) to be signed.
options SignPsbtBufferOptions Signing configuration.
options.finalizePsbt Whether to finalize the PSBT after signing.
If true, the returned tx is a fully signed
transaction ready for broadcast.options.accountPath BIP32 account path (for example,
"m/84'/0'/0'"). Required. Used to populate missing BIP32 derivation
information when the PSBT lacks it, and as the signing account path.options.addressFormat Explicit address format to use when the
account type cannot be inferred from the PSBT ("legacy", "p2sh",
"bech32", or "bech32m").options.onDeviceSignatureRequested Callback when signature is about to be requested from device.options.onDeviceSignatureGranted Callback when the first signature is granted by device.options.onDeviceStreaming Callback to track signing progress with index and total.options.knownAddressDerivations Map from scriptPubKey hash (hex) to { pubkey, path }.
Required. Built by the caller from the wallet's known addresses (receive/change).Returns Promise\<{psbt: Buffer, tx: string?}> An object containing:* psbt: the serialized PSBT (with signatures; finalized if
finalizePsbt is true).
tx: the fully signed transaction hex string, only when
finalizePsbt is true; omitted when not finalizing.To obtain the signature of multisignature (P2SH) inputs, call signP2SHTransaction_async with the folowing parameters
arg SignP2SHTransactionArginputs is an array of [ transaction, output_index, redeem script, optional sequence ] where* transaction is the previously computed transaction object for this UTXOassociatedKeysets is an array of BIP 32 paths pointing to the path to the private key used for each UTXOoutputScriptHex is the hexadecimal serialized outputs of the transaction to signlockTime is the optional lockTime of the transaction to sign, or default (0)sigHashType is the hash type of the transaction to sign, or default (all)btc.signP2SHTransaction({
inputs: [ [tx, 1, "52210289b4a3ad52a919abd2bdd6920d8a6879b1e788c38aa76f0440a6f32a9f1996d02103a3393b1439d1693b063482c04bd40142db97bdf139eedd1b51ffb7070a37eac321030b9a409a1e476b0d5d17b804fcdb81cf30f9b99c6f3ae1178206e08bc500639853ae"] ],
associatedKeysets: ["0'/0/0"],
outputScriptHex: "01905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac"
}).then(result => ...);
Returns Promise\<Array\<string>> the signed transaction ready to be broadcast
For each UTXO included in your transaction, create a transaction object from the raw serialized version of the transaction used in this UTXO.
transactionHex string a raw hexadecimal serialized transactionisSegwitSupported (boolean | null | undefined) is a boolean indicating if the segwit is supported (optional, default false)hasExtraData is a boolean (komodo, zencash and zcash include extraData in their transactions, others don't) (optional, default false)additionals Array\<string> list of additionnal options (optional, default [])Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.