diff --git a/CHANGELOG.md b/CHANGELOG.md index 39d7ae9..2cf9d71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,47 @@ All notable changes to `@railgun-community/ledger-client` are documented here. This project is pre-1.0 and experimental; expect breaking changes on minor versions. +## 0.3.0 — 2026-07-24 + +Aligns the client with RAILGUN firmware **1.6.1 (clear-sign-v1)**. Requires that build on +the device — install it with `yarn install:app --target flex|nanosp`. + +### Breaking + +- **Spending-public-key retrieval now targets firmware ≥ 1.6.1.** `buildGetPublicKey` sends + `P1 = 0x01` (display + confirm); the device shows the account index and pubkey and returns the + key only on approval, and production firmware rejects `P1 = 0x00`. As a result `getPublicKey()` + and `getWalletArtifacts()` now require an on-device confirmation (previously silent), and against + older firmware the spending-key fetch fails. + +### Added + +- **Viewing public key (`getViewingPublicKey` / `buildGetViewingPublicKey`, INS 0x10)** — returns the + 32-byte compressed Ed25519 viewing *public* key for on-device display/verify. Does not export the + viewing secret; wallet loading still uses the viewing private key. +- **RAILGUN address (`getRailgunAddress` / `buildGetRailgunAddress`, INS 0x14)** — returns the 127-byte + `0zk1…` address for on-device cross-check of the host-derived address. +- **CLEAR_SIGN transact protocol builders (INS 0x11, experimental)** — pure builders for the full + single-tx session (`buildClearSignInit`, `…Nullifier`, `…BpFields`, `…OutBroadcaster`, `…OutChange`, + `…OutTransfer`, `…OutUnshield`, `…Finalize`), plus `validateClearSignShape`, `encodeErc20TokenHash`, + and `parseClearSignFinalize`. Session orchestration and engine wiring are not included yet. +- **Fully customizable, chain-scoped EIP-7702 derivation path.** `get7702Signer` accepts an optional + `railgunAccountIndex`; the path words `account (W0) / chainId (W1) / ephemeralIndex (W2)` are all + caller-settable, so each chain derives a distinct EOA and a wallet can operate on multiple chains at + once. `signEip7702Authorization` rejects an explicit path whose chainId word (W1) disagrees with the + authorization chainId. +- Capability flags `viewingPublicKey` / `railgunAddress` / `railgunClearSign` on `RAILGUN_PROFILE`, and + `CAPABILITY_STATUS.clearSign` (experimental). + +### Changed + +- Bundled SCP install artifacts updated to the firmware 1.6.1 clear-sign-v1 build (flex + Nano S Plus). + +### Migration + +- Install firmware 1.6.1 (clear-sign-v1) on the device before upgrading; `getPublicKey()` / + `getWalletArtifacts()` now prompt on-device. No source-level API removals. + ## 0.2.2 — 2026-07-14 ### Changed diff --git a/README.md b/README.md index 311aa32..21ce785 100644 --- a/README.md +++ b/README.md @@ -47,21 +47,21 @@ GitHub, pinned to a release tag — see script runs the build): ```bash -yarn add github:Railgun-Community/ledger-client#v0.2.2 +yarn add github:Railgun-Community/ledger-client#v0.3.0 ``` or in `package.json`: ```jsonc "dependencies": { - "@railgun-community/ledger-client": "github:Railgun-Community/ledger-client#v0.2.2" + "@railgun-community/ledger-client": "github:Railgun-Community/ledger-client#v0.3.0" } ``` **From a release tarball** — a pre-built package, no build on install: ```bash -yarn add https://github.com/Railgun-Community/ledger-client/releases/download/v0.2.2/railgun-community-ledger-client-0.2.2.tgz +yarn add https://github.com/Railgun-Community/ledger-client/releases/download/v0.3.0/railgun-community-ledger-client-0.3.0.tgz ``` ## Architecture diff --git a/docs/getting-started.md b/docs/getting-started.md index 20f9166..3a5d2b4 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -13,7 +13,7 @@ Not on npm yet — install from GitHub, pinned to a tag (see the root README for version): ```bash -yarn add github:Railgun-Community/ledger-client#v0.2.2 +yarn add github:Railgun-Community/ledger-client#v0.3.0 ``` Peer deps for browser signing: `@ledgerhq/hw-transport`, `@ledgerhq/hw-transport-webhid`, diff --git a/package.json b/package.json index 1305b8e..2f1b5d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@railgun-community/ledger-client", - "version": "0.2.2", + "version": "0.3.0", "description": "RAILGUN hardware wallet connector — Ledger-first, state-machine-driven TSX component", "type": "module", "main": "dist/index.js",