Commit Graph
71 Commits
Author SHA1 Message Date
Satoshi Qazi Muhammed 1b92bb910e Refresh transitive dependencies with open advisories; copy-webpack-plugin 14
The 7 open Dependabot alerts matched versions still pinned in yarn.lock. `yarn up -R` moves pbkdf2, source-map-js, http-cache-semantics and ajv to fixed versions within range. serialize-javascript came through copy-webpack-plugin 11 (^6); copy-webpack-plugin 14 asks for ^7.0.3 and resolves 7.1.2. Its use here is `patterns: [{ from: 'public' }]`; the chrome and firefox build zips are byte-identical before and after (41 files each, sha256).

Left: elliptic 6.6.1, for which no fixed version exists (via browserify-sign / create-ecdh).
2026-10-10 02:53:39 +04:00
Satoshi Qazi Muhammed 9d769676e4 Move to @pezkuwi/dev 0.86 (eslint 10 toolchain)
- @pezkuwi/dev, dev-test, dev-ts ^0.86.3 in the root and in every
  workspace package (they still asked for 0.84.3)
- tsconfig.base target ES2022, the @pezkuwi/dev default; it carries
  the ErrorOptions type for `cause`
- rethrown errors carry the original as `cause`; rejections are
  normalised to Error
- page/messaging: the typed subscriber is called directly, not as
  `Function`
- chrome mock: constant results through Promise.resolve
- useLedger: drop a construction every branch below repeated
- InputWithLabel: onKeyDown instead of the deprecated onKeyPress
- Account: toggleActions + 1 instead of a pre-increment of a parameter
- optional chains where a guard tested the same value
- specs: mount<React.Component> so the wrappers are not `any`-typed
- AccountsStore.set keeps its async override of KeyringStore.set:
  BaseStore.set handles its own failure, so it never rejects
- extension-chains keeps its ChainProperties assertion: the package's
  own build does not load the type augmentation
- the existing React Compiler findings (37, react-hooks rules only)
  are recorded in eslint-suppressions.json; a new one fails lint
2026-10-09 16:32:46 +04:00
Satoshi Qazi Muhammed 0321454dc7 ci: let Dependabot keep the workflow actions current
Nothing proposes updates to the workflow actions: several still declare
the Node 20 runtime, which runners already force to Node 24 with a warning
on every run. Dependabot now checks them monthly and groups all action
updates into one pull request.
2026-10-09 08:08:50 +04:00
Satoshi Qazi Muhammed 693b5987d6 Keep the peer dependency ranges open
Raising the @pezkuwi dependency floors to ^14.0.26 and ^16.5.37 also
rewrote the peerDependencies of extension-dapp, extension-inject,
extension-chains and extension-compat-metamask, which were "*" (as they
are upstream). A peer range is a requirement on the dApp's own
@pezkuwi/api and util; narrowing it would make npm refuse to install
these packages next to an api release from before 16.5.37. They are "*"
again.
2026-10-08 10:31:56 +04:00
Satoshi Qazi Muhammed e6787a9eb5 CI: drop the chmod step that the tree check flags
The scripts it made executable are run as `sh ./scripts/diff.sh` and
`node scripts/postbuild-cleanup.cjs`; the mode change only left the
tree dirty, and the new tree check fails on that.
2026-10-08 09:07:34 +04:00
Satoshi Qazi Muhammed a4a77d0ede CI: check what npm receives, keep the tree stable, stop the VPS1 deploy
- pr-any: after each step the tree must be unchanged (yarn lint runs
  eslint --fix, yarn build rewrites packageInfo.ts), and after build
  scripts/check-built-manifests.py checks the package.json of each
  package in scripts/published-packages.txt: entry points exist, no
  ./build/ or ./cjs/cjs/ paths, no workspace: ranges.
- push-main bumped the patch version on every push, pushed that commit
  to main as a bot, and copied the zips as root to 37.60.230.9, a host
  that has been retired; js.pezkuwichain.io no longer serves them and
  the extension is distributed through the stores. It now builds,
  checks the manifests and keeps the Chrome and Firefox packages as
  artifacts of the commit. The version is set in the release PR.
