@sablier/indexers 4.0.0 → 5.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +17 -7
  2. package/dist/cjs/indexers/envio-deployments.js +1 -1
  3. package/dist/cjs/indexers/envio-deployments.js.map +1 -1
  4. package/dist/cjs/indexers/envio.js +18 -21
  5. package/dist/cjs/indexers/envio.js.map +1 -1
  6. package/dist/cjs/indexers/getters.js +4 -0
  7. package/dist/cjs/indexers/getters.js.map +1 -1
  8. package/dist/cjs/indexers/graph.js +27 -52
  9. package/dist/cjs/indexers/graph.js.map +1 -1
  10. package/dist/cjs/indexers/index.js +1 -0
  11. package/dist/cjs/indexers/index.js.map +1 -1
  12. package/dist/cjs/indexers/mappers.js +21 -0
  13. package/dist/cjs/indexers/mappers.js.map +1 -0
  14. package/dist/esm/indexers/envio-deployments.js +1 -1
  15. package/dist/esm/indexers/envio-deployments.js.map +1 -1
  16. package/dist/esm/indexers/envio.js +19 -22
  17. package/dist/esm/indexers/envio.js.map +1 -1
  18. package/dist/esm/indexers/getters.js +1 -0
  19. package/dist/esm/indexers/getters.js.map +1 -1
  20. package/dist/esm/indexers/graph.js +28 -52
  21. package/dist/esm/indexers/graph.js.map +1 -1
  22. package/dist/esm/indexers/index.js +1 -0
  23. package/dist/esm/indexers/index.js.map +1 -1
  24. package/dist/esm/indexers/mappers.js +17 -0
  25. package/dist/esm/indexers/mappers.js.map +1 -0
  26. package/dist/types/indexers/envio.d.ts.map +1 -1
  27. package/dist/types/indexers/getters.d.ts +1 -1
  28. package/dist/types/indexers/getters.d.ts.map +1 -1
  29. package/dist/types/indexers/graph.d.ts +0 -8
  30. package/dist/types/indexers/graph.d.ts.map +1 -1
  31. package/dist/types/indexers/index.d.ts +1 -0
  32. package/dist/types/indexers/index.d.ts.map +1 -1
  33. package/dist/types/indexers/mappers.d.ts +4 -0
  34. package/dist/types/indexers/mappers.d.ts.map +1 -0
  35. package/package.json +22 -24
