Send and Receive Tokens | Solana Docs (2024)

This page describes how to receive and send SOL tokens using the command linetools with a command line wallet such as a paper wallet,a file system wallet, or ahardware wallet. Before you begin, make sureyou have created a wallet and have access to its address (pubkey) and thesigning keypair. Check out ourconventions for entering keypairs for different wallet types.

Testing your Wallet

Before sharing your public key with others, you may want to first ensure thekey is valid and that you indeed hold the corresponding private key.

In this example, we will create a second wallet in addition to your first wallet,and then transfer some tokens to it. This will confirm that you can send andreceive tokens on your wallet type of choice.

This test example uses our Developer Testnet, called devnet. Tokens issuedon devnet have no value, so don't worry if you lose them.

Airdrop some tokens to get started

First, airdrop yourself some play tokens on the devnet.

solana airdrop 1 <RECIPIENT_ACCOUNT_ADDRESS> --url https://api.devnet.solana.com

where you replace the text <RECIPIENT_ACCOUNT_ADDRESS> with your base58-encodedpublic key/wallet address.

A response with the signature of the transaction will be returned. If the balanceof the address does not change by the expected amount, run the following commandfor more information on what potentially went wrong:

solana confirm -v <TRANSACTION_SIGNATURE>

Check your balance

Confirm the airdrop was successful by checking the account's balance.It should output 1 SOL:

solana balance <ACCOUNT_ADDRESS> --url https://api.devnet.solana.com

Create a second wallet address

We will need a new address to receive our tokens. Create a secondkeypair and record its pubkey:

solana-keygen new --no-passphrase --no-outfile

The output will contain the address after the text pubkey:. Copy theaddress. We will use it in the next step.

pubkey: GKvqsuNcnwWqPzzuhLmGi4rzzh55FhJtGizkhHaEJqiV

You can also create a second (or more) wallet of any type:paper,file system,or hardware.

Transfer tokens from your first wallet to the second address

Next, prove that you own the airdropped tokens by transferring them.The Solana cluster will only accept the transfer if you sign the transactionwith the private keypair corresponding to the sender's public key in thetransaction.

solana transfer --from <KEYPAIR> <RECIPIENT_ACCOUNT_ADDRESS> 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.com --fee-payer <KEYPAIR>

where you replace <KEYPAIR> with the path to a keypair in your first wallet,and replace <RECIPIENT_ACCOUNT_ADDRESS> with the address of your secondwallet.

Confirm the updated balances with solana balance:

solana balance <ACCOUNT_ADDRESS> --url http://api.devnet.solana.com

where <ACCOUNT_ADDRESS> is either the public key from your keypair or therecipient's public key.

Full example of test transfer

$ solana-keygen new --outfile my_solana_wallet.json # Creating my first wallet, a file system wallet
Generating a new keypair
For added security, enter a passphrase (empty for no passphrase):
Wrote new keypair to my_solana_wallet.json
==========================================================================
pubkey: DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK # Here is the address of the first wallet
==========================================================================
Save this seed phrase to recover your new keypair:
width enhance concert vacant ketchup eternal spy craft spy guard tag punch # If this was a real wallet, never share these words on the internet like this!
==========================================================================

$ solana airdrop 1 DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # Airdropping 1 SOL to my wallet's address/pubkey
Requesting airdrop of 1 SOL from 35.233.193.70:9900
1 SOL

$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # Check the address's balance
1 SOL

$ solana-keygen new --no-outfile # Creating a second wallet, a paper wallet
Generating a new keypair
For added security, enter a passphrase (empty for no passphrase):
====================================================================
pubkey: 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv # Here is the address of the second, paper, wallet.
====================================================================
Save this seed phrase to recover your new keypair:
clump panic cousin hurt coast charge engage fall eager urge win love # If this was a real wallet, never share these words on the internet like this!
====================================================================

$ solana transfer --from my_solana_wallet.json 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.com --fee-payer my_solana_wallet.json # Transferring tokens to the public address of the paper wallet
3gmXvykAd1nCQQ7MjosaHLf69Xyaqyq1qw2eu1mgPyYXd5G4v1rihhg1CiRw35b9fHzcftGKKEu4mbUeXY2pEX2z # This is the transaction signature

$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com
0.499995 SOL # The sending account has slightly less than 0.5 SOL remaining due to the 0.000005 SOL transaction fee payment

$ solana balance 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv --url https://api.devnet.solana.com
0.5 SOL # The second wallet has now received the 0.5 SOL transfer from the first wallet

Receive Tokens

To receive tokens, you will need an address for others to send tokens to. InSolana, the wallet address is the public key of a keypair. There are a varietyof techniques for generating keypairs. The method you choose will depend on howyou choose to store keypairs. Keypairs are stored in wallets. Before receivingtokens, you will need to create a wallet.Once completed, you should have a public keyfor each keypair you generated. The public key is a long string of base58characters. Its length varies from 32 to 44 characters.

