+ Waiting for the Nimiq provider to initialize... +
+Status: {{ status }}
@@ -213,7 +266,7 @@ async function runEthereumFlow() { ``` -### 5.3 Add the style block (mobile-friendly) +### 6.3 Add the style block (mobile-friendly) ```vue ``` -## 6. Run the mini app +## 7. Run the mini app ```bash npm run dev -- --host @@ -290,7 +343,7 @@ Copy the **Network** URL from the terminal output, for example: http://192.168.1.42:5173 ``` -## 7. Test inside Nimiq Pay +## 8. Test inside Nimiq Pay 1. Make sure your phone and dev machine are on the same Wi‑Fi network. 2. Open **Nimiq Pay**. @@ -304,7 +357,7 @@ You should see: - Nimiq accounts and a Nimiq signature response. - Ethereum account(s) and an Ethereum signature response. -## 8. Troubleshooting +## 9. Troubleshooting **No Ethereum account returned**\ The Ethereum success path requires at least one account available through Nimiq Pay. diff --git a/mini-apps/mini-app-tutorial.md b/mini-apps/mini-app-tutorial.md index 0cc3c019..d53ed29e 100644 --- a/mini-apps/mini-app-tutorial.md +++ b/mini-apps/mini-app-tutorial.md @@ -10,7 +10,7 @@ > - On iOS, share the email associated with your Apple account. Install TestFlight, and the Nimiq Pay test build will appear there once your account is allowlisted. > - On Android, share the email associated with your Google account. You will receive an email when access is enabled. -In this tutorial, you’ll build a minimal mini app that runs inside Nimiq Pay and calls three Nimiq provider methods: +In this tutorial, you'll build a minimal mini app that runs inside Nimiq Pay and calls three Nimiq provider methods: | Method | Description | | --- | --- | @@ -44,7 +44,15 @@ npm install ::: -## 2. Configure the dev server +## 2. Install the Nimiq Mini App SDK + +Install the Nimiq Mini App SDK. For package details, see [`@nimiq/mini-app-sdk`](https://www.npmjs.com/package/@nimiq/mini-app-sdk). + +```bash +npm install @nimiq/mini-app-sdk +``` + +## 3. Configure the dev server Enable network access so Nimiq Pay on your device can reach the app: @@ -91,7 +99,7 @@ export default defineConfig({ ::: -## 3. Add mini app logic and UI +## 4. Add mini app logic and UI Replace the main app component with the variant for your framework: @@ -99,57 +107,61 @@ Replace the main app component with the variant for your framework: ```vue [Vue + Vite (src/App.vue)]