@black-market/sdk

中文文档
0.16.2发布于 2026/10/30MITTypeScriptES Module构建来源已验证近 30 天下载 4200

TypeScript SDK for Abyss token launches, swaps, and lending.

原始使用文档
文档目录7 节
  1. Install
  2. Check the deployment first
  3. Run a one-market ERC20 launch
  4. Understand the defaults
  5. Choose an example
  6. Choose an offering for your integration
  7. Recover and integrate

Abyss

Abyss TypeScript SDK

Use @black-market/sdk with viem to launch tokens, swap, and read lending markets. This guide targets SDK 0.16.2 on Robinhood Chain mainnet (4663). The package supports Node 20+; running the checkout's TypeScript examples requires Node 24+.

Install

pnpm add @black-market/[email protected] viem

To run the examples, use a checkout:

git clone https://github.com/abysshopper/black-market-node-sdk.git
cd black-market-node-sdk
pnpm install --frozen-lockfile
pnpm build

Check the deployment first

pnpm examples
# To load configuration from an existing working-directory .env explicitly:
node --env-file=.env examples/quickstart.ts

pnpm examples builds and runs examples/quickstart.ts. It reads chain identity, the orchestrator's registry, and current profile admission. It needs no wallet and makes no writes. It reads the process environment; it does not load .env itself. Export RPC_URL in your shell or use --env-file as shown. CHAIN_ID defaults to 4663.

Run a one-market ERC20 launch

Start with launch-erc20-abyss.ts: one Abyss/WETH market, one permanent position, one opening buy, no holder rewards, atomic execution.

cp -n examples/.env.example .env
chmod 600 .env

Set LAUNCH_API_URL=https://api.abyss.trading and exactly one signer source: PRIVATE_KEY, or EXAMPLE_KEYSTORE_PATH with optional EXAMPLE_KEYSTORE_PASSWORD. Use your own funded account. Keep secrets and recovery files out of git. The launch wrappers load the working-directory .env; existing environment values win. Optional RPC_URL selects another Robinhood RPC. Remote endpoints require HTTPS.

# Unsigned planning; no chain transactions, uploads, or publication.
node examples/launch-erc20-abyss.ts
# Authorizes spending and publication, with no further prompt.
node examples/launch-erc20-abyss.ts --broadcast
# After partial execution, use the ORIGINAL run directory.
node examples/launch-erc20-abyss.ts --resume "launch-results/<original-run-dir>"

Broadcast builds a fresh plan, including a new nonce and token identity; it does not sign the dry-run plan. Review the broadcast's printed economics too. --resume can spend funds and publish; it continues the saved identity and does not require --broadcast. A dry run still needs a signer source, sufficient funding, and live RPC/API access for input and gas-budget checks. It never executes launch calldata.

Understand the defaults

  • ERC20 supply: 1,000,000 tokens. Target FDV: $5,000, or $0.005/token before tick alignment.
  • FDV is a valuation, not cash deposited. Initial positions contain launch tokens only.
  • Opening buy: 0.00001 ETH per buy. ETH wraps into WETH; USDG cases convert through Kyber.
  • ETH for gas is extra. The buy's output depends on fees, ranges, and the aligned opening price.
  • EXAMPLE_TARGET_MARKET_CAP_USD and EXAMPLE_BUY_AMOUNT_WEI change the target and buy input. These defaults are examples, not a recommended valuation or an anti-sniper guarantee.

Use the worked pricing guide before changing supply or ranges.

Choose an example

Each filename below is in examples/. V4 cases use the fixed-fee pool-bound profile; quotes are WETH unless USDG is listed. Positions are permanently locked.

FileToken / rewardsMarkets / position countsMode / buys
launch-erc20-abyss.tsERC20 / noneAbyss: 1atomic / 1
launch-erc20-v4.tsERC20 / noneV4: 1atomic / 1
launch-erc404-v4.tsERC404 / noneV4: 1staged / 1
launch-erc404-abyss.tsERC404 / noneAbyss: 1atomic / 1
launch-erc20-staking-v4.tsERC20 / stakingV4: 2staged / 2
launch-erc20-dividends-abyss.tsERC20 / dividendsAbyss: 3staged / 1
launch-erc20-burn-mixed.tsERC20 / 30% token-fee burnV4: 2; Abyss: 1staged / 2
launch-erc404-dividends-mixed.tsERC404 / dividendsV4: 2; Abyss: 3staged / 2
launch-erc20-multi-quote.tsERC20 / noneV4 WETH: 1; V4 USDG: 1; Abyss WETH: 1staged / 3
launch-erc20-depth-v4.tsERC20 / noneV4: 4, Early Scarcitystaged / 1
launch-erc20-dividends-multiquote-mixed.tsERC20 / dividendsV4 WETH: 2; V4 USDG: 2; Abyss WETH: 3staged / 3

Choose an offering for your integration

Use listKnownLifecycleProfiles for the release's supported offerings and deployment wiring. Planning batches pinned current state, checks native-ceiling capacity budgets and computes exact local opening-buy quotes. It never simulates a launch transaction, including conversions. Multiple markets always select staged; one known-profile market can remain atomic when its padded budget, including 2M compute per Swap funding entry, plus poster allocation fits. Explicit staged stays staged. On4663 every launch step uses32M total gas including poster; approvals leave gas to the wallet. The empirical conversion reserve is not proof for arbitrary router code. Retain returned planned.mode and check planned.assessment.ready, not removed simulation/proof fields.

OfferingChoose it forGuide
Canonical AbyssSTANDARD / STANDARD_ORACLE / QUOTE / QUOTE_ORACLE poolsChoose an offering
Fixed V4One hook per pool, fixed hook fee, optional LP feeBuild the plan
Dynamic V4Oracle-velocity hook fee between your minimum and maximum; LP fee 0Fee configuration
HMM V2Fee-funded auxiliary bids/asks; LP and developer fees 0Configure HMM V2
UFGQuote-fee treasury and holder redemption; reward-free ERC20 onlyLaunch a UFG treasury
Auto-compoundingStatic/dynamic hook fees fund permanently locked full-range liquidity; LP and developer fees 0Configure auto-compounding
RaetoFixed/dynamic quote-fee sharing with Raeto; WETH/USDG only, 5/10/25/50/75% share, LP and developer fees 0Configure Raeto

The eleven launch wrappers do not launch HMM, UFG, auto-compounding, or Raeto. Start HMM/UFG integrations with hmm-launch-config.ts or ufg-launch-config.ts; for auto-compounding/Raeto, use the typed config6 examples in the linked guides. Both now have measured launch capacity profiles. These are configuration paths, not deployment commands.

Recover and integrate

After an interrupted send, inspect the saved transaction hash and use --resume on the original directory. If markets are already active but publication failed, resume publication; do not deploy another token. The runner saves artifacts under launch-results/; retain its owner-only recovery file.

版本与发布记录

@black-market/sdk 共发布 29 个版本,首次发布于 2026/09/07;过去 12 个月发布了 29 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.16.2latest2026/10/309 天前
0.16.12026/10/309 天前
0.16.02026/10/309 天前
0.15.12026/10/2910 天前
0.15.02026/10/2910 天前
0.14.12026/10/2810 天前

其他发布通道:next → 0.8.0-rc.1。

关于 @black-market/sdk 的常见问题

@black-market/sdk 是什么?

TypeScript SDK for Abyss token launches, swaps, and lending.

如何安装 @black-market/sdk?

在项目目录运行 npm install @black-market/sdk,或使用 pnpm add / yarn add / bun add。

@black-market/sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@black-market/sdk 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@black-market/sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@black-market/sdk 可以商用吗?

@black-market/sdk 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@black-market/sdk 的下载量有多少?

根据 npm 官方下载统计,@black-market/sdk 在 2026/10/08 – 2026/11/06 这 30 天内被下载 4,200 次,日均约 140 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@black-market/sdk 还在维护吗?

最新版本 0.16.2 发布于 2026/10/30(9 天前);至今共发布 29 个版本,其中过去 12 个月发布了 29 个;首次发布于 2026/09/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。