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

@dngbuilds/zapkit-core

v0.1.5

Published

The Starknet wallet SDK — connect, transact, and bridge in a few lines of code.

Downloads

901

Readme


Overview

@dngbuilds/zapkit-core wraps the StarkZap SDK into a single ZapKit class that handles wallet connections (Cartridge Controller, StarkSigner, Privy), staking, bridging, and low-level contract calls on Starknet.

Using React? Check out @dngbuilds/zapkit-react — it provides a context provider and hooks that build on top of this core package.

Installation

npm install @dngbuilds/zapkit-core

Quick Start

import ZapKit, { OnboardStrategy } from "@dngbuilds/zapkit-core";

const kit = new ZapKit({ network: "mainnet" });

// Connect with Cartridge Controller (social login / passkeys)
const result = await kit.onboard({ strategy: OnboardStrategy.Cartridge });
console.log("Connected:", result.wallet.address);

// Get token balance
const balance = await kit.getBalance({ symbol: "ETH", address: "0x049d…" });
console.log("ETH balance:", balance.toString());

Wallet Strategies

ZapKit supports three onboarding strategies:

Cartridge Controller

Social login and passkeys via Cartridge. No extra dependencies needed.

await kit.onboard({ strategy: OnboardStrategy.Cartridge });

StarkSigner (Private Key)

Direct private-key signing for scripts, bots, or testing.

import { StarkSigner } from "@dngbuilds/zapkit-core";

await kit.onboard({
  strategy: OnboardStrategy.Signer,
  signer: new StarkSigner("0xYOUR_PRIVATE_KEY"),
});

Privy

Third-party auth (email, social, etc.) via Privy. Requires the Privy SDK in your app.

await kit.onboard({
  strategy: OnboardStrategy.Privy,
  privy: { walletConnector: privyWalletConnector },
});

API Reference

new ZapKit(config)

Creates a new ZapKit instance.

| Option | Type | Description | | --------- | -------- | -------------------------- | | network | string | "mainnet" or "sepolia" | | ...rest | | Passed through to StarkZap |

Wallet Methods

| Method | Returns | Description | | ---------------------------- | ----------------- | ------------------------------------ | | onboard(options) | OnboardResult | Connect using a given strategy | | connectWallet(options) | Wallet | Low-level wallet connect | | connectCartridge(options?) | CartridgeWallet | Direct Cartridge Controller connect | | getWallet() | Wallet \| null | Current wallet instance | | disconnect() | void | Disconnect the active wallet | | ensureReady(options?) | void | Wait until the wallet is fully ready |

DeFi Methods

| Method | Returns | Description | | -------------------------------- | --------------- | --------------------------------- | | stakingTokens() | Token[] | List available staking tokens | | getStakerPools(address) | Pool[] | Pools a staker is in | | stake({ poolAddress, amount }) | Tx | Stake tokens in a pool | | claimRewards(poolAddress) | Tx | Claim staking rewards | | getBridgingTokens(chain?) | BridgeToken[] | Available bridging tokens | | getBalance(token) | Amount | Token balance of connected wallet |

Utilities

| Method / Property | Description | | ------------------------- | ----------------------------------- | | getProvider() | Returns the underlying RPC provider | | callContract(call) | Execute a read-only contract call | | utils.Amount | Token amount helpers | | utils.fromAddress(addr) | Parse an address string | | utils.getPresets() | Account preset configurations |

Vite Plugin

ZapKit provides a Vite plugin that resolves optional peer dependencies (starkzap modules) to no-op shims, preventing missing-module errors during builds.

// vite.config.ts
import { defineConfig } from "vite";
import { zapkitPlugin } from "@dngbuilds/zapkit-core/vite";

export default defineConfig({
  plugins: [zapkitPlugin()],
});

Exports

// Value exports
export { OnboardStrategy, StarkSigner, Amount, fromAddress };
export { getPresets, accountPresets, Tx, TxBuilder };
export { ChainId, ExternalChain, BridgeToken };

// Type exports
export type { SDKConfig, Wallet, Token, Address, Pool };
export type { OnboardOptions, OnboardResult, ConnectWalletOptions };
export type { CartridgeWalletInterface, ConnectCartridgeOptions };
export type { EnsureReadyOptions, ExecuteOptions, RpcProvider, Call };

License

MIT