- The auto-approve and auto-merge bots are removed.
- ff-diff/, the output of yarn diff, is ignored by git and eslint.
2026-10-08 09:07:34 +04:00
Satoshi Qazi Muhammed cf9c1df03d Generate new mnemonics with wasm-crypto again
mnemonicGenerate was forced onto the JavaScript path because
wasm-crypto 7.5.18 had no bip39Generate. 7.5.20 has it: 1000 phrases of
12 to 24 words generated through wasm were all valid and distinct, and
wasm and JavaScript derive the same mini secret from each. The call is
back to the upstream form, which uses wasm when it is ready.
2026-10-08 09:07:34 +04:00
Satoshi Qazi Muhammed 71e20f843d Publishable package manifests on the fixed crypto stack, 0.62.27
- extension-dapp and extension-inject had the manifest the build writes
  into build/ committed as their source manifest (main
  ./build/cjs/index.js, an exports map into ./build/). They are back in
  the source form of the upstream manifests; the build generates those
  fields itself.
- Dependencies between the packages were workspace:*, and the build
  copies them into the published manifest as they are:
  @pezkuwi/extension-base 0.62.19 on npm depends on
  "@pezkuwi/extension-chains": "workspace:*" and cannot be installed.
  They are exact versions, as upstream has them; yarn still links the
  workspaces.
