@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,729 @@
1
+ import * as PQueue from 'p-queue';
2
+ import PQueue__default from 'p-queue';
3
+ export { default as PQueue } from 'p-queue';
4
+ import * as p_queue_dist_priority_queue from 'p-queue/dist/priority-queue';
5
+ import { Channel } from 'amqplib';
6
+ import * as amqplib from 'amqplib';
7
+ export { amqplib as amqp };
8
+ export { Channel, ChannelModel, Connection, ConsumeMessage } from 'amqplib';
9
+ import WebSocket from 'ws';
10
+ export { default as WebSocket } from 'ws';
11
+ import * as _putkoff_abstract_solana from '@putkoff/abstract-solana';
12
+ import { PublicKey, TransactionItem, LogData, TokenMetadata } from '@putkoff/abstract-solana';
13
+ export * from '@putkoff/abstract-solana';
14
+ export { fetchRpc } from '@putkoff/abstract-solana';
15
+ import pkg, { QueryResult } from 'pg';
16
+ export { QueryResult, default as pkg } from 'pg';
17
+ export { DotenvConfigOutput, default as dotenv } from 'dotenv';
18
+ import * as fs from 'fs';
19
+ export { fs };
20
+ import * as path from 'path';
21
+ export { path };
22
+ import * as url from 'url';
23
+ export { url };
24
+ export { fileURLToPath } from 'url';
25
+ export { default as axios } from 'axios';
26
+ export { Response, default as fetch } from 'node-fetch';
27
+ export { default as _ } from 'lodash';
28
+ export { default as Joi } from 'joi';
29
+ export { DEFAULT_ENV_PATH, DEFAULT_SOLCATCHER_AMQP_HOST, DEFAULT_SOLCATCHER_AMQP_NAME, DEFAULT_SOLCATCHER_AMQP_PASS, DEFAULT_SOLCATCHER_AMQP_PORT, DEFAULT_SOLCATCHER_AMQP_UI_HOST, DEFAULT_SOLCATCHER_AMQP_UI_NAME, DEFAULT_SOLCATCHER_AMQP_UI_PASS, DEFAULT_SOLCATCHER_AMQP_UI_PORT, DEFAULT_SOLCATCHER_AMQP_UI_USER, DEFAULT_SOLCATCHER_AMQP_USER, DEFAULT_SOLCATCHER_POSTGRESQL_HOST, DEFAULT_SOLCATCHER_POSTGRESQL_NAME, DEFAULT_SOLCATCHER_POSTGRESQL_PASS, DEFAULT_SOLCATCHER_POSTGRESQL_PORT, DEFAULT_SOLCATCHER_POSTGRESQL_USER, DEFAULT_SOLCATCHER_QUEUE_GET_SIGNATURES_CALL, DEFAULT_SOLCATCHER_QUEUE_LOG_ENTRY, DEFAULT_SOLCATCHER_QUEUE_LOG_GETEM, DEFAULT_SOLCATCHER_QUEUE_LOG_INTAKE, DEFAULT_SOLCATCHER_QUEUE_META_DATA_CALL, DEFAULT_SOLCATCHER_QUEUE_NAME, DEFAULT_SOLCATCHER_QUEUE_PAIR_ENTRY, DEFAULT_SOLCATCHER_QUEUE_RPC_CALL, DEFAULT_SOLCATCHER_QUEUE_SIGNATURE_CALL, DEFAULT_SOLCATCHER_QUEUE_TRANSACTION_CALL, DEFAULT_SOLCATCHER_QUEUE_TXN_ENTRY, DEFAULT_SOLCATCHER_SOLANA_CONNECTION_TIMEOUT_MS, DEFAULT_SOLCATCHER_SOLANA_DB_MAX_CLIENTS, DEFAULT_SOLCATCHER_SOLANA_FALLBACK_RPC_URL, DEFAULT_SOLCATCHER_SOLANA_FALLBACK_WS_ENDPOINT, DEFAULT_SOLCATCHER_SOLANA_IDLE_TIMEOUT_MS, DEFAULT_SOLCATCHER_SOLANA_SOL_DECIMALS, DEFAULT_SOLCATCHER_SOLANA_SOL_LAMPORTS, DEFAULT_SOLCATCHER_WS_BROADCAST_PORT, SOLCATCHER_API_RPC_MAKE_CALL_URL, SOLCATCHER_API_RPC_URL, SOLCATCHER_API_URL, SOLCATCHER_DOMAIN, requireEnv } from './index.js';
30
+ export { emptyObjectToNull, getIfNone } from '@putkoff/abstract-utilities';
31
+
32
+ declare const concurrencyQueue: PQueue__default<p_queue_dist_priority_queue.default, PQueue.QueueAddOptions>;
33
+
34
+ declare const startConsumer: (queue: string, handler: (msg: any) => Promise<void>, noAck?: boolean) => Promise<void>;
35
+
36
+ declare const sendToQueue: (queue: string, payload: any, log?: boolean) => Promise<void>;
37
+
38
+ declare const getChannels: () => {
39
+ publishChannel: Channel;
40
+ consumeChannel: Channel;
41
+ };
42
+ declare const initRabbitMQ: (publishQueues?: string[], consumeQueues?: string[]) => Promise<void>;
43
+ declare const shutdownRabbitMQ: (exit?: boolean) => Promise<void>;
44
+
45
+ declare function getPool(): pkg.Pool;
46
+ declare function endPool(): Promise<void>;
47
+ /**
48
+ * Runs a SQL query using the connection pool.
49
+ * Implements retry logic in case of 'too many clients' errors.
50
+ * @param query - SQL query string
51
+ * @param params - Query parameters (optional)
52
+ * @param successMsg - Log message on successful query
53
+ * @param failMsg - Log message on failed query
54
+ * @param retries - Number of retries for 'too many clients' errors
55
+ * @returns Query result
56
+ */
57
+ declare function poolQuery(query: string, params?: any[]): Promise<pkg.QueryResult<any>>;
58
+ declare function withTransaction<T>(fn: (client: any) => Promise<T>): Promise<T>;
59
+ /**
60
+ * Fetch all users from the 'users' table.
61
+ */
62
+ declare function fetchAllRows(tableName: any): Promise<any>;
63
+ declare function extractRow(obj: any): any;
64
+ declare function extractId(obj: any): any;
65
+
66
+ declare class KeyManager {
67
+ private cache?;
68
+ constructor(enableCache?: boolean);
69
+ getPubkey(obj: string | PublicKey): PublicKey;
70
+ }
71
+ declare const KeyManager_server: KeyManager;
72
+ declare function getPubkey_server(obj: any): PublicKey;
73
+ declare function getPubkeyString_server(obj: string | PublicKey): string;
74
+
75
+ type WebSocketServer = typeof WebSocket.Server;
76
+ declare function getWebSocketServer(): InstanceType<WebSocketServer>;
77
+ declare function broadcastTransaction(txn: TransactionItem): void;
78
+
79
+ declare const startPumpFunMonitor: () => Promise<never>;
80
+
81
+ interface MonitorOpts {
82
+ programId: string;
83
+ rpcUrl: string;
84
+ wsEndpoint?: string;
85
+ outputQueue: string;
86
+ }
87
+ declare const startSolanaLogMonitor: ({ programId, rpcUrl, wsEndpoint, outputQueue, }: MonitorOpts) => Promise<never>;
88
+
89
+ /**
90
+ * Returns the necessary headers for HTTP requests.
91
+ */
92
+ declare function get_headers(): {
93
+ "Content-Type": string;
94
+ };
95
+ /**
96
+ * Asynchronous function to get public keys from mint metadata.
97
+ *
98
+ * @param mint - The mint address as a string.
99
+ * @param url - The RPC URL (optional).
100
+ * @param consumerLogger - The logger to use (optional).
101
+ * @returns A promise that resolves to an array of public key strings.
102
+ */
103
+ declare function getPubkeysFromMintMetaData(mint: string, url?: string | null, consumerLogger?: any): Promise<any>;
104
+ /**
105
+ * Calls the RPC method with the given parameters.
106
+ *
107
+ * @param method - The RPC method to call.
108
+ * @param params - The parameters for the RPC method.
109
+ * @param url - The RPC URL (optional).
110
+ * @param consumerLogger - The logger to use (optional).
111
+ * @returns The JSON response from the RPC call.
112
+ */
113
+ declare function call_rpc_data(method: string, params: any): Promise<unknown>;
114
+ /**
115
+ * Fetches signatures for a given address.
116
+ *
117
+ * @param address - The address to fetch signatures for.
118
+ * @param until - Optional parameter to fetch signatures until a certain point.
119
+ * @param limit - The maximum number of signatures to fetch.
120
+ * @param url - The RPC URL (optional).
121
+ * @param consumerLogger - The logger to use (optional).
122
+ * @returns An array of signatures.
123
+ */
124
+ declare function fetch_getSignaturesForAddress(address: string, until?: any, limit?: number, url?: string | null, consumerLogger?: any): Promise<unknown>;
125
+ /**
126
+ * Fetches a transaction by its signature.
127
+ *
128
+ * @param signature - The signature of the transaction.
129
+ * @param url - The RPC URL (optional).
130
+ * @param consumerLogger - The logger to use (optional).
131
+ * @returns The transaction object.
132
+ */
133
+ declare function fetch_getTransaction(signature: string, url?: string | null, consumerLogger?: any): Promise<unknown>;
134
+ /**
135
+ * Retrieves a transaction by signature. If not found in the database, fetches it via RPC,
136
+ * upserts it into the database, and then returns it.
137
+ *
138
+ * @param signature - The signature of the transaction to retrieve.
139
+ * @returns The transaction object or null if not found.
140
+ */
141
+ declare function get_or_fetch_transaction(signature: string, consumerLogger?: any): Promise<any>;
142
+ /**
143
+ * Extracts the user address from parsed logs.
144
+ *
145
+ * @param parsedLogs - The parsed logs object.
146
+ * @returns A promise that resolves to the user address string or null.
147
+ */
148
+ declare function getUserAddress(parsedLogs: any): Promise<string | null>;
149
+ declare function get_decodedData(parsed_logs: any): Promise<any | null>;
150
+ declare function get_pair_data(mint: any, consumerLogger?: any): Promise<any>;
151
+
152
+ interface InvocationRecord {
153
+ program_id: string;
154
+ invocationNumber: number;
155
+ logs: string[];
156
+ data: string[];
157
+ }
158
+ interface ParsedLogs {
159
+ invocations: InvocationRecord[];
160
+ }
161
+ declare function processParsedLogs(pairMsg: any, consumerLogger?: any): Promise<any>;
162
+ /**
163
+ * Parses program logs to extract invocation records, logs, and data.
164
+ * Optimized for memory efficiency.
165
+ * @param {string[]} logs - Array of log strings from Solana transactions.
166
+ * @returns {ParsedLogs} - Parsed invocation records.
167
+ */
168
+ declare function parseProgramLogs(logs: string[]): ParsedLogs;
169
+
170
+ declare function get_token_info(mint: string): Promise<{
171
+ pubkey: string;
172
+ slot: number;
173
+ owner: string;
174
+ lamports: number;
175
+ executable: boolean;
176
+ rent_epoch: number;
177
+ space: any;
178
+ encoding: any;
179
+ program: any;
180
+ parsed: any;
181
+ raw: any;
182
+ } | _putkoff_abstract_solana.AccountInfoParsed | null>;
183
+ /**
184
+ * Converts your "dbMetaData" format into the "metadata2" format.
185
+ *
186
+ * @param dbMetaData - The original object with properties like mint, name, decimals, meta_data, etc.
187
+ * @returns An object in the "metadata2" shape, with { publickey, tokeninfo, metadata }.
188
+ */
189
+ declare function convertDbMetaDataToMetadata2(dbMetaData: any): Promise<{
190
+ publickey: any;
191
+ tokeninfo: {
192
+ pubkey: string;
193
+ slot: number;
194
+ owner: string;
195
+ lamports: number;
196
+ executable: boolean;
197
+ rent_epoch: number;
198
+ space: any;
199
+ encoding: any;
200
+ program: any;
201
+ parsed: any;
202
+ raw: any;
203
+ } | _putkoff_abstract_solana.AccountInfoParsed | null;
204
+ metadata: any;
205
+ }>;
206
+ /**
207
+ * Inserts or updates a record in the `metadata2` table with columns:
208
+ * 1) publickey (TEXT, unique or primary key)
209
+ * 2) tokeninfo (JSONB)
210
+ * 3) metadata (JSONB)
211
+ *
212
+ * If publickey already exists, it updates the tokeninfo and metadata columns.
213
+ *
214
+ * @param publicKey - The unique public key string
215
+ * @param tokenInfo - JSON object for token info
216
+ * @param meta - JSON object for metadata
217
+ * @param tableName - (Optional) override table name, defaults to "metadata2"
218
+ */
219
+ declare function upsertMetadata2(publicKey: string, tokenInfo: any, meta: any, tableName?: string): Promise<any>;
220
+ declare function saveAsMetadata2(dbMetaData: any): Promise<any>;
221
+
222
+ /**
223
+ * Initializes and configures the UMI instance.
224
+ * @param url - The RPC URL.
225
+ * @returns The configured UMI instance.
226
+ */
227
+ declare function initializeUmi(url: string): Promise<any>;
228
+ /**
229
+ * Fetches metadata for a given mint address.
230
+ * @param mint - The mint address.
231
+ * @param url - The RPC URL.
232
+ * @param umi - Optional UMI instance.
233
+ * @param consumerLogger - Custom logger.
234
+ * @param maxMetadataSize - Maximum size limit for metadata.
235
+ * @returns The metadata or null if failed.
236
+ */
237
+ declare function callMetaData(mint: any, url?: any, umi?: any, consumerLogger?: any, maxMetadataSize?: number): Promise<any>;
238
+ /**
239
+ * Retrieves or fetches metadata for a mint address.
240
+ * @param mint - The mint address.
241
+ * @param url - Optional RPC URL.
242
+ * @param umi - Optional UMI instance.
243
+ * @param consumerLogger - Custom logger.
244
+ * @returns The metadata or null if not found/fetched.
245
+ */
246
+ declare function getOrFetchMetaData(mint: string, url?: any, umi?: any, consumerLogger?: any): Promise<any>;
247
+ /**
248
+ * Fetches metadata from Metaplex and upserts it into the database.
249
+ * @param mint - The mint address.
250
+ * @param url - Optional RPC URL.
251
+ * @param umi - Optional UMI instance.
252
+ * @param consumerLogger - Custom logger.
253
+ * @returns The metadata or null if failed.
254
+ */
255
+ declare function getMetaFoundation(mint: string, url?: any, umi?: any, consumerLogger?: any): Promise<any>;
256
+ /**
257
+ * Fetches or processes metadata to retrieve its ID.
258
+ * @param mint - The mint address.
259
+ * @param decodedData - Optional decoded metadata.
260
+ * @param decimals - Decimal precision.
261
+ * @param consumerLogger - Custom logger.
262
+ * @returns The metadata ID or null if failed.
263
+ */
264
+ declare function getOrFetchMetaDataId(mint: string, decodedData?: any | Partial<any> | null, decimals?: number, consumerLogger?: any): Promise<any>;
265
+ /**
266
+ * Processes and inserts metadata into the database.
267
+ * @param mint - The mint address.
268
+ * @param decodedData - Decoded metadata.
269
+ * @param decimals - Decimal precision.
270
+ * @param consumerLogger - Custom logger.
271
+ * @returns The metadata ID or null if failed.
272
+ */
273
+ declare function processMetaData(mint: string | null | undefined, decodedData: any | Partial<any>, decimals?: number, consumerLogger?: any): Promise<number | null>;
274
+ /**
275
+ * Processes decoded metadata based on program ID.
276
+ * @param decodedData - Decoded metadata.
277
+ * @param program_id - Program ID.
278
+ * @param tokenDecimals - Token decimals.
279
+ * @param consumerLogger - Custom logger.
280
+ * @returns The metadata ID.
281
+ */
282
+ declare function processMetaDataDecoded(decodedData: any, program_id?: any, tokenDecimals?: number, consumerLogger?: any): Promise<any>;
283
+ /**
284
+ * Calls metadata and upserts it with IPFS data.
285
+ * @param mint - The mint address.
286
+ * @param url - Optional RPC URL.
287
+ * @param umi - Optional UMI instance.
288
+ * @param consumerLogger - Custom logger.
289
+ * @returns The upserted metadata.
290
+ */
291
+ declare function call_and_upsert_metadata(mint: string, url?: any, umi?: any, consumerLogger?: any): Promise<any>;
292
+
293
+ /**
294
+ * Processes transaction logs to extract TCNs and handle pair creation/updates.
295
+ * @param txnMsg - The transaction message from WebSocket.
296
+ * @param consumerLogger - Custom logger instance.
297
+ * @returns The processed transaction data or null on critical failure.
298
+ */
299
+ declare function getTcns(txnMsg: any, consumerLogger?: any): Promise<TransactionItem | null>;
300
+ /**
301
+ * Entry point for processing transactions from WebSocket.
302
+ * @param pairMsg - The transaction message.
303
+ * @param consumerLogger - Custom logger instance.
304
+ */
305
+ declare function processTxns(pairMsg: any, consumerLogger?: any): Promise<void>;
306
+
307
+ declare const startAllServices: () => Promise<void>;
308
+
309
+ type SignatureToAccountMap = {
310
+ [signature: string]: number;
311
+ };
312
+ type WalletAccountMap = {
313
+ [address: string]: number;
314
+ };
315
+ declare function createOrAlterTable(): Promise<void>;
316
+ declare function fetchExistingAccounts(): Promise<{
317
+ [address: string]: number;
318
+ }>;
319
+ declare function updateSignatureToAccountMap(signatureToAccount: SignatureToAccountMap, wallets: Array<[string, Set<string>]>, walletAccountMap: WalletAccountMap, nextAccountNumber: number): {
320
+ walletAccountMap: WalletAccountMap;
321
+ nextAccountNumber: number;
322
+ };
323
+ declare function upsertWalletAssignments(client: any, walletAccountMap: WalletAccountMap): Promise<void>;
324
+ declare function processSingleAddress(address: string, signatures: string[]): Promise<void>;
325
+ declare function processAllAddresses(): Promise<void>;
326
+
327
+ declare const createGetTransactionsTable: () => Promise<void>;
328
+ interface TransactionRecord {
329
+ id: number;
330
+ signature: string;
331
+ slot: number | null;
332
+ signatures: string[];
333
+ transaction: object;
334
+ updated_at: Date;
335
+ }
336
+ declare const upsertGetTransaction: (signature: string, slot: number | null, signatures: string[] | undefined, transaction: object) => Promise<void>;
337
+ declare const searchTransactionBySignature: (searchSignature: string) => Promise<TransactionRecord | null>;
338
+ declare const searchTransactionById: (id: string | number) => Promise<TransactionRecord | null>;
339
+
340
+ /**
341
+ * Function to create the logData table.
342
+ */
343
+ declare const createLogDataTable: () => Promise<void>;
344
+ /**
345
+ * Function to insert a new log entry.
346
+ * Implements Upsert to handle duplicate signatures gracefully.
347
+ * @param signature - The unique signature of the log.
348
+ * @param slot - The slot number.
349
+ * @param program_id - Program ID associated with the entry.
350
+ * @param logs - The log data in JSON format.
351
+ * @returns The inserted or existing log entry ID.
352
+ */
353
+ declare const insertLogEntry: (signature: string, slot: number, program_id: string, logs: object, signatures?: string[]) => Promise<number>;
354
+ /**
355
+ * Function to update a log entry by its signature.
356
+ * @param signature - The unique signature of the log to update.
357
+ * @param slot - The slot number.
358
+ * @param logs - The updated log data in JSON format.
359
+ * @param pairId - The ID of the pair.
360
+ * @param txnId - The ID of the transaction.
361
+ * @returns The updated log entry.
362
+ */
363
+ declare const updateLogEntry: (signature: string, slot: number, logs: object, program_id: string, pair_id: number, txn_id: number, signatures?: string[]) => Promise<QueryResult>;
364
+ /**
365
+ * Function to fetch a log entry by its signature.
366
+ * @param signature - The unique signature of the log.
367
+ * @returns The log entry.
368
+ */
369
+ declare const fetchLogEntryBySignature: (signature: string) => Promise<QueryResult>;
370
+ /**
371
+ * Fetches a log entry by its ID with optional filters.
372
+ * @param id - The ID of the log entry.
373
+ * @param filters - Optional filters for the query (like `{ sorted: false }`).
374
+ * @returns The log entry if it exists, otherwise returns null.
375
+ */
376
+ declare const fetchLogEntryById: (id: number, filters?: {
377
+ sorted?: boolean;
378
+ }) => Promise<LogData | null>;
379
+
380
+ /**
381
+ * Sets up indexes for pairs and metadata tables.
382
+ */
383
+ declare const setupIndexes: (consumerLogger?: any) => Promise<void>;
384
+
385
+ /**
386
+ * Inserts metadata into the database with retry logic for deadlocks.
387
+ * @param data - The metadata to insert.
388
+ * @returns The inserted ID.
389
+ */
390
+ declare const insertMetaDataDb: (data: TokenMetadata) => Promise<number>;
391
+ /**
392
+ * Inserts or updates metadata, fetching from IPFS if needed.
393
+ * @param metaData - Initial metadata object.
394
+ * @param uri - URI for IPFS fetch.
395
+ * @param mint - Mint address.
396
+ * @param tokeninfo - Additional token info.
397
+ * @param consumerLogger - Custom logger.
398
+ * @returns Processed metadata or null/error.
399
+ */
400
+ declare function insertMetaData(metaData?: any, uri?: string | null, mint?: any, tokeninfo?: any, consumerLogger?: any): Promise<any>;
401
+ /**
402
+ * Creates the metadata table if it doesn't exist.
403
+ * @param consumerLogger - Custom logger instance.
404
+ */
405
+ declare const createMetaDataTable: (consumerLogger?: any) => Promise<void>;
406
+ /**
407
+ * Updates a metadata entry in the metadata table by ID.
408
+ * @param id - The ID of the metadata entry to update.
409
+ * @param fields - An object containing the fields to update.
410
+ * @param consumerLogger - Custom logger instance.
411
+ * @returns The updated metadata entry.
412
+ */
413
+ declare const updateMetaDataById: (id: number, fields: Partial<{
414
+ name: string | null;
415
+ symbol: string | null;
416
+ uri: string | null;
417
+ decimals: number | null;
418
+ image: string | null;
419
+ mintAuthority: string | null;
420
+ freezeAuthority: string | null;
421
+ twitter: string | null;
422
+ website: string | null;
423
+ isMutable: boolean | null;
424
+ primarySaleHappened: boolean | null;
425
+ description: string | null;
426
+ meta_data: Record<string, any> | null;
427
+ discriminator: string | null;
428
+ creation_date: string | null;
429
+ tokeninfo: any;
430
+ processed: boolean | null;
431
+ }>, consumerLogger?: any) => Promise<any>;
432
+ /**
433
+ * Inserts or updates token metadata in the database.
434
+ * @param data - The metadata to upsert.
435
+ * @param consumerLogger - Custom logger instance.
436
+ */
437
+ declare function upsertTokenMetadata(data: any, consumerLogger?: any): Promise<void>;
438
+ /**
439
+ * Sets the processed flag for metadata by mint.
440
+ * @param mint - The mint address.
441
+ * @param consumerLogger - Custom logger instance.
442
+ * @returns The ID of the updated row or null if not found.
443
+ */
444
+ declare function setMetaDataProcessed(mint: string, consumerLogger?: any): Promise<number | null>;
445
+ /**
446
+ * Checks if metadata is processed by mint.
447
+ * @param mint - The mint address.
448
+ * @param consumerLogger - Custom logger instance.
449
+ * @returns The processed status or null if not found.
450
+ */
451
+ declare function checkMetaDataProcessed(mint: string, consumerLogger?: any): Promise<boolean | null>;
452
+ /**
453
+ * Fetches metadata by mint address.
454
+ * @param mint - The mint address.
455
+ * @param consumerLogger - Custom logger instance.
456
+ * @returns The metadata object or null if not found.
457
+ */
458
+ declare function getMetadataRowFromDb(mint: string, consumerLogger?: any): Promise<Record<string, any> | null>;
459
+ /**
460
+ * Fetches metadata by mint address (alternative version).
461
+ * @param mint - The mint address.
462
+ * @param consumerLogger - Custom logger instance.
463
+ * @returns The metadata object or null if not found.
464
+ */
465
+ declare function getMetadataFromDb(mint: string, consumerLogger?: any): Promise<Record<string, any> | null>;
466
+ /**
467
+ * Fetches metadata ID by mint address.
468
+ * @param mint - The mint address.
469
+ * @param consumerLogger - Custom logger instance.
470
+ * @returns The metadata ID or null if not found.
471
+ */
472
+ declare function getMetadataIdFromMint(mint: string, consumerLogger?: any): Promise<number | null>;
473
+ /**
474
+ * Fetches metadata by ID.
475
+ * @param meta_id - The metadata ID.
476
+ * @param consumerLogger - Custom logger instance.
477
+ * @returns The metadata object or null if not found.
478
+ */
479
+ declare function getMetaDataFromId(meta_id: string, consumerLogger?: any): Promise<Record<string, any> | null>;
480
+ declare function createMetaData2(): Promise<void>;
481
+
482
+ /**
483
+ * Creates the pairs table if it doesn't exist.
484
+ * @param consumerLogger - Custom logger instance.
485
+ */
486
+ declare const createPairsTable: (consumerLogger?: any) => Promise<void>;
487
+ /**
488
+ * Upserts a pair into the pairs table.
489
+ * @param pairsData - The pair data to upsert.
490
+ * @param consumerLogger - Custom logger instance.
491
+ * @returns The upserted pair ID.
492
+ */
493
+ declare const upsertPair: (pairsData: any, consumerLogger?: any) => Promise<number>;
494
+ /**
495
+ * Upserts a pair with stricter conflict resolution.
496
+ * @param pairsData - The pair data to upsert.
497
+ * @param consumerLogger - Custom logger instance.
498
+ * @returns The upserted pair ID.
499
+ */
500
+ declare const upsertAllPair: (pairsData: any, consumerLogger?: any) => Promise<number>;
501
+ /**
502
+ * Inserts a pair into the pairs table (uses upsert logic).
503
+ * @param pairsData - The pair data to insert.
504
+ * @param consumerLogger - Custom logger instance.
505
+ * @returns The inserted pair ID.
506
+ */
507
+ declare const insertPair: (pairsData: any, consumerLogger?: any) => Promise<number>;
508
+ /**
509
+ * Updates a pair by ID with provided fields.
510
+ * @param id - The pair ID to update.
511
+ * @param fields - Fields to update.
512
+ * @param consumerLogger - Custom logger instance.
513
+ * @returns True if updated, false if no changes or not found.
514
+ */
515
+ declare const updatePairByIds: (id: number, fields: Partial<{
516
+ mint: string;
517
+ price_token: string;
518
+ user_address: string;
519
+ program_id: string;
520
+ bonding_curve: string;
521
+ associated_bonding_curve: string;
522
+ signature: string;
523
+ meta_id: number;
524
+ log_id: number;
525
+ }>, consumerLogger?: any) => Promise<boolean>;
526
+ /**
527
+ * Appends a TCN to the `tcns` JSONB array of a pair.
528
+ * @param id - The pair ID.
529
+ * @param tcn - The TCN to append.
530
+ * @param consumerLogger - Custom logger instance.
531
+ * @returns The query result.
532
+ */
533
+ declare const appendTcnToPair: (id: number, tcn: string, consumerLogger?: any) => Promise<QueryResult>;
534
+ /**
535
+ * Updates a pair entry by ID.
536
+ * @param id - The pair ID.
537
+ * @param fields - Fields to update.
538
+ * @param consumerLogger - Custom logger instance.
539
+ * @returns True if updated, false if no-op or not found.
540
+ */
541
+ declare const updatePairById: (id: number, fields: Partial<{
542
+ mint: string;
543
+ price_token: string;
544
+ user_address: string;
545
+ program_id: string;
546
+ bonding_curve: string;
547
+ associated_bonding_curve: string;
548
+ signature: string;
549
+ meta_id: number;
550
+ log_id: number;
551
+ }>, consumerLogger?: any) => Promise<boolean>;
552
+ /**
553
+ * Appends a TCN to a transaction's `tcns` array.
554
+ * @param id - The transaction ID.
555
+ * @param tcn - The TCN to append.
556
+ * @param consumerLogger - Custom logger instance.
557
+ * @returns The query result.
558
+ */
559
+ declare const appendTcnToTransaction: (id: number, tcn: string, consumerLogger?: any) => Promise<QueryResult>;
560
+ /**
561
+ * Fetches a pair ID by genesis signature.
562
+ * @param genesis_signature - The genesis signature.
563
+ * @param consumerLogger - Custom logger instance.
564
+ * @returns The pair ID or null if not found.
565
+ */
566
+ declare const fetchPairByGenesisSignature: (genesis_signature: string, consumerLogger?: any) => Promise<number | null>;
567
+ /**
568
+ * Fetches a pair ID by mint.
569
+ * @param mint - The mint address.
570
+ * @param consumerLogger - Custom logger instance.
571
+ * @returns The pair ID or null if not found.
572
+ */
573
+ declare const fetchPairByMint: (mint: string, consumerLogger?: any) => Promise<number | null>;
574
+ /**
575
+ * Fetches a pair ID by mint and program ID.
576
+ * @param mint - The mint address.
577
+ * @param programId - The program ID.
578
+ * @param consumerLogger - Custom logger instance.
579
+ * @returns The pair ID or null if not found.
580
+ */
581
+ declare const fetchPairByMintAndProgramId: (mint: string, programId: string, consumerLogger?: any) => Promise<number | null>;
582
+ /**
583
+ * Fetches pair data by ID, fixing broken JSON in associated_bonding_curve.
584
+ * @param id - The pair ID.
585
+ * @param consumerLogger - Custom logger instance.
586
+ * @returns The pair data or null if not found.
587
+ */
588
+ declare const fetchPairDataById: (id: string | number, consumerLogger?: any) => Promise<Record<string, any> | null>;
589
+ /**
590
+ * Fetches a pair ID by mint and program ID.
591
+ * @param mint - The mint address.
592
+ * @param programId - The program ID.
593
+ * @param consumerLogger - Custom logger instance.
594
+ * @returns The pair ID or null if not found.
595
+ */
596
+ declare const fetchPairIdByMintAndProgramId: (mint: string, programId: string, consumerLogger?: any) => Promise<number | null>;
597
+ /**
598
+ * Fetches a pair by ID with optional filters.
599
+ * @param id - The pair ID.
600
+ * @param filters - Optional filters (e.g., sorted).
601
+ * @param consumerLogger - Custom logger instance.
602
+ * @returns The pair ID or null if not found.
603
+ */
604
+ declare const fetchPairById: (id: number, filters?: {
605
+ sorted?: boolean;
606
+ }, consumerLogger?: any) => Promise<number | null>;
607
+ /**
608
+ * Deletes a pair by genesis signature.
609
+ * @param genesis_signature - The genesis signature.
610
+ * @param consumerLogger - Custom logger instance.
611
+ * @returns True if deleted, false if not found.
612
+ */
613
+ declare const deletePairBySignature: (genesis_signature: string, consumerLogger?: any) => Promise<boolean>;
614
+ /**
615
+ * Function to close the PostgreSQL connection pool.
616
+ */
617
+ declare const closePool: (consumerLogger?: any) => Promise<void>;
618
+
619
+ declare const createTransactionsTable: () => Promise<void>;
620
+ declare function upsertTransaction(txData: TransactionItem): Promise<any>;
621
+ /**
622
+ * Upserts TCN data into transactions.tcns array using (signature, invocation) as unique keys.
623
+ */
624
+ declare function upsertTransactios(txData: TransactionItem): Promise<number>;
625
+ /**
626
+ * Fetches a transaction by its ID.
627
+ * @param id - The ID of the transaction.
628
+ * @returns The transaction data or null if not found.
629
+ */
630
+ declare const fetchTransactionById: (id: number) => Promise<any | null>;
631
+ /**
632
+ * Fetches a transaction by its signature.
633
+ * @param signature - The signature of the transaction.
634
+ * @returns The transaction data or null if not found.
635
+ */
636
+ declare const fetchTransactionBySignature: (signature: string) => Promise<any | null>;
637
+
638
+ /**
639
+ * Retrieves the value of an environment variable.
640
+ * @param key - The environment variable key.
641
+ * @param pathDir - Optional directory path to load the .env file from.
642
+ * @returns The value of the environment variable or null if not found.
643
+ */
644
+ declare function getEnvValue(key: string, pathDir?: string): string | null;
645
+
646
+ declare const staticIp = "192.168.0.100";
647
+ declare function isServerIp(): void;
648
+ declare function get_host(): "localhost" | "127.0.0.1";
649
+
650
+ /**
651
+ * Equivalent of __dirname for ESM
652
+ */
653
+ declare function getDirname(moduleUrl: string): string;
654
+ declare function getParentDirectory(): string;
655
+ declare function getAbsPath(subPath: string): string;
656
+ declare function getEnvPath(): string;
657
+ declare function getDbConfigsPath(): string;
658
+ declare function getSchemasPath(): string;
659
+ declare function getSchemasDirPath(subPath: string): string;
660
+ declare function getBaseDomain(inputUrl: string): string;
661
+
662
+ interface RPCParams {
663
+ url?: any;
664
+ method: any;
665
+ params: any;
666
+ }
667
+ declare function isRawResponse(response: any, typeObj: any): boolean;
668
+ declare function getTextResponse(response: Response): Promise<string | null>;
669
+ declare function getHeaders(): HeadersInit;
670
+ /**
671
+ * Fetches data from an IPFS URL.
672
+ * @param url - The IPFS URL to fetch data from.
673
+ * @returns The fetched data or null if an error occurs.
674
+ */
675
+ declare function fetchIPFSData(url: string, consumerLogger?: any): Promise<any>;
676
+ declare function getJsonResponse(response: Response, responseResult?: string, loadNestedJson?: boolean): Promise<any | null>;
677
+ declare function getResponse(response: Response, responseResult?: string | undefined, rawResponse?: boolean, loadNestedJson?: boolean): Promise<any | string | Response>;
678
+ declare function getRpcPayload(method: string, params?: any[], id?: number | string, jsonrpc?: string): any | null;
679
+ declare function cleanQueries(priorQueries: any[] | undefined, interval: number): any[];
680
+ declare function isRequestPerSingleRpc(priorQueries: any[], method: string, maxRequests: number, interval: number): false | number;
681
+ declare function isRequestPerSingleIp(priorQueries: any[], maxRequests: number, interval: number): false | number;
682
+ declare function isDataPerIp(priorQueries: any[], maxData: number, interval: number, avgData: number): false | number;
683
+ declare function getIsLimit(priorQueries: any[] | undefined, method?: string, rateLimit?: number, rpsLimit?: number, interval?: number, dataInterval?: number, dataLimit?: number, avgData?: number): false | number;
684
+ declare function fetchData(url: string, method: string, headers: {
685
+ [key: string]: string;
686
+ }, body: any): Promise<any>;
687
+ declare function getRpcParams(method: string, params?: any[] | null, url?: string | null, id?: number | string | null, jsonrpc?: string | null, headers?: {
688
+ [key: string]: string;
689
+ } | null, call_method?: string): Promise<{
690
+ url: string;
691
+ call_method: string;
692
+ headers: {
693
+ [key: string]: string;
694
+ };
695
+ payload: any;
696
+ }>;
697
+ declare function callRpc(method: string, params?: any, url?: any, id?: any, jsonrpc?: string | null, headers?: {
698
+ [key: string]: string;
699
+ } | null, call_method?: string): Promise<any>;
700
+ interface RpcPayload {
701
+ method: string;
702
+ params?: any[];
703
+ id?: number | string;
704
+ jsonrpc?: string;
705
+ headers?: {
706
+ [key: string]: string;
707
+ };
708
+ url_1_only?: boolean;
709
+ url_2_only?: boolean;
710
+ }
711
+ interface RpcResponse {
712
+ result?: any;
713
+ error?: any;
714
+ }
715
+
716
+ declare function safeDumpToFile(data: any, filePath: string): void;
717
+ declare function safeReadFromJson(filePath: string): any;
718
+ /**
719
+ * Serializes the input to JSON if it's an object, excluding circular references.
720
+ *
721
+ * @param data - The data to serialize.
722
+ * @returns The serialized JSON string or the original data.
723
+ */
724
+ declare function dumpIfJson(data: any): any;
725
+ declare function loadQueries<T = any>(callerUrl: string, subPath?: string): T;
726
+
727
+ export { KeyManager_server, appendTcnToPair, appendTcnToTransaction, broadcastTransaction, callMetaData, callRpc, call_and_upsert_metadata, call_rpc_data, checkMetaDataProcessed, cleanQueries, closePool, concurrencyQueue, convertDbMetaDataToMetadata2, createGetTransactionsTable, createLogDataTable, createMetaData2, createMetaDataTable, createOrAlterTable, createPairsTable, createTransactionsTable, deletePairBySignature, dumpIfJson, endPool, extractId, extractRow, fetchAllRows, fetchData, fetchExistingAccounts, fetchIPFSData, fetchLogEntryById, fetchLogEntryBySignature, fetchPairByGenesisSignature, fetchPairById, fetchPairByMint, fetchPairByMintAndProgramId, fetchPairDataById, fetchPairIdByMintAndProgramId, fetchTransactionById, fetchTransactionBySignature, fetch_getSignaturesForAddress, fetch_getTransaction, getAbsPath, getBaseDomain, getChannels, getDbConfigsPath, getDirname, getEnvPath, getEnvValue, getHeaders, getIsLimit, getJsonResponse, getMetaDataFromId, getMetaFoundation, getMetadataFromDb, getMetadataIdFromMint, getMetadataRowFromDb, getOrFetchMetaData, getOrFetchMetaDataId, getParentDirectory, getPool, getPubkeyString_server, getPubkey_server, getPubkeysFromMintMetaData, getResponse, getRpcParams, getRpcPayload, getSchemasDirPath, getSchemasPath, getTcns, getTextResponse, getUserAddress, getWebSocketServer, get_decodedData, get_headers, get_host, get_or_fetch_transaction, get_pair_data, get_token_info, initRabbitMQ, initializeUmi, insertLogEntry, insertMetaData, insertMetaDataDb, insertPair, isDataPerIp, isRawResponse, isRequestPerSingleIp, isRequestPerSingleRpc, isServerIp, loadQueries, parseProgramLogs, poolQuery, processAllAddresses, processMetaData, processMetaDataDecoded, processParsedLogs, processSingleAddress, processTxns, safeDumpToFile, safeReadFromJson, saveAsMetadata2, searchTransactionById, searchTransactionBySignature, sendToQueue, setMetaDataProcessed, setupIndexes, shutdownRabbitMQ, startAllServices, startConsumer, startPumpFunMonitor, startSolanaLogMonitor, staticIp, updateLogEntry, updateMetaDataById, updatePairById, updatePairByIds, updateSignatureToAccountMap, upsertAllPair, upsertGetTransaction, upsertMetadata2, upsertPair, upsertTokenMetadata, upsertTransaction, upsertTransactios, upsertWalletAssignments, withTransaction };
728
+ export type { InvocationRecord, RPCParams, RpcPayload, RpcResponse };
729
+ //# sourceMappingURL=server.d.ts.map