Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Unreleased

## 3.10.0 (2026-06-13)

- added: Support the `<code>-wif:` protohandler prefix (e.g. `bch-wif:`) in `parseUri` so CashStamps private keys can be swept.
- changed: Convert the build tooling from Yarn to npm.
- changed: Replace git dependencies (ecpair, groestl-hash-js, bs58grscheck) with @edge.app-scoped npm packages so installs no longer require git/SSH access.
- security: Upgrade dependencies per Socket security recommendations.
## 3.10.0 (2026-06-13)


## 3.9.0 (2026-03-10)

Expand Down
10 changes: 10 additions & 0 deletions src/common/plugin/CurrencyTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ export function makeCurrencyTools(
},

async parseUri(uri: string): Promise<ExtendedParseUri> {
// CashStamps and similar paper-wallet tools prefix a WIF private key with
// a "<code>-wif:" protohandler (e.g. "bch-wif:<WIF>"). Strip it so the
// bare WIF is handled by the private-key detection in parsePathname. The
// prefix is derived from the wallet's own currency code, so it can only
// ever match this coin.
const wifPrefix = `${currencyInfo.currencyCode.toLowerCase()}-wif:`
if (uri.toLowerCase().startsWith(wifPrefix)) {
uri = uri.slice(wifPrefix.length)
}

const isGateway = uri
.toLocaleLowerCase()
.startsWith(`${coinInfo.name}://`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,27 @@ export const bitcoincash: FixtureType = {
metadata: {},
privateKeys: ['5JJY5LkdXsRSh1X2pLMezk3f11wHkSBJM1AmJ6zKJyzJtQnAe3F']
}
],
'bch-wif protohandler - Compressed': [
'bch-wif:L5FyMaAPJGqivZmCzFAEATptdvgha4UqwVWbLLZgr5iLGtQRo4x2',
{
metadata: {},
privateKeys: ['L5FyMaAPJGqivZmCzFAEATptdvgha4UqwVWbLLZgr5iLGtQRo4x2']
}
],
'bch-wif protohandler - Non Compressed': [
'bch-wif:5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF',
{
metadata: {},
privateKeys: ['5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF']
}
],
'bch-wif protohandler - Uppercase prefix': [
'BCH-WIF:L5FyMaAPJGqivZmCzFAEATptdvgha4UqwVWbLLZgr5iLGtQRo4x2',
{
metadata: {},
privateKeys: ['L5FyMaAPJGqivZmCzFAEATptdvgha4UqwVWbLLZgr5iLGtQRo4x2']
}
]
},
encodeUri: {
Expand Down
Loading