# fromKeypair (Solana)

> Overview of the fromKeypair function

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function fromKeypair(signer): SolanaSigner;
```

Defined in: [packages/wallet-apis/src/adapters/fromKeypair.ts:25](https://github.com/alchemyplatform/aa-sdk/blob/main/packages/wallet-apis/src/adapters/fromKeypair.ts#L25)

Adapts a raw Ed25519 keypair signer into a [SolanaSigner](../../interfaces/SolanaSigner).

Use this for legacy `@solana/web3.js` v1 `Keypair` signers or any signer
that exposes a `signMessage(bytes) => signature` interface. For
`@solana/kit` signers, use [fromKitSigner](fromKitSigner). For browser wallets
(wallet adapter, Phantom, etc.), use [fromWalletAdapter](fromWalletAdapter). For
wallet-standard wallets, use [fromWalletStandard](fromWalletStandard).

Requires `@solana/kit` or `@solana/web3.js` as a peer dependency.

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `signer`
      </td>

      <td>
        [`SolanaKeypairSigner`](../interfaces/SolanaKeypairSigner)
      </td>

      <td>
        The raw Ed25519 keypair signer to adapt
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`SolanaSigner`](../../interfaces/SolanaSigner)

A SolanaSigner compatible with `createSmartWalletClient`