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

# createSolanaSwigId

> Mints a fresh, random Swig id and the addresses it derives, for a Solana account that is not tied to a managed EVM account.

Persist `id` together with `swig`: configure the account with
`solana: { swig, owner }`, and pass the id to
`account.deploy('solana', solanaChain, { swigId: id })`
to create it. The id cannot be recovered from the addresses, so a lost id
leaves the Swig uncreatable; mint a new one instead.

## Import

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

## Usage

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

const { id, swig, wallet } = createSolanaSwigId()
// Save `id` and `swig`; fund `wallet` only after the Swig is created.
```

## Returns

The 32-byte Swig `id` as hex, the Swig state account `swig`, and
the asset-holding `wallet` that receives funds.

<ResponseField name="id" type="`0x${string}`" required />

<ResponseField name="swig" type="SolanaAddress" required />

<ResponseField name="wallet" type="SolanaAddress" required />


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