# Integration with Solana

### **TurnkeySigner for Solana Transactions**

TurnkeySigner extends `ISolanaSigner` with a **Turnkey-specific address**, ensuring that transaction signing is **linked securely** to Turnkey's infrastructure.

```typescript
export type TurnkeySigner = ISolanaSigner & {
    turnkeyAddress: string;
};
```

* The `turnkeyAddress` uniquely identifies a signer as a **Turnkey-managed wallet**.

**Wallet Recognition (solana-provider.ts)**

The Solana provider checks if a connected wallet is a **TurnkeySigner** via `isExternalSolanaSigner()`:

```typescript
isExternalSolanaSigner(): boolean {
    return !(this.solanaWallet as TurnkeySigner).turnkeyAddress;
}
```

* If `turnkeyAddress` is **missing**, the wallet is treated as **an external signer** (not managed by Turnkey).

### **Transaction Signing with TurnkeySigner**

* The provider retrieves the signer using `getSigner()`.
* If the signer is **Turnkey-integrated**, the signing process is secured by **Dynamic’s passkey-based authentication** and **AWS Nitro Enclaves** before executing `signTransaction` or `signAllTransactions`.


---

# Agent Instructions: 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.defi.app/knowledge-base/wallets/private-key-management/integration-with-solana.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.
