0xMiden / 0xMiden/feedback

External dApp cannot connect to Miden Wallet extension — no public API documented

Aberta
#148 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Sem dados de linguagem
Estrelas
1
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## External dApp cannot connect to Miden Wallet extension — no public API documented

**Context**
I am building a game dApp on Miden testnet called MidenGrid — a privacy-first game that uses Miden's client-side ZK proving and private notes as core mechanics. While integrating wallet connection, I discovered there is no working public API for external dApps to connect to the Miden Chrome wallet extension.

**What I tried**

1. `@miden-sdk/miden-wallet-adapter` — errors out with a `publicKey vs accountId` mismatch (see issue #9 in that repo)
2. Calling `window.midenWallet.connect()` directly — throws `Cannot read properties of undefined (reading 'rpcBaseURL')`
3. Inspecting `window.midenWallet` in the console:

```js
Object.keys(window.midenWallet)
// ['_events', '_eventsCount', 'address', 'publicKey', 'permission', 'appName', 'network', 'clearAccountChangeInterval']

JSON.stringify({ address: window.midenWallet.address, publicKey: window.midenWallet.publicKey, permission: window.midenWallet.permission })
// '{}'

window.midenWallet.permission
// undefined

window.midenWallet._events
// Events {} — no properties
```

The extension is injected on the page but all fields are empty and there is no active event system or permission flow. The wallet appears to be in a dormant state with no documented way to wake it up from an external dApp.

**What I need**

Clear documentation or a working example showing how an external dApp (not the official playground) should:
1. Request connection / permission from the wallet extension
2. Read the user's account address after approval
3. Read the user's MDN balance
4. Submit a transaction request and have the wallet sign it

The playground at `playground.miden.xyz` does this successfully — but it appears to use an internal integration not available to external developers.

**Why this matters**

Miden's privacy and ZK proving features are genuinely powerful and unique. There are developers who want to build real dApps on this chain. Without a working wallet connection API, the ecosystem cannot grow beyond the official playground. I am happy to test any proposed solution and contribute documentation once it works.

**Environment**
- Chrome with Miden Wallet extension installed
- Miden testnet
- React + Vite app running on localhost:5173
- Extension successfully injected (`Adding midenWallet to window` confirmed in console)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Examine the Miden Wallet extension's source to understand its injected API (`window.midenWallet`). Look at how the official playground at playground.miden.xyz initiates connection and reads account data. Document the correct methods for requesting permission, fetching address/balance, and transaction signing. Test the documented API with a simple external dApp.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript, nodejs, react, typescript
Domínio
api, backend-api-design, documentation
Tipo de issue
Documentação
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.