brainblast 0.6.3 → 0.7.0

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/index.d.ts CHANGED
@@ -555,4 +555,310 @@ declare function checkDrift(dir: string, opts?: {
555
555
  }): Promise<DriftResult>;
556
556
  declare function renderDriftText(result: DriftResult): string;
557
557
 
558
- export { type AccountFlow, type AuditRef, type BuildOpts, type Candidate, type ChangedRanges, type CheckOutcome, type CheckResult, type CheckResultKind, type Checker, type ConfigCandidate, type ConfigChecker, type CostReport, DEFAULT_REGISTRY_URL, DEFAULT_TTL_HOURS, type DiffResult, type DriftAdvisory, type DriftBaseline, type DriftPackage, type DriftResult, type GraduationEvent, type OnChainProgram, type OsvAdvisory, PACK_MANIFEST_FILE, type PackInitOptions, type PackManifest, type PackRuleValidation, type PackValidateResult, type ParityNote, type ParsedDiff, type PriorityFeePosture, type ProgramCache, type ProgramCacheEntry, type Recoverability, type Rule, type RustAccountField, type RustCandidate, type RustChecker, type Severity, type TelemetrySubmitResult, type TrustGraph, type UpgradeAuthority, type UpgradeAuthorityKind, type UpgradeAuthoritySource, type VerifiedBuildState, type WatchEvent, type WatchOptions, analyzeCosts, applyDiffToFile, audit, auditWithRule, base58Decode, base58Encode, buildTrustGraph, rules as bundledRules, cacheSize, checkDrift, checkerKinds, defaultCachePath, diffVersions, fileChanged, findCandidates, findConfigCandidates, generateTestForResult, getCacheEntry, getCacheEntryMeta, getChangedRanges, getRepoHash, getUserHash, getWorkingTreeChanges, initPack, isEntryExpired, isTelemetryEnabled, isValidSolanaAddress, lamportsToSol, loadDirectory, loadPack, loadPacksFromDir, loadProgramCache, loadRules, parseDiff, putCacheEntry, queryOsv, rangeChanged, recordGraduationEvents, renderCostReportMd, renderDiffMd, renderDiffText, renderDriftText, renderTest, renderTrustGraphMd, rentExemptMinimum, resolveRules, riskScore, runChecker, runIncrementalScan, saveProgramCache, seedPackages, startWatch, submitTelemetry, telemetryFilePath, testKinds, validatePack, validatePackManifest };
558
+ interface CanonicalMint {
559
+ symbol: string;
560
+ name: string;
561
+ mint: string;
562
+ }
563
+ declare const CANONICAL_MINTS: Record<string, CanonicalMint>;
564
+ declare const CANONICAL_BY_MINT: Record<string, CanonicalMint>;
565
+ declare function canonicalMintForSymbol(symbol: string): CanonicalMint | undefined;
566
+ declare function isCanonicalMint(mint: string): boolean;
567
+
568
+ type IdentityStatus = "verified-canonical" | "verified" | "unverified" | "unknown";
569
+ interface TokenIdentity {
570
+ mint: string;
571
+ status: IdentityStatus;
572
+ symbol?: string;
573
+ name?: string;
574
+ source: "bundled" | "jupiter" | "none";
575
+ impersonation: boolean;
576
+ canonicalMint?: string;
577
+ expectMismatch?: boolean;
578
+ detail?: string;
579
+ }
580
+ interface VerifyOpts {
581
+ expectSymbol?: string;
582
+ claimedSymbol?: string;
583
+ baseUrl?: string;
584
+ offline?: boolean;
585
+ }
586
+ declare function verifyTokenIdentity(mint: string, opts?: VerifyOpts): Promise<TokenIdentity>;
587
+
588
+ interface RicoTokenSecurity {
589
+ hasMintAuthority: boolean;
590
+ hasFreezeAuthority: boolean;
591
+ isMutable: boolean;
592
+ riskLevel?: string;
593
+ riskFactors?: string[];
594
+ }
595
+ interface RicoResult {
596
+ mint: string;
597
+ riskScore: number;
598
+ totalHolders: number;
599
+ cabalCount: number;
600
+ snipersDetected: boolean;
601
+ sniperPct: number;
602
+ bundleClustersDetected: boolean;
603
+ symbol?: string;
604
+ name?: string;
605
+ tokenSecurity?: RicoTokenSecurity;
606
+ deployerFlags: string[];
607
+ tier?: string;
608
+ processingMs?: number;
609
+ }
610
+ type RicoOutcome = {
611
+ ok: true;
612
+ result: RicoResult;
613
+ } | {
614
+ ok: false;
615
+ kind: "auth" | "rate-limit" | "bad-request" | "server" | "network";
616
+ status?: number;
617
+ error: string;
618
+ retryAfterMs?: number;
619
+ };
620
+ declare function deployerFlagsFrom(sec?: RicoTokenSecurity): string[];
621
+ declare function renderRicoText(r: RicoResult): string;
622
+ declare function analyzeToken(mint: string, opts?: {
623
+ apiKey?: string;
624
+ baseUrl?: string;
625
+ }): Promise<RicoOutcome>;
626
+
627
+ declare const KNOWN_PROGRAMS: Record<string, string>;
628
+ type FirewallSeverity = "info" | "warn" | "critical";
629
+ type FirewallVerdict = "allow" | "warn" | "block";
630
+ interface FirewallFinding {
631
+ severity: FirewallSeverity;
632
+ kind: string;
633
+ detail: string;
634
+ }
635
+ interface FirewallProgram {
636
+ id: string;
637
+ label: string | null;
638
+ known: boolean;
639
+ topLevel: boolean;
640
+ }
641
+ interface DecodedInstruction {
642
+ programIdIndex: number;
643
+ programId: string;
644
+ accountIndexes: number[];
645
+ data: Uint8Array;
646
+ }
647
+ interface DecodedTx {
648
+ version: "legacy" | number;
649
+ numRequiredSignatures: number;
650
+ numReadonlySigned: number;
651
+ numReadonlyUnsigned: number;
652
+ staticAccountKeys: string[];
653
+ recentBlockhash: string;
654
+ instructions: DecodedInstruction[];
655
+ addressTableLookups: {
656
+ accountKey: string;
657
+ writableCount: number;
658
+ readonlyCount: number;
659
+ }[];
660
+ }
661
+ interface FirewallReport {
662
+ version: "legacy" | number;
663
+ feePayer: string;
664
+ numSigners: number;
665
+ staticAccounts: number;
666
+ programs: FirewallProgram[];
667
+ usesAddressLookupTables: boolean;
668
+ simulation: {
669
+ ran: boolean;
670
+ ok?: boolean;
671
+ err?: unknown;
672
+ unitsConsumed?: number;
673
+ logsCount?: number;
674
+ cpiPrograms?: string[];
675
+ };
676
+ findings: FirewallFinding[];
677
+ verdict: FirewallVerdict;
678
+ }
679
+ declare function decodeTransaction(base64: string, opts?: {
680
+ messageOnly?: boolean;
681
+ }): DecodedTx;
682
+ declare function analyzeInstructions(decoded: DecodedTx, known: Record<string, string>): FirewallFinding[];
683
+ declare function parseCpiPrograms(logs: string[]): string[];
684
+ interface FirewallOpts extends RpcOpts {
685
+ simulate?: boolean;
686
+ messageOnly?: boolean;
687
+ knownPrograms?: Record<string, string>;
688
+ }
689
+ declare function inspectTransaction(base64: string, opts?: FirewallOpts): Promise<FirewallReport>;
690
+ declare function renderFirewallText(r: FirewallReport): string;
691
+
692
+ interface IdlAccount {
693
+ name: string;
694
+ isMut?: boolean;
695
+ isSigner?: boolean;
696
+ accounts?: IdlAccount[];
697
+ }
698
+ interface IdlInstruction {
699
+ name: string;
700
+ accounts: IdlAccount[];
701
+ }
702
+ interface AnchorIdl {
703
+ name?: string;
704
+ metadata?: {
705
+ name?: string;
706
+ version?: string;
707
+ };
708
+ version?: string;
709
+ instructions: IdlInstruction[];
710
+ }
711
+ declare function toSnakeCase(s: string): string;
712
+ declare function idlProgramName(idl: AnchorIdl): string;
713
+ declare function parseIdl(json: unknown): AnchorIdl;
714
+ interface IdlConstraintParams {
715
+ idlName: string;
716
+ instructions: {
717
+ name: string;
718
+ signers: string[];
719
+ mutable: string[];
720
+ }[];
721
+ }
722
+ declare function buildConstraintParams(idl: AnchorIdl): IdlConstraintParams;
723
+ declare function generateRulesFromIdl(idl: AnchorIdl): Rule[];
724
+ declare function renderRulesYaml(rules: Rule[]): string;
725
+
726
+ type Grade = "A" | "B" | "C" | "D" | "F";
727
+ interface ScoreFactor {
728
+ name: string;
729
+ weight: number;
730
+ points: number;
731
+ detail: string;
732
+ }
733
+ interface TrustScore {
734
+ programId: string;
735
+ resolved: boolean;
736
+ score: number | null;
737
+ grade: Grade | "unrated";
738
+ factors: ScoreFactor[];
739
+ summary: string;
740
+ program?: OnChainProgram;
741
+ unresolvedReason?: string;
742
+ }
743
+ declare function gradeForScore(score: number): Grade;
744
+ declare function scoreFromProgram(program: OnChainProgram): TrustScore;
745
+ declare function scoreProgram(programId: string, opts?: BuildOpts): Promise<TrustScore>;
746
+ declare function renderScoreText(s: TrustScore): string;
747
+ declare function gradeAtLeast(grade: Grade | "unrated", min: Grade): boolean;
748
+
749
+ type ChainEvent = {
750
+ type: "watch_started";
751
+ programId: string;
752
+ headSignature: string | null;
753
+ baselineAuthority: string | null;
754
+ ts: string;
755
+ } | {
756
+ type: "new_activity";
757
+ programId: string;
758
+ newCount: number;
759
+ signatures: string[];
760
+ ts: string;
761
+ } | {
762
+ type: "authority_changed";
763
+ programId: string;
764
+ from: string | null;
765
+ to: string | null;
766
+ ts: string;
767
+ } | {
768
+ type: "poll_error";
769
+ programId: string;
770
+ message: string;
771
+ ts: string;
772
+ };
773
+ interface ChainWatchState {
774
+ lastSignature: string | null;
775
+ baselineAuthority: string | null;
776
+ initialized: boolean;
777
+ }
778
+ interface ChainWatchOpts extends RpcOpts {
779
+ limit?: number;
780
+ intervalMs?: number;
781
+ emit?: (e: ChainEvent) => void;
782
+ probeAuthority?: (programId: string, opts: RpcOpts) => Promise<{
783
+ address: string | null;
784
+ }>;
785
+ }
786
+ declare function pollChainOnce(programId: string, state: ChainWatchState, opts?: ChainWatchOpts): Promise<{
787
+ events: ChainEvent[];
788
+ state: ChainWatchState;
789
+ }>;
790
+ declare function initialChainWatchState(): ChainWatchState;
791
+ declare function startChainWatch(programId: string, opts?: ChainWatchOpts): {
792
+ stop: () => void;
793
+ };
794
+
795
+ type PreflightStatus = "pass" | "warn" | "fail" | "skip";
796
+ type PreflightVerdict = "GO" | "CAUTION" | "NO-GO";
797
+ interface PreflightCheck {
798
+ id: string;
799
+ label: string;
800
+ status: PreflightStatus;
801
+ detail: string;
802
+ }
803
+ interface MintInfo {
804
+ mintAuthorityRevoked: boolean;
805
+ freezeAuthorityRevoked: boolean;
806
+ mintAuthority: string | null;
807
+ freezeAuthority: string | null;
808
+ supply: string;
809
+ decimals: number;
810
+ isInitialized: boolean;
811
+ }
812
+ interface PreflightReport {
813
+ mint: string;
814
+ verdict: PreflightVerdict;
815
+ checks: PreflightCheck[];
816
+ mintInfo?: MintInfo;
817
+ identity?: TokenIdentity;
818
+ quality?: RicoResult;
819
+ }
820
+ declare function parseMintAccount(data: Uint8Array): MintInfo;
821
+ interface PreflightOpts extends RpcOpts {
822
+ apiKey?: string;
823
+ ricoBaseUrl?: string;
824
+ jupBaseUrl?: string;
825
+ offline?: boolean;
826
+ failOnRisk?: number;
827
+ }
828
+ declare function pumpPreflight(mint: string, opts?: PreflightOpts): Promise<PreflightReport>;
829
+ declare function renderPreflightText(r: PreflightReport): string;
830
+
831
+ interface BatchRow {
832
+ mint: string;
833
+ identityStatus: IdentityStatus | "error";
834
+ impersonation: boolean;
835
+ symbol?: string;
836
+ riskScore?: number;
837
+ snipers?: boolean;
838
+ bundleClusters?: boolean;
839
+ deployerFlags?: string[];
840
+ error?: string;
841
+ rank: number;
842
+ }
843
+ interface BatchResult {
844
+ rows: BatchRow[];
845
+ summary: {
846
+ total: number;
847
+ impersonators: number;
848
+ highRisk: number;
849
+ errored: number;
850
+ };
851
+ }
852
+ interface BatchScanOpts {
853
+ apiKey?: string;
854
+ ricoBaseUrl?: string;
855
+ jupBaseUrl?: string;
856
+ offline?: boolean;
857
+ concurrency?: number;
858
+ failOnRisk?: number;
859
+ }
860
+ declare function batchScan(mints: string[], opts?: BatchScanOpts): Promise<BatchResult>;
861
+ declare function parseMintList(content: string): string[];
862
+ declare function renderBatchText(result: BatchResult): string;
863
+
864
+ export { type AccountFlow, type AnchorIdl, type AuditRef, type BatchResult, type BatchRow, type BatchScanOpts, type BuildOpts, CANONICAL_BY_MINT, CANONICAL_MINTS, type Candidate, type CanonicalMint, type ChainEvent, type ChainWatchOpts, type ChainWatchState, type ChangedRanges, type CheckOutcome, type CheckResult, type CheckResultKind, type Checker, type ConfigCandidate, type ConfigChecker, type CostReport, DEFAULT_REGISTRY_URL, DEFAULT_TTL_HOURS, type DecodedInstruction, type DecodedTx, type DiffResult, type DriftAdvisory, type DriftBaseline, type DriftPackage, type DriftResult, type FirewallFinding, type FirewallOpts, type FirewallProgram, type FirewallReport, type FirewallSeverity, type FirewallVerdict, type Grade, type GraduationEvent, type IdentityStatus, type IdlAccount, type IdlConstraintParams, type IdlInstruction, KNOWN_PROGRAMS, type MintInfo, type OnChainProgram, type OsvAdvisory, PACK_MANIFEST_FILE, type PackInitOptions, type PackManifest, type PackRuleValidation, type PackValidateResult, type ParityNote, type ParsedDiff, type PreflightCheck, type PreflightOpts, type PreflightReport, type PreflightStatus, type PreflightVerdict, type PriorityFeePosture, type ProgramCache, type ProgramCacheEntry, type Recoverability, type RicoOutcome, type RicoResult, type RicoTokenSecurity, type Rule, type RustAccountField, type RustCandidate, type RustChecker, type ScoreFactor, type Severity, type TelemetrySubmitResult, type TokenIdentity, type TrustGraph, type TrustScore, type UpgradeAuthority, type UpgradeAuthorityKind, type UpgradeAuthoritySource, type VerifiedBuildState, type VerifyOpts, type WatchEvent, type WatchOptions, analyzeCosts, analyzeInstructions, analyzeToken, applyDiffToFile, audit, auditWithRule, base58Decode, base58Encode, batchScan, buildConstraintParams, buildTrustGraph, rules as bundledRules, cacheSize, canonicalMintForSymbol, checkDrift, checkerKinds, decodeTransaction, defaultCachePath, deployerFlagsFrom, diffVersions, fileChanged, findCandidates, findConfigCandidates, generateRulesFromIdl, generateTestForResult, getCacheEntry, getCacheEntryMeta, getChangedRanges, getRepoHash, getUserHash, getWorkingTreeChanges, gradeAtLeast, gradeForScore, idlProgramName, initPack, initialChainWatchState, inspectTransaction, isCanonicalMint, isEntryExpired, isTelemetryEnabled, isValidSolanaAddress, lamportsToSol, loadDirectory, loadPack, loadPacksFromDir, loadProgramCache, loadRules, parseCpiPrograms, parseDiff, parseIdl, parseMintAccount, parseMintList, pollChainOnce, pumpPreflight, putCacheEntry, queryOsv, rangeChanged, recordGraduationEvents, renderBatchText, renderCostReportMd, renderDiffMd, renderDiffText, renderDriftText, renderFirewallText, renderPreflightText, renderRicoText, renderRulesYaml, renderScoreText, renderTest, renderTrustGraphMd, rentExemptMinimum, resolveRules, riskScore, runChecker, runIncrementalScan, saveProgramCache, scoreFromProgram, scoreProgram, seedPackages, startChainWatch, startWatch, submitTelemetry, telemetryFilePath, testKinds, toSnakeCase, validatePack, validatePackManifest, verifyTokenIdentity };
package/dist/index.js CHANGED
@@ -1,37 +1,76 @@
1
+ import {
2
+ checkDrift,
3
+ renderDriftText,
4
+ seedPackages
5
+ } from "./chunk-EAKU3L7F.js";
6
+ import {
7
+ KNOWN_PROGRAMS,
8
+ analyzeInstructions,
9
+ decodeTransaction,
10
+ inspectTransaction,
11
+ parseCpiPrograms,
12
+ renderFirewallText
13
+ } from "./chunk-HL7NVANZ.js";
14
+ import {
15
+ gradeAtLeast,
16
+ gradeForScore,
17
+ renderScoreText,
18
+ scoreFromProgram,
19
+ scoreProgram
20
+ } from "./chunk-UWE6HAGS.js";
21
+ import {
22
+ parseMintAccount,
23
+ pumpPreflight,
24
+ renderPreflightText
25
+ } from "./chunk-WX3IR7LK.js";
26
+ import {
27
+ batchScan,
28
+ parseMintList,
29
+ renderBatchText
30
+ } from "./chunk-QC27GNQ7.js";
31
+ import {
32
+ analyzeToken,
33
+ deployerFlagsFrom,
34
+ renderRicoText
35
+ } from "./chunk-FQA5BYWW.js";
36
+ import {
37
+ verifyTokenIdentity
38
+ } from "./chunk-VI2JBH2T.js";
1
39
  import {
2
40
  DEFAULT_REGISTRY_URL,
3
- DEFAULT_TTL_HOURS,
4
41
  analyzeCosts,
5
42
  applyDiffToFile,
6
- base58Decode,
7
- base58Encode,
8
- buildTrustGraph,
9
- cacheSize,
10
- defaultCachePath,
11
- getCacheEntry,
12
- getCacheEntryMeta,
13
43
  getRepoHash,
14
44
  getUserHash,
15
45
  initPack,
16
- isEntryExpired,
17
46
  isTelemetryEnabled,
18
- isValidSolanaAddress,
19
47
  lamportsToSol,
20
- loadDirectory,
21
- loadProgramCache,
22
48
  parseDiff,
23
- putCacheEntry,
24
49
  recordGraduationEvents,
25
50
  renderCostReportMd,
26
- renderTrustGraphMd,
27
51
  rentExemptMinimum,
28
52
  runIncrementalScan,
29
- saveProgramCache,
30
53
  startWatch,
31
54
  submitTelemetry,
32
55
  telemetryFilePath,
33
56
  validatePack
34
- } from "./chunk-ZZ6LBZV5.js";
57
+ } from "./chunk-34VXOLJF.js";
58
+ import {
59
+ renderTrustGraphMd
60
+ } from "./chunk-2UZGWXIX.js";
61
+ import {
62
+ DEFAULT_TTL_HOURS,
63
+ buildTrustGraph,
64
+ cacheSize,
65
+ defaultCachePath,
66
+ getCacheEntry,
67
+ getCacheEntryMeta,
68
+ isEntryExpired,
69
+ loadDirectory,
70
+ loadProgramCache,
71
+ putCacheEntry,
72
+ saveProgramCache
73
+ } from "./chunk-SVSVVW6U.js";
35
74
  import {
36
75
  PACK_MANIFEST_FILE,
37
76
  audit,
@@ -52,7 +91,21 @@ import {
52
91
  runChecker,
53
92
  testKinds,
54
93
  validatePackManifest
55
- } from "./chunk-A56IF3UX.js";
94
+ } from "./chunk-CRYFCQYM.js";
95
+ import {
96
+ CANONICAL_BY_MINT,
97
+ CANONICAL_MINTS,
98
+ canonicalMintForSymbol,
99
+ isCanonicalMint
100
+ } from "./chunk-2XJORJPQ.js";
101
+ import {
102
+ buildConstraintParams,
103
+ generateRulesFromIdl,
104
+ idlProgramName,
105
+ parseIdl,
106
+ renderRulesYaml,
107
+ toSnakeCase
108
+ } from "./chunk-O5Z4ZJHC.js";
56
109
  import {
57
110
  diffVersions,
58
111
  queryOsv,
@@ -61,10 +114,16 @@ import {
61
114
  riskScore
62
115
  } from "./chunk-SC6RNNDW.js";
63
116
  import {
64
- checkDrift,
65
- renderDriftText,
66
- seedPackages
67
- } from "./chunk-EAKU3L7F.js";
117
+ initialChainWatchState,
118
+ pollChainOnce,
119
+ startChainWatch
120
+ } from "./chunk-DQ4KAYKQ.js";
121
+ import "./chunk-XSVQSK53.js";
122
+ import {
123
+ base58Decode,
124
+ base58Encode,
125
+ isValidSolanaAddress
126
+ } from "./chunk-VG5FMOLW.js";
68
127
  import "./chunk-3RG5ZIWI.js";