package/README.md CHANGED
@@ -13,18 +13,19 @@ Data indexers for the [Sablier](https://sablier.com) protocol for onchain token
13
13
  Sablier's smart contract events and transform them into structured, queryable data APIs via GraphQL. The data is used to
14
14
  power the [Sablier Interface](https://app.sablier.com).
15
15
 
16
- There are two indexing providers: [The Graph](https://thegraph.com) and [Envio](https://envio.dev).
16
+ There are two indexing providers: [Envio](https://envio.dev) (preferred) and [The Graph](https://thegraph.com).
17
17
 
18
18
  ## Documentation 📚
19
19
 
20
20
  In-depth documentation is available at [docs.sablier.com](https://docs.sablier.com/api/overview).
21
21
 
22
- The package now exposes two public indexer keys:
22
+ The package exposes two public indexer keys:
23
23
 
24
24
  - `airdrops` for campaign distribution data
25
- - `streams` for the merged Flow + Lockup stream surface
25
+ - `streams` for the Flow + Lockup streams
26
26
 
27
- `analytics` remains a separate target rather than a public indexer key.
27
+ `analytics` remains a separate target rather than a public indexer key because it's meant to be a private indexer for
28
+ internal use only.
28
29
 
29
30
  Protocol-specific docs remain available here:
30
31
 
@@ -34,11 +35,22 @@ Protocol-specific docs remain available here:
34
35
 
35
36
  ## Quickstart 🚀
36
37
 
37
- Query the public Envio GraphQL endpoints directly to access Sablier protocol data:
38
+ You can query the public Envio GraphQL endpoints directly to access Sablier protocol data:
38
39
 
39
40
  - **Airdrops**: `https://indexer.hyperindex.xyz/508d217/v1/graphql`
40
41
  - **Streams**: `https://indexer.hyperindex.xyz/53b7e25/v1/graphql`
41
42
 
43
+ The standard Envio endpoints require [Hasura](https://docs.envio.dev/docs/HyperIndex/navigating-hasura) GraphQL query
44
+ syntax.
45
+
46
+ > [!TIP]
47
+ >
48
+ > If you're migrating from The Graph, Envio also exposes `/converter` endpoints that accept subgraph-compatible queries,
49
+ > convert them to HyperIndex (standard GraphQL), and return responses in the same format as a standard subgraph:
50
+ >
51
+ > - **Airdrops**: `https://indexer.hyperindex.xyz/508d217/converter`
52
+ > - **Streams**: `https://indexer.hyperindex.xyz/53b7e25/converter`
53
+
42
54
  For detailed documentation, queries, and examples, visit our [API docs](https://docs.sablier.com/api/overview).
43
55
 
44
56
  ## Contributing 🤝
@@ -52,5 +64,3 @@ feedback.
52
64
  ## License 📄
53
65
 
54
66
  This repo is licensed under GPL 3-0 or later.
55
-
56
- v2
@@ -6,7 +6,7 @@ function getIndexerURL(id) {
6
6
  return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;
7
7
  }
8
8
  function getConverterURL(id) {
9
- return `${getIndexerURL(id)}/converter`;
9
+ return `https://indexer.hyperindex.xyz/${id}/converter`;
10
10
  }
11
11
  function createDeployment(args) {
12
12
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":";;;AAsDA,gDAEC;AAtDD,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,GAAG,aAAa,CAAC,EAAE,CAAC,YAAY,CAAC;AAC1C,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAE5D,QAAA,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,SAAgB,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,wBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `${getIndexerURL(id)}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
1
+ {"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":";;;AAsDA,gDAEC;AAtDD,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,kCAAkC,EAAE,YAAY,CAAC;AAC1D,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAE5D,QAAA,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,SAAgB,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,wBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
@@ -4,6 +4,7 @@ exports.envioChains = exports.envio = void 0;
4
4
  const evm_1 = require("sablier/evm");
5
5
  const enums_js_1 = require("../enums.js");
6
6
  const envio_deployments_js_1 = require("./envio-deployments.js");
7
+ const mappers_js_1 = require("./mappers.js");
7
8
  function get(id, config) {
8
9
  return { config, id };
9
10
  }
@@ -36,30 +37,26 @@ const SUPPORTED_CHAINS = [
36
37
  get(evm_1.chains.baseSepolia.id),
37
38
  get(evm_1.chains.sepolia.id),
38
39
  ];
39
- function getEnvioDeploymentTarget(indexer) {
40
- return indexer === "streams" ? evm_1.Protocol.Lockup : indexer;
41
- }
42
40
  function getIndexers(indexer) {
43
- const deploymentTarget = getEnvioDeploymentTarget(indexer);
44
- return SUPPORTED_CHAINS.map((chain) => {
45
- const deployment = (0, envio_deployments_js_1.getEnvioDeployment)(indexer);
46
- return {
47
- chainId: chain.id,
48
- explorerURL: deployment.explorerURL,
49
- indexer,
50
- kind: "official",
51
- name: `sablier-${deploymentTarget}`,
52
- testingURL: `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`,
53
- vendor: enums_js_1.Vendor.Envio,
54
- endpoint: {
55
- id: deployment.endpoint.id,
56
- url: deployment.endpoint.url,
57
- },
58
- };
59
- });
41
+ const deploymentTarget = (0, mappers_js_1.getProtocolForIndexerKey)(indexer);
42
+ const deployment = (0, envio_deployments_js_1.getEnvioDeployment)(indexer);
43
+ const testingURL = `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`;
44
+ return SUPPORTED_CHAINS.map((chain) => ({
45
+ chainId: chain.id,
46
+ explorerURL: deployment.explorerURL,
47
+ indexer,
48
+ kind: "official",
49
+ name: `sablier-${deploymentTarget}`,
50
+ testingURL,
51
+ vendor: enums_js_1.Vendor.Envio,
52
+ endpoint: {
53
+ id: deployment.endpoint.id,
54
+ url: deployment.endpoint.url,
55
+ },
56
+ }));
60
57
  }
61
58
  exports.envio = {
62
- airdrops: getIndexers(evm_1.Protocol.Airdrops),
59
+ airdrops: getIndexers("airdrops"),
63
60
  streams: getIndexers("streams"),
64
61
  };
65
62
  exports.envioChains = SUPPORTED_CHAINS;
@@ -1 +1 @@
1
- {"version":3,"file":"envio.js","sourceRoot":"","sources":["../../../src/indexers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AAE;gBAC1B,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG;aAC7B;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,KAAK,GAA0C;IAC1D,QAAQ,EAAE,WAAW,CAAC,cAAQ,CAAC,QAAQ,CAAC;IACxC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;CACvB,CAAC;AAEE,QAAA,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for Envio.\n *\n * @see https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks\n */\nimport { chains, Protocol } from \"sablier/evm\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getEnvioDeployment } from \"./envio-deployments.js\";\n\ntype EnvioChainConfig = {\n /**\n * @see https://github.com/sablier-labs/indexers/discussions/147\n * @see https://github.com/enviodev/hyperindex/issues/599\n */\n hypersync?: string;\n /**\n * Chains indexed only through RPC. No HyperSync support.\n * @see https://docs.envio.dev/docs/HyperIndex/rpc-sync\n */\n rpcOnly?: boolean;\n};\n\ntype EnvioChain = {\n config?: EnvioChainConfig;\n id: number;\n};\n\nfunction get(id: number, config?: EnvioChainConfig): EnvioChain {\n return { config, id };\n}\n\nconst SUPPORTED_CHAINS = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.abstract.id),\n get(chains.arbitrum.id),\n get(chains.avalanche.id),\n get(chains.base.id),\n get(chains.blast.id),\n get(chains.berachain.id),\n get(chains.bsc.id),\n get(chains.chiliz.id, { hypersync: \"chiliz\" }),\n get(chains.gnosis.id),\n get(chains.hyperevm.id),\n get(chains.linea.id),\n get(chains.mainnet.id),\n get(chains.mode.id),\n get(chains.monad.id),\n get(chains.morph.id),\n get(chains.optimism.id),\n get(chains.polygon.id),\n get(chains.sonic.id),\n get(chains.scroll.id),\n get(chains.sei.id, { hypersync: \"sei\" }),\n get(chains.sophon.id),\n get(chains.superseed.id),\n get(chains.unichain.id),\n get(chains.xdc.id),\n get(chains.zksync.id),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.baseSepolia.id),\n get(chains.sepolia.id),\n] as const;\n\nfunction getEnvioDeploymentTarget(indexer: Indexer.IndexerKey): Indexer.Protocol {\n return indexer === \"streams\" ? Protocol.Lockup : indexer;\n}\n\nfunction getIndexers(indexer: Indexer.IndexerKey): Indexer[] {\n const deploymentTarget = getEnvioDeploymentTarget(indexer);\n return SUPPORTED_CHAINS.map((chain) => {\n const deployment = getEnvioDeployment(indexer);\n return {\n chainId: chain.id,\n explorerURL: deployment.explorerURL,\n indexer,\n kind: \"official\",\n name: `sablier-${deploymentTarget}`,\n testingURL: `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`,\n vendor: Vendor.Envio,\n endpoint: {\n id: deployment.endpoint.id,\n url: deployment.endpoint.url,\n },\n };\n });\n}\n\nexport const envio: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: getIndexers(Protocol.Airdrops),\n streams: getIndexers(\"streams\"),\n} as const;\n\nexport const envioChains = SUPPORTED_CHAINS;\n"]}
1
+ {"version":3,"file":"envio.js","sourceRoot":"","sources":["../../../src/indexers/envio.ts"],"names":[],"mappings":";;;AAKA,qCAAqC;AACrC,0CAAqC;AAErC,iEAA4D;AAC5D,6CAAwD;AAoBxD,SAAS,GAAG,CAAC,EAAU,EAAE,MAAyB;IAChD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,gBAAgB,GAAG;IAIvB,GAAG,CAAC,YAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACvB,GAAG,CAAC,YAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACvB,GAAG,CAAC,YAAM,CAAC,SAAS,CAAC,EAAE,CAAC;IACxB,GAAG,CAAC,YAAM,CAAC,IAAI,CAAC,EAA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AAG,CAAC,YAAM,CAAC,WAAW,CAAC,EAAE,CAAC;IAC1B,GAAG,CAAC,YAAM,CAAC,OAAO,CAAC,EAAE,CAAC;CACd,CAAC;AAEX,SAAS,WAAW,CAAC,OAA2B;IAC9C,MAAM,gBAAgB,GAAG,IAAA,qCAAwB,EAAC,OAAO,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAA,yCAAkB,EAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,oDAAoD,kBAAkB,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;IACrH,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE,KAAK,CAAC,EAAE;QACjB,WAAW,EAAE,UAAU,CAAC,WAAW;QACnC,OAAO;QACP,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,WAAW,gBAAgB,EAAE;QACnC,UAAU;QACV,MAAM,EAAE,iBAAM,CAAC,KAAK;QACpB,QAAQ,EAAE;YACR,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;YAC1B,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG;SAC7B;KACF,CAAC,CAAC,CAAC;AACN,CAAC;AAEY,QAAA,KAAK,GAA0C;IAC1D,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC;IACjC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;CACvB,CAAC;AAEE,QAAA,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for Envio.\n *\n * @see https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks\n */\nimport { chains } from \"sablier/evm\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getEnvioDeployment } from \"./envio-deployments.js\";\nimport { getProtocolForIndexerKey } from \"./mappers.js\";\n\ntype EnvioChainConfig = {\n /**\n * @see https://github.com/sablier-labs/indexers/discussions/147\n * @see https://github.com/enviodev/hyperindex/issues/599\n */\n hypersync?: string;\n /**\n * Chains indexed only through RPC. No HyperSync support.\n * @see https://docs.envio.dev/docs/HyperIndex/rpc-sync\n */\n rpcOnly?: boolean;\n};\n\ntype EnvioChain = {\n config?: EnvioChainConfig;\n id: number;\n};\n\nfunction get(id: number, config?: EnvioChainConfig): EnvioChain {\n return { config, id };\n}\n\nconst SUPPORTED_CHAINS = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.abstract.id),\n get(chains.arbitrum.id),\n get(chains.avalanche.id),\n get(chains.base.id),\n get(chains.blast.id),\n get(chains.berachain.id),\n get(chains.bsc.id),\n get(chains.chiliz.id, { hypersync: \"chiliz\" }),\n get(chains.gnosis.id),\n get(chains.hyperevm.id),\n get(chains.linea.id),\n get(chains.mainnet.id),\n get(chains.mode.id),\n get(chains.monad.id),\n get(chains.morph.id),\n get(chains.optimism.id),\n get(chains.polygon.id),\n get(chains.sonic.id),\n get(chains.scroll.id),\n get(chains.sei.id, { hypersync: \"sei\" }),\n get(chains.sophon.id),\n get(chains.superseed.id),\n get(chains.unichain.id),\n get(chains.xdc.id),\n get(chains.zksync.id),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.baseSepolia.id),\n get(chains.sepolia.id),\n] as const;\n\nfunction getIndexers(indexer: Indexer.IndexerKey): Indexer[] {\n const deploymentTarget = getProtocolForIndexerKey(indexer);\n const deployment = getEnvioDeployment(indexer);\n const testingURL = `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`;\n return SUPPORTED_CHAINS.map((chain) => ({\n chainId: chain.id,\n explorerURL: deployment.explorerURL,\n indexer,\n kind: \"official\",\n name: `sablier-${deploymentTarget}`,\n testingURL,\n vendor: Vendor.Envio,\n endpoint: {\n id: deployment.endpoint.id,\n url: deployment.endpoint.url,\n },\n }));\n}\n\nexport const envio: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: getIndexers(\"airdrops\"),\n streams: getIndexers(\"streams\"),\n} as const;\n\nexport const envioChains = SUPPORTED_CHAINS;\n"]}
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProtocolForIndexerKey = exports.getIndexerKeyForProtocol = void 0;
3
4
  exports.getIndexer = getIndexer;
4
5
  exports.getIndexerGraph = getIndexerGraph;
5
6
  exports.getIndexerEnvio = getIndexerEnvio;
6
7
  const data_js_1 = require("./data.js");
8
+ var mappers_js_1 = require("./mappers.js");
9
+ Object.defineProperty(exports, "getIndexerKeyForProtocol", { enumerable: true, get: function () { return mappers_js_1.getIndexerKeyForProtocol; } });
10
+ Object.defineProperty(exports, "getProtocolForIndexerKey", { enumerable: true, get: function () { return mappers_js_1.getProtocolForIndexerKey; } });
7
11
  function getIndexer(opts) {
8
12
  const { chainId, indexer, vendor } = opts;
9
13
  const registry = vendor === "envio" ? data_js_1.indexers.envio[indexer] : data_js_1.indexers.graph[indexer];
@@ -1 +1 @@
1
- {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":";;AAeA,gCAIC;AAWD,0CAEC;AAYD,0CAEC;AA7CD,uCAAqC;AAcrC,SAAgB,UAAU,CAAC,IAAgD;IACzE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,kBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxF,OAAO,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACtD,CAAC;AAWD,SAAgB,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAYD,SAAgB,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\nimport { indexers } from \"./data.js\";\n\ntype I = Indexer;\ntype K = Indexer.IndexerKey;\ntype V = Indexer.Vendor;\n\n/**\n * Retrieves an indexer configuration by chain ID, indexer, and vendor.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @param opts.vendor - The indexing vendor (envio or graph)\n * @returns The indexer configuration, or `undefined` if not found\n */\nexport function getIndexer(opts: { chainId: number; indexer: K; vendor: V }): I | undefined {\n const { chainId, indexer, vendor } = opts;\n const registry = vendor === \"envio\" ? indexers.envio[indexer] : indexers.graph[indexer];\n return registry?.find((c) => c.chainId === chainId);\n}\n/**\n * Retrieves a Graph indexer for the specified chain and indexer.\n *\n * Each Graph subgraph is deployed independently per chain, so each has a unique\n * endpoint URL specific to that chain.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Graph indexer configuration, or `undefined` if not found\n */\nexport function getIndexerGraph(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"graph\" });\n}\n/**\n * Retrieves an Envio indexer for the specified chain and indexer.\n *\n * Returns the same endpoint URL for any chain on which Envio is supported, since the\n * deployments are multi-chain with a single shared endpoint per indexer.\n * Returns `undefined` for chains where Envio is unsupported.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Envio indexer configuration, or `undefined` if the chain is unsupported\n */\nexport function getIndexerEnvio(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"envio\" });\n}\n"]}
1
+ {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":";;;AAiBA,gCAIC;AAWD,0CAEC;AAYD,0CAEC;AA/CD,uCAAqC;AAMrC,2CAAkF;AAAzE,sHAAA,wBAAwB,OAAA;AAAE,sHAAA,wBAAwB,OAAA;AAU3D,SAAgB,UAAU,CAAC,IAAgD;IACzE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,kBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxF,OAAO,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACtD,CAAC;AAWD,SAAgB,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAYD,SAAgB,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\nimport { indexers } from \"./data.js\";\n\ntype I = Indexer;\ntype K = Indexer.IndexerKey;\ntype V = Indexer.Vendor;\n\nexport { getIndexerKeyForProtocol, getProtocolForIndexerKey } from \"./mappers.js\";\n\n/**\n * Retrieves an indexer configuration by chain ID, indexer, and vendor.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @param opts.vendor - The indexing vendor (envio or graph)\n * @returns The indexer configuration, or `undefined` if not found\n */\nexport function getIndexer(opts: { chainId: number; indexer: K; vendor: V }): I | undefined {\n const { chainId, indexer, vendor } = opts;\n const registry = vendor === \"envio\" ? indexers.envio[indexer] : indexers.graph[indexer];\n return registry?.find((c) => c.chainId === chainId);\n}\n/**\n * Retrieves a Graph indexer for the specified chain and indexer.\n *\n * Each Graph subgraph is deployed independently per chain, so each has a unique\n * endpoint URL specific to that chain.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Graph indexer configuration, or `undefined` if not found\n */\nexport function getIndexerGraph(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"graph\" });\n}\n/**\n * Retrieves an Envio indexer for the specified chain and indexer.\n *\n * Returns the same endpoint URL for any chain on which Envio is supported, since the\n * deployments are multi-chain with a single shared endpoint per indexer.\n * Returns `undefined` for chains where Envio is unsupported.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Envio indexer configuration, or `undefined` if the chain is unsupported\n */\nexport function getIndexerEnvio(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"envio\" });\n}\n"]}
@@ -4,11 +4,11 @@ exports.graphChains = exports.graph = void 0;
4
4
  exports.getGraphChainSlug = getGraphChainSlug;
5
5
  exports.getSablierChainSlug = getSablierChainSlug;
6
6
  exports.getSubgraphYamlChainSlug = getSubgraphYamlChainSlug;
7
- exports.getProtocolGraphIndexer = getProtocolGraphIndexer;
8
7
  const sablier_1 = require("sablier");
9
8
  const evm_1 = require("sablier/evm");
10
9
  const constants_js_1 = require("../constants.js");
11
10
  const enums_js_1 = require("../enums.js");
11
+ const mappers_js_1 = require("./mappers.js");
12
12
  const CHAIN_SLUG_GRAPH_OVERRIDES = {
13
13
  [evm_1.chains.arbitrum.id]: "arbitrum-one",
14
14
  [evm_1.chains.denergy.id]: "denergychain",
@@ -45,7 +45,6 @@ function resolveCustom(protocol, chainId, templateURL) {
45
45
  return {
46
46
  chainId,
47
47
  explorerURL: `${endpointUrl}/graphql`,
48
- indexer: protocol,
49
48
  kind: "custom",
50
49
  name: subgraphName,
51
50
  vendor: enums_js_1.Vendor.Graph,
@@ -59,7 +58,6 @@ function resolveOfficial(protocol, chainId, subgraphId) {
59
58
  return {
60
59
  chainId,
61
60
  explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,
62
- indexer: protocol,
63
61
  kind: "official",
64
62
  name: subgraphName,
65
63
  testingURL: `https://api.studio.thegraph.com/query/${constants_js_1.SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,
@@ -72,16 +70,14 @@ function resolveOfficial(protocol, chainId, subgraphId) {
72
70
  }
73
71
  function custom(chainId, baseURL) {
74
72
  return {
75
- airdrops: resolveCustom(evm_1.Protocol.Airdrops, chainId, baseURL),
76
- flow: resolveCustom(evm_1.Protocol.Flow, chainId, baseURL),
77
- lockup: resolveCustom(evm_1.Protocol.Lockup, chainId, baseURL),
73
+ airdrops: resolveCustom((0, mappers_js_1.getProtocolForIndexerKey)("airdrops"), chainId, baseURL),
74
+ streams: resolveCustom((0, mappers_js_1.getProtocolForIndexerKey)("streams"), chainId, baseURL),
78
75
  };
79
76
  }
80
77
  function official(chainId, idMap) {
81
78
  return {
82
- airdrops: resolveOfficial(evm_1.Protocol.Airdrops, chainId, idMap.airdrops),
83
- flow: resolveOfficial(evm_1.Protocol.Flow, chainId, idMap.flow),
84
- lockup: resolveOfficial(evm_1.Protocol.Lockup, chainId, idMap.lockup),
79
+ airdrops: resolveOfficial((0, mappers_js_1.getProtocolForIndexerKey)("airdrops"), chainId, idMap.airdrops),
80
+ streams: resolveOfficial((0, mappers_js_1.getProtocolForIndexerKey)("streams"), chainId, idMap.streams),
85
81
  };
86
82
  }
87
83
  const CUSTOMS = [
@@ -91,99 +87,81 @@ const CUSTOMS = [
91
87
  const OFFICIALS = [
92
88
  official(evm_1.chains.mainnet.id, {
93
89
  airdrops: "DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs",
94
- flow: "ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod",
95
- lockup: "AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt",
90
+ streams: "AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt",
96
91
  }),
97
92
  official(evm_1.chains.abstract.id, {
98
93
  airdrops: "DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx",
99
- flow: "Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG",
100
- lockup: "2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw",
94
+ streams: "2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw",
101
95
  }),
102
96
  official(evm_1.chains.arbitrum.id, {
103
97
  airdrops: "HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr",
104
- flow: "C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW",
105
- lockup: "yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam",
98
+ streams: "yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam",
106
99
  }),
107
100
  official(evm_1.chains.avalanche.id, {
108
101
  airdrops: "CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA",
109
- flow: "6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh",
110
- lockup: "FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX",
102
+ streams: "FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX",
111
103
  }),
112
104
  official(evm_1.chains.base.id, {
113
105
  airdrops: "4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe",
114
- flow: "4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W",
115
- lockup: "778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F",
106
+ streams: "778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F",
116
107
  }),
117
108
  official(evm_1.chains.berachain.id, {
118
109
  airdrops: "CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE",
119
- flow: "J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh",
120
- lockup: "C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14",
110
+ streams: "C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14",
121
111
  }),
122
112
  official(evm_1.chains.bsc.id, {
123
113
  airdrops: "FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL",
124
- flow: "2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb",
125
- lockup: "A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK",
114
+ streams: "A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK",
126
115
  }),
127
116
  official(evm_1.chains.chiliz.id, {
128
117
  airdrops: "6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU",
129
- flow: "7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6",
130
- lockup: "4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb",
118
+ streams: "4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb",
131
119
  }),
132
120
  official(evm_1.chains.gnosis.id, {
133
121
  airdrops: "kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn",
134
- flow: "4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL",
135
- lockup: "DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK",
122
+ streams: "DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK",
136
123
  }),
137
124
  official(evm_1.chains.linea.id, {
138
125
  airdrops: "6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN",
139
- flow: "DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6",
140
- lockup: "GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs",
126
+ streams: "GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs",
141
127
  }),
142
128
  official(evm_1.chains.optimism.id, {
143
129
  airdrops: "CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7",
144
- flow: "AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf",
145
- lockup: "NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6",
130
+ streams: "NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6",
146
131
  }),
147
132
  official(evm_1.chains.polygon.id, {
148
133
  airdrops: "FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE",
149
- flow: "ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8",
150
- lockup: "8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu",
134
+ streams: "8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu",
151
135
  }),
152
136
  official(evm_1.chains.scroll.id, {
153
137
  airdrops: "Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9",
154
- flow: "HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF",
155
- lockup: "GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1",
138
+ streams: "GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1",
156
139
  }),
157
140
  official(evm_1.chains.sonic.id, {
158
141
  airdrops: "5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q",
159
- flow: "HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk",
160
- lockup: "GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh",
142
+ streams: "GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh",
161
143
  }),
162
144
  official(evm_1.chains.unichain.id, {
163
145
  airdrops: "4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy",
164
- flow: "Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8",
165
- lockup: "3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M",
146
+ streams: "3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M",
166
147
  }),
167
148
  official(evm_1.chains.zksync.id, {
168
149
  airdrops: "64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN",
169
- flow: "9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx",
170
- lockup: "7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN",
150
+ streams: "7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN",
171
151
  }),
172
152
  official(evm_1.chains.baseSepolia.id, {
173
153
  airdrops: "4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt",
174
- flow: "AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh",
175
- lockup: "DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz",
154
+ streams: "DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz",
176
155
  }),
177
156
  official(evm_1.chains.sepolia.id, {
178
157
  airdrops: "8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh",
179
- flow: "EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm",
180
- lockup: "5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa",
158
+ streams: "5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa",
181
159
  }),
182
160
  ];
183
161
  const ALL = [...CUSTOMS, ...OFFICIALS];
184
- function toSortedArray(indexerMaps, protocol) {
162
+ function toSortedArray(indexerMaps, indexer) {
185
163
  return indexerMaps
186
- .map((indexerMap) => indexerMap[protocol])
164
+ .map((indexerMap) => indexerMap[indexer])
187
165
  .sort((a, b) => {
188
166
  const chainNameA = sablier_1.sablier.chains.getOrThrow(a.chainId).name;
189
167
  const chainNameB = sablier_1.sablier.chains.getOrThrow(b.chainId).name;
@@ -193,12 +171,9 @@ function toSortedArray(indexerMaps, protocol) {
193
171
  function toPublicIndexers(indexers, indexer) {
194
172
  return indexers.map((entry) => ({ ...entry, indexer }));
195
173
  }
196
- function getProtocolGraphIndexer(opts) {
197
- return toSortedArray(ALL, opts.protocol).find((indexer) => indexer.chainId === opts.chainId);
198
- }
199
174
  exports.graph = {
200
- airdrops: toPublicIndexers(toSortedArray(ALL, evm_1.Protocol.Airdrops), evm_1.Protocol.Airdrops),
201
- streams: toPublicIndexers(toSortedArray(ALL, evm_1.Protocol.Lockup), "streams"),
175
+ airdrops: toPublicIndexers(toSortedArray(ALL, "airdrops"), "airdrops"),
176
+ streams: toPublicIndexers(toSortedArray(ALL, "streams"), "streams"),
202
177
  };
203
178
  exports.graphChains = exports.graph.streams.map((c) => c.chainId);
204
179
  //# sourceMappingURL=graph.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"mappings":";;;AAiDA,8CAEC;AAED,kDAEC;AAED,4DAEC;AAyND,0DAKC;AArRD,qCAAkC;AAClC,qCAA+C;AAC/C,kDAA0D;AAC1D,0CAAqC;AAarC,MAAM,0BAA0B,GAAkC;IAChE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AAM,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;QAC7D,OAAO,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,gBAAgB,CACvB,QAAgC,EAChC,OAA2B;IAE3B,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,uBAAuB,CAAC,IAGvC;IACC,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC;AAEY,QAAA,KAAK,GAA0C;IAC1D,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,EAAE,cAAQ,CAAC,QAAQ,CAAC,EAAE,cAAQ,CAAC,QAAQ,CAAC;IACpF,OAAO,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,EAAE,cAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC1E,CAAC;AAGW,QAAA,WAAW,GAAG,aAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for The Graph.\n *\n */\nimport { sablier } from \"sablier\";\nimport { chains, Protocol } from \"sablier/evm\";\nimport { SUBGRAPH_STUDIO_USER_ID } from \"../constants.js\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* CONSTANTS */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Custom chain slugs used by The Graph.\n *\n * ⚠️ NOTE: not all chain names used by The Graph are the same as the chain's slug defined in the Sablier SDK.\n * @see https://thegraph.com/docs/en/supported-networks\n */\nconst CHAIN_SLUG_GRAPH_OVERRIDES: { [chainId: number]: string } = {\n [chains.arbitrum.id]: \"arbitrum-one\",\n [chains.denergy.id]: \"denergychain\",\n [chains.polygon.id]: \"matic\",\n [chains.zksync.id]: \"zksync-era\",\n};\n\n/**\n * Custom chain slugs used by Sablier subgraphs.\n */\nconst CHAIN_SLUG_SABLIER_OVERRIDES: { [chainId: number]: string } = {\n [chains.denergy.id]: \"denergychain\",\n [chains.mainnet.id]: \"ethereum\",\n};\n\n/**\n * Some chains have made the really bad design choice of using custom network identifiers\n * in their subgraph.yaml files.\n */\nconst CHAIN_SLUG_SUBGRAPH_YAML: { [chainId: number]: string } = {\n [chains.lightlink.id]: \"mainnet\",\n};\n\nconst NAME_TEMPLATING_VAR = \"{SUBGRAPH_NAME}\";\n\n/* -------------------------------------------------------------------------- */\n/* HELPERS */\n/* -------------------------------------------------------------------------- */\n\nexport function getGraphChainSlug(chainId: number): string {\n return CHAIN_SLUG_GRAPH_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSablierChainSlug(chainId: number): string {\n return CHAIN_SLUG_SABLIER_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSubgraphYamlChainSlug(chainId: number): string {\n return CHAIN_SLUG_SUBGRAPH_YAML[chainId] ?? getGraphChainSlug(chainId);\n}\n\ntype ProtocolGraphIndexer = Omit<Indexer, \"indexer\"> & {\n indexer: Indexer.Protocol;\n};\n\nfunction getSubgraphName(chainId: number, protocol: Indexer.Protocol): string {\n const graphChainName = getSablierChainSlug(chainId);\n return `sablier-${protocol}-${graphChainName}`;\n}\n\n/**\n * Sort indexers alphabetically by chain name.\n */\nfunction resolveCustom(\n protocol: Indexer.Protocol,\n chainId: number,\n templateURL: string\n): ProtocolGraphIndexer {\n if (!templateURL.includes(NAME_TEMPLATING_VAR)) {\n throw new Error(\n `Template URL for custom Graph indexer does not include ${NAME_TEMPLATING_VAR}`\n );\n }\n const subgraphName = getSubgraphName(chainId, protocol);\n\n const endpointUrl = templateURL.replace(NAME_TEMPLATING_VAR, subgraphName);\n return {\n chainId,\n explorerURL: `${endpointUrl}/graphql`,\n indexer: protocol,\n kind: \"custom\",\n name: subgraphName,\n vendor: Vendor.Graph,\n endpoint: {\n url: endpointUrl,\n },\n };\n}\n\nfunction resolveOfficial(\n protocol: Indexer.Protocol,\n chainId: number,\n subgraphId: string\n): ProtocolGraphIndexer {\n const subgraphName = getSubgraphName(chainId, protocol);\n return {\n chainId,\n explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,\n indexer: protocol,\n kind: \"official\",\n name: subgraphName,\n testingURL: `https://api.studio.thegraph.com/query/${SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,\n vendor: Vendor.Graph,\n endpoint: {\n id: subgraphId,\n url: `https://gateway.thegraph.com/api/subgraphs/id/${subgraphId}`,\n },\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* DEFINITIONS */\n/* -------------------------------------------------------------------------- */\n\ntype SubgraphId = string;\ntype SubgraphIdMap = Record<Indexer.Protocol, SubgraphId>;\ntype ProtocolIndexerGraphMap = Record<Indexer.Protocol, ProtocolGraphIndexer>;\n\nfunction custom(chainId: number, baseURL: string): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveCustom(Protocol.Airdrops, chainId, baseURL),\n flow: resolveCustom(Protocol.Flow, chainId, baseURL),\n lockup: resolveCustom(Protocol.Lockup, chainId, baseURL),\n };\n}\n\nfunction official(chainId: number, idMap: SubgraphIdMap): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveOfficial(Protocol.Airdrops, chainId, idMap.airdrops),\n flow: resolveOfficial(Protocol.Flow, chainId, idMap.flow),\n lockup: resolveOfficial(Protocol.Lockup, chainId, idMap.lockup),\n };\n}\n\nconst CUSTOMS: ProtocolIndexerGraphMap[] = [\n custom(\n chains.lightlink.id,\n \"https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/{SUBGRAPH_NAME}\"\n ),\n custom(\n chains.denergy.id,\n \"https://thegraph.denergychain.com/subgraphs/name/denergychain/{SUBGRAPH_NAME}\"\n ),\n];\n\nconst OFFICIALS: ProtocolIndexerGraphMap[] = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.mainnet.id, {\n airdrops: \"DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs\",\n flow: \"ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod\",\n lockup: \"AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt\",\n }),\n official(chains.abstract.id, {\n airdrops: \"DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx\",\n flow: \"Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG\",\n lockup: \"2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw\",\n }),\n official(chains.arbitrum.id, {\n airdrops: \"HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr\",\n flow: \"C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW\",\n lockup: \"yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam\",\n }),\n official(chains.avalanche.id, {\n airdrops: \"CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA\",\n flow: \"6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh\",\n lockup: \"FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX\",\n }),\n official(chains.base.id, {\n airdrops: \"4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe\",\n flow: \"4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W\",\n lockup: \"778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F\",\n }),\n official(chains.berachain.id, {\n airdrops: \"CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE\",\n flow: \"J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh\",\n lockup: \"C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14\",\n }),\n official(chains.bsc.id, {\n airdrops: \"FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL\",\n flow: \"2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb\",\n lockup: \"A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK\",\n }),\n official(chains.chiliz.id, {\n airdrops: \"6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU\",\n flow: \"7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6\",\n lockup: \"4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb\",\n }),\n official(chains.gnosis.id, {\n airdrops: \"kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn\",\n flow: \"4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL\",\n lockup: \"DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK\",\n }),\n official(chains.linea.id, {\n airdrops: \"6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN\",\n flow: \"DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6\",\n lockup: \"GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs\",\n }),\n official(chains.optimism.id, {\n airdrops: \"CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7\",\n flow: \"AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf\",\n lockup: \"NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6\",\n }),\n official(chains.polygon.id, {\n airdrops: \"FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE\",\n flow: \"ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8\",\n lockup: \"8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu\",\n }),\n official(chains.scroll.id, {\n airdrops: \"Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9\",\n flow: \"HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF\",\n lockup: \"GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1\",\n }),\n official(chains.sonic.id, {\n airdrops: \"5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q\",\n flow: \"HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk\",\n lockup: \"GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh\",\n }),\n official(chains.unichain.id, {\n airdrops: \"4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy\",\n flow: \"Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8\",\n lockup: \"3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M\",\n }),\n official(chains.zksync.id, {\n airdrops: \"64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN\",\n flow: \"9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx\",\n lockup: \"7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN\",\n }),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.baseSepolia.id, {\n airdrops: \"4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt\",\n flow: \"AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh\",\n lockup: \"DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz\",\n }),\n official(chains.sepolia.id, {\n airdrops: \"8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh\",\n flow: \"EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm\",\n lockup: \"5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa\",\n }),\n];\n\nconst ALL: ProtocolIndexerGraphMap[] = [...CUSTOMS, ...OFFICIALS];\n\nfunction toSortedArray(\n indexerMaps: ProtocolIndexerGraphMap[],\n protocol: Indexer.Protocol\n): ProtocolGraphIndexer[] {\n return indexerMaps\n .map((indexerMap) => indexerMap[protocol])\n .sort((a, b) => {\n const chainNameA = sablier.chains.getOrThrow(a.chainId).name;\n const chainNameB = sablier.chains.getOrThrow(b.chainId).name;\n return chainNameA.localeCompare(chainNameB);\n });\n}\n\nfunction toPublicIndexers(\n indexers: ProtocolGraphIndexer[],\n indexer: Indexer.IndexerKey\n): Indexer[] {\n return indexers.map((entry) => ({ ...entry, indexer }));\n}\n\nexport function getProtocolGraphIndexer(opts: {\n chainId: number;\n protocol: Indexer.Protocol;\n}): ProtocolGraphIndexer | undefined {\n return toSortedArray(ALL, opts.protocol).find((indexer) => indexer.chainId === opts.chainId);\n}\n\nexport const graph: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: toPublicIndexers(toSortedArray(ALL, Protocol.Airdrops), Protocol.Airdrops),\n streams: toPublicIndexers(toSortedArray(ALL, Protocol.Lockup), \"streams\"),\n};\n\n// It doesn't matter what protocol we are using since each chain supports all protocols.\nexport const graphChains = graph.streams.map((c) => c.chainId);\n"]}
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"m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a,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC;CACpE,CAAC;AAIW,QAAA,WAAW,GAAG,aAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for The Graph.\n *\n */\nimport { sablier } from \"sablier\";\nimport { chains } from \"sablier/evm\";\nimport { SUBGRAPH_STUDIO_USER_ID } from \"../constants.js\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getProtocolForIndexerKey } from \"./mappers.js\";\n\n/* -------------------------------------------------------------------------- */\n/* CONSTANTS */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Custom chain slugs used by The Graph.\n *\n * ⚠️ NOTE: not all chain names used by The Graph are the same as the chain's slug defined in the Sablier SDK.\n * @see https://thegraph.com/docs/en/supported-networks\n */\nconst CHAIN_SLUG_GRAPH_OVERRIDES: { [chainId: number]: string } = {\n [chains.arbitrum.id]: \"arbitrum-one\",\n [chains.denergy.id]: \"denergychain\",\n [chains.polygon.id]: \"matic\",\n [chains.zksync.id]: \"zksync-era\",\n};\n\n/**\n * Custom chain slugs used by Sablier subgraphs.\n */\nconst CHAIN_SLUG_SABLIER_OVERRIDES: { [chainId: number]: string } = {\n [chains.denergy.id]: \"denergychain\",\n [chains.mainnet.id]: \"ethereum\",\n};\n\n/**\n * Some chains have made the really bad design choice of using custom network identifiers\n * in their subgraph.yaml files.\n */\nconst CHAIN_SLUG_SUBGRAPH_YAML: { [chainId: number]: string } = {\n [chains.lightlink.id]: \"mainnet\",\n};\n\nconst NAME_TEMPLATING_VAR = \"{SUBGRAPH_NAME}\";\n\n/* -------------------------------------------------------------------------- */\n/* HELPERS */\n/* -------------------------------------------------------------------------- */\n\nexport function getGraphChainSlug(chainId: number): string {\n return CHAIN_SLUG_GRAPH_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSablierChainSlug(chainId: number): string {\n return CHAIN_SLUG_SABLIER_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSubgraphYamlChainSlug(chainId: number): string {\n return CHAIN_SLUG_SUBGRAPH_YAML[chainId] ?? getGraphChainSlug(chainId);\n}\n\n// Internal indexer representation, indexed by protocol. The public `indexer`\n// key is attached later by `toPublicIndexers`.\ntype ProtocolGraphIndexer = Omit<Indexer, \"indexer\">;\n\nfunction getSubgraphName(chainId: number, protocol: Indexer.Protocol): string {\n const graphChainName = getSablierChainSlug(chainId);\n return `sablier-${protocol}-${graphChainName}`;\n}\n\nfunction resolveCustom(\n protocol: Indexer.Protocol,\n chainId: number,\n templateURL: string\n): ProtocolGraphIndexer {\n if (!templateURL.includes(NAME_TEMPLATING_VAR)) {\n throw new Error(\n `Template URL for custom Graph indexer does not include ${NAME_TEMPLATING_VAR}`\n );\n }\n const subgraphName = getSubgraphName(chainId, protocol);\n\n const endpointUrl = templateURL.replace(NAME_TEMPLATING_VAR, subgraphName);\n return {\n chainId,\n explorerURL: `${endpointUrl}/graphql`,\n kind: \"custom\",\n name: subgraphName,\n vendor: Vendor.Graph,\n endpoint: {\n url: endpointUrl,\n },\n };\n}\n\nfunction resolveOfficial(\n protocol: Indexer.Protocol,\n chainId: number,\n subgraphId: string\n): ProtocolGraphIndexer {\n const subgraphName = getSubgraphName(chainId, protocol);\n return {\n chainId,\n explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,\n kind: \"official\",\n name: subgraphName,\n testingURL: `https://api.studio.thegraph.com/query/${SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,\n vendor: Vendor.Graph,\n endpoint: {\n id: subgraphId,\n url: `https://gateway.thegraph.com/api/subgraphs/id/${subgraphId}`,\n },\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* DEFINITIONS */\n/* -------------------------------------------------------------------------- */\n\n// `streams` covers both flow and lockup data: the legacy Lockup subgraph was\n// extended to index Flow events as well, so only one subgraph ID is needed\n// per chain.\ntype SubgraphIdMap = Record<Indexer.IndexerKey, string>;\ntype ProtocolIndexerGraphMap = Record<Indexer.IndexerKey, ProtocolGraphIndexer>;\n\nfunction custom(chainId: number, baseURL: string): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveCustom(getProtocolForIndexerKey(\"airdrops\"), chainId, baseURL),\n streams: resolveCustom(getProtocolForIndexerKey(\"streams\"), chainId, baseURL),\n };\n}\n\nfunction official(chainId: number, idMap: SubgraphIdMap): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveOfficial(getProtocolForIndexerKey(\"airdrops\"), chainId, idMap.airdrops),\n streams: resolveOfficial(getProtocolForIndexerKey(\"streams\"), chainId, idMap.streams),\n };\n}\n\nconst CUSTOMS: ProtocolIndexerGraphMap[] = [\n custom(\n chains.lightlink.id,\n \"https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/{SUBGRAPH_NAME}\"\n ),\n custom(\n chains.denergy.id,\n \"https://thegraph.denergychain.com/subgraphs/name/denergychain/{SUBGRAPH_NAME}\"\n ),\n];\n\nconst OFFICIALS: ProtocolIndexerGraphMap[] = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.mainnet.id, {\n airdrops: \"DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs\",\n streams: \"AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt\",\n }),\n official(chains.abstract.id, {\n airdrops: \"DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx\",\n streams: \"2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw\",\n }),\n official(chains.arbitrum.id, {\n airdrops: \"HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr\",\n streams: \"yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam\",\n }),\n official(chains.avalanche.id, {\n airdrops: \"CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA\",\n streams: \"FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX\",\n }),\n official(chains.base.id, {\n airdrops: \"4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe\",\n streams: \"778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F\",\n }),\n official(chains.berachain.id, {\n airdrops: \"CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE\",\n streams: \"C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14\",\n }),\n official(chains.bsc.id, {\n airdrops: \"FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL\",\n streams: \"A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK\",\n }),\n official(chains.chiliz.id, {\n airdrops: \"6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU\",\n streams: \"4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb\",\n }),\n official(chains.gnosis.id, {\n airdrops: \"kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn\",\n streams: \"DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK\",\n }),\n official(chains.linea.id, {\n airdrops: \"6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN\",\n streams: \"GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs\",\n }),\n official(chains.optimism.id, {\n airdrops: \"CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7\",\n streams: \"NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6\",\n }),\n official(chains.polygon.id, {\n airdrops: \"FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE\",\n streams: \"8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu\",\n }),\n official(chains.scroll.id, {\n airdrops: \"Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9\",\n streams: \"GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1\",\n }),\n official(chains.sonic.id, {\n airdrops: \"5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q\",\n streams: \"GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh\",\n }),\n official(chains.unichain.id, {\n airdrops: \"4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy\",\n streams: \"3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M\",\n }),\n official(chains.zksync.id, {\n airdrops: \"64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN\",\n streams: \"7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN\",\n }),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.baseSepolia.id, {\n airdrops: \"4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt\",\n streams: \"DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz\",\n }),\n official(chains.sepolia.id, {\n airdrops: \"8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh\",\n streams: \"5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa\",\n }),\n];\n\nconst ALL: ProtocolIndexerGraphMap[] = [...CUSTOMS, ...OFFICIALS];\n\nfunction toSortedArray(\n indexerMaps: ProtocolIndexerGraphMap[],\n indexer: Indexer.IndexerKey\n): ProtocolGraphIndexer[] {\n return indexerMaps\n .map((indexerMap) => indexerMap[indexer])\n .sort((a, b) => {\n const chainNameA = sablier.chains.getOrThrow(a.chainId).name;\n const chainNameB = sablier.chains.getOrThrow(b.chainId).name;\n return chainNameA.localeCompare(chainNameB);\n });\n}\n\nfunction toPublicIndexers(\n indexers: ProtocolGraphIndexer[],\n indexer: Indexer.IndexerKey\n): Indexer[] {\n return indexers.map((entry) => ({ ...entry, indexer }));\n}\n\n// The public `streams` entry is built from the internal Lockup subgraph deployment,\n// which now indexes the merged flow + lockup events under a single subgraph per chain.\nexport const graph: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: toPublicIndexers(toSortedArray(ALL, \"airdrops\"), \"airdrops\"),\n streams: toPublicIndexers(toSortedArray(ALL, \"streams\"), \"streams\"),\n};\n\n// `streams` covers every chain we support on The Graph; airdrops are deployed\n// to the same chain set, so either key yields the same list.\nexport const graphChains = graph.streams.map((c) => c.chainId);\n"]}
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./data.js"), exports);
18
18
  __exportStar(require("./getters.js"), exports);
19
+ __exportStar(require("./mappers.js"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B","sourcesContent":["export * from \"./data.js\";\nexport * from \"./getters.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B;AAC7B,+CAA6B","sourcesContent":["export * from \"./data.js\";\nexport * from \"./getters.js\";\nexport * from \"./mappers.js\";\n"]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIndexerKeyForProtocol = getIndexerKeyForProtocol;
4
+ exports.getProtocolForIndexerKey = getProtocolForIndexerKey;
5
+ const evm_1 = require("sablier/evm");
6
+ const INDEXER_KEY_BY_PROTOCOL = {
7
+ airdrops: "airdrops",
8
+ flow: "streams",
9
+ lockup: "streams",
10
+ };
11
+ const PROTOCOL_BY_INDEXER_KEY = {
12
+ airdrops: evm_1.Protocol.Airdrops,
13
+ streams: evm_1.Protocol.Lockup,
14
+ };
15
+ function getIndexerKeyForProtocol(protocol) {
16
+ return INDEXER_KEY_BY_PROTOCOL[protocol];
17
+ }
18
+ function getProtocolForIndexerKey(indexer) {
19
+ return PROTOCOL_BY_INDEXER_KEY[indexer];
20
+ }
21
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/indexers/mappers.ts"],"names":[],"mappings":";;AAkBA,4DAEC;AAOD,4DAEC;AA7BD,qCAAuC;AAGvC,MAAM,uBAAuB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;CAC8C,CAAC;AAElE,MAAM,uBAAuB,GAAG;IAC9B,QAAQ,EAAE,cAAQ,CAAC,QAAQ;IAC3B,OAAO,EAAE,cAAQ,CAAC,MAAM;CACuC,CAAC;AAMlE,SAAgB,wBAAwB,CAAC,QAA0B;IACjE,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAOD,SAAgB,wBAAwB,CAAC,OAA2B;IAClE,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { Protocol } from \"sablier/evm\";\nimport type { Indexer } from \"../types.js\";\n\nconst INDEXER_KEY_BY_PROTOCOL = {\n airdrops: \"airdrops\",\n flow: \"streams\",\n lockup: \"streams\",\n} as const satisfies Record<Indexer.Protocol, Indexer.IndexerKey>;\n\nconst PROTOCOL_BY_INDEXER_KEY = {\n airdrops: Protocol.Airdrops,\n streams: Protocol.Lockup,\n} as const satisfies Record<Indexer.IndexerKey, Indexer.Protocol>;\n\n/**\n * Returns the public indexer key that covers the given protocol.\n * Both `flow` and `lockup` collapse to `streams`.\n */\nexport function getIndexerKeyForProtocol(protocol: Indexer.Protocol): Indexer.IndexerKey {\n return INDEXER_KEY_BY_PROTOCOL[protocol];\n}\n\n/**\n * Returns the canonical underlying protocol for an indexer key.\n * `streams` resolves to Lockup because the shared subgraph / Envio deployment\n * is named after Lockup even though it also indexes Flow events.\n */\nexport function getProtocolForIndexerKey(indexer: Indexer.IndexerKey): Indexer.Protocol {\n return PROTOCOL_BY_INDEXER_KEY[indexer];\n}\n"]}
@@ -2,7 +2,7 @@ function getIndexerURL(id) {
2
2
  return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;
3
3
  }
4
4
  function getConverterURL(id) {
5
- return `${getIndexerURL(id)}/converter`;
5
+ return `https://indexer.hyperindex.xyz/${id}/converter`;
6
6
  }
7
7
  function createDeployment(args) {
8
8
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,GAAG,aAAa,CAAC,EAAE,CAAC,YAAY,CAAC;AAC1C,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAEzE,MAAM,CAAC,MAAM,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `${getIndexerURL(id)}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
1
+ {"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,kCAAkC,EAAE,YAAY,CAAC;AAC1D,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAEzE,MAAM,CAAC,MAAM,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
@@ -1,6 +1,7 @@
1
- import { chains, Protocol } from "sablier/evm";
1
+ import { chains } from "sablier/evm";
2
2
  import { Vendor } from "../enums.js";
3
3
  import { getEnvioDeployment } from "./envio-deployments.js";
4
+ import { getProtocolForIndexerKey } from "./mappers.js";
4
5
  function get(id, config) {
5
6
  return { config, id };
6
7
  }
@@ -33,30 +34,26 @@ const SUPPORTED_CHAINS = [
33
34
  get(chains.baseSepolia.id),
34
35
  get(chains.sepolia.id),
35
36
  ];
36
- function getEnvioDeploymentTarget(indexer) {
37
- return indexer === "streams" ? Protocol.Lockup : indexer;
38
- }
39
37
  function getIndexers(indexer) {
40
- const deploymentTarget = getEnvioDeploymentTarget(indexer);
41
- return SUPPORTED_CHAINS.map((chain) => {
42
- const deployment = getEnvioDeployment(indexer);
43
- return {
44
- chainId: chain.id,
45
- explorerURL: deployment.explorerURL,
46
- indexer,
47
- kind: "official",
48
- name: `sablier-${deploymentTarget}`,
49
- testingURL: `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`,
50
- vendor: Vendor.Envio,
51
- endpoint: {
52
- id: deployment.endpoint.id,
53
- url: deployment.endpoint.url,
54
- },
55
- };
56
- });
38
+ const deploymentTarget = getProtocolForIndexerKey(indexer);
39
+ const deployment = getEnvioDeployment(indexer);
40
+ const testingURL = `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`;
41
+ return SUPPORTED_CHAINS.map((chain) => ({
42
+ chainId: chain.id,
43
+ explorerURL: deployment.explorerURL,
44
+ indexer,
45
+ kind: "official",
46
+ name: `sablier-${deploymentTarget}`,
47
+ testingURL,
48
+ vendor: Vendor.Envio,
49
+ endpoint: {
50
+ id: deployment.endpoint.id,
51
+ url: deployment.endpoint.url,
52
+ },
53
+ }));
57
54
  }
58
55
  export const envio = {
59
- airdrops: getIndexers(Protocol.Airdrops),
56
+ airdrops: getIndexers("airdrops"),
60
57
  streams: getIndexers("streams"),
61
58
  };
62
59
  export const envioChains = SUPPORTED_CHAINS;
@@ -1 +1 @@
1
- {"version":3,"file":"envio.js","sourceRoot":"","sources":["../../../src/indexers/envio.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAoB5D,SAAS,GAAG,CAAC,EAAU,EAAE,MAAyB;IAChD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,gBAAgB,GAAG;IAIvB,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACvB,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACvB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;IACxB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;IACnB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACpB,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;IACxB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAClB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;IAC9C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACrB,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACvB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACpB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACtB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;IACnB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACpB,GA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I,EAAE,WAAW,gBAAgB,EAAE;YACnC,UAAU,EAAE,oDAAoD,kBAAkB,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC7G,MAAM,EAAE,MAAM,CAAC,KAAK;YACpB,QAAQ,EAAE;gBACR,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;gBAC1B,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG;aAC7B;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAA0C;IAC1D,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACxC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for Envio.\n *\n * @see https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks\n */\nimport { chains, Protocol } from \"sablier/evm\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getEnvioDeployment } from \"./envio-deployments.js\";\n\ntype EnvioChainConfig = {\n /**\n * @see https://github.com/sablier-labs/indexers/discussions/147\n * @see https://github.com/enviodev/hyperindex/issues/599\n */\n hypersync?: string;\n /**\n * Chains indexed only through RPC. No HyperSync support.\n * @see https://docs.envio.dev/docs/HyperIndex/rpc-sync\n */\n rpcOnly?: boolean;\n};\n\ntype EnvioChain = {\n config?: EnvioChainConfig;\n id: number;\n};\n\nfunction get(id: number, config?: EnvioChainConfig): EnvioChain {\n return { config, id };\n}\n\nconst SUPPORTED_CHAINS = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.abstract.id),\n get(chains.arbitrum.id),\n get(chains.avalanche.id),\n get(chains.base.id),\n get(chains.blast.id),\n get(chains.berachain.id),\n get(chains.bsc.id),\n get(chains.chiliz.id, { hypersync: \"chiliz\" }),\n get(chains.gnosis.id),\n get(chains.hyperevm.id),\n get(chains.linea.id),\n get(chains.mainnet.id),\n get(chains.mode.id),\n get(chains.monad.id),\n get(chains.morph.id),\n get(chains.optimism.id),\n get(chains.polygon.id),\n get(chains.sonic.id),\n get(chains.scroll.id),\n get(chains.sei.id, { hypersync: \"sei\" }),\n get(chains.sophon.id),\n get(chains.superseed.id),\n get(chains.unichain.id),\n get(chains.xdc.id),\n get(chains.zksync.id),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.baseSepolia.id),\n get(chains.sepolia.id),\n] as const;\n\nfunction getEnvioDeploymentTarget(indexer: Indexer.IndexerKey): Indexer.Protocol {\n return indexer === \"streams\" ? Protocol.Lockup : indexer;\n}\n\nfunction getIndexers(indexer: Indexer.IndexerKey): Indexer[] {\n const deploymentTarget = getEnvioDeploymentTarget(indexer);\n return SUPPORTED_CHAINS.map((chain) => {\n const deployment = getEnvioDeployment(indexer);\n return {\n chainId: chain.id,\n explorerURL: deployment.explorerURL,\n indexer,\n kind: \"official\",\n name: `sablier-${deploymentTarget}`,\n testingURL: `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`,\n vendor: Vendor.Envio,\n endpoint: {\n id: deployment.endpoint.id,\n url: deployment.endpoint.url,\n },\n };\n });\n}\n\nexport const envio: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: getIndexers(Protocol.Airdrops),\n streams: getIndexers(\"streams\"),\n} as const;\n\nexport const envioChains = SUPPORTED_CHAINS;\n"]}
1
+ {"version":3,"file":"envio.js","sourceRoot":"","sources":["../../../src/indexers/envio.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE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AAU,CAAC;IACjC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for Envio.\n *\n * @see https://docs.envio.dev/docs/HyperSync/hypersync-supported-networks\n */\nimport { chains } from \"sablier/evm\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getEnvioDeployment } from \"./envio-deployments.js\";\nimport { getProtocolForIndexerKey } from \"./mappers.js\";\n\ntype EnvioChainConfig = {\n /**\n * @see https://github.com/sablier-labs/indexers/discussions/147\n * @see https://github.com/enviodev/hyperindex/issues/599\n */\n hypersync?: string;\n /**\n * Chains indexed only through RPC. No HyperSync support.\n * @see https://docs.envio.dev/docs/HyperIndex/rpc-sync\n */\n rpcOnly?: boolean;\n};\n\ntype EnvioChain = {\n config?: EnvioChainConfig;\n id: number;\n};\n\nfunction get(id: number, config?: EnvioChainConfig): EnvioChain {\n return { config, id };\n}\n\nconst SUPPORTED_CHAINS = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.abstract.id),\n get(chains.arbitrum.id),\n get(chains.avalanche.id),\n get(chains.base.id),\n get(chains.blast.id),\n get(chains.berachain.id),\n get(chains.bsc.id),\n get(chains.chiliz.id, { hypersync: \"chiliz\" }),\n get(chains.gnosis.id),\n get(chains.hyperevm.id),\n get(chains.linea.id),\n get(chains.mainnet.id),\n get(chains.mode.id),\n get(chains.monad.id),\n get(chains.morph.id),\n get(chains.optimism.id),\n get(chains.polygon.id),\n get(chains.sonic.id),\n get(chains.scroll.id),\n get(chains.sei.id, { hypersync: \"sei\" }),\n get(chains.sophon.id),\n get(chains.superseed.id),\n get(chains.unichain.id),\n get(chains.xdc.id),\n get(chains.zksync.id),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n get(chains.baseSepolia.id),\n get(chains.sepolia.id),\n] as const;\n\nfunction getIndexers(indexer: Indexer.IndexerKey): Indexer[] {\n const deploymentTarget = getProtocolForIndexerKey(indexer);\n const deployment = getEnvioDeployment(indexer);\n const testingURL = `https://cloud.hasura.io/public/graphiql?endpoint=${encodeURIComponent(deployment.endpoint.url)}`;\n return SUPPORTED_CHAINS.map((chain) => ({\n chainId: chain.id,\n explorerURL: deployment.explorerURL,\n indexer,\n kind: \"official\",\n name: `sablier-${deploymentTarget}`,\n testingURL,\n vendor: Vendor.Envio,\n endpoint: {\n id: deployment.endpoint.id,\n url: deployment.endpoint.url,\n },\n }));\n}\n\nexport const envio: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: getIndexers(\"airdrops\"),\n streams: getIndexers(\"streams\"),\n} as const;\n\nexport const envioChains = SUPPORTED_CHAINS;\n"]}
@@ -1,4 +1,5 @@
1
1
  import { indexers } from "./data.js";
2
+ export { getIndexerKeyForProtocol, getProtocolForIndexerKey } from "./mappers.js";
2
3
  export function getIndexer(opts) {
3
4
  const { chainId, indexer, vendor } = opts;
4
5
  const registry = vendor === "envio" ? indexers.envio[indexer] : indexers.graph[indexer];
@@ -1 +1 @@
1
- {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAcrC,MAAM,UAAU,UAAU,CAAC,IAAgD;IACzE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxF,OAAO,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACtD,CAAC;AAWD,MAAM,UAAU,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAYD,MAAM,UAAU,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\nimport { indexers } from \"./data.js\";\n\ntype I = Indexer;\ntype K = Indexer.IndexerKey;\ntype V = Indexer.Vendor;\n\n/**\n * Retrieves an indexer configuration by chain ID, indexer, and vendor.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @param opts.vendor - The indexing vendor (envio or graph)\n * @returns The indexer configuration, or `undefined` if not found\n */\nexport function getIndexer(opts: { chainId: number; indexer: K; vendor: V }): I | undefined {\n const { chainId, indexer, vendor } = opts;\n const registry = vendor === \"envio\" ? indexers.envio[indexer] : indexers.graph[indexer];\n return registry?.find((c) => c.chainId === chainId);\n}\n/**\n * Retrieves a Graph indexer for the specified chain and indexer.\n *\n * Each Graph subgraph is deployed independently per chain, so each has a unique\n * endpoint URL specific to that chain.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Graph indexer configuration, or `undefined` if not found\n */\nexport function getIndexerGraph(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"graph\" });\n}\n/**\n * Retrieves an Envio indexer for the specified chain and indexer.\n *\n * Returns the same endpoint URL for any chain on which Envio is supported, since the\n * deployments are multi-chain with a single shared endpoint per indexer.\n * Returns `undefined` for chains where Envio is unsupported.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Envio indexer configuration, or `undefined` if the chain is unsupported\n */\nexport function getIndexerEnvio(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"envio\" });\n}\n"]}
1
+ {"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAUlF,MAAM,UAAU,UAAU,CAAC,IAAgD;IACzE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1C,MAAM,QAAQ,GAAG,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxF,OAAO,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACtD,CAAC;AAWD,MAAM,UAAU,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAYD,MAAM,UAAU,eAAe,CAAC,IAAqC;IACnE,OAAO,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\nimport { indexers } from \"./data.js\";\n\ntype I = Indexer;\ntype K = Indexer.IndexerKey;\ntype V = Indexer.Vendor;\n\nexport { getIndexerKeyForProtocol, getProtocolForIndexerKey } from \"./mappers.js\";\n\n/**\n * Retrieves an indexer configuration by chain ID, indexer, and vendor.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @param opts.vendor - The indexing vendor (envio or graph)\n * @returns The indexer configuration, or `undefined` if not found\n */\nexport function getIndexer(opts: { chainId: number; indexer: K; vendor: V }): I | undefined {\n const { chainId, indexer, vendor } = opts;\n const registry = vendor === \"envio\" ? indexers.envio[indexer] : indexers.graph[indexer];\n return registry?.find((c) => c.chainId === chainId);\n}\n/**\n * Retrieves a Graph indexer for the specified chain and indexer.\n *\n * Each Graph subgraph is deployed independently per chain, so each has a unique\n * endpoint URL specific to that chain.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Graph indexer configuration, or `undefined` if not found\n */\nexport function getIndexerGraph(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"graph\" });\n}\n/**\n * Retrieves an Envio indexer for the specified chain and indexer.\n *\n * Returns the same endpoint URL for any chain on which Envio is supported, since the\n * deployments are multi-chain with a single shared endpoint per indexer.\n * Returns `undefined` for chains where Envio is unsupported.\n *\n * @param opts.chainId - The chain ID to look up\n * @param opts.indexer - The indexer key (airdrops or streams)\n * @returns The Envio indexer configuration, or `undefined` if the chain is unsupported\n */\nexport function getIndexerEnvio(opts: { chainId: number; indexer: K }): I | undefined {\n return getIndexer({ ...opts, vendor: \"envio\" });\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import { sablier } from "sablier";
2
- import { chains, Protocol } from "sablier/evm";
2
+ import { chains } from "sablier/evm";
3
3
  import { SUBGRAPH_STUDIO_USER_ID } from "../constants.js";
4
4
  import { Vendor } from "../enums.js";
5
+ import { getProtocolForIndexerKey } from "./mappers.js";
5
6
  const CHAIN_SLUG_GRAPH_OVERRIDES = {
6
7
  [chains.arbitrum.id]: "arbitrum-one",
7
8
  [chains.denergy.id]: "denergychain",
@@ -38,7 +39,6 @@ function resolveCustom(protocol, chainId, templateURL) {
38
39
  return {
39
40
  chainId,
40
41
  explorerURL: `${endpointUrl}/graphql`,
41
- indexer: protocol,
42
42
  kind: "custom",
43
43
  name: subgraphName,
44
44
  vendor: Vendor.Graph,
@@ -52,7 +52,6 @@ function resolveOfficial(protocol, chainId, subgraphId) {
52
52
  return {
53
53
  chainId,
54
54
  explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,
55
- indexer: protocol,
56
55
  kind: "official",
57
56
  name: subgraphName,
58
57
  testingURL: `https://api.studio.thegraph.com/query/${SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,
@@ -65,16 +64,14 @@ function resolveOfficial(protocol, chainId, subgraphId) {
65
64
  }
66
65
  function custom(chainId, baseURL) {
67
66
  return {
68
- airdrops: resolveCustom(Protocol.Airdrops, chainId, baseURL),
69
- flow: resolveCustom(Protocol.Flow, chainId, baseURL),
70
- lockup: resolveCustom(Protocol.Lockup, chainId, baseURL),
67
+ airdrops: resolveCustom(getProtocolForIndexerKey("airdrops"), chainId, baseURL),
68
+ streams: resolveCustom(getProtocolForIndexerKey("streams"), chainId, baseURL),
71
69
  };
72
70
  }
73
71
  function official(chainId, idMap) {
74
72
  return {
75
- airdrops: resolveOfficial(Protocol.Airdrops, chainId, idMap.airdrops),
76
- flow: resolveOfficial(Protocol.Flow, chainId, idMap.flow),
77
- lockup: resolveOfficial(Protocol.Lockup, chainId, idMap.lockup),
73
+ airdrops: resolveOfficial(getProtocolForIndexerKey("airdrops"), chainId, idMap.airdrops),
74
+ streams: resolveOfficial(getProtocolForIndexerKey("streams"), chainId, idMap.streams),
78
75
  };
79
76
  }
80
77
  const CUSTOMS = [
@@ -84,99 +81,81 @@ const CUSTOMS = [
84
81
  const OFFICIALS = [
85
82
  official(chains.mainnet.id, {
86
83
  airdrops: "DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs",
87
- flow: "ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod",
88
- lockup: "AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt",
84
+ streams: "AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt",
89
85
  }),
90
86
  official(chains.abstract.id, {
91
87
  airdrops: "DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx",
92
- flow: "Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG",
93
- lockup: "2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw",
88
+ streams: "2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw",
94
89
  }),
95
90
  official(chains.arbitrum.id, {
96
91
  airdrops: "HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr",
97
- flow: "C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW",
98
- lockup: "yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam",
92
+ streams: "yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam",
99
93
  }),
100
94
  official(chains.avalanche.id, {
101
95
  airdrops: "CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA",
102
- flow: "6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh",
103
- lockup: "FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX",
96
+ streams: "FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX",
104
97
  }),
105
98
  official(chains.base.id, {
106
99
  airdrops: "4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe",
107
- flow: "4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W",
108
- lockup: "778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F",
100
+ streams: "778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F",
109
101
  }),
110
102
  official(chains.berachain.id, {
111
103
  airdrops: "CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE",
112
- flow: "J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh",
113
- lockup: "C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14",
104
+ streams: "C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14",
114
105
  }),
115
106
  official(chains.bsc.id, {
116
107
  airdrops: "FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL",
117
- flow: "2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb",
118
- lockup: "A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK",
108
+ streams: "A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK",
119
109
  }),
120
110
  official(chains.chiliz.id, {
121
111
  airdrops: "6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU",
122
- flow: "7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6",
123
- lockup: "4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb",
112
+ streams: "4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb",
124
113
  }),
125
114
  official(chains.gnosis.id, {
126
115
  airdrops: "kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn",
127
- flow: "4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL",
128
- lockup: "DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK",
116
+ streams: "DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK",
129
117
  }),
130
118
  official(chains.linea.id, {
131
119
  airdrops: "6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN",
132
- flow: "DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6",
133
- lockup: "GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs",
120
+ streams: "GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs",
134
121
  }),
135
122
  official(chains.optimism.id, {
136
123
  airdrops: "CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7",
137
- flow: "AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf",
138
- lockup: "NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6",
124
+ streams: "NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6",
139
125
  }),
140
126
  official(chains.polygon.id, {
141
127
  airdrops: "FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE",
142
- flow: "ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8",
143
- lockup: "8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu",
128
+ streams: "8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu",
144
129
  }),
145
130
  official(chains.scroll.id, {
146
131
  airdrops: "Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9",
147
- flow: "HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF",
148
- lockup: "GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1",
132
+ streams: "GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1",
149
133
  }),
150
134
  official(chains.sonic.id, {
151
135
  airdrops: "5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q",
152
- flow: "HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk",
153
- lockup: "GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh",
136
+ streams: "GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh",
154
137
  }),
155
138
  official(chains.unichain.id, {
156
139
  airdrops: "4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy",
157
- flow: "Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8",
158
- lockup: "3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M",
140
+ streams: "3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M",
159
141
  }),
160
142
  official(chains.zksync.id, {
161
143
  airdrops: "64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN",
162
- flow: "9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx",
163
- lockup: "7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN",
144
+ streams: "7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN",
164
145
  }),
165
146
  official(chains.baseSepolia.id, {
166
147
  airdrops: "4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt",
167
- flow: "AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh",
168
- lockup: "DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz",
148
+ streams: "DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz",
169
149
  }),
170
150
  official(chains.sepolia.id, {
171
151
  airdrops: "8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh",
172
- flow: "EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm",
173
- lockup: "5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa",
152
+ streams: "5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa",
174
153
  }),
175
154
  ];
176
155
  const ALL = [...CUSTOMS, ...OFFICIALS];
177
- function toSortedArray(indexerMaps, protocol) {
156
+ function toSortedArray(indexerMaps, indexer) {
178
157
  return indexerMaps
179
- .map((indexerMap) => indexerMap[protocol])
158
+ .map((indexerMap) => indexerMap[indexer])
180
159
  .sort((a, b) => {
181
160
  const chainNameA = sablier.chains.getOrThrow(a.chainId).name;
182
161
  const chainNameB = sablier.chains.getOrThrow(b.chainId).name;
@@ -186,12 +165,9 @@ function toSortedArray(indexerMaps, protocol) {
186
165
  function toPublicIndexers(indexers, indexer) {
187
166
  return indexers.map((entry) => ({ ...entry, indexer }));
188
167
  }
189
- export function getProtocolGraphIndexer(opts) {
190
- return toSortedArray(ALL, opts.protocol).find((indexer) => indexer.chainId === opts.chainId);
191
- }
192
168
  export const graph = {
193
- airdrops: toPublicIndexers(toSortedArray(ALL, Protocol.Airdrops), Protocol.Airdrops),
194
- streams: toPublicIndexers(toSortedArray(ALL, Protocol.Lockup), "streams"),
169
+ airdrops: toPublicIndexers(toSortedArray(ALL, "airdrops"), "airdrops"),
170
+ streams: toPublicIndexers(toSortedArray(ALL, "streams"), "streams"),
195
171
  };
196
172
  export const graphChains = graph.streams.map((c) => c.chainId);
197
173
  //# sourceMappingURL=graph.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAarC,MAAM,0BAA0B,GAAkC;IAChE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,cAAc;IACpC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,cAAc;IACnC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,OAAO;IAC5B,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,YAAY;CACjC,CAAC;AAKF,MAAM,4BAA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AAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAGvC;IACC,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAA0C;IAC1D,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACpF,OAAO,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC1E,CAAC;AAGF,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for The Graph.\n *\n */\nimport { sablier } from \"sablier\";\nimport { chains, Protocol } from \"sablier/evm\";\nimport { SUBGRAPH_STUDIO_USER_ID } from \"../constants.js\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* CONSTANTS */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Custom chain slugs used by The Graph.\n *\n * ⚠️ NOTE: not all chain names used by The Graph are the same as the chain's slug defined in the Sablier SDK.\n * @see https://thegraph.com/docs/en/supported-networks\n */\nconst CHAIN_SLUG_GRAPH_OVERRIDES: { [chainId: number]: string } = {\n [chains.arbitrum.id]: \"arbitrum-one\",\n [chains.denergy.id]: \"denergychain\",\n [chains.polygon.id]: \"matic\",\n [chains.zksync.id]: \"zksync-era\",\n};\n\n/**\n * Custom chain slugs used by Sablier subgraphs.\n */\nconst CHAIN_SLUG_SABLIER_OVERRIDES: { [chainId: number]: string } = {\n [chains.denergy.id]: \"denergychain\",\n [chains.mainnet.id]: \"ethereum\",\n};\n\n/**\n * Some chains have made the really bad design choice of using custom network identifiers\n * in their subgraph.yaml files.\n */\nconst CHAIN_SLUG_SUBGRAPH_YAML: { [chainId: number]: string } = {\n [chains.lightlink.id]: \"mainnet\",\n};\n\nconst NAME_TEMPLATING_VAR = \"{SUBGRAPH_NAME}\";\n\n/* -------------------------------------------------------------------------- */\n/* HELPERS */\n/* -------------------------------------------------------------------------- */\n\nexport function getGraphChainSlug(chainId: number): string {\n return CHAIN_SLUG_GRAPH_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSablierChainSlug(chainId: number): string {\n return CHAIN_SLUG_SABLIER_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSubgraphYamlChainSlug(chainId: number): string {\n return CHAIN_SLUG_SUBGRAPH_YAML[chainId] ?? getGraphChainSlug(chainId);\n}\n\ntype ProtocolGraphIndexer = Omit<Indexer, \"indexer\"> & {\n indexer: Indexer.Protocol;\n};\n\nfunction getSubgraphName(chainId: number, protocol: Indexer.Protocol): string {\n const graphChainName = getSablierChainSlug(chainId);\n return `sablier-${protocol}-${graphChainName}`;\n}\n\n/**\n * Sort indexers alphabetically by chain name.\n */\nfunction resolveCustom(\n protocol: Indexer.Protocol,\n chainId: number,\n templateURL: string\n): ProtocolGraphIndexer {\n if (!templateURL.includes(NAME_TEMPLATING_VAR)) {\n throw new Error(\n `Template URL for custom Graph indexer does not include ${NAME_TEMPLATING_VAR}`\n );\n }\n const subgraphName = getSubgraphName(chainId, protocol);\n\n const endpointUrl = templateURL.replace(NAME_TEMPLATING_VAR, subgraphName);\n return {\n chainId,\n explorerURL: `${endpointUrl}/graphql`,\n indexer: protocol,\n kind: \"custom\",\n name: subgraphName,\n vendor: Vendor.Graph,\n endpoint: {\n url: endpointUrl,\n },\n };\n}\n\nfunction resolveOfficial(\n protocol: Indexer.Protocol,\n chainId: number,\n subgraphId: string\n): ProtocolGraphIndexer {\n const subgraphName = getSubgraphName(chainId, protocol);\n return {\n chainId,\n explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,\n indexer: protocol,\n kind: \"official\",\n name: subgraphName,\n testingURL: `https://api.studio.thegraph.com/query/${SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,\n vendor: Vendor.Graph,\n endpoint: {\n id: subgraphId,\n url: `https://gateway.thegraph.com/api/subgraphs/id/${subgraphId}`,\n },\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* DEFINITIONS */\n/* -------------------------------------------------------------------------- */\n\ntype SubgraphId = string;\ntype SubgraphIdMap = Record<Indexer.Protocol, SubgraphId>;\ntype ProtocolIndexerGraphMap = Record<Indexer.Protocol, ProtocolGraphIndexer>;\n\nfunction custom(chainId: number, baseURL: string): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveCustom(Protocol.Airdrops, chainId, baseURL),\n flow: resolveCustom(Protocol.Flow, chainId, baseURL),\n lockup: resolveCustom(Protocol.Lockup, chainId, baseURL),\n };\n}\n\nfunction official(chainId: number, idMap: SubgraphIdMap): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveOfficial(Protocol.Airdrops, chainId, idMap.airdrops),\n flow: resolveOfficial(Protocol.Flow, chainId, idMap.flow),\n lockup: resolveOfficial(Protocol.Lockup, chainId, idMap.lockup),\n };\n}\n\nconst CUSTOMS: ProtocolIndexerGraphMap[] = [\n custom(\n chains.lightlink.id,\n \"https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/{SUBGRAPH_NAME}\"\n ),\n custom(\n chains.denergy.id,\n \"https://thegraph.denergychain.com/subgraphs/name/denergychain/{SUBGRAPH_NAME}\"\n ),\n];\n\nconst OFFICIALS: ProtocolIndexerGraphMap[] = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.mainnet.id, {\n airdrops: \"DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs\",\n flow: \"ECxBJhKceBGaVvK6vqmK3VQAncKwPeAQutEb8TeiUiod\",\n lockup: \"AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt\",\n }),\n official(chains.abstract.id, {\n airdrops: \"DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx\",\n flow: \"Gq3e1gihMoSynURwGXQnPoKGVZzdsyomdrMH934vQHuG\",\n lockup: \"2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw\",\n }),\n official(chains.arbitrum.id, {\n airdrops: \"HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr\",\n flow: \"C3kBBUVtW2rxqGpAgSgEuSaT49izkH6Q8UibRt7XFTyW\",\n lockup: \"yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam\",\n }),\n official(chains.avalanche.id, {\n airdrops: \"CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA\",\n flow: \"6PAizjTALVqLLB7Ycq6XnpTeck8Z8QUpDFnVznMnisUh\",\n lockup: \"FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX\",\n }),\n official(chains.base.id, {\n airdrops: \"4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe\",\n flow: \"4XSxXh8ZgkzaA35nrbQG9Ry3FYz3ZFD8QBdWwVg5pF9W\",\n lockup: \"778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F\",\n }),\n official(chains.berachain.id, {\n airdrops: \"CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE\",\n flow: \"J87eaBLfTe7kKWgUGqe5TxntNCzA4pyWmqJowMddehuh\",\n lockup: \"C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14\",\n }),\n official(chains.bsc.id, {\n airdrops: \"FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL\",\n flow: \"2vU8KF4yWh3vvFjtg7MrRXMnYF3hPX2T3cvVBdaiXhNb\",\n lockup: \"A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK\",\n }),\n official(chains.chiliz.id, {\n airdrops: \"6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU\",\n flow: \"7QX7tJsANNFpxFLLjqzmXRzfY1wPGp3Lty5xGbhgADa6\",\n lockup: \"4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb\",\n }),\n official(chains.gnosis.id, {\n airdrops: \"kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn\",\n flow: \"4KiJ53cTNKdFWPBPmDNQ55tYj8hn1WQg8R4UcTY2STLL\",\n lockup: \"DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK\",\n }),\n official(chains.linea.id, {\n airdrops: \"6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN\",\n flow: \"DV9XgcCCPKzUn6pgetg4yPetpW2fNoRKBUQC43aNeLG6\",\n lockup: \"GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs\",\n }),\n official(chains.optimism.id, {\n airdrops: \"CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7\",\n flow: \"AygPgsehNGSB4K7DYYtvBPhTpEiU4dCu3nt95bh9FhRf\",\n lockup: \"NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6\",\n }),\n official(chains.polygon.id, {\n airdrops: \"FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE\",\n flow: \"ykp38sLarwz3cpmjSSPqo7UuTjYtkZ1KiL4PM2qwmT8\",\n lockup: \"8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu\",\n }),\n official(chains.scroll.id, {\n airdrops: \"Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9\",\n flow: \"HFpTrPzJyrHKWZ9ebb4VFRQSxRwpepyfz5wd138daFkF\",\n lockup: \"GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1\",\n }),\n official(chains.sonic.id, {\n airdrops: \"5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q\",\n flow: \"HkQKZKuM6dZ7Vc4FGC1gZTVVTniYJWRhTRmDDMNzN8zk\",\n lockup: \"GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh\",\n }),\n official(chains.unichain.id, {\n airdrops: \"4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy\",\n flow: \"Cb5uDYfy4ukN9fjhQ3PQZgDzyo6G66ztn1e847rS7Xa8\",\n lockup: \"3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M\",\n }),\n official(chains.zksync.id, {\n airdrops: \"64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN\",\n flow: \"9DRgWhDAMovpkej3eT8izum6jxEKHE62ciArffsTAScx\",\n lockup: \"7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN\",\n }),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.baseSepolia.id, {\n airdrops: \"4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt\",\n flow: \"AsnKT1waQMvuQxZAqfFuYwtRtAfN8uekDu75jPttfyLh\",\n lockup: \"DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz\",\n }),\n official(chains.sepolia.id, {\n airdrops: \"8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh\",\n flow: \"EU9AWmJjrjMRkjxcdHfuWPZvPTNAL3hiXfNGN5MwUpvm\",\n lockup: \"5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa\",\n }),\n];\n\nconst ALL: ProtocolIndexerGraphMap[] = [...CUSTOMS, ...OFFICIALS];\n\nfunction toSortedArray(\n indexerMaps: ProtocolIndexerGraphMap[],\n protocol: Indexer.Protocol\n): ProtocolGraphIndexer[] {\n return indexerMaps\n .map((indexerMap) => indexerMap[protocol])\n .sort((a, b) => {\n const chainNameA = sablier.chains.getOrThrow(a.chainId).name;\n const chainNameB = sablier.chains.getOrThrow(b.chainId).name;\n return chainNameA.localeCompare(chainNameB);\n });\n}\n\nfunction toPublicIndexers(\n indexers: ProtocolGraphIndexer[],\n indexer: Indexer.IndexerKey\n): Indexer[] {\n return indexers.map((entry) => ({ ...entry, indexer }));\n}\n\nexport function getProtocolGraphIndexer(opts: {\n chainId: number;\n protocol: Indexer.Protocol;\n}): ProtocolGraphIndexer | undefined {\n return toSortedArray(ALL, opts.protocol).find((indexer) => indexer.chainId === opts.chainId);\n}\n\nexport const graph: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: toPublicIndexers(toSortedArray(ALL, Protocol.Airdrops), Protocol.Airdrops),\n streams: toPublicIndexers(toSortedArray(ALL, Protocol.Lockup), \"streams\"),\n};\n\n// It doesn't matter what protocol we are using since each chain supports all protocols.\nexport const graphChains = graph.streams.map((c) => c.chainId);\n"]}
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,wBAAwB,EA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CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * @file Use this file to define new indexers for The Graph.\n *\n */\nimport { sablier } from \"sablier\";\nimport { chains } from \"sablier/evm\";\nimport { SUBGRAPH_STUDIO_USER_ID } from \"../constants.js\";\nimport { Vendor } from \"../enums.js\";\nimport type { Indexer } from \"../types.js\";\nimport { getProtocolForIndexerKey } from \"./mappers.js\";\n\n/* -------------------------------------------------------------------------- */\n/* CONSTANTS */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Custom chain slugs used by The Graph.\n *\n * ⚠️ NOTE: not all chain names used by The Graph are the same as the chain's slug defined in the Sablier SDK.\n * @see https://thegraph.com/docs/en/supported-networks\n */\nconst CHAIN_SLUG_GRAPH_OVERRIDES: { [chainId: number]: string } = {\n [chains.arbitrum.id]: \"arbitrum-one\",\n [chains.denergy.id]: \"denergychain\",\n [chains.polygon.id]: \"matic\",\n [chains.zksync.id]: \"zksync-era\",\n};\n\n/**\n * Custom chain slugs used by Sablier subgraphs.\n */\nconst CHAIN_SLUG_SABLIER_OVERRIDES: { [chainId: number]: string } = {\n [chains.denergy.id]: \"denergychain\",\n [chains.mainnet.id]: \"ethereum\",\n};\n\n/**\n * Some chains have made the really bad design choice of using custom network identifiers\n * in their subgraph.yaml files.\n */\nconst CHAIN_SLUG_SUBGRAPH_YAML: { [chainId: number]: string } = {\n [chains.lightlink.id]: \"mainnet\",\n};\n\nconst NAME_TEMPLATING_VAR = \"{SUBGRAPH_NAME}\";\n\n/* -------------------------------------------------------------------------- */\n/* HELPERS */\n/* -------------------------------------------------------------------------- */\n\nexport function getGraphChainSlug(chainId: number): string {\n return CHAIN_SLUG_GRAPH_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSablierChainSlug(chainId: number): string {\n return CHAIN_SLUG_SABLIER_OVERRIDES[chainId] ?? sablier.chains.getOrThrow(chainId).slug;\n}\n\nexport function getSubgraphYamlChainSlug(chainId: number): string {\n return CHAIN_SLUG_SUBGRAPH_YAML[chainId] ?? getGraphChainSlug(chainId);\n}\n\n// Internal indexer representation, indexed by protocol. The public `indexer`\n// key is attached later by `toPublicIndexers`.\ntype ProtocolGraphIndexer = Omit<Indexer, \"indexer\">;\n\nfunction getSubgraphName(chainId: number, protocol: Indexer.Protocol): string {\n const graphChainName = getSablierChainSlug(chainId);\n return `sablier-${protocol}-${graphChainName}`;\n}\n\nfunction resolveCustom(\n protocol: Indexer.Protocol,\n chainId: number,\n templateURL: string\n): ProtocolGraphIndexer {\n if (!templateURL.includes(NAME_TEMPLATING_VAR)) {\n throw new Error(\n `Template URL for custom Graph indexer does not include ${NAME_TEMPLATING_VAR}`\n );\n }\n const subgraphName = getSubgraphName(chainId, protocol);\n\n const endpointUrl = templateURL.replace(NAME_TEMPLATING_VAR, subgraphName);\n return {\n chainId,\n explorerURL: `${endpointUrl}/graphql`,\n kind: \"custom\",\n name: subgraphName,\n vendor: Vendor.Graph,\n endpoint: {\n url: endpointUrl,\n },\n };\n}\n\nfunction resolveOfficial(\n protocol: Indexer.Protocol,\n chainId: number,\n subgraphId: string\n): ProtocolGraphIndexer {\n const subgraphName = getSubgraphName(chainId, protocol);\n return {\n chainId,\n explorerURL: `https://thegraph.com/explorer/subgraphs/${subgraphId}`,\n kind: \"official\",\n name: subgraphName,\n testingURL: `https://api.studio.thegraph.com/query/${SUBGRAPH_STUDIO_USER_ID}/${subgraphName}/version/latest`,\n vendor: Vendor.Graph,\n endpoint: {\n id: subgraphId,\n url: `https://gateway.thegraph.com/api/subgraphs/id/${subgraphId}`,\n },\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* DEFINITIONS */\n/* -------------------------------------------------------------------------- */\n\n// `streams` covers both flow and lockup data: the legacy Lockup subgraph was\n// extended to index Flow events as well, so only one subgraph ID is needed\n// per chain.\ntype SubgraphIdMap = Record<Indexer.IndexerKey, string>;\ntype ProtocolIndexerGraphMap = Record<Indexer.IndexerKey, ProtocolGraphIndexer>;\n\nfunction custom(chainId: number, baseURL: string): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveCustom(getProtocolForIndexerKey(\"airdrops\"), chainId, baseURL),\n streams: resolveCustom(getProtocolForIndexerKey(\"streams\"), chainId, baseURL),\n };\n}\n\nfunction official(chainId: number, idMap: SubgraphIdMap): ProtocolIndexerGraphMap {\n return {\n airdrops: resolveOfficial(getProtocolForIndexerKey(\"airdrops\"), chainId, idMap.airdrops),\n streams: resolveOfficial(getProtocolForIndexerKey(\"streams\"), chainId, idMap.streams),\n };\n}\n\nconst CUSTOMS: ProtocolIndexerGraphMap[] = [\n custom(\n chains.lightlink.id,\n \"https://graph.phoenix.lightlink.io/query/subgraphs/name/lightlink/{SUBGRAPH_NAME}\"\n ),\n custom(\n chains.denergy.id,\n \"https://thegraph.denergychain.com/subgraphs/name/denergychain/{SUBGRAPH_NAME}\"\n ),\n];\n\nconst OFFICIALS: ProtocolIndexerGraphMap[] = [\n /* -------------------------------------------------------------------------- */\n /* MAINNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.mainnet.id, {\n airdrops: \"DFD73EcSue44R7mpHvXeyvcgaT8tR1iKakZFjBsiFpjs\",\n streams: \"AvDAMYYHGaEwn9F9585uqq6MM5CfvRtYcb7KjK7LKPCt\",\n }),\n official(chains.abstract.id, {\n airdrops: \"DRrf6mYEhRt9QieKvTjDHnSWcBm3GW96hpedMKVxLABx\",\n streams: \"2QjTdDFY233faXksUruMERMiDoQDdtGG5hBLC27aT1Pw\",\n }),\n official(chains.arbitrum.id, {\n airdrops: \"HkHDg6NVVVeobhpcU4pTPMktyC25zd6xAQBGpYrWDgRr\",\n streams: \"yvDXXHSyv6rGPSzfpbBcbQmMFrECac3Q2zADkYsMxam\",\n }),\n official(chains.avalanche.id, {\n airdrops: \"CpbN5Ps25UzqfdoqYdrjoSK4Him6nwDvdLK6a2sGS1PA\",\n streams: \"FTDmonvFEm1VGkzECcnDY2CPHcW5dSmHRurSjEEfTkCX\",\n }),\n official(chains.base.id, {\n airdrops: \"4SxPXkQNifgBYqje2C4yP5gz69erZwtD7GuLWgXHSLGe\",\n streams: \"778GfecD9tsyB4xNnz4wfuAyfHU6rqGr79VCPZKu3t2F\",\n }),\n official(chains.berachain.id, {\n airdrops: \"CnYsdmzuY3Mebwywvqv1WrXw9UZuPMTrxoGgR2UdThJE\",\n streams: \"C2r13APcUemQtVdPFm7p7T3aJkU2rH2EvdZzrQ53zi14\",\n }),\n official(chains.bsc.id, {\n airdrops: \"FXQT42kQPvpMJgsF5Bs6CqpxVvPP1LBqEhWThCCLMeGL\",\n streams: \"A8Vc9hi7j45u7P8Uw5dg4uqYJgPo4x1rB4oZtTVaiccK\",\n }),\n official(chains.chiliz.id, {\n airdrops: \"6LK1aqrhzZCp6c88MEBDAR1VDLpZQiXpBKkceJ5Lu4LU\",\n streams: \"4KsXUFvsKFHH7Q8k3BPgEv2NhCJJGwG78gCPAUpncYb\",\n }),\n official(chains.gnosis.id, {\n airdrops: \"kQEY5PYbjx4SMKyMUwqJHRLDzKH1aUqGsf1cnibU7Kn\",\n streams: \"DtKniy1RvB19q1r2g1WLN4reMNKDacEnuAjh284rW2iK\",\n }),\n official(chains.linea.id, {\n airdrops: \"6koYFSd8FQizdQWLTdRpL1yTmAbpMgN1vZN5W6ajZiTN\",\n streams: \"GvpecytqVzLzuwuQB3enozXoaZRFoVx8Kr7qrfMiE9bs\",\n }),\n official(chains.optimism.id, {\n airdrops: \"CHJtCNDzPqngpa1YJoaVrjuufZL6k6VkEkG9ZFUMQzF7\",\n streams: \"NZHzd2JNFKhHP5EWUiDxa5TaxGCFbSD4g6YnYr8JGi6\",\n }),\n official(chains.polygon.id, {\n airdrops: \"FRbBKiDyM5YpFAqHLXRfQWwQdMGzFL82hqoPXPpXzAHE\",\n streams: \"8fgeQMEQ8sskVeWE5nvtsVL2VpezDrAkx2d1VeiHiheu\",\n }),\n official(chains.scroll.id, {\n airdrops: \"Ev4xS8VxuoUcpgqz5A2BkTgQxQeskm4Fg41XzVJ2DX9\",\n streams: \"GycpYx8c9eRqxvEAfqnpNd1ZfXeuLzjRhnG7vvYaqEE1\",\n }),\n official(chains.sonic.id, {\n airdrops: \"5g8orwpm5Rf83G8eqDzDjodt3sG2D64cbiLC98Utmv4Q\",\n streams: \"GnaSPX9XLkPn219CqbGFU1NgveuQk2Hh3c8WxjtesaEh\",\n }),\n official(chains.unichain.id, {\n airdrops: \"4rQMJ85hKNhcaDyirGipGvcqS4auGU3QCFRBnpiexyNy\",\n streams: \"3MUG4H3gZcp9fpGLiJMTMeUFcQQ6QdT317P4wYKyns9M\",\n }),\n official(chains.zksync.id, {\n airdrops: \"64iDUwNVWKukw67nqTXif5taEfLug4Qf1c2suAv5hrqN\",\n streams: \"7SuEYGYwZ835LjVGB85ZE8z5zmqdKgmRh8kAEeJefWQN\",\n }),\n /* -------------------------------------------------------------------------- */\n /* TESTNETS */\n /* -------------------------------------------------------------------------- */\n official(chains.baseSepolia.id, {\n airdrops: \"4R2hm27YJ7CVEJ97BbBJz2r4KTKYc8sTqqzrD8UzEfJt\",\n streams: \"DdiYENuyh5ztSybRJnBnCZuUgESkFasjGFHZUbURpKHz\",\n }),\n official(chains.sepolia.id, {\n airdrops: \"8PLGDyXEsPgRTAnozL7MAjmTUFY4TBzs8i4F9Pq3wwSh\",\n streams: \"5yDtFSxyRuqyjvGJyyuQhMEW3Uah7Ddy2KFSKVhy9VMa\",\n }),\n];\n\nconst ALL: ProtocolIndexerGraphMap[] = [...CUSTOMS, ...OFFICIALS];\n\nfunction toSortedArray(\n indexerMaps: ProtocolIndexerGraphMap[],\n indexer: Indexer.IndexerKey\n): ProtocolGraphIndexer[] {\n return indexerMaps\n .map((indexerMap) => indexerMap[indexer])\n .sort((a, b) => {\n const chainNameA = sablier.chains.getOrThrow(a.chainId).name;\n const chainNameB = sablier.chains.getOrThrow(b.chainId).name;\n return chainNameA.localeCompare(chainNameB);\n });\n}\n\nfunction toPublicIndexers(\n indexers: ProtocolGraphIndexer[],\n indexer: Indexer.IndexerKey\n): Indexer[] {\n return indexers.map((entry) => ({ ...entry, indexer }));\n}\n\n// The public `streams` entry is built from the internal Lockup subgraph deployment,\n// which now indexes the merged flow + lockup events under a single subgraph per chain.\nexport const graph: Record<Indexer.IndexerKey, Indexer[]> = {\n airdrops: toPublicIndexers(toSortedArray(ALL, \"airdrops\"), \"airdrops\"),\n streams: toPublicIndexers(toSortedArray(ALL, \"streams\"), \"streams\"),\n};\n\n// `streams` covers every chain we support on The Graph; airdrops are deployed\n// to the same chain set, so either key yields the same list.\nexport const graphChains = graph.streams.map((c) => c.chainId);\n"]}
@@ -1,3 +1,4 @@
1
1
  export * from "./data.js";
2
2
  export * from "./getters.js";
3
+ export * from "./mappers.js";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./data.js\";\nexport * from \"./getters.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC","sourcesContent":["export * from \"./data.js\";\nexport * from \"./getters.js\";\nexport * from \"./mappers.js\";\n"]}
@@ -0,0 +1,17 @@
1
+ import { Protocol } from "sablier/evm";
2
+ const INDEXER_KEY_BY_PROTOCOL = {
3
+ airdrops: "airdrops",
4
+ flow: "streams",
5
+ lockup: "streams",
6
+ };
7
+ const PROTOCOL_BY_INDEXER_KEY = {
8
+ airdrops: Protocol.Airdrops,
9
+ streams: Protocol.Lockup,
10
+ };
11
+ export function getIndexerKeyForProtocol(protocol) {
12
+ return INDEXER_KEY_BY_PROTOCOL[protocol];
13
+ }
14
+ export function getProtocolForIndexerKey(indexer) {
15
+ return PROTOCOL_BY_INDEXER_KEY[indexer];
16
+ }
17
+ //# sourceMappingURL=mappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../src/indexers/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,uBAAuB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;CAC8C,CAAC;AAElE,MAAM,uBAAuB,GAAG;IAC9B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;IAC3B,OAAO,EAAE,QAAQ,CAAC,MAAM;CACuC,CAAC;AAMlE,MAAM,UAAU,wBAAwB,CAAC,QAA0B;IACjE,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAOD,MAAM,UAAU,wBAAwB,CAAC,OAA2B;IAClE,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { Protocol } from \"sablier/evm\";\nimport type { Indexer } from \"../types.js\";\n\nconst INDEXER_KEY_BY_PROTOCOL = {\n airdrops: \"airdrops\",\n flow: \"streams\",\n lockup: \"streams\",\n} as const satisfies Record<Indexer.Protocol, Indexer.IndexerKey>;\n\nconst PROTOCOL_BY_INDEXER_KEY = {\n airdrops: Protocol.Airdrops,\n streams: Protocol.Lockup,\n} as const satisfies Record<Indexer.IndexerKey, Indexer.Protocol>;\n\n/**\n * Returns the public indexer key that covers the given protocol.\n * Both `flow` and `lockup` collapse to `streams`.\n */\nexport function getIndexerKeyForProtocol(protocol: Indexer.Protocol): Indexer.IndexerKey {\n return INDEXER_KEY_BY_PROTOCOL[protocol];\n}\n\n/**\n * Returns the canonical underlying protocol for an indexer key.\n * `streams` resolves to Lockup because the shared subgraph / Envio deployment\n * is named after Lockup even though it also indexes Flow events.\n */\nexport function getProtocolForIndexerKey(indexer: Indexer.IndexerKey): Indexer.Protocol {\n return PROTOCOL_BY_INDEXER_KEY[indexer];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"envio.d.ts","sourceRoot":"","sources":["../../../src/indexers/envio.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,KAAK,gBAAgB,GAAG;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkEF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,CAG9C,CAAC;AAEX,eAAO,MAAM,WAAW,+UAAmB,CAAC"}
1
+ {"version":3,"file":"envio.d.ts","sourceRoot":"","sources":["../../../src/indexers/envio.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAI3C,KAAK,gBAAgB,GAAG;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA6DF,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,CAG9C,CAAC;AAEX,eAAO,MAAM,WAAW,+UAAmB,CAAC"}
@@ -2,6 +2,7 @@ import type { Indexer } from "../types.js";
2
2
  type I = Indexer;
3
3
  type K = Indexer.IndexerKey;
4
4
  type V = Indexer.Vendor;
5
+ export { getIndexerKeyForProtocol, getProtocolForIndexerKey } from "./mappers.js";
5
6
  export declare function getIndexer(opts: {
6
7
  chainId: number;
7
8
  indexer: K;
@@ -15,5 +16,4 @@ export declare function getIndexerEnvio(opts: {
15
16
  chainId: number;
16
17
  indexer: K;
17
18
  }): I | undefined;
18
- export {};
19
19
  //# sourceMappingURL=getters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getters.d.ts","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,KAAK,CAAC,GAAG,OAAO,CAAC;AACjB,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;AAC5B,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;AAUxB,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAI1F;AAWD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAEpF;AAYD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAEpF"}
1
+ {"version":3,"file":"getters.d.ts","sourceRoot":"","sources":["../../../src/indexers/getters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,KAAK,CAAC,GAAG,OAAO,CAAC;AACjB,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;AAC5B,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAUlF,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAI1F;AAWD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAEpF;AAYD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,SAAS,CAEpF"}
@@ -2,14 +2,6 @@ import type { Indexer } from "../types.js";
2
2
  export declare function getGraphChainSlug(chainId: number): string;
3
3
  export declare function getSablierChainSlug(chainId: number): string;
4
4
  export declare function getSubgraphYamlChainSlug(chainId: number): string;
5
- type ProtocolGraphIndexer = Omit<Indexer, "indexer"> & {
6
- indexer: Indexer.Protocol;
7
- };
8
- export declare function getProtocolGraphIndexer(opts: {
9
- chainId: number;
10
- protocol: Indexer.Protocol;
11
- }): ProtocolGraphIndexer | undefined;
12
5
  export declare const graph: Record<Indexer.IndexerKey, Indexer[]>;
13
6
  export declare const graphChains: number[];
14
- export {};
15
7
  //# sourceMappingURL=graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAyC3C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,KAAK,oBAAoB,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG;IACrD,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC;CAC3B,CAAC;AAqNF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC;CAC5B,GAAG,oBAAoB,GAAG,SAAS,CAEnC;AAED,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,CAGvD,CAAC;AAGF,eAAO,MAAM,WAAW,UAAsC,CAAC"}
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/indexers/graph.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA0C3C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhE;AAoMD,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,CAGvD,CAAC;AAIF,eAAO,MAAM,WAAW,UAAsC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from "./data.js";
2
2
  export * from "./getters.js";
3
+ export * from "./mappers.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/indexers/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Indexer } from "../types.js";
2
+ export declare function getIndexerKeyForProtocol(protocol: Indexer.Protocol): Indexer.IndexerKey;
3
+ export declare function getProtocolForIndexerKey(indexer: Indexer.IndexerKey): Indexer.Protocol;
4
+ //# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../src/indexers/mappers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAiB3C,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,UAAU,CAEvF;AAOD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAEtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sablier/indexers",
3
- "version": "4.0.0",
3
+ "version": "5.0.0-beta.0",
4
4
  "description": "Data indexers for the Sablier Protocol",
5
5
  "homepage": "https://github.com/sablier-labs/indexers#readme",
6
6
  "license": "GPL-3.0-or-later",
@@ -15,7 +15,7 @@
15
15
  "url": "https://sablier.com"
16
16
  },
17
17
  "dependencies": {
18
- "sablier": "^3.3.5"
18
+ "sablier": "^3.9.0"
19
19
  },
20
20
  "exports": {
21
21
  ".": {
@@ -34,53 +34,51 @@
34
34
  "sablier": "^3"
35
35
  },
36
36
  "devDependencies": {
37
- "@biomejs/biome": "^2.4.8",
37
+ "@biomejs/biome": "^2.4.10",
38
38
  "@effect/cli": "^0.75.0",
39
39
  "@effect/platform": "^0.96.0",
40
40
  "@effect/platform-node": "^0.106.0",
41
41
  "@graphprotocol/graph-cli": "0.98.1",
42
42
  "@graphprotocol/graph-ts": "0.38.2",
43
43
  "@graphql-tools/load-files": "^7.0.1",
44
- "@graphql-tools/merge": "^9.1.6",
44
+ "@graphql-tools/merge": "^9.1.7",
45
45
  "@graphql-typed-document-node/core": "^3.2.0",
46
46
  "@pinax/graph-networks-registry": "^0.7.1",
47
47
  "@sablier/devkit": "^1.15.3",
48
48
  "@sablier/price-data": "github:sablier-labs/price-data#main",
49
49
  "@types/js-yaml": "^4.0.9",
50
- "@types/lodash": "^4.17.21",
51
- "@types/node": "^25.0.3",
50
+ "@types/lodash-es": "^4.17.12",
51
+ "@types/node": "^25.5.2",
52
52
  "@vitest/ui": "^3.2.4",
53
53
  "abitype": "^1.2.3",
54
- "app-root-path": "^3.1.0",
55
- "assemblyscript": "^0.28.9",
54
+ "assemblyscript": "^0.28.13",
56
55
  "axios": "^1.13.2",
57
56
  "axios-retry": "^4.5.0",
58
57
  "chalk": "^5.6.2",
59
58
  "cli-table3": "^0.6.5",
60
59
  "concurrently": "^9.2.1",
61
- "dayjs": "^1.11.19",
62
- "dependency-cruiser": "^17.3.8",
63
- "dotenv": "^17.2.3",
60
+ "dayjs": "^1.11.20",
61
+ "dotenv": "^17.4.1",
64
62
  "effect": "^3.21.0",
65
- "envio": "2.32.10",
66
- "graphql": "^16.12.0",
63
+ "envio": "3.0.0-alpha.21",
64
+ "graphql": "^16.13.2",
67
65
  "graphql-request": "^7.4.0",
68
66
  "graphql-tag": "^2.12.6",
69
67
  "husky": "^9.1.7",
70
68
  "js-yaml": "^4.1.1",
71
- "knip": "^5.78.0",
69
+ "knip": "^5.88.1",
72
70
  "linkifyjs": "^4.3.2",
73
- "lint-staged": "^16.2.7",
74
- "lodash": "^4.17.21",
75
- "ora": "^8.2.0",
76
- "prettier": "^3.7.4",
77
- "strip-ansi": "^7.1.2",
71
+ "lint-staged": "^16.4.0",
72
+ "lodash-es": "^4.18.1",
73
+ "ora": "^9.3.0",
74
+ "prettier": "^3.8.1",
75
+ "strip-ansi": "^7.2.0",
78
76
  "ts-node": "^10.9.2",
79
77
  "tsx": "^4.21.0",
80
78
  "typescript": "^5.9.3",
81
- "ultracite": "^7.3.1",
82
- "viem": "^2.47.5",
83
- "vite": "^7.3.0",
79
+ "ultracite": "^7.4.3",
80
+ "viem": "^2.47.10",
81
+ "vite": "^7.3.2",
84
82
  "vitest": "^3.2.4"
85
83
  },
86
84
  "engines": {
@@ -98,7 +96,7 @@
98
96
  "url": "git+https://github.com/sablier-labs/indexers.git"
99
97
  },
100
98
  "scripts": {
101
- "prepack": "pnpm install --frozen-lockfile && just build",
102
- "start": "cd ./envio/$ENVIO_INDEXER_NAME && ts-node ./bindings/src/Index.res.js"
99
+ "prepack": "pnpm install --frozen-lockfile && just build::all",
100
+ "start": "cd ./envio/$ENVIO_INDEXER_NAME && ts-node ./bindings/src/Index.res.mjs"
103
101
  }
104
102
  }