Launch SDK
@bankr/launch-sdk is a TypeScript SDK for launching tokens and running your own launchpad on Bankr's contracts.
- A launch is one transaction. It creates an ERC-20 token and its Uniswap v4 pool, with the liquidity locked for good.
- A launchpad is an entry in Bankr's contracts that you operate. It sets the rules for every coin launched on it, and it pays you a share of every trade.
- The SDK never holds your keys.
client.launchsends from the wallet you give it. Every other call returns an unsigned transaction for you to send.
// first-launch.ts: `bun first-launch.ts`
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { createLaunchClient } from "@bankr/launch-sdk";
const account = privateKeyToAccount(process.env.LAUNCHER_KEY as `0x${string}`);
const client = createLaunchClient({
chain: "base",
walletClient: createWalletClient({ account, chain: base, transport: http() }),
});
const { token, txHash } = await client.launch({
name: "My Coin",
symbol: "MINE",
metadataUri: "ipfs://your-metadata-cid",
launcher: account.address,
launchpadId: 7n, // replace with your launchpad's id: Getting started registers one
});
console.log(token, txHash);
Pick your path
| You want to | Start here |
|---|---|
| Run a launchpad, step by step | Getting started |
| Set up every part of a launchpad | Set up a launchpad |
| Launch coins for your users in your app | Launch for your users |
| Launch one coin for yourself | Launch a token yourself |
| See everything you can configure | Configuration |
| Give a coin its own trading rule | Extensions |
What you can build
- Your own launchpad. One transaction registers it. You set the fee range, your share of every trade, snipe protection, the supply, the wallet cap, vesting and which features a launch may use. You write no contracts.
- Token launches inside your app. Your users launch from their own wallets, or your server launches for them. A name and a symbol are enough: every other option has a default that your launchpad sets.
- Coins with their own trading rules. An extension adds a sniper tax, a tax that fades, a brake on pumps or a raffle on every buy, with one option.
- Coins that pay their holders. Part of every trading fee goes to the wallets that hold the coin, in BNKR where a route exists. Nobody has to stake.
- Vesting and allocations. Vest supply to the creator, a team or the coin's holders, each on its own schedule.
- Fees that work for the coin. Auto-LP adds a share of the fees to the locked liquidity. A buyback buys the coin and burns it.
- Dashboards with no indexer. Bankr indexes every launch on every launchpad. Read it from the SDK or over HTTP, with no key.
What every coin gets
These are built into the contracts. No setting changes them.
| Property | What it means |
|---|---|
| A fixed supply | Minted once at launch, 18 decimals. No owner and no mint. |
| Locked liquidity | The pool's liquidity can never be removed. No contract has a function for it. |
| Fixed terms | A coin's fees, its fee split, its vesting and its wallet cap are set at launch. Nobody can change them later. |
| Fees in the quote token | Every trade pays its fee in the token the coin trades against, such as WETH, on buys and on sells. |
| Holder rewards | Part of every fee goes to the coin's holders. |
| Sells always go through | An extension can add a fee to a sell. It can never refuse one. |
What it costs
| Action | Cost |
|---|---|
| Registering a launchpad | A one-time bond, 0.01 ETH on Base. It is not refunded. |
| Launching a coin | Gas only. There is no launch fee. |
| Trading | The coin's own fee. Bankr's cut comes out of that fee, not on top. |
Install
bun add @bankr/launch-sdk viem
With another package manager:
npm install @bankr/launch-sdk viem
pnpm add @bankr/launch-sdk viem
yarn add @bankr/launch-sdk viem
- ESM only. The SDK runs on Node 22 or later, on Bun and in modern browsers.
- One peer dependency:
viem2.57.8 or later. - No API key. The SDK plans and launches from the chain, and reads from Bankr's API need no key.
The package has two entry points:
| Import | Use it in | What it holds |
|---|---|---|
@bankr/launch-sdk | Browsers and servers | The client, the reads, every helper. It holds no key. |
@bankr/launch-sdk/server | Servers only | The same, plus the helpers that sign with your launchpad's key. |
Supported chains
Base, Robinhood Chain, Arbitrum, Arc, Ethereum and BNB Chain. Chains and addresses has each chain's name in the SDK and every contract address.
Before you register a launchpad on a chain, read client.status(): a launchpad launches where it reports gated: false.
Words these pages use
| Word | Meaning |
|---|---|
| Launchpad | An entry in Bankr's contracts with its own rules and payees. Every launch names one by its id. |
| Operator | The wallet or Safe that registered a launchpad and can change its settings. |
| Payee | A wallet that takes part of a launchpad's share of every fee. A launchpad names up to 4. |
| Launcher | The account that sends a launch transaction. |
| Quote token | The token a coin trades against, such as WETH or USDC. The coin's price and every fee are in it. |
| Fee recipient | A wallet that receives the creator's part of a coin's fees. The launcher, unless the launch names others. |
| Creator side | What is left of a fee after Bankr's cut, any referrer and the launchpad's payees. |
| First buy | A buy the launcher makes inside the launch transaction. The option is devBuy. |
| Snipe protection | A high fee in the first seconds of trading that falls to the coin's trading fee. |
| Extension | A contract attached to a pool at launch that adds its own fee to every swap, such as Sniper Tax. |
| Knob, switch | A launchpad setting with a range and a default, and a feature that is on or off. |
| Pips, bps | Units. Fee rates are in pips: 10,000 pips is 1%. Shares are in bps: 100 bps is 1%. |
For AI tools
- llms.txt indexes every docs page, and llms-full.txt is the whole site as one file.
- The Launch API's OpenAPI spec is plain YAML at https://docs.bankr.bot/openapi/launches.yaml.