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

# Para Tutorial

> Use a Para EVM wallet to authorize Glider B2B API enrollment.

The Para Viem integration can sign the raw EIP-191 payload. Glider returns
this payload during the default EVM enrollment flow.

## Create the Para wallet client

```javascript theme={null}
import {
  createParaViemAccount,
  createParaViemClient,
} from "@getpara/viem";
import { http } from "viem";
import { mainnet } from "viem/chains";

const account = createParaViemAccount(paraClient);
const walletClient = createParaViemClient(paraClient, {
  account,
  chain: mainnet,
  transport: http(RPC_URL),
});
```

Use the integration package for your installed Para SDK.

## Prepare and sign enrollment

Call stage one from your backend:

```javascript theme={null}
const ownerAccountId = `eip155:0:${ownerAddress.toLowerCase()}`;
const chainIds = [1];

const response = await fetch(
  "https://api.glider.fi/v2/enroll/signature",
  {
    method: "POST",
    headers: {
      "content-type": "application/json",
      "x-api-key": process.env.GLIDER_API_KEY,
    },
    body: JSON.stringify({
      ownerAccountId,
      strategyId,
      chainIds,
      accountType: "ECDSA",
    }),
  },
);

const { data: prepared } = await response.json();
```

Sign the exact raw payload:

```javascript theme={null}
const signature = await walletClient.signMessage({
  account,
  message: { raw: prepared.message.raw },
});
```

## Complete enrollment

```javascript theme={null}
const response = await fetch("https://api.glider.fi/v2/enroll", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    "x-api-key": process.env.GLIDER_API_KEY,
  },
  body: JSON.stringify({
    ownerAccountId,
    strategyId,
    chainIds,
    accountType: prepared.accountType,
    accountIndex: prepared.accountIndex,
    agentAccountId: prepared.agentAccountId,
    flowId: prepared.flowId,
    signature,
    portfolioName,
  }),
});

const { data: portfolio } = await response.json();
```

Use the Para wallet client to fund the applicable smart account. The B2B API
does not have a deposit-builder route. See
[Fund a portfolio](/guides/portfolio-deposit).

<Warning>
  Do not send the Glider API key to the Para client. Send only the signable
  payload to the client. The client can also receive onchain transactions that
  the user must review.
</Warning>
