uniswap-v2-dump 1.0.20 → 1.0.22

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 (3) hide show
  1. package/dump.csv +8 -0
  2. package/index.d.ts +59 -0
  3. package/package.json +2 -1
package/dump.csv CHANGED
@@ -490156,3 +490156,11 @@
490156
490156
  490155,0xf27c229ba892ec325f849868f3433a815276d5df,0xa650207b2989beee7d9b40ac456274c023e01ec0,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490157
490157
  490156,0x7e87afcc160d7d1ff297477673e92a93c81312dc,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xe3f13edd06253a48ed368e064720b85dae1937a5
490158
490158
  490157,0x3b69041bf1169c2643e39907976c757a7542ddfb,0x634a78850626e722b94b403822bd12b01c8568f0,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490159
+ 490158,0x02a5adb75b9c71e6140a2d1392dbd26e189c4d81,0x0dbd5a83b402f55e7aaef799f9630356c0176985,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490160
+ 490159,0x82ca119a29490cbcc8d6acca6937fd7cf2a78bac,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xd919926d94c5a79e13648376d02c5eaa553d12e8
490161
+ 490160,0xfa36fd4c0b8adcbfa52f95dec894943e857b0781,0xaab7686fe2bd54b48b8050f5284f9220c322424c,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490162
+ 490161,0xbc1355ff45a2e5dc37c70e7c18c8e756508b053e,0x464e3e12c5740acc5bdc5acefc2da2e2552bc393,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490163
+ 490162,0x77fd578cf62e7071f8db025f9775f37abaccc76e,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48,0xf653c6b0a9862fa717482f6816534cb73cfb9c53
490164
+ 490163,0xd2826a629bdde37138f645ff9c9e6508fa338129,0x7d1275fbcbd174e9b746d849acd952f6471468f6,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490165
+ 490164,0x24cd00010ea7c958df471be061022ce88033e71c,0xbd56c289fe52317bf94fe23b321fb8ef22e4ccbd,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
490166
+ 490165,0xb7588f00797e8d2b0f2f98d5be9e65dba51faae5,0x4687d5b824ca511376d1642f9ccb5f2a1f2c1559,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
package/index.d.ts ADDED
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Represents a pair from a Uniswap V2-compatible protocol.
3
+ */
4
+ export interface pair {
5
+ /** The index of the pair in the factory. */
6
+ id: number
7
+ /** The address of the pair contract. */
8
+ pair: string
9
+ /** The address of token0. */
10
+ token0: string
11
+ /** The address of token1. */
12
+ token1: string
13
+ }
14
+
15
+ /**
16
+ * Parameters for the load function.
17
+ */
18
+ export interface load_params {
19
+ /** Alchemy/Infura API key. */
20
+ key?: string
21
+ /** The address of a Uniswap V2-compatible factory (e.g., Uniswap, PancakeSwap, SushiSwap). */
22
+ factory?: string
23
+ /** Path to the cache file. Set to null to disable caching. */
24
+ filename?: string | null
25
+ /** Number of pairs to fetch in a single multicall. */
26
+ multicall_size?: number
27
+ /** Start loading from this index. */
28
+ from?: number
29
+ /** Load up to this index (inclusive). */
30
+ to?: number
31
+ /** Progress callback. */
32
+ progress?: (current: number, total: number) => void
33
+ /** Number of worker threads to use. Set to 0 to run in the main thread. */
34
+ workers?: number
35
+ /** Existing pairs to start with (used for updates). */
36
+ pairs?: pair[]
37
+ /** Timeout between updates in milliseconds. */
38
+ update_timeout?: number
39
+ /** Signal to abort the loading process. */
40
+ abort_signal?: AbortSignal
41
+ }
42
+
43
+ /**
44
+ * Loads pairs from a Uniswap V2-compatible factory.
45
+ * @param params Loading configuration.
46
+ * @returns A promise that resolves to an array of pairs.
47
+ */
48
+ export function load(params?: load_params): Promise<pair[]>
49
+
50
+ /**
51
+ * Subscribes to new pairs being added to the factory.
52
+ * @param callback Called with total available data first and then whenever new pairs added to factory.
53
+ * @param params Loading configuration.
54
+ * @returns An unsubscribe function.
55
+ */
56
+ export function subscribe(
57
+ callback: (pairs: pair[]) => void,
58
+ params?: load_params
59
+ ): () => void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniswap-v2-dump",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Static set of addresses (uniswap-v2)",
5
5
  "keywords": [
6
6
  "Uniswap-v2",
@@ -17,6 +17,7 @@
17
17
  "license": "MIT",
18
18
  "author": "Vladimir Spirin (spirin.vladimir@gmail.com)",
19
19
  "type": "commonjs",
20
+ "types": "index.d.ts",
20
21
  "main": "index.js",
21
22
  "scripts": {
22
23
  "start": "node -e \"require('./index.js').load({workers: 0})\""