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

# Ed25519

> Authorize wallet operations with a Solana keypair or wallet adapter.

## Introduction

An Ed25519 authority uses a Solana signer to approve wallet operations.

* **Use when:** your user already has a Solana wallet or your service owns an Ed25519 keypair.
* **For:** wallet-adapter integrations and applications using local Solana signers.

## How it works

1. Register the signer public key when creating a wallet or adding a role.
2. Fetch the wallet and select that signer's intended role ID.
3. Prepare the wallet operation with the SDK.
4. Have the authority and payer sign the same Solana transaction, then submit it.

## SDK example

Construct an authority from the public key and pass it to [Create a wallet](https://build.onswig.com/solana/create-wallet.md) or [Add a role](https://build.onswig.com/solana/add-role.md).

```typescript theme={null}
import { type PublicKey } from "@solana/web3.js";
import { createEd25519AuthorityInfo } from "@swig-wallet/classic";

function ed25519Authority(signerPublicKey: PublicKey) {
  return createEd25519AuthorityInfo(signerPublicKey);
}
```

* The authority contains the public key; the private key stays with the signer.
* Find existing roles with `swig.findRolesByEd25519SignerPk(publicKey)`.
* Follow [Signing](https://build.onswig.com/solana/transactions/signing.md#ed25519-signer) for a complete transfer preparation example.
* Use a [session](https://build.onswig.com/solana/authorities/sessions.md) when an application needs temporary signing access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.