4NK_wallet/docs/INTEGRATION.md
Your Name a189470d49
Some checks failed
CI - 4NK Node / Integration Tests (push) Failing after 9s
CI - 4NK Node / Docker Build & Test (push) Failing after 8s
CI - 4NK Node / Documentation Tests (push) Failing after 3s
CI - 4NK Node / Release Guard (push) Has been skipped
CI - 4NK Node / Performance Tests (push) Failing after 29s
CI - 4NK Node / Code Quality (push) Failing after 32s
CI - 4NK Node / Unit Tests (push) Failing after 30s
CI - 4NK Node / Security Tests (push) Failing after 28s
CI - 4NK Node / Notify (push) Failing after 1s
chore(template-sync): aligner avec 4NK_template (.cursor/.gitea/.gitea_template/scripts/ignores)
2025-08-27 11:37:12 +02:00

804 B
Raw Blame History

Intégration WebView ↔ ihm_client

Principes

  • ihm_client parle via window.postMessage (cf. ihm_client/docs/INTEGRATION_IFRAME.md)
  • En mobile, on charge ihm_client dans une WebView
  • On redirige window.postMessage vers ReactNativeWebView.postMessage
  • Canal entrant: RN appelle window.__RN_RECEIVE__(jsonString) pour simuler un MessageEvent

Messages pris en charge (extraits)

  • REQUEST_LINK → LINK_ACCEPTED|ERROR
  • VALIDATE_TOKEN → VALIDATE_TOKEN
  • RENEW_TOKEN → RENEW_TOKEN

Mapping côté RN

  • Sortant: RN → __RN_RECEIVE__(jsonString) (déclenche un message côté page)
  • Entrant: page → postMessage(any) redirigé vers RN onMessage

Sécurité

  • ihm_client valide lorigine et les tokens
  • RN ne manipule pas directement les tokens côté page