sushiswap-dump 1.0.1 → 1.0.3

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/README.md CHANGED
@@ -17,13 +17,13 @@ CSV schema: `id,pair,token0,token1`
17
17
  ...
18
18
  ```
19
19
  where:
20
- - ``
21
- * 1 pair/pool index at factory contract
22
- - ``
20
+ - `1`
21
+ * pair/pool index at factory contract
22
+ - `0x06da0fd433c1a5d7a4faa01111c044910a184553`
23
23
  * USDT/WETH AMM [contract](https://etherscan.io/address/0x06da0fd433c1a5d7a4faa01111c044910a184553) address
24
- - ``
24
+ - `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`
25
25
  * WETH ERC-20 token [contract](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) address
26
- - ``
26
+ - `0xdac17f958d2ee523a2206206994597c13d831ec7`
27
27
  * USDT ERC-20 token [contract](https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7) address
28
28
 
29
29
  ## API
package/dump.csv CHANGED
@@ -4555,3 +4555,4 @@
4555
4555
  4554,0xe4717f8a5e6975127827ca69dd8812655c627189,0x3e327924b71121dc76d2774af076399db0c090b2,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
4556
4556
  4555,0xac6ed94251a49577dcd03201b360feeb4b5ecdd6,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xe3b6976e38f0d0f74dec7aee8834971e1f3556aa
4557
4557
  4556,0xd03ea517328142a8dc1b0a3727d237d0506d0b00,0x976a95daa8e89b68f93d06c44da85e347ceecced,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
4558
+ 4557,0x75749389c39362575bed21d30029d08f338058bc,0xdac17f958d2ee523a2206206994597c13d831ec7,0xee08cd04816c1c2f4f6c05c2c0200c05cd301dc2
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": "sushiswap-dump",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Static set of addresses (SushiSwap Ethereum mainnet)",
5
5
  "keywords": [
6
6
  "SushiSwap",