> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/moss-docs/wallet/index.md).

# Overview

MOSS embeds a wallet UI in a hosted iframe (`https://account.megaeth.com`) and exposes wallet actions to your app over a Penpal message bridge. Your app controls when to initialise, when to prompt the user, and how wallet state drives product UX. Private keys never touch your app code.

Two integration paths share one runtime:

* [**Core SDK**](/moss-docs/core-sdk/installation.md) (`@megaeth-labs/wallet-sdk`) — framework-agnostic, minimal dependency surface. Use for vanilla TS, Vue, Svelte, custom shells.
* [**React SDK**](/moss-docs/react-sdk/overview.md) (`@megaeth-labs/wallet-sdk-react`) — provider + hooks built on TanStack Query semantics. Use for React 19 products.

For React apps already on wagmi, the [**Wagmi Connector**](/moss-docs/react-sdk/wagmi-connector.md) drops MOSS in as a wagmi connector instead.

## Architecture

1. App calls `mega.initialise(config)`.
2. SDK creates a hidden iframe pointed at the wallet host (production: `https://account.megaeth.com`; dev: local host).
3. Penpal establishes a parent/iframe bridge scoped to the expected origin.
4. Wallet iframe signals ready after status check.
5. App calls `connect`, `signMessage`, `transfer`, `callContract`, etc.

Network enum is currently `'mainnet' | 'testnet'`. Sponsorship config (`sponsorUrl`, mode, fee token) passes during initialisation — see [Paymaster Guide](/moss-docs/wallet/paymaster-setup.md).

## What MOSS is — and is Not

| Model                      | MOSS today                                                                            |
| -------------------------- | ------------------------------------------------------------------------------------- |
| Embedded wallet SDK        | Yes — the primary integration model.                                                  |
| Injected browser wallet    | No — MOSS is SDK-first, not extension-first.                                          |
| WalletConnect wallet       | Planned (roadmap).                                                                    |
| Session-key smart accounts | Yes — Smart Approvals (Policy Engine) powers app permissions and delegated execution. |

## Where to Go Next

* New to MOSS: [**Quickstart**](/moss-docs/wallet/quickstart.md) — install, initialise, first transaction.
* Backend integration: [**Server Verify**](/moss-docs/wallet/server-verify.md) for SIWE validation, [**MOSS Authentication**](/moss-docs/wallet/authentication.md) for JWT-based auth without direct SIWE prompts.
* Funding UX: [**Deposit Flows (Unifold)**](/moss-docs/wallet/deposit-flows.md) — built-in deposit flow is the recommended path.
* Permissions: [**Smart Approvals**](/moss-docs/core-sdk/permissions.md) — session grants and delegated execution.
* Sponsorship: [**Paymaster Setup**](/moss-docs/wallet/paymaster-setup.md) — sponsor URL, mode, fee token.
* Reference: [**Methods Reference**](/moss-docs/methods/methods.md) for the full method/type contract; [**Examples**](/moss-docs/wallet/examples.md) for runnable code.
* Going to production: [**Integration Checklist**](/moss-docs/wallet/integration-checklist.md) then [**Best Practices**](/moss-docs/wallet/best-practices.md).
* AI agents: [**Agent Skills Pack**](/moss-docs/wallet/agent-skills.md) for sharable agent skills; [**AI Agent Guide**](/moss-docs/wallet/ai-agent-guide.md) for policy patterns.

Published packages: [wallet-sdk on npm](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk) · [wallet-sdk-react on npm](https://www.npmjs.com/package/@megaeth-labs/wallet-sdk-react).

## Roadmap

These are direction signals, not shipped behavior:

| Area                          | Planned                                                   |
| ----------------------------- | --------------------------------------------------------- |
| Social login onboarding       | Google, Apple, email-based flows aligned to MOSS auth UX. |
| WalletConnect v2              | Session management for WalletConnect-compatible dapps.    |
| EIP-6963 / EIP-1193 discovery | Compatibility layer for broader wallet discoverability.   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.megaeth.com/moss-docs/wallet/index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
