Installation

Get started with Kit

Kit is a JavaScript SDK for building Solana apps across environments like Node, the web, and React Native. It provides a comprehensive set of data types and helper functions, forming the foundation for interacting with Solana in JavaScript.

Coming from Web3.js?

Check out our Upgrade guide to see how Kit compares to Web3.js.

Quick start

Choose the client setup that fits your environment:

Install packages

Install Kit and the plugins for RPC connectivity and signer management.

npm install @solana/kit @solana/kit-plugin-rpc @solana/kit-plugin-signer

Install program plugins

Install plugins for any Solana program you want to interact with. You can find a full list on the Available Plugins page.

npm install @solana-program/system @solana-program/token

Create your client

import {  } from '@solana/kit';
import {  } from '@solana/kit-plugin-rpc';
import {  } from '@solana/kit-plugin-signer';
import {  } from '@solana-program/system';
import {  } from '@solana-program/token';
 
const  = await ()
    .(('~/.config/solana/id.json'))
    .(({ : 'https://api.mainnet-beta.solana.com' }))
    .(())
    .(());
 
// Here are some of the things you can do with your client:
// client.rpc.getBalance(address).send();
// client.system.instructions.transferSol({...}).sendTransaction();
// client.token.accounts.mint.fetch(address);
// client.sendTransaction(instructions);
// And more...

This example loads the default Solana CLI keypair. See Setting Up Signers for other production signer options such as using a wallet.

Ready to build? Check out the Getting Started tutorial to build your first app, or explore the Guides for specific topics.

On this page