69
128
 
70
129
  // src/generate.ts
@@ -81,25 +140,36 @@ function generateTestForResult(result, rule, outPath) {
81
140
  return outPath;
82
141
  }
83
142
  export {
143
+ CANONICAL_BY_MINT,
144
+ CANONICAL_MINTS,
84
145
  DEFAULT_REGISTRY_URL,
85
146
  DEFAULT_TTL_HOURS,
147
+ KNOWN_PROGRAMS,
86
148
  PACK_MANIFEST_FILE,
87
149
  analyzeCosts,
150
+ analyzeInstructions,
151
+ analyzeToken,
88
152
  applyDiffToFile,
89
153
  audit,
90
154
  auditWithRule,
91
155
  base58Decode,
92
156
  base58Encode,
157
+ batchScan,
158
+ buildConstraintParams,
93
159
  buildTrustGraph,
94
160
  rules as bundledRules,
95
161
  cacheSize,
162
+ canonicalMintForSymbol,
96
163
  checkDrift,
97
164
  checkerKinds,
165
+ decodeTransaction,
98
166
  defaultCachePath,
167
+ deployerFlagsFrom,
99
168
  diffVersions,
100
169
  fileChanged,
101
170
  findCandidates,
102
171
  findConfigCandidates,
172
+ generateRulesFromIdl,
103
173
  generateTestForResult,
104
174
  getCacheEntry,
105
175
  getCacheEntryMeta,
@@ -107,7 +177,13 @@ export {
107
177
  getRepoHash,
108
178
  getUserHash,
109
179
  getWorkingTreeChanges,
180
+ gradeAtLeast,
181
+ gradeForScore,
182
+ idlProgramName,
110
183
  initPack,
184
+ initialChainWatchState,
185
+ inspectTransaction,
186
+ isCanonicalMint,
111
187
  isEntryExpired,
112
188
  isTelemetryEnabled,
113
189
  isValidSolanaAddress,
@@ -117,15 +193,27 @@ export {
117
193
  loadPacksFromDir,
118
194
  loadProgramCache,
119
195
  loadRules,
196
+ parseCpiPrograms,
120
197
  parseDiff,
198
+ parseIdl,
199
+ parseMintAccount,
200
+ parseMintList,
201
+ pollChainOnce,
202
+ pumpPreflight,
121
203
  putCacheEntry,
122
204
  queryOsv,
123
205
  rangeChanged,
124
206
  recordGraduationEvents,
207
+ renderBatchText,
125
208
  renderCostReportMd,
126
209
  renderDiffMd,
127
210
  renderDiffText,
128
211
  renderDriftText,
212
+ renderFirewallText,
213
+ renderPreflightText,
214
+ renderRicoText,
215
+ renderRulesYaml,
216
+ renderScoreText,
129
217
  renderTest,
130
218
  renderTrustGraphMd,
131
219
  rentExemptMinimum,
@@ -134,11 +222,16 @@ export {
134
222
  runChecker,
135
223
  runIncrementalScan,
136
224
  saveProgramCache,
225
+ scoreFromProgram,
226
+ scoreProgram,
137
227
  seedPackages,
228
+ startChainWatch,
138
229
  startWatch,
139
230
  submitTelemetry,
140
231
  telemetryFilePath,
141
232
  testKinds,
233
+ toSnakeCase,
142
234
  validatePack,
143
- validatePackManifest
235
+ validatePackManifest,
236
+ verifyTokenIdentity
144
237
  };
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  audit,
3
3
  resolveRules
4
- } from "./chunk-A56IF3UX.js";
4
+ } from "./chunk-CRYFCQYM.js";
5
+ import "./chunk-2XJORJPQ.js";
6
+ import "./chunk-O5Z4ZJHC.js";
5
7
  import {
6
8
  diffVersions,
7
9
  queryOsv
@@ -0,0 +1,16 @@
1
+ import {
2
+ parseMintAccount,
3
+ pumpPreflight,
4
+ renderPreflightText
5
+ } from "./chunk-WX3IR7LK.js";
6
+ import "./chunk-FQA5BYWW.js";
7
+ import "./chunk-VI2JBH2T.js";
8
+ import "./chunk-2XJORJPQ.js";
9
+ import "./chunk-XSVQSK53.js";
10
+ import "./chunk-VG5FMOLW.js";
11
+ import "./chunk-3RG5ZIWI.js";
12
+ export {
13
+ parseMintAccount,
14
+ pumpPreflight,
15
+ renderPreflightText
16
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ analyzeToken,
3
+ deployerFlagsFrom,
4
+ renderRicoText
5
+ } from "./chunk-FQA5BYWW.js";
6
+ import "./chunk-3RG5ZIWI.js";
7
+ export {
8
+ analyzeToken,
9
+ deployerFlagsFrom,
10
+ renderRicoText
11
+ };
@@ -0,0 +1,18 @@
1
+ import {
2
+ BPF_LOADER_2,
3
+ BPF_UPGRADEABLE_LOADER,
4
+ DEFAULT_RPC,
5
+ NATIVE_LOADER,
6
+ getAccountInfo,
7
+ probeUpgradeAuthority
8
+ } from "./chunk-XSVQSK53.js";
9
+ import "./chunk-VG5FMOLW.js";
10
+ import "./chunk-3RG5ZIWI.js";
11
+ export {
12
+ BPF_LOADER_2,
13
+ BPF_UPGRADEABLE_LOADER,
14
+ DEFAULT_RPC,
15
+ NATIVE_LOADER,
16
+ getAccountInfo,
17
+ probeUpgradeAuthority
18
+ };
@@ -0,0 +1,17 @@
1
+ id: solana-token-impersonation
2
+ severity: critical
3
+ title: Hardcoded Solana mint address doesn't match the named token's canonical address
4
+ component:
5
+ name: "@solana/web3.js / @solana/spl-token"
6
+ type: SDK
7
+ version: any
8
+ sourceUrl: https://github.com/solana-labs/solana-web3.js
9
+ detect:
10
+ modules: ["@solana/web3.js", "@solana/spl-token"]
11
+ nameRegex: "mint|payment|usdc|usdt|swap|pay|deposit|withdraw|treasury|stablecoin"
12
+ triggerCalls: []
13
+ requiresImport: true
14
+ check:
15
+ kind: solana-mint-identity-mismatch
16
+ test:
17
+ kind: none
@@ -0,0 +1,18 @@
1
+ import {
2
+ gradeAtLeast,
3
+ gradeForScore,
4
+ renderScoreText,
5
+ scoreFromProgram,
6
+ scoreProgram
7
+ } from "./chunk-UWE6HAGS.js";
8
+ import "./chunk-SVSVVW6U.js";
9
+ import "./chunk-XSVQSK53.js";
10
+ import "./chunk-VG5FMOLW.js";
11
+ import "./chunk-3RG5ZIWI.js";
12
+ export {
13
+ gradeAtLeast,
14
+ gradeForScore,
15
+ renderScoreText,
16
+ scoreFromProgram,
17
+ scoreProgram
18
+ };
@@ -0,0 +1,8 @@
1
+ import {
2
+ verifyTokenIdentity
3
+ } from "./chunk-VI2JBH2T.js";
4
+ import "./chunk-2XJORJPQ.js";
5
+ import "./chunk-3RG5ZIWI.js";
6
+ export {
7
+ verifyTokenIdentity
8
+ };
@@ -0,0 +1,49 @@
1
+ import {
2
+ renderProgram,
3
+ renderTrustGraphMd
4
+ } from "./chunk-2UZGWXIX.js";
5
+ import {
6
+ DEFAULT_TTL_HOURS,
7
+ buildTrustGraph,
8
+ cacheSize,
9
+ defaultCachePath,
10
+ getCacheEntry,
11
+ getCacheEntryMeta,
12
+ isEntryExpired,
13
+ loadDirectory,
14
+ loadProgramCache,
15
+ putCacheEntry,
16
+ saveProgramCache
17
+ } from "./chunk-SVSVVW6U.js";
18
+ import {
19
+ DEFAULT_RPC,
20
+ getAccountInfo,
21
+ probeUpgradeAuthority
22
+ } from "./chunk-XSVQSK53.js";
23
+ import {
24
+ base58Decode,
25
+ base58Encode,
26
+ isValidSolanaAddress
27
+ } from "./chunk-VG5FMOLW.js";
28
+ import "./chunk-3RG5ZIWI.js";
29
+ export {
30
+ DEFAULT_RPC,
31
+ DEFAULT_TTL_HOURS,
32
+ base58Decode,
33
+ base58Encode,
34
+ buildTrustGraph,
35
+ cacheSize,
36
+ defaultCachePath,
37
+ getAccountInfo,
38
+ getCacheEntry,
39
+ getCacheEntryMeta,
40
+ isEntryExpired,
41
+ isValidSolanaAddress,
42
+ loadDirectory,
43
+ loadProgramCache,
44
+ probeUpgradeAuthority,
45
+ putCacheEntry,
46
+ renderProgram,
47
+ renderTrustGraphMd,
48
+ saveProgramCache
49
+ };