> ## 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

<ParamField path="passkey" type="`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.
</ParamField>

## Returns

A frozen `SolanaAuthorityChange` for `prepareTransaction`

<ResponseField name="action" type="'remove'" required />

<ResponseField name="key" type="SolanaAuthorityKey" required />

<ResponseField name="permission" type="undefined" />

## See also

* [addPasskey](/wallets/custom-signer/sdk-reference/solana/add-passkey)


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