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

# removePasskey

> Remove a passkey from a managed Solana account's Swig.

Builds the `authority` of a `{ destination: { chain, authority } }`
transaction. The role carrying the key is removed. The root role never
is, and neither is the last role able to manage authorities; the
orchestrator refuses both.
Removing the configured owner's own key leaves this account unable to sign.

## Import

```ts theme={null}
import { removePasskey } from '@rhinestone/sdk/solana'
```

## Usage

```ts theme={null}
import { removePasskey, solanaDevnet } from '@rhinestone/sdk/solana'

const prepared = await account.prepareTransaction({
  destination: {
    chain: solanaDevnet,
    authority: removePasskey(oldPublicKey),
  },
})
```

## Parameters

**passkey** \`\`0x\$\{string}` | WebAuthnAccount` *required*

The passkey to remove: a viem WebAuthn account, or its P-256
public key in 64-byte x‖y, 65-byte uncompressed or 33-byte compressed form.

## Returns

A frozen `SolanaAuthorityChange` for `prepareTransaction`

**action** `'remove'` *required*

**key** `SolanaAuthorityKey` *required*

**permission** `undefined`

## See also

* [addPasskey](https://docs.rhinestone.dev/wallets/custom-signer/sdk-reference/solana/add-passkey.md)


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