## The check that fired before code that would have worked
`getSignerType` pulls the extrinsic's `Address` and `Signature` types **out of
the metadata** — the runtime-as-oracle approach, and better than polkadot-js,
which hardcodes `ExtrinsicSignature: 'MultiSignature'` in a type definition file.
Then it threw the answer away:
if (signature.type !== "enum" || ["Ecdsa", "Ed25519", "Sr25519"].some(...))
throw unkownSignerType();
Quantus's `DilithiumSignatureScheme` carries `Dilithium87` and `Dilithium65`, so
this raised `Unkown signer` and nothing downstream ever ran. Asking the runtime
and then not believing it is the trap this whole port exists to avoid.
Everything past that point was already correct: `createV4Tx` concatenates and
compact-prefixes and never asserts a signature size, and the address prefix is
the `MultiAddress::Id` variant index read from metadata. The name whitelist only
separated the Substrate shape from the Ethereum one, and the Ethereum arm one
line above already decides that structurally. So the patch drops the names and
keeps `signature.type !== "enum"`.
pnpm `patchedDependencies`, keyed on the package name rather than a version, so
it reaches all fifteen resolved copies in the tree — the nested ones under
pjs-signer, ledger-signer, raw-tx-creator and polkadot-api itself are what
actually run.
## Evidence
Byte-for-byte against the quantus/extension#7 tier-1 harness, same call, same
nonce, same signature:
papi assembled 7300 bytes
IDENTICAL to the tier-1 harness
That is the corroboration this repo exists for. polkadot-api shares no code with
the five polkadot-js forks, so until now our stack had only agreed with itself.
Also verified the patch is load-bearing and narrow:
- the unpatched copy still in the store raises `Unkown signer` on the same
inputs, so the check really was the blocker
- Polkadot metadata still takes the Substrate path, and still gets its `01`
variant byte prepended when a caller names a signing type
## Networks
Quantus, Heisenberg and Planck, with the endpoints verified reachable on
2026-09-15, and Quantus as the default. The Substrate networks stay: a signature
that works on both is the only evidence that the patch widened a check rather
than broke one.
Refs #1, #3. Closes quantus/extension#7's cross-tier comparison.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f