Send Tokens

If you already hold SOL and want to send tokens to someone, you will needa path to your keypair, their base58-encoded public key, and a number oftokens to transfer. Once you have that collected, you can transfer tokenswith the solana transfer command:

solana transfer --from <KEYPAIR> <RECIPIENT_ACCOUNT_ADDRESS> <AMOUNT> --fee-payer <KEYPAIR>

Confirm the updated balances with solana balance:

solana balance <ACCOUNT_ADDRESS>

As an expert in blockchain technology and Solana, I bring a wealth of knowledge and hands-on experience to guide you through the concepts discussed in the provided article. I've actively engaged in the development and implementation of blockchain solutions, including Solana-based applications. Let's delve into the key concepts presented in the article.

  1. Wallet Creation:

    • Before engaging in any transactions, it's crucial to have a wallet. In Solana, wallets can be created in various types, such as paper wallets, file system wallets, or hardware wallets.
    • The wallet contains a public key (address/pubkey) and a signing keypair. These are essential for sending and receiving tokens.
  2. Testing the Wallet:

    • Before sharing your public key, it's recommended to ensure its validity by testing the wallet. The article demonstrates creating a second wallet on the Developer Testnet (devnet) and transferring test tokens to it.
  3. Airdrop Tokens:

    • To initiate testing, the article suggests airdropping tokens to your wallet on the devnet using the Solana command line tools.
    • An airdrop involves sending tokens to an account, and in this case, it's done with the command solana airdrop.
  4. Checking Balances:

    • After the airdrop, it's essential to confirm the success by checking the account's balance using the solana balance command.
    • The balance should reflect the airdropped tokens, confirming the functionality of your wallet.
  5. Creating a Second Wallet:

    • The article demonstrates creating a second wallet address, irrespective of the type (paper, file system, or hardware).
    • The new address is generated using the solana-keygen command, and its pubkey is recorded for future use.
  6. Token Transfer:

    • To prove ownership of the airdropped tokens, the article guides users through transferring tokens from the first wallet to the second address.
    • The solana transfer command is used, requiring the private keypair for signing the transaction.
  7. Confirmation of Balances:

    • After the token transfer, the article emphasizes the importance of confirming updated balances using the solana balance command for both the sender's and recipient's accounts.
  8. Receiving and Sending Tokens:

    • The article provides information on how to receive tokens by creating a wallet and obtaining a public key.
    • For sending tokens, the solana transfer command is used, requiring the keypair path, recipient's address, and the amount to transfer.

By following these steps, users can gain a practical understanding of creating wallets, testing transactions, and securely managing SOL tokens on the Solana blockchain using command line tools.

Send and Receive Tokens | Solana Docs (2024)

FAQs

What is an spl transfer? ›

Sending Solana Program Library (SPL) Tokens is a critical mechanism for Solana development. Whether you are airdropping whitelist tokens to your community, bulk sending NFTs to another wallet, or managing token flows between escrow accounts, you will inevitably need to be able to transfer SPL tokens.

How to airdrop spl tokens? ›

How to use
  1. Connect your Phantom Wallet using "Connect Wallet" button in the header.
  2. Select the SPL token you want to airdrop from the token list.
  3. Add the addresses in the Accounts Table with the amount you wish to transfer(with decimals if any). ...
  4. Click on "Airdrop Tokens".

How to receive Solana tokens? ›

After clicking the “Receive” button in the Solana details page, you will see a screen as shown below. Your Solana public address will be shown. This address can be safely sent to people sending you Solana SOL tokens. Simply copy and send it to whoever is sending Solana SOL tokens to you.

Is spl the same as Solana? ›

Both are totally different. Solana is an advanced blockchain network. On other hand, SPL is a token standard on Solana blockchain development.

How do you distribute SPL tokens? ›

How to Use
  1. Navigate to solana. ...
  2. Connect your web3 wallet by clicking “Select Wallet.”
  3. Choose the token you wish to send.
  4. Upload the list of recipients in CSV format.
May 19, 2024

How do you create a SPL token? ›

To create a token from a Squad, follow these steps: Navigate to the "Token Manager" tab and click on the "+Add Token" button. Select the "Create Token" option in the pop-up. Fill in the required information in the pop-up window, including token name, symbol, freeze authority (optional) and description (optional).

How do I airdrop my tokens? ›

How to Airdrop Tokens
  1. 1) Collect addresses. The first step is to collect the addresses that should receive the airdrop. ...
  2. 2) Create an address list. Create a simple txt file with any editor software and paste the addresses into the file. ...
  3. 2) Buy Mint Coupons. ...
  4. 3) Set up the Airdropper. ...
  5. 4) Send the airdrop. ...
  6. More details.

Are airdrop tokens legit? ›

Like that, airdrop scams trick people into thinking they'll get free tokens. But instead of a nice reward, they give you a bad experience, and you might lose money. In this article, we'll learn how airdrop scams work and, most importantly, give you the knowledge to protect yourself from falling for these tricks.

Does MetaMask support SPL tokens? ›

These wallets are designed to support Solana's unique features, providing secure and user-friendly interfaces for managing SOL and SPL tokens.

How do I claim Solana airdrops? ›

More often than not, you need to claim your tokens on a dedicated website. To make things easier, if one of your wallets is eligible for an airdrop, we'll notify you via push notifications and in-app banners. Once you see the banner, just click it to go to the official airdrop page and claim your tokens.

Can I receive Solana on MetaMask? ›

Solana is a rapidly growing blockchain that has built a thriving ecosystem for DeFi and NFTs. However, the Solana wallets cannot be added to MetaMask as they are incompatible with the Ethereum Virtual Machine network. Instead, you must utilize a Solana-native wallet like Phantom or Sollet.

Is it safe to connect Phantom to Ledger? ›

However, you can securely view and manage your tokens by connecting your Ledger device to Solflare or Phantom, which are Ledger-compatible third-party applications.

Is USDC a spl token? ›

USDC on Solana, or USDC-SPL, is USDC's native token that is compatible with Solana's SPL token standard. The Solana Program Library (SPL) is a unique set of token standards that are maintained by Solana Labs and used by Solana wallets and applications.

What is the difference between token22 and SPL? ›

A Token 2022 follows the standards introduced in Solana's 2022 library update. It retains all functionalities of an SPL token while incorporating new features known as “extensions.” These extensions were developed to overcome limitations in the previous token standard, providing developers with additional capabilities.

What does spl stand for in crypto? ›

The Solana Program Library (SPL) is a set of pre-coded programs that can be used to issue tokens and build dapps on the Solana platform. Blockchain platforms typically operate as programming layers, allowing developers to execute smart contract code on-chain.

What does SPL mean in trust wallet? ›

SPL stands for Solana Program Library (SPL). It is a set of rules and protocols governing how tokens behave and interact on the Solana network. In other words, it is a collection of predefined protocols and specifications that dictate how tokens function within the Solana blockchain.

What is the difference between ERC-20 and SPL? ›

Unified Standard for Fungibility: SPL tokens can be either NFTs or fungible tokens, with differences primarily defined at the minting stage. This contrasts with Ethereum's separate standards for fungible (ERC-20) and non-fungible tokens (ERC-721 and ERC-1155).

What is SPL in Cryptocurrency? ›

SPL, or Solana Program Library, is a collection of on-chain programs maintained by the Solana team. These programs provide a wide array of functionalities such as token creation, token swapping, and governance, which are essential for building decentralized applications (dApps) on the Solana blockchain.

What is an spl token account? ›

This means that token accounts are actually Solana accounts that are associated with a specific token mint. These accounts are owned by the SPL Token Program ( TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ) and controlled by a user's wallet address.

Top Articles
B2B Ecommerce Guide: What Is It & Benefits | PayPal HK
Car Insurance for Mexico
Drury Inn & Suites Bowling Green
Global Foods Trading GmbH, Biebesheim a. Rhein
Devon Lannigan Obituary
Gomoviesmalayalam
Steamy Afternoon With Handsome Fernando
What's Wrong with the Chevrolet Tahoe?
83600 Block Of 11Th Street East Palmdale Ca
Strange World Showtimes Near Cmx Downtown At The Gardens 16
Azeroth Pilot Reloaded - Addons - World of Warcraft
Mephisto Summoners War
104 Whiley Road Lancaster Ohio
Best Suv In 2010
Google Feud Unblocked 6969
Chastity Brainwash
Mals Crazy Crab
Swgoh Turn Meter Reduction Teams
Vipleaguenba
Craigslistjaxfl
Stardew Expanded Wiki
Account Suspended
Ratchet & Clank Future: Tools of Destruction
Closest Bj Near Me
Music Go Round Music Store
Ups Print Store Near Me
Football - 2024/2025 Women’s Super League: Preview, schedule and how to watch
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Hampton University Ministers Conference Registration
Gas Buddy Prices Near Me Zip Code
Claio Rotisserie Menu
Tinyzonehd
Evil Dead Rise Ending Explained
Rs3 Bring Leela To The Tomb
Tripcheck Oregon Map
Davita Salary
Best New England Boarding Schools
About | Swan Medical Group
Gerber Federal Credit
Maxpreps Field Hockey
Planet Fitness Lebanon Nh
Dmitri Wartranslated
Wattengel Funeral Home Meadow Drive
Latest Nigerian Music (Next 2020)
Gun Mayhem Watchdocumentaries
Borat: An Iconic Character Who Became More than Just a Film
Mauston O'reilly's
Caesars Rewards Loyalty Program Review [Previously Total Rewards]
Runescape Death Guard
Sams La Habra Gas Price
Texas 4A Baseball
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 5828

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.