npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@solana/kit-plugin-payer

v0.6.0

Published

Payer helpers for Kit clients

Downloads

1,303

Readme

Kit Plugins ➤ Payer

npm npm-downloads

This package offers plugins that set up the main "payer" signer on your Kit clients. It does this by adding a payer property to the client, which can then be used to sign transactions, pay for fees, etc. This is a good way to feed signer information to subsequent plugins.

Installation

pnpm install @solana/kit-plugin-payer

payer plugin

This plugin simply accepts a TransactionSigner and sets it as the payer property on the client.

Installation

import { createEmptyClient } from '@solana/kit';
import { payer } from '@solana/kit-plugins';

const client = createEmptyClient().use(payer(mySigner));

Features

  • payer: The main payer signer for your Kit client.
    console.log(client.payer.address);
    const transactionMessage = pipe(
        createTransactionMessage({ version: 0 }),
        tx => setTransactionFeePayerSigner(client.payer, tx),
        tx => appendTransactionMessageInstruction(getTransferSolInstruction({ source: client.payer, ... }), tx),
    );

generatedPayer plugin

This asynchronous plugin generates a new random KeyPairSigner to be used as the payer property on the client.

Installation

import { createEmptyClient } from '@solana/kit';
import { generatedPayer } from '@solana/kit-plugins';

const client = await createEmptyClient().use(generatedPayer());

Features

See the payer plugin for available features.

generatedPayerWithSol plugin

This asynchronous plugin generates a new random KeyPairSigner, airdrops some SOL to it and sets it as the payer property on the client.

Installation

Note that this plugin requires the airdrop plugin to be installed on the client beforehand which itself either requires an RPC connection or a LiteSVM instance.

import { createEmptyClient } from '@solana/kit';
import { airdrop, generatedPayerWithSol, localhostRpc } from '@solana/kit-plugins';

const client = await createEmptyClient()
    .use(localhostRpc()) // or .use(litesvm())
    .use(airdrop())
    .use(generatedPayerWithSol(lamports(10_000_000_000n))); // 10 SOL

Features

See the payer plugin for available features.

payerOrGeneratedPayer plugin

This asynchronous plugin uses the provided TransactionSigner as the payer if one is given. Otherwise, it generates a new random KeyPairSigner, airdrops 100 SOL to it, and sets it as the payer property on the client. This is useful when you want to optionally accept a payer from the caller but fall back to a generated and funded payer for convenience (e.g. in testing or local development).

Installation

When no explicit payer is given, this plugin requires the airdrop plugin to be installed on the client beforehand which itself either requires an RPC connection or a LiteSVM instance.

import { createEmptyClient } from '@solana/kit';
import { airdrop, localhostRpc, payerOrGeneratedPayer } from '@solana/kit-plugins';

// With an explicit payer — no airdrop needed.
const client = await createEmptyClient().use(payerOrGeneratedPayer(mySigner));

// Without a payer — generates one and airdrops 100 SOL.
const client = await createEmptyClient()
    .use(localhostRpc()) // or .use(litesvm())
    .use(airdrop())
    .use(payerOrGeneratedPayer(undefined));

Features

See the payer plugin for available features.

payerFromFile plugin

This plugin loads a KeyPairSigner from a local file and sets it as the payer property on the client.

Installation

Note that this plugin requires access to the local filesystem and therefore can only work in Node.js environments. Other environments (like browsers) will throw an error when trying to use this plugin.

import { createEmptyClient } from '@solana/kit';
import { payerFromFile } from '@solana/kit-plugins';

const client = createEmptyClient().use(payerFromFile('path/to/keypair.json'));

Features

See the payer plugin for available features.