# Creating the token mint

We're working on a permissionless tool to launch an LST. In the meantime, we help you launch your LST manually and will ask you to follow the instructions below.

We recommend using MacOS or Linux when following this guide.

## 1. Installing Solana Tools

***

Before starting, you need to follow [this guide](https://docs.solanalabs.com/cli/install) to install Solana Tools on our system, and [this one](https://spl.solana.com/token) to install the tooling for SPL tokens specifically. If you need assistance, feel free to [DM @alkineeeee on Telegram](https://t.me/alkineeeee).

## 2. Create folder

***

```bash
mkdir new_token
cd new_token
```

## 3. Prepare Off-chain Metadata and Token Logo

***

First, in order to serve the **off-chain metadata** and the **token logo** image, we need to decide where should these files be hosted.

Metaplex foundation has an excellent guide explaining some of the options for storage providers: <https://developers.metaplex.com/storage-providers>. The documentation is targeted towards NFT projects but it is still applicable to our situation.

{% hint style="info" %}
Although not ideal, a popular option is to use Github, it's less robust than Arweave or other decentralized options but more convenient if you're not so comfortable. You can submit a pull request [here](https://github.com/igneous-labs/lst-offchain-metadata).
{% endhint %}

Once you picked a storage provider, we can proceed to upload your token logo image file. For example, here is pwrSOL token logo hosted on Arweave: <https://arweave.net/vmJI1aPZNfTTIWH7ZLFxBP1VK7ptapg1hBukoDDNPME>

With the URL of your hosted token logo image, we can prepare a `json` file containing the off-chain metadata and upload it to your storage provider of choice, e.g.:

```json
// pwrSOL's off-chain metadata file hosted at https://2brtlweuaijbz7y4fyizzsqqotfak4tm6y6ct7wp772s4yflcmkq.arweave.net/0GM12JQCEhz_HC4RnMoQdMoFcmz2PCn-z__1LmCrExU
{
    "name": "Power Staked SOL",
    "symbol": "pwrSOL",
    "description": "MEV-Performance Optimized Liquid Staking Derivative from The Lode validator.",
    "image": "https://arweave.net/vmJI1aPZNfTTIWH7ZLFxBP1VK7ptapg1hBukoDDNPME"
}
```

With the off-chain metadata correctly pointing your token logo image hosted on a storage provider, we can now proceed to the on-chain portion of the setup process.

## 4. Setting Up Token Mint and On-chain Metadata Accounts

***

Here we will need to create another `json` file that will contain your token's **on-chain metadata.** The `uri` field should be set to the URL obtained from the last step (off-chain metadata), e.g.:

```json
// on-chain metadata: <MY-TOKEN-METADATA>.json
{
    "name": "Power Staked SOL",
    "symbol": "pwrSOL",
    "uri": "https://2brtlweuaijbz7y4fyizzsqqotfak4tm6y6ct7wp772s4yflcmkq.arweave.net/0GM12JQCEhz_HC4RnMoQdMoFcmz2PCn-z__1LmCrExU",
    "seller_fee_basis_points": 0,
    "creators": null
}
```

For creating a **token mint** account and an on-chain metadata account, we like to use the `metaboss` command line tool: <https://github.com/samuelvanderwaal/metaboss>&#x20;

### Grinding a vanity keypair (optional)

***

If you wish to use a vanity key for your token mint, please refer to this [guide from Solana](https://solana.com/developers/cookbook/wallets/generate-vanity-address\)).

Once you obtain a keypair, run `metaboss`:

```bash
# Create a token mint account and an on-chain metadata account
# using a keypair file for the mint pubkey
metaboss create fungible \
    --decimals 9 \
    --metadata MY_TOKEN_METADATA.json \
    --mint-path MY_VANITY_KEYPAIR.json
```

***

If you don't want to grind your own keypair, then simply run:

```bash
# Create a token mint account and an on-chain metadata account
metaboss create fungible \
    --decimals 9 \
    --metadata MY_TOKEN_METADATA.json
```

After a successful run, you should see the signature of the transaction as well as token mint address and on-chain metadata address e.g.:

```bash
Signature: 4weLm2Nxq24t4Mx78PYo9FGdrYsuFbVy3MMMMYgU5RzaGp8PwfBm5aKozvpeXoMPhqQb2eXdCRNDdGDdUfrzUteH
Mint: 6DUW9uU9uw69Gj1gF7Je5f2VxFAhodX5WbujeLkCqM4V
Metadata: 3Spyme9RpDxxMzh4oytgSG8qiTM6hX52xHwTnS1Y1ubG
```

## 5. Disable the freeze authority and temporarily transfer the mint authority to Sanctum

After your token mint account is setup, the freeze authority of the token should be disabled as follows:

```bash
spl-token authorize --disable YOUR_MINT_ADDRESS freeze
```

And temporarily transfer the mint authority to Sanctum:

```bash
spl-token authorize YOUR_MINT_ADDRESS mint GRwm4EXMyVwtftQeTft7DZT3HBRxx439PrKq4oM6BwoZ
```

`GRwm4EXMyVwtftQeTft7DZT3HBRxx439PrKq4oM6BwoZ` is the manager key controlled by Sanctum.

{% hint style="info" %}
To launch your stake pool, you'll need to temporarily transfer the mint authority of your LST to us. Once your stake pool is live, the mint authority will be transferred to your pool, ensuring that only your stake pool can mint new LSTs.
{% endhint %}

By using an explorer, make sure the following values are correctly set for your token mint account:

* **9 decimals**
* **0 initial supply**
* **no freeze authority**

And confirm the on-chain metadata is correctly loading, e.g.:

* bonkSOL: [BonK1YhkXEGLZzwtcvRTip3gAL9nCeQD7ppZBLXhtTs](https://explorer.solana.com/address/BonK1YhkXEGLZzwtcvRTip3gAL9nCeQD7ppZBLXhtTs/metadata)
* pwrSOL: [pWrSoLAhue6jUxUkbWgmEy5rD9VJzkFmvfTDV5KgNuu](https://explorer.solana.com/address/pWrSoLAhue6jUxUkbWgmEy5rD9VJzkFmvfTDV5KgNuu/metadata)


---

# 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://learn.sanctum.so/docs/creating-your-own-lst-with-sanctum/the-setup-process-launching-your-lst/creating-the-token-mint.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.
