Kite vs Gill
Comparing Kite to Gill, another high-level library for Solana Kit.
Key Differences
- Code efficiency: Kite requires about half the code of Gill for most common tasks (see examples below)
- Package size: Kite is 10X smaller - 230KB compared to 2.3MB , and even smaller with compression and minification
- Documentation: Real documentation written for developers - compare Kite Docs to Gill’s auto-generated documentation
- Heritage: Kite is the update of
@solana/helpers, the most popular high-level library for@solana/web3.jsversion 1, that has been going since 2023 - and even before that, back in 2022, when the code was part of Portal Payments
Gill is a library by Decal, and Gill is not related to @solana/helpers despite claims to the contrary.
Philosophy
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.
Code Comparison
Example: Connecting, making a wallet, and sending a memo instruction
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.9X more code than Kite)
Following the docs at 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)Summary
Kite provides the same functionality with:
- Half the code
- 10X smaller package size
- Better documentation
- Proven track record as the successor to @solana/helpers
Ready to try Kite? Check out the Getting Started guide.
Last updated on