Abyss

SDK integration guide

This page is for developers using the published Black Market SDKs. They provide static launch metadata and deterministic V1 Atomic-launch calculations; they are not a client for the current Black Market Launcher. For current product behavior and public addresses, see the Black Market Launcher overview and contract address reference.

LanguagePackageRepository
TypeScript@black-market/sdkGitHub
Pythonblack-market-sdkGitHub

Current launcher support is not yet published

The current Unified Launcher is on Robinhood Chain mainnet (chain ID 4663). The published SDKs predate it. Their static launch catalog, Atomic Factory ABI, and buildAtomicLaunchCalldata / build_atomic_launch_calldata target the retired V1 Atomic Launch Factory and its deployAndLaunch call.

Neither package currently exposes a Unified Launcher ABI, a LaunchRequestV3 encoder, or a transaction builder for a current launch. Do not construct a live Black Market Launcher launch from a V1 request or V1 builder output.

Select Robinhood Chain mainnet explicitly

Pass 4663 to every SDK client or chain-related helper used for mainnet. The address catalog defaults to workbench (46631), while the client factories default to local Anvil (31337). A correct chain ID does not make a retired V1 API suitable for the current launcher.

Network clients

Both packages can create generic public RPC clients. Selecting Robinhood Chain mainnet does not add current Unified Launcher support or a current launcher ABI.

import { createProtocolPublicClient } from "@black-market/sdk";

const client = createProtocolPublicClient({
  chainId: 4663,
  rpcUrl: "https://rpc.mainnet.chain.robinhood.com/",
});
from black_market_sdk import ROBINHOOD_MAINNET_CHAIN_ID, create_protocol_web3

w3 = create_protocol_web3(
    chain_id=ROBINHOOD_MAINNET_CHAIN_ID,
    rpc_url="https://rpc.mainnet.chain.robinhood.com/",
)

Use the client only with an ABI appropriate to the public contract being read. The packages do not provide the current Unified Launcher ABI.

What the SDKs support today

SDK areaTypeScriptPythonCurrent boundary
Template metadatagetLaunchTemplate, LAUNCH_TEMPLATESget_launch_template, LAUNCH_TEMPLATESStatic V1 metadata, not proof of current template registration.
Paired-asset catalogAUCTION_QUOTE_OPTIONSAUCTION_QUOTE_OPTIONSA V1 catalog, not a live availability list or price source.
Atomic mathderiveAtomicLaunchPoolRecipe, deriveAtomicLaunchBuySqrtPriceLimitX96, estimateAtomicLaunchInitialBuyderive_atomic_launch_pool_recipe, derive_atomic_launch_buy_sqrt_price_limit_x96, estimate_atomic_launch_initial_buyDeterministic V1 one-sided-pool calculations only.
Exact unit conversionparseAmountToUnitsparse_amount_to_unitsConverts a decimal string to raw token units without floating point.
V1 calldatabuildAtomicLaunchCalldatabuild_atomic_launch_calldataEncodes retired deployAndLaunch requests for historical examples only.

TypeScript: V1 integer calculations

npm install @black-market/sdk viem

This example exercises the package's deterministic V1 calculations without building or sending a transaction:

import {
  AUCTION_QUOTE_OPTIONS,
  deriveAtomicLaunchBuySqrtPriceLimitX96,
  deriveAtomicLaunchPoolRecipe,
  estimateAtomicLaunchInitialBuy,
  getLaunchTemplate,
  parseAmountToUnits,
} from "@black-market/sdk";

const template = getLaunchTemplate("dual-dividends");
const quote = AUCTION_QUOTE_OPTIONS.find(({ id }) => id === "USDG");
if (!quote) throw new Error("USDG is missing from the installed V1 catalog");

const pairedTokenAmountIn = parseAmountToUnits("250", quote.decimals);
const pairedTokenUsdPriceX18 = 10n ** 18n; // illustrative $1.00 X18 input, not a price feed

const recipe = deriveAtomicLaunchPoolRecipe({
  pairedTokenDecimals: quote.decimals,
  pairedTokenUsdPriceX18,
  targetMarketCapUsdX18: 5_000n * 10n ** 18n,
  launchedTokenIsQuote: template.launchedTokenIsQuote,
  fee: 3_000,
});

const sqrtPriceLimitX96 = deriveAtomicLaunchBuySqrtPriceLimitX96({
  launchSqrtPriceX96: recipe.launchSqrtPriceX96,
  launchedTokenIsQuote: template.launchedTokenIsQuote,
  slippageBps: 50,
});

const estimate = estimateAtomicLaunchInitialBuy({
  launchSqrtPriceX96: recipe.launchSqrtPriceX96,
  liquidity: recipe.liquidity,
  pairedTokenAmountIn,
  launchedTokenIsQuote: template.launchedTokenIsQuote,
  fee: 3_000,
  sqrtPriceLimitX96,
});

Python: V1 integer calculations

pip install black-market-sdk
from black_market_sdk import (
    AUCTION_QUOTE_OPTIONS,
    AtomicLaunchBuySqrtPriceLimitInput,
    AtomicLaunchInitialBuyEstimateInput,
    AtomicLaunchPoolRecipeInput,
    derive_atomic_launch_buy_sqrt_price_limit_x96,
    derive_atomic_launch_pool_recipe,
    estimate_atomic_launch_initial_buy,
    get_launch_template,
    parse_amount_to_units,
)

template = get_launch_template("dual-dividends")
quote = next(option for option in AUCTION_QUOTE_OPTIONS if option.id == "USDG")

paired_token_amount_in = parse_amount_to_units("250", quote.decimals)
paired_token_usd_price_x18 = 10**18  # illustrative $1.00 X18 input, not a price feed

recipe = derive_atomic_launch_pool_recipe(
    AtomicLaunchPoolRecipeInput(
        paired_token_decimals=quote.decimals,
        paired_token_usd_price_x18=paired_token_usd_price_x18,
        target_market_cap_usd_x18=5_000 * 10**18,
        launched_token_is_quote=template.launched_token_is_quote,
        fee=3_000,
    )
)

sqrt_price_limit_x96 = derive_atomic_launch_buy_sqrt_price_limit_x96(
    AtomicLaunchBuySqrtPriceLimitInput(
        launch_sqrt_price_x96=recipe.launch_sqrt_price_x96,
        launched_token_is_quote=template.launched_token_is_quote,
        slippage_bps=50,
    )
)

estimate = estimate_atomic_launch_initial_buy(
    AtomicLaunchInitialBuyEstimateInput(
        launch_sqrt_price_x96=recipe.launch_sqrt_price_x96,
        liquidity=recipe.liquidity,
        paired_token_amount_in=paired_token_amount_in,
        launched_token_is_quote=template.launched_token_is_quote,
        fee=3_000,
        sqrt_price_limit_x96=sqrt_price_limit_x96,
    )
)

Exact-value and safety rules

  • Keep protocol quantities as TypeScript bigint or Python int. Never convert raw token amounts, liquidity, ticks, or fixed-point prices through JavaScript number or Python float.
  • Values ending in X18 are integer fixed-point values scaled by 10^18. Preserve the price source, timestamp, decimals, and quote convention alongside the value; the SDK does not supply or validate a market price.
  • The V1 paired-asset catalog is metadata, not evidence that an asset is currently supported, liquid, redeemable, or safe.
  • These helpers calculate an old model; they do not check current contract state, token provenance, liquidity, price impact, oracle conditions, approvals, or smart-contract risk. Treat an estimate as a calculation, not a quote or a safety check.

Retired V1 encoder

The V1 encoder remains useful for reading historical fixtures such as the Abby reconstruction. buildAtomicLaunchCalldata and build_atomic_launch_calldata encode only the retired deployAndLaunch request. Their output is not a Unified Launcher request and must not be submitted as a current launch transaction.

On this page