- @pezkuwi/* common dependencies ^14.0.26 and api dependencies ^16.5.37.
  These carry wasm-crypto 7.5.20, where ed25519, secp256k1, derivation
  and bip39 are implemented; 7.5.18 shipped them as "not yet
  implemented" stubs. The root resolutions that forced 14.0.25, 16.5.36
  and wasm-crypto 7.5.18 onto the tree are removed; every @pezkuwi
  package resolves to a single version without them.
- @pezkuwi/dev ^0.85.12.
- One version for everything: the packages were at 0.62.20, the
  extension package at 0.62.23, the root at 0.62.24 and the browser
  manifests at 0.62.26. All are 0.62.27, above every version on npm and
  in the stores.
2026-10-08 09:07:34 +04:00
Kurdistan Tech Ministry 758d346078 Make the Firefox source build reproducible, and let its check fail
The diff step rebuilds the extension from master-ff-src.zip (the source
archive AMO reviews) and compares the result with our build. It had never
worked, which the removed continue-on-error was hiding:

- The source zip left out .yarn/releases (yarnPath points there, so yarn
  could not start in the unpacked source) and scripts/ (build:ff runs
  scripts/postbuild-cleanup.cjs). Both are now included.
- diff.sh used `[ a || b ]`, which is not valid test syntax, and piped
  `diff -qr` into `sort`, so the check exited 0 whatever diff found. It now
  goes by diff's own exit status; with a file altered it fails.
- With those fixed, the builds still differed: webpack inlined
  import.meta.url from @pezkuwi/* packageInfo.js as the absolute file://
  path of the build machine, which also put our build directory into the
  published extension. DefinePlugin now gives it a fixed value; it is only
  shown in duplicate-version warnings.

Also fail-fast: false on the matrix. Without continue-on-error, the first
red step cancelled the others, so their results were lost.

Checked locally with node_modules as locked: "Builds are identical".
2026-10-08 09:07:34 +04:00
Kurdistan Tech Ministry 865bce54ae Make the PR checks able to fail, and fix what they had been hiding
pr-any.yml ran lint, test and build with continue-on-error: true, so every
PR showed success while main had 41 lint errors and 19 of 61 tests failing.
The flag is removed and the failures are fixed:

- TypeScript 5.5.4 -> 5.9. @pezkuwi/util and friends ship declarations
  with Uint8Array<ArrayBufferLike>, which 5.5 cannot read, so every such
  value was typed `any` here (the 16 wrapBytes errors). The pin dates from
  a styled-components declaration problem that went away with the move
  back to styled-components 5; build and lint pass on 5.9.
- State.ts: the stored security log is parsed through a function that
  returns an empty log for anything that is not a JSON array, instead of
  letting `any` flow on; fire-and-forget logging uses .catch(console.error)
  like the rest of the codebase; object keys sorted.
- buildHierarchy.spec.ts: a rename had replaced the genesis hashes with
  0x..01 / 0x..02, which resolve to no network name, so sorting by network
  had nothing to sort on. The test now takes two real entries from
  chains.ts by name.
- scripts/*.cjs is in the lint project (it failed to parse); header and
  key order fixed in postbuild-cleanup.cjs.
- temp_ff_validate/ (43 build files) and pezkuwi-chrome-0.62.22.zip were
  committed by accident in f5495f7; removed and ignored.

16 of the 19 failing tests are not fixed here: they fail because
@pezkuwi/wasm-crypto 7.5.18 stubs ed25519, secp256k1 and sr25519
derivation. With the 7.5.19 build from pezkuwi-wasm#2 installed locally,
lint is clean and all 61 tests pass. Until 7.5.19 is published and
picked up here, those 16 stay red on this PR, which is the point.
2026-10-08 09:07:34 +04:00
Kurdistan Tech Ministry 23bd90e7a3 Move vulnerable dependencies to patched versions
Clears the Dependabot alerts that can be fixed inside the ranges the
packages already declare, and drops one dependency nothing used.

- Transitive bumps within declared ranges: axios, bn.js, undici, tar,
  postcss, minimatch, picomatch, brace-expansion, fast-uri, js-yaml,
  lodash, ws, ip-address, node-forge, follow-redirects, form-data,
  http-proxy-middleware, launch-editor, nanoid, qs, rollup, shell-quote,
  websocket-driver, flatted, colord, json5, browserslist.
- styled-components 6.3.8 -> 6.5.3 (pulled by @pezkuwi/react-identicon and
  react-qr); 6.5 no longer pins postcss 8.4.49.
- Remove extract-loader from packages/extension: no webpack config or
  source references it, and it was the only path to babel 6,
  babel-traverse and browserslist 3.

What ships changes in two modules only. Built before and after, with
build paths normalised: content.js is byte-identical; page.js and
background.js differ in bn.js (5.2.2 -> 5.2.3); extension.js differs in
bn.js and axios (1.13.4 -> 1.20.0, reached only through
@zondax/ledger-substrate). Every other difference is the minifier
renaming identifiers. No @pezkuwi/* package, wasm-crypto or bip39 code
changes.

Left for a change in @pezkuwi/dev, where they come from: webpack-dev-server
4 and what it pulls (webpack-dev-middleware, qs 6.14, uuid 8, node-forge),
got 9 via gh-release, serialize-javascript 6 via terser-webpack-plugin,
minimatch 9.0.3 via @typescript-eslint 6. All build or local-dev tooling.
elliptic has no patched release; it arrives through crypto-browserify,
the webpack crypto fallback.

lint and test give the same result before and after this change; both
were already failing on main (41 lint errors, 19 of 61 tests), hidden by
continue-on-error in pr-any.yml.
2026-10-08 09:07:34 +04:00
GitHub Action c70305df54 [CI Skip] Bump version to 0.62.26 2026-06-15 01:43:39 +00:00
Satoshi Qazi Muhammed 482bb93147 docs: extension is live on the Chrome Web Store
Update Installation: link the published Chrome Web Store listing instead of
'coming soon'; note Firefox is build-from-source for now.
2026-06-14 18:43:29 -07:00
GitHub Action e2ba9d0da8 [CI Skip] Bump version to 0.62.25 2026-02-06 02:48:14 +00:00
Kurdistan Tech Ministry bf6df8fc94 ci: add automatic version bump and VPS1 deployment 2026-02-06 05:40:14 +03:00
Kurdistan Tech Ministry 7e0051455f security: add medium priority improvements
- Add IPFS/IPNS CID format validation (CIDv0, CIDv1, IPNS keys)
- Add authorization request rate limiting (5 seconds per origin)
- Add security event logging for audit trail
  - Logs: auth_granted, auth_denied, auth_cancelled
  - Logs: sign_approved, sign_rejected, rate_limit_hit
- Add getSecurityLogs() method for UI display
2026-02-06 05:28:14 +03:00
Kurdistan Tech Ministry 9377b4a549 security: fix postMessage wildcard and auth race condition
- Change postMessage targetOrigin from '*' to window.location.origin
- Add pendingAuthUrls Set to prevent authorization race conditions
- Remove from pending set on auth completion/rejection/deletion
2026-02-06 05:16:32 +03:00
Kurdistan Tech Ministry df7ad72047 fix: use JS mnemonic generation instead of broken wasm bip39 2026-02-02 20:45:54 +03:00
Kurdistan Tech Ministry f5495f7cac fix: ensure crypto initialized before handling messages
Fixed race condition where message handlers could process requests
before cryptoWaitReady() and keyring.loadAll() completed.

Now all message handlers wait for initialization before processing,
which fixes the seed creation failure on first account creation.
2026-02-02 19:34:50 +03:00
Kurdistan Tech Ministry 084187e67b fix(i18n): handle 'default' language by mapping to 'en'
The ui-settings LANGUAGE_DEFAULT is 'default' but no locale folder exists for it.
This caused i18n to fail loading translations, breaking the entire UI including
wallet creation screen (showed <unknown> instead of text).

Fix normalizes 'default' language to 'en' in the i18n Backend.
2026-02-02 19:11:43 +03:00
Kurdistan Tech Ministry 6e5ff295d9 fix: add AuthorizeCall user extension to signing registry
Added PEZKUWI_USER_EXTENSIONS with AuthorizeCall to the signing request
registry. This ensures proper transaction signing for PezkuwiChain
networks even when chain metadata is not available.

Without this fix, transactions fail with "bad signature" errors
because the AuthorizeCall extension is not properly included in
the signed payload.
2026-02-02 17:43:29 +03:00
Kurdistan Tech Ministry a0bd0e2b3f fix: correct Asset Hub, People Chain, Zagros genesis hashes
All genesis hashes now from live chains:
- PezkuwiChain: 0xbb4a61ab0c4b8c12f5eab71d0c86c482e03a275ecdafee678dea712474d33d75
- Asset Hub: 0x00d0e1d0581c3cd5c5768652d52f4520184018b44f56a2ae1e0dc9d65c00c948
- People Chain: 0x58269e9c184f721e0309332d90cafc410df1519a5dc27a5fd9b3bf5fd2d129f8
- Zagros Testnet: 0x96eb58af1bb7288115b5e4ff1590422533e749293f231974536dc6672417d06f
2026-02-02 03:00:47 +03:00
Kurdistan Tech Ministry 552d2bf3cf fix: update genesis hashes with correct mainnet values
- PezkuwiChain Mainnet: 0xbb4a61ab0c4b8c12f5eab71d0c86c482e03a275ecdafee678dea712474d33d75
- Updated chain names to match actual network names
2026-02-02 02:57:01 +03:00
Kurdistan Tech Ministry 6e0c7fb295 fix: wait for crypto init before responding awake
Fixes race condition where extension UI could send messages before
crypto/keyring was fully initialized, causing seed import to hang.
2026-02-02 02:40:25 +03:00
Kurdistan Tech Ministry 3176649a20 feat: update extension to v0.62.21 with AuthorizeCall support
- Add AuthorizeCall signed extension support for PezkuwiChain
- Update extension name to "pezkuwi{.js} extension"
- Update version to 0.62.21
- Fix signing for transactions that require custom signed extensions
2026-02-02 01:10:36 +03:00
Kurdistan Tech Ministry 672ec36f09 fix: update build scripts and bump @pezkuwi packages to latest
- Fix Chrome/Firefox zip build scripts to copy manifest to build folder
- Update all @pezkuwi packages to latest stable versions (API 16.5.36, Common 14.0.25)
2026-02-01 22:50:24 +03:00
Kurdistan Tech Ministry 8bd5d59356 fix: update @pezkuwi/api to 16.5.22 and common packages to 14.0.13 2026-01-31 18:21:10 +03:00
Kurdistan Tech Ministry 897e1d04b6 chore: Sync all package versions to 0.62.20 2026-01-19 23:04:39 +03:00
Kurdistan Tech Ministry ffbe372a06 feat: Add postbuild cleanup and web-ext lint validation
- Add scripts/postbuild-cleanup.cjs to remove unsafe Function patterns
- Add lint:extension script for web-ext validation
- Fix manifest_firefox.json strict_min_version to 112.0
- Reduces web-ext warnings from 14 to 10
2026-01-19 21:52:04 +03:00
Kurdistan Tech MinistryandClaude Opus 4.5 7b9ef31480 chore: Bump version to 0.62.20 and fix Firefox strict_min_version
- Update version to 0.62.20 in package.json and manifests
- Fix Firefox manifest strict_min_version from 142.0 to 109.0
- Update @pezkuwi/api packages to ^16.5.11
- Update @pezkuwi/dev to ^0.85.7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 21:24:06 +03:00
Kurdistan Tech Ministry ba72735459 fix(firefox): Change strict_min_version from 142.0 to 109.0
Firefox 142 does not exist yet (current stable ~134). This was causing
Mozilla to reject the extension. Firefox 109+ supports Manifest V3.
2026-01-19 21:04:26 +03:00
Kurdistan Tech Ministry 70613d26a8 Remove build artifacts and old zip files 2026-01-18 01:05:38 +03:00
Kurdistan Tech Ministry b2b0273758 Bump version to 0.62.20 with proper exports 2026-01-18 01:00:38 +03:00
Kurdistan Tech Ministry 1c630603cf Update yarn.lock and normalize package.json 2026-01-18 00:50:31 +03:00
Kurdistan Tech Ministry 5025a255f0 Add exports map to extension-inject for subpath imports 2026-01-17 23:13:21 +03:00
Kurdistan Tech MinistryandClaude Opus 4.5 0ebf885251 Fix extension-dapp package exports and dependency versions
- Add proper exports map for workspace linking
- Update extension-inject dependency to 0.62.19

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 21:42:15 +03:00
Kurdistan Tech Ministry 8cbd3702d5 Bump version to 0.62.19 2026-01-17 21:12:56 +03:00
Kurdistan Tech Ministry f123bbfacc Downgrade styled-components to v5 for TypeScript compatibility
- Downgrade styled-components from v6.1.1 to v5.3.11
- Add @types/styled-components for v5 type definitions
- Simplify styled.ts export (v5 uses default export)
- Remove tsconfig skipLibCheck workaround (not needed with v5)
- Add string-replace-loader dependency for webpack
- Update @pezkuwi/dev to 0.85.4 (includes rollup config export fix)

This fixes TS2742 declaration emit errors that prevented npm
package builds while allowing Chrome/Firefox extension bundles.
2026-01-17 21:08:55 +03:00
Kurdistan Tech Ministry ebe8d5c499 fix: add type exports to styled.ts for TypeScript declaration compatibility 2026-01-17 19:51:56 +03:00
Kurdistan Tech Ministry 0bd174ccd6 fix: add skipLibCheck for styled-components compatibility 2026-01-17 19:40:48 +03:00
Kurdistan Tech Ministry b85ad382b5 fix: remove incompatible declaration settings from extension-ui tsconfig 2026-01-17 19:30:13 +03:00
Kurdistan Tech Ministry bbfae9cca6 Pin TypeScript to 5.5.4 to fix styled-components declaration emission errors 2026-01-17 19:03:27 +03:00
Kurdistan Tech Ministry 1bd4157013 Revert "Add composite: false for extension-ui to fully disable declaration emission"
This reverts commit 20437c87cf.
2026-01-17 19:01:35 +03:00
Kurdistan Tech Ministry 20437c87cf Add composite: false for extension-ui to fully disable declaration emission 2026-01-17 18:59:20 +03:00
Kurdistan Tech Ministry dbb18e8621 Disable declaration emission for extension-ui (not npm-published package) 2026-01-17 18:55:13 +03:00
Kurdistan Tech Ministry f951677f96 Revert "Fix styled-components type errors by adding skipLibCheck"
This reverts commit 947c1cb449.
2026-01-17 18:45:11 +03:00
Kurdistan Tech Ministry 40ad9a4efb Revert "Disable declaration emission for extension-ui to fix styled-components TS errors"
This reverts commit 16d8c7a95b.
2026-01-17 18:44:56 +03:00
Kurdistan Tech Ministry 16d8c7a95b Disable declaration emission for extension-ui to fix styled-components TS errors 2026-01-17 18:43:35 +03:00
Kurdistan Tech Ministry 947c1cb449 Fix styled-components type errors by adding skipLibCheck 2026-01-17 18:38:04 +03:00
Kurdistan Tech Ministry cb95c15e63 Add yarn.lock for CI reproducible builds 2026-01-17 18:36:02 +03:00