Skip to content

fix(react): resolve native AuthScheme enum via getWasmOrThrow in initializeSignerAccount - #366

Open
huklaa wants to merge 1 commit into
0xMiden:mainfrom
huklaa:copilot/bug-fix-reproducible-issue
Open

fix(react): resolve native AuthScheme enum via getWasmOrThrow in initializeSignerAccount#366
huklaa wants to merge 1 commit into
0xMiden:mainfrom
huklaa:copilot/bug-fix-reproducible-issue

Conversation

@huklaa

@huklaa huklaa commented Sep 3, 2026

Copy link
Copy Markdown

Fixes #277.

initializeSignerAccount was reading the friendly string-valued AuthScheme export from @miden-sdk/miden-sdk and passing AuthScheme.AuthEcdsaK256Keccak to the raw wasm-bindgen auth-component constructor. That member does not exist on the friendly export, so the call received undefined.

This change resolves the native numeric enum via the public getWasmOrThrow() accessor and uses wasm.AuthScheme.AuthEcdsaK256Keccak instead.

Regression coverage updates the local mock to match the real public AuthScheme shape and verifies the auth component is built with the native enum. The full React SDK coverage suite passed in the agent sandbox (845/845 tests, coverage thresholds met), along with lint and Prettier checks. Typecheck only reported the same pre-existing unresolved @miden-sdk/miden-sdk package issue seen on main.

A final duplicate check found no competing open PR for #277 immediately before opening this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AuthScheme.AuthEcdsaK256Keccak is undefined in initializeSignerAccount, breaking external-signer account creation

2 participants