A wallet holds one secret: a recovery phrase, or a raw 32-byte seed for the dev accounts. The secret is encrypted with the wallet password (the keyring's scrypt + xsalsa20-poly1305 JSON encryption) under its own storage prefix, quantus:wallet. From it the wallet derives, for each account index: - an ML-DSA-65 and an ML-DSA-87 signing account, at the paths quantus-cli and the mobile wallet use. These are ordinary keyring pairs tagged with walletId and accountIndex, so signing, dapp injection and JSON export don't change. They're named "<wallet> (ML-DSA-65)" and so on, so a dapp's account list can tell them apart. - 20 receive and 20 change wormhole addresses (m/44'/189189189'/n'/b'/k'), derived by @quantus/crypto 0.2.0. Only addresses leave WASM. They're derived while the password is available, so a balance can later be shown without asking for it. New messages: pri(wallets.subscribe, preview, create, addAccount, rename, forget). - The same secret can't become two wallets, because forgetting one would take the other's pairs with it. - A raw seed has one account and no wormhole addresses: wormhole derivation starts from the 64-byte BIP39 seed. - Adding an account needs the password; a wrong one is refused before any pair is made. @quantus/crypto is resolved to 0.2.0 everywhere, so the common forks and the extension share one copy of the WASM instead of bundling two. The specs use independent vectors only: - the chain node's TEST_WORMHOLE_ADDRESS, also pinned by the mobile wallet's SDK; - quantus-cli's ML-DSA-65 and ML-DSA-87 accounts for its dev phrase; - crystal_alice for the zero seed. Part of quantus/extension#14. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
69 lines
4.1 KiB
JSON
69 lines
4.1 KiB
JSON
{
|
|
"author": "Jaco Greeff <jacogr@gmail.com>",
|
|
"bugs": "https://github.com/polkadot-js/extension/issues",
|
|
"engines": {
|
|
"node": ">=18.14"
|
|
},
|
|
"homepage": "https://github.com/polkadot-js/extension#readme",
|
|
"license": "Apache-2.0",
|
|
"packageManager": "yarn@4.9.2",
|
|
"private": true,
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/polkadot-js/extension.git"
|
|
},
|
|
"sideEffects": false,
|
|
"type": "module",
|
|
"version": "0.64.0",
|
|
"versions": {
|
|
"git": "0.63.2-1-x",
|
|
"npm": "0.63.1"
|
|
},
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"scripts": {
|
|
"build": "yarn build:chrome && yarn build:ff",
|
|
"build:before": "yarn build:i18n",
|
|
"build:chrome": "cp ./packages/extension/manifest_chrome.json ./packages/extension/manifest.json && polkadot-dev-build-ts && yarn build:zip:chrome && yarn build:rollup",
|
|
"build:ff": "cp ./packages/extension/manifest_firefox.json ./packages/extension/manifest.json && polkadot-dev-build-ts && yarn build:zip:ff && yarn build:rollup",
|
|
"build:i18n": "i18next-scanner --config i18next-scanner.config.cjs",
|
|
"build:release": "polkadot-ci-ghact-build",
|
|
"build:rollup": "polkadot-exec-rollup --config",
|
|
"build:zip": "yarn build:zip:chrome && yarn build:zip:ff",
|
|
"build:zip:chrome": "cp ./packages/extension/manifest_chrome.json ./packages/extension/manifest.json && yarn build:zip:dst:chrome && yarn build:zip:src:chrome",
|
|
"build:zip:dst:chrome": "rm -rf ./master-chrome-build.zip && cd packages/extension/build && zip -r -FS ../../../master-chrome-build.zip .",
|
|
"build:zip:dst:ff": "rm -rf ./master-ff-build.zip && cd packages/extension/build && zip -r -FS ../../../master-ff-build.zip .",
|
|
"build:zip:ff": "cp ./packages/extension/manifest_firefox.json ./packages/extension/manifest.json && yarn build:zip:dst:ff && yarn build:zip:src:ff",
|
|
"build:zip:src:chrome": "rm -rf ./master-chrome-src.zip && zip -r -x '*build/*' -x '*node_modules*' -FS ./master-chrome-src.zip packages .editorconfig eslint.config.js rollup.config.js CHANGELOG.md CONTRIBUTING.md i18next-scanner.config.cjs LICENSE package.json README.md tsconfig.json yarn.lock .yarnrc.yml tsconfig.base.json tsconfig.build.json tsconfig.eslint.json tsconfig.webpack.json",
|
|
"build:zip:src:ff": "rm -rf ./master-ff-src.zip && zip -r -x '*build/*' -x '*node_modules*' -FS ./master-ff-src.zip packages .editorconfig eslint.config.js rollup.config.js CHANGELOG.md CONTRIBUTING.md i18next-scanner.config.cjs LICENSE package.json README.md tsconfig.json yarn.lock .yarnrc.yml tsconfig.base.json tsconfig.build.json tsconfig.eslint.json tsconfig.webpack.json",
|
|
"clean": "polkadot-dev-clean-build",
|
|
"diff": "rm -rf ff-diff && sh ./scripts/diff.sh",
|
|
"lint": "polkadot-dev-run-lint",
|
|
"postinstall": "polkadot-dev-yarn-only",
|
|
"test": "EXTENSION_PREFIX='test' polkadot-dev-run-test --loader ./packages/extension-mocks/src/loader-empty.js --env browser ^:.spec.tsx",
|
|
"test:one": "EXTENSION_PREFIX='test' polkadot-dev-run-test --env browser",
|
|
"tier2": "polkadot-exec-webpack --config scripts/tier2/webpack.config.cjs"
|
|
},
|
|
"devDependencies": {
|
|
"@polkadot/dev": "^0.83.3",
|
|
"@types/node": "^20.10.5",
|
|
"i18next-scanner": "^4.4.0",
|
|
"sinon-chrome": "^3.0.1"
|
|
},
|
|
"resolutions": {
|
|
"@polkadot/api": "^16.5.6",
|
|
"@polkadot/keyring": "https://git.lair.cafe/api/packages/quantus/npm/%40polkadot%2Fkeyring/-/14.0.3-quantus.2/keyring-14.0.3-quantus.2.tgz",
|
|
"@polkadot/networks": "https://git.lair.cafe/api/packages/quantus/npm/%40polkadot%2Fnetworks/-/14.0.3-quantus.2/networks-14.0.3-quantus.2.tgz",
|
|
"@polkadot/rpc-provider": "^16.5.6",
|
|
"@polkadot/types": "^16.5.6",
|
|
"@polkadot/ui-keyring": "https://git.lair.cafe/api/packages/quantus/npm/%40polkadot%2Fui-keyring/-/3.16.7-quantus.2/ui-keyring-3.16.7-quantus.2.tgz",
|
|
"@polkadot/util": "^14.0.3",
|
|
"@polkadot/util-crypto": "https://git.lair.cafe/api/packages/quantus/npm/%40polkadot%2Futil-crypto/-/14.0.3-quantus.2/util-crypto-14.0.3-quantus.2.tgz",
|
|
"@polkadot/x-fetch": "^14.0.3",
|
|
"safe-buffer": "^5.2.1",
|
|
"typescript": "^5.5.4",
|
|
"@quantus/crypto": "^0.2.0"
|
|
}
|
|
}
|