@putkoff/abstract-solcatcher 0.0.9

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.
Files changed (210) hide show
  1. package/dist/cjs/cli.d.ts +2 -0
  2. package/dist/cjs/cli.d.ts.map +1 -0
  3. package/dist/cjs/index.d.ts +47 -0
  4. package/dist/cjs/index.d.ts.map +1 -0
  5. package/dist/cjs/index.js +156807 -0
  6. package/dist/cjs/index.js.map +1 -0
  7. package/dist/cjs/runtime.d.ts +4 -0
  8. package/dist/cjs/runtime.d.ts.map +1 -0
  9. package/dist/cjs/server.d.ts +729 -0
  10. package/dist/cjs/server.d.ts.map +1 -0
  11. package/dist/cjs/types/cli.d.ts +2 -0
  12. package/dist/cjs/types/config/defaultConfig.d.ts +2 -0
  13. package/dist/cjs/types/config/loadConfig.d.ts +2 -0
  14. package/dist/cjs/types/config/types.d.ts +4 -0
  15. package/dist/cjs/types/env/index.d.ts +38 -0
  16. package/dist/cjs/types/env/loadEnv.d.ts +2 -0
  17. package/dist/cjs/types/env/postgres.d.ts +8 -0
  18. package/dist/cjs/types/env/queues.d.ts +12 -0
  19. package/dist/cjs/types/env/rabbit.d.ts +8 -0
  20. package/dist/cjs/types/env/solana.d.ts +8 -0
  21. package/dist/cjs/types/index.d.ts +1 -0
  22. package/dist/cjs/types/main.d.ts +1 -0
  23. package/dist/cjs/types/runtime/bootstrap.d.ts +1 -0
  24. package/dist/cjs/types/runtime/start.d.ts +1 -0
  25. package/dist/cjs/types/server/db/connections.d.ts +21 -0
  26. package/dist/cjs/types/server/db/env_imports.d.ts +34 -0
  27. package/dist/cjs/types/server/db/index.d.ts +4 -0
  28. package/dist/cjs/types/server/db/init_imports.d.ts +18 -0
  29. package/dist/cjs/types/server/db/module_imports.d.ts +1 -0
  30. package/dist/cjs/types/server/db/tokenUtils/index.d.ts +1 -0
  31. package/dist/cjs/types/server/db/tokenUtils/pubKeyUtils.d.ts +10 -0
  32. package/dist/cjs/types/server/index.d.ts +4 -0
  33. package/dist/cjs/types/server/rabbitMq/core/concurrency.d.ts +2 -0
  34. package/dist/cjs/types/server/rabbitMq/core/consumer.d.ts +1 -0
  35. package/dist/cjs/types/server/rabbitMq/core/index.d.ts +5 -0
  36. package/dist/cjs/types/server/rabbitMq/core/publisher.d.ts +1 -0
  37. package/dist/cjs/types/server/rabbitMq/core/rabbitManager.d.ts +7 -0
  38. package/dist/cjs/types/server/rabbitMq/core/websocketServer.d.ts +6 -0
  39. package/dist/cjs/types/server/rabbitMq/index.d.ts +5 -0
  40. package/dist/cjs/types/server/rabbitMq/main/index.d.ts +1 -0
  41. package/dist/cjs/types/server/rabbitMq/main/services.d.ts +1 -0
  42. package/dist/cjs/types/server/rabbitMq/processors/get_pair_data.d.ts +62 -0
  43. package/dist/cjs/types/server/rabbitMq/processors/index.d.ts +5 -0
  44. package/dist/cjs/types/server/rabbitMq/processors/logParser.d.ts +18 -0
  45. package/dist/cjs/types/server/rabbitMq/processors/make_meta_list.d.ts +51 -0
  46. package/dist/cjs/types/server/rabbitMq/processors/metaDataProcessor.d.ts +70 -0
  47. package/dist/cjs/types/server/rabbitMq/processors/processLogs.d.ts +14 -0
  48. package/dist/cjs/types/server/rabbitMq/producers/index.d.ts +4 -0
  49. package/dist/cjs/types/server/rabbitMq/solana/index.d.ts +2 -0
  50. package/dist/cjs/types/server/rabbitMq/solana/pumpFunMonitor.d.ts +1 -0
  51. package/dist/cjs/types/server/rabbitMq/solana/solanaLogMonitor.d.ts +8 -0
  52. package/dist/cjs/types/server/schemas/accounts/index.d.ts +18 -0
  53. package/dist/cjs/types/server/schemas/getTransactions/index.d.ts +13 -0
  54. package/dist/cjs/types/server/schemas/index.d.ts +7 -0
  55. package/dist/cjs/types/server/schemas/logs/index.d.ts +41 -0
  56. package/dist/cjs/types/server/schemas/main/index.d.ts +4 -0
  57. package/dist/cjs/types/server/schemas/metaData/index.d.ts +97 -0
  58. package/dist/cjs/types/server/schemas/pairs/index.d.ts +137 -0
  59. package/dist/cjs/types/server/schemas/transactions/index.d.ts +19 -0
  60. package/dist/cjs/types/server/utils/envUtils.d.ts +7 -0
  61. package/dist/cjs/types/server/utils/index.d.ts +7 -0
  62. package/dist/cjs/types/server/utils/jsonUtils.d.ts +10 -0
  63. package/dist/cjs/types/server/utils/networkUtils.d.ts +3 -0
  64. package/dist/cjs/types/server/utils/pathUtils.d.ts +11 -0
  65. package/dist/cjs/types/server/utils/rpcUtils.d.ts +54 -0
  66. package/dist/cjs/types/shared/config.d.ts +1 -0
  67. package/dist/cjs/types/shared/constants.d.ts +4 -0
  68. package/dist/cjs/types/shared/env_imports.d.ts +35 -0
  69. package/dist/cjs/types/shared/index.d.ts +5 -0
  70. package/dist/cjs/types/shared/init_imports.d.ts +1 -0
  71. package/dist/cjs/types/shared/module_imports.d.ts +1 -0
  72. package/dist/esm/cli.d.ts +2 -0
  73. package/dist/esm/cli.d.ts.map +1 -0
  74. package/dist/esm/index.d.ts +47 -0
  75. package/dist/esm/index.d.ts.map +1 -0
  76. package/dist/esm/index.js +156679 -0
  77. package/dist/esm/index.js.map +1 -0
  78. package/dist/esm/runtime.d.ts +4 -0
  79. package/dist/esm/runtime.d.ts.map +1 -0
  80. package/dist/esm/server.d.ts +729 -0
  81. package/dist/esm/server.d.ts.map +1 -0
  82. package/dist/esm/types/cli.d.ts +2 -0
  83. package/dist/esm/types/config/defaultConfig.d.ts +2 -0
  84. package/dist/esm/types/config/loadConfig.d.ts +2 -0
  85. package/dist/esm/types/config/types.d.ts +4 -0
  86. package/dist/esm/types/env/index.d.ts +38 -0
  87. package/dist/esm/types/env/loadEnv.d.ts +2 -0
  88. package/dist/esm/types/env/postgres.d.ts +8 -0
  89. package/dist/esm/types/env/queues.d.ts +12 -0
  90. package/dist/esm/types/env/rabbit.d.ts +8 -0
  91. package/dist/esm/types/env/solana.d.ts +8 -0
  92. package/dist/esm/types/index.d.ts +1 -0
  93. package/dist/esm/types/main.d.ts +1 -0
  94. package/dist/esm/types/runtime/bootstrap.d.ts +1 -0
  95. package/dist/esm/types/runtime/start.d.ts +1 -0
  96. package/dist/esm/types/server/db/connections.d.ts +21 -0
  97. package/dist/esm/types/server/db/env_imports.d.ts +34 -0
  98. package/dist/esm/types/server/db/index.d.ts +4 -0
  99. package/dist/esm/types/server/db/init_imports.d.ts +18 -0
  100. package/dist/esm/types/server/db/module_imports.d.ts +1 -0
  101. package/dist/esm/types/server/db/tokenUtils/index.d.ts +1 -0
  102. package/dist/esm/types/server/db/tokenUtils/pubKeyUtils.d.ts +10 -0
  103. package/dist/esm/types/server/index.d.ts +4 -0
  104. package/dist/esm/types/server/rabbitMq/core/concurrency.d.ts +2 -0
  105. package/dist/esm/types/server/rabbitMq/core/consumer.d.ts +1 -0
  106. package/dist/esm/types/server/rabbitMq/core/index.d.ts +5 -0
  107. package/dist/esm/types/server/rabbitMq/core/publisher.d.ts +1 -0
  108. package/dist/esm/types/server/rabbitMq/core/rabbitManager.d.ts +7 -0
  109. package/dist/esm/types/server/rabbitMq/core/websocketServer.d.ts +6 -0
  110. package/dist/esm/types/server/rabbitMq/index.d.ts +5 -0
  111. package/dist/esm/types/server/rabbitMq/main/index.d.ts +1 -0
  112. package/dist/esm/types/server/rabbitMq/main/services.d.ts +1 -0
  113. package/dist/esm/types/server/rabbitMq/processors/get_pair_data.d.ts +62 -0
  114. package/dist/esm/types/server/rabbitMq/processors/index.d.ts +5 -0
  115. package/dist/esm/types/server/rabbitMq/processors/logParser.d.ts +18 -0
  116. package/dist/esm/types/server/rabbitMq/processors/make_meta_list.d.ts +51 -0
  117. package/dist/esm/types/server/rabbitMq/processors/metaDataProcessor.d.ts +70 -0
  118. package/dist/esm/types/server/rabbitMq/processors/processLogs.d.ts +14 -0
  119. package/dist/esm/types/server/rabbitMq/producers/index.d.ts +4 -0
  120. package/dist/esm/types/server/rabbitMq/solana/index.d.ts +2 -0
  121. package/dist/esm/types/server/rabbitMq/solana/pumpFunMonitor.d.ts +1 -0
  122. package/dist/esm/types/server/rabbitMq/solana/solanaLogMonitor.d.ts +8 -0
  123. package/dist/esm/types/server/schemas/accounts/index.d.ts +18 -0
  124. package/dist/esm/types/server/schemas/getTransactions/index.d.ts +13 -0
  125. package/dist/esm/types/server/schemas/index.d.ts +7 -0
  126. package/dist/esm/types/server/schemas/logs/index.d.ts +41 -0
  127. package/dist/esm/types/server/schemas/main/index.d.ts +4 -0
  128. package/dist/esm/types/server/schemas/metaData/index.d.ts +97 -0
  129. package/dist/esm/types/server/schemas/pairs/index.d.ts +137 -0
  130. package/dist/esm/types/server/schemas/transactions/index.d.ts +19 -0
  131. package/dist/esm/types/server/utils/envUtils.d.ts +7 -0
  132. package/dist/esm/types/server/utils/index.d.ts +7 -0
  133. package/dist/esm/types/server/utils/jsonUtils.d.ts +10 -0
  134. package/dist/esm/types/server/utils/networkUtils.d.ts +3 -0
  135. package/dist/esm/types/server/utils/pathUtils.d.ts +11 -0
  136. package/dist/esm/types/server/utils/rpcUtils.d.ts +54 -0
  137. package/dist/esm/types/shared/config.d.ts +1 -0
  138. package/dist/esm/types/shared/constants.d.ts +4 -0
  139. package/dist/esm/types/shared/env_imports.d.ts +35 -0
  140. package/dist/esm/types/shared/index.d.ts +5 -0
  141. package/dist/esm/types/shared/init_imports.d.ts +1 -0
  142. package/dist/esm/types/shared/module_imports.d.ts +1 -0
  143. package/dist/types/cli.d.ts +2 -0
  144. package/dist/types/config/defaultConfig.d.ts +2 -0
  145. package/dist/types/config/loadConfig.d.ts +2 -0
  146. package/dist/types/config/types.d.ts +4 -0
  147. package/dist/types/env/index.d.ts +38 -0
  148. package/dist/types/env/loadEnv.d.ts +2 -0
  149. package/dist/types/env/postgres.d.ts +8 -0
  150. package/dist/types/env/queues.d.ts +12 -0
  151. package/dist/types/env/rabbit.d.ts +8 -0
  152. package/dist/types/env/solana.d.ts +8 -0
  153. package/dist/types/index.d.ts +1 -0
  154. package/dist/types/main.d.ts +1 -0
  155. package/dist/types/runtime/bootstrap.d.ts +1 -0
  156. package/dist/types/runtime/start.d.ts +1 -0
  157. package/dist/types/server/db/connections.d.ts +21 -0
  158. package/dist/types/server/db/env_imports.d.ts +34 -0
  159. package/dist/types/server/db/index.d.ts +4 -0
  160. package/dist/types/server/db/init_imports.d.ts +18 -0
  161. package/dist/types/server/db/module_imports.d.ts +1 -0
  162. package/dist/types/server/db/pubKeyUtils.d.ts +10 -0
  163. package/dist/types/server/db/tokenUtils/extrapolateBondingCurve.d.ts +43 -0
  164. package/dist/types/server/db/tokenUtils/index.d.ts +1 -0
  165. package/dist/types/server/db/tokenUtils/pubKeyUtils.d.ts +10 -0
  166. package/dist/types/server/index.d.ts +4 -0
  167. package/dist/types/server/rabbitMq/core/concurrency.d.ts +2 -0
  168. package/dist/types/server/rabbitMq/core/consumer.d.ts +1 -0
  169. package/dist/types/server/rabbitMq/core/index.d.ts +5 -0
  170. package/dist/types/server/rabbitMq/core/publisher.d.ts +1 -0
  171. package/dist/types/server/rabbitMq/core/rabbitManager.d.ts +7 -0
  172. package/dist/types/server/rabbitMq/core/websocketServer.d.ts +6 -0
  173. package/dist/types/server/rabbitMq/index.d.ts +5 -0
  174. package/dist/types/server/rabbitMq/main/index.d.ts +1 -0
  175. package/dist/types/server/rabbitMq/main/services.d.ts +1 -0
  176. package/dist/types/server/rabbitMq/processors/get_pair_data.d.ts +62 -0
  177. package/dist/types/server/rabbitMq/processors/index.d.ts +5 -0
  178. package/dist/types/server/rabbitMq/processors/logParser.d.ts +18 -0
  179. package/dist/types/server/rabbitMq/processors/make_meta_list.d.ts +51 -0
  180. package/dist/types/server/rabbitMq/processors/metaDataProcessor.d.ts +70 -0
  181. package/dist/types/server/rabbitMq/processors/processLogs.d.ts +14 -0
  182. package/dist/types/server/rabbitMq/producers/index.d.ts +4 -0
  183. package/dist/types/server/rabbitMq/solana/index.d.ts +2 -0
  184. package/dist/types/server/rabbitMq/solana/pumpFunMonitor.d.ts +1 -0
  185. package/dist/types/server/rabbitMq/solana/solanaLogMonitor.d.ts +8 -0
  186. package/dist/types/server/schemas/accounts/index.d.ts +18 -0
  187. package/dist/types/server/schemas/getTransactions/index.d.ts +13 -0
  188. package/dist/types/server/schemas/index.d.ts +7 -0
  189. package/dist/types/server/schemas/logs/index.d.ts +41 -0
  190. package/dist/types/server/schemas/main/index.d.ts +4 -0
  191. package/dist/types/server/schemas/metaData/index.d.ts +97 -0
  192. package/dist/types/server/schemas/pairs/index.d.ts +137 -0
  193. package/dist/types/server/schemas/transactions/index.d.ts +19 -0
  194. package/dist/types/server/utils/envUtils.d.ts +7 -0
  195. package/dist/types/server/utils/index.d.ts +7 -0
  196. package/dist/types/server/utils/jsonUtils.d.ts +10 -0
  197. package/dist/types/server/utils/networkUtils.d.ts +3 -0
  198. package/dist/types/server/utils/pathUtils.d.ts +11 -0
  199. package/dist/types/server/utils/rabbitUtils.d.ts +25 -0
  200. package/dist/types/server/utils/rpcUtils.d.ts +54 -0
  201. package/dist/types/shared/config.d.ts +1 -0
  202. package/dist/types/shared/constants.d.ts +4 -0
  203. package/dist/types/shared/env_imports.d.ts +35 -0
  204. package/dist/types/shared/index.d.ts +5 -0
  205. package/dist/types/shared/init_imports.d.ts +1 -0
  206. package/dist/types/shared/module_imports.d.ts +1 -0
  207. package/dist/types/test/debugPrint.d.ts +1 -0
  208. package/dist/types/test/getMeta.d.ts +0 -0
  209. package/dist/types/test/index.d.ts +1 -0
  210. package/package.json +113 -0
