Basic browser and framework agnostic UI components for creating apps using the polkadot{.js} libraries
The following UI components are currently available -
Additionally some shared libraries, that are not dependent on any framework -
12 activities
160d97c build: declare @quantus/crypto as a ui-keyring dev dependencyc7c23b7 feat!: ui-keyring holds post-quantum keys only160d97c build: declare @quantus/crypto as a ui-keyring dev dependencyVerified against main (2d6a9ad1), closing.
ec1399f3. restoreAccount passes the stored account id rather than inventing a public key, the same approach as common's createFromJson. An extension-exported ML-DSA JSON restores to the same address and can sign (Keyring.dilithium.spec.ts).dilithiumJson.spec.ts, since restoreAccount unlocks immediately.2d6a9ad build: consume the forks at 14.0.3-quantus.218105d3 build: pin the forked packages at 14.0.3-quantus.1f2a1ab3 build: consume the forked @polkadot packages from the registry, drop the scaffoldingec1399f fix(ui-keyring): restoreAccount cannot rebuild an ML-DSA public key from an address2d6a9ad build: consume the forks at 14.0.3-quantus.218105d3 build: pin the forked packages at 14.0.3-quantus.1f2a1ab3 build: consume the forked @polkadot packages from the registry, drop the scaffoldingDone, on quantus-restore-account (ec1399f3). 5 specs; 46 tests pass repo-wide, build clean.
Exactly as this issue framed it — solved in quantus/common#3 first, then mirrored. restoreAccount now passes an accountId rather than a public key it cannot have:
const info = isDilithium(cryptoType)
? { accountId: raw, publicKey: new Uint8Array(), secretKey: new Uint8Array() }
: { publicKey: raw };
createPair uses it for the address while locked and clears it once decodePkcs8 supplies the real key — checking the two agree on the way. That check earns its place here for the same reason as in the keyring: the address sits outside the encrypted blob, so a tampered one decodes cleanly and yields an account displaying an address its key cannot sign for. Pinned by a test.
The 'ed25519' fallback for version-0 JSON is left as-is and commented. Those files predate the crypto type being recorded and are by definition not Quantus, so the guess is safe — but quantus/common#6 removes ed25519 from KeypairType, at which point it has to become a refusal.
Getting this repo to see the forked common took four separate fixes, each for the same underlying cause: node resolves a portal/link symlink to its realpath, after which @polkadot/util-crypto resolves inside common's tree — where it is the workspace source directory, with no exports map.
resolutions pointing the four @polkadot packages at common's build outputtsconfig.base.json path mappings, with the *.d.ts substitution first, because NodeNext will not infer an extension for a bare path and looks for a types directory instead of types.d.tstsconfig.json overriding those with the runtime .js view, because @polkadot/dev-ts reads that file and would otherwise import a declaration file as a module — "Debug Failure. Output generation failed"--preserve-symlinks in the test script, which yarn itself warns is required for portalsAll four are dev-time scaffolding for a problem that does not exist once these packages come from a registry. This is the third repo to hit it (common → @quantus/crypto, now ui → common), and the extension will be the fourth with more dependencies than any of them.
quantus/extension#2 is now the blocking item, not a tidy-up. Publishing to the Gitea npm registry needs a token, which I cannot create — so it needs a hand. Until then every downstream repo pays this tax again.
One incidental result worth recording: yarn lint errors dropped from 25 to 8. The tsconfig mappings resolved types that were previously any, removing a pile of no-unsafe-assignment. The remaining 8 are upstream's own, in loadContract and allowGenesis, and are left alone per the rebasability convention — note that yarn lint therefore still exits non-zero on this repo, as it does on pristine upstream.
ec1399f fix(ui-keyring): restoreAccount cannot rebuild an ML-DSA public key from an address