@solard/cli 0.2.15 → 0.2.17

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/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
+ import { configure } from "measure-fn";
2
3
  import {
3
4
  addExternalContact,
4
- configureSolardMeasure,
5
5
  createSolardMeasureCollector,
6
6
  executeRegistrySolSweep,
7
7
  executeRegistryTokenLiquidation,
@@ -21,10 +21,10 @@ import {
21
21
  simulateRegistryTokenLiquidation,
22
22
  wrappedSolAta,
23
23
  type TokenRow,
24
- } from "@solard/sdk";
24
+ } from "@solard/core";
25
25
 
26
26
  import { handleMeteoraCommand } from "./meteora-commands.ts";
27
- import { handleFairfunCommand } from "./fairfun-commands.ts";
27
+ import { handleAccountingCommand } from "./accounting-commands.ts";
28
28
  import { resolveDestinationRef } from "./refs.ts";
29
29
  import {
30
30
  VaultOnboardingError,
@@ -77,7 +77,12 @@ function int(flags: Flags, key: string, fallback?: number): number | undefined {
77
77
  function json(value: unknown): string {
78
78
  return JSON.stringify(
79
79
  value,
80
- (_, item) => (typeof item === "bigint" ? item.toString() : item),
80
+ (_, item) =>
81
+ typeof item === "bigint"
82
+ ? item.toString()
83
+ : item instanceof Map
84
+ ? Object.fromEntries(item)
85
+ : item,
81
86
  2,
82
87
  );
83
88
  }
@@ -319,10 +324,10 @@ function commandNeedsSigningVault(
319
324
  }
320
325
 
321
326
  async function storedWalletCount(): Promise<number> {
322
- const { createTraderSolard } = await import("@solard/sdk");
327
+ const { createTraderSolard } = await import("@solard/core");
323
328
  const probe = createTraderSolard();
324
329
  try {
325
- return probe.wallets.list().length;
330
+ return (probe.db.wallets.select().all() as unknown[]).length;
326
331
  } finally {
327
332
  probe.close();
328
333
  }
@@ -333,7 +338,7 @@ function help(): string {
333
338
 
334
339
  Wallets and tokens
335
340
  slrd setup [--status] Check ephemeral wallet-password mode; no password is persisted
336
- slrd wallet create [name] Generate and persist an encrypted Solana wallet
341
+ slrd wallet create [name] [--vanity <suffix>] Generate and persist an encrypted Solana wallet
337
342
  slrd import <private_key> [name]
338
343
  cat key.json | slrd import --stdin [name]
339
344
 
@@ -356,7 +361,9 @@ External contacts (public addresses only; never signing wallets or group members
356
361
  slrd token analyze <ca> [--top N] [--json]
357
362
  slrd tokens
358
363
  slrd holders <token|ca> [--exclude <a,b>] [--min-raw N] [--json] Complete on-chain holder snapshot
359
- slrd events <token|ca> [--swaps-only|--transfers-only] [--jsonl] Live typed Pump/PumpSwap + transfer stream
364
+ slrd events <token|ca> [--all|--swaps|--transfers|--creates] [--jsonl] Live typed Pump/PumpSwap + transfer/create stream
365
+ slrd events history <token|ca> [--provider auto|solscan|rpc] [--from-slot N] [--to-slot N] [--slot-order] [--json]
366
+ Historical holder-balance movements with explicit completeness verification
360
367
 
361
368
  Vanity mints
362
369
  slrd vanity --suffix pump --out .\\mint.json [--count <n>]
@@ -365,6 +372,9 @@ Vanity mints
365
372
  slrd vanity pool release <mint-address> Release an ambiguous/failed launch reservation
366
373
  launch/vamp: add --mint-pool pump [--mint-pool-address <address>] to consume a pooled mint
367
374
 
375
+ Pump pairs
376
+ slrd pump pairs [--json] Read Pump-supported quote mints from the on-chain Global account
377
+
368
378
  Metadata and launching
369
379
  slrd launch pump --creator <wallet> (--uri <metadata_uri> | --metadata <json> | --image <path> --description <text>) [--pair SOL|USDC|<custom-quote-mint>] [--beneficiary <wallet|address>] [--alias <name>] [--live] [--skip-simulation]
370
380
  [--deployment-sender helius-rpc|helius-fast] [--helius-tip-sol 0.01]
@@ -395,8 +405,8 @@ Transfers and consolidation
395
405
  Without --wallets, sweep considers all stored signing wallets
396
406
 
397
407
  Token liquidation
398
- slrd liquidate tokens --except <token|mint> [--wallets <a,b,...>] [--slippage-bps 1500] [--no-jupiter] [--burn-unsellable] [--simulate | --live]
399
- Sell supported tokens except protected mint(s); unwrap WSOL; close unprotected zero-balance token accounts and reclaim rent
408
+ slrd liquidate tokens [--except <token|mint>] [--wallets <a,b,...>] [--except-wallet <wallet>] [--except-wallets <a,b,...>] [--slippage-bps 1500] [--no-jupiter] [--burn-unsellable] [--simulate | --live]
409
+ Sell all supported tokens unless protected with --except; excluded wallets are not scanned or touched
400
410
 
401
411
  RPC
402
412
  All Solard JSON-RPC traffic is globally rate-limited to 5 req/s by default.
@@ -421,11 +431,15 @@ Trading
421
431
  slrd transfer-many --wallet <wallet> (--token <mint>|--sol) --file <allocations.json> [--id <stable-id> --live]
422
432
  slrd transfer-many status <stable-id>
423
433
  slrd transfer-many resume <stable-id> [--sender rpc|helius]
424
- slrd rewards distribute <token|ca> --wallet <beneficiary> --id <ledger-id> --snapshot <snapshot.json> [--reward-mint <mint>] [--live]
425
- Snapshot contains cumulative totalClaimedRaw + recipients[].entitledRaw; Solard tracks confirmed payouts
426
- slrd rewards status <distribution-id>
434
+ slrd rewards history <token|ca> [--wallet <reward-recipient>] [--provider auto|solscan|rpc] [--json]
435
+ slrd rewards distribute <token|ca> --wallet <beneficiary> --snapshot <snapshot.json> [--reward-mint <mint>] [--live]
436
+ Pay every outstanding cumulative holder entitlement and exit when complete
437
+ slrd rewards stop <token|ca> Ask the currently running distribution for this token to stop before its next transfer
438
+ slrd rewards status <token|ca> Show remembered cumulative entitlement/payment state
439
+ slrd rewards audit <token|ca> [--holder <wallet>] Show entitlement and confirmed-payment history
427
440
  slrd rewards inspect <token|ca> Show claim source, quote asset, estimated accrued creator reward, and payout address
428
- slrd rewards claim <token|ca> --wallet <fee-payer> Claim creator rewards; on-chain beneficiary receives the reward
441
+ slrd rewards claim <token|ca> --wallet <fee-payer> [--id <stable-claim-id> --basis <reward-basis.json>]
442
+ slrd rewards claim-status <stable-claim-id>
429
443
 
430
444
  Scripts (strategies stay outside the kernel)
431
445
  slrd scripts List scripts registered in slrd.config.ts
@@ -480,6 +494,7 @@ Environment
480
494
  RPC_ENDPOINT required only for chain operations
481
495
  HELIUS_SENDER_URL regional/global Helius Sender endpoint used by launch scripts
482
496
  HELIUS_RPC_URL RPC endpoint used for ordinary Helius-RPC buyer lane
497
+ SOLSCAN_API_KEY optional indexed token-history provider; enables authoritative historical transfer reconstruction
483
498
  HELIUS_TIP_ACCOUNT, HELIUS_TIP_LAMPORTS, HELIUS_PRIORITY_MICRO_LAMPORTS launch transport policy
484
499
  SLRD_LAUNCH_* launch resend/timeout policy; shared environment, not per-token metadata
485
500
  JITO_BLOCK_ENGINE_URL only when explicitly selecting the separate Jito sender
@@ -505,7 +520,7 @@ async function main() {
505
520
  flags.has("measure-stream") ||
506
521
  process.env.SLRD_MEASURE_STREAM === "1" ||
507
522
  process.env.SLRD_MEASURE_STREAM === "true";
508
- configureSolardMeasure(
523
+ configure(
509
524
  streamMeasures
510
525
  ? {
511
526
  silent: false,
@@ -559,7 +574,7 @@ async function main() {
559
574
  return;
560
575
  }
561
576
 
562
- if (needsVault && !process.env.SLRD_MASTER_KEY?.trim()) {
577
+ if (needsVault) {
563
578
  const allowCreate =
564
579
  (command === "wallet" && values[0] === "create") ||
565
580
  command === "import" ||
@@ -635,7 +650,7 @@ async function main() {
635
650
  listVanityMintPool,
636
651
  releaseVanityMintReservation,
637
652
  saveMintKeypairFile,
638
- } = await import("@solard/sdk");
653
+ } = await import("@solard/core");
639
654
 
640
655
  if (values[0] === "pool") {
641
656
  const action = values[1] ?? "list";
@@ -813,13 +828,13 @@ async function main() {
813
828
  process.env.JITO_BLOCK_ENGINE_URL ??
814
829
  "https://mainnet.block-engine.jito.wtf"
815
830
  ).replace(/\/$/, "");
816
- const { getJitoTipAccounts } = await import("@solard/sdk");
831
+ const { getJitoTipAccounts } = await import("@solard/core");
817
832
  const tipAccounts = await getJitoTipAccounts(endpoint);
818
833
  emit(json({ endpoint, tipAccounts }) + "\n");
819
834
  return;
820
835
  }
821
836
  if (command === "metadata" && values[0] === "upload") {
822
- const { uploadPumpMetadata } = await import("@solard/sdk");
837
+ const { uploadPumpMetadata } = await import("@solard/core");
823
838
  const uploaded = await uploadPumpMetadata(
824
839
  {
825
840
  imagePath: need(flags, "image"),
@@ -845,13 +860,13 @@ async function main() {
845
860
  }
846
861
  const [{ sol, formatRaw }, { shortKey }, { createTraderSolard }] =
847
862
  await Promise.all([
848
- import("@solard/sdk"),
849
- import("@solard/sdk"),
850
- import("@solard/sdk"),
863
+ import("@solard/core"),
864
+ import("@solard/core"),
865
+ import("@solard/core"),
851
866
  ]);
852
867
  const slrd = createTraderSolard();
853
868
  try {
854
- if (await handleFairfunCommand({ command, values, flags, slrd, emit })) {
869
+ if (await handleAccountingCommand({ command, values, flags, slrd, emit })) {
855
870
  return;
856
871
  }
857
872
 
@@ -860,6 +875,20 @@ async function main() {
860
875
  return;
861
876
  }
862
877
 
878
+ if (command === "pump" && values[0] === "pairs") {
879
+ const pairs = await slrd.pump.getSupportedPairs();
880
+ if (flags.has("json")) {
881
+ emit(json(pairs) + "\n");
882
+ } else {
883
+ for (const pair of pairs) {
884
+ emit(
885
+ `${(pair.symbol ?? "?").padEnd(12)} ${(pair.name ?? "?").padEnd(28)} ${pair.mint} decimals=${pair.decimals}\n`,
886
+ );
887
+ }
888
+ }
889
+ return;
890
+ }
891
+
863
892
  if (command === "swap") {
864
893
  const { runJupiterSwapCommand } =
865
894
  await import("./commands/jupiter-swap.ts");
@@ -929,21 +958,48 @@ async function main() {
929
958
 
930
959
  if (command === "wallet" && values[0] === "create") {
931
960
  const firstWallet = slrd.wallets.list().length === 0;
932
- const wallet = slrd.createWallet(
933
- values[1] ?? (firstWallet ? "main" : undefined),
934
- );
961
+ const name = values[1] ?? (firstWallet ? "main" : undefined);
962
+ const vanity = flags.has("vanity") ? need(flags, "vanity") : null;
963
+ const vanityResult = vanity
964
+ ? await slrd.createVanityWallet(name, {
965
+ suffix: vanity,
966
+ workers: int(flags, "workers"),
967
+ maxAttempts: int(flags, "max-attempts"),
968
+ timeoutMs: int(flags, "timeout-ms", 0),
969
+ reportEvery: int(flags, "report-every", 1_000_000),
970
+ onProgress: process.stderr.isTTY
971
+ ? (progress) =>
972
+ process.stderr.write(
973
+ `${OWL} wallet vanity ${progress.suffix}: ${progress.attempts} attempts, ${progress.ratePerSecond}/s\r`,
974
+ )
975
+ : undefined,
976
+ })
977
+ : null;
978
+ if (vanityResult && process.stderr.isTTY) process.stderr.write("\n");
979
+ const wallet = vanityResult?.wallet ?? slrd.createWallet(name);
980
+ const output = vanityResult
981
+ ? {
982
+ ...wallet,
983
+ vanity: {
984
+ suffix: vanityResult.suffix,
985
+ attempts: vanityResult.attempts,
986
+ elapsedMs: vanityResult.elapsedMs,
987
+ ratePerSecond: vanityResult.ratePerSecond,
988
+ },
989
+ }
990
+ : wallet;
935
991
  if (flags.has("json")) {
936
- emit(json(wallet) + "\n");
992
+ emit(json(output) + "\n");
937
993
  } else if (process.stdout.isTTY) {
938
994
  emit(
939
995
  `\n╭─ ${OWL} wallet ready ──────────────────────────────────╮\n` +
940
996
  ` name @${wallet.name}\n` +
941
997
  ` address ${wallet.address}\n` +
942
- ` storage encrypted in Solard's local wallet database\n` +
943
- ` password NOT saved; you will enter it again next invocation\n` +
998
+ (vanityResult
999
+ ? ` vanity suffix=${vanityResult.suffix} attempts=${vanityResult.attempts}\n`
1000
+ : "") +
944
1001
  `╰──────────────────────────────────────────────────────╯\n` +
945
- `\nNext: slrd balances --wallet ${wallet.name}\n` +
946
- `Backup: slrd export ${wallet.name} --out .\\${wallet.name}-key.txt\n`,
1002
+ `\nNext: slrd balances --wallet ${wallet.name}\n`,
947
1003
  );
948
1004
  } else {
949
1005
  emit(`${OWL} created @${wallet.name} ${wallet.address}\n`);
@@ -1565,7 +1621,7 @@ async function main() {
1565
1621
  throw new Error(
1566
1622
  "Provide --uri <metadata_uri> or --image <local_path> --description <text>",
1567
1623
  );
1568
- const { uploadPumpMetadata } = await import("@solard/sdk");
1624
+ const { uploadPumpMetadata } = await import("@solard/core");
1569
1625
  uploadedMetadata = await uploadPumpMetadata(
1570
1626
  {
1571
1627
  imagePath: need(flags, "image"),
@@ -1817,11 +1873,18 @@ async function main() {
1817
1873
  }
1818
1874
  if (command === "liquidate" && (values[0] ?? "tokens") === "tokens") {
1819
1875
  const except = csv(flags.get("except"));
1820
- if (except.length === 0) {
1821
- throw new Error(
1822
- "Usage: slrd liquidate tokens --except <token|mint>[,<token|mint>...] [--wallets <a,b,...>] [--burn-unsellable] [--simulate | --live]",
1823
- );
1824
- }
1876
+ const exceptWalletValue =
1877
+ flags.get("except-wallet") ?? flags.get("exceptWallet");
1878
+ const exceptWalletsValue =
1879
+ flags.get("except-wallets") ?? flags.get("exceptWallets");
1880
+ if (exceptWalletValue === "true")
1881
+ throw new Error("Missing --except-wallet <wallet>");
1882
+ if (exceptWalletsValue === "true")
1883
+ throw new Error("Missing --except-wallets <a,b,...>");
1884
+ const exceptWalletRefs = [
1885
+ ...(exceptWalletValue ? [exceptWalletValue] : []),
1886
+ ...csv(exceptWalletsValue),
1887
+ ].filter((ref, index, refs) => refs.indexOf(ref) === index);
1825
1888
  if (flags.has("simulate") && flags.has("live")) {
1826
1889
  throw new Error("Use either --simulate or --live, not both");
1827
1890
  }
@@ -1837,6 +1900,10 @@ async function main() {
1837
1900
  const mint = resolveTokenMintForPolicy(slrd, ref);
1838
1901
  emit(`PROTECT ${ref} -> ${mint}\n`);
1839
1902
  }
1903
+ for (const ref of exceptWalletRefs) {
1904
+ const wallet = slrd.resolveWallet(ref);
1905
+ emit(`EXCLUDE ${ref} -> ${wallet.address.toBase58()}\n`);
1906
+ }
1840
1907
  emit(
1841
1908
  `RPC hard limit ${process.env.SLRD_RPC_MAX_RPS ?? "5"} req/s\n`,
1842
1909
  );
@@ -1852,19 +1919,27 @@ async function main() {
1852
1919
  name: string | null;
1853
1920
  amountUi: string;
1854
1921
  kind: string;
1922
+ tokenAccount?: string;
1855
1923
  },
1856
1924
  ) => {
1857
1925
  const label = action.symbol ?? action.name ?? shortKey(action.mint);
1926
+ const account =
1927
+ action.kind === "close-empty" && action.tokenAccount
1928
+ ? flags.has("verbose")
1929
+ ? action.tokenAccount
1930
+ : shortKey(action.tokenAccount)
1931
+ : null;
1858
1932
  emit(
1859
1933
  `${prefix} ${index}/${total} @${action.walletName} ` +
1860
1934
  `${action.kind === "unwrap-wsol" ? "WSOL" : label} ${action.amountUi}` +
1861
- `${action.kind === "close-empty" ? " [close empty account]" : ""}\n`,
1935
+ `${action.kind === "close-empty" ? ` [close empty account${account ? ` ${account}` : ""}]` : ""}\n`,
1862
1936
  );
1863
1937
  };
1864
1938
 
1865
1939
  const options = {
1866
1940
  except,
1867
1941
  walletRefs: csv(flags.get("wallets")),
1942
+ exceptWalletRefs,
1868
1943
  slippageBps: int(flags, "slippage-bps", 1500) ?? 1500,
1869
1944
  via: flags.get("sender") ?? "rpc",
1870
1945
  delayMs: int(flags, "delay-ms", 0) ?? 0,
@@ -1894,6 +1969,13 @@ async function main() {
1894
1969
  );
1895
1970
  } else if (event.stage === "action-done") {
1896
1971
  showAction("OK ", event.index, event.total, event.action);
1972
+ } else if (event.stage === "action-pending") {
1973
+ showAction("WAIT", event.index, event.total, event.action);
1974
+ if (flags.has("verbose")) {
1975
+ emit(
1976
+ ` attempt=${event.attempt}/${event.maxAttempts} signature=${event.signature ?? "-"} ${event.reason}\n`,
1977
+ );
1978
+ }
1897
1979
  } else if (event.stage === "action-error") {
1898
1980
  showAction("FAIL", event.index, event.total, event.action);
1899
1981
  emit(` ${event.error}\n`);
@@ -1934,7 +2016,7 @@ async function main() {
1934
2016
  }
1935
2017
 
1936
2018
  emit(
1937
- `KEEP ${plan.totals.keepProtected} protected SLRD holding(s)\n` +
2019
+ `KEEP ${plan.totals.keepProtected} protected token holding(s)\n` +
1938
2020
  `SKIP ${plan.totals.skipUnsupported} unsupported/no-liquidity holding(s)`,
1939
2021
  );
1940
2022
  if (plan.totals.skipUnsupported > 0) {
@@ -2376,23 +2458,84 @@ async function main() {
2376
2458
  }
2377
2459
  if (command === "rewards") {
2378
2460
  const action = values[0] ?? "inspect";
2461
+
2462
+ if (action === "claim-status") {
2463
+ const id = values[1];
2464
+ if (!id)
2465
+ throw new Error("Usage: slrd rewards claim-status <stable-claim-id>");
2466
+ emit(json(slrd.claims.creatorFees.status(id)) + "\n");
2467
+ return;
2468
+ }
2469
+
2379
2470
  const tokenRef = values[1];
2380
2471
  if (!tokenRef)
2381
2472
  throw new Error(
2382
- "Usage: slrd rewards <inspect|claim> <token|ca> [--wallet <fee-payer>]",
2473
+ "Usage: slrd rewards <inspect|claim|claim-status> <token|ca> [--wallet <fee-payer>]",
2383
2474
  );
2384
2475
 
2385
2476
  if (action === "claim") {
2386
2477
  const wallet = need(flags, "wallet");
2387
- const receipt = await slrd.claim(tokenRef, wallet, {
2478
+ const basisPath = flags.get("basis");
2479
+ let basis:
2480
+ | {
2481
+ id: string;
2482
+ slot: number;
2483
+ hash: string;
2484
+ observedAtMs?: number | null;
2485
+ }
2486
+ | undefined;
2487
+ if (basisPath && basisPath !== "true") {
2488
+ const { readFileSync } = await import("node:fs");
2489
+ const { resolve } = await import("node:path");
2490
+ const parsed = JSON.parse(
2491
+ readFileSync(resolve(basisPath), "utf8"),
2492
+ ) as Record<string, unknown>;
2493
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
2494
+ throw new Error("Reward basis file must contain a JSON object");
2495
+ basis = {
2496
+ id: String(parsed.id ?? "").trim(),
2497
+ slot: Number(parsed.slot),
2498
+ hash: String(parsed.hash ?? "").trim(),
2499
+ observedAtMs:
2500
+ parsed.observedAtMs == null ? null : Number(parsed.observedAtMs),
2501
+ };
2502
+ }
2503
+ const result = await slrd.claims.creatorFees.claim(tokenRef, wallet, {
2504
+ id: flags.get("id"),
2505
+ basis,
2388
2506
  via: flags.get("sender") ?? "rpc",
2507
+ skipSimulation: flags.has("skip-simulation"),
2508
+ skipPreflight: flags.has("skip-preflight"),
2389
2509
  });
2390
2510
  emit(
2391
2511
  json({
2392
2512
  action: "claim",
2393
- token: tokenRef,
2394
- feePayer: wallet,
2395
- receipt,
2513
+ claimId: result.claimId,
2514
+ token: result.tokenMint,
2515
+ feePayer: result.feePayer,
2516
+ source: result.source,
2517
+ quote: result.quoteAsset,
2518
+ estimatedClaimRaw: result.estimatedClaimRaw,
2519
+ claimedRaw: result.claimedRaw,
2520
+ claimedUi:
2521
+ result.claimedRaw == null
2522
+ ? null
2523
+ : formatRaw(result.claimedRaw, result.quoteAsset.decimals),
2524
+ payouts: result.payouts,
2525
+ receipt: result.receipt,
2526
+ basis: result.basis,
2527
+ checkpoint:
2528
+ result.claimedRaw == null
2529
+ ? null
2530
+ : {
2531
+ id: result.claimId ?? result.claimSignature,
2532
+ claimSignature: result.claimSignature,
2533
+ slot: result.claimSlot,
2534
+ claimedRaw: result.claimedRaw,
2535
+ quoteMint: result.quoteAsset.mint,
2536
+ observedAtMs: result.observedAtMs,
2537
+ basis: result.basis,
2538
+ },
2396
2539
  }) + "\n",
2397
2540
  );
2398
2541
  return;
@@ -2402,24 +2545,27 @@ async function main() {
2402
2545
  let token = slrd.resolveToken(tokenRef);
2403
2546
  try {
2404
2547
  token = await slrd.refreshToken(token);
2405
- } catch {
2406
- // A registered token can still expose a useful claim plan when one
2407
- // enrichment source is temporarily unavailable.
2408
- }
2548
+ } catch {}
2409
2549
  const { PublicKey } = await import("@solana/web3.js");
2410
2550
  const probeUser = token.creator
2411
2551
  ? new PublicKey(token.creator)
2412
2552
  : new PublicKey(token.mint);
2413
2553
  const plan = await slrd.resolveClaim(token, probeUser);
2554
+ const payoutAddresses = plan.payouts?.length
2555
+ ? plan.payouts.map((row) => row.address.toBase58())
2556
+ : typeof plan.meta?.payoutAddress === "string"
2557
+ ? [plan.meta.payoutAddress]
2558
+ : token.creator
2559
+ ? [token.creator]
2560
+ : [];
2414
2561
  const payoutAddress =
2415
- typeof plan.meta?.payoutAddress === "string"
2416
- ? plan.meta.payoutAddress
2417
- : token.creator;
2562
+ payoutAddresses.length === 1 ? payoutAddresses[0] : null;
2418
2563
  const output = {
2419
2564
  action: "inspect",
2420
2565
  token: token.mint,
2421
2566
  source: plan.source,
2422
2567
  payoutAddress: payoutAddress ?? null,
2568
+ payoutAddresses,
2423
2569
  quote: {
2424
2570
  kind: plan.quoteAsset.kind,
2425
2571
  mint: plan.quoteAsset.mint.toBase58(),
@@ -2439,7 +2585,7 @@ async function main() {
2439
2585
  return;
2440
2586
  }
2441
2587
 
2442
- throw new Error("Usage: slrd rewards <inspect|claim> <token|ca>");
2588
+ throw new Error("Usage: slrd rewards <inspect|claim|claim-status> ...");
2443
2589
  }
2444
2590
 
2445
2591
  if (command === "claim") {
@@ -5,7 +5,7 @@ import {
5
5
  type MeteoraStrategy,
6
6
  type MeteoraTimeframe,
7
7
  type Solard,
8
- } from "@solard/sdk";
8
+ } from "@solard/core";
9
9
 
10
10
  const WSOL = "So11111111111111111111111111111111111111112";
11
11
 
@@ -5,7 +5,7 @@ import {
5
5
  buildPumpExternalDeployment,
6
6
  createTraderSolard,
7
7
  type PumpExternalDeploymentBuild,
8
- } from "@solard/sdk";
8
+ } from "@solard/core";
9
9
 
10
10
  export type ExternalPumpFlags = Map<string, string>;
11
11
 
@@ -13,7 +13,7 @@ import {
13
13
  type PumpSpamBuyRunResult,
14
14
  type PumpSpamBuySettings,
15
15
  type SenderId,
16
- } from "@solard/sdk";
16
+ } from "@solard/core";
17
17
  import {
18
18
  bigintFlag,
19
19
  enabled,
@@ -44,7 +44,7 @@ import {
44
44
  type TokenMetadata,
45
45
  type TraderSubmitMode,
46
46
  type VanityMintPoolReservation,
47
- } from "@solard/sdk";
47
+ } from "@solard/core";
48
48
 
49
49
  export type Flags = Map<string, string[]>;
50
50
 
@@ -1697,7 +1697,7 @@ export async function runPumpTokenLaunchFromArgs(
1697
1697
  spam,
1698
1698
  kind: `cli:launch:pump:${input.alias}`,
1699
1699
  reporter: report,
1700
- beforeDeploymentBroadcast:
1700
+ beforeDeploymentSubmission:
1701
1701
  armedEndpoints.length > 0
1702
1702
  ? async () => {
1703
1703
  await releaseArmedBuyerEndpoints({
@@ -1709,7 +1709,7 @@ export async function runPumpTokenLaunchFromArgs(
1709
1709
  });
1710
1710
  }
1711
1711
  : undefined,
1712
- onDeploymentBroadcastFailure:
1712
+ onDeploymentSubmissionFailure:
1713
1713
  armedEndpoints.length > 0
1714
1714
  ? async (error) => {
1715
1715
  await abortArmedBuyerEndpoints({
@@ -9,7 +9,7 @@ import {
9
9
  uploadPumpMetadata,
10
10
  type MetadataUploaderId,
11
11
  type PumpVampSourceMetadata,
12
- } from "@solard/sdk";
12
+ } from "@solard/core";
13
13
 
14
14
  import {
15
15
  first,
@@ -15,7 +15,7 @@ import {
15
15
  tokenAmount,
16
16
  type Solard,
17
17
  type TradeAsset,
18
- } from "@solard/sdk";
18
+ } from "@solard/core";
19
19
 
20
20
  type Flags = Map<string, string>;
21
21
  type Emit = (value: string) => void;
package/src/refs.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { findExternalContact } from "@solard/sdk";
1
+ import { findExternalContact } from "@solard/core";
2
2
 
3
3
  export type ResolvedDestinationRef = {
4
4
  input: string;
@@ -1,16 +1,13 @@
1
- import type { Solard } from "@solard/sdk";
1
+ import type { Solard } from "@solard/core";
2
2
  import {
3
3
  analyzeTokenHistory,
4
4
  analyzeTokenHistoryForensicsFromStore,
5
- backfillTokenHistory,
6
- backfillRaydiumTokenHistory,
7
5
  getTokenHistoryCoverage,
8
6
  loadTokenHistoryTrades,
9
- TokenHistoryError,
10
7
  type BackfillTokenHistoryOptions,
11
8
  type TokenHistoryCoverage,
12
9
  type TokenHistoryTrade,
13
- } from "@solard/sdk";
10
+ } from "@solard/core";
14
11
 
15
12
  export type TokenHistoryCliFlags = Map<string, string>;
16
13
 
@@ -212,34 +209,15 @@ async function runBackfill(args: {
212
209
  }
213
210
  },
214
211
  };
215
- let result: TokenHistoryCoverage;
216
- try {
217
- result = await backfillTokenHistory(
218
- args.slrd.connection(),
219
- args.mint,
220
- backfillOptions,
221
- );
222
- } catch (error) {
223
- if (
224
- !(error instanceof TokenHistoryError) ||
225
- error.code !== "UNSUPPORTED_TOKEN"
226
- )
227
- throw error;
228
- progress(
229
- "VENUE Pump history unsupported; trying Raydium/LaunchLab discovery",
230
- );
231
- result = await backfillRaydiumTokenHistory(
232
- args.slrd.connection(),
233
- args.mint,
234
- {
235
- ...backfillOptions,
236
- maxRaydiumPools: Math.max(
237
- 1,
238
- Math.trunc(numberFlag(args.flags, "raydium-pools", 8) ?? 8),
239
- ),
240
- },
241
- );
242
- }
212
+ const market = await args.slrd.history.market(args.mint, {
213
+ ...backfillOptions,
214
+ backfill: true,
215
+ maxRaydiumPools: Math.max(
216
+ 1,
217
+ Math.trunc(numberFlag(args.flags, "raydium-pools", 8) ?? 8),
218
+ ),
219
+ });
220
+ const result: TokenHistoryCoverage = market.coverage;
243
221
  if (jsonMode) {
244
222
  args.emit(`${json(result)}\n`);
245
223
  return;