# Table of Contents - [Getting Started with Kite and Solana Kit](#getting-started-with-kite-and-solana-kit) - [Check if Private Key Matches Address](#check-if-private-key-matches-address) - [Connecting to a Solana RPC](#connecting-to-a-solana-rpc) - [Check if Address is a Valid Public Key](#check-if-address-is-a-valid-public-key) - [Create Multiple Wallets](#create-multiple-wallets) - [Load Wallet from a Wallet App (Phantom, Solflare, etc.)](#load-wallet-from-a-wallet-app-phantom-solflare-etc-) - [Load Wallet from Environment](#load-wallet-from-environment) - [Create Wallet](#create-wallet) - [Transfer SOL in Lamports)](#transfer-sol-in-lamports-) - [Get Lamport Balance](#get-lamport-balance) - [Airdrop if Required](#airdrop-if-required) - [Check Token Account is Closed](#check-token-account-is-closed) - [Get Explorer Link](#get-explorer-link) - [Load Wallet from File](#load-wallet-from-file) - [Get Token Account Address](#get-token-account-address) - [Get Token Account Balance](#get-token-account-balance) - [Get Token Metadata](#get-token-metadata) - [Mint Tokens](#mint-tokens) - [Get Logs](#get-logs) - [Create Token Mint](#create-token-mint) - [Get Token Mint Information](#get-token-mint-information) - [Transfer Tokens](#transfer-tokens) - [Get Recent Signature Confirmation](#get-recent-signature-confirmation) - [Send Transaction from Instructions](#send-transaction-from-instructions) - [Send and Confirm Transaction](#send-and-confirm-transaction) - [Convert Base58 String to Signature Bytes](#convert-base58-string-to-signature-bytes) - [Anchor](#anchor) - [Get PDA and Bump](#get-pda-and-bump) - [Get Accounts](#get-accounts) - [Sign Message from Wallet App](#sign-message-from-wallet-app) - [Changelog](#changelog) - [Terminology](#terminology) - [Convert Signature Bytes to Base58 String](#convert-signature-bytes-to-base58-string) - [Send Transaction from Instructions with Wallet App](#send-transaction-from-instructions-with-wallet-app) - [Get PDA and Bump](#get-pda-and-bump) - [Kite: the modern TypeScript client for Solana Kit](#kite-the-modern-typescript-client-for-solana-kit) - [Kite: the modern TypeScript client for Solana Kit](#kite-the-modern-typescript-client-for-solana-kit) --- # Getting Started with Kite and Solana Kit [Skip to Content](https://solanakite.org/docs#nextra-skip-nav) DocumentationGetting started Getting Started with Kite and Solana Kit ======================================== These docs provide a guide to getting started with Kite and Solana Kit. What is Solana?[](https://solanakite.org/docs#what-is-solana) -------------------------------------------------------------- Solana is a [most popular blockchain for payments](https://solanakite.org/docs) . Transactions complete in seconds, transaction fees are less than a fraction of a penny. What is Kite?[](https://solanakite.org/docs#what-is-kite) ---------------------------------------------------------- Kite leverages the speed and elegance of `@solana/kit` (previously known as `@solana/web3.js` version 2) but allows you to **complete most Solana tasks in a single step**. Since Kite uses `@solana/kit` for the heavy lifting, Kite is fully compatible with `@solana/kit`. If you decide you no longer need Kite, you can easily remove it and use plain `@solana/kit`. Users of Cursor, VSCode, Sublime and other popular editors will see TSDoc comments with parameters, return types, and usage examples right in their editor. Kite is the `@solana/kit` update of `@solana-developers/helpers`, the most popular high-level library for @solana/web3.js version 1, by the original author. The `kite` package includes updated versions of most of the original helpers, including contributions from QuickNode, Helius, the Solana Foundation, Anza, Turbin3, Unboxed Software, and StarAtlas. Kite works both in the browser and node.js, is small, and has minimal dependencies. What is Solana Kit?[](https://solanakite.org/docs#what-is-solana-kit) ---------------------------------------------------------------------- `@solana/kit` is a low-level library for interacting with the Solana blockchain. It is a collection of functions for creating tools that will create transactions. Think of making a token. In Kite, you make a token. In `@solana/kit`, you run a series of instructions to create a token, sign it, get a recent blockhash, send the transaction, and wait for confirmation. Kite uses the same types as `@solana/kit`. `@solana/kit` is by Anza, and replaces the `@solana/web3.js` library. Can I make my own programs / smart contracts with Kite and Kit?[](https://solanakite.org/docs#can-i-make-my-own-programs--smart-contracts-with-kite-and-kit) ------------------------------------------------------------------------------------------------------------------------------------------------------------- Kite is for making transactions with instructions to existing programs. You can use it to call any program on Solana, but you can’t use it to create your own programs. To create your own programs, you’ll use Anchor. Anchor is a framework for building Solana programs, and is the most popular way to build programs on Solana. [Kite is designed to work seamlessly with Anchor programs](https://solanakite.org/docs/anchor) . How does Gill compare to Solana Kite?[](https://solanakite.org/docs#how-does-gill-compare-to-solana-kite) ---------------------------------------------------------------------------------------------------------- * Kite uses just over half the code of Gill, thanks to sensible defaults * Real documentation, compare [Kite Docs](https://solanakite.org/docs)   to [Gill’s auto-generated documentation](https://www.gillsdk.com/api/gill)   * Created by the original author of `@solana/helpers`, **the most popular high-level library for `@solana/web3.js` version 1, that has been going since 2023** - and even before that, back in 2022, when the code was part of Portal Payments. * More minimal [230K](https://www.npmjs.com/package/solana-kite)   compared to [2.3MB](https://www.npmjs.com/package/gill)   - since Kite uses Anza’s existing packages, it also doesn’t Gill is a library by Decal, and [Gill is not related to `@solana/helpers` despite claims to the contrary](https://github.com/solana-developers/helpers/pull/78#issuecomment-2869214725) . Gill focuses on smaller size - Gill allows for tree-shaking, but also requires developers to write more code to accomplish most tasks. Kite prioritizes developer experience, assuming that if you want to use Solana in TypeScript, you probably also want to transfer tokens, work out PDA addresses, get the values from data accounts, and do all the other things that are ready to go in Kite. ### Comparison - connecting, making a wallet, and sending a memo instruction:[](https://solanakite.org/docs#comparison---connecting-making-a-wallet-and-sending-a-memo-instruction) #### Solana Kite - 43 tokens[](https://solanakite.org/docs#solana-kite---43-tokens) `import { lamports } from "@solana/kit"; import { connect, SOL } from "solana-kite"; import { getAddMemoInstruction } from "@solana-program/memo"; const connection = connect("devnet") const user = await connection.createWallet({ airdropAmount: lamports(1n * SOL), }) const memoInstruction = getAddMemoInstruction({ memo: "hello world!", }) const signature = await connection.sendTransactionFromInstructions({ feePayer: user, instructions: [memoInstruction] }); console.log(signature)` #### Gill - 82 tokens (1.9 X increase over Solana Kite)[](https://solanakite.org/docs#gill---82-tokens-19-x-increase-over-solana-kite) Following the docs at [https://www.gillsdk.com/api/gill](https://www.gillsdk.com/api/gill)   `import { airdropFactory, createSolanaClient, createTransaction, generateKeyPairSigner, lamports } from "gill"; import { getAddMemoInstruction } from "gill/programs"; const user = await generateKeyPairSigner(); const SOL = 1_000_000_000n; const memoInstruction = getAddMemoInstruction({ memo: "hello world!", }) const { rpc, rpcSubscriptions, sendAndConfirmTransaction } = createSolanaClient({ urlOrMoniker: "devnet", }); const slot = await rpc.getSlot().send(); const airdrop = airdropFactory({ rpc, rpcSubscriptions }) await airdrop({ commitment: "confirmed", lamports: lamports(1n * SOL), recipientAddress: user.address, }); const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); const transaction = createTransaction({ version: "legacy", feePayer: user, instructions: [memoInstruction], latestBlockhash, computeUnitLimit: 5000, computeUnitPrice: 1000, }); const signature = await sendAndConfirmTransaction(transaction); console.log(signature)` Installation[](https://solanakite.org/docs#installation) --------------------------------------------------------- You’ll want to start by installing Kite. `npm install solana-kite` You’ll then need to [connect to a Solana cluster](https://solanakite.org/docs/connecting) . Explorer[](https://solanakite.org/docs#explorer) ------------------------------------------------- The [Solana Explorer](https://solana.com/explorer)   is a web interface to explore the state of your Solana cluster - and yes, it can connect to the `localnet` cluster. You can and should use the Explorer to see wallets, their token balances, transactions and their instructions, and more. See [getExplorerLink](https://solanakite.org/docs/explorer/get-explorer-link) . Wallets[](https://solanakite.org/docs#wallets) ----------------------------------------------- You can [create a wallet](https://solanakite.org/docs/wallets/create-wallet) with easily-memorable names, and have them funded with SOL (on `localnet` or `devnet`). If you need multiple wallets, you can [create them in bulk](https://solanakite.org/docs/wallets/create-wallets) . You can also load existing wallets [from a secret key file](https://solanakite.org/docs/wallets/load-wallet-from-file) or an [environment variable](https://solanakite.org/docs/wallets/load-wallet-from-environment) . You can [validate addresses](https://solanakite.org/docs/wallets/check-if-address-is-public-key) and [verify private keys](https://solanakite.org/docs/wallets/check-address-matches-private-key) . SOL[](https://solanakite.org/docs#sol) --------------------------------------- If you need more SOL, you can use [airdropIfRequired](https://solanakite.org/docs/sol/airdrop-if-required) to request SOL on `localnet` or `devnet`. You can also [get the SOL balance of a wallet](https://solanakite.org/docs/sol/get-sol-balance) or [transfer SOL between wallets](https://solanakite.org/docs/sol/transfer-sol) . Tokens[](https://solanakite.org/docs#tokens) --------------------------------------------- Tokens on Solana (other than SOL) are called ‘SPL-Tokens’. You can: * [Create a new token](https://solanakite.org/docs/tokens/create-token-mint) * [Get a token account address](https://solanakite.org/docs/tokens/get-token-account-address) * [Get token mint information](https://solanakite.org/docs/tokens/get-mint) * [Get token account balance](https://solanakite.org/docs/tokens/get-token-account-balance) * [Check if a token account is closed](https://solanakite.org/docs/tokens/check-token-account-is-closed) * [Mint tokens to a wallet](https://solanakite.org/docs/tokens/mint-tokens) * [Transfer tokens between wallets](https://solanakite.org/docs/tokens/transfer-tokens) Data Accounts[](https://solanakite.org/docs#data-accounts) ----------------------------------------------------------- * [Get and decode program accounts](https://solanakite.org/docs/data-accounts/get-accounts) Transactions[](https://solanakite.org/docs#transactions) --------------------------------------------------------- Transactions are how you make changes to the state of the blockchain. They combine instructions to different programs together, and if all the instructions complete successfully, the transaction happens, otherwise no state changes. **Kite can easily create and send transactions for any Solana program.** You can: * [Send a transaction with multiple instructions](https://solanakite.org/docs/transactions/send-transaction-from-instructions) * [Send and confirm a transaction](https://solanakite.org/docs/transactions/send-and-confirm-transaction) * [Check transaction confirmation status](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) * [Get transaction logs](https://solanakite.org/docs/transactions/get-logs) * [Get a Program Derived Address (PDA)](https://solanakite.org/docs/transactions/get-pda-and-bump) * [Convert signature bytes to base58 string](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string) * [Convert base58 string to signature bytes](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes) Last updated on October 14, 2025 [Anchor](https://solanakite.org/docs/anchor "Anchor") --- # Check if Private Key Matches Address [Skip to Content](https://solanakite.org/docs/wallets/check-address-matches-private-key#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") WalletsCheck if Private Key Matches Address Check if Private Key Matches Address ==================================== Verifies if a private key matches a given address by deriving the public key from the private key and comparing it to the provided address. Returns: `boolean` - `true` if the private key matches the address, `false` otherwise `const matches = await connection.checkAddressMatchesPrivateKey(address, privateKey);` Parameters[](https://solanakite.org/docs/wallets/check-address-matches-private-key#parameters) ----------------------------------------------------------------------------------------------- * `address`: `Address` - The address to verify against * `privateKey`: `Uint8Array` - The private key in bytes format (array of numbers) Examples[](https://solanakite.org/docs/wallets/check-address-matches-private-key#examples) ------------------------------------------------------------------------------------------- Check if a private key matches an address: ``// Private key as array of numbers (from solana-keygen or environment) const privateKey = new Uint8Array([/* private key bytes */]); const address = "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn"; const matches = await connection.checkAddressMatchesPrivateKey(address, privateKey); console.log(`Private key matches address: ${matches}`);`` Verify a wallet loaded from file: `// Load wallet from file const wallet = await connection.loadWalletFromFile("path/to/keypair.json"); // Check if the loaded wallet's private key matches its address const matches = await connection.checkAddressMatchesPrivateKey( wallet.address, wallet.privateKey ); if (!matches) { throw new Error("Wallet private key does not match its address"); } console.log("Wallet verification successful");` Validate environment variable private key: `// Load private key from environment const privateKeyString = process.env.PRIVATE_KEY; if (!privateKeyString) { throw new Error("PRIVATE_KEY environment variable not set"); } // Parse private key (assuming it's in the array format) const privateKey = new Uint8Array( privateKeyString.split(',').map(num => parseInt(num.trim())) ); const expectedAddress = "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn"; const matches = await connection.checkAddressMatchesPrivateKey(expectedAddress, privateKey); if (!matches) { throw new Error("Environment private key does not match expected address"); } console.log("Environment private key is valid");` See also[](https://solanakite.org/docs/wallets/check-address-matches-private-key#see-also) ------------------------------------------------------------------------------------------- * [Check if address is a valid public key](https://solanakite.org/docs/wallets/check-if-address-is-public-key) * [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment) - Load wallets from environment variables * [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file) - Load wallets from files Last updated on October 2, 2025 [Connecting to a Solana RPC](https://solanakite.org/docs/connecting "Connecting to a Solana RPC") [Check if Address is a Valid Public Key](https://solanakite.org/docs/wallets/check-if-address-is-public-key "Check if Address is a Valid Public Key") --- # Connecting to a Solana RPC [Skip to Content](https://solanakite.org/docs/connecting#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Connecting to a Solana RPC Connecting to a Solana RPC ========================== To start Kite, you need to connect to a [Solana RPC](https://solana.com/rpc)   - RPCs are how your code communicates with the Solana blockchain. To use the local cluster (ie, `solana-test-validator` running on your machine): `import { connect } from "solana-kite"; const connection = connect();` You can also specify a cluster name. The connection object defaults to `localnet` but any of the following cluster names are supported: * `devnet` - Development network for testing with fake SOL. This is where Solana apps developers typically deploy first. * `mainnet-beta` (or `mainnet`) - Main Solana network where transactions involving real value occur. * `testnet` - Used to test future versions of the Solana blockchain. * `quicknode-mainnet`, `quicknode-devnet` - the QuickNode names require the environment variables `QUICKNODE_SOLANA_MAINNET_ENDPOINT` (for mainnet) or `QUICKNODE_SOLANA_DEVNET_ENDPOINT` (for devnet) to be set in your environment. You can get an API key from [QuickNode](https://www.quicknode.com/)  . `const connection = connect("quicknode-devnet");` * `helius-mainnet`, `helius-testnet`, or `helius-devnet` - the Helius names require the environment variable `HELIUS_API_KEY` to be set in your environment. You can get an API key from [Helius](https://www.helius.dev/)  . You can also specify an arbitrary RPC URL and RPC subscription URL: `const connection = connect("https://mainnet.example.com/", "wss://mainnet.example.com/");` After you’ve made a connection Kite is ready to use. **If you’re used to raw `@solana/kit` you don’t need to set up any factories, they’re already configured**. Last updated on October 2, 2025 [Anchor](https://solanakite.org/docs/anchor "Anchor") [Check if Private Key Matches Address](https://solanakite.org/docs/wallets/check-address-matches-private-key "Check if Private Key Matches Address") --- # Check if Address is a Valid Public Key [Skip to Content](https://solanakite.org/docs/wallets/check-if-address-is-public-key#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Check if Address is a Valid Public Key Check if Address is a Valid Public Key ====================================== Validates if an address is a valid Ed25519 public key. Returns: `boolean` - `true` if the address is a valid Ed25519 public key, `false` otherwise `const isValidPublicKey = connection.checkIfAddressIsPublicKey(address);` Parameters[](https://solanakite.org/docs/wallets/check-if-address-is-public-key#parameters) -------------------------------------------------------------------------------------------- * `address`: `Address` - The address to validate Examples[](https://solanakite.org/docs/wallets/check-if-address-is-public-key#examples) ---------------------------------------------------------------------------------------- Check if an address is a valid public key: ``const address = "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn"; const isValid = connection.checkIfAddressIsPublicKey(address); console.log(`Address is valid public key: ${isValid}`);`` Validate multiple addresses: ``const addresses = [ "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn", // Valid public key "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", // Valid public key (program) "invalid-address", // Invalid ]; for (const address of addresses) { const isValid = connection.checkIfAddressIsPublicKey(address); console.log(`${address}: ${isValid ? 'Valid' : 'Invalid'} public key`); }`` Use in validation logic: `function validateWalletAddress(address: string): boolean { if (!connection.checkIfAddressIsPublicKey(address)) { throw new Error("Invalid wallet address: not a valid Ed25519 public key"); } return true; } // Usage try { validateWalletAddress(userInputAddress); console.log("Address is valid"); } catch (error) { console.error("Invalid address:", error.message); }` See also[](https://solanakite.org/docs/wallets/check-if-address-is-public-key#see-also) ---------------------------------------------------------------------------------------- * [Check if private key matches address](https://solanakite.org/docs/wallets/check-address-matches-private-key) * [Create Wallet](https://solanakite.org/docs/wallets/create-wallet) - Create new wallets * [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file) - Load existing wallets Last updated on October 2, 2025 [Check if Private Key Matches Address](https://solanakite.org/docs/wallets/check-address-matches-private-key "Check if Private Key Matches Address") [Create Wallet](https://solanakite.org/docs/wallets/create-wallet "Create Wallet") --- # Create Multiple Wallets [Skip to Content](https://solanakite.org/docs/wallets/create-wallets#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Create Multiple Wallets Create Multiple Wallets ======================= Creates multiple Solana wallets (more specifically `KeyPairSigner` objects) at once. All wallets will be created with the same options. Returns: `Promise>` `const wallets = await connection.createWallets(numberOfWallets, options);` Parameters[](https://solanakite.org/docs/wallets/create-wallets#parameters) ---------------------------------------------------------------------------- * `numberOfWallets`: `number` - The number of wallets to create * `options`: `Object` (optional) - Same options as [createWallet](https://solanakite.org/docs/wallets/create-wallet) : * `prefix`: `string | null` (optional) - Generate addresses starting with these characters * `suffix`: `string | null` (optional) - Generate addresses ending with these characters * `envFileName`: `string | null` (optional) - Save private keys to this .env file * `envVariableName`: `string` (optional) - Environment variable name to store the keys (default: “PRIVATE\_KEY”) * `airdropAmount`: `Lamports | null` (optional) - Amount of test SOL to request from faucet (default: 1 SOL) * `commitment`: `Commitment | null` (optional) - Desired commitment level for airdrop Examples[](https://solanakite.org/docs/wallets/create-wallets#examples) ------------------------------------------------------------------------ Create multiple wallets with default settings: ``// Create 5 wallets with default settings const wallets = await connection.createWallets(5); console.log(`Created ${wallets.length} wallets`); // Access individual wallets const [alice, bob, charlie, dave, eve] = wallets; console.log("Alice's address:", alice.address); console.log("Bob's address:", bob.address);`` Create wallets for testing: ``// Create 3 wallets for testing const testWallets = await connection.createWallets(3); // Use them in your tests for (const wallet of testWallets) { console.log(`Wallet ${wallet.address} created`); // Each wallet will have 1 SOL airdropped by default const balance = await connection.getLamportBalance(wallet.address); console.log(`Balance: ${balance} lamports`); }`` Create wallets for different purposes: `// Create wallets for different roles const [adminWallet, userWallet, treasuryWallet] = await connection.createWallets(3); console.log("Admin wallet:", adminWallet.address); console.log("User wallet:", userWallet.address); console.log("Treasury wallet:", treasuryWallet.address);` Create wallets with custom options: `// Create 3 wallets with a specific airdrop amount const wallets = await connection.createWallets(3, { airdropAmount: lamports(2n * SOL), // Each wallet gets 2 SOL }); // Create wallets with vanity addresses const vanityWallets = await connection.createWallets(2, { prefix: "ABC", // All addresses will start with "ABC" airdropAmount: lamports(1n * SOL), });` See also[](https://solanakite.org/docs/wallets/create-wallets#see-also) ------------------------------------------------------------------------ * [Create Wallet](https://solanakite.org/docs/wallets/create-wallet) - Create a single wallet with custom options * [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file) - Load existing wallets * [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment) - Load wallets from environment variables Last updated on October 2, 2025 [Create Wallet](https://solanakite.org/docs/wallets/create-wallet "Create Wallet") [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment "Load Wallet from Environment") --- # Load Wallet from a Wallet App (Phantom, Solflare, etc.) [Skip to Content](https://solanakite.org/docs/wallets/load-wallet-from-wallet-app#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Load Wallet from a Wallet App (Phantom, Solflare, etc.) Load Wallet from a Wallet App (Phantom, Solflare, etc.) ======================================================= Kite can load wallets from a wallet app (Phantom, Solflare, or any other wallets that support Wallet Standard). We’re still working on the docs, for this, but there’s two examples of how to do this: * [Solana Kit React App](https://github.com/solanakite/solana-kit-react-app)   - React front end that demonstrates connecting to wallets, Sign in With Solana, signing messages and sending instructions to `systemProgram.transfer` * [Anchor Election 2025](https://github.com/solanakite/anchor-election-2025)   - Anchor app with React front end that demonstrates connecting to wallets, Sign in With Solana, and sending custom instructions for an Anchor program’sisntruction handler. ![Anchor Election Screenshot](https://solanakite.org/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fanchor-election.a22b07fe.png&w=3840&q=75&dpl=dpl_6DTYaMYCFMMN5x4TrQWLNJWwMau2) Last updated on October 2, 2025 [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file "Load Wallet from File") [Airdrop if Required](https://solanakite.org/docs/sol/airdrop-if-required "Airdrop if Required") --- # Load Wallet from Environment [Skip to Content](https://solanakite.org/docs/wallets/load-wallet-from-environment#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Load Wallet from Environment Load Wallet from Environment ============================ Loads a wallet (more specifically a `KeyPairSigner`) from an environment variable. The keypair should be in the same ‘array of numbers’ format as used by `solana-keygen`. Returns: `KeyPairSigner` `const wallet = connection.loadWalletFromEnvironment(envVariableName);` Options[](https://solanakite.org/docs/wallets/load-wallet-from-environment#options) ------------------------------------------------------------------------------------ * `envVariableName`: `string` - Name of environment variable containing the keypair (default: “PRIVATE\_KEY”) See also: [Create Wallet](https://solanakite.org/docs/wallets/create-wallet) , [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file) Last updated on October 2, 2025 [Create Multiple Wallets](https://solanakite.org/docs/wallets/create-wallets "Create Multiple Wallets") [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file "Load Wallet from File") --- # Create Wallet [Skip to Content](https://solanakite.org/docs/wallets/create-wallet#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Create Wallet Create Wallet ============= Creates a new Solana wallet (more specifically a `KeyPairSigner`). If you like, the wallet will have a prefix/suffix of your choice, the wallet will have a SOL balance ready to spend, and the keypair will be saved to a file for you to use later. Returns: `Promise` `const wallet = await connection.createWallet({ prefix: "be", // Optional: Generate address starting with these characters suffix: "en", // Optional: Generate address ending with these characters envFileName: ".env", // Optional: Save private key to this .env file envVariableName: "PRIVATE_KEY", // Optional: Environment variable name to store the key airdropAmount: 1_000_000_000n, // Optional: Amount of test SOL to request from faucet });` Options[](https://solanakite.org/docs/wallets/create-wallet#options) --------------------------------------------------------------------- All options are optional: * `prefix`: `string | null` - Prefix for wallet address * `suffix`: `string | null` - Suffix for wallet address * `envFileName`: `string | null` - Path to .env file to save keypair * `envVariableName`: `string` - Name of environment variable to store keypair (default: “PRIVATE\_KEY”) * `airdropAmount`: `Lamports | null` - Amount of SOL to airdrop (default: 1 SOL) * `commitment`: `Commitment | null` - Desired commitment level for airdrop (default: “finalized”) Examples[](https://solanakite.org/docs/wallets/create-wallet#examples) ----------------------------------------------------------------------- Create a basic wallet: `const wallet = await connection.createWallet();` Create a wallet with a specific prefix and suffix: `const wallet = await connection.createWallet({ prefix: "COOL", suffix: "WALLET", });` Create a wallet and save it to an environment file: `const wallet = await connection.createWallet({ envFileName: ".env", envVariableName: "MY_WALLET_KEY", });` Create a wallet with a custom airdrop amount: `const wallet = await connection.createWallet({ airdropAmount: lamports(2n * SOL), });` See also: [Create Multiple Wallets](https://solanakite.org/docs/wallets/create-wallets) , [Load Wallet from File](https://solanakite.org/docs/wallets/load-wallet-from-file) , [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment) Last updated on October 2, 2025 [Check if Address is a Valid Public Key](https://solanakite.org/docs/wallets/check-if-address-is-public-key "Check if Address is a Valid Public Key") [Create Multiple Wallets](https://solanakite.org/docs/wallets/create-wallets "Create Multiple Wallets") --- # Transfer SOL in Lamports) [Skip to Content](https://solanakite.org/docs/sol/transfer-sol#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [SOL](https://solanakite.org/docs/sol/airdrop-if-required "SOL") Transfer SOL in Lamports) Transfer SOL in Lamports) ========================= Transfers SOL from one wallet to another. Returns: `Promise` `const signature = await connection.transferLamports({ source: senderWallet, destination: recipientAddress, amount: 1_000_000_000n, skipPreflight: true, maximumClientSideRetries: 0, });` Options[](https://solanakite.org/docs/sol/transfer-sol#options) ---------------------------------------------------------------- * `source`: `KeyPairSigner` - The wallet to send SOL from * `destination`: `Address` - The wallet to send SOL to * `amount`: `Lamports` - Amount of lamports to send * `skipPreflight`: `boolean` (optional) - Whether to skip preflight checks (default: true) * `maximumClientSideRetries`: `number` (optional) - Maximum number of times to retry sending the transaction (default: 0) * `abortSignal`: `AbortSignal | null` (optional) - Signal to abort the transaction (default: null) See also: [Get Lamport Balance](https://solanakite.org/docs/sol/get-sol-balance) , [Airdrop if Required](https://solanakite.org/docs/sol/airdrop-if-required) Last updated on October 2, 2025 [Get Lamport Balance](https://solanakite.org/docs/sol/get-sol-balance "Get Lamport Balance") [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link "Get Explorer Link") --- # Get Lamport Balance [Skip to Content](https://solanakite.org/docs/sol/get-sol-balance#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [SOL](https://solanakite.org/docs/sol/airdrop-if-required "SOL") Get Lamport Balance Get Lamport Balance =================== Gets the SOL balance of an account in lamports (1 SOL = 1,000,000,000 lamports). Lamports are the smallest unit of SOL, similar to how cents are the smallest unit of dollars. Returns: `Promise` - The balance in lamports as a bigint `const balance = await connection.getLamportBalance(address, commitment);` Options[](https://solanakite.org/docs/sol/get-sol-balance#options) ------------------------------------------------------------------- * `address`: `string` - Address to check balance for * `commitment`: [`Commitment`](https://docs.anza.xyz/consensus/commitments/) (optional) - Desired [commitment level](https://docs.anza.xyz/consensus/commitments/)  . Can be `"processed"`, `"confirmed"`, or `"finalized"` (default). Example[](https://solanakite.org/docs/sol/get-sol-balance#example) ------------------------------------------------------------------- ``// Get balance in lamports const balanceInLamports = await connection.getLamportBalance("GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn"); // Convert to SOL const balanceInSOL = Number(balanceInLamports) / 1_000_000_000; console.log(`Balance: ${balanceInSOL} SOL`);`` Errors[](https://solanakite.org/docs/sol/get-sol-balance#errors) ----------------------------------------------------------------- * Throws if the address is invalid * Throws if the RPC connection fails See also: [Transfer Lamports](https://solanakite.org/docs/sol/transfer-sol) , [Airdrop if Required](https://solanakite.org/docs/sol/airdrop-if-required) Last updated on October 2, 2025 [Airdrop if Required](https://solanakite.org/docs/sol/airdrop-if-required "Airdrop if Required") [Transfer SOL in Lamports)](https://solanakite.org/docs/sol/transfer-sol "Transfer SOL in Lamports)") --- # Airdrop if Required [Skip to Content](https://solanakite.org/docs/sol/airdrop-if-required#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") SOLAirdrop if Required Airdrop if Required =================== Airdrops SOL to an address if its balance is below the specified threshold. Returns: `Promise` - Transaction signature if airdrop occurred, null if no airdrop was needed `const signature = await connection.airdropIfRequired(address, airdropAmount, minimumBalance);` Options[](https://solanakite.org/docs/sol/airdrop-if-required#options) ----------------------------------------------------------------------- * `address`: `Address` - Address to check balance and potentially airdrop to * `airdropAmount`: `Lamports` - Amount of lamports to airdrop if needed * `minimumBalance`: `Lamports` - Minimum balance threshold that triggers airdrop * `commitment`: [`Commitment`](https://docs.anza.xyz/consensus/commitments/) (optional) - Desired [commitment level](https://docs.anza.xyz/consensus/commitments/)  . Can be `"processed"`, `"confirmed"`, or `"finalized"` (default). See also: [Get Lamport Balance](https://solanakite.org/docs/sol/get-sol-balance) , [Transfer Lamports](https://solanakite.org/docs/sol/transfer-sol) Last updated on October 2, 2025 [Load Wallet from a Wallet App (Phantom, Solflare, etc.)](https://solanakite.org/docs/wallets/load-wallet-from-wallet-app "Load Wallet from a Wallet App (Phantom, Solflare, etc.)") [Get Lamport Balance](https://solanakite.org/docs/sol/get-sol-balance "Get Lamport Balance") --- # Check Token Account is Closed [Skip to Content](https://solanakite.org/docs/tokens/check-token-account-is-closed#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") TokensCheck Token Account is Closed Check Token Account is Closed ============================= Checks if a token account is closed or doesn’t exist. Can be used with either a direct token account address or by specifying a wallet and mint. Returns: `Promise` - `true` if the account is closed or doesn’t exist, `false` if it exists and is open `const isClosed = await connection.checkTokenAccountIsClosed({ wallet: walletAddress, // Optional: Wallet address mint: mintAddress, // Optional: Mint address tokenAccount: tokenAccountAddress, // Optional: Direct token account address useTokenExtensions: false, // Optional: Use Token Extensions program instead of classic Token program });` Options[](https://solanakite.org/docs/tokens/check-token-account-is-closed#options) ------------------------------------------------------------------------------------ All options are optional, but you must provide either: * `tokenAccount` directly, OR * both `wallet` and `mint` to look up the associated token account * `wallet`: `Address` - The wallet address that owns the token account * `mint`: `Address` - The mint address of the token * `tokenAccount`: `Address` - The direct token account address to check * `useTokenExtensions`: `boolean` - Whether to use Token Extensions program (default: false) Examples[](https://solanakite.org/docs/tokens/check-token-account-is-closed#examples) -------------------------------------------------------------------------------------- Check if a specific token account is closed: `const isClosed = await connection.checkTokenAccountIsClosed({ tokenAccount: tokenAccountAddress, });` Check if a wallet’s token account for a specific mint is closed: `const isClosed = await connection.checkTokenAccountIsClosed({ wallet: walletAddress, mint: mintAddress, });` Check if a token account using Token Extensions is closed: `const isClosed = await connection.checkTokenAccountIsClosed({ tokenAccount: tokenAccountAddress, useTokenExtensions: true, });` See also: [Get Token Account Balance](https://solanakite.org/docs/tokens/get-token-account-balance) Last updated on October 2, 2025 [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link "Get Explorer Link") [Create Token Mint](https://solanakite.org/docs/tokens/create-token-mint "Create Token Mint") --- # Get Explorer Link [Skip to Content](https://solanakite.org/docs/explorer/get-explorer-link#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Solana ExplorerGet Explorer Link Get Explorer Link ================= Get a link to view an address, transaction, or token on Solana Explorer. The link will automatically use your RPC. Returns: `string` - Explorer URL Examples[](https://solanakite.org/docs/explorer/get-explorer-link#examples) ---------------------------------------------------------------------------- Get a link to view an address: `const addressLink = connection.getExplorerLink("address", "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn");` Get a link to view a transaction: `const transactionLink = connection.getExplorerLink( "transaction", "5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe", );` Or if you like abbreviations: `const transactionLink = connection.getExplorerLink( "tx", "5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe", );` Get a link to view a block: `const blockLink = connection.getExplorerLink("block", "180392470");` Options[](https://solanakite.org/docs/explorer/get-explorer-link#options) -------------------------------------------------------------------------- * `linkType`: `"transaction" | "tx" | "address" | "block"` - Type of entity to link to * `id`: `string` - The address, signature, or block to link to See also: [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) , [Get Logs](https://solanakite.org/docs/transactions/get-logs) Last updated on October 2, 2025 [Transfer SOL in Lamports)](https://solanakite.org/docs/sol/transfer-sol "Transfer SOL in Lamports)") [Check Token Account is Closed](https://solanakite.org/docs/tokens/check-token-account-is-closed "Check Token Account is Closed") --- # Load Wallet from File [Skip to Content](https://solanakite.org/docs/wallets/load-wallet-from-file#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Wallets](https://solanakite.org/docs/wallets/check-address-matches-private-key "Wallets") Load Wallet from File Load Wallet from File ===================== Loads a wallet (more specifically a `KeyPairSigner`) from a file. The file should be in the same format as files created by the `solana-keygen` command. Returns: `Promise` `const wallet = await connection.loadWalletFromFile(keyPairPath);` Options[](https://solanakite.org/docs/wallets/load-wallet-from-file#options) ----------------------------------------------------------------------------- * `keyPairPath`: `string` (optional) - Path to load keypair from file. Defaults to `~/.config/solana/id.json` See also: [Create Wallet](https://solanakite.org/docs/wallets/create-wallet) , [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment) Last updated on October 2, 2025 [Load Wallet from Environment](https://solanakite.org/docs/wallets/load-wallet-from-environment "Load Wallet from Environment") [Load Wallet from a Wallet App (Phantom, Solflare, etc.)](https://solanakite.org/docs/wallets/load-wallet-from-wallet-app "Load Wallet from a Wallet App (Phantom, Solflare, etc.)") --- # Get Token Account Address [Skip to Content](https://solanakite.org/docs/tokens/get-token-account-address#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Get Token Account Address Get Token Account Address ========================= Gets the associated token account address for a given wallet and token mint. Returns: `Promise
` `const tokenAccountAddress = await connection.getTokenAccountAddress(wallet, mint, useTokenExtensions);` Options[](https://solanakite.org/docs/tokens/get-token-account-address#options) -------------------------------------------------------------------------------- * `wallet`: `Address` - The wallet address to get the token account for * `mint`: `Address` - The token mint address * `useTokenExtensions`: `boolean` (optional) - Whether to use Token Extensions program (default: false) Examples[](https://solanakite.org/docs/tokens/get-token-account-address#examples) ---------------------------------------------------------------------------------- Get a token account address for a token made with the classic token program: `const tokenAccountAddress = await connection.getTokenAccountAddress( "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", );` Get a token account address for a Token Extensions token: `const tokenAccountAddress = await connection.getTokenAccountAddress( "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", true, );` See also: [Create Token Mint](https://solanakite.org/docs/tokens/create-token-mint) , [Get Token Account Balance](https://solanakite.org/docs/tokens/get-token-account-balance) , [Check Token Account is Closed](https://solanakite.org/docs/tokens/check-token-account-is-closed) Last updated on October 2, 2025 [Get Token Mint Information](https://solanakite.org/docs/tokens/get-mint "Get Token Mint Information") [Get Token Account Balance](https://solanakite.org/docs/tokens/get-token-account-balance "Get Token Account Balance") --- # Get Token Account Balance [Skip to Content](https://solanakite.org/docs/tokens/get-token-account-balance#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Get Token Account Balance Get Token Account Balance ========================= The `getTokenAccountBalance` function retrieves the balance of tokens in a token account. You can either provide a token account address directly, or provide a wallet address and a mint address to derive the token account address. Usage[](https://solanakite.org/docs/tokens/get-token-account-balance#usage) ---------------------------------------------------------------------------- `const balance = await connection.getTokenAccountBalance({ tokenAccount, // Optional: Direct token account address to check wallet, // Optional: Wallet address (required if tokenAccount not provided) mint, // Optional: Token mint address (required if tokenAccount not provided) useTokenExtensions, // Optional: Use Token-2022 program instead of Token program });` Parameters[](https://solanakite.org/docs/tokens/get-token-account-balance#parameters) -------------------------------------------------------------------------------------- * `params`: `Object` - Parameters for getting token balance * `tokenAccount`: `Address` (optional) - Direct token account address to check balance for * `wallet`: `Address` (optional) - Wallet address (required if tokenAccount not provided) * `mint`: `Address` (optional) - Token mint address (required if tokenAccount not provided) * `useTokenExtensions`: `boolean` (optional) - Use Token-2022 program instead of Token program (default: false) Returns[](https://solanakite.org/docs/tokens/get-token-account-balance#returns) -------------------------------------------------------------------------------- Returns a `Promise` resolving to an object containing: * `amount`: Raw token amount as a BigInt (in base units) * `decimals`: Number of decimal places for the token * `uiAmount`: Formatted amount with decimals * `uiAmountString`: String representation of the UI amount Examples[](https://solanakite.org/docs/tokens/get-token-account-balance#examples) ---------------------------------------------------------------------------------- Get a token balance using wallet and mint addresses: ``// Get USDC balance const balance = await connection.getTokenAccountBalance({ wallet: "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn", // wallet or PDA address mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC mint }); console.log(`Balance: ${balance.uiAmount} ${balance.symbol}`);`` Get a token balance using direct token account address: `const balance = await connection.getTokenAccountBalance({ tokenAccount: "4MD31b2GFAWVDYQT8KG7E5GcZiFyy4MpDUt4BcyEdJRP", });` Get a Token-2022 token balance: `const balance = await connection.getTokenAccountBalance({ wallet: "GkFTrgp8FcCgkCZeKreKKVHLyzGV6eqBpDHxRzg1brRn", mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", useTokenExtensions: true, });` Error Handling[](https://solanakite.org/docs/tokens/get-token-account-balance#error-handling) ---------------------------------------------------------------------------------------------- The function will throw an error if: * Neither `tokenAccount` nor both `wallet` and `mint` are provided * The token account doesn’t exist * There’s an error retrieving the balance Last updated on October 2, 2025 [Get Token Account Address](https://solanakite.org/docs/tokens/get-token-account-address "Get Token Account Address") [Get Token Metadata](https://solanakite.org/docs/tokens/get-token-metadata "Get Token Metadata") --- # Get Token Metadata [Skip to Content](https://solanakite.org/docs/tokens/get-token-metadata#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Get Token Metadata Get Token Metadata ================== The `getTokenMetadata` function retrieves token metadata using metadata pointer extensions. It supports both metadata stored directly in mint accounts and in separate metadata accounts, and works with Token-Extension mints that have metadata pointer extension enabled. Usage[](https://solanakite.org/docs/tokens/get-token-metadata#usage) --------------------------------------------------------------------- `const metadata = await connection.getTokenMetadata(mintAddress);` Parameters[](https://solanakite.org/docs/tokens/get-token-metadata#parameters) ------------------------------------------------------------------------------- * `mintAddress`: `Address` - The mint address of the token * `commitment`: `Commitment` (optional) - The commitment level for the RPC call (default: “confirmed”) Returns[](https://solanakite.org/docs/tokens/get-token-metadata#returns) ------------------------------------------------------------------------- Returns a `Promise` containing: * `updateAuthority`: `Address` - The update authority for the metadata * `mint`: `Address` - The mint address * `name`: `string` - The token name * `symbol`: `string` - The token symbol * `uri`: `string` - The URI pointing to additional metadata (usually an IPFS or HTTP URL) * `additionalMetadata`: `Record` - Additional metadata key-value pairs Example[](https://solanakite.org/docs/tokens/get-token-metadata#example) ------------------------------------------------------------------------- `import { connect } from "solana-kite"; const connection = await connect("mainnet"); // Get metadata for a token with metadata pointer extension const mintAddress = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" as Address; // USDC try { const metadata = await connection.getTokenMetadata(mintAddress); console.log("Token Name:", metadata.name); console.log("Token Symbol:", metadata.symbol); console.log("Token URI:", metadata.uri); console.log("Update Authority:", metadata.updateAuthority); console.log("Additional Metadata:", metadata.additionalMetadata); } catch (error) { console.error("Failed to get token metadata:", error.message); }` Requirements[](https://solanakite.org/docs/tokens/get-token-metadata#requirements) ----------------------------------------------------------------------------------- This function requires the token to have: 1. **Metadata Pointer Extension**: The mint must have a metadata pointer extension enabled 2. **Token Extensions Program**: The mint must be created using the Token Extensions program (Token-2022), not the classic Token program Error Handling[](https://solanakite.org/docs/tokens/get-token-metadata#error-handling) --------------------------------------------------------------------------------------- The function will throw an error if: * The mint address is not found * The mint uses the classic Token program (which doesn’t support metadata extensions) * No metadata pointer extension is found * The metadata account is not found (when metadata is stored separately) Token Extensions[](https://solanakite.org/docs/tokens/get-token-metadata#token-extensions) ------------------------------------------------------------------------------------------- This function is specifically designed to work with Token Extensions, which provide enhanced functionality for tokens on Solana. Token Extensions allow for: * Metadata pointer extensions * Transfer hooks * Transfer fees * And many other advanced features For more information about Token Extensions, see the [Solana Token Extensions documentation](https://spl.solana.com/token-extensions)  . Last updated on October 2, 2025 [Get Token Account Balance](https://solanakite.org/docs/tokens/get-token-account-balance "Get Token Account Balance") [Mint Tokens](https://solanakite.org/docs/tokens/mint-tokens "Mint Tokens") --- # Mint Tokens [Skip to Content](https://solanakite.org/docs/tokens/mint-tokens#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Mint Tokens Mint Tokens =========== The `mintTokens` function mints tokens from a token mint to a destination account. The mint authority must sign the transaction. Usage[](https://solanakite.org/docs/tokens/mint-tokens#usage) -------------------------------------------------------------- `const signature = await connection.mintTokens( mintAddress, // address of the token mint mintAuthority, // signer with authority to mint tokens amount, // amount of tokens to mint destination, // address to receive the tokens );` Parameters[](https://solanakite.org/docs/tokens/mint-tokens#parameters) ------------------------------------------------------------------------ * `mintAddress`: `Address` - Address of the token mint * `mintAuthority`: `KeyPairSigner` - Signer with authority to mint tokens * `amount`: `bigint` - Amount of tokens to mint (in base units) * `destination`: `Address` - Address to receive the minted tokens * `useTokenExtensions`: `boolean` (optional) - Use Token Extensions (Token-2022) program instead of classic Token program (default: true) Returns[](https://solanakite.org/docs/tokens/mint-tokens#returns) ------------------------------------------------------------------ Returns a `Promise` - The transaction signature that can be used to look up the transaction. Example[](https://solanakite.org/docs/tokens/mint-tokens#example) ------------------------------------------------------------------ `// Create a new token mint const mintAuthority = await connection.createWallet({ airdropAmount: lamports(1n * SOL), }); const mintAddress = await connection.createTokenMint({ mintAuthority, decimals: 9, name: "My Token", symbol: "TKN", uri: "https://example.com/token.json", }); // Mint 100 tokens to the mint authority's account const signature = await connection.mintTokens(mintAddress, mintAuthority, 100n, mintAuthority.address);` Error Handling[](https://solanakite.org/docs/tokens/mint-tokens#error-handling) -------------------------------------------------------------------------------- The function will throw an error if: * The mint authority is not the actual authority for the token mint * The destination account doesn’t exist * The mint authority lacks sufficient SOL to pay for the transaction * The RPC connection fails Last updated on October 2, 2025 [Get Token Metadata](https://solanakite.org/docs/tokens/get-token-metadata "Get Token Metadata") [Transfer Tokens](https://solanakite.org/docs/tokens/transfer-tokens "Transfer Tokens") --- # Get Logs [Skip to Content](https://solanakite.org/docs/transactions/get-logs#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") TransactionsGet Logs Get Logs ======== Retrieves logs for a transaction. Returns: `Promise>` `const logs = await connection.getLogs(signature);` Options[](https://solanakite.org/docs/transactions/get-logs#options) --------------------------------------------------------------------- * `signature`: `string` - Transaction signature to get logs for See also: [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link) , [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) Last updated on October 2, 2025 [Transfer Tokens](https://solanakite.org/docs/tokens/transfer-tokens "Transfer Tokens") [Get PDA and Bump](https://solanakite.org/docs/transactions/get-pda-and-bump "Get PDA and Bump") --- # Create Token Mint [Skip to Content](https://solanakite.org/docs/tokens/create-token-mint#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Create Token Mint Create Token Mint ================= Creates a new SPL token mint with specified parameters. Returns: `Promise
` Options[](https://solanakite.org/docs/tokens/create-token-mint#options) ------------------------------------------------------------------------ * `mintAuthority`: `KeyPairSigner` - Authority that can mint new tokens * `decimals`: `number` - Number of decimal places for the token * `name`: `string` (optional) - Name of the token (required if useTokenExtensions is true) * `symbol`: `string` (optional) - Symbol of the token (required if useTokenExtensions is true) * `uri`: `string` (optional) - URI pointing to the token’s metadata (eg: “[https://arweave.net/abc123](https://arweave.net/abc123)  ”) (required if useTokenExtensions is true) * `additionalMetadata`: `Record | Map` (optional) - Additional metadata fields (default: ) * `useTokenExtensions`: `boolean` (optional) - Use Token Extensions (Token-2022) program instead of classic Token program (default: true) Examples[](https://solanakite.org/docs/tokens/create-token-mint#examples) -------------------------------------------------------------------------- Create a token with Token Extensions (Token-2022) and additional metadata: `const mintAddress = await connection.createTokenMint({ mintAuthority: wallet, decimals: 9, name: "My Token", symbol: "TKN", uri: "https://example.com/token-metadata.json", additionalMetadata: { description: "A sample token", website: "https://example.com", }, });` Create a classic SPL token without metadata: `const mintAddress = await connection.createTokenMint({ mintAuthority: wallet, decimals: 9, useTokenExtensions: false, });` A `metadata.json` file, and any images inside, should be hosted at a [decentralized storage service](https://solana.com/developers/guides/getstarted/how-to-create-a-token#create-and-upload-image-and-offchain-metadata)  . The file itself is at minimum: `{ "image": "https://raw.githubusercontent.com/solana-developers/opos-asset/main/assets/CompressedCoil/image.png" }` Images should be square, and either 512x512 or 1024x1024 pixels, and less than 100kb if possible. See also: [Get Token Account Address](https://solanakite.org/docs/tokens/get-token-account-address) , [Mint Tokens](https://solanakite.org/docs/tokens/mint-tokens) , [Get Mint](https://solanakite.org/docs/tokens/get-mint) Last updated on October 2, 2025 [Check Token Account is Closed](https://solanakite.org/docs/tokens/check-token-account-is-closed "Check Token Account is Closed") [Get Token Mint Information](https://solanakite.org/docs/tokens/get-mint "Get Token Mint Information") --- # Get Token Mint Information [Skip to Content](https://solanakite.org/docs/tokens/get-mint#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Get Token Mint Information Get Token Mint Information ========================== The `getMint` function retrieves information about a token mint, including its decimals, authority, and supply. Usage[](https://solanakite.org/docs/tokens/get-mint#usage) ----------------------------------------------------------- `const mint = await connection.getMint(mintAddress, commitment);` Parameters[](https://solanakite.org/docs/tokens/get-mint#parameters) --------------------------------------------------------------------- * `mintAddress`: `Address` - Address of the token mint to get information for * `commitment`: `Commitment` (optional) - Desired confirmation level (default: “confirmed”) Returns[](https://solanakite.org/docs/tokens/get-mint#returns) --------------------------------------------------------------- Returns a `Promise` containing the mint information: * `decimals`: Number of decimal places for the token * `mintAuthority`: Public key of the account allowed to mint new tokens * `supply`: Current total supply of the token * Other metadata if the token uses Token Extensions Example[](https://solanakite.org/docs/tokens/get-mint#example) --------------------------------------------------------------- ``// Get information about the USDC mint const usdcMint = await connection.getMint("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); console.log(`Decimals: ${usdcMint.data.decimals}`); console.log(`Mint authority: ${usdcMint.data.mintAuthority}`); console.log(`Supply: ${usdcMint.data.supply}`);`` Last updated on October 2, 2025 [Create Token Mint](https://solanakite.org/docs/tokens/create-token-mint "Create Token Mint") [Get Token Account Address](https://solanakite.org/docs/tokens/get-token-account-address "Get Token Account Address") --- # Transfer Tokens [Skip to Content](https://solanakite.org/docs/tokens/transfer-tokens#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Tokens](https://solanakite.org/docs/tokens/check-token-account-is-closed "Tokens") Transfer Tokens Transfer Tokens =============== The `transferTokens` function transfers tokens from one account to another. The sender must sign the transaction. Usage[](https://solanakite.org/docs/tokens/transfer-tokens#usage) ------------------------------------------------------------------ `const signature = await connection.transferTokens({ sender: senderWallet, destination: recipientAddress, mintAddress: tokenMint, amount: 1_000_000n, maximumClientSideRetries: 0, });` Parameters[](https://solanakite.org/docs/tokens/transfer-tokens#parameters) ---------------------------------------------------------------------------- * `sender`: `KeyPairSigner` - Signer that owns the tokens and will sign the transaction * `destination`: `Address` - Address to receive the tokens * `mintAddress`: `Address` - Address of the token mint * `amount`: `bigint` - Amount of tokens to transfer (in base units) * `maximumClientSideRetries`: `number` (optional) - Maximum number of times to retry sending the transaction (default: 0) * `abortSignal`: `AbortSignal | null` (optional) - Signal to abort the transaction (default: null) * `useTokenExtensions`: `boolean` (optional) - Use Token Extensions (Token-2022) program instead of classic Token program (default: true) Returns[](https://solanakite.org/docs/tokens/transfer-tokens#returns) ---------------------------------------------------------------------- Returns a `Promise` - The transaction signature that can be used to look up the transaction. Example[](https://solanakite.org/docs/tokens/transfer-tokens#example) ---------------------------------------------------------------------- `// Create wallets for sender and recipient const [sender, recipient] = await Promise.all([ connection.createWallet({ airdropAmount: lamports(1n * SOL), }), connection.createWallet({ airdropAmount: lamports(1n * SOL), }), ]); // Create a new token mint const mintAddress = await connection.createTokenMint({ mintAuthority: sender, // sender will be the mint authority decimals: 9, name: "My Token", symbol: "TKN", uri: "https://example.com/token.json", }); // Mint some tokens to the sender's account await connection.mintTokens(mintAddress, sender, 100n, sender.address); // Transfer 50 tokens from sender to recipient with retries const signature = await connection.transferTokens({ sender, destination: recipient.address, mintAddress, amount: 50n, maximumClientSideRetries: 3, });` Error Handling[](https://solanakite.org/docs/tokens/transfer-tokens#error-handling) ------------------------------------------------------------------------------------ The function will throw an error if: * The sender doesn’t have sufficient tokens * The sender lacks sufficient SOL to pay for the transaction * The destination account doesn’t exist * The RPC connection fails * The maximum number of retries is exceeded Last updated on October 2, 2025 [Mint Tokens](https://solanakite.org/docs/tokens/mint-tokens "Mint Tokens") [Get Logs](https://solanakite.org/docs/transactions/get-logs "Get Logs") --- # Get Recent Signature Confirmation [Skip to Content](https://solanakite.org/docs/transactions/get-recent-signature-confirmation#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Get Recent Signature Confirmation Get Recent Signature Confirmation ================================= Checks the confirmation status of a recent transaction. Returns: `Promise` `const confirmed = await connection.getRecentSignatureConfirmation(signature);` Options[](https://solanakite.org/docs/transactions/get-recent-signature-confirmation#options) ---------------------------------------------------------------------------------------------- * `signature`: `string` - The signature of the transaction to check See also: [Send and Confirm Transaction](https://solanakite.org/docs/transactions/send-and-confirm-transaction) , [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link) Last updated on October 2, 2025 [Get PDA and Bump](https://solanakite.org/docs/transactions/get-pda-and-bump "Get PDA and Bump") [Send and Confirm Transaction](https://solanakite.org/docs/transactions/send-and-confirm-transaction "Send and Confirm Transaction") --- # Send Transaction from Instructions [Skip to Content](https://solanakite.org/docs/transactions/send-transaction-from-instructions#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Send Transaction from Instructions Send Transaction from Instructions ================================== > Like `sendTransactionWithSigners` from `@solana/helpers` Sends a transaction containing one or more instructions. The transaction will be signed by the fee payer. Returns: `Promise` - The unique transaction signature that can be used to look up the transaction `const signature = await connection.sendTransactionFromInstructions({ feePayer: wallet, instructions: [instruction1, instruction2], commitment: "confirmed", skipPreflight: true, maximumClientSideRetries: 0, abortSignal: null, });` Options[](https://solanakite.org/docs/transactions/send-transaction-from-instructions#options) ----------------------------------------------------------------------------------------------- * `feePayer`: `KeyPairSigner` - The account that will pay for the transaction’s fees * `instructions`: `Array` - Array of instructions to include in the transaction * `commitment`: [`Commitment`](https://docs.anza.xyz/consensus/commitments/) (optional) - Desired [commitment level](https://docs.anza.xyz/consensus/commitments/)  . Can be `"processed"`, `"confirmed"` (default), or `"finalized"`. * `skipPreflight`: `boolean` (optional) - Whether to skip preflight transaction checks. Enable to reduce latency, disable for more safety (default: true) * `maximumClientSideRetries`: `number` (optional) - Maximum number of times to retry if the transaction fails. Useful for handling temporary network issues (default: 0) * `abortSignal`: `AbortSignal | null` (optional) - Signal to abort the transaction. Use this to implement timeouts or cancel pending transactions (default: null) * `timeout`: `number` (optional) - Timeout in milliseconds for the transaction. Only used when maximumClientSideRetries is greater than 0 (default: undefined) Example[](https://solanakite.org/docs/transactions/send-transaction-from-instructions#example) ----------------------------------------------------------------------------------------------- Here’s an example of sending a transaction with a SOL transfer instruction: ``const feePayer = await connection.createWallet({ airdropAmount: lamports(1n * SOL) }); const recipient = await generateKeyPairSigner(); // Create an instruction to transfer SOL const transferInstruction = getTransferSolInstruction({ amount: lamports(0.1n * SOL), destination: recipient.address, source: feePayer }); // Send the transaction with the transfer instruction const signature = await connection.sendTransactionFromInstructions({ feePayer, instructions: [transferInstruction], maximumClientSideRetries: 3 }); console.log(`Transaction successful: ${signature}`); console.log(`Explorer link: ${connection.getExplorerLink("tx", signature)}`);`` You can also send multiple instructions in a single transaction: `// Create instructions to transfer SOL to multiple recipients const transferInstructions = recipients.map(recipient => getTransferSolInstruction({ amount: lamports(0.1n * SOL), destination: recipient.address, source: feePayer }) ); // Send all transfers in one transaction const signature = await connection.sendTransactionFromInstructions({ feePayer, instructions: transferInstructions, commitment: "confirmed" });` What Happens Automatically[](https://solanakite.org/docs/transactions/send-transaction-from-instructions#what-happens-automatically) ------------------------------------------------------------------------------------------------------------------------------------- The function will automatically: * Get a recent blockhash * Add compute budget instructions if needed * Sign the transaction with the fee payer * Set a priority fee, using your RPC provider’s priority fee estimation tools (depending on RPC provider). * Send and confirm the transaction, * Retry the transaction if requested and needed Error Handling[](https://solanakite.org/docs/transactions/send-transaction-from-instructions#error-handling) ------------------------------------------------------------------------------------------------------------- If the intruction fails, the function will throw an error. `error.message` is extracted from logs, so _should always be useful errors_. You should never see `custom program error 0xSomeHexCode`. Error messages take the format of `programName.instructionHandler: message`, for example: * `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.TransferChecked: insufficient funds` * `8jR5GeNzeweq35Uo84kGP3v1NcBaZWH5u62k7PxN4T2y.RefundOffer: A has one constraint was violated` * `11111111111111111111111111111111.Allocate: account already in use` If you see an error that doesn’t take this format, please file a bug! See also: [Send and Confirm Transaction](https://solanakite.org/docs/transactions/send-and-confirm-transaction) , [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) Last updated on October 2, 2025 [Send and Confirm Transaction](https://solanakite.org/docs/transactions/send-and-confirm-transaction "Send and Confirm Transaction") [Send Transaction from Instructions with Wallet App](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app "Send Transaction from Instructions with Wallet App") --- # Send and Confirm Transaction [Skip to Content](https://solanakite.org/docs/transactions/send-and-confirm-transaction#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Send and Confirm Transaction Send and Confirm Transaction ============================ Sends a transaction and waits for confirmation. Returns: `Promise` `await connection.sendAndConfirmTransaction(transaction, options);` Options[](https://solanakite.org/docs/transactions/send-and-confirm-transaction#options) ----------------------------------------------------------------------------------------- * `transaction`: `VersionedTransaction` - Transaction to send * `options`: `Object` (optional) * `commitment`: `Commitment` - Desired confirmation level * `skipPreflight`: `boolean` - Whether to skip preflight transaction checks See also: [Send Transaction from Instructions](https://solanakite.org/docs/transactions/send-transaction-from-instructions) , [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) Last updated on October 2, 2025 [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation "Get Recent Signature Confirmation") [Send Transaction from Instructions](https://solanakite.org/docs/transactions/send-transaction-from-instructions "Send Transaction from Instructions") --- # Convert Base58 String to Signature Bytes [Skip to Content](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Convert Base58 String to Signature Bytes Convert Base58 String to Signature Bytes ======================================== Converts a base58 encoded signature string to bytes (Uint8Array) format. Returns: `Uint8Array` - Signature in bytes format `const signatureBytes = connection.signatureBase58StringToBytes(base58Signature);` Parameters[](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes#parameters) --------------------------------------------------------------------------------------------------- * `base58Signature`: `string` - The signature in base58 encoded string format Examples[](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes#examples) ----------------------------------------------------------------------------------------------- Convert base58 signature string to bytes: `const base58Signature = "5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe"; const signatureBytes = connection.signatureBase58StringToBytes(base58Signature); console.log("Signature bytes:", signatureBytes);` Convert a signature from Solana Explorer to bytes: `// Signature from Solana Explorer or transaction logs const explorerSignature = "5rUQ2tX8bRzB2qJWnrBhHYgHsafpqVZwGwxVrtyYFZXJZs6yBVwerZHGbwsrDHKbRtKpxnWoHKmBgqYXVbU5TrHe"; const signatureBytes = connection.signatureBase58StringToBytes(explorerSignature); // Now you can use the bytes for further processing console.log("Signature length:", signatureBytes.length);` See also[](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes#see-also) ----------------------------------------------------------------------------------------------- * [Convert signature bytes to base58 string](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string) * [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link) - View transactions on Solana Explorer * [Get Logs](https://solanakite.org/docs/transactions/get-logs) - Get transaction logs Last updated on October 2, 2025 [Send Transaction from Instructions with Wallet App](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app "Send Transaction from Instructions with Wallet App") [Convert Signature Bytes to Base58 String](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string "Convert Signature Bytes to Base58 String") --- # Anchor [Skip to Content](https://solanakite.org/docs/anchor#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Anchor Anchor ====== Using Anchor with @solana/kit, Kite, and Codama[](https://solanakite.org/docs/anchor#using-anchor-with-solanakit-kite-and-codama) ---------------------------------------------------------------------------------------------------------------------------------- We could write a whole guide to using Anchor with Kite, but we thought it would be better to show you. QuickNode has an entire YouTube video covering using Anchor and Solana Kit, that also uses Kite: Here’s a full Anchor program - [anchor-escrow-2025](https://github.com/solanakite/anchor-escrow-2025)   - that uses Kite, Kit and Codama. There are two ways TypeScript/JavaScript is used to interact with Anchor programs: * TypeScript based tests * Solana wallets Either way, follow the steps below: 1\. Make a client for your Anchor program using Codama[](https://solanakite.org/docs/anchor#1-make-a-client-for-your-anchor-program-using-codama) -------------------------------------------------------------------------------------------------------------------------------------------------- Check out [`create-codama-client.ts`](https://github.com/solanakite/anchor-escrow-2025/blob/main/create-codama-client.ts) from the [anchor-escrow-2025](https://github.com/solanakite/anchor-escrow-2025)   repo. Codama will read the Anchor program’s IDL and create a TypeScript client for it, called `dist/js-client.js`, which is what we import. 2\. Use the Codama client to interact with your Anchor program[](https://solanakite.org/docs/anchor#2-use-the-codama-client-to-interact-with-your-anchor-program) ------------------------------------------------------------------------------------------------------------------------------------------------------------------ The Codama client includes automatically generated functions to send instructions for each instruction handler in your Anchor program. Check out [`example.test.ts`](https://github.com/solanakite/anchor-escrow-2025/blob/main/tests/escrow.test.ts) from the [anchor-escrow-2025](https://github.com/solanakite/anchor-escrow-2025)   repo as an example. ### Send instructions to your program’s instruction handlers[](https://solanakite.org/docs/anchor#send-instructions-to-your-programs-instruction-handlers) `import * as programClient from "../dist/js-client";` We import the entire client as `programClient`, which allows us to call all the program’s instruction handlers. The Escrow program has instruction handlers called `makeOffer`, `takeOffer`, `refundOffer`. Codama will create functions called `getMakeOfferInstructionAsync`, `getTakeOfferInstructionAsync`, `getRefundOfferInstructionAsync`, which we can use to crrate an instruction for each of these instruction handlers. For example, if your program has a `createBid` instruction handler, Codama will create a `getCreateBidInstructionAsync` function for it. If it has `addBet` and `settleBet` instruction handlers, Codama will create `getAddBetInstructionAsync` and `getSettleBetInstructionAsync` functions for them. You get the idea. `const takeOfferInstruction = await programClient.getTakeOfferInstructionAsync({ taker: bob, maker: alice.address, tokenMintA, tokenMintB, takerTokenAccountA: bobTokenAccountA, makerTokenAccountB: aliceTokenAccountB, offer: testOffer, vault: testVault, tokenProgram: TOKEN_EXTENSIONS_PROGRAM, });` We can then send the instructions to the network using Kite’s `sendTransactionFromInstructions` function. `await connection.sendTransactionFromInstructions({ feePayer: alice, instructions: [takeOfferInstruction], });` Go check the [full anchor-escrow-2025 tests](https://github.com/solanakite/anchor-escrow-2025/blob/main/tests/escrow.test.ts)   for more examples. We make accounts for our users, create tokens (using Solana Kite), and then use the Escrow program’s instruction handlers via `programClient`. ### Fetch and decode your program’s accounts[](https://solanakite.org/docs/anchor#fetch-and-decode-your-programs-accounts) Your unique Anchor data accounts - ie, the Structs you make in Rust - can be fetched and decoded using Kite’s `getAccountsFactory` function. This will create a `getAccounts` function for each of your program’s accounts. See the [Data Accounts](https://solanakite.org/docs/data-accounts/get-accounts) page. 3\. Use the wallet adapter to connect to Wallet Apps in your browser[](https://solanakite.org/docs/anchor#3-use-the-wallet-adapter-to-connect-to-wallet-apps-in-your-browser) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ For Next/React, you can allow Solana Wallet apps (like Phantom or Solflare) to connect to your app with using [`@solana/react`](https://github.com/anza-xyz/kit/tree/main/packages/react) . There’s a full example in the [React App Example](https://github.com/anza-xyz/kit/tree/main/examples/react-app)   repo. I’ll add an example repo here soon, unless you [add one first](https://github.com/solanakite/anchor-escrow-2025/pulls)  . Last updated on October 2, 2025 [Getting started](https://solanakite.org/docs "Getting started") [Connecting to a Solana RPC](https://solanakite.org/docs/connecting "Connecting to a Solana RPC") --- # Get PDA and Bump [Skip to Content](https://solanakite.org/docs/transactions/get-pda-and-bump#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Get PDA and Bump Get PDA and Bump ================ The `getPDAAndBump` function gets a Program Derived Address (PDA) and its bump seed from a program address and seeds. It automatically handles encoding of different seed types. Usage[](https://solanakite.org/docs/transactions/get-pda-and-bump#usage) ------------------------------------------------------------------------- `const { pda, bump } = await connection.getPDAAndBump(programAddress, seeds); // or with big-endian encoding for BigInt seeds const { pda, bump } = await connection.getPDAAndBump(programAddress, seeds, true);` Parameters[](https://solanakite.org/docs/transactions/get-pda-and-bump#parameters) ----------------------------------------------------------------------------------- * `programAddress`: `Address` - The program address to derive the PDA from * `seeds`: `Array` - Array of seeds to derive the PDA. Can include: * Strings (encoded as UTF-8) * Addresses (encoded as base58) * BigInts (encoded as 8-byte little-endian by default, or big-endian if `useBigEndian` is true) * Uint8Array (used as-is) * `useBigEndian`: `boolean` (optional) - Whether to use big-endian byte order for BigInt seeds (default: false) Returns[](https://solanakite.org/docs/transactions/get-pda-and-bump#returns) ----------------------------------------------------------------------------- Returns a `Promise<{pda: Address, bump: number}>` containing: * `pda`: The derived program address * `bump`: The bump seed used to derive the address Example[](https://solanakite.org/docs/transactions/get-pda-and-bump#example) ----------------------------------------------------------------------------- `const programAddress = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" as Address; const seeds = [ "offer", // string seed aliceAddress, // address seed 420n, // bigint seed ]; // Default: little-endian encoding for BigInt seeds const { pda, bump } = await connection.getPDAAndBump(programAddress, seeds); console.log("PDA:", pda.toString()); console.log("Bump seed:", bump); // Using big-endian encoding for BigInt seeds const { pda: pdaBigEndian, bump: bumpBigEndian } = await connection.getPDAAndBump(programAddress, seeds, true); console.log("PDA (big-endian):", pdaBigEndian.toString()); console.log("Bump seed (big-endian):", bumpBigEndian); // Using Uint8Array seeds const customSeed = new Uint8Array([1, 2, 3, 4]); const seedsWithUint8Array = ["custom", customSeed, 123n]; const { pda: pdaCustom, bump: bumpCustom } = await connection.getPDAAndBump(programAddress, seedsWithUint8Array);` Understanding PDAs[](https://solanakite.org/docs/transactions/get-pda-and-bump#understanding-pdas) --------------------------------------------------------------------------------------------------- Program Derived Addresses (PDAs) are special addresses that are: 1. Derived deterministically from a set of seeds and a program address 2. Guaranteed to not have a corresponding private key 3. Can only be signed for by their owning program Common uses for PDAs include: * Creating deterministic addresses for program accounts * Cross-Program Invocation (CPI) signing * Organizing program data with predictable addresses Last updated on October 2, 2025 [Get Logs](https://solanakite.org/docs/transactions/get-logs "Get Logs") [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation "Get Recent Signature Confirmation") --- # Get Accounts [Skip to Content](https://solanakite.org/docs/data-accounts/get-accounts#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Data AccountsGet Accounts Get Accounts ============ The `getAccountsFactory` function creates a function (called `get(Something)Accounts`) that gets all program accounts of a particular type. Accounts will be decoded, so you can see the actual values for each of the fields inside. Useful for getting all offers, auctions, or users from a program. This is the only factory function you need to use in Kite. That’s because it makes functions to get the accounts of a particular type from your Anchor programs. Have structs for `Offer` or `User` or `Election` in your Anchor program? Use this function to make a `getOffers` or `getUsers` or `getElections` function. Whatever struct you need to fetch from your Anchor program, use this function to make a function to get it. Usage[](https://solanakite.org/docs/data-accounts/get-accounts#usage) ---------------------------------------------------------------------- `// Create a function to get all offers const getOffers = connection.getAccountsFactory( programClient.ESCROW_PROGRAM_ADDRESS, OFFER_DISCRIMINATOR, getOfferDecoder(), ); // Use it to get all offers const offers = await getOffers();` Parameters[](https://solanakite.org/docs/data-accounts/get-accounts#parameters) -------------------------------------------------------------------------------- * `programAddress`: `Address` - The program address to query accounts from * `discriminator`: `Uint8Array` - The discriminator to filter accounts by (usually the first 8 bytes of the account data) * `decoder`: `Decoder` - The decoder to use for parsing account data into your custom type Returns[](https://solanakite.org/docs/data-accounts/get-accounts#returns) -------------------------------------------------------------------------- Returns: `() => Promise>` - A function that returns an array of decoded accounts Examples[](https://solanakite.org/docs/data-accounts/get-accounts#examples) ---------------------------------------------------------------------------- This example shows how to get all offers from an escrow program. The `programClient`, `OFFER_DISCRIMINATOR` and `getOfferDecoder` all come from a generated client made by Codama. `import * as programClient from "../dist/js-client"; import { getOfferDecoder, OFFER_DISCRIMINATOR } from "../dist/js-client"; // Create a function to get all offers const getOffers = connection.getAccountsFactory( programClient.ESCROW_PROGRAM_ADDRESS, OFFER_DISCRIMINATOR, getOfferDecoder(), ); // Use it to get all offers const offers = await getOffers();` Create a function to get all auctions: `const getAuctions = connection.getAccountsFactory( programClient.AUCTION_PROGRAM_ADDRESS, AUCTION_DISCRIMINATOR, getAuctionDecoder() ); // Use it to get all auctions const auctions = await getAuctions();` Create a function to get all users: `const getUsers = connection.getAccountsFactory( programClient.USER_PROGRAM_ADDRESS, USER_DISCRIMINATOR, getUserDecoder() ); // Use it to get all users const users = await getUsers();` Understanding Account Factories[](https://solanakite.org/docs/data-accounts/get-accounts#understanding-account-factories) -------------------------------------------------------------------------------------------------------------------------- Account factories are useful when you need to: * Get all accounts of a particular type from a program * Decode account data into a structured format * Work with multiple accounts of the same type Common uses include: * Getting all offers in an escrow program * Getting all auctions in an auction program * Getting all users in a user management program See also: [Get PDA and Bump](https://solanakite.org/docs/data-accounts/get-pda-and-bump) Last updated on October 2, 2025 [Convert Signature Bytes to Base58 String](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string "Convert Signature Bytes to Base58 String") [Get PDA and Bump](https://solanakite.org/docs/data-accounts/get-pda-and-bump "Get PDA and Bump") --- # Sign Message from Wallet App [Skip to Content](https://solanakite.org/docs/signing-messages/sign-message-from-wallet-app#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Signing MessagesSign Message from Wallet App Sign Message from Wallet App ============================ Signs a message using a wallet app (like Phantom, Solflare, etc.) instead of a local keypair. Returns: `Promise` (base58 encoded signature) `const signature = await connection.signMessageFromWalletApp({ message: "Hello, Solana!", walletApp: walletApp, // TransactionSendingSigner from your wallet app });` Options[](https://solanakite.org/docs/signing-messages/sign-message-from-wallet-app#options) --------------------------------------------------------------------------------------------- * `message`: `string` - The message to sign * `walletApp`: `TransactionSendingSigner` - The wallet app signer to use for signing Examples[](https://solanakite.org/docs/signing-messages/sign-message-from-wallet-app#examples) ----------------------------------------------------------------------------------------------- Sign a message using a wallet app: `const signature = await connection.signMessageFromWalletApp({ message: "Hello, Solana!", walletApp: walletApp, });` See also: [Send Transaction from Instructions with Wallet App](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app) Last updated on October 2, 2025 [Get PDA and Bump](https://solanakite.org/docs/data-accounts/get-pda-and-bump "Get PDA and Bump") [Terminology](https://solanakite.org/docs/terminology "Terminology") --- # Changelog [Skip to Content](https://solanakite.org/docs/changelog#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Changelog Changelog ========= This changelog tracks all notable changes to Kite. For more information about specific versions, please refer to the [GitHub releases](https://github.com/helius-labs/kite/releases)  . Kite version 1.7.0[](https://solanakite.org/docs/changelog#kite-version-170) ----------------------------------------------------------------------------- A big thanks to @amilz for all of these! ### Changes[](https://solanakite.org/docs/changelog#changes) * Update Solana Kit to V3 (thanks @amilz) * Added commitment param to `airdropIfRequired()` (and `createWallet()`) for quicker airdrop processing * Adds @solana/promises to dependencies (thanks @amilz) * Improve timeout logic for smart transactions based on commitment with ability to override default timeout value (thanks @amilz) ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes) * Fix bug when when using finalized commitment, retry would attempt before the transaction had been confirmed even though the transaction has landed * Fix creating token mints without Metadata Kite version 1.6.0[](https://solanakite.org/docs/changelog#kite-version-160) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions) * Add `getTokenMetadata()` function to retrieve token metadata using metadata pointer extensions. Supports both metadata stored directly in mint accounts and in separate metadata accounts. Returns name, symbol, URI, update authority, mint address, and additional metadata. Works with Token-Extension mints that have metadata pointer extension enabled. Kite version 1.5.5[](https://solanakite.org/docs/changelog#kite-version-155) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-1) * Add `useBigEndian` option to `getPDAAndBump()` ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-1) * Fix ‘Please set either httpUrl or requiredParam for cluster quicknode-devnet in clusters.ts’ to `getExplorerLink()`. Getting Explorer URLs now uses the same logic as `connect()`. Kite version 1.5.4[](https://solanakite.org/docs/changelog#kite-version-154) ----------------------------------------------------------------------------- ### Changes[](https://solanakite.org/docs/changelog#changes-1) * Fix URLs in docs Kite version 1.5.3[](https://solanakite.org/docs/changelog#kite-version-153) ----------------------------------------------------------------------------- ### Changes[](https://solanakite.org/docs/changelog#changes-2) * Allow `Uint8Array` to be specified for `getPDAAndBump` for situations where people have their own encoding strategies. * Bump solana kit to 2.3.0 Kite version 1.5.2[](https://solanakite.org/docs/changelog#kite-version-152) ----------------------------------------------------------------------------- ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-2) * Fix issue with explorer URLs when using Helius clusters Kite version 1.5.1[](https://solanakite.org/docs/changelog#kite-version-151) ----------------------------------------------------------------------------- ### Changes[](https://solanakite.org/docs/changelog#changes-3) * Replace bs58 library with Solana Kit’s native Base58 codec to reduce dependencies - thanks @a\_milz! Kite version 1.5.0[](https://solanakite.org/docs/changelog#kite-version-150) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-2) * Add `checkIfAddressIsPublicKey()` function to validate if an address is a valid Ed25519 public key * Add `checkAddressMatchesPrivateKey()` function to verify if a private key matches a given address * Add QuickNode cluster support with “quicknode-mainnet”, “quicknode-devnet”, and “quicknode-testnet” options in `connect()` ### Changes[](https://solanakite.org/docs/changelog#changes-4) * Improve browser compatibility by using Uint8Array instead of Buffer throughout the codebase * Documentation improvements and typo fixes Kite version 1.4.0[](https://solanakite.org/docs/changelog#kite-version-140) ----------------------------------------------------------------------------- ### Changes[](https://solanakite.org/docs/changelog#changes-5) * Use Uint8Array rather than Buffer for improved browser compatibility Kite version 1.3.4[](https://solanakite.org/docs/changelog#kite-version-134) ----------------------------------------------------------------------------- ### Changes[](https://solanakite.org/docs/changelog#changes-6) * You no longer need to specify any options when using `createWallets()` with just a number parameter. Kite version 1.3.3[](https://solanakite.org/docs/changelog#kite-version-133) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-3) * Add `signMessageFromWalletApp()` for signing messages using a wallet app Kite version 1.3.2[](https://solanakite.org/docs/changelog#kite-version-132) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-4) * Add `signatureBytesToBase58String()` and `signatureBase58StringToBytes()` utility functions for converting between signature formats * Add `sendTransactionFromInstructionsWithWalletApp()` for wallet app integration ### Changes[](https://solanakite.org/docs/changelog#changes-7) * Removed using `TransactionSendingSigner` from `sendTransactionFromInstructions()`. This wasn’t the right approach, browser apps should use `sendTransactionFromInstructionsWithWalletApp()` Kite version 1.3.1[](https://solanakite.org/docs/changelog#kite-version-131) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-5) * `sendTransactionFromInstructions()` now supports both `KeyPairSigner` and `TransactionSendingSigner` for wallet integration. Kite version 1.3.0[](https://solanakite.org/docs/changelog#kite-version-130) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-6) * `connect()` now accepts RPC and RPC subscription clients directly as arguments. This allows you to re-use existing connections in browser environments and use Kite with custom RPC transports. Kite version 1.2.5[](https://solanakite.org/docs/changelog#kite-version-125) ----------------------------------------------------------------------------- ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-3) * Docs: use ‘Token Extensions’ consistently Kite version 1.2.4[](https://solanakite.org/docs/changelog#kite-version-124) ----------------------------------------------------------------------------- ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-4) * Update `connection.rpc` type to better reflect Solana Kit. Kite version 1.2.3[](https://solanakite.org/docs/changelog#kite-version-123) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-7) * Add `getAccountsFactory()` Kite version 1.2.2[](https://solanakite.org/docs/changelog#kite-version-122) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-8) * More error messages are now shown in the new, friendly format. Kite version 1.2.1[](https://solanakite.org/docs/changelog#kite-version-121) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-9) * Error messages from Anchor are also now shown in the new, friendly format. No more custom program errors! Kite version 1.2.0[](https://solanakite.org/docs/changelog#kite-version-120) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-10) * Errors from transactions will now include: * a better `message`, featuring * the name of the program * the instruction handler * the error text from the program’s instruction handler Rather than ‘custom program error’ * a `transaction` property, so you can inspect the transaction (including its logs) from the error. ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-5) * Fix accidental nested array on getLogs return type * Add missing maxSupportedTransactionVersion param to `getLogs()` Kite version 1.1.1[](https://solanakite.org/docs/changelog#kite-version-111) ----------------------------------------------------------------------------- * Update to latest @solana/kit Kite version 1.1.0[](https://solanakite.org/docs/changelog#kite-version-110) ----------------------------------------------------------------------------- ### Additions[](https://solanakite.org/docs/changelog#additions-11) * Main package is now `solana-kite`. * Add `getPDAAndBump()` - calculates a Program Derived Address (PDA) and its bump seed from a program address and seeds, automatically encoding different seed types (strings, addresses, and bigints). * `getTokenAccountBalance()` - can now take either a wallet and token mint (it will find the token account and then get the balance), or a token account address. * Add `checkTokenAccountIsClosed()` - checks if a token account is closed or doesn’t exist, supporting both direct token account address and wallet+mint lookup. * Add TSDoc comments for all functions, so VSCode and other editors can display parameters nicely. * Solana `@solana/kit` has been renamed to `@solana/kit`, and dependencies have been updated accordingly. ### Bug fixes[](https://solanakite.org/docs/changelog#bug-fixes-6) * Fix bug where types were generated but not shown to consuming apps. * Fix bug where `mintTokens()` was minting to the mint authority rather than the destination. Kite version 1.0.1[](https://solanakite.org/docs/changelog#kite-version-101) ----------------------------------------------------------------------------- * Add `getTokenAccountBalance()` * Minor docs updates Kite version 1.0[](https://solanakite.org/docs/changelog#kite-version-10) -------------------------------------------------------------------------- ### Major Changes[](https://solanakite.org/docs/changelog#major-changes) * New name: `@helius-dev/kite` * Use @solana/web3.js version 2 * A new `connect()` method is provided, which returns an object with `rpc`, `rpcSubscriptions`, `sendAndConfirmTransaction()`, `getExplorerLink()` and the other functions in this library. * Most functions are now a property of `connection`. For example, `connection.getLamportBalance()` instead of `getBalance()`. * Added support for Helius RPCs - just specify the name and as long as the Helius API key is set in the environment, it will be used. ### Style Changes[](https://solanakite.org/docs/changelog#style-changes) * We’ve tried to match the coding style of web3.js v2 * `xToY()` becomes `createXFromY`. `create` is now the preferred nomenclature, so `initializeKeypair` is now `createWallet`, * Functions that return a `doThing()` function are called `doThingFactory()` * We do not use web3.js Hungarian notation - this library uses `getFoo()` rather than `getFooPromise()` since TS rarely uses Hungarian. ### Other Changes[](https://solanakite.org/docs/changelog#other-changes) * `initializeKeypair` is now `createKeyPairSigner` * Since web3.js uses Promises in more places, nearly every helper function returns a `Promise<>` now, so you’ll use `await` more often. * localhost links on `getExplorerLink()` no longer add an unnecessary customUrl parameter * `confirmTransaction` is now `getRecentSignatureConfirmation` * We no longer support base58 encoded private keys - instead we use the ‘Array of numbers’ format exclusively. If you have base58 encoded private keys you can convert them with the previous version of this library. * Use `tsx` over `esrun`. While `tsx` needs a `tsconfig.json` file, `tsx` has many more users and is more actively maintained. * Remove CommonJS support. Previous changelog as @solana/helpers[](https://solanakite.org/docs/changelog#previous-changelog-as-solanahelpers) ------------------------------------------------------------------------------------------------------------------- ### Version 2.5[](https://solanakite.org/docs/changelog#version-25) * Add `makeTokenMint()` * 2.5.4 includes a few fixes to build system and TS types that were missing in earlier 2.5.x releases * 2.5.6 includes a fix for esm module post-build script ### Version 2.4[](https://solanakite.org/docs/changelog#version-24) * Add `createAccountsMintsAndTokenAccounts()` ### Version 2.3[](https://solanakite.org/docs/changelog#version-23) * Improved browser support by only loading node-specific modules when they are needed. Thanks @piotr-layerzero! ### Version 2.2[](https://solanakite.org/docs/changelog#version-22) * Add `getSimulationComputeUnits()` ### Version 2.1[](https://solanakite.org/docs/changelog#version-21) * Add `initializeKeypair()` * Change documentation to be task based. ### Version 2.0[](https://solanakite.org/docs/changelog#version-20) * **Breaking**: Replace both `requestAndConfirmAirdropIfRequired()` and `requestAndConfirmAirdrop()` with a single function, `airdropIfRequired()`. See \[README.md\]! * Fix error handling in `confirmTransaction()` to throw errors correctly. * Added `getLogs()` function ### Version 1.5[](https://solanakite.org/docs/changelog#version-15) * Added `getExplorerLink()` ### Version 1.4[](https://solanakite.org/docs/changelog#version-14) * Added `requestAndConfirmAirdropIfRequired()` ### Version 1.3[](https://solanakite.org/docs/changelog#version-13) * Now just `helpers`. The old `node-helpers` package is marked as deprecated. * Added `requestAndConfirmAirdrop()` * Added `getCustomErrorMessage()` ### Version 1.2[](https://solanakite.org/docs/changelog#version-12) * Added `addKeypairToEnvFile()` ### Version 1.0[](https://solanakite.org/docs/changelog#version-10) * Original release. Last updated on October 2, 2025 [Terminology](https://solanakite.org/docs/terminology "Terminology") --- # Terminology [Skip to Content](https://solanakite.org/docs/terminology#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") Terminology Terminology =========== Account[](https://solanakite.org/docs/terminology#account) ----------------------------------------------------------- A Solana account, available at an address. Accounts can represent people (like a wallet), programs (like the token program, or airdrop program), or data (like a token account). Address[](https://solanakite.org/docs/terminology#address) ----------------------------------------------------------- An address is a value where a Solana account can be found. Addresses can be: * public keys - typically used for wallets, token mints, or programs. * program derived addresses (PDA) - typically used for associated token accounts, program data accounts. Kite uses the type `Address` for addresses. For users that are signing transactions, `address` is a property of `KeypairSigner`. For other users, programs you can make an address with `toAddress("PROGRAM ADDRESS")`; Associated Token Account[](https://solanakite.org/docs/terminology#associated-token-account) --------------------------------------------------------------------------------------------- A token account associated with either a wallet or a PDA. There’s also an associated token program that can be used to create and manage these accounts. base58[](https://solanakite.org/docs/terminology#base58) --------------------------------------------------------- Base58 is a binary-to-text encoding scheme that is used to represent binary data as an alphanumeric string. It is a popular encoding scheme for representing public keys on the Solana blockchain. Base58 ensures that the string is human readable and can be easily typed by hand - avoiding characters that are easily mistyped such as ‘0’, ‘O’, ‘l’, ‘I’, and ‘o’. Cluster[](https://solanakite.org/docs/terminology#cluster) ----------------------------------------------------------- The Solana blockchain is a global computer. It is made up of many nodes that are running the Solana software. Each cluster is an instance of the Solana software running on a set of nodes. There are clusters for: * Mainnet - production Solana blockchain * Devnet - used for program development - as a Solana developer, you will spend most of your time either here on on localnet. You can get SOL for free here. * Localnet (technically not a cluster, since it’s only one machine) * Testnet - used for testing future versions of the Solana software. Instruction[](https://solanakite.org/docs/terminology#instruction) ------------------------------------------------------------------- An instruction is a single function call to a program. Instruction Handler[](https://solanakite.org/docs/terminology#instruction-handler) ----------------------------------------------------------------------------------- An instruction handler is a function that is called when an instruction is sent to a program. Note that some tools and documentation refer to instruction handlers as “instructions”. ix deprecated[](https://solanakite.org/docs/terminology#ix-) ------------------------------------------------------------- A abbreviation for [‘instruction’](https://solanakite.org/docs/terminology#instruction) . You should avoid abbreviations in your code, they make it hard to read and search your codebase. Keypair[](https://solanakite.org/docs/terminology#keypair) ----------------------------------------------------------- A keypair is a pair of private and public keys. It is used to represent a wallet. In Kite and Solana Kit, a keypair is a `KeypairSigner`. KeypairSigner[](https://solanakite.org/docs/terminology#keypairsigner) ----------------------------------------------------------------------- A `KeypairSigner` is a wallet that can sign transactions. `KeypairSigner` wraps the the `CryptoKeypair` type built into browsers and node.js, and adds useful Solana properties like the `address` (which is in base58). logs[](https://solanakite.org/docs/terminology#logs) ----------------------------------------------------- Logs are a way to track the execution of a program. They are a collection of strings that are logged by the program. You can use `getLogs()` to get the logs from a transaction. Message[](https://solanakite.org/docs/terminology#message) ----------------------------------------------------------- A message is a collection of instructions to be executed on the Solana blockchain. The message is signed by the wallet to prove ownership. Multisig[](https://solanakite.org/docs/terminology#multisig) ------------------------------------------------------------- A multisig is a wallet that is owned by multiple private keys. Some amount of signatures are required to send a transaction from the wallet. The most common multisig on Solana is Squads. Lamports[](https://solanakite.org/docs/terminology#lamports) ------------------------------------------------------------- Lamports are the smallest unit of SOL. 1 SOL is equal to 1,000,000,000 lamports. onchain program[](https://solanakite.org/docs/terminology#onchain-program) --------------------------------------------------------------------------- An onchain program is a program that is deployed on the Solana blockchain. PDA[](https://solanakite.org/docs/terminology#pda) --------------------------------------------------- A PDA is a program derived address. It is an address that is created by a program and and one or more seeds - the same seeds always return the same address. Associated token accounts are a type of PDA - they are created by the Associated Token Program and the mint address of the token. private key[](https://solanakite.org/docs/terminology#private-key) ------------------------------------------------------------------- A private key is a secret value that is used to prove ownership of a wallet. Private keys on Solana are represented as an array of numbers, and should be stored securely. Mobile apps store private keys in the device’s secure enclave. Browser wallets typially store private keys encrypted in the browser’s local storage. Server side apps store private keys in `.env` files or other secure locations outside of git repos. Older programs sometimes refer to private keys as ‘secret keys’. Program[](https://solanakite.org/docs/terminology#program) ----------------------------------------------------------- A program is a collection of instruction handlers, deployed and running at an address on the Solana blockchain. public key[](https://solanakite.org/docs/terminology#public-key) ----------------------------------------------------------------- A public key is a number that is derived from a private key. It is used to identify a wallet. Public keys on Solana are represented as a base58 encoded string. Secret Key deprecated[](https://solanakite.org/docs/terminology#secret-key-) ----------------------------------------------------------------------------- See [‘private key’](https://solanakite.org/docs/terminology#private-key) . Signing[](https://solanakite.org/docs/terminology#signing) ----------------------------------------------------------- The process of proving ownership of a wallet by digitally signing a message. Smart Contract deprecated[](https://solanakite.org/docs/terminology#smart-contract-) ------------------------------------------------------------------------------------- See [‘Program’](https://solanakite.org/docs/terminology#program) . SOL[](https://solanakite.org/docs/terminology#sol) --------------------------------------------------- SOL is the native token of Solana. It is used to pay for transactions on the network. Token[](https://solanakite.org/docs/terminology#token) ------------------------------------------------------- A token is a representation of an asset on the Solana blockchain. Tokens other than SOL are called SPL-Tokens. Token Account[](https://solanakite.org/docs/terminology#token-account) ----------------------------------------------------------------------- An account that stores the balance of a particular token. Token Mint[](https://solanakite.org/docs/terminology#token-mint) ----------------------------------------------------------------- A token mint is a ‘factory’ that creates tokens of a given type. It can be called by a mint authority to create new tokens. Transaction[](https://solanakite.org/docs/terminology#transaction) ------------------------------------------------------------------- A transaction is a collection of instructions to be executed on the Solana blockchain. Transaction Signature[](https://solanakite.org/docs/terminology#transaction-signature) --------------------------------------------------------------------------------------- The signature of a transaction is the unique identifier for a transaction. tx deprecated[](https://solanakite.org/docs/terminology#tx-) ------------------------------------------------------------- A abbreviation for [‘transaction’](https://solanakite.org/docs/terminology#transaction) . You should avoid abbreviations in your code, they make it hard to read and search your codebase. Wallet[](https://solanakite.org/docs/terminology#wallet) --------------------------------------------------------- Represents a Solana account. It has a public key and one or more private keys. In Kite, a wallet is a `KeypairSigner`. Wallet Adapter[](https://solanakite.org/docs/terminology#wallet-adapter) ------------------------------------------------------------------------- A wallet adapter is that allows a dapp to connect to a wallet. When using @solana/kit, you use `@solana/react` module to connect to a wallet. See [Anchor](https://solanakite.org/docs/anchor) for more information. Wallet App[](https://solanakite.org/docs/terminology#wallet-app) ----------------------------------------------------------------- A wallet app is a program that can be used to create and manage wallets, like Phantom or Solflare. Last updated on October 2, 2025 [Sign Message from Wallet App](https://solanakite.org/docs/signing-messages/sign-message-from-wallet-app "Sign Message from Wallet App") [Changelog](https://solanakite.org/docs/changelog "Changelog") --- # Convert Signature Bytes to Base58 String [Skip to Content](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Convert Signature Bytes to Base58 String Convert Signature Bytes to Base58 String ======================================== Converts a signature from bytes (Uint8Array) to a base58 encoded string format. Returns: `string` - Base58 encoded signature `const base58Signature = connection.signatureBytesToBase58String(signatureBytes);` Parameters[](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string#parameters) --------------------------------------------------------------------------------------------------- * `signatureBytes`: `Uint8Array` - The signature in bytes format Examples[](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string#examples) ----------------------------------------------------------------------------------------------- Convert signature bytes to base58 string: `// Assuming you have signature bytes from a transaction const signatureBytes = new Uint8Array([/* signature bytes */]); const base58Signature = connection.signatureBytesToBase58String(signatureBytes); console.log("Base58 signature:", base58Signature);` Convert a signature from a transaction result: `const signature = await connection.sendTransactionFromInstructions({ feePayer: wallet, instructions: [instruction], }); // Get the signature bytes and convert to base58 const signatureBytes = new Uint8Array(Buffer.from(signature, 'base64')); const base58Signature = connection.signatureBytesToBase58String(signatureBytes); console.log("Base58 signature:", base58Signature);` See also[](https://solanakite.org/docs/transactions/signature-bytes-to-base58-string#see-also) ----------------------------------------------------------------------------------------------- * [Convert base58 string to signature bytes](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes) * [Get Explorer Link](https://solanakite.org/docs/explorer/get-explorer-link) - View transactions on Solana Explorer * [Get Recent Signature Confirmation](https://solanakite.org/docs/transactions/get-recent-signature-confirmation) - Check transaction status Last updated on October 2, 2025 [Convert Base58 String to Signature Bytes](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes "Convert Base58 String to Signature Bytes") [Get Accounts](https://solanakite.org/docs/data-accounts/get-accounts "Get Accounts") --- # Send Transaction from Instructions with Wallet App [Skip to Content](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Transactions](https://solanakite.org/docs/transactions/get-logs "Transactions") Send Transaction from Instructions with Wallet App Send Transaction from Instructions with Wallet App ================================================== Sends a transaction using a wallet app (like Phantom, Solflare, etc.) instead of a local keypair. This is the recommended way to send transactions in browser environments. Returns: `Promise` (transaction signature) `const signature = await connection.sendTransactionFromInstructionsWithWalletApp({ feePayer: walletApp, // TransactionSendingSigner from your wallet app instructions: [instruction1, instruction2], abortSignal: null, // Optional: AbortSignal for cancellation });` Options[](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app#options) --------------------------------------------------------------------------------------------------------------- * `feePayer`: `TransactionSendingSigner` - The wallet app signer to use for paying fees and signing * `instructions`: `Array` - Array of instructions to include in the transaction * `abortSignal`: `AbortSignal | null` - Optional signal to abort the transaction Examples[](https://solanakite.org/docs/transactions/send-transaction-from-instructions-with-wallet-app#examples) ----------------------------------------------------------------------------------------------------------------- Send a transaction using a wallet app: `const signature = await connection.sendTransactionFromInstructionsWithWalletApp({ feePayer: walletApp, instructions: [instruction1, instruction2], });` Send a transaction with the ability to cancel: `const controller = new AbortController(); const signature = await connection.sendTransactionFromInstructionsWithWalletApp({ feePayer: walletApp, instructions: [instruction1, instruction2], abortSignal: controller.signal, }); // To cancel the transaction: controller.abort();` See also: [Sign Message from Wallet App](https://solanakite.org/docs/wallets/sign-message-from-wallet-app) Last updated on October 2, 2025 [Send Transaction from Instructions](https://solanakite.org/docs/transactions/send-transaction-from-instructions "Send Transaction from Instructions") [Convert Base58 String to Signature Bytes](https://solanakite.org/docs/transactions/signature-base58-string-to-bytes "Convert Base58 String to Signature Bytes") --- # Get PDA and Bump [Skip to Content](https://solanakite.org/docs/data-accounts/get-pda-and-bump#nextra-skip-nav) [Documentation](https://solanakite.org/docs "Documentation") [Data Accounts](https://solanakite.org/docs/data-accounts/get-accounts "Data Accounts") Get PDA and Bump Get PDA and Bump ================ Calculates a Program Derived Address (PDA) and its bump seed from a program address and seeds. Automatically handles encoding of different seed types (strings, addresses, and bigints). Returns: `Promise<{pda: Address, bump: number}>` `const { pda, bump } = await connection.getPDAAndBump( programAddress, ["my-seed", walletAddress, 123n] );` Parameters[](https://solanakite.org/docs/data-accounts/get-pda-and-bump#parameters) ------------------------------------------------------------------------------------ * `programAddress`: `Address` - The program address to derive the PDA from * `seeds`: `Array` - Array of seeds to derive the PDA. Can be a mix of: * `string` - Will be encoded as UTF-8 bytes * `Address` - Will be encoded as a Solana address * `BigInt` - Will be encoded as 8-byte little-endian bytes * `Uint8Array` - Will be used as-is (for custom encoding strategies) Examples[](https://solanakite.org/docs/data-accounts/get-pda-and-bump#examples) -------------------------------------------------------------------------------- Create a PDA with string seeds: `const { pda, bump } = await connection.getPDAAndBump( programAddress, ["my-seed", "another-seed"] );` Create a PDA with mixed seed types: `const { pda, bump } = await connection.getPDAAndBump( programAddress, ["my-seed", walletAddress, 123n] );` Create a PDA with just a number seed: `const { pda, bump } = await connection.getPDAAndBump( programAddress, [123n] );` See also: [Get Accounts Factory](https://solanakite.org/docs/data-accounts/get-accounts-factory) Last updated on October 2, 2025 [Get Accounts](https://solanakite.org/docs/data-accounts/get-accounts "Get Accounts") [Sign Message from Wallet App](https://solanakite.org/docs/signing-messages/sign-message-from-wallet-app "Sign Message from Wallet App") --- # Kite: the modern TypeScript client for Solana Kit [Skip to Content](https://solanakite.org/docs/wallets/sign-message-from-wallet-app#nextra-skip-nav) 404 === This page could not be found. ----------------------------- --- # Kite: the modern TypeScript client for Solana Kit [Skip to Content](https://solanakite.org/docs/data-accounts/get-accounts-factory#nextra-skip-nav) 404 === This page could not be found. ----------------------------- ---