Skip to main content

What are Phantom Shortcuts and How to Access Them For Your NFT Collection?

Created on
Updated on
Aug 13, 2024

6 min read

Overview

Phantom, a leading Solana wallet, recently released a new feature that makes it easier for NFT Collection managers to connect with their users. Phantom Shortcuts are the "Linktree of NFTs": a one-click menu with all relevant links and actions you can take with an NFT.

This guide will walk through the features available in Phantom Shortcuts and how to set them up for your NFT Collection.

What You Will Do

In this guide, you will explore creating Phantom Shortcuts for your NFT collection:

  • Learn about Phantom Shortcuts
  • Explore an Example NFT using Phantom Shortcuts
  • Discover how to create Shortcuts
  • Walk through the enrollment process

What You Will Need

  • A Phantom wallet
  • A modern web browser (e.g., Chrome, Firefox, Brave, etc.)

Let's get started!

What is a Phantom Shortcut?

Phantom Shortcuts is a new feature that makes it easier for NFT Collection managers to connect with their token holders. By providing a one-click menu with all relevant links and actions you can take with an NFT, Phantom Shortcuts make it easier for users to interact with your NFT Collection and participate in collection activities.

Shortcuts are a great way to connect users to key NFT functionality and community resources:


  • Staking
  • Minting
  • Chat
  • DAO Votes
  • Games
  • Creator/Developer Tips
  • Social Media Accounts

Here's an example implementation for Famous Fox Federation:

Famous Fox Federation Phantom ShortcutsFamous Fox Federation Phantom Shortcuts

As you can see in the example above, the NFT, the Famous Fox Federation, is using Shortcuts to make it easier for its holders to stake NFTs, participate in missions, and engage with the community on Discord. Pretty cool, right?

Let's look at how to create a Phantom Shortcut for your NFT Collection.

How to Create a Phantom Shortcut

The full spec and latest standard for Phantom Shortcuts can be found on their GitHub, but we will walk through the basics here.

Shortcuts are .json files maintained by the NFT Collection and overseen by Phantom. Phantom expects to find the Shortcut file, shortcuts.json at the NFT's <external_url>/shortcuts.json(the external_url is an element of the Metaplex NFT Standard). For example, given this Famous Fox Federation's metadata:

  // ... Partial Metadata from a Famous Fox NFT
"collection": {
"family": "Famous Fox Federation",
"name": "Famous Fox Federation"
},
"description": "The Famous Fox Federation, an independent organization of the most fabulously famous foxes on the Blockchain.",
"external_url": "https://famousfoxes.com",
// ...

Phantom would expect to find the shortcut file at https://famousfoxes.com/shortcuts.json.

Shortcuts Schema

The basic schema for shortcuts.json is a version number (of the schema) and an array of shortcuts:

{
"version": 1,
"shortcuts": []
}

Each shortcut would have the following fields:

FieldTypeDescription
labelstringThe suggested text to display on the link
uristringURI pointing to the destination of the shortcut
iconstring(Optional) The suggested icon to display on the link. The following options are available: vote, vote-2, stake, stake-2, view, chat, tip, mint, mint-2, discord, twitter, x, instagram, telegram, leaderboard, gaming, gaming-2, generic-link, generic-add
prefersExternalTargetboolean(Optional) Whether the shortcut prefers to be opened outside the client (e.g., Outside of Phantom's in-app browser). Defaults to false
limitToCollectionsstring[](Optional) A list of collection addresses that should display this shortcut. The client should only show the shortcut on collections in this array if provided. Other collections that share the same external_url will not show this shortcut. Addresses should be provided as strings. Defaults to an empty array []
platformstring(Optional) Indicates to the client that this shortcut should only be displayed for the specified platform. Possible options are desktop, mobile, and all. Defaults to all.
preferredPresentationstring(Optional) How the shortcut prefers to be displayed. Possible values are default and immerse. The platform would choose how that translates to their UX. Defaults to immerse

Source: Phantom's GitHub

Here's a sample of how Famous Fox Federation's shortcuts.json file looks:

{
"version": 1,
"shortcuts": [
{
"label": "Redeem",
"uri": "https://famousfoxes.com/redeem",
"preferredPresentation": "immerse",
"limitToCollections": [
"c8dfad4aea0e625c3ea112f16cad480b",
"1fda904b8e1c3fd69628112f42cbc9fc",
"615457d8d427d535f587a2766804a80c"
]
},
// ...
{
"label": "Join Discord",
"uri": "https://discord.gg/famousfoxes",
"prefersExternalTarget": true,
"icon": "discord"
}
]
}

Dynamic URLs

Phantom allows collections to include dynamic elements in their URLs with placeholder variables. These variables include:

  • {{collectionId}} - the collection mint address of the NFT,
  • {{tokenId}} - the mint address of the NFT, and
  • {{ownerAddress}} - the owner's wallet that is active (the NFT holder)

For example, if you wanted to create a shortcut to an NFT collection's DAO voting page, you could implement that like this:

{
"version": 1,
"shortcuts": [
{
"label": "DAO Voting",
"uri": "https://some-dao-voting-website.com/{{collectionId}}",
"prefersExternalTarget": false,
"icon": "vote"
},
// ...
]
}

In the example above, the shortcut will direct the user to the DAO voting page, depending on the NFT collection they are viewing.

At the time of this writing, collections wishing to utilize dynamic URLs must contact Phantom through a GitHub issue.

Phantom supports Solana Pay URIs and Universal links. This allows collections to design unique experiences for their NFT functionality. Consider the following example:

{
"version": 1,
"shortcuts": [
{
"label": "Tip Artist",
"uri": "solana:QNt3dr4bDic2sQVZoFheEmUxwQq5VGSx9he7JxHcX12z?label=Thanks",
"platform": "mobile"
},
{
"label": "Join Chat",
"uri": "https://app.dialect.to/join?id={{tokenId}}",
"prefersExternalTarget": true,
"platform": "mobile"
}
// ...
]
}

The "Tip Artist" Shortcut utilizes Solana Pay to generate a payment transaction to QNt3dr4bDic2sQVZoFheEmUxwQq5VGSx9he7JxHcX12z with the label "Thanks." Per the Solana Pay Spec, the user will be prompted to enter a tip amount in their wallet. This similarly works with any complex Solana Pay transaction link. Check out our Solana Pay Guides for more information.

The "Join Chat" Shortcut utilizes a Universal Link that will open the Dialect app to the chat roof for the specified NFT. This is a great way to connect users to your NFT community.

Phantom Shortcut Enrollment

At present, the Shortcut feature is in Beta, and there are 5 Shortcut launch partners with Phantom. The enrollment process will likely evolve over time. We will update this process if it changes. To ensure user safety and security, Phantom restricts access to Shortcuts to trusted collections and aligns with 3rd party verifications. "Phantom has instituted a rigorous vetting process for all projects. Currently, each project is manually assessed to ensure its alignment with our security standards." (source).

To integrate your project with Shortcuts, you must contact Phantom with your project details via Advanced Feature Interest Form.

🎬 Cut!

That's a wrap. You now have a new handy tool to improve your NFT Collection's user experience. We are excited to see the creative ways you implement Phantom Shortcuts--share what you are working on in our Discord or Twitter. If you have any questions or need further assistance, feel free to join our Discord server or provide feedback using the form below.

We ❤️ Feedback!

Let us know if you have any feedback or requests for new topics. We'd love to hear from you.

Resources

Share this guide