> 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/deposit-flows.md).

# Deposit Flows (Unifold)

The built-in MOSS deposit flow is the recommended funding path for partner apps: one SDK call, consistent UX inside the wallet surface, no custom funding UI to maintain. Users can also pay gas with ETH or enabled stablecoins (currently USDm and USDT0), so there's no required ETH balance to onboard.

## Minimal Implementation

Ensure the wallet is connected, then call `mega.deposit()` to open the built-in funding UI.

```typescript
import { mega } from '@megaeth-labs/wallet-sdk';

await mega.initialise({ network: 'mainnet' });

const state = await mega.status();
if (state.status !== 'connected') {
  await mega.connect();
}

await mega.deposit();
```

## React Implementation

```tsx
import { useDeposit } from '@megaeth-labs/wallet-sdk-react';

export function DepositButton() {
  const { mutate: deposit, isPending } = useDeposit();

  return (
    <button onClick={() => deposit()} disabled={isPending}>
      {isPending ? 'Opening...' : 'Add funds'}
    </button>
  );
}
```

## When to Bring Your Own Flow

Only choose a custom funding flow if you have strict product or compliance requirements that can't be met by the built-in deposit UI. Account for the extra cost: wallet context handoff, error states, retries, and long-term UX maintenance.

## Related

* [Quickstart](/moss-docs/wallet/quickstart.md) — fit `mega.deposit()` into your first integration.
* [`mega.deposit()`](/moss-docs/methods/methods/deposit.md) — exact method signature and behavior.
* [Paymaster Guide](/moss-docs/wallet/paymaster-setup.md) — configure sponsor mode and sponsorship policy alongside deposits.


---

# 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/deposit-flows.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.