@@ -0,0 +1,10 @@
1
+ export declare function safeDumpToFile(data: any, filePath: string): void;
2
+ export declare function safeReadFromJson(filePath: string): any;
3
+ /**
4
+ * Serializes the input to JSON if it's an object, excluding circular references.
5
+ *
6
+ * @param data - The data to serialize.
7
+ * @returns The serialized JSON string or the original data.
8
+ */
9
+ export declare function dumpIfJson(data: any): any;
10
+ export declare function loadQueries<T = any>(callerUrl: string, subPath?: string): T;
@@ -0,0 +1,3 @@
1
+ export declare const staticIp = "192.168.0.100";
2
+ export declare function isServerIp(): void;
3
+ export declare function get_host(): "127.0.0.1" | "localhost";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Equivalent of __dirname for ESM
3
+ */
4
+ export declare function getDirname(moduleUrl: string): string;
5
+ export declare function getParentDirectory(): string;
6
+ export declare function getAbsPath(subPath: string): string;
7
+ export declare function getEnvPath(): string;
8
+ export declare function getDbConfigsPath(): string;
9
+ export declare function getSchemasPath(): string;
10
+ export declare function getSchemasDirPath(subPath: string): string;
11
+ export declare function getBaseDomain(inputUrl: string): string;
@@ -0,0 +1,54 @@
1
+ export { fetchRpc } from './../db';
2
+ export interface RPCParams {
3
+ url?: any;
4
+ method: any;
5
+ params: any;
6
+ }
7
+ export declare function isRawResponse(response: any, typeObj: any): boolean;
8
+ export declare function getTextResponse(response: Response): Promise<string | null>;
9
+ export declare function getHeaders(): HeadersInit;
10
+ /**
11
+ * Fetches data from an IPFS URL.
12
+ * @param url - The IPFS URL to fetch data from.
13
+ * @returns The fetched data or null if an error occurs.
14
+ */
15
+ export declare function fetchIPFSData(url: string, consumerLogger?: any): Promise<any>;
16
+ export declare function getJsonResponse(response: Response, responseResult?: string, loadNestedJson?: boolean): Promise<any | null>;
17
+ export declare function getResponse(response: Response, responseResult?: string | undefined, rawResponse?: boolean, loadNestedJson?: boolean): Promise<any | string | Response>;
18
+ export declare function getRpcPayload(method: string, params?: any[], id?: number | string, jsonrpc?: string): any | null;
19
+ export declare function cleanQueries(priorQueries: any[] | undefined, interval: number): any[];
20
+ export declare function isRequestPerSingleRpc(priorQueries: any[], method: string, maxRequests: number, interval: number): false | number;
21
+ export declare function isRequestPerSingleIp(priorQueries: any[], maxRequests: number, interval: number): false | number;
22
+ export declare function isDataPerIp(priorQueries: any[], maxData: number, interval: number, avgData: number): false | number;
23
+ export declare function getIsLimit(priorQueries: any[] | undefined, method?: string, rateLimit?: number, rpsLimit?: number, interval?: number, dataInterval?: number, dataLimit?: number, avgData?: number): false | number;
24
+ export declare function fetchData(url: string, method: string, headers: {
25
+ [key: string]: string;
26
+ }, body: any): Promise<any>;
27
+ export declare function getRpcParams(method: string, params?: any[] | null, url?: string | null, id?: number | string | null, jsonrpc?: string | null, headers?: {
28
+ [key: string]: string;
29
+ } | null, call_method?: string): Promise<{
30
+ url: string;
31
+ call_method: string;
32
+ headers: {
33
+ [key: string]: string;
34
+ };
35
+ payload: any;
36
+ }>;
37
+ export declare function callRpc(method: string, params?: any, url?: any, id?: any, jsonrpc?: string | null, headers?: {
38
+ [key: string]: string;
39
+ } | null, call_method?: string): Promise<any>;
40
+ export interface RpcPayload {
41
+ method: string;
42
+ params?: any[];
43
+ id?: number | string;
44
+ jsonrpc?: string;
45
+ headers?: {
46
+ [key: string]: string;
47
+ };
48
+ url_1_only?: boolean;
49
+ url_2_only?: boolean;
50
+ }
51
+ export interface RpcResponse {
52
+ result?: any;
53
+ error?: any;
54
+ }
@@ -0,0 +1 @@
1
+ export declare function requireEnv(name: string, value?: string): string;
@@ -0,0 +1,4 @@
1
+ export declare const SOLCATCHER_DOMAIN = "https://solcatcher.io";
2
+ export declare const SOLCATCHER_API_URL = "https://solcatcher.io/api";
3
+ export declare const SOLCATCHER_API_RPC_URL = "https://solcatcher.io/api/rpc";
4
+ export declare const SOLCATCHER_API_RPC_MAKE_CALL_URL = "https://solcatcher.io/api/rpc/make_call";
@@ -0,0 +1,35 @@
1
+ export declare const DEFAULT_ENV_PATH = "./.env";
2
+ export declare const DEFAULT_SOLCATCHER_WS_BROADCAST_PORT = "9070";
3
+ export declare const DEFAULT_SOLCATCHER_AMQP_HOST = "127.0.0.1";
4
+ export declare const DEFAULT_SOLCATCHER_AMQP_PORT = "1234";
5
+ export declare const DEFAULT_SOLCATCHER_AMQP_USER = "solcatcher";
6
+ export declare const DEFAULT_SOLCATCHER_AMQP_NAME = "solcatcher";
7
+ export declare const DEFAULT_SOLCATCHER_AMQP_PASS = "solcatcher";
8
+ export declare const DEFAULT_SOLCATCHER_AMQP_UI_HOST = "127.0.0.1";
9
+ export declare const DEFAULT_SOLCATCHER_AMQP_UI_PORT = "1234";
10
+ export declare const DEFAULT_SOLCATCHER_AMQP_UI_USER = "solcatcher";
11
+ export declare const DEFAULT_SOLCATCHER_AMQP_UI_NAME = "solcatcher";
12
+ export declare const DEFAULT_SOLCATCHER_AMQP_UI_PASS = "solcatcher";
13
+ export declare const DEFAULT_SOLCATCHER_POSTGRESQL_HOST = "127.0.0.1";
14
+ export declare const DEFAULT_SOLCATCHER_POSTGRESQL_PORT = "1234";
15
+ export declare const DEFAULT_SOLCATCHER_POSTGRESQL_USER = "solcatcher";
16
+ export declare const DEFAULT_SOLCATCHER_POSTGRESQL_NAME = "solcatcher";
17
+ export declare const DEFAULT_SOLCATCHER_POSTGRESQL_PASS = "solcatcher";
18
+ export declare const DEFAULT_SOLCATCHER_QUEUE_NAME = "solcatcher";
19
+ export declare const DEFAULT_SOLCATCHER_QUEUE_LOG_INTAKE = "logIntakeQueue";
20
+ export declare const DEFAULT_SOLCATCHER_QUEUE_LOG_ENTRY = "logEntryQueue";
21
+ export declare const DEFAULT_SOLCATCHER_QUEUE_PAIR_ENTRY = "pairEntryQueue";
22
+ export declare const DEFAULT_SOLCATCHER_QUEUE_TXN_ENTRY = "txnEntryQueue";
23
+ export declare const DEFAULT_SOLCATCHER_QUEUE_RPC_CALL = "rpcCallQueue";
24
+ export declare const DEFAULT_SOLCATCHER_QUEUE_TRANSACTION_CALL = "txnCallQueue";
25
+ export declare const DEFAULT_SOLCATCHER_QUEUE_SIGNATURE_CALL = "signatureCallQueue";
26
+ export declare const DEFAULT_SOLCATCHER_QUEUE_META_DATA_CALL = "metaDataCallQueue";
27
+ export declare const DEFAULT_SOLCATCHER_QUEUE_GET_SIGNATURES_CALL = "getSignaturesCallQueue";
28
+ export declare const DEFAULT_SOLCATCHER_QUEUE_LOG_GETEM = "queue";
29
+ export declare const DEFAULT_SOLCATCHER_SOLANA_DB_MAX_CLIENTS = "500";
30
+ export declare const DEFAULT_SOLCATCHER_SOLANA_IDLE_TIMEOUT_MS = "10000";
31
+ export declare const DEFAULT_SOLCATCHER_SOLANA_CONNECTION_TIMEOUT_MS = "5000";
32
+ export declare const DEFAULT_SOLCATCHER_SOLANA_SOL_DECIMALS = "9";
33
+ export declare const DEFAULT_SOLCATCHER_SOLANA_SOL_LAMPORTS = "1000000000";
34
+ export declare const DEFAULT_SOLCATCHER_SOLANA_FALLBACK_RPC_URL = "https://api.mainnet-beta.solana.com";
35
+ export declare const DEFAULT_SOLCATCHER_SOLANA_FALLBACK_WS_ENDPOINT = "wss://api.mainnet-beta.solana.com";
@@ -0,0 +1,5 @@
1
+ export * from './init_imports';
2
+ export * from './module_imports';
3
+ export * from './env_imports';
4
+ export * from './constants';
5
+ export * from './config';
@@ -0,0 +1 @@
1
+ export * from './module_imports';
@@ -0,0 +1 @@
1
+ export * from '@putkoff/abstract-solana';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { SolcatcherConfig } from "./types";
2
+ export declare const defaultConfig: SolcatcherConfig;
@@ -0,0 +1,2 @@
1
+ import type { SolcatcherConfig } from "./types";
2
+ export declare function loadSolcatcherConfig(explicitPath?: string): SolcatcherConfig;
@@ -0,0 +1,4 @@
1
+ export interface SolcatcherConfig {
2
+ envPath?: string;
3
+ autoLoadEnv?: boolean;
4
+ }
@@ -0,0 +1,38 @@
1
+ export declare function loadEnvConfig(): {
2
+ rabbit: {
3
+ host: string;
4
+ port: string;
5
+ user: string;
6
+ pass: string;
7
+ name: string;
8
+ url: string;
9
+ };
10
+ postgres: {
11
+ host: string;
12
+ port: string;
13
+ user: string;
14
+ pass: string;
15
+ name: string;
16
+ url: string;
17
+ };
18
+ queues: {
19
+ queueName: string;
20
+ logEntry: string;
21
+ pairEntry: string;
22
+ txnEntry: string;
23
+ rpcCall: string;
24
+ txnCall: string;
25
+ signatureCall: string;
26
+ metaDataCall: string;
27
+ signaturesCall: string;
28
+ logIntake: string;
29
+ };
30
+ solana: {
31
+ maxDbClients: number;
32
+ idleTimeoutMs: number;
33
+ connectionTimeoutMs: number;
34
+ fallbackRpcUrl: string;
35
+ fallbackWsEndpoint: string;
36
+ broadcastPort: number;
37
+ };
38
+ };
@@ -0,0 +1,2 @@
1
+ import type { SolcatcherConfig } from "../config/types";
2
+ export declare function loadEnvFromConfig(config: SolcatcherConfig): void;
@@ -0,0 +1,8 @@
1
+ export declare function loadPostgresEnv(): {
2
+ host: string;
3
+ port: string;
4
+ user: string;
5
+ pass: string;
6
+ name: string;
7
+ url: string;
8
+ };
@@ -0,0 +1,12 @@
1
+ export declare function loadQueueEnv(): {
2
+ queueName: string;
3
+ logEntry: string;
4
+ pairEntry: string;
5
+ txnEntry: string;
6
+ rpcCall: string;
7
+ txnCall: string;
8
+ signatureCall: string;
9
+ metaDataCall: string;
10
+ signaturesCall: string;
11
+ logIntake: string;
12
+ };
@@ -0,0 +1,8 @@
1
+ export declare function loadRabbitEnv(): {
2
+ host: string;
3
+ port: string;
4
+ user: string;
5
+ pass: string;
6
+ name: string;
7
+ url: string;
8
+ };
@@ -0,0 +1,8 @@
1
+ export declare function loadSolanaEnv(): {
2
+ maxDbClients: number;
3
+ idleTimeoutMs: number;
4
+ connectionTimeoutMs: number;
5
+ fallbackRpcUrl: string;
6
+ fallbackWsEndpoint: string;
7
+ broadcastPort: number;
8
+ };
@@ -0,0 +1 @@
1
+ export * from './shared';
@@ -0,0 +1 @@
1
+ export declare function startSolcatcher(): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function bootstrapEnv(): void;
@@ -0,0 +1 @@
1
+ export declare function startSolcatcher(): Promise<void>;
@@ -0,0 +1,21 @@
1
+ import { pkg } from './init_imports';
2
+ export declare function getPool(): pkg.Pool;
3
+ export declare function endPool(): Promise<void>;
4
+ /**
5
+ * Runs a SQL query using the connection pool.
6
+ * Implements retry logic in case of 'too many clients' errors.
7
+ * @param query - SQL query string
8
+ * @param params - Query parameters (optional)
9
+ * @param successMsg - Log message on successful query
10
+ * @param failMsg - Log message on failed query
11
+ * @param retries - Number of retries for 'too many clients' errors
12
+ * @returns Query result
13
+ */
14
+ export declare function poolQuery(query: string, params?: any[]): Promise<pkg.QueryResult<any>>;
15
+ export declare function withTransaction<T>(fn: (client: any) => Promise<T>): Promise<T>;
16
+ /**
17
+ * Fetch all users from the 'users' table.
18
+ */
19
+ export declare function fetchAllRows(tableName: any): Promise<any>;
20
+ export declare function extractRow(obj: any): any;
21
+ export declare function extractId(obj: any): any;
@@ -0,0 +1,34 @@
1
+ export declare const RABBITMQ_HOST: string;
2
+ export declare const RABBITMQ_PORT: string;
3
+ export declare const RABBITMQ_USER: string;
4
+ export declare const RABBITMQ_NAME: string;
5
+ export declare const RABBITMQ_PASS: string;
6
+ export declare const RABBITMQ_URL: string;
7
+ export declare const RABBITMQ_UI_HOST: string;
8
+ export declare const RABBITMQ_UI_PORT: string;
9
+ export declare const RABBITMQ_UI_USER: string;
10
+ export declare const RABBITMQ_UI_NAME: string;
11
+ export declare const RABBITMQ_UI_PASS: string;
12
+ export declare const RABBITMQ_UI_URL: string;
13
+ export declare const POSTGRESQL_HOST: string;
14
+ export declare const POSTGRESQL_PORT: string;
15
+ export declare const POSTGRESQL_USER: string;
16
+ export declare const POSTGRESQL_NAME: string;
17
+ export declare const POSTGRESQL_PASS: string;
18
+ export declare const POSTGRESQL_DB_URL: string;
19
+ export declare const QUEUE_NAME: string;
20
+ export declare const QUEUE_LOG_INTAKE: string;
21
+ export declare const QUEUE_LOG_ENTRY: string;
22
+ export declare const QUEUE_PAIR_ENTRY: string;
23
+ export declare const QUEUE_TXN_ENTRY: string;
24
+ export declare const QUEUE_RPC_CALL: string;
25
+ export declare const QUEUE_TRANSACTION_CALL: string;
26
+ export declare const QUEUE_SIGNATURE_CALL: string;
27
+ export declare const QUEUE_META_DATA_CALL: string;
28
+ export declare const QUEUE_GET_SIGNATURES_CALL: string;
29
+ export declare const QUEUE_LOG_GETEM: string;
30
+ export declare const SOLANA_DB_MAX_CLIENTS: number;
31
+ export declare const SOLANA_IDLE_TIMEOUT_MS: number;
32
+ export declare const SOLANA_CONNECTION_TIMEOUT_MS: number;
33
+ export declare const SOLANA_FALLBACK_RPC_URL: string;
34
+ export declare const SOLANA_FALLBACK_WS_ENDPOINT: string;
@@ -0,0 +1,4 @@
1
+ export * from './connections';
2
+ export * from './init_imports';
3
+ export * from './module_imports';
4
+ export * from './tokenUtils';
@@ -0,0 +1,18 @@
1
+ import * as amqp from "amqplib";
2
+ import type { Connection, Channel, ConsumeMessage, ChannelModel } from "amqplib";
3
+ import type { DotenvConfigOutput } from "dotenv";
4
+ import * as fs from 'fs';
5
+ import * as path from 'path';
6
+ import * as url from 'url';
7
+ import { fileURLToPath } from "url";
8
+ import pkg from 'pg';
9
+ import type { QueryResult } from 'pg';
10
+ import dotenv from 'dotenv';
11
+ import axios from "axios";
12
+ import PQueue from 'p-queue';
13
+ import fetch, { Response } from 'node-fetch';
14
+ import _ from 'lodash';
15
+ import Joi from 'joi';
16
+ import WebSocket from "ws";
17
+ export { WebSocket, dotenv, amqp, fs, path, fileURLToPath, QueryResult, pkg, PQueue, fetch, Response, _, Joi, axios, url };
18
+ export { Connection, Channel, ConsumeMessage, ChannelModel, DotenvConfigOutput, };
@@ -0,0 +1 @@
1
+ export * from './../../shared';
@@ -0,0 +1,10 @@
1
+ import { PublicKey } from "./module_imports";
2
+ declare class KeyManager {
3
+ private cache?;
4
+ constructor(enableCache?: boolean);
5
+ getPubkey(obj: string | PublicKey): PublicKey;
6
+ }
7
+ export declare const KeyManager_server: KeyManager;
8
+ export declare function getPubkey_server(obj: any): PublicKey;
9
+ export declare function getPubkeyString_server(obj: string | PublicKey): string;
10
+ export {};
@@ -0,0 +1,43 @@
1
+ export declare enum ResolutionConfidence {
2
+ DETERMINISTIC = "deterministic",
3
+ ONCHAIN = "onchain",
4
+ INFERRED = "inferred",
5
+ HISTORICAL = "historical",
6
+ UNKNOWN = "unknown"
7
+ }
8
+ export interface CurveResolution {
9
+ curve: string;
10
+ programId: string;
11
+ mint: string | null;
12
+ confidence: ResolutionConfidence;
13
+ source: string;
14
+ }
15
+ import { PublicKey, Connection } from "@solana/web3.js";
16
+ export declare class CurveResolver {
17
+ private connection;
18
+ private curveToMint;
19
+ constructor(connection: Connection);
20
+ resolveCurve(curve: string | PublicKey): Promise<CurveResolution>;
21
+ /**
22
+ * Attempt to decode curve account data
23
+ * (program must explicitly store mint)
24
+ */
25
+ private tryResolveFromAccountData;
26
+ /**
27
+ * Attempt to infer mint from token vaults
28
+ */
29
+ private tryResolveFromVault;
30
+ /**
31
+ * Attempt to infer mint from transaction history
32
+ */
33
+ private tryResolveFromHistory;
34
+ private cache;
35
+ /**
36
+ * Placeholder for program-specific decoding
37
+ */
38
+ private decodeCurveData;
39
+ /**
40
+ * Placeholder for vault derivation logic
41
+ */
42
+ private findPossibleVaults;
43
+ }
@@ -0,0 +1 @@
1
+ export * from './pubKeyUtils';
@@ -0,0 +1,10 @@
1
+ import { PublicKey } from "./../module_imports";
2
+ declare class KeyManager {
3
+ private cache?;
4
+ constructor(enableCache?: boolean);
5
+ getPubkey(obj: string | PublicKey): PublicKey;
6
+ }
7
+ export declare const KeyManager_server: KeyManager;
8
+ export declare function getPubkey_server(obj: any): PublicKey;
9
+ export declare function getPubkeyString_server(obj: string | PublicKey): string;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './rabbitMq';
2
+ export * from './schemas';
3
+ export * from './utils';
4
+ export * from './db';
@@ -0,0 +1,2 @@
1
+ import PQueue from "p-queue";
2
+ export declare const concurrencyQueue: PQueue<import("p-queue/dist/priority-queue").default, import("p-queue").QueueAddOptions>;
@@ -0,0 +1 @@
1
+ export declare const startConsumer: (queue: string, handler: (msg: any) => Promise<void>, noAck?: boolean) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ export * from './concurrency';
2
+ export * from './consumer';
3
+ export * from './publisher';
4
+ export * from './rabbitManager';
5
+ export * from './websocketServer';
@@ -0,0 +1 @@
1
+ export declare const sendToQueue: (queue: string, payload: any, log?: boolean) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { Channel } from "amqplib";
2
+ export declare const getChannels: () => {
3
+ publishChannel: Channel;
4
+ consumeChannel: Channel;
5
+ };
6
+ export declare const initRabbitMQ: (publishQueues?: string[], consumeQueues?: string[]) => Promise<void>;
7
+ export declare const shutdownRabbitMQ: (exit?: boolean) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ import WebSocket from "ws";
2
+ import type { TransactionItem } from "../../db";
3
+ type WebSocketServer = typeof WebSocket.Server;
4
+ export declare function getWebSocketServer(): InstanceType<WebSocketServer>;
5
+ export declare function broadcastTransaction(txn: TransactionItem): void;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './core';
2
+ export * from './solana';
3
+ export * from './processors';
4
+ export * from './producers';
5
+ export * from './main';
@@ -0,0 +1 @@
1
+ export * from './services';
@@ -0,0 +1 @@
1
+ export declare const startAllServices: () => Promise<void>;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Returns the necessary headers for HTTP requests.
3
+ */
4
+ export declare function get_headers(): {
5
+ "Content-Type": string;
6
+ };
7
+ /**
8
+ * Asynchronous function to get public keys from mint metadata.
9
+ *
10
+ * @param mint - The mint address as a string.
11
+ * @param url - The RPC URL (optional).
12
+ * @param consumerLogger - The logger to use (optional).
13
+ * @returns A promise that resolves to an array of public key strings.
14
+ */
15
+ export declare function getPubkeysFromMintMetaData(mint: string, url?: string | null, consumerLogger?: any): Promise<any>;
16
+ /**
17
+ * Calls the RPC method with the given parameters.
18
+ *
19
+ * @param method - The RPC method to call.
20
+ * @param params - The parameters for the RPC method.
21
+ * @param url - The RPC URL (optional).
22
+ * @param consumerLogger - The logger to use (optional).
23
+ * @returns The JSON response from the RPC call.
24
+ */
25
+ export declare function call_rpc_data(method: string, params: any): Promise<unknown>;
26
+ /**
27
+ * Fetches signatures for a given address.
28
+ *
29
+ * @param address - The address to fetch signatures for.
30
+ * @param until - Optional parameter to fetch signatures until a certain point.
31
+ * @param limit - The maximum number of signatures to fetch.
32
+ * @param url - The RPC URL (optional).
33
+ * @param consumerLogger - The logger to use (optional).
34
+ * @returns An array of signatures.
35
+ */
36
+ export declare function fetch_getSignaturesForAddress(address: string, until?: any, limit?: number, url?: string | null, consumerLogger?: any): Promise<unknown>;
37
+ /**
38
+ * Fetches a transaction by its signature.
39
+ *
40
+ * @param signature - The signature of the transaction.
41
+ * @param url - The RPC URL (optional).
42
+ * @param consumerLogger - The logger to use (optional).
43
+ * @returns The transaction object.
44
+ */
45
+ export declare function fetch_getTransaction(signature: string, url?: string | null, consumerLogger?: any): Promise<unknown>;
46
+ /**
47
+ * Retrieves a transaction by signature. If not found in the database, fetches it via RPC,
48
+ * upserts it into the database, and then returns it.
49
+ *
50
+ * @param signature - The signature of the transaction to retrieve.
51
+ * @returns The transaction object or null if not found.
52
+ */
53
+ export declare function get_or_fetch_transaction(signature: string, consumerLogger?: any): Promise<any>;
54
+ /**
55
+ * Extracts the user address from parsed logs.
56
+ *
57
+ * @param parsedLogs - The parsed logs object.
58
+ * @returns A promise that resolves to the user address string or null.
59
+ */
60
+ export declare function getUserAddress(parsedLogs: any): Promise<string | null>;
61
+ export declare function get_decodedData(parsed_logs: any): Promise<any | null>;
62
+ export declare function get_pair_data(mint: any, consumerLogger?: any): Promise<any>;
@@ -0,0 +1,5 @@
1
+ export * from './get_pair_data';
2
+ export * from './logParser';
3
+ export * from './make_meta_list';
4
+ export * from './metaDataProcessor';
5
+ export * from './processLogs';
@@ -0,0 +1,18 @@
1
+ export interface InvocationRecord {
2
+ program_id: string;
3
+ invocationNumber: number;
4
+ logs: string[];
5
+ data: string[];
6
+ }
7
+ interface ParsedLogs {
8
+ invocations: InvocationRecord[];
9
+ }
10
+ export declare function processParsedLogs(pairMsg: any, consumerLogger?: any): Promise<any>;
11
+ /**
12
+ * Parses program logs to extract invocation records, logs, and data.
13
+ * Optimized for memory efficiency.
14
+ * @param {string[]} logs - Array of log strings from Solana transactions.
15
+ * @returns {ParsedLogs} - Parsed invocation records.
16
+ */
17
+ export declare function parseProgramLogs(logs: string[]): ParsedLogs;
18
+ export {};
@@ -0,0 +1,51 @@
1
+ export declare function get_token_info(mint: string): Promise<{
2
+ pubkey: string;
3
+ slot: number;
4
+ owner: string;
5
+ lamports: number;
6
+ executable: boolean;
7
+ rent_epoch: number;
8
+ space: any;
9
+ encoding: any;
10
+ program: any;
11
+ parsed: any;
12
+ raw: any;
13
+ } | import("@putkoff/abstract-solana").AccountInfoParsed | null>;
14
+ /**
15
+ * Converts your "dbMetaData" format into the "metadata2" format.
16
+ *
17
+ * @param dbMetaData - The original object with properties like mint, name, decimals, meta_data, etc.
18
+ * @returns An object in the "metadata2" shape, with { publickey, tokeninfo, metadata }.
19
+ */
20
+ export declare function convertDbMetaDataToMetadata2(dbMetaData: any): Promise<{
21
+ publickey: any;
22
+ tokeninfo: {
23
+ pubkey: string;
24
+ slot: number;
25
+ owner: string;
26
+ lamports: number;
27
+ executable: boolean;
28
+ rent_epoch: number;
29
+ space: any;
30
+ encoding: any;
31
+ program: any;
32
+ parsed: any;
33
+ raw: any;
34
+ } | import("@putkoff/abstract-solana").AccountInfoParsed | null;
35
+ metadata: any;
36
+ }>;
37
+ /**
38
+ * Inserts or updates a record in the `metadata2` table with columns:
39
+ * 1) publickey (TEXT, unique or primary key)
40
+ * 2) tokeninfo (JSONB)
41
+ * 3) metadata (JSONB)
42
+ *
43
+ * If publickey already exists, it updates the tokeninfo and metadata columns.
44
+ *
45
+ * @param publicKey - The unique public key string
46
+ * @param tokenInfo - JSON object for token info
47
+ * @param meta - JSON object for metadata
48
+ * @param tableName - (Optional) override table name, defaults to "metadata2"
49
+ */
50
+ export declare function upsertMetadata2(publicKey: string, tokenInfo: any, meta: any, tableName?: string): Promise<any>;
51
+ export declare function saveAsMetadata2(dbMetaData: any): Promise<any>;