@bankr/cli 0.2.15 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -83,7 +83,7 @@ function colorizeHelp(text) {
83
83
  }
84
84
  program
85
85
  .name("bankr")
86
- .description("Bankr AI agent CLI\n\n Docs: https://docs.bankr.bot\n Skills: https://docs.bankr.bot/openclaw/installation")
86
+ .description("Bankr AI agent CLI\n\n Docs: https://docs.bankr.bot\n Skills: https://docs.bankr.bot/skills/overview")
87
87
  .version(pkg.version, "-v, --version", "Show CLI version")
88
88
  .helpOption("-h, --help", "Display help")
89
89
  .addHelpCommand("help [command]", "Display help for command")
@@ -1,7 +1,7 @@
1
1
  import chalk from "chalk";
2
2
  import { confirm, password, checkbox } from "@inquirer/prompts";
3
3
  import { isAddress } from "viem";
4
- import { getCreatorFees, getBeneficiaryFeesStreaming, getTokenCreatorFees, getUserInfo, buildDopplerClaimTx, submit, } from "../lib/api.js";
4
+ import { getCreatorFees, getBeneficiaryFeesStreaming, getTokenCreatorFees, getUserInfo, claimTokenLaunchFees, } from "../lib/api.js";
5
5
  import { emitCESP } from "../lib/cesp/engine.js";
6
6
  import { requireApiKey } from "../lib/config.js";
7
7
  import * as output from "../lib/output.js";
@@ -385,28 +385,14 @@ export async function feesCommand(address, opts) {
385
385
  }
386
386
  export async function feesClaimCommand(tokenAddress, opts) {
387
387
  requireApiKey();
388
- // Step 1: Build claim transaction
389
- const buildSpin = output.spinner("Building claim transaction...");
390
- let claimTx;
391
- try {
392
- claimTx = await buildDopplerClaimTx(tokenAddress);
393
- buildSpin.succeed(claimTx.description);
394
- }
395
- catch (err) {
396
- buildSpin.fail("Failed to build claim transaction");
397
- emitCESP("task.error");
398
- output.error(err.message);
399
- process.exit(1);
400
- }
401
- // Step 2: Confirm
388
+ // Confirm we send one request that builds, signs, and broadcasts.
402
389
  if (!opts.yes) {
403
390
  console.log();
404
- output.keyValue("To", claimTx.to);
405
- output.keyValue("Chain ID", String(claimTx.chainId));
406
- output.keyValue("Action", claimTx.description);
391
+ output.keyValue("Token", tokenAddress);
392
+ output.keyValue("Action", "Claim trading fees");
407
393
  console.log();
408
394
  const proceed = await confirm({
409
- message: "Submit this claim transaction?",
395
+ message: "Submit claim transaction?",
410
396
  default: true,
411
397
  theme: output.bankrTheme,
412
398
  });
@@ -415,43 +401,43 @@ export async function feesClaimCommand(tokenAddress, opts) {
415
401
  return;
416
402
  }
417
403
  }
418
- // Step 3: Submit via /agent/submit
419
- const submitSpin = output.spinner("Submitting claim transaction...");
404
+ const spin = output.spinner("Claiming fees...");
420
405
  const startTime = Date.now();
421
406
  try {
422
- const result = await submit({
423
- transaction: {
424
- to: claimTx.to,
425
- chainId: claimTx.chainId,
426
- data: claimTx.data,
427
- },
428
- description: claimTx.description,
429
- waitForConfirmation: true,
430
- });
407
+ const result = await claimTokenLaunchFees(tokenAddress);
431
408
  const elapsed = output.formatDuration(Date.now() - startTime);
432
- if (result.success) {
433
- submitSpin.succeed(`Fees claimed in ${elapsed}`);
409
+ const ok = result.status === "success";
410
+ if (ok) {
411
+ spin.succeed(`Fees claimed in ${elapsed}`);
434
412
  emitCESP("task.complete");
435
- console.log();
436
- if (result.transactionHash) {
437
- output.keyValue("Transaction", result.transactionHash);
438
- }
439
- if (result.status) {
440
- output.keyValue("Status", output.formatStatus(result.status === "success" ? "completed" : result.status));
441
- }
442
- output.keyValue("Signer", result.signer);
443
- console.log();
444
- output.dim(`View on Basescan: https://basescan.org/tx/${result.transactionHash}`);
445
413
  }
446
414
  else {
447
- submitSpin.fail(`Claim failed after ${elapsed}`);
415
+ spin.fail(`Claim failed after ${elapsed}`);
448
416
  emitCESP("task.error");
449
- output.error(result.error || "Transaction failed");
417
+ }
418
+ console.log();
419
+ if (result.description) {
420
+ output.keyValue("Action", result.description);
421
+ }
422
+ if (result.transactionHash) {
423
+ output.keyValue("Transaction", result.transactionHash);
424
+ }
425
+ if (result.status) {
426
+ output.keyValue("Status", output.formatStatus(result.status === "success" ? "completed" : result.status));
427
+ }
428
+ if (result.signer) {
429
+ output.keyValue("Signer", result.signer);
430
+ }
431
+ console.log();
432
+ if (result.transactionHash) {
433
+ output.dim(`View on Basescan: https://basescan.org/tx/${result.transactionHash}`);
434
+ }
435
+ if (!ok) {
450
436
  process.exit(1);
451
437
  }
452
438
  }
453
439
  catch (err) {
454
- submitSpin.fail("Claim submission failed");
440
+ spin.fail("Claim submission failed");
455
441
  emitCESP("task.error");
456
442
  output.error(err.message);
457
443
  process.exit(1);
@@ -216,6 +216,15 @@ const GATEWAY_MODELS = [
216
216
  input: TEXT_INPUT,
217
217
  cost: { input: 0.1, output: 0.4, cacheRead: 0, cacheWrite: 0 },
218
218
  },
219
+ {
220
+ id: "kimi-k2.6",
221
+ name: "Kimi K2.6",
222
+ owned_by: "moonshotai",
223
+ contextWindow: 262144,
224
+ maxTokens: 262144,
225
+ input: TEXT_INPUT,
226
+ cost: { input: 0.95, output: 4.0, cacheRead: 0.16, cacheWrite: 0 },
227
+ },
219
228
  {
220
229
  id: "kimi-k2.5",
221
230
  name: "Kimi K2.5",
@@ -31,6 +31,7 @@ const VALID_MAX_MODE_MODELS = new Set([
31
31
  "minimax-m2.5",
32
32
  "minimax-m2.7",
33
33
  // Other (OpenRouter)
34
+ "kimi-k2.6",
34
35
  "kimi-k2.5",
35
36
  "glm-5",
36
37
  ]);
package/dist/lib/api.d.ts CHANGED
@@ -209,7 +209,6 @@ export interface DeployTokenResponse {
209
209
  tokenAddress: string;
210
210
  poolId: string;
211
211
  txHash?: string;
212
- activityId: string;
213
212
  chain: string;
214
213
  simulated?: boolean;
215
214
  feeDistribution: Record<string, {
@@ -292,15 +291,39 @@ export interface StreamProgress {
292
291
  */
293
292
  export declare function getBeneficiaryFeesStreaming(address: string, onProgress: (progress: StreamProgress) => void): Promise<BeneficiaryFeesResponse>;
294
293
  /**
295
- * Fetch creator fee data for a specific token address. Unauthenticated
296
- * looks up the token's creator beneficiary and returns their fee data.
294
+ * Fetch creator fee data for a specific token address. Unauthenticated.
295
+ *
296
+ * Uses the unified `/token-launches/:addr/fees` endpoint (added as part of
297
+ * the token-launches API consolidation epic). The legacy alias
298
+ * `GET /public/doppler/token-fees/:addr` still works but emits `Deprecation`
299
+ * and `Sunset` headers.
297
300
  */
298
301
  export declare function getTokenCreatorFees(tokenAddress: string, days?: number): Promise<CreatorFeesResponse>;
299
302
  /**
300
303
  * Build a Doppler fee claim transaction. Requires authentication.
301
304
  * The returned transaction data should be submitted via `submit()`.
305
+ *
306
+ * @deprecated Use `claimTokenLaunchFees` instead — it builds, signs, and
307
+ * broadcasts in a single HTTP call. Kept here so older CLI scripts continue
308
+ * to work through the deprecation window.
302
309
  */
303
310
  export declare function buildDopplerClaimTx(tokenAddress: string): Promise<DopplerClaimTxResponse>;
311
+ export interface ClaimTokenLaunchFeesResponse {
312
+ transactionHash?: string;
313
+ status?: string;
314
+ signer?: string;
315
+ chainId: number;
316
+ description: string;
317
+ blockNumber?: string;
318
+ gasUsed?: string;
319
+ }
320
+ /**
321
+ * Claim trading fees for a Bankr-launched token. Auto-detects Doppler vs
322
+ * Clanker and executes (build + sign + broadcast) in a single call.
323
+ *
324
+ * Replaces the two-step `buildDopplerClaimTx` + `submit` flow.
325
+ */
326
+ export declare function claimTokenLaunchFees(tokenAddress: string): Promise<ClaimTokenLaunchFeesResponse>;
304
327
  export interface BuildClaimTx {
305
328
  tokenAddress: string;
306
329
  tokenName: string;
package/dist/lib/api.js CHANGED
@@ -219,12 +219,16 @@ export async function getBeneficiaryFeesStreaming(address, onProgress) {
219
219
  return result;
220
220
  }
221
221
  /**
222
- * Fetch creator fee data for a specific token address. Unauthenticated
223
- * looks up the token's creator beneficiary and returns their fee data.
222
+ * Fetch creator fee data for a specific token address. Unauthenticated.
223
+ *
224
+ * Uses the unified `/token-launches/:addr/fees` endpoint (added as part of
225
+ * the token-launches API consolidation epic). The legacy alias
226
+ * `GET /public/doppler/token-fees/:addr` still works but emits `Deprecation`
227
+ * and `Sunset` headers.
224
228
  */
225
229
  export async function getTokenCreatorFees(tokenAddress, days) {
226
230
  const params = days ? `?days=${days}` : "";
227
- const res = await fetch(`${getApiUrl()}/public/doppler/token-fees/${tokenAddress}${params}`, {
231
+ const res = await fetch(`${getApiUrl()}/token-launches/${tokenAddress}/fees${params}`, {
228
232
  headers: {
229
233
  "User-Agent": CLI_USER_AGENT,
230
234
  },
@@ -234,6 +238,10 @@ export async function getTokenCreatorFees(tokenAddress, days) {
234
238
  /**
235
239
  * Build a Doppler fee claim transaction. Requires authentication.
236
240
  * The returned transaction data should be submitted via `submit()`.
241
+ *
242
+ * @deprecated Use `claimTokenLaunchFees` instead — it builds, signs, and
243
+ * broadcasts in a single HTTP call. Kept here so older CLI scripts continue
244
+ * to work through the deprecation window.
237
245
  */
238
246
  export async function buildDopplerClaimTx(tokenAddress) {
239
247
  const res = await fetch(`${getApiUrl()}/agent/doppler/claim`, {
@@ -243,6 +251,20 @@ export async function buildDopplerClaimTx(tokenAddress) {
243
251
  });
244
252
  return handleResponse(res);
245
253
  }
254
+ /**
255
+ * Claim trading fees for a Bankr-launched token. Auto-detects Doppler vs
256
+ * Clanker and executes (build + sign + broadcast) in a single call.
257
+ *
258
+ * Replaces the two-step `buildDopplerClaimTx` + `submit` flow.
259
+ */
260
+ export async function claimTokenLaunchFees(tokenAddress) {
261
+ const res = await fetch(`${getApiUrl()}/token-launches/${tokenAddress}/fees/claim`, {
262
+ method: "POST",
263
+ headers: authHeaders(),
264
+ body: JSON.stringify({}),
265
+ });
266
+ return handleResponse(res);
267
+ }
246
268
  export async function getOwnProfile() {
247
269
  const res = await fetch(`${getApiUrl()}/agent/profile`, {
248
270
  headers: authHeaders(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bankr/cli",
3
- "version": "0.2.15",
3
+ "version": "0.3.1",
4
4
  "description": "Official CLI for the Bankr AI agent platform",
5
5
  "type": "module",
6
6
  "bin": {