> ## Documentation Index
> Fetch the complete documentation index at: https://docs.microset.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Wallet Interactions

> Every signature and authorization Microset requests from a connected Solana wallet.

<Info>
  This page enumerates all wallet interactions. Microset is Solana-only, so the
  relevant concepts are message signing, transaction signing, and SOL movement —
  not EVM token approvals.
</Info>

## Permissions requested

| Interaction                                              | Requested? | Notes                                                                                                    |
| -------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------- |
| Connect wallet (read public key)                         | ✅ Yes      | Via Privy, Solana-only; external wallets                                                                 |
| Sign-in message (`signMessage`)                          | ✅ Yes      | Human-readable, prefixed `Microsets:wallet-auth:`; off-chain; authorizes a backend JWT only              |
| Sign transaction (`signTransaction` / `sendTransaction`) | ✅ Yes      | Only on explicit user action (place a prediction, claim, manage quick-prediction session)                |
| Embedded wallet creation                                 | ❌ No       | Disabled (`createOnLogin: 'off'`)                                                                        |
| Privy auto-approve / blind signing                       | ❌ No       | Not used. Repeated predictions use an explicit, user-funded quick-prediction session instead (see below) |

## Signature types

<AccordionGroup>
  <Accordion title="Message signing (off-chain)">
    Used once per connected wallet for authentication. The signed payload begins
    with `Microsets:wallet-auth:` and is verified server-side to issue a JWT. It
    grants no on-chain authority and moves no funds.
  </Accordion>

  <Accordion title="Transaction signing (on-chain)">
    Used for `place_bet`, `claim`, and quick-prediction session management. Each is a
    standard Solana transaction the user reviews in their wallet.
  </Accordion>

  <Accordion title="Quick-prediction delegate session">
    Optional. The user signs once to create an on-chain delegate session
    (`create_delegate_session`), funding an escrow with a **spend cap**
    (`max_lamports`) and an expiry (`expires_at`). A local delegate key then signs
    quick bets (`place_bet_with_delegate`) drawn only from that capped escrow. The
    user can add funds (`fund_delegate_session`), withdraw unused funds
    (`withdraw_delegate_funds`), or revoke the session at any time
    (`revoke_delegate_session`). The delegate cannot spend beyond the cap and
    cannot touch the user's main wallet balance.
  </Accordion>
</AccordionGroup>

## Token authorization behavior

<Note>
  Solana does not use ERC20 `approve` / `setApprovalForAll` / Permit2. Stakes are
  native SOL, moved by the program's instructions only when the user signs the
  corresponding transaction. No broad token-delegate authority is granted.
</Note>

| Mechanism                                  | Used?      | Notes                                                                                            |
| ------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------ |
| SPL `Approve` (token delegate)             | ❌ No       | Microset stakes are native SOL; no SPL token delegate is granted                                 |
| Direct transfer via signed instruction     | ✅ Yes      | SOL moves into the market vault on `place_bet`, and out on `claim`, only via signed instructions |
| Quick-prediction escrow (delegate session) | ✅ Optional | A user-funded, capped, revocable on-chain escrow — see above                                     |

## Program mechanics (Solana equivalents)

| Mechanic               | Status      | Notes                                                                                                          |
| ---------------------- | ----------- | -------------------------------------------------------------------------------------------------------------- |
| Proxy / `delegatecall` | ❌ N/A       | Not a Solana concept                                                                                           |
| Program upgradeability | Upgradeable | Upgrade authority is a single key held by Microset. See [Contracts](/security/contracts).                      |
| PDAs holding funds     | ✅ Yes       | A program-owned vault PDA holds each market's staked SOL; payouts are signed by the program per on-chain rules |

## Summary

Microset requests a wallet connection, one human-readable sign-in message, and
explicit transaction signatures for each prediction or claim. Stakes are native SOL that
move only through documented instructions, the optional quick-prediction delegate is
bounded by a user-set cap and is revocable, and no SPL token delegate is